void ff_mdct_calcw_c(FFTContext *s, FFTDouble *out, const FFTSample *input)

{

    int i, j, n, n8, n4, n2, n3;

    FFTDouble re, im;

    const uint16_t *revtab = s->revtab;

    const FFTSample *tcos = s->tcos;

    const FFTSample *tsin = s->tsin;

    FFTComplex *x = s->tmp_buf;

    FFTDComplex *o = (FFTDComplex *)out;



    n = 1 << s->mdct_bits;

    n2 = n >> 1;

    n4 = n >> 2;

    n8 = n >> 3;

    n3 = 3 * n4;



    /* pre rotation */

    for(i=0;i<n8;i++) {

        re = RSCALE(-input[2*i+n3] - input[n3-1-2*i]);

        im = RSCALE(-input[n4+2*i] + input[n4-1-2*i]);

        j = revtab[i];

        CMUL(x[j].re, x[j].im, re, im, -tcos[i], tsin[i]);



        re = RSCALE( input[2*i]    - input[n2-1-2*i]);

        im = RSCALE(-input[n2+2*i] - input[ n-1-2*i]);

        j = revtab[n8 + i];

        CMUL(x[j].re, x[j].im, re, im, -tcos[n8 + i], tsin[n8 + i]);

    }



    s->fft_calc(s, x);



    /* post rotation */

    for(i=0;i<n8;i++) {

        FFTDouble r0, i0, r1, i1;

        CMULL(i1, r0, x[n8-i-1].re, x[n8-i-1].im, -tsin[n8-i-1], -tcos[n8-i-1]);

        CMULL(i0, r1, x[n8+i  ].re, x[n8+i  ].im, -tsin[n8+i  ], -tcos[n8+i  ]);

        o[n8-i-1].re = r0;

        o[n8-i-1].im = i0;

        o[n8+i  ].re = r1;

        o[n8+i  ].im = i1;

    }

}

void ff_mdct_calcw_c(FFTContext *s, FFTDouble *out, const FFTSample *input)

{

    int i, j, n, n8, n4, n2, n3;

    FFTDouble re, im;

    const uint16_t *revtab = s->revtab;

    const FFTSample *tcos = s->tcos;

    const FFTSample *tsin = s->tsin;

    FFTComplex *x = s->tmp_buf;

    FFTDComplex *o = (FFTDComplex *)out;



    n = 1 << s->mdct_bits;

    n2 = n >> 1;

    n4 = n >> 2;

    n8 = n >> 3;

    n3 = 3 * n4;



    

    for(i=0;i<n8;i++) {

        re = RSCALE(-input[2*i+n3] - input[n3-1-2*i]);

        im = RSCALE(-input[n4+2*i] + input[n4-1-2*i]);

        j = revtab[i];

        CMUL(x[j].re, x[j].im, re, im, -tcos[i], tsin[i]);



        re = RSCALE( input[2*i]    - input[n2-1-2*i]);

        im = RSCALE(-input[n2+2*i] - input[ n-1-2*i]);

        j = revtab[n8 + i];

        CMUL(x[j].re, x[j].im, re, im, -tcos[n8 + i], tsin[n8 + i]);

    }



    s->fft_calc(s, x);



    

    for(i=0;i<n8;i++) {

        FFTDouble r0, i0, r1, i1;

        CMULL(i1, r0, x[n8-i-1].re, x[n8-i-1].im, -tsin[n8-i-1], -tcos[n8-i-1]);

        CMULL(i0, r1, x[n8+i  ].re, x[n8+i  ].im, -tsin[n8+i  ], -tcos[n8+i  ]);

        o[n8-i-1].re = r0;

        o[n8-i-1].im = i0;

        o[n8+i  ].re = r1;

        o[n8+i  ].im = i1;

    }

}

        re = RSCALE(-input[2*i+n3] - input[n3-1-2*i]);         im = RSCALE(-input[n4+2*i] + input[n4-1-2*i]);         re = RSCALE( input[2*i]    - input[n2-1-2*i]);         im = RSCALE(-input[n2+2*i] - input[ n-1-2*i]);         re = RSCALE(-input[2*i+n3] - input[n3-1-2*i]);         im = RSCALE(-input[n4+2*i] + input[n4-1-2*i]);         re = RSCALE( input[2*i]    - input[n2-1-2*i]);         im = RSCALE(-input[n2+2*i] - input[ n-1-2*i]);
void FUNC_0(FFTContext *VAR_0, FFTDouble *VAR_1, const FFTSample *VAR_2)

{

    int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9;

    FFTDouble re, im;

    const uint16_t *VAR_10 = VAR_0->VAR_10;

    const FFTSample *VAR_11 = VAR_0->VAR_11;

    const FFTSample *VAR_12 = VAR_0->VAR_12;

    FFTComplex *x = VAR_0->tmp_buf;

    FFTDComplex *o = (FFTDComplex *)VAR_1;



    VAR_5 = 1 << VAR_0->mdct_bits;

    VAR_8 = VAR_5 >> 1;

    VAR_7 = VAR_5 >> 2;

    VAR_6 = VAR_5 >> 3;

    VAR_9 = 3 * VAR_7;



    

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

        re = RSCALE(-VAR_2[2*VAR_3+VAR_9] - VAR_2[VAR_9-1-2*VAR_3]);

        im = RSCALE(-VAR_2[VAR_7+2*VAR_3] + VAR_2[VAR_7-1-2*VAR_3]);

        VAR_4 = VAR_10[VAR_3];

        CMUL(x[VAR_4].re, x[VAR_4].im, re, im, -VAR_11[VAR_3], VAR_12[VAR_3]);



        re = RSCALE( VAR_2[2*VAR_3]    - VAR_2[VAR_8-1-2*VAR_3]);

        im = RSCALE(-VAR_2[VAR_8+2*VAR_3] - VAR_2[ VAR_5-1-2*VAR_3]);

        VAR_4 = VAR_10[VAR_6 + VAR_3];

        CMUL(x[VAR_4].re, x[VAR_4].im, re, im, -VAR_11[VAR_6 + VAR_3], VAR_12[VAR_6 + VAR_3]);

    }



    VAR_0->fft_calc(VAR_0, x);



    

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

        FFTDouble r0, i0, r1, i1;

        CMULL(i1, r0, x[VAR_6-VAR_3-1].re, x[VAR_6-VAR_3-1].im, -VAR_12[VAR_6-VAR_3-1], -VAR_11[VAR_6-VAR_3-1]);

        CMULL(i0, r1, x[VAR_6+VAR_3  ].re, x[VAR_6+VAR_3  ].im, -VAR_12[VAR_6+VAR_3  ], -VAR_11[VAR_6+VAR_3  ]);

        o[VAR_6-VAR_3-1].re = r0;

        o[VAR_6-VAR_3-1].im = i0;

        o[VAR_6+VAR_3  ].re = r1;

        o[VAR_6+VAR_3  ].im = i1;

    }

}

void FUNC_0(FFTContext *VAR_0, FFTDouble *VAR_1, const FFTSample *VAR_2)
{ int VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8, VAR_9; FFTDouble re, im; const uint16_t *VAR_10 = VAR_0->VAR_10; const FFTSample *VAR_11 = VAR_0->VAR_11; const FFTSample *VAR_12 = VAR_0->VAR_12; FFTComplex *x = VAR_0->tmp_buf; FFTDComplex *o = (FFTDComplex *)VAR_1; VAR_5 = 1 << VAR_0->mdct_bits; VAR_8 = VAR_5 >> 1; VAR_7 = VAR_5 >> 2; VAR_6 = VAR_5 >> 3; VAR_9 = 3 * VAR_7; for(VAR_3=0;VAR_3<VAR_6;VAR_3++) { re = RSCALE(-VAR_2[2*VAR_3+VAR_9] - VAR_2[VAR_9-1-2*VAR_3]); im = RSCALE(-VAR_2[VAR_7+2*VAR_3] + VAR_2[VAR_7-1-2*VAR_3]); VAR_4 = VAR_10[VAR_3]; CMUL(x[VAR_4].re, x[VAR_4].im, re, im, -VAR_11[VAR_3], VAR_12[VAR_3]); re = RSCALE( VAR_2[2*VAR_3]    - VAR_2[VAR_8-1-2*VAR_3]); im = RSCALE(-VAR_2[VAR_8+2*VAR_3] - VAR_2[ VAR_5-1-2*VAR_3]); VAR_4 = VAR_10[VAR_6 + VAR_3]; CMUL(x[VAR_4].re, x[VAR_4].im, re, im, -VAR_11[VAR_6 + VAR_3], VAR_12[VAR_6 + VAR_3]); } VAR_0->fft_calc(VAR_0, x); for(VAR_3=0;VAR_3<VAR_6;VAR_3++) { FFTDouble r0, i0, r1, i1; CMULL(i1, r0, x[VAR_6-VAR_3-1].re, x[VAR_6-VAR_3-1].im, -VAR_12[VAR_6-VAR_3-1], -VAR_11[VAR_6-VAR_3-1]); CMULL(i0, r1, x[VAR_6+VAR_3  ].re, x[VAR_6+VAR_3  ].im, -VAR_12[VAR_6+VAR_3  ], -VAR_11[VAR_6+VAR_3  ]); o[VAR_6-VAR_3-1].re = r0; o[VAR_6-VAR_3-1].im = i0; o[VAR_6+VAR_3  ].re = r1; o[VAR_6+VAR_3  ].im = i1; } }