static void read_sbr_channel_pair_element(AACContext *ac,

                                          SpectralBandReplication *sbr,

                                          GetBitContext *gb)

{

    if (get_bits1(gb))    // bs_data_extra

        skip_bits(gb, 8); // bs_reserved



    if ((sbr->bs_coupling = get_bits1(gb))) {

        read_sbr_grid(ac, sbr, gb, &sbr->data[0]);

        copy_sbr_grid(&sbr->data[1], &sbr->data[0]);

        read_sbr_dtdf(sbr, gb, &sbr->data[0]);

        read_sbr_dtdf(sbr, gb, &sbr->data[1]);

        read_sbr_invf(sbr, gb, &sbr->data[0]);

        memcpy(sbr->data[1].bs_invf_mode[1], sbr->data[1].bs_invf_mode[0], sizeof(sbr->data[1].bs_invf_mode[0]));

        memcpy(sbr->data[1].bs_invf_mode[0], sbr->data[0].bs_invf_mode[0], sizeof(sbr->data[1].bs_invf_mode[0]));

        read_sbr_envelope(sbr, gb, &sbr->data[0], 0);

        read_sbr_noise(sbr, gb, &sbr->data[0], 0);

        read_sbr_envelope(sbr, gb, &sbr->data[1], 1);

        read_sbr_noise(sbr, gb, &sbr->data[1], 1);

    } else {

        read_sbr_grid(ac, sbr, gb, &sbr->data[0]);

        read_sbr_grid(ac, sbr, gb, &sbr->data[1]);

        read_sbr_dtdf(sbr, gb, &sbr->data[0]);

        read_sbr_dtdf(sbr, gb, &sbr->data[1]);

        read_sbr_invf(sbr, gb, &sbr->data[0]);

        read_sbr_invf(sbr, gb, &sbr->data[1]);

        read_sbr_envelope(sbr, gb, &sbr->data[0], 0);

        read_sbr_envelope(sbr, gb, &sbr->data[1], 1);

        read_sbr_noise(sbr, gb, &sbr->data[0], 0);

        read_sbr_noise(sbr, gb, &sbr->data[1], 1);

    }



    if ((sbr->data[0].bs_add_harmonic_flag = get_bits1(gb)))

        get_bits1_vector(gb, sbr->data[0].bs_add_harmonic, sbr->n[1]);

    if ((sbr->data[1].bs_add_harmonic_flag = get_bits1(gb)))

        get_bits1_vector(gb, sbr->data[1].bs_add_harmonic, sbr->n[1]);

}

static void read_sbr_channel_pair_element(AACContext *ac,

                                          SpectralBandReplication *sbr,

                                          GetBitContext *gb)

{

    if (get_bits1(gb))    

        skip_bits(gb, 8); 



    if ((sbr->bs_coupling = get_bits1(gb))) {

        read_sbr_grid(ac, sbr, gb, &sbr->data[0]);

        copy_sbr_grid(&sbr->data[1], &sbr->data[0]);

        read_sbr_dtdf(sbr, gb, &sbr->data[0]);

        read_sbr_dtdf(sbr, gb, &sbr->data[1]);

        read_sbr_invf(sbr, gb, &sbr->data[0]);

        memcpy(sbr->data[1].bs_invf_mode[1], sbr->data[1].bs_invf_mode[0], sizeof(sbr->data[1].bs_invf_mode[0]));

        memcpy(sbr->data[1].bs_invf_mode[0], sbr->data[0].bs_invf_mode[0], sizeof(sbr->data[1].bs_invf_mode[0]));

        read_sbr_envelope(sbr, gb, &sbr->data[0], 0);

        read_sbr_noise(sbr, gb, &sbr->data[0], 0);

        read_sbr_envelope(sbr, gb, &sbr->data[1], 1);

        read_sbr_noise(sbr, gb, &sbr->data[1], 1);

    } else {

        read_sbr_grid(ac, sbr, gb, &sbr->data[0]);

        read_sbr_grid(ac, sbr, gb, &sbr->data[1]);

        read_sbr_dtdf(sbr, gb, &sbr->data[0]);

        read_sbr_dtdf(sbr, gb, &sbr->data[1]);

        read_sbr_invf(sbr, gb, &sbr->data[0]);

        read_sbr_invf(sbr, gb, &sbr->data[1]);

        read_sbr_envelope(sbr, gb, &sbr->data[0], 0);

        read_sbr_envelope(sbr, gb, &sbr->data[1], 1);

        read_sbr_noise(sbr, gb, &sbr->data[0], 0);

        read_sbr_noise(sbr, gb, &sbr->data[1], 1);

    }



    if ((sbr->data[0].bs_add_harmonic_flag = get_bits1(gb)))

        get_bits1_vector(gb, sbr->data[0].bs_add_harmonic, sbr->n[1]);

    if ((sbr->data[1].bs_add_harmonic_flag = get_bits1(gb)))

        get_bits1_vector(gb, sbr->data[1].bs_add_harmonic, sbr->n[1]);

}

static void read_sbr_channel_pair_element(AACContext *ac,         read_sbr_grid(ac, sbr, gb, &sbr->data[0]);         read_sbr_grid(ac, sbr, gb, &sbr->data[0]);         read_sbr_grid(ac, sbr, gb, &sbr->data[1]);
static void FUNC_0(AACContext *VAR_0,

                                          SpectralBandReplication *VAR_1,

                                          GetBitContext *VAR_2)

{

    if (get_bits1(VAR_2))    

        skip_bits(VAR_2, 8); 



    if ((VAR_1->bs_coupling = get_bits1(VAR_2))) {

        read_sbr_grid(VAR_0, VAR_1, VAR_2, &VAR_1->data[0]);

        copy_sbr_grid(&VAR_1->data[1], &VAR_1->data[0]);

        read_sbr_dtdf(VAR_1, VAR_2, &VAR_1->data[0]);

        read_sbr_dtdf(VAR_1, VAR_2, &VAR_1->data[1]);

        read_sbr_invf(VAR_1, VAR_2, &VAR_1->data[0]);

        memcpy(VAR_1->data[1].bs_invf_mode[1], VAR_1->data[1].bs_invf_mode[0], sizeof(VAR_1->data[1].bs_invf_mode[0]));

        memcpy(VAR_1->data[1].bs_invf_mode[0], VAR_1->data[0].bs_invf_mode[0], sizeof(VAR_1->data[1].bs_invf_mode[0]));

        read_sbr_envelope(VAR_1, VAR_2, &VAR_1->data[0], 0);

        read_sbr_noise(VAR_1, VAR_2, &VAR_1->data[0], 0);

        read_sbr_envelope(VAR_1, VAR_2, &VAR_1->data[1], 1);

        read_sbr_noise(VAR_1, VAR_2, &VAR_1->data[1], 1);

    } else {

        read_sbr_grid(VAR_0, VAR_1, VAR_2, &VAR_1->data[0]);

        read_sbr_grid(VAR_0, VAR_1, VAR_2, &VAR_1->data[1]);

        read_sbr_dtdf(VAR_1, VAR_2, &VAR_1->data[0]);

        read_sbr_dtdf(VAR_1, VAR_2, &VAR_1->data[1]);

        read_sbr_invf(VAR_1, VAR_2, &VAR_1->data[0]);

        read_sbr_invf(VAR_1, VAR_2, &VAR_1->data[1]);

        read_sbr_envelope(VAR_1, VAR_2, &VAR_1->data[0], 0);

        read_sbr_envelope(VAR_1, VAR_2, &VAR_1->data[1], 1);

        read_sbr_noise(VAR_1, VAR_2, &VAR_1->data[0], 0);

        read_sbr_noise(VAR_1, VAR_2, &VAR_1->data[1], 1);

    }



    if ((VAR_1->data[0].bs_add_harmonic_flag = get_bits1(VAR_2)))

        get_bits1_vector(VAR_2, VAR_1->data[0].bs_add_harmonic, VAR_1->n[1]);

    if ((VAR_1->data[1].bs_add_harmonic_flag = get_bits1(VAR_2)))

        get_bits1_vector(VAR_2, VAR_1->data[1].bs_add_harmonic, VAR_1->n[1]);

}

static void FUNC_0(AACContext *VAR_0,
SpectralBandReplication *VAR_1,
GetBitContext *VAR_2)
{ if (get_bits1(VAR_2))
skip_bits(VAR_2, 8); if ((VAR_1->bs_coupling = get_bits1(VAR_2))) { read_sbr_grid(VAR_0, VAR_1, VAR_2, &VAR_1->data[0]); copy_sbr_grid(&VAR_1->data[1], &VAR_1->data[0]); read_sbr_dtdf(VAR_1, VAR_2, &VAR_1->data[0]); read_sbr_dtdf(VAR_1, VAR_2, &VAR_1->data[1]); read_sbr_invf(VAR_1, VAR_2, &VAR_1->data[0]); memcpy(VAR_1->data[1].bs_invf_mode[1], VAR_1->data[1].bs_invf_mode[0], sizeof(VAR_1->data[1].bs_invf_mode[0])); memcpy(VAR_1->data[1].bs_invf_mode[0], VAR_1->data[0].bs_invf_mode[0], sizeof(VAR_1->data[1].bs_invf_mode[0])); read_sbr_envelope(VAR_1, VAR_2, &VAR_1->data[0], 0); read_sbr_noise(VAR_1, VAR_2, &VAR_1->data[0], 0); read_sbr_envelope(VAR_1, VAR_2, &VAR_1->data[1], 1); read_sbr_noise(VAR_1, VAR_2, &VAR_1->data[1], 1); } else { read_sbr_grid(VAR_0, VAR_1, VAR_2, &VAR_1->data[0]); read_sbr_grid(VAR_0, VAR_1, VAR_2, &VAR_1->data[1]); read_sbr_dtdf(VAR_1, VAR_2, &VAR_1->data[0]); read_sbr_dtdf(VAR_1, VAR_2, &VAR_1->data[1]); read_sbr_invf(VAR_1, VAR_2, &VAR_1->data[0]); read_sbr_invf(VAR_1, VAR_2, &VAR_1->data[1]); read_sbr_envelope(VAR_1, VAR_2, &VAR_1->data[0], 0); read_sbr_envelope(VAR_1, VAR_2, &VAR_1->data[1], 1); read_sbr_noise(VAR_1, VAR_2, &VAR_1->data[0], 0); read_sbr_noise(VAR_1, VAR_2, &VAR_1->data[1], 1); } if ((VAR_1->data[0].bs_add_harmonic_flag = get_bits1(VAR_2)))
get_bits1_vector(VAR_2, VAR_1->data[0].bs_add_harmonic, VAR_1->n[1]); if ((VAR_1->data[1].bs_add_harmonic_flag = get_bits1(VAR_2)))
get_bits1_vector(VAR_2, VAR_1->data[1].bs_add_harmonic, VAR_1->n[1]); }