static void apply_independent_coupling_fixed(AACContext *ac,

                                       SingleChannelElement *target,

                                       ChannelElement *cce, int index)

{

    int i, c, shift, round, tmp;

    const int gain = cce->coup.gain[index][0];

    const int *src = cce->ch[0].ret;

    int *dest = target->ret;

    const int len = 1024 << (ac->oc[1].m4ac.sbr == 1);



    c = cce_scale_fixed[gain & 7];

    shift = (gain-1024) >> 3;

    if (shift < 0) {

        shift = -shift;

        round = 1 << (shift - 1);



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

            tmp = (int)(((int64_t)src[i] * c + (int64_t)0x1000000000) >> 37);

            dest[i] += (tmp + round) >> shift;

        }

    }

    else {

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

          tmp = (int)(((int64_t)src[i] * c + (int64_t)0x1000000000) >> 37);

          dest[i] += tmp << shift;

      }

    }

}

static void apply_independent_coupling_fixed(AACContext *ac,

                                       SingleChannelElement *target,

                                       ChannelElement *cce, int index)

{

    int i, c, shift, round, tmp;

    const int gain = cce->coup.gain[index][0];

    const int *src = cce->ch[0].ret;

    int *dest = target->ret;

    const int len = 1024 << (ac->oc[1].m4ac.sbr == 1);



    c = cce_scale_fixed[gain & 7];

    shift = (gain-1024) >> 3;

    if (shift < 0) {

        shift = -shift;

        round = 1 << (shift - 1);



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

            tmp = (int)(((int64_t)src[i] * c + (int64_t)0x1000000000) >> 37);

            dest[i] += (tmp + round) >> shift;

        }

    }

    else {

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

          tmp = (int)(((int64_t)src[i] * c + (int64_t)0x1000000000) >> 37);

          dest[i] += tmp << shift;

      }

    }

}

    if (shift < 0) {
static void FUNC_0(AACContext *VAR_0,

                                       SingleChannelElement *VAR_1,

                                       ChannelElement *VAR_2, int VAR_3)

{

    int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;

    const int VAR_9 = VAR_2->coup.VAR_9[VAR_3][0];

    const int *VAR_10 = VAR_2->ch[0].ret;

    int *VAR_11 = VAR_1->ret;

    const int VAR_12 = 1024 << (VAR_0->oc[1].m4ac.sbr == 1);



    VAR_5 = cce_scale_fixed[VAR_9 & 7];

    VAR_6 = (VAR_9-1024) >> 3;

    if (VAR_6 < 0) {

        VAR_6 = -VAR_6;

        VAR_7 = 1 << (VAR_6 - 1);



        for (VAR_4 = 0; VAR_4 < VAR_12; VAR_4++) {

            VAR_8 = (int)(((int64_t)VAR_10[VAR_4] * VAR_5 + (int64_t)0x1000000000) >> 37);

            VAR_11[VAR_4] += (VAR_8 + VAR_7) >> VAR_6;

        }

    }

    else {

      for (VAR_4 = 0; VAR_4 < VAR_12; VAR_4++) {

          VAR_8 = (int)(((int64_t)VAR_10[VAR_4] * VAR_5 + (int64_t)0x1000000000) >> 37);

          VAR_11[VAR_4] += VAR_8 << VAR_6;

      }

    }

}

static void FUNC_0(AACContext *VAR_0,
SingleChannelElement *VAR_1,
ChannelElement *VAR_2, int VAR_3)
{ int VAR_4, VAR_5, VAR_6, VAR_7, VAR_8; const int VAR_9 = VAR_2->coup.VAR_9[VAR_3][0]; const int *VAR_10 = VAR_2->ch[0].ret; int *VAR_11 = VAR_1->ret; const int VAR_12 = 1024 << (VAR_0->oc[1].m4ac.sbr == 1); VAR_5 = cce_scale_fixed[VAR_9 & 7]; VAR_6 = (VAR_9-1024) >> 3; if (VAR_6 < 0) { VAR_6 = -VAR_6; VAR_7 = 1 << (VAR_6 - 1); for (VAR_4 = 0; VAR_4 < VAR_12; VAR_4++) { VAR_8 = (int)(((int64_t)VAR_10[VAR_4] * VAR_5 + (int64_t)0x1000000000) >> 37); VAR_11[VAR_4] += (VAR_8 + VAR_7) >> VAR_6; } } else { for (VAR_4 = 0; VAR_4 < VAR_12; VAR_4++) { VAR_8 = (int)(((int64_t)VAR_10[VAR_4] * VAR_5 + (int64_t)0x1000000000) >> 37); VAR_11[VAR_4] += VAR_8 << VAR_6; } } }