static void final(Real144_internal *glob, short *i1, short *i2, void *out,

                  int *statbuf, int len)

{

    int x, sum;

    int buffer[10];

    short *ptr;

    short *ptr2;



    memcpy(glob->work, statbuf,20);

    memcpy(glob->work + 10, i2, len * 2);



    buffer[9] = i1[0];

    buffer[8] = i1[1];

    buffer[7] = i1[2];

    buffer[6] = i1[3];

    buffer[5] = i1[4];

    buffer[4] = i1[5];

    buffer[3] = i1[6];

    buffer[2] = i1[7];

    buffer[1] = i1[8];

    buffer[0] = i1[9];



    ptr2 = (ptr = glob->work) + len;



    while (ptr < ptr2) {

        for(sum=0, x=0; x<=9; x++)

            sum += buffer[x] * (ptr[x]);



        sum = sum >> 12;

        x = ptr[10] - sum;



        if (x<-32768 || x>32767) {

            memset(out, 0, len * 2);

            memset(statbuf, 0, 20);

            return;

        }



        ptr[10] = x;

        ptr++;

    }

    memcpy(out, ptr+10 - len, len * 2);

    memcpy(statbuf, ptr, 20);

}

static void final(Real144_internal *glob, short *i1, short *i2, void *out,

                  int *statbuf, int len)

{

    int x, sum;

    int buffer[10];

    short *ptr;

    short *ptr2;



    memcpy(glob->work, statbuf,20);

    memcpy(glob->work + 10, i2, len * 2);



    buffer[9] = i1[0];

    buffer[8] = i1[1];

    buffer[7] = i1[2];

    buffer[6] = i1[3];

    buffer[5] = i1[4];

    buffer[4] = i1[5];

    buffer[3] = i1[6];

    buffer[2] = i1[7];

    buffer[1] = i1[8];

    buffer[0] = i1[9];



    ptr2 = (ptr = glob->work) + len;



    while (ptr < ptr2) {

        for(sum=0, x=0; x<=9; x++)

            sum += buffer[x] * (ptr[x]);



        sum = sum >> 12;

        x = ptr[10] - sum;



        if (x<-32768 || x>32767) {

            memset(out, 0, len * 2);

            memset(statbuf, 0, 20);

            return;

        }



        ptr[10] = x;

        ptr++;

    }

    memcpy(out, ptr+10 - len, len * 2);

    memcpy(statbuf, ptr, 20);

}

static void FUNC_0(Real144_internal *VAR_0, short *VAR_1, short *VAR_2, void *VAR_3,

                  int *VAR_4, int VAR_5)

{

    int VAR_6, VAR_7;

    int VAR_8[10];

    short *VAR_9;

    short *VAR_10;



    memcpy(VAR_0->work, VAR_4,20);

    memcpy(VAR_0->work + 10, VAR_2, VAR_5 * 2);



    VAR_8[9] = VAR_1[0];

    VAR_8[8] = VAR_1[1];

    VAR_8[7] = VAR_1[2];

    VAR_8[6] = VAR_1[3];

    VAR_8[5] = VAR_1[4];

    VAR_8[4] = VAR_1[5];

    VAR_8[3] = VAR_1[6];

    VAR_8[2] = VAR_1[7];

    VAR_8[1] = VAR_1[8];

    VAR_8[0] = VAR_1[9];



    VAR_10 = (VAR_9 = VAR_0->work) + VAR_5;



    while (VAR_9 < VAR_10) {

        for(VAR_7=0, VAR_6=0; VAR_6<=9; VAR_6++)

            VAR_7 += VAR_8[VAR_6] * (VAR_9[VAR_6]);



        VAR_7 = VAR_7 >> 12;

        VAR_6 = VAR_9[10] - VAR_7;



        if (VAR_6<-32768 || VAR_6>32767) {

            memset(VAR_3, 0, VAR_5 * 2);

            memset(VAR_4, 0, 20);

            return;

        }



        VAR_9[10] = VAR_6;

        VAR_9++;

    }

    memcpy(VAR_3, VAR_9+10 - VAR_5, VAR_5 * 2);

    memcpy(VAR_4, VAR_9, 20);

}

static void FUNC_0(Real144_internal *VAR_0, short *VAR_1, short *VAR_2, void *VAR_3,
int *VAR_4, int VAR_5)
{ int VAR_6, VAR_7; int VAR_8[10]; short *VAR_9; short *VAR_10; memcpy(VAR_0->work, VAR_4,20); memcpy(VAR_0->work + 10, VAR_2, VAR_5 * 2); VAR_8[9] = VAR_1[0]; VAR_8[8] = VAR_1[1]; VAR_8[7] = VAR_1[2]; VAR_8[6] = VAR_1[3]; VAR_8[5] = VAR_1[4]; VAR_8[4] = VAR_1[5]; VAR_8[3] = VAR_1[6]; VAR_8[2] = VAR_1[7]; VAR_8[1] = VAR_1[8]; VAR_8[0] = VAR_1[9]; VAR_10 = (VAR_9 = VAR_0->work) + VAR_5; while (VAR_9 < VAR_10) { for(VAR_7=0, VAR_6=0; VAR_6<=9; VAR_6++) VAR_7 += VAR_8[VAR_6] * (VAR_9[VAR_6]); VAR_7 = VAR_7 >> 12; VAR_6 = VAR_9[10] - VAR_7; if (VAR_6<-32768 || VAR_6>32767) { memset(VAR_3, 0, VAR_5 * 2); memset(VAR_4, 0, 20); return; } VAR_9[10] = VAR_6; VAR_9++; } memcpy(VAR_3, VAR_9+10 - VAR_5, VAR_5 * 2); memcpy(VAR_4, VAR_9, 20); }