static void chomp6(ChannelData *ctx, int16_t *output, uint8_t val,

                   const uint16_t tab1[],

                   const int16_t *tab2, int tab2_stride,

                   uint32_t numChannels)

{

    int16_t current;



    current = tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride + val];



    if ((ctx->previous ^ current) >= 0) {

        ctx->factor = FFMIN(ctx->factor + 506, 32767);

    } else {

        if (ctx->factor - 314 < -32768)

            ctx->factor = -32767;

        else

            ctx->factor -= 314;

    }



    current = mace_broken_clip_int16(current + ctx->level);



    ctx->level = ((current*ctx->factor) >> 15);

    current >>= 1;



    output[0] = QT_8S_2_16S(ctx->previous + ctx->prev2 -

                            ((ctx->prev2-current) >> 2));

    output[numChannels] = QT_8S_2_16S(ctx->previous + current +

                                      ((ctx->prev2-current) >> 2));

    ctx->prev2 = ctx->previous;

    ctx->previous = current;



    if ((ctx->index += tab1[val] - (ctx->index >> 5)) < 0)

        ctx->index = 0;

}

static void chomp6(ChannelData *ctx, int16_t *output, uint8_t val,

                   const uint16_t tab1[],

                   const int16_t *tab2, int tab2_stride,

                   uint32_t numChannels)

{

    int16_t current;



    current = tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride + val];



    if ((ctx->previous ^ current) >= 0) {

        ctx->factor = FFMIN(ctx->factor + 506, 32767);

    } else {

        if (ctx->factor - 314 < -32768)

            ctx->factor = -32767;

        else

            ctx->factor -= 314;

    }



    current = mace_broken_clip_int16(current + ctx->level);



    ctx->level = ((current*ctx->factor) >> 15);

    current >>= 1;



    output[0] = QT_8S_2_16S(ctx->previous + ctx->prev2 -

                            ((ctx->prev2-current) >> 2));

    output[numChannels] = QT_8S_2_16S(ctx->previous + current +

                                      ((ctx->prev2-current) >> 2));

    ctx->prev2 = ctx->previous;

    ctx->previous = current;



    if ((ctx->index += tab1[val] - (ctx->index >> 5)) < 0)

        ctx->index = 0;

}

    current = tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride + val];     current = tab2[((ctx->index & 0x7f0) >> 4)*tab2_stride + val];
static void FUNC_0(ChannelData *VAR_0, int16_t *VAR_1, uint8_t VAR_2,

                   const uint16_t VAR_3[],

                   const int16_t *VAR_4, int VAR_5,

                   uint32_t VAR_6)

{

    int16_t current;



    current = VAR_4[((VAR_0->index & 0x7f0) >> 4)*VAR_5 + VAR_2];



    if ((VAR_0->previous ^ current) >= 0) {

        VAR_0->factor = FFMIN(VAR_0->factor + 506, 32767);

    } else {

        if (VAR_0->factor - 314 < -32768)

            VAR_0->factor = -32767;

        else

            VAR_0->factor -= 314;

    }



    current = mace_broken_clip_int16(current + VAR_0->level);



    VAR_0->level = ((current*VAR_0->factor) >> 15);

    current >>= 1;



    VAR_1[0] = QT_8S_2_16S(VAR_0->previous + VAR_0->prev2 -

                            ((VAR_0->prev2-current) >> 2));

    VAR_1[VAR_6] = QT_8S_2_16S(VAR_0->previous + current +

                                      ((VAR_0->prev2-current) >> 2));

    VAR_0->prev2 = VAR_0->previous;

    VAR_0->previous = current;



    if ((VAR_0->index += VAR_3[VAR_2] - (VAR_0->index >> 5)) < 0)

        VAR_0->index = 0;

}

static void FUNC_0(ChannelData *VAR_0, int16_t *VAR_1, uint8_t VAR_2,
const uint16_t VAR_3[],
const int16_t *VAR_4, int VAR_5,
uint32_t VAR_6)
{ int16_t current; current = VAR_4[((VAR_0->index & 0x7f0) >> 4)*VAR_5 + VAR_2]; if ((VAR_0->previous ^ current) >= 0) { VAR_0->factor = FFMIN(VAR_0->factor + 506, 32767); } else { if (VAR_0->factor - 314 < -32768)
VAR_0->factor = -32767; else
VAR_0->factor -= 314; } current = mace_broken_clip_int16(current + VAR_0->level); VAR_0->level = ((current*VAR_0->factor) >> 15); current >>= 1; VAR_1[0] = QT_8S_2_16S(VAR_0->previous + VAR_0->prev2 -
((VAR_0->prev2-current) >> 2)); VAR_1[VAR_6] = QT_8S_2_16S(VAR_0->previous + current +
((VAR_0->prev2-current) >> 2)); VAR_0->prev2 = VAR_0->previous; VAR_0->previous = current; if ((VAR_0->index += VAR_3[VAR_2] - (VAR_0->index >> 5)) < 0)
VAR_0->index = 0; }