static int multiple_resample(ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed){

    int i, ret= -1;

    int av_unused mm_flags = av_get_cpu_flags();

    int need_emms = c->format == AV_SAMPLE_FMT_S16P && ARCH_X86_32 &&

                    (mm_flags & (AV_CPU_FLAG_MMX2 | AV_CPU_FLAG_SSE2)) == AV_CPU_FLAG_MMX2;

    int64_t max_src_size = (INT64_MAX/2 / c->phase_count) / c->src_incr;



    if (c->compensation_distance)

        dst_size = FFMIN(dst_size, c->compensation_distance);

    src_size = FFMIN(src_size, max_src_size);



    for(i=0; i<dst->ch_count; i++){

        ret= swri_resample(c, dst->ch[i], src->ch[i],

                           consumed, src_size, dst_size, i+1==dst->ch_count);

    }

    if(need_emms)

        emms_c();



    if (c->compensation_distance) {

        c->compensation_distance -= ret;

        if (!c->compensation_distance) {

            c->dst_incr     = c->ideal_dst_incr;

            c->dst_incr_div = c->dst_incr / c->src_incr;

            c->dst_incr_mod = c->dst_incr % c->src_incr;

        }

    }



    return ret;

}

static int multiple_resample(ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed){

    int i, ret= -1;

    int av_unused mm_flags = av_get_cpu_flags();

    int need_emms = c->format == AV_SAMPLE_FMT_S16P && ARCH_X86_32 &&

                    (mm_flags & (AV_CPU_FLAG_MMX2 | AV_CPU_FLAG_SSE2)) == AV_CPU_FLAG_MMX2;

    int64_t max_src_size = (INT64_MAX/2 / c->phase_count) / c->src_incr;



    if (c->compensation_distance)

        dst_size = FFMIN(dst_size, c->compensation_distance);

    src_size = FFMIN(src_size, max_src_size);



    for(i=0; i<dst->ch_count; i++){

        ret= swri_resample(c, dst->ch[i], src->ch[i],

                           consumed, src_size, dst_size, i+1==dst->ch_count);

    }

    if(need_emms)

        emms_c();



    if (c->compensation_distance) {

        c->compensation_distance -= ret;

        if (!c->compensation_distance) {

            c->dst_incr     = c->ideal_dst_incr;

            c->dst_incr_div = c->dst_incr / c->src_incr;

            c->dst_incr_mod = c->dst_incr % c->src_incr;

        }

    }



    return ret;

}

static int FUNC_0(ResampleContext *VAR_0, AudioData *VAR_1, int VAR_2, AudioData *VAR_3, int VAR_4, int *VAR_5){

    int VAR_6, VAR_7= -1;

    int VAR_8 mm_flags = av_get_cpu_flags();

    int VAR_9 = VAR_0->format == AV_SAMPLE_FMT_S16P && ARCH_X86_32 &&

                    (mm_flags & (AV_CPU_FLAG_MMX2 | AV_CPU_FLAG_SSE2)) == AV_CPU_FLAG_MMX2;

    int64_t max_src_size = (INT64_MAX/2 / VAR_0->phase_count) / VAR_0->src_incr;



    if (VAR_0->compensation_distance)

        VAR_2 = FFMIN(VAR_2, VAR_0->compensation_distance);

    VAR_4 = FFMIN(VAR_4, max_src_size);



    for(VAR_6=0; VAR_6<VAR_1->ch_count; VAR_6++){

        VAR_7= swri_resample(VAR_0, VAR_1->ch[VAR_6], VAR_3->ch[VAR_6],

                           VAR_5, VAR_4, VAR_2, VAR_6+1==VAR_1->ch_count);

    }

    if(VAR_9)

        emms_c();



    if (VAR_0->compensation_distance) {

        VAR_0->compensation_distance -= VAR_7;

        if (!VAR_0->compensation_distance) {

            VAR_0->dst_incr     = VAR_0->ideal_dst_incr;

            VAR_0->dst_incr_div = VAR_0->dst_incr / VAR_0->src_incr;

            VAR_0->dst_incr_mod = VAR_0->dst_incr % VAR_0->src_incr;

        }

    }



    return VAR_7;

}

static int FUNC_0(ResampleContext *VAR_0, AudioData *VAR_1, int VAR_2, AudioData *VAR_3, int VAR_4, int *VAR_5){ int VAR_6, VAR_7= -1; int VAR_8 mm_flags = av_get_cpu_flags(); int VAR_9 = VAR_0->format == AV_SAMPLE_FMT_S16P && ARCH_X86_32 &&
(mm_flags & (AV_CPU_FLAG_MMX2 | AV_CPU_FLAG_SSE2)) == AV_CPU_FLAG_MMX2; int64_t max_src_size = (INT64_MAX/2 / VAR_0->phase_count) / VAR_0->src_incr; if (VAR_0->compensation_distance)
VAR_2 = FFMIN(VAR_2, VAR_0->compensation_distance); VAR_4 = FFMIN(VAR_4, max_src_size); for(VAR_6=0; VAR_6<VAR_1->ch_count; VAR_6++){ VAR_7= swri_resample(VAR_0, VAR_1->ch[VAR_6], VAR_3->ch[VAR_6],
VAR_5, VAR_4, VAR_2, VAR_6+1==VAR_1->ch_count); } if(VAR_9)
emms_c(); if (VAR_0->compensation_distance) { VAR_0->compensation_distance -= VAR_7; if (!VAR_0->compensation_distance) { VAR_0->dst_incr     = VAR_0->ideal_dst_incr; VAR_0->dst_incr_div = VAR_0->dst_incr / VAR_0->src_incr; VAR_0->dst_incr_mod = VAR_0->dst_incr % VAR_0->src_incr; } } return VAR_7; }