static inline int GetCode(GifState * s)

{

    int c, sizbuf;

    uint8_t *ptr;



    while (s->bbits < s->cursize) {

        ptr = s->pbuf;

        if (ptr >= s->ebuf) {

            if (!s->eob_reached) {

                sizbuf = get_byte(s->f);

                s->ebuf = s->buf + sizbuf;

                s->pbuf = s->buf;

                if (sizbuf > 0) {

                    get_buffer(s->f, s->buf, sizbuf);

                } else {

                    s->eob_reached = 1;

                }

            }

            ptr = s->pbuf;

        }

        s->bbuf |= ptr[0] << s->bbits;

        ptr++;

        s->pbuf = ptr;

        s->bbits += 8;

    }

    c = s->bbuf & s->curmask;

    s->bbuf >>= s->cursize;

    s->bbits -= s->cursize;

    return c;

}

static inline int GetCode(GifState * s)

{

    int c, sizbuf;

    uint8_t *ptr;



    while (s->bbits < s->cursize) {

        ptr = s->pbuf;

        if (ptr >= s->ebuf) {

            if (!s->eob_reached) {

                sizbuf = get_byte(s->f);

                s->ebuf = s->buf + sizbuf;

                s->pbuf = s->buf;

                if (sizbuf > 0) {

                    get_buffer(s->f, s->buf, sizbuf);

                } else {

                    s->eob_reached = 1;

                }

            }

            ptr = s->pbuf;

        }

        s->bbuf |= ptr[0] << s->bbits;

        ptr++;

        s->pbuf = ptr;

        s->bbits += 8;

    }

    c = s->bbuf & s->curmask;

    s->bbuf >>= s->cursize;

    s->bbits -= s->cursize;

    return c;

}

static inline int GetCode(GifState * s)     int c, sizbuf;     uint8_t *ptr;     while (s->bbits < s->cursize) {         ptr = s->pbuf;         if (ptr >= s->ebuf) {             if (!s->eob_reached) {                 sizbuf = get_byte(s->f);                 s->ebuf = s->buf + sizbuf;                 s->pbuf = s->buf;                 if (sizbuf > 0) {                     get_buffer(s->f, s->buf, sizbuf);                 } else {                     s->eob_reached = 1;             ptr = s->pbuf;         s->bbuf |= ptr[0] << s->bbits;         ptr++;         s->pbuf = ptr;         s->bbits += 8;     c = s->bbuf & s->curmask;     s->bbuf >>= s->cursize;     s->bbits -= s->cursize;     return c;
static inline int FUNC_0(GifState * VAR_0)

{

    int VAR_1, VAR_2;

    uint8_t *ptr;



    while (VAR_0->bbits < VAR_0->cursize) {

        ptr = VAR_0->pbuf;

        if (ptr >= VAR_0->ebuf) {

            if (!VAR_0->eob_reached) {

                VAR_2 = get_byte(VAR_0->f);

                VAR_0->ebuf = VAR_0->buf + VAR_2;

                VAR_0->pbuf = VAR_0->buf;

                if (VAR_2 > 0) {

                    get_buffer(VAR_0->f, VAR_0->buf, VAR_2);

                } else {

                    VAR_0->eob_reached = 1;

                }

            }

            ptr = VAR_0->pbuf;

        }

        VAR_0->bbuf |= ptr[0] << VAR_0->bbits;

        ptr++;

        VAR_0->pbuf = ptr;

        VAR_0->bbits += 8;

    }

    VAR_1 = VAR_0->bbuf & VAR_0->curmask;

    VAR_0->bbuf >>= VAR_0->cursize;

    VAR_0->bbits -= VAR_0->cursize;

    return VAR_1;

}

static inline int FUNC_0(GifState * VAR_0)
{ int VAR_1, VAR_2; uint8_t *ptr; while (VAR_0->bbits < VAR_0->cursize) { ptr = VAR_0->pbuf; if (ptr >= VAR_0->ebuf) { if (!VAR_0->eob_reached) { VAR_2 = get_byte(VAR_0->f); VAR_0->ebuf = VAR_0->buf + VAR_2; VAR_0->pbuf = VAR_0->buf; if (VAR_2 > 0) { get_buffer(VAR_0->f, VAR_0->buf, VAR_2); } else { VAR_0->eob_reached = 1; } } ptr = VAR_0->pbuf; } VAR_0->bbuf |= ptr[0] << VAR_0->bbits; ptr++; VAR_0->pbuf = ptr; VAR_0->bbits += 8; } VAR_1 = VAR_0->bbuf & VAR_0->curmask; VAR_0->bbuf >>= VAR_0->cursize; VAR_0->bbits -= VAR_0->cursize; return VAR_1; }