static int decode_cabac_mb_chroma_pre_mode( H264Context *h) {

    const int mba_xy = h->left_mb_xy[0];

    const int mbb_xy = h->top_mb_xy;



    int ctx = 0;



    /* No need to test for IS_INTRA4x4 and IS_INTRA16x16, as we set chroma_pred_mode_table to 0 */

    if( h->slice_table[mba_xy] == h->slice_num && h->chroma_pred_mode_table[mba_xy] != 0 )

        ctx++;



    if( h->slice_table[mbb_xy] == h->slice_num && h->chroma_pred_mode_table[mbb_xy] != 0 )

        ctx++;



    if( get_cabac( &h->cabac, &h->cabac_state[64+ctx] ) == 0 )

        return 0;



    if( get_cabac( &h->cabac, &h->cabac_state[64+3] ) == 0 )

        return 1;

    if( get_cabac( &h->cabac, &h->cabac_state[64+3] ) == 0 )

        return 2;

    else

        return 3;

}

static int decode_cabac_mb_chroma_pre_mode( H264Context *h) {

    const int mba_xy = h->left_mb_xy[0];

    const int mbb_xy = h->top_mb_xy;



    int ctx = 0;



    

    if( h->slice_table[mba_xy] == h->slice_num && h->chroma_pred_mode_table[mba_xy] != 0 )

        ctx++;



    if( h->slice_table[mbb_xy] == h->slice_num && h->chroma_pred_mode_table[mbb_xy] != 0 )

        ctx++;



    if( get_cabac( &h->cabac, &h->cabac_state[64+ctx] ) == 0 )

        return 0;



    if( get_cabac( &h->cabac, &h->cabac_state[64+3] ) == 0 )

        return 1;

    if( get_cabac( &h->cabac, &h->cabac_state[64+3] ) == 0 )

        return 2;

    else

        return 3;

}

static int FUNC_0( H264Context *VAR_0) {

    const int VAR_1 = VAR_0->left_mb_xy[0];

    const int VAR_2 = VAR_0->top_mb_xy;



    int VAR_3 = 0;



    

    if( VAR_0->slice_table[VAR_1] == VAR_0->slice_num && VAR_0->chroma_pred_mode_table[VAR_1] != 0 )

        VAR_3++;



    if( VAR_0->slice_table[VAR_2] == VAR_0->slice_num && VAR_0->chroma_pred_mode_table[VAR_2] != 0 )

        VAR_3++;



    if( get_cabac( &VAR_0->cabac, &VAR_0->cabac_state[64+VAR_3] ) == 0 )

        return 0;



    if( get_cabac( &VAR_0->cabac, &VAR_0->cabac_state[64+3] ) == 0 )

        return 1;

    if( get_cabac( &VAR_0->cabac, &VAR_0->cabac_state[64+3] ) == 0 )

        return 2;

    else

        return 3;

}

static int FUNC_0( H264Context *VAR_0) { const int VAR_1 = VAR_0->left_mb_xy[0]; const int VAR_2 = VAR_0->top_mb_xy; int VAR_3 = 0; if( VAR_0->slice_table[VAR_1] == VAR_0->slice_num && VAR_0->chroma_pred_mode_table[VAR_1] != 0 )
VAR_3++; if( VAR_0->slice_table[VAR_2] == VAR_0->slice_num && VAR_0->chroma_pred_mode_table[VAR_2] != 0 )
VAR_3++; if( get_cabac( &VAR_0->cabac, &VAR_0->cabac_state[64+VAR_3] ) == 0 )
return 0; if( get_cabac( &VAR_0->cabac, &VAR_0->cabac_state[64+3] ) == 0 )
return 1; if( get_cabac( &VAR_0->cabac, &VAR_0->cabac_state[64+3] ) == 0 )
return 2; else
return 3; }