static int adaptive_cb_search(const int16_t *adapt_cb, float *work,

                              const float *coefs, float *data)

{

    int i, best_vect;

    float score, gain, best_score, best_gain;

    float exc[BLOCKSIZE];



    gain = best_score = 0;

    for (i = BLOCKSIZE / 2; i <= BUFFERSIZE; i++) {

        create_adapt_vect(exc, adapt_cb, i);

        get_match_score(work, coefs, exc, NULL, NULL, data, &score, &gain);

        if (score > best_score) {

            best_score = score;

            best_vect = i;

            best_gain = gain;

        }

    }

    if (!best_score)

        return 0;



    /**

     * Re-calculate the filtered vector from the vector with maximum match score

     * and remove its contribution from input data.

     */

    create_adapt_vect(exc, adapt_cb, best_vect);

    ff_celp_lp_synthesis_filterf(work, coefs, exc, BLOCKSIZE, LPC_ORDER);

    for (i = 0; i < BLOCKSIZE; i++)

        data[i] -= best_gain * work[i];

    return best_vect - BLOCKSIZE / 2 + 1;

}

static int adaptive_cb_search(const int16_t *adapt_cb, float *work,

                              const float *coefs, float *data)

{

    int i, best_vect;

    float score, gain, best_score, best_gain;

    float exc[BLOCKSIZE];



    gain = best_score = 0;

    for (i = BLOCKSIZE / 2; i <= BUFFERSIZE; i++) {

        create_adapt_vect(exc, adapt_cb, i);

        get_match_score(work, coefs, exc, NULL, NULL, data, &score, &gain);

        if (score > best_score) {

            best_score = score;

            best_vect = i;

            best_gain = gain;

        }

    }

    if (!best_score)

        return 0;



    







    create_adapt_vect(exc, adapt_cb, best_vect);

    ff_celp_lp_synthesis_filterf(work, coefs, exc, BLOCKSIZE, LPC_ORDER);

    for (i = 0; i < BLOCKSIZE; i++)

        data[i] -= best_gain * work[i];

    return best_vect - BLOCKSIZE / 2 + 1;

}

    int i, best_vect;     float score, gain, best_score, best_gain;
static int FUNC_0(const int16_t *VAR_0, float *VAR_1,

                              const float *VAR_2, float *VAR_3)

{

    int VAR_4, VAR_5;

    float VAR_6, VAR_7, VAR_8, VAR_9;

    float VAR_10[BLOCKSIZE];



    VAR_7 = VAR_8 = 0;

    for (VAR_4 = BLOCKSIZE / 2; VAR_4 <= BUFFERSIZE; VAR_4++) {

        create_adapt_vect(VAR_10, VAR_0, VAR_4);

        get_match_score(VAR_1, VAR_2, VAR_10, NULL, NULL, VAR_3, &VAR_6, &VAR_7);

        if (VAR_6 > VAR_8) {

            VAR_8 = VAR_6;

            VAR_5 = VAR_4;

            VAR_9 = VAR_7;

        }

    }

    if (!VAR_8)

        return 0;



    







    create_adapt_vect(VAR_10, VAR_0, VAR_5);

    ff_celp_lp_synthesis_filterf(VAR_1, VAR_2, VAR_10, BLOCKSIZE, LPC_ORDER);

    for (VAR_4 = 0; VAR_4 < BLOCKSIZE; VAR_4++)

        VAR_3[VAR_4] -= VAR_9 * VAR_1[VAR_4];

    return VAR_5 - BLOCKSIZE / 2 + 1;

}

static int FUNC_0(const int16_t *VAR_0, float *VAR_1,
const float *VAR_2, float *VAR_3)
{ int VAR_4, VAR_5; float VAR_6, VAR_7, VAR_8, VAR_9; float VAR_10[BLOCKSIZE]; VAR_7 = VAR_8 = 0; for (VAR_4 = BLOCKSIZE / 2; VAR_4 <= BUFFERSIZE; VAR_4++) { create_adapt_vect(VAR_10, VAR_0, VAR_4); get_match_score(VAR_1, VAR_2, VAR_10, NULL, NULL, VAR_3, &VAR_6, &VAR_7); if (VAR_6 > VAR_8) { VAR_8 = VAR_6; VAR_5 = VAR_4; VAR_9 = VAR_7; } } if (!VAR_8)
return 0; create_adapt_vect(VAR_10, VAR_0, VAR_5); ff_celp_lp_synthesis_filterf(VAR_1, VAR_2, VAR_10, BLOCKSIZE, LPC_ORDER); for (VAR_4 = 0; VAR_4 < BLOCKSIZE; VAR_4++) VAR_3[VAR_4] -= VAR_9 * VAR_1[VAR_4]; return VAR_5 - BLOCKSIZE / 2 + 1; }