void init_get_bits(GetBitContext *s,

                   UINT8 *buffer, int buffer_size)

{

    s->buffer= buffer;

    s->size= buffer_size;

    s->buffer_end= buffer + buffer_size;

#ifdef ALT_BITSTREAM_READER

    s->index=0;

#elif defined LIBMPEG2_BITSTREAM_READER

    s->buffer_ptr = buffer;

    s->bit_count = 16;

    s->cache = 0;

#elif defined A32_BITSTREAM_READER

    s->buffer_ptr = (uint32_t*)buffer;

    s->bit_count = 32;

    s->cache0 = 0;

    s->cache1 = 0;

#endif

    {

        OPEN_READER(re, s)

        UPDATE_CACHE(re, s)

//        UPDATE_CACHE(re, s)

        CLOSE_READER(re, s)

    }

#ifdef A32_BITSTREAM_READER

    s->cache1 = 0;

#endif

}

void init_get_bits(GetBitContext *s,

                   UINT8 *buffer, int buffer_size)

{

    s->buffer= buffer;

    s->size= buffer_size;

    s->buffer_end= buffer + buffer_size;

#ifdef ALT_BITSTREAM_READER

    s->index=0;

#elif defined LIBMPEG2_BITSTREAM_READER

    s->buffer_ptr = buffer;

    s->bit_count = 16;

    s->cache = 0;

#elif defined A32_BITSTREAM_READER

    s->buffer_ptr = (uint32_t*)buffer;

    s->bit_count = 32;

    s->cache0 = 0;

    s->cache1 = 0;

#endif

    {

        OPEN_READER(re, s)

        UPDATE_CACHE(re, s)



        CLOSE_READER(re, s)

    }

#ifdef A32_BITSTREAM_READER

    s->cache1 = 0;

#endif

}

void FUNC_0(GetBitContext *VAR_0,

                   UINT8 *VAR_1, int VAR_2)

{

    VAR_0->VAR_1= VAR_1;

    VAR_0->size= VAR_2;

    VAR_0->buffer_end= VAR_1 + VAR_2;

#ifdef ALT_BITSTREAM_READER

    VAR_0->index=0;

#elif defined LIBMPEG2_BITSTREAM_READER

    VAR_0->buffer_ptr = VAR_1;

    VAR_0->bit_count = 16;

    VAR_0->cache = 0;

#elif defined A32_BITSTREAM_READER

    VAR_0->buffer_ptr = (uint32_t*)VAR_1;

    VAR_0->bit_count = 32;

    VAR_0->cache0 = 0;

    VAR_0->cache1 = 0;

#endif

    {

        OPEN_READER(re, VAR_0)

        UPDATE_CACHE(re, VAR_0)



        CLOSE_READER(re, VAR_0)

    }

#ifdef A32_BITSTREAM_READER

    VAR_0->cache1 = 0;

#endif

}

void FUNC_0(GetBitContext *VAR_0,
UINT8 *VAR_1, int VAR_2)
{ VAR_0->VAR_1= VAR_1; VAR_0->size= VAR_2; VAR_0->buffer_end= VAR_1 + VAR_2; #ifdef ALT_BITSTREAM_READER
VAR_0->index=0; #elif defined LIBMPEG2_BITSTREAM_READER
VAR_0->buffer_ptr = VAR_1; VAR_0->bit_count = 16; VAR_0->cache = 0; #elif defined A32_BITSTREAM_READER
VAR_0->buffer_ptr = (uint32_t*)VAR_1; VAR_0->bit_count = 32; VAR_0->cache0 = 0; VAR_0->cache1 = 0; #endif
{ OPEN_READER(re, VAR_0)
UPDATE_CACHE(re, VAR_0)
CLOSE_READER(re, VAR_0)
} #ifdef A32_BITSTREAM_READER
VAR_0->cache1 = 0; #endif
}