static inline int silk_is_lpc_stable(const int16_t lpc[16], int order)

{

    int k, j, DC_resp = 0;

    int32_t lpc32[2][16];       // Q24

    int totalinvgain = 1 << 30; // 1.0 in Q30

    int32_t *row = lpc32[0], *prevrow;



    /* initialize the first row for the Levinson recursion */

    for (k = 0; k < order; k++) {

        DC_resp += lpc[k];

        row[k] = lpc[k] * 4096;

    }



    if (DC_resp >= 4096)

        return 0;



    /* check if prediction gain pushes any coefficients too far */

    for (k = order - 1; 1; k--) {

        int rc;      // Q31; reflection coefficient

        int gaindiv; // Q30; inverse of the gain (the divisor)

        int gain;    // gain for this reflection coefficient

        int fbits;   // fractional bits used for the gain

        int error;   // Q29; estimate of the error of our partial estimate of 1/gaindiv



        if (FFABS(row[k]) > 16773022)

            return 0;



        rc      = -(row[k] * 128);

        gaindiv = (1 << 30) - MULH(rc, rc);



        totalinvgain = MULH(totalinvgain, gaindiv) << 2;

        if (k == 0)

            return (totalinvgain >= 107374);



        /* approximate 1.0/gaindiv */

        fbits = opus_ilog(gaindiv);

        gain  = ((1 << 29) - 1) / (gaindiv >> (fbits + 1 - 16)); // Q<fbits-16>

        error = (1 << 29) - MULL(gaindiv << (15 + 16 - fbits), gain, 16);

        gain  = ((gain << 16) + (error * gain >> 13));



        /* switch to the next row of the LPC coefficients */

        prevrow = row;

        row = lpc32[k & 1];



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

            int x = prevrow[j] - ROUND_MULL(prevrow[k - j - 1], rc, 31);

            row[j] = ROUND_MULL(x, gain, fbits);

        }

    }

}

static inline int silk_is_lpc_stable(const int16_t lpc[16], int order)

{

    int k, j, DC_resp = 0;

    int32_t lpc32[2][16];       

    int totalinvgain = 1 << 30; 

    int32_t *row = lpc32[0], *prevrow;



    

    for (k = 0; k < order; k++) {

        DC_resp += lpc[k];

        row[k] = lpc[k] * 4096;

    }



    if (DC_resp >= 4096)

        return 0;



    

    for (k = order - 1; 1; k--) {

        int rc;      

        int gaindiv; 

        int gain;    

        int fbits;   

        int error;   



        if (FFABS(row[k]) > 16773022)

            return 0;



        rc      = -(row[k] * 128);

        gaindiv = (1 << 30) - MULH(rc, rc);



        totalinvgain = MULH(totalinvgain, gaindiv) << 2;

        if (k == 0)

            return (totalinvgain >= 107374);



        

        fbits = opus_ilog(gaindiv);

        gain  = ((1 << 29) - 1) / (gaindiv >> (fbits + 1 - 16)); 

        error = (1 << 29) - MULL(gaindiv << (15 + 16 - fbits), gain, 16);

        gain  = ((gain << 16) + (error * gain >> 13));



        

        prevrow = row;

        row = lpc32[k & 1];



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

            int x = prevrow[j] - ROUND_MULL(prevrow[k - j - 1], rc, 31);

            row[j] = ROUND_MULL(x, gain, fbits);

        }

    }

}

            int x = prevrow[j] - ROUND_MULL(prevrow[k - j - 1], rc, 31);             row[j] = ROUND_MULL(x, gain, fbits);
static inline int FUNC_0(const int16_t VAR_0[16], int VAR_1)

{

    int VAR_2, VAR_3, VAR_4 = 0;

    int32_t lpc32[2][16];       

    int VAR_5 = 1 << 30; 

    int32_t *row = lpc32[0], *prevrow;



    

    for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++) {

        VAR_4 += VAR_0[VAR_2];

        row[VAR_2] = VAR_0[VAR_2] * 4096;

    }



    if (VAR_4 >= 4096)

        return 0;



    

    for (VAR_2 = VAR_1 - 1; 1; VAR_2--) {

        int VAR_6;      

        int VAR_7; 

        int VAR_8;    

        int VAR_9;   

        int VAR_10;   



        if (FFABS(row[VAR_2]) > 16773022)

            return 0;



        VAR_6      = -(row[VAR_2] * 128);

        VAR_7 = (1 << 30) - MULH(VAR_6, VAR_6);



        VAR_5 = MULH(VAR_5, VAR_7) << 2;

        if (VAR_2 == 0)

            return (VAR_5 >= 107374);



        

        VAR_9 = opus_ilog(VAR_7);

        VAR_8  = ((1 << 29) - 1) / (VAR_7 >> (VAR_9 + 1 - 16)); 

        VAR_10 = (1 << 29) - MULL(VAR_7 << (15 + 16 - VAR_9), VAR_8, 16);

        VAR_8  = ((VAR_8 << 16) + (VAR_10 * VAR_8 >> 13));



        

        prevrow = row;

        row = lpc32[VAR_2 & 1];



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

            int VAR_11 = prevrow[VAR_3] - ROUND_MULL(prevrow[VAR_2 - VAR_3 - 1], VAR_6, 31);

            row[VAR_3] = ROUND_MULL(VAR_11, VAR_8, VAR_9);

        }

    }

}

static inline int FUNC_0(const int16_t VAR_0[16], int VAR_1)
{ int VAR_2, VAR_3, VAR_4 = 0; int32_t lpc32[2][16]; int VAR_5 = 1 << 30; int32_t *row = lpc32[0], *prevrow; for (VAR_2 = 0; VAR_2 < VAR_1; VAR_2++) { VAR_4 += VAR_0[VAR_2]; row[VAR_2] = VAR_0[VAR_2] * 4096; } if (VAR_4 >= 4096)
return 0; for (VAR_2 = VAR_1 - 1; 1; VAR_2--) { int VAR_6; int VAR_7; int VAR_8; int VAR_9; int VAR_10; if (FFABS(row[VAR_2]) > 16773022)
return 0; VAR_6      = -(row[VAR_2] * 128); VAR_7 = (1 << 30) - MULH(VAR_6, VAR_6); VAR_5 = MULH(VAR_5, VAR_7) << 2; if (VAR_2 == 0)
return (VAR_5 >= 107374); VAR_9 = opus_ilog(VAR_7); VAR_8  = ((1 << 29) - 1) / (VAR_7 >> (VAR_9 + 1 - 16)); VAR_10 = (1 << 29) - MULL(VAR_7 << (15 + 16 - VAR_9), VAR_8, 16); VAR_8  = ((VAR_8 << 16) + (VAR_10 * VAR_8 >> 13)); prevrow = row; row = lpc32[VAR_2 & 1]; for (VAR_3 = 0; VAR_3 < VAR_2; VAR_3++) { int VAR_11 = prevrow[VAR_3] - ROUND_MULL(prevrow[VAR_2 - VAR_3 - 1], VAR_6, 31); row[VAR_3] = ROUND_MULL(VAR_11, VAR_8, VAR_9); } } }