static void expand_rle_row(unsigned char *optr, unsigned char *iptr, 

        int chan_offset, int pixelstride)

{

    unsigned char pixel, count;

 

#ifndef WORDS_BIGENDIAN

    /* rgba -> bgra for rgba32 on little endian cpus */

    if (pixelstride == 4 && chan_offset != 3) {

       chan_offset = 2 - chan_offset;

    }

#endif

        

    optr += chan_offset;



    while (1) {

        pixel = *iptr++;



        if (!(count = (pixel & 0x7f))) {

            return;

        }

        if (pixel & 0x80) {

            while (count--) {

                *optr = *iptr;

                optr += pixelstride;

                iptr++;

            }

        } else {

            pixel = *iptr++;



            while (count--) {

                *optr = pixel;

                optr += pixelstride;

            }

        }

    }

}

static void expand_rle_row(unsigned char *optr, unsigned char *iptr, 

        int chan_offset, int pixelstride)

{

    unsigned char pixel, count;

 

#ifndef WORDS_BIGENDIAN

    

    if (pixelstride == 4 && chan_offset != 3) {

       chan_offset = 2 - chan_offset;

    }

#endif

        

    optr += chan_offset;



    while (1) {

        pixel = *iptr++;



        if (!(count = (pixel & 0x7f))) {

            return;

        }

        if (pixel & 0x80) {

            while (count--) {

                *optr = *iptr;

                optr += pixelstride;

                iptr++;

            }

        } else {

            pixel = *iptr++;



            while (count--) {

                *optr = pixel;

                optr += pixelstride;

            }

        }

    }

}

static void expand_rle_row(unsigned char *optr, unsigned char *iptr,          pixel = *iptr++;                 *optr = *iptr;                 iptr++;             pixel = *iptr++;
static void FUNC_0(unsigned char *VAR_0, unsigned char *VAR_1, 

        int VAR_2, int VAR_3)

{

    unsigned char VAR_4, VAR_5;

 

#ifndef WORDS_BIGENDIAN

    

    if (VAR_3 == 4 && VAR_2 != 3) {

       VAR_2 = 2 - VAR_2;

    }

#endif

        

    VAR_0 += VAR_2;



    while (1) {

        VAR_4 = *VAR_1++;



        if (!(VAR_5 = (VAR_4 & 0x7f))) {

            return;

        }

        if (VAR_4 & 0x80) {

            while (VAR_5--) {

                *VAR_0 = *VAR_1;

                VAR_0 += VAR_3;

                VAR_1++;

            }

        } else {

            VAR_4 = *VAR_1++;



            while (VAR_5--) {

                *VAR_0 = VAR_4;

                VAR_0 += VAR_3;

            }

        }

    }

}

static void FUNC_0(unsigned char *VAR_0, unsigned char *VAR_1,
int VAR_2, int VAR_3)
{ unsigned char VAR_4, VAR_5; #ifndef WORDS_BIGENDIAN
if (VAR_3 == 4 && VAR_2 != 3) { VAR_2 = 2 - VAR_2; } #endif
VAR_0 += VAR_2; while (1) { VAR_4 = *VAR_1++; if (!(VAR_5 = (VAR_4 & 0x7f))) { return; } if (VAR_4 & 0x80) { while (VAR_5--) { *VAR_0 = *VAR_1; VAR_0 += VAR_3; VAR_1++; } } else { VAR_4 = *VAR_1++; while (VAR_5--) { *VAR_0 = VAR_4; VAR_0 += VAR_3; } } } }