int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,

                                const int16_t *in, int buffer_length,

                                int filter_length, int stop_on_overflow,

                                int shift, int rounder)

{

    int i,n;



    for (n = 0; n < buffer_length; n++) {

        int sum = rounder;

        for (i = 1; i <= filter_length; i++)

            sum -= filter_coeffs[i-1] * out[n-i];



        sum = ((sum >> 12) + in[n]) >> shift;



        if (sum + 0x8000 > 0xFFFFU) {

            if (stop_on_overflow)

                return 1;

            sum = (sum >> 31) ^ 32767;

        }

        out[n] = sum;

    }



    return 0;

}

int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs,

                                const int16_t *in, int buffer_length,

                                int filter_length, int stop_on_overflow,

                                int shift, int rounder)

{

    int i,n;



    for (n = 0; n < buffer_length; n++) {

        int sum = rounder;

        for (i = 1; i <= filter_length; i++)

            sum -= filter_coeffs[i-1] * out[n-i];



        sum = ((sum >> 12) + in[n]) >> shift;



        if (sum + 0x8000 > 0xFFFFU) {

            if (stop_on_overflow)

                return 1;

            sum = (sum >> 31) ^ 32767;

        }

        out[n] = sum;

    }



    return 0;

}

int FUNC_0(int16_t *VAR_0, const int16_t *VAR_1,

                                const int16_t *VAR_2, int VAR_3,

                                int VAR_4, int VAR_5,

                                int VAR_6, int VAR_7)

{

    int VAR_8,VAR_9;



    for (VAR_9 = 0; VAR_9 < VAR_3; VAR_9++) {

        int VAR_10 = VAR_7;

        for (VAR_8 = 1; VAR_8 <= VAR_4; VAR_8++)

            VAR_10 -= VAR_1[VAR_8-1] * VAR_0[VAR_9-VAR_8];



        VAR_10 = ((VAR_10 >> 12) + VAR_2[VAR_9]) >> VAR_6;



        if (VAR_10 + 0x8000 > 0xFFFFU) {

            if (VAR_5)

                return 1;

            VAR_10 = (VAR_10 >> 31) ^ 32767;

        }

        VAR_0[VAR_9] = VAR_10;

    }



    return 0;

}

int FUNC_0(int16_t *VAR_0, const int16_t *VAR_1,
const int16_t *VAR_2, int VAR_3,
int VAR_4, int VAR_5,
int VAR_6, int VAR_7)
{ int VAR_8,VAR_9; for (VAR_9 = 0; VAR_9 < VAR_3; VAR_9++) { int VAR_10 = VAR_7; for (VAR_8 = 1; VAR_8 <= VAR_4; VAR_8++) VAR_10 -= VAR_1[VAR_8-1] * VAR_0[VAR_9-VAR_8]; VAR_10 = ((VAR_10 >> 12) + VAR_2[VAR_9]) >> VAR_6; if (VAR_10 + 0x8000 > 0xFFFFU) { if (VAR_5)
return 1; VAR_10 = (VAR_10 >> 31) ^ 32767; } VAR_0[VAR_9] = VAR_10; } return 0; }