val |= bit_buf >> (32 + bit_cnt); bit_buf <<= - bit_cnt; bit_cnt += 32;
unsigned int get_bits_long(GetBitContext *s, int n){    unsigned int val;    int bit_cnt;    unsigned int bit_buf;#ifdef STATS    st_bit_counts[st_current_index] += n;#endif    bit_buf = s->bit_buf;    bit_cnt = s->bit_cnt - n;    //    if (bit_cnt >= 0) {//        val = bit_buf >> (32 - n);//        bit_buf <<= n; //    } else     {	UINT8 *buf_ptr;        val = bit_buf >> (32 - n);        buf_ptr = s->buf_ptr;        buf_ptr += 4;        /* handle common case: we can read everything */        if (buf_ptr <= s->buf_end) {#if ARCH_X86	    bit_buf = bswap_32(*((unsigned long*)(&buf_ptr[-4])));#else	    bit_buf = (buf_ptr[-4] << 24) |		(buf_ptr[-3] << 16) |                (buf_ptr[-2] << 8) |                (buf_ptr[-1]);	    #endif        } else {            buf_ptr -= 4;            bit_buf = 0;            if (buf_ptr < s->buf_end)                bit_buf |= *buf_ptr++ << 24;            if (buf_ptr < s->buf_end)                bit_buf |= *buf_ptr++ << 16;            if (buf_ptr < s->buf_end)                bit_buf |= *buf_ptr++ << 8;            if (buf_ptr < s->buf_end)                bit_buf |= *buf_ptr++;        }        s->buf_ptr = buf_ptr;        val |= bit_buf >> (32 + bit_cnt);        bit_buf <<= - bit_cnt;        bit_cnt += 32;    }    s->bit_buf = bit_buf;    s->bit_cnt = bit_cnt;    return val;}