void ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,

                   AVFilterPad **pads, AVFilterLink ***links,

                   AVFilterPad *newpad)

{

    unsigned i;



    idx = FFMIN(idx, *count);



    *pads  = av_realloc(*pads,  sizeof(AVFilterPad)   * (*count + 1));

    *links = av_realloc(*links, sizeof(AVFilterLink*) * (*count + 1));

    memmove(*pads  + idx + 1, *pads  + idx, sizeof(AVFilterPad)   * (*count - idx));

    memmove(*links + idx + 1, *links + idx, sizeof(AVFilterLink*) * (*count - idx));

    memcpy(*pads + idx, newpad, sizeof(AVFilterPad));

    (*links)[idx] = NULL;



    (*count)++;

    for (i = idx + 1; i < *count; i++)

        if (*links[i])

            (*(unsigned *)((uint8_t *) *links[i] + padidx_off))++;

}

void ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,

                   AVFilterPad **pads, AVFilterLink ***links,

                   AVFilterPad *newpad)

{

    unsigned i;



    idx = FFMIN(idx, *count);



    *pads  = av_realloc(*pads,  sizeof(AVFilterPad)   * (*count + 1));

    *links = av_realloc(*links, sizeof(AVFilterLink*) * (*count + 1));

    memmove(*pads  + idx + 1, *pads  + idx, sizeof(AVFilterPad)   * (*count - idx));

    memmove(*links + idx + 1, *links + idx, sizeof(AVFilterLink*) * (*count - idx));

    memcpy(*pads + idx, newpad, sizeof(AVFilterPad));

    (*links)[idx] = NULL;



    (*count)++;

    for (i = idx + 1; i < *count; i++)

        if (*links[i])

            (*(unsigned *)((uint8_t *) *links[i] + padidx_off))++;

}

void ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,     *pads  = av_realloc(*pads,  sizeof(AVFilterPad)   * (*count + 1));     *links = av_realloc(*links, sizeof(AVFilterLink*) * (*count + 1)); void ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,
void FUNC_0(unsigned VAR_0, unsigned *VAR_1, size_t VAR_2,

                   AVFilterPad **VAR_3, AVFilterLink ***VAR_4,

                   AVFilterPad *VAR_5)

{

    unsigned VAR_6;



    VAR_0 = FFMIN(VAR_0, *VAR_1);



    *VAR_3  = av_realloc(*VAR_3,  sizeof(AVFilterPad)   * (*VAR_1 + 1));

    *VAR_4 = av_realloc(*VAR_4, sizeof(AVFilterLink*) * (*VAR_1 + 1));

    memmove(*VAR_3  + VAR_0 + 1, *VAR_3  + VAR_0, sizeof(AVFilterPad)   * (*VAR_1 - VAR_0));

    memmove(*VAR_4 + VAR_0 + 1, *VAR_4 + VAR_0, sizeof(AVFilterLink*) * (*VAR_1 - VAR_0));

    memcpy(*VAR_3 + VAR_0, VAR_5, sizeof(AVFilterPad));

    (*VAR_4)[VAR_0] = NULL;



    (*VAR_1)++;

    for (VAR_6 = VAR_0 + 1; VAR_6 < *VAR_1; VAR_6++)

        if (*VAR_4[VAR_6])

            (*(unsigned *)((uint8_t *) *VAR_4[VAR_6] + VAR_2))++;

}

void FUNC_0(unsigned VAR_0, unsigned *VAR_1, size_t VAR_2,
AVFilterPad **VAR_3, AVFilterLink ***VAR_4,
AVFilterPad *VAR_5)
{ unsigned VAR_6; VAR_0 = FFMIN(VAR_0, *VAR_1); *VAR_3  = av_realloc(*VAR_3,  sizeof(AVFilterPad)   * (*VAR_1 + 1)); *VAR_4 = av_realloc(*VAR_4, sizeof(AVFilterLink*) * (*VAR_1 + 1)); memmove(*VAR_3  + VAR_0 + 1, *VAR_3  + VAR_0, sizeof(AVFilterPad)   * (*VAR_1 - VAR_0)); memmove(*VAR_4 + VAR_0 + 1, *VAR_4 + VAR_0, sizeof(AVFilterLink*) * (*VAR_1 - VAR_0)); memcpy(*VAR_3 + VAR_0, VAR_5, sizeof(AVFilterPad)); (*VAR_4)[VAR_0] = NULL; (*VAR_1)++; for (VAR_6 = VAR_0 + 1; VAR_6 < *VAR_1; VAR_6++) if (*VAR_4[VAR_6])
(*(unsigned *)((uint8_t *) *VAR_4[VAR_6] + VAR_2))++; }