static int read_sbr_single_channel_element(AACContext *ac,

                                            SpectralBandReplication *sbr,

                                            GetBitContext *gb)

{

    int ret;



    if (get_bits1(gb)) // bs_data_extra

        skip_bits(gb, 4); // bs_reserved



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

        return -1;

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

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

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

    if((ret = read_sbr_noise(ac, sbr, gb, &sbr->data[0], 0)) < 0)

        return ret;



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

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



    return 0;

}

static int read_sbr_single_channel_element(AACContext *ac,

                                            SpectralBandReplication *sbr,

                                            GetBitContext *gb)

{

    int ret;



    if (get_bits1(gb)) 

        skip_bits(gb, 4); 



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

        return -1;

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

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

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

    if((ret = read_sbr_noise(ac, sbr, gb, &sbr->data[0], 0)) < 0)

        return ret;



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

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



    return 0;

}

static int FUNC_0(AACContext *VAR_0,

                                            SpectralBandReplication *VAR_1,

                                            GetBitContext *VAR_2)

{

    int VAR_3;



    if (get_bits1(VAR_2)) 

        skip_bits(VAR_2, 4); 



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

        return -1;

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

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

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

    if((VAR_3 = read_sbr_noise(VAR_0, VAR_1, VAR_2, &VAR_1->data[0], 0)) < 0)

        return VAR_3;



    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]);



    return 0;

}

static int FUNC_0(AACContext *VAR_0,
SpectralBandReplication *VAR_1,
GetBitContext *VAR_2)
{ int VAR_3; if (get_bits1(VAR_2))
skip_bits(VAR_2, 4); if (read_sbr_grid(VAR_0, VAR_1, VAR_2, &VAR_1->data[0]))
return -1; read_sbr_dtdf(VAR_1, VAR_2, &VAR_1->data[0]); read_sbr_invf(VAR_1, VAR_2, &VAR_1->data[0]); read_sbr_envelope(VAR_1, VAR_2, &VAR_1->data[0], 0); if((VAR_3 = read_sbr_noise(VAR_0, VAR_1, VAR_2, &VAR_1->data[0], 0)) < 0)
return VAR_3; 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]); return 0; }