static inline int op(uint8_t **dst, const uint8_t *dst_end,

                     const uint8_t **buf, const uint8_t *buf_end,

                     int pixel, int count,

                     int *x, int width, int linesize)

{

    int remaining = width - *x;

    while(count > 0) {

        int striplen = FFMIN(count, remaining);

        if (buf) {

            striplen = FFMIN(striplen, buf_end - *buf);

            if (*buf >= buf_end)

                goto exhausted;

            memcpy(*dst, *buf, striplen);

            *buf += striplen;

        } else if (pixel >= 0)

            memset(*dst, pixel, striplen);

        *dst      += striplen;

        remaining -= striplen;

        count     -= striplen;

        if (remaining <= 0) {

            *dst      += linesize - width;

            remaining  = width;

        }

        if (linesize > 0) {

            if (*dst >= dst_end) goto exhausted;

        } else {

            if (*dst <= dst_end) goto exhausted;

        }

    }

    *x = width - remaining;

    return 0;



exhausted:

    *x = width - remaining;

    return 1;

}

static inline int op(uint8_t **dst, const uint8_t *dst_end,

                     const uint8_t **buf, const uint8_t *buf_end,

                     int pixel, int count,

                     int *x, int width, int linesize)

{

    int remaining = width - *x;

    while(count > 0) {

        int striplen = FFMIN(count, remaining);

        if (buf) {

            striplen = FFMIN(striplen, buf_end - *buf);

            if (*buf >= buf_end)

                goto exhausted;

            memcpy(*dst, *buf, striplen);

            *buf += striplen;

        } else if (pixel >= 0)

            memset(*dst, pixel, striplen);

        *dst      += striplen;

        remaining -= striplen;

        count     -= striplen;

        if (remaining <= 0) {

            *dst      += linesize - width;

            remaining  = width;

        }

        if (linesize > 0) {

            if (*dst >= dst_end) goto exhausted;

        } else {

            if (*dst <= dst_end) goto exhausted;

        }

    }

    *x = width - remaining;

    return 0;



exhausted:

    *x = width - remaining;

    return 1;

}

                     const uint8_t **buf, const uint8_t *buf_end,         if (buf) {             striplen = FFMIN(striplen, buf_end - *buf);             if (*buf >= buf_end)             memcpy(*dst, *buf, striplen);             *buf += striplen;
static inline int FUNC_0(uint8_t **VAR_0, const uint8_t *VAR_1,

                     const uint8_t **VAR_2, const uint8_t *VAR_3,

                     int VAR_4, int VAR_5,

                     int *VAR_6, int VAR_7, int VAR_8)

{

    int VAR_9 = VAR_7 - *VAR_6;

    while(VAR_5 > 0) {

        int VAR_10 = FFMIN(VAR_5, VAR_9);

        if (VAR_2) {

            VAR_10 = FFMIN(VAR_10, VAR_3 - *VAR_2);

            if (*VAR_2 >= VAR_3)

                goto exhausted;

            memcpy(*VAR_0, *VAR_2, VAR_10);

            *VAR_2 += VAR_10;

        } else if (VAR_4 >= 0)

            memset(*VAR_0, VAR_4, VAR_10);

        *VAR_0      += VAR_10;

        VAR_9 -= VAR_10;

        VAR_5     -= VAR_10;

        if (VAR_9 <= 0) {

            *VAR_0      += VAR_8 - VAR_7;

            VAR_9  = VAR_7;

        }

        if (VAR_8 > 0) {

            if (*VAR_0 >= VAR_1) goto exhausted;

        } else {

            if (*VAR_0 <= VAR_1) goto exhausted;

        }

    }

    *VAR_6 = VAR_7 - VAR_9;

    return 0;



exhausted:

    *VAR_6 = VAR_7 - VAR_9;

    return 1;

}

static inline int FUNC_0(uint8_t **VAR_0, const uint8_t *VAR_1,
const uint8_t **VAR_2, const uint8_t *VAR_3,
int VAR_4, int VAR_5,
int *VAR_6, int VAR_7, int VAR_8)
{ int VAR_9 = VAR_7 - *VAR_6; while(VAR_5 > 0) { int VAR_10 = FFMIN(VAR_5, VAR_9); if (VAR_2) { VAR_10 = FFMIN(VAR_10, VAR_3 - *VAR_2); if (*VAR_2 >= VAR_3)
goto exhausted; memcpy(*VAR_0, *VAR_2, VAR_10); *VAR_2 += VAR_10; } else if (VAR_4 >= 0) memset(*VAR_0, VAR_4, VAR_10); *VAR_0      += VAR_10; VAR_9 -= VAR_10; VAR_5     -= VAR_10; if (VAR_9 <= 0) { *VAR_0      += VAR_8 - VAR_7; VAR_9  = VAR_7; } if (VAR_8 > 0) { if (*VAR_0 >= VAR_1) goto exhausted; } else { if (*VAR_0 <= VAR_1) goto exhausted; } } *VAR_6 = VAR_7 - VAR_9; return 0; exhausted:
*VAR_6 = VAR_7 - VAR_9; return 1; }