static inline void skip_remaining(BitstreamContext *bc, unsigned n)
{
#ifdef BITSTREAM_READER_LE
    bc->bits >>= n;
#else
    bc->bits <<= n;
#endif
    bc->bits_left -= n;
}
['static int decode_blocks_ind(ALSDecContext *ctx, unsigned int ra_frame,\n                             unsigned int c, const unsigned int *div_blocks,\n                             unsigned int *js_blocks)\n{\n    int ret;\n    unsigned int b;\n    ALSBlockData bd = { 0 };\n    bd.ra_block         = ra_frame;\n    bd.const_block      = ctx->const_block;\n    bd.shift_lsbs       = ctx->shift_lsbs;\n    bd.opt_order        = ctx->opt_order;\n    bd.store_prev_samples = ctx->store_prev_samples;\n    bd.use_ltp          = ctx->use_ltp;\n    bd.ltp_lag          = ctx->ltp_lag;\n    bd.ltp_gain         = ctx->ltp_gain[0];\n    bd.quant_cof        = ctx->quant_cof[0];\n    bd.lpc_cof          = ctx->lpc_cof[0];\n    bd.prev_raw_samples = ctx->prev_raw_samples;\n    bd.raw_samples      = ctx->raw_samples[c];\n    for (b = 0; b < ctx->num_blocks; b++) {\n        bd.block_length     = div_blocks[b];\n        if ((ret = read_decode_block(ctx, &bd)) < 0) {\n            zero_remaining(b, ctx->num_blocks, div_blocks, bd.raw_samples);\n            return ret;\n        }\n        bd.raw_samples += div_blocks[b];\n        bd.ra_block     = 0;\n    }\n    return 0;\n}', 'static int read_decode_block(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    int ret;\n    if ((ret = read_block(ctx, bd)) < 0)\n        return ret;\n    return decode_block(ctx, bd);\n}', 'static int read_block(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    int ret = 0;\n    BitstreamContext *bc = &ctx->bc;\n    *bd->shift_lsbs = 0;\n    if (bitstream_read_bit(bc)) {\n        ret = read_var_block_data(ctx, bd);\n    } else {\n        read_const_block_data(ctx, bd);\n    }\n    return ret;\n}', 'static inline unsigned bitstream_read_bit(BitstreamContext *bc)\n{\n    if (!bc->bits_left)\n        refill_64(bc);\n    return get_val(bc, 1);\n}', 'static inline uint64_t get_val(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    uint64_t ret = bc->bits & ((UINT64_C(1) << n) - 1);\n    bc->bits >>= n;\n#else\n    uint64_t ret = bc->bits >> (64 - n);\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n    return ret;\n}', 'static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)\n{\n    ALSSpecificConfig *sconf = &ctx->sconf;\n    AVCodecContext *avctx    = ctx->avctx;\n    BitstreamContext *bc     = &ctx->bc;\n    *bd->raw_samples = 0;\n    *bd->const_block = bitstream_read_bit(bc);\n    bd->js_blocks    = bitstream_read_bit(bc);\n    bitstream_skip(bc, 5);\n    if (*bd->const_block) {\n        unsigned int const_val_bits = sconf->floating ? 24 : avctx->bits_per_raw_sample;\n        *bd->raw_samples = bitstream_read_signed(bc, const_val_bits);\n    }\n    *bd->const_block = 1;\n}', 'static inline void bitstream_skip(BitstreamContext *bc, unsigned n)\n{\n    if (n <= bc->bits_left)\n        skip_remaining(bc, n);\n    else {\n        n -= bc->bits_left;\n        skip_remaining(bc, bc->bits_left);\n        if (n >= 64) {\n            unsigned skip = n / 8;\n            n -= skip * 8;\n            bc->ptr += skip;\n        }\n        refill_64(bc);\n        if (n)\n            skip_remaining(bc, n);\n    }\n}', 'static inline void skip_remaining(BitstreamContext *bc, unsigned n)\n{\n#ifdef BITSTREAM_READER_LE\n    bc->bits >>= n;\n#else\n    bc->bits <<= n;\n#endif\n    bc->bits_left -= n;\n}']