static int decode_group3_1d_line(AVCodecContext *avctx, GetBitContext *gb,

                                 int pix_left, int *runs)

{

    int mode = 0, run = 0;

    unsigned int t;

    for(;;){

        t = get_vlc2(gb, ccitt_vlc[mode].table, 9, 2);

        run += t;

        if(t < 64){

            pix_left -= run;

            *runs++ = run;

            if(pix_left <= 0){

                if(!pix_left)

                    break;

                runs[-1] = 0;

                av_log(avctx, AV_LOG_ERROR, "Run went out of bounds\n");

                return -1;

            }

            run = 0;

            mode = !mode;

        }else if((int)t == -1){

            av_log(avctx, AV_LOG_ERROR, "Incorrect code\n");

            return -1;

        }

    }

    *runs++ = 0;

    return 0;

}

static int decode_group3_1d_line(AVCodecContext *avctx, GetBitContext *gb,

                                 int pix_left, int *runs)

{

    int mode = 0, run = 0;

    unsigned int t;

    for(;;){

        t = get_vlc2(gb, ccitt_vlc[mode].table, 9, 2);

        run += t;

        if(t < 64){

            pix_left -= run;

            *runs++ = run;

            if(pix_left <= 0){

                if(!pix_left)

                    break;

                runs[-1] = 0;

                av_log(avctx, AV_LOG_ERROR, "Run went out of bounds\n");

                return -1;

            }

            run = 0;

            mode = !mode;

        }else if((int)t == -1){

            av_log(avctx, AV_LOG_ERROR, "Incorrect code\n");

            return -1;

        }

    }

    *runs++ = 0;

    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1,

                                 int VAR_2, int *VAR_3)

{

    int VAR_4 = 0, VAR_5 = 0;

    unsigned int VAR_6;

    for(;;){

        VAR_6 = get_vlc2(VAR_1, ccitt_vlc[VAR_4].table, 9, 2);

        VAR_5 += VAR_6;

        if(VAR_6 < 64){

            VAR_2 -= VAR_5;

            *VAR_3++ = VAR_5;

            if(VAR_2 <= 0){

                if(!VAR_2)

                    break;

                VAR_3[-1] = 0;

                av_log(VAR_0, AV_LOG_ERROR, "Run went out of bounds\n");

                return -1;

            }

            VAR_5 = 0;

            VAR_4 = !VAR_4;

        }else if((int)VAR_6 == -1){

            av_log(VAR_0, AV_LOG_ERROR, "Incorrect code\n");

            return -1;

        }

    }

    *VAR_3++ = 0;

    return 0;

}

static int FUNC_0(AVCodecContext *VAR_0, GetBitContext *VAR_1,
int VAR_2, int *VAR_3)
{ int VAR_4 = 0, VAR_5 = 0; unsigned int VAR_6; for(;;){ VAR_6 = get_vlc2(VAR_1, ccitt_vlc[VAR_4].table, 9, 2); VAR_5 += VAR_6; if(VAR_6 < 64){ VAR_2 -= VAR_5; *VAR_3++ = VAR_5; if(VAR_2 <= 0){ if(!VAR_2)
break; VAR_3[-1] = 0; av_log(VAR_0, AV_LOG_ERROR, "Run went out of bounds\n"); return -1; } VAR_5 = 0; VAR_4 = !VAR_4; }else if((int)VAR_6 == -1){ av_log(VAR_0, AV_LOG_ERROR, "Incorrect code\n"); return -1; } } *VAR_3++ = 0; return 0; }