static int decode_blocks_ind(ALSDecContext *ctx, unsigned int ra_frame,

                             unsigned int c, const unsigned int *div_blocks,

                             unsigned int *js_blocks)

{

    unsigned int b;

    ALSBlockData bd = { 0 };



    bd.ra_block         = ra_frame;

    bd.const_block      = ctx->const_block;

    bd.shift_lsbs       = ctx->shift_lsbs;

    bd.opt_order        = ctx->opt_order;

    bd.store_prev_samples = ctx->store_prev_samples;

    bd.use_ltp          = ctx->use_ltp;

    bd.ltp_lag          = ctx->ltp_lag;

    bd.ltp_gain         = ctx->ltp_gain[0];

    bd.quant_cof        = ctx->quant_cof[0];

    bd.lpc_cof          = ctx->lpc_cof[0];

    bd.prev_raw_samples = ctx->prev_raw_samples;

    bd.raw_samples      = ctx->raw_samples[c];





    for (b = 0; b < ctx->num_blocks; b++) {

        bd.block_length     = div_blocks[b];



        if (read_decode_block(ctx, &bd)) {

            // damaged block, write zero for the rest of the frame

            zero_remaining(b, ctx->num_blocks, div_blocks, bd.raw_samples);

            return -1;

        }

        bd.raw_samples += div_blocks[b];

        bd.ra_block     = 0;

    }



    return 0;

}

static int decode_blocks_ind(ALSDecContext *ctx, unsigned int ra_frame,

                             unsigned int c, const unsigned int *div_blocks,

                             unsigned int *js_blocks)

{

    unsigned int b;

    ALSBlockData bd = { 0 };



    bd.ra_block         = ra_frame;

    bd.const_block      = ctx->const_block;

    bd.shift_lsbs       = ctx->shift_lsbs;

    bd.opt_order        = ctx->opt_order;

    bd.store_prev_samples = ctx->store_prev_samples;

    bd.use_ltp          = ctx->use_ltp;

    bd.ltp_lag          = ctx->ltp_lag;

    bd.ltp_gain         = ctx->ltp_gain[0];

    bd.quant_cof        = ctx->quant_cof[0];

    bd.lpc_cof          = ctx->lpc_cof[0];

    bd.prev_raw_samples = ctx->prev_raw_samples;

    bd.raw_samples      = ctx->raw_samples[c];





    for (b = 0; b < ctx->num_blocks; b++) {

        bd.block_length     = div_blocks[b];



        if (read_decode_block(ctx, &bd)) {

            

            zero_remaining(b, ctx->num_blocks, div_blocks, bd.raw_samples);

            return -1;

        }

        bd.raw_samples += div_blocks[b];

        bd.ra_block     = 0;

    }



    return 0;

}

            return -1;             return -1;             return -1;     return 0;         if (read_decode_block(ctx, &bd)) {             return -1;             return -1;             return -1;
static int FUNC_0(ALSDecContext *VAR_0, unsigned int VAR_1,

                             unsigned int VAR_2, const unsigned int *VAR_3,

                             unsigned int *VAR_4)

{

    unsigned int VAR_5;

    ALSBlockData bd = { 0 };



    bd.ra_block         = VAR_1;

    bd.const_block      = VAR_0->const_block;

    bd.shift_lsbs       = VAR_0->shift_lsbs;

    bd.opt_order        = VAR_0->opt_order;

    bd.store_prev_samples = VAR_0->store_prev_samples;

    bd.use_ltp          = VAR_0->use_ltp;

    bd.ltp_lag          = VAR_0->ltp_lag;

    bd.ltp_gain         = VAR_0->ltp_gain[0];

    bd.quant_cof        = VAR_0->quant_cof[0];

    bd.lpc_cof          = VAR_0->lpc_cof[0];

    bd.prev_raw_samples = VAR_0->prev_raw_samples;

    bd.raw_samples      = VAR_0->raw_samples[VAR_2];





    for (VAR_5 = 0; VAR_5 < VAR_0->num_blocks; VAR_5++) {

        bd.block_length     = VAR_3[VAR_5];



        if (read_decode_block(VAR_0, &bd)) {

            

            zero_remaining(VAR_5, VAR_0->num_blocks, VAR_3, bd.raw_samples);

            return -1;

        }

        bd.raw_samples += VAR_3[VAR_5];

        bd.ra_block     = 0;

    }



    return 0;

}

static int FUNC_0(ALSDecContext *VAR_0, unsigned int VAR_1,
unsigned int VAR_2, const unsigned int *VAR_3,
unsigned int *VAR_4)
{ unsigned int VAR_5; ALSBlockData bd = { 0 }; bd.ra_block         = VAR_1; bd.const_block      = VAR_0->const_block; bd.shift_lsbs       = VAR_0->shift_lsbs; bd.opt_order        = VAR_0->opt_order; bd.store_prev_samples = VAR_0->store_prev_samples; bd.use_ltp          = VAR_0->use_ltp; bd.ltp_lag          = VAR_0->ltp_lag; bd.ltp_gain         = VAR_0->ltp_gain[0]; bd.quant_cof        = VAR_0->quant_cof[0]; bd.lpc_cof          = VAR_0->lpc_cof[0]; bd.prev_raw_samples = VAR_0->prev_raw_samples; bd.raw_samples      = VAR_0->raw_samples[VAR_2]; for (VAR_5 = 0; VAR_5 < VAR_0->num_blocks; VAR_5++) { bd.block_length     = VAR_3[VAR_5]; if (read_decode_block(VAR_0, &bd)) { zero_remaining(VAR_5, VAR_0->num_blocks, VAR_3, bd.raw_samples); return -1; } bd.raw_samples += VAR_3[VAR_5]; bd.ra_block     = 0; } return 0; }