static void cin_decode_rle(const unsigned char *src, int src_size,

                           unsigned char *dst, int dst_size)

{

    int len, code;

    unsigned char *dst_end       = dst + dst_size;

    const unsigned char *src_end = src + src_size;



    while (src < src_end && dst < dst_end) {

        code = *src++;

        if (code & 0x80) {

            len = code - 0x7F;

            memset(dst, *src++, FFMIN(len, dst_end - dst));

        } else {

            len = code + 1;

            memcpy(dst, src, FFMIN(len, dst_end - dst));

            src += len;

        }

        dst += len;

    }

}

static void cin_decode_rle(const unsigned char *src, int src_size,

                           unsigned char *dst, int dst_size)

{

    int len, code;

    unsigned char *dst_end       = dst + dst_size;

    const unsigned char *src_end = src + src_size;



    while (src < src_end && dst < dst_end) {

        code = *src++;

        if (code & 0x80) {

            len = code - 0x7F;

            memset(dst, *src++, FFMIN(len, dst_end - dst));

        } else {

            len = code + 1;

            memcpy(dst, src, FFMIN(len, dst_end - dst));

            src += len;

        }

        dst += len;

    }

}

static void FUNC_0(const unsigned char *VAR_0, int VAR_1,

                           unsigned char *VAR_2, int VAR_3)

{

    int VAR_4, VAR_5;

    unsigned char *VAR_6       = VAR_2 + VAR_3;

    const unsigned char *VAR_7 = VAR_0 + VAR_1;



    while (VAR_0 < VAR_7 && VAR_2 < VAR_6) {

        VAR_5 = *VAR_0++;

        if (VAR_5 & 0x80) {

            VAR_4 = VAR_5 - 0x7F;

            memset(VAR_2, *VAR_0++, FFMIN(VAR_4, VAR_6 - VAR_2));

        } else {

            VAR_4 = VAR_5 + 1;

            memcpy(VAR_2, VAR_0, FFMIN(VAR_4, VAR_6 - VAR_2));

            VAR_0 += VAR_4;

        }

        VAR_2 += VAR_4;

    }

}

static void FUNC_0(const unsigned char *VAR_0, int VAR_1,
unsigned char *VAR_2, int VAR_3)
{ int VAR_4, VAR_5; unsigned char *VAR_6       = VAR_2 + VAR_3; const unsigned char *VAR_7 = VAR_0 + VAR_1; while (VAR_0 < VAR_7 && VAR_2 < VAR_6) { VAR_5 = *VAR_0++; if (VAR_5 & 0x80) { VAR_4 = VAR_5 - 0x7F; memset(VAR_2, *VAR_0++, FFMIN(VAR_4, VAR_6 - VAR_2)); } else { VAR_4 = VAR_5 + 1; memcpy(VAR_2, VAR_0, FFMIN(VAR_4, VAR_6 - VAR_2)); VAR_0 += VAR_4; } VAR_2 += VAR_4; } }