static unsigned decode_skip_count(GetBitContext* gb)

{

    unsigned value;

    // This function reads a maximum of 23 bits,

    // which is within the padding space

    if (!can_safely_read(gb, 1))

        return -1;

    value = get_bits1(gb);

    if (!value)

        return value;



    value += get_bits(gb, 3);

    if (value != (1 + ((1 << 3) - 1)))

        return value;



    value += get_bits(gb, 7);

    if (value != (1 + ((1 << 3) - 1)) + ((1 << 7) - 1))

        return value;



    return value + get_bits(gb, 12);

}

static unsigned decode_skip_count(GetBitContext* gb)

{

    unsigned value;

    

    

    if (!can_safely_read(gb, 1))

        return -1;

    value = get_bits1(gb);

    if (!value)

        return value;



    value += get_bits(gb, 3);

    if (value != (1 + ((1 << 3) - 1)))

        return value;



    value += get_bits(gb, 7);

    if (value != (1 + ((1 << 3) - 1)) + ((1 << 7) - 1))

        return value;



    return value + get_bits(gb, 12);

}

static unsigned FUNC_0(GetBitContext* VAR_0)

{

    unsigned VAR_1;

    

    

    if (!can_safely_read(VAR_0, 1))

        return -1;

    VAR_1 = get_bits1(VAR_0);

    if (!VAR_1)

        return VAR_1;



    VAR_1 += get_bits(VAR_0, 3);

    if (VAR_1 != (1 + ((1 << 3) - 1)))

        return VAR_1;



    VAR_1 += get_bits(VAR_0, 7);

    if (VAR_1 != (1 + ((1 << 3) - 1)) + ((1 << 7) - 1))

        return VAR_1;



    return VAR_1 + get_bits(VAR_0, 12);

}

static unsigned FUNC_0(GetBitContext* VAR_0)
{ unsigned VAR_1; if (!can_safely_read(VAR_0, 1))
return -1; VAR_1 = get_bits1(VAR_0); if (!VAR_1)
return VAR_1; VAR_1 += get_bits(VAR_0, 3); if (VAR_1 != (1 + ((1 << 3) - 1)))
return VAR_1; VAR_1 += get_bits(VAR_0, 7); if (VAR_1 != (1 + ((1 << 3) - 1)) + ((1 << 7) - 1))
return VAR_1; return VAR_1 + get_bits(VAR_0, 12); }