static void rdft_calc_c(RDFTContext *s, FFTSample *data)

{

    int i, i1, i2;

    FFTComplex ev, od;

    const int n = 1 << s->nbits;

    const float k1 = 0.5;

    const float k2 = 0.5 - s->inverse;

    const FFTSample *tcos = s->tcos;

    const FFTSample *tsin = s->tsin;



    if (!s->inverse) {

        s->fft.fft_permute(&s->fft, (FFTComplex*)data);

        s->fft.fft_calc(&s->fft, (FFTComplex*)data);

    }

    /* i=0 is a special case because of packing, the DC term is real, so we

       are going to throw the N/2 term (also real) in with it. */

    ev.re = data[0];

    data[0] = ev.re+data[1];

    data[1] = ev.re-data[1];

    for (i = 1; i < (n>>2); i++) {

        i1 = 2*i;

        i2 = n-i1;

        /* Separate even and odd FFTs */

        ev.re =  k1*(data[i1  ]+data[i2  ]);

        od.im = -k2*(data[i1  ]-data[i2  ]);

        ev.im =  k1*(data[i1+1]-data[i2+1]);

        od.re =  k2*(data[i1+1]+data[i2+1]);

        /* Apply twiddle factors to the odd FFT and add to the even FFT */

        data[i1  ] =  ev.re + od.re*tcos[i] - od.im*tsin[i];

        data[i1+1] =  ev.im + od.im*tcos[i] + od.re*tsin[i];

        data[i2  ] =  ev.re - od.re*tcos[i] + od.im*tsin[i];

        data[i2+1] = -ev.im + od.im*tcos[i] + od.re*tsin[i];

    }

    data[2*i+1]=s->sign_convention*data[2*i+1];

    if (s->inverse) {

        data[0] *= k1;

        data[1] *= k1;

        s->fft.fft_permute(&s->fft, (FFTComplex*)data);

        s->fft.fft_calc(&s->fft, (FFTComplex*)data);

    }

}

static void rdft_calc_c(RDFTContext *s, FFTSample *data)

{

    int i, i1, i2;

    FFTComplex ev, od;

    const int n = 1 << s->nbits;

    const float k1 = 0.5;

    const float k2 = 0.5 - s->inverse;

    const FFTSample *tcos = s->tcos;

    const FFTSample *tsin = s->tsin;



    if (!s->inverse) {

        s->fft.fft_permute(&s->fft, (FFTComplex*)data);

        s->fft.fft_calc(&s->fft, (FFTComplex*)data);

    }

    



    ev.re = data[0];

    data[0] = ev.re+data[1];

    data[1] = ev.re-data[1];

    for (i = 1; i < (n>>2); i++) {

        i1 = 2*i;

        i2 = n-i1;

        

        ev.re =  k1*(data[i1  ]+data[i2  ]);

        od.im = -k2*(data[i1  ]-data[i2  ]);

        ev.im =  k1*(data[i1+1]-data[i2+1]);

        od.re =  k2*(data[i1+1]+data[i2+1]);

        

        data[i1  ] =  ev.re + od.re*tcos[i] - od.im*tsin[i];

        data[i1+1] =  ev.im + od.im*tcos[i] + od.re*tsin[i];

        data[i2  ] =  ev.re - od.re*tcos[i] + od.im*tsin[i];

        data[i2+1] = -ev.im + od.im*tcos[i] + od.re*tsin[i];

    }

    data[2*i+1]=s->sign_convention*data[2*i+1];

    if (s->inverse) {

        data[0] *= k1;

        data[1] *= k1;

        s->fft.fft_permute(&s->fft, (FFTComplex*)data);

        s->fft.fft_calc(&s->fft, (FFTComplex*)data);

    }

}

static void FUNC_0(RDFTContext *VAR_0, FFTSample *VAR_1)

{

    int VAR_2, VAR_3, VAR_4;

    FFTComplex ev, od;

    const int VAR_5 = 1 << VAR_0->nbits;

    const float VAR_6 = 0.5;

    const float VAR_7 = 0.5 - VAR_0->inverse;

    const FFTSample *VAR_8 = VAR_0->VAR_8;

    const FFTSample *VAR_9 = VAR_0->VAR_9;



    if (!VAR_0->inverse) {

        VAR_0->fft.fft_permute(&VAR_0->fft, (FFTComplex*)VAR_1);

        VAR_0->fft.fft_calc(&VAR_0->fft, (FFTComplex*)VAR_1);

    }

    



    ev.re = VAR_1[0];

    VAR_1[0] = ev.re+VAR_1[1];

    VAR_1[1] = ev.re-VAR_1[1];

    for (VAR_2 = 1; VAR_2 < (VAR_5>>2); VAR_2++) {

        VAR_3 = 2*VAR_2;

        VAR_4 = VAR_5-VAR_3;

        

        ev.re =  VAR_6*(VAR_1[VAR_3  ]+VAR_1[VAR_4  ]);

        od.im = -VAR_7*(VAR_1[VAR_3  ]-VAR_1[VAR_4  ]);

        ev.im =  VAR_6*(VAR_1[VAR_3+1]-VAR_1[VAR_4+1]);

        od.re =  VAR_7*(VAR_1[VAR_3+1]+VAR_1[VAR_4+1]);

        

        VAR_1[VAR_3  ] =  ev.re + od.re*VAR_8[VAR_2] - od.im*VAR_9[VAR_2];

        VAR_1[VAR_3+1] =  ev.im + od.im*VAR_8[VAR_2] + od.re*VAR_9[VAR_2];

        VAR_1[VAR_4  ] =  ev.re - od.re*VAR_8[VAR_2] + od.im*VAR_9[VAR_2];

        VAR_1[VAR_4+1] = -ev.im + od.im*VAR_8[VAR_2] + od.re*VAR_9[VAR_2];

    }

    VAR_1[2*VAR_2+1]=VAR_0->sign_convention*VAR_1[2*VAR_2+1];

    if (VAR_0->inverse) {

        VAR_1[0] *= VAR_6;

        VAR_1[1] *= VAR_6;

        VAR_0->fft.fft_permute(&VAR_0->fft, (FFTComplex*)VAR_1);

        VAR_0->fft.fft_calc(&VAR_0->fft, (FFTComplex*)VAR_1);

    }

}

static void FUNC_0(RDFTContext *VAR_0, FFTSample *VAR_1)
{ int VAR_2, VAR_3, VAR_4; FFTComplex ev, od; const int VAR_5 = 1 << VAR_0->nbits; const float VAR_6 = 0.5; const float VAR_7 = 0.5 - VAR_0->inverse; const FFTSample *VAR_8 = VAR_0->VAR_8; const FFTSample *VAR_9 = VAR_0->VAR_9; if (!VAR_0->inverse) { VAR_0->fft.fft_permute(&VAR_0->fft, (FFTComplex*)VAR_1); VAR_0->fft.fft_calc(&VAR_0->fft, (FFTComplex*)VAR_1); } ev.re = VAR_1[0]; VAR_1[0] = ev.re+VAR_1[1]; VAR_1[1] = ev.re-VAR_1[1]; for (VAR_2 = 1; VAR_2 < (VAR_5>>2); VAR_2++) { VAR_3 = 2*VAR_2; VAR_4 = VAR_5-VAR_3; ev.re =  VAR_6*(VAR_1[VAR_3  ]+VAR_1[VAR_4  ]); od.im = -VAR_7*(VAR_1[VAR_3  ]-VAR_1[VAR_4  ]); ev.im =  VAR_6*(VAR_1[VAR_3+1]-VAR_1[VAR_4+1]); od.re =  VAR_7*(VAR_1[VAR_3+1]+VAR_1[VAR_4+1]); VAR_1[VAR_3  ] =  ev.re + od.re*VAR_8[VAR_2] - od.im*VAR_9[VAR_2]; VAR_1[VAR_3+1] =  ev.im + od.im*VAR_8[VAR_2] + od.re*VAR_9[VAR_2]; VAR_1[VAR_4  ] =  ev.re - od.re*VAR_8[VAR_2] + od.im*VAR_9[VAR_2]; VAR_1[VAR_4+1] = -ev.im + od.im*VAR_8[VAR_2] + od.re*VAR_9[VAR_2]; } VAR_1[2*VAR_2+1]=VAR_0->sign_convention*VAR_1[2*VAR_2+1]; if (VAR_0->inverse) { VAR_1[0] *= VAR_6; VAR_1[1] *= VAR_6; VAR_0->fft.fft_permute(&VAR_0->fft, (FFTComplex*)VAR_1); VAR_0->fft.fft_calc(&VAR_0->fft, (FFTComplex*)VAR_1); } }