static void apply_dependent_coupling_fixed(AACContext *ac,

                                     SingleChannelElement *target,

                                     ChannelElement *cce, int index)

{

    IndividualChannelStream *ics = &cce->ch[0].ics;

    const uint16_t *offsets = ics->swb_offset;

    int *dest = target->coeffs;

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

    int g, i, group, k, idx = 0;

    if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP) {

        av_log(ac->avctx, AV_LOG_ERROR,

               "Dependent coupling is not supported together with LTP\n");

        return;

    }

    for (g = 0; g < ics->num_window_groups; g++) {

        for (i = 0; i < ics->max_sfb; i++, idx++) {

            if (cce->ch[0].band_type[idx] != ZERO_BT) {

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

                int shift, round, c, tmp;



                if (gain < 0) {

                    c = -cce_scale_fixed[-gain & 7];

                    shift = (-gain-1024) >> 3;

                }

                else {

                    c = cce_scale_fixed[gain & 7];

                    shift = (gain-1024) >> 3;

                }



                if (shift < -31) {

                    // Nothing to do

                } else if (shift < 0) {

                    shift = -shift;

                    round = 1 << (shift - 1);



                    for (group = 0; group < ics->group_len[g]; group++) {

                        for (k = offsets[i]; k < offsets[i + 1]; k++) {

                            tmp = (int)(((int64_t)src[group * 128 + k] * c + \

                                       (int64_t)0x1000000000) >> 37);

                            dest[group * 128 + k] += (tmp + round) >> shift;

                        }

                    }

                }

                else {

                    for (group = 0; group < ics->group_len[g]; group++) {

                        for (k = offsets[i]; k < offsets[i + 1]; k++) {

                            tmp = (int)(((int64_t)src[group * 128 + k] * c + \

                                        (int64_t)0x1000000000) >> 37);

                            dest[group * 128 + k] += tmp << shift;

                        }

                    }

                }

            }

        }

        dest += ics->group_len[g] * 128;

        src  += ics->group_len[g] * 128;

    }

}

static void apply_dependent_coupling_fixed(AACContext *ac,

                                     SingleChannelElement *target,

                                     ChannelElement *cce, int index)

{

    IndividualChannelStream *ics = &cce->ch[0].ics;

    const uint16_t *offsets = ics->swb_offset;

    int *dest = target->coeffs;

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

    int g, i, group, k, idx = 0;

    if (ac->oc[1].m4ac.object_type == AOT_AAC_LTP) {

        av_log(ac->avctx, AV_LOG_ERROR,

               "Dependent coupling is not supported together with LTP\n");

        return;

    }

    for (g = 0; g < ics->num_window_groups; g++) {

        for (i = 0; i < ics->max_sfb; i++, idx++) {

            if (cce->ch[0].band_type[idx] != ZERO_BT) {

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

                int shift, round, c, tmp;



                if (gain < 0) {

                    c = -cce_scale_fixed[-gain & 7];

                    shift = (-gain-1024) >> 3;

                }

                else {

                    c = cce_scale_fixed[gain & 7];

                    shift = (gain-1024) >> 3;

                }



                if (shift < -31) {

                    

                } else if (shift < 0) {

                    shift = -shift;

                    round = 1 << (shift - 1);



                    for (group = 0; group < ics->group_len[g]; group++) {

                        for (k = offsets[i]; k < offsets[i + 1]; k++) {

                            tmp = (int)(((int64_t)src[group * 128 + k] * c + \

                                       (int64_t)0x1000000000) >> 37);

                            dest[group * 128 + k] += (tmp + round) >> shift;

                        }

                    }

                }

                else {

                    for (group = 0; group < ics->group_len[g]; group++) {

                        for (k = offsets[i]; k < offsets[i + 1]; k++) {

                            tmp = (int)(((int64_t)src[group * 128 + k] * c + \

                                        (int64_t)0x1000000000) >> 37);

                            dest[group * 128 + k] += tmp << shift;

                        }

                    }

                }

            }

        }

        dest += ics->group_len[g] * 128;

        src  += ics->group_len[g] * 128;

    }

}

                            dest[group * 128 + k] += tmp << shift;
static void FUNC_0(AACContext *VAR_0,

                                     SingleChannelElement *VAR_1,

                                     ChannelElement *VAR_2, int VAR_3)

{

    IndividualChannelStream *ics = &VAR_2->ch[0].ics;

    const uint16_t *VAR_4 = ics->swb_offset;

    int *VAR_5 = VAR_1->coeffs;

    const int *VAR_6 = VAR_2->ch[0].coeffs;

    int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11 = 0;

    if (VAR_0->oc[1].m4ac.object_type == AOT_AAC_LTP) {

        av_log(VAR_0->avctx, AV_LOG_ERROR,

               "Dependent coupling is not supported together with LTP\n");

        return;

    }

    for (VAR_7 = 0; VAR_7 < ics->num_window_groups; VAR_7++) {

        for (VAR_8 = 0; VAR_8 < ics->max_sfb; VAR_8++, VAR_11++) {

            if (VAR_2->ch[0].band_type[VAR_11] != ZERO_BT) {

                const int gain = VAR_2->coup.gain[VAR_3][VAR_11];

                int shift, round, c, tmp;



                if (gain < 0) {

                    c = -cce_scale_fixed[-gain & 7];

                    shift = (-gain-1024) >> 3;

                }

                else {

                    c = cce_scale_fixed[gain & 7];

                    shift = (gain-1024) >> 3;

                }



                if (shift < -31) {

                    

                } else if (shift < 0) {

                    shift = -shift;

                    round = 1 << (shift - 1);



                    for (VAR_9 = 0; VAR_9 < ics->group_len[VAR_7]; VAR_9++) {

                        for (VAR_10 = VAR_4[VAR_8]; VAR_10 < VAR_4[VAR_8 + 1]; VAR_10++) {

                            tmp = (int)(((int64_t)VAR_6[VAR_9 * 128 + VAR_10] * c + \

                                       (int64_t)0x1000000000) >> 37);

                            VAR_5[VAR_9 * 128 + VAR_10] += (tmp + round) >> shift;

                        }

                    }

                }

                else {

                    for (VAR_9 = 0; VAR_9 < ics->group_len[VAR_7]; VAR_9++) {

                        for (VAR_10 = VAR_4[VAR_8]; VAR_10 < VAR_4[VAR_8 + 1]; VAR_10++) {

                            tmp = (int)(((int64_t)VAR_6[VAR_9 * 128 + VAR_10] * c + \

                                        (int64_t)0x1000000000) >> 37);

                            VAR_5[VAR_9 * 128 + VAR_10] += tmp << shift;

                        }

                    }

                }

            }

        }

        VAR_5 += ics->group_len[VAR_7] * 128;

        VAR_6  += ics->group_len[VAR_7] * 128;

    }

}

static void FUNC_0(AACContext *VAR_0,
SingleChannelElement *VAR_1,
ChannelElement *VAR_2, int VAR_3)
{ IndividualChannelStream *ics = &VAR_2->ch[0].ics; const uint16_t *VAR_4 = ics->swb_offset; int *VAR_5 = VAR_1->coeffs; const int *VAR_6 = VAR_2->ch[0].coeffs; int VAR_7, VAR_8, VAR_9, VAR_10, VAR_11 = 0; if (VAR_0->oc[1].m4ac.object_type == AOT_AAC_LTP) { av_log(VAR_0->avctx, AV_LOG_ERROR,
"Dependent coupling is not supported together with LTP\n"); return; } for (VAR_7 = 0; VAR_7 < ics->num_window_groups; VAR_7++) { for (VAR_8 = 0; VAR_8 < ics->max_sfb; VAR_8++, VAR_11++) { if (VAR_2->ch[0].band_type[VAR_11] != ZERO_BT) { const int gain = VAR_2->coup.gain[VAR_3][VAR_11]; int shift, round, c, tmp; if (gain < 0) { c = -cce_scale_fixed[-gain & 7]; shift = (-gain-1024) >> 3; } else { c = cce_scale_fixed[gain & 7]; shift = (gain-1024) >> 3; } if (shift < -31) { } else if (shift < 0) { shift = -shift; round = 1 << (shift - 1); for (VAR_9 = 0; VAR_9 < ics->group_len[VAR_7]; VAR_9++) { for (VAR_10 = VAR_4[VAR_8]; VAR_10 < VAR_4[VAR_8 + 1]; VAR_10++) { tmp = (int)(((int64_t)VAR_6[VAR_9 * 128 + VAR_10] * c + \
(int64_t)0x1000000000) >> 37); VAR_5[VAR_9 * 128 + VAR_10] += (tmp + round) >> shift; } } } else { for (VAR_9 = 0; VAR_9 < ics->group_len[VAR_7]; VAR_9++) { for (VAR_10 = VAR_4[VAR_8]; VAR_10 < VAR_4[VAR_8 + 1]; VAR_10++) { tmp = (int)(((int64_t)VAR_6[VAR_9 * 128 + VAR_10] * c + \
(int64_t)0x1000000000) >> 37); VAR_5[VAR_9 * 128 + VAR_10] += tmp << shift; } } } } } VAR_5 += ics->group_len[VAR_7] * 128; VAR_6  += ics->group_len[VAR_7] * 128; } }