static int decode_exp_vlc(WMACodecContext *s, int ch)

{

    int last_exp, n, code;

    const uint16_t *ptr;

    float v, max_scale;

    uint32_t *q, *q_end, iv;

    const float *ptab = pow_tab + 60;

    const uint32_t *iptab = (const uint32_t*)ptab;



    ptr = s->exponent_bands[s->frame_len_bits - s->block_len_bits];

    q = (uint32_t *)s->exponents[ch];

    q_end = q + s->block_len;

    max_scale = 0;

    if (s->version == 1) {

        last_exp = get_bits(&s->gb, 5) + 10;

        v = ptab[last_exp];

        iv = iptab[last_exp];

        max_scale = v;

        n = *ptr++;

        switch (n & 3) do {

        case 0: *q++ = iv;

        case 3: *q++ = iv;

        case 2: *q++ = iv;

        case 1: *q++ = iv;

        } while ((n -= 4) > 0);

    }else

        last_exp = 36;



    while (q < q_end) {

        code = get_vlc2(&s->gb, s->exp_vlc.table, EXPVLCBITS, EXPMAX);

        if (code < 0){

            av_log(s->avctx, AV_LOG_ERROR, "Exponent vlc invalid\n");

            return -1;

        }

        /* NOTE: this offset is the same as MPEG4 AAC ! */

        last_exp += code - 60;

        if ((unsigned)last_exp + 60 > FF_ARRAY_ELEMS(pow_tab)) {

            av_log(s->avctx, AV_LOG_ERROR, "Exponent out of range: %d\n",

                   last_exp);

            return -1;

        }

        v = ptab[last_exp];

        iv = iptab[last_exp];

        if (v > max_scale)

            max_scale = v;

        n = *ptr++;

        switch (n & 3) do {

        case 0: *q++ = iv;

        case 3: *q++ = iv;

        case 2: *q++ = iv;

        case 1: *q++ = iv;

        } while ((n -= 4) > 0);

    }

    s->max_exponent[ch] = max_scale;

    return 0;

}

static int decode_exp_vlc(WMACodecContext *s, int ch)

{

    int last_exp, n, code;

    const uint16_t *ptr;

    float v, max_scale;

    uint32_t *q, *q_end, iv;

    const float *ptab = pow_tab + 60;

    const uint32_t *iptab = (const uint32_t*)ptab;



    ptr = s->exponent_bands[s->frame_len_bits - s->block_len_bits];

    q = (uint32_t *)s->exponents[ch];

    q_end = q + s->block_len;

    max_scale = 0;

    if (s->version == 1) {

        last_exp = get_bits(&s->gb, 5) + 10;

        v = ptab[last_exp];

        iv = iptab[last_exp];

        max_scale = v;

        n = *ptr++;

        switch (n & 3) do {

        case 0: *q++ = iv;

        case 3: *q++ = iv;

        case 2: *q++ = iv;

        case 1: *q++ = iv;

        } while ((n -= 4) > 0);

    }else

        last_exp = 36;



    while (q < q_end) {

        code = get_vlc2(&s->gb, s->exp_vlc.table, EXPVLCBITS, EXPMAX);

        if (code < 0){

            av_log(s->avctx, AV_LOG_ERROR, "Exponent vlc invalid\n");

            return -1;

        }

        

        last_exp += code - 60;

        if ((unsigned)last_exp + 60 > FF_ARRAY_ELEMS(pow_tab)) {

            av_log(s->avctx, AV_LOG_ERROR, "Exponent out of range: %d\n",

                   last_exp);

            return -1;

        }

        v = ptab[last_exp];

        iv = iptab[last_exp];

        if (v > max_scale)

            max_scale = v;

        n = *ptr++;

        switch (n & 3) do {

        case 0: *q++ = iv;

        case 3: *q++ = iv;

        case 2: *q++ = iv;

        case 1: *q++ = iv;

        } while ((n -= 4) > 0);

    }

    s->max_exponent[ch] = max_scale;

    return 0;

}

        if ((unsigned)last_exp + 60 > FF_ARRAY_ELEMS(pow_tab)) {
static int FUNC_0(WMACodecContext *VAR_0, int VAR_1)

{

    int VAR_2, VAR_3, VAR_4;

    const uint16_t *VAR_5;

    float VAR_6, VAR_7;

    uint32_t *q, *q_end, iv;

    const float *VAR_8 = pow_tab + 60;

    const uint32_t *VAR_9 = (const uint32_t*)VAR_8;



    VAR_5 = VAR_0->exponent_bands[VAR_0->frame_len_bits - VAR_0->block_len_bits];

    q = (uint32_t *)VAR_0->exponents[VAR_1];

    q_end = q + VAR_0->block_len;

    VAR_7 = 0;

    if (VAR_0->version == 1) {

        VAR_2 = get_bits(&VAR_0->gb, 5) + 10;

        VAR_6 = VAR_8[VAR_2];

        iv = VAR_9[VAR_2];

        VAR_7 = VAR_6;

        VAR_3 = *VAR_5++;

        switch (VAR_3 & 3) do {

        case 0: *q++ = iv;

        case 3: *q++ = iv;

        case 2: *q++ = iv;

        case 1: *q++ = iv;

        } while ((VAR_3 -= 4) > 0);

    }else

        VAR_2 = 36;



    while (q < q_end) {

        VAR_4 = get_vlc2(&VAR_0->gb, VAR_0->exp_vlc.table, EXPVLCBITS, EXPMAX);

        if (VAR_4 < 0){

            av_log(VAR_0->avctx, AV_LOG_ERROR, "Exponent vlc invalid\VAR_3");

            return -1;

        }

        

        VAR_2 += VAR_4 - 60;

        if ((unsigned)VAR_2 + 60 > FF_ARRAY_ELEMS(pow_tab)) {

            av_log(VAR_0->avctx, AV_LOG_ERROR, "Exponent out of range: %d\VAR_3",

                   VAR_2);

            return -1;

        }

        VAR_6 = VAR_8[VAR_2];

        iv = VAR_9[VAR_2];

        if (VAR_6 > VAR_7)

            VAR_7 = VAR_6;

        VAR_3 = *VAR_5++;

        switch (VAR_3 & 3) do {

        case 0: *q++ = iv;

        case 3: *q++ = iv;

        case 2: *q++ = iv;

        case 1: *q++ = iv;

        } while ((VAR_3 -= 4) > 0);

    }

    VAR_0->max_exponent[VAR_1] = VAR_7;

    return 0;

}

static int FUNC_0(WMACodecContext *VAR_0, int VAR_1)
{ int VAR_2, VAR_3, VAR_4; const uint16_t *VAR_5; float VAR_6, VAR_7; uint32_t *q, *q_end, iv; const float *VAR_8 = pow_tab + 60; const uint32_t *VAR_9 = (const uint32_t*)VAR_8; VAR_5 = VAR_0->exponent_bands[VAR_0->frame_len_bits - VAR_0->block_len_bits]; q = (uint32_t *)VAR_0->exponents[VAR_1]; q_end = q + VAR_0->block_len; VAR_7 = 0; if (VAR_0->version == 1) { VAR_2 = get_bits(&VAR_0->gb, 5) + 10; VAR_6 = VAR_8[VAR_2]; iv = VAR_9[VAR_2]; VAR_7 = VAR_6; VAR_3 = *VAR_5++; switch (VAR_3 & 3) do { case 0: *q++ = iv; case 3: *q++ = iv; case 2: *q++ = iv; case 1: *q++ = iv; } while ((VAR_3 -= 4) > 0); }else VAR_2 = 36; while (q < q_end) { VAR_4 = get_vlc2(&VAR_0->gb, VAR_0->exp_vlc.table, EXPVLCBITS, EXPMAX); if (VAR_4 < 0){ av_log(VAR_0->avctx, AV_LOG_ERROR, "Exponent vlc invalid\VAR_3"); return -1; } VAR_2 += VAR_4 - 60; if ((unsigned)VAR_2 + 60 > FF_ARRAY_ELEMS(pow_tab)) { av_log(VAR_0->avctx, AV_LOG_ERROR, "Exponent out of range: %d\VAR_3",
VAR_2); return -1; } VAR_6 = VAR_8[VAR_2]; iv = VAR_9[VAR_2]; if (VAR_6 > VAR_7)
VAR_7 = VAR_6; VAR_3 = *VAR_5++; switch (VAR_3 & 3) do { case 0: *q++ = iv; case 3: *q++ = iv; case 2: *q++ = iv; case 1: *q++ = iv; } while ((VAR_3 -= 4) > 0); } VAR_0->max_exponent[VAR_1] = VAR_7; return 0; }