static void decode(GetByteContext *gb, RangeCoder *rc, unsigned cumFreq, unsigned freq, unsigned total_freq)

{

    rc->code -= cumFreq * rc->range;

    rc->range *= freq;



    while (rc->range < TOP && bytestream2_get_bytes_left(gb) > 0) {

        unsigned byte = bytestream2_get_byte(gb);

        rc->code = (rc->code << 8) | byte;

        rc->range <<= 8;

    }

}

static void decode(GetByteContext *gb, RangeCoder *rc, unsigned cumFreq, unsigned freq, unsigned total_freq)

{

    rc->code -= cumFreq * rc->range;

    rc->range *= freq;



    while (rc->range < TOP && bytestream2_get_bytes_left(gb) > 0) {

        unsigned byte = bytestream2_get_byte(gb);

        rc->code = (rc->code << 8) | byte;

        rc->range <<= 8;

    }

}

static void FUNC_0(GetByteContext *VAR_0, RangeCoder *VAR_1, unsigned VAR_2, unsigned VAR_3, unsigned VAR_4)

{

    VAR_1->code -= VAR_2 * VAR_1->range;

    VAR_1->range *= VAR_3;



    while (VAR_1->range < TOP && bytestream2_get_bytes_left(VAR_0) > 0) {

        unsigned VAR_5 = bytestream2_get_byte(VAR_0);

        VAR_1->code = (VAR_1->code << 8) | VAR_5;

        VAR_1->range <<= 8;

    }

}

static void FUNC_0(GetByteContext *VAR_0, RangeCoder *VAR_1, unsigned VAR_2, unsigned VAR_3, unsigned VAR_4)
{ VAR_1->code -= VAR_2 * VAR_1->range; VAR_1->range *= VAR_3; while (VAR_1->range < TOP && bytestream2_get_bytes_left(VAR_0) > 0) { unsigned VAR_5 = bytestream2_get_byte(VAR_0); VAR_1->code = (VAR_1->code << 8) | VAR_5; VAR_1->range <<= 8; } }