static void xa_decode(short *out, const unsigned char *in,

    ADPCMChannelStatus *left, ADPCMChannelStatus *right, int inc)

{

    int i, j;

    int shift,filter,f0,f1;

    int s_1,s_2;

    int d,s,t;



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



        shift  = 12 - (in[4+i*2] & 15);

        filter = in[4+i*2] >> 4;

        f0 = xa_adpcm_table[filter][0];

        f1 = xa_adpcm_table[filter][1];



        s_1 = left->sample1;

        s_2 = left->sample2;



        for(j=0;j<28;j++) {

            d = in[16+i+j*4];



            t = (signed char)(d<<4)>>4;

            s = ( t<<shift ) + ((s_1*f0 + s_2*f1+32)>>6);

            s_2 = s_1;

            s_1 = av_clip_int16(s);

            *out = s_1;

            out += inc;

        }



        if (inc==2) { /* stereo */

            left->sample1 = s_1;

            left->sample2 = s_2;

            s_1 = right->sample1;

            s_2 = right->sample2;

            out = out + 1 - 28*2;

        }



        shift  = 12 - (in[5+i*2] & 15);

        filter = in[5+i*2] >> 4;



        f0 = xa_adpcm_table[filter][0];

        f1 = xa_adpcm_table[filter][1];



        for(j=0;j<28;j++) {

            d = in[16+i+j*4];



            t = (signed char)d >> 4;

            s = ( t<<shift ) + ((s_1*f0 + s_2*f1+32)>>6);

            s_2 = s_1;

            s_1 = av_clip_int16(s);

            *out = s_1;

            out += inc;

        }



        if (inc==2) { /* stereo */

            right->sample1 = s_1;

            right->sample2 = s_2;

            out -= 1;

        } else {

            left->sample1 = s_1;

            left->sample2 = s_2;

        }

    }

}

static void xa_decode(short *out, const unsigned char *in,

    ADPCMChannelStatus *left, ADPCMChannelStatus *right, int inc)

{

    int i, j;

    int shift,filter,f0,f1;

    int s_1,s_2;

    int d,s,t;



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



        shift  = 12 - (in[4+i*2] & 15);

        filter = in[4+i*2] >> 4;

        f0 = xa_adpcm_table[filter][0];

        f1 = xa_adpcm_table[filter][1];



        s_1 = left->sample1;

        s_2 = left->sample2;



        for(j=0;j<28;j++) {

            d = in[16+i+j*4];



            t = (signed char)(d<<4)>>4;

            s = ( t<<shift ) + ((s_1*f0 + s_2*f1+32)>>6);

            s_2 = s_1;

            s_1 = av_clip_int16(s);

            *out = s_1;

            out += inc;

        }



        if (inc==2) { 

            left->sample1 = s_1;

            left->sample2 = s_2;

            s_1 = right->sample1;

            s_2 = right->sample2;

            out = out + 1 - 28*2;

        }



        shift  = 12 - (in[5+i*2] & 15);

        filter = in[5+i*2] >> 4;



        f0 = xa_adpcm_table[filter][0];

        f1 = xa_adpcm_table[filter][1];



        for(j=0;j<28;j++) {

            d = in[16+i+j*4];



            t = (signed char)d >> 4;

            s = ( t<<shift ) + ((s_1*f0 + s_2*f1+32)>>6);

            s_2 = s_1;

            s_1 = av_clip_int16(s);

            *out = s_1;

            out += inc;

        }



        if (inc==2) { 

            right->sample1 = s_1;

            right->sample2 = s_2;

            out -= 1;

        } else {

            left->sample1 = s_1;

            left->sample2 = s_2;

        }

    }

}

static void xa_decode(short *out, const unsigned char *in,     ADPCMChannelStatus *left, ADPCMChannelStatus *right, int inc)
static void FUNC_0(short *VAR_0, const unsigned char *VAR_1,

    ADPCMChannelStatus *VAR_2, ADPCMChannelStatus *VAR_3, int VAR_4)

{

    int VAR_5, VAR_6;

    int VAR_7,VAR_8,VAR_9,VAR_10;

    int VAR_11,VAR_12;

    int VAR_13,VAR_14,VAR_15;



    for(VAR_5=0;VAR_5<4;VAR_5++) {



        VAR_7  = 12 - (VAR_1[4+VAR_5*2] & 15);

        VAR_8 = VAR_1[4+VAR_5*2] >> 4;

        VAR_9 = xa_adpcm_table[VAR_8][0];

        VAR_10 = xa_adpcm_table[VAR_8][1];



        VAR_11 = VAR_2->sample1;

        VAR_12 = VAR_2->sample2;



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

            VAR_13 = VAR_1[16+VAR_5+VAR_6*4];



            VAR_15 = (signed char)(VAR_13<<4)>>4;

            VAR_14 = ( VAR_15<<VAR_7 ) + ((VAR_11*VAR_9 + VAR_12*VAR_10+32)>>6);

            VAR_12 = VAR_11;

            VAR_11 = av_clip_int16(VAR_14);

            *VAR_0 = VAR_11;

            VAR_0 += VAR_4;

        }



        if (VAR_4==2) { 

            VAR_2->sample1 = VAR_11;

            VAR_2->sample2 = VAR_12;

            VAR_11 = VAR_3->sample1;

            VAR_12 = VAR_3->sample2;

            VAR_0 = VAR_0 + 1 - 28*2;

        }



        VAR_7  = 12 - (VAR_1[5+VAR_5*2] & 15);

        VAR_8 = VAR_1[5+VAR_5*2] >> 4;



        VAR_9 = xa_adpcm_table[VAR_8][0];

        VAR_10 = xa_adpcm_table[VAR_8][1];



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

            VAR_13 = VAR_1[16+VAR_5+VAR_6*4];



            VAR_15 = (signed char)VAR_13 >> 4;

            VAR_14 = ( VAR_15<<VAR_7 ) + ((VAR_11*VAR_9 + VAR_12*VAR_10+32)>>6);

            VAR_12 = VAR_11;

            VAR_11 = av_clip_int16(VAR_14);

            *VAR_0 = VAR_11;

            VAR_0 += VAR_4;

        }



        if (VAR_4==2) { 

            VAR_3->sample1 = VAR_11;

            VAR_3->sample2 = VAR_12;

            VAR_0 -= 1;

        } else {

            VAR_2->sample1 = VAR_11;

            VAR_2->sample2 = VAR_12;

        }

    }

}

static void FUNC_0(short *VAR_0, const unsigned char *VAR_1,
ADPCMChannelStatus *VAR_2, ADPCMChannelStatus *VAR_3, int VAR_4)
{ int VAR_5, VAR_6; int VAR_7,VAR_8,VAR_9,VAR_10; int VAR_11,VAR_12; int VAR_13,VAR_14,VAR_15; for(VAR_5=0;VAR_5<4;VAR_5++) { VAR_7  = 12 - (VAR_1[4+VAR_5*2] & 15); VAR_8 = VAR_1[4+VAR_5*2] >> 4; VAR_9 = xa_adpcm_table[VAR_8][0]; VAR_10 = xa_adpcm_table[VAR_8][1]; VAR_11 = VAR_2->sample1; VAR_12 = VAR_2->sample2; for(VAR_6=0;VAR_6<28;VAR_6++) { VAR_13 = VAR_1[16+VAR_5+VAR_6*4]; VAR_15 = (signed char)(VAR_13<<4)>>4; VAR_14 = ( VAR_15<<VAR_7 ) + ((VAR_11*VAR_9 + VAR_12*VAR_10+32)>>6); VAR_12 = VAR_11; VAR_11 = av_clip_int16(VAR_14); *VAR_0 = VAR_11; VAR_0 += VAR_4; } if (VAR_4==2) { VAR_2->sample1 = VAR_11; VAR_2->sample2 = VAR_12; VAR_11 = VAR_3->sample1; VAR_12 = VAR_3->sample2; VAR_0 = VAR_0 + 1 - 28*2; } VAR_7  = 12 - (VAR_1[5+VAR_5*2] & 15); VAR_8 = VAR_1[5+VAR_5*2] >> 4; VAR_9 = xa_adpcm_table[VAR_8][0]; VAR_10 = xa_adpcm_table[VAR_8][1]; for(VAR_6=0;VAR_6<28;VAR_6++) { VAR_13 = VAR_1[16+VAR_5+VAR_6*4]; VAR_15 = (signed char)VAR_13 >> 4; VAR_14 = ( VAR_15<<VAR_7 ) + ((VAR_11*VAR_9 + VAR_12*VAR_10+32)>>6); VAR_12 = VAR_11; VAR_11 = av_clip_int16(VAR_14); *VAR_0 = VAR_11; VAR_0 += VAR_4; } if (VAR_4==2) { VAR_3->sample1 = VAR_11; VAR_3->sample2 = VAR_12; VAR_0 -= 1; } else { VAR_2->sample1 = VAR_11; VAR_2->sample2 = VAR_12; } } }