// File: tomfunkhouser[P]gaps/pkgs/png/inffast.c
// Function: inflate_fast
void ZLIB_INTERNAL inflate_fast(strm, start)
z_streamp strm;
unsigned start;         /* inflate()'s starting value for strm->avail_out */
{
    struct inflate_state FAR *state;
    unsigned char FAR *in;      /* local strm->next_in */
    unsigned char FAR *last;    /* while in < last, enough input available */
    unsigned char FAR *out;     /* local strm->next_out */
    unsigned char FAR *beg;     /* inflate()'s initial strm->next_out */
    unsigned char FAR *end;     /* while out < end, enough space available */
#ifdef INFLATE_STRICT
    unsigned dmax;              /* maximum distance from zlib header */
#endif
    unsigned wsize;             /* window size or zero if not using window */
    unsigned whave;             /* valid bytes in the window */
    unsigned wnext;             /* window write index */
    unsigned char FAR *window;  /* allocated sliding window, if wsize != 0 */
    unsigned long hold;         /* local strm->hold */
    unsigned bits;              /* local strm->bits */
    code const FAR *lcode;      /* local strm->lencode */
    code const FAR *dcode;      /* local strm->distcode */
    unsigned lmask;             /* mask for first level of length codes */
    unsigned dmask;             /* mask for first level of distance codes */
    code here;                  /* retrieved table entry */
    unsigned op;                /* code bits, operation, extra bits, or */
                                /*  window position, window bytes to copy */
    unsigned len;               /* match length, unused bytes */
    unsigned dist;              /* match distance */
    unsigned char FAR *from;    /* where to copy match from */

    /* copy state to local variables */
    state = (struct inflate_state FAR *)strm->state;
    in = strm->next_in - OFF;
    last = in + (strm->avail_in - 5);
    out = strm->next_out - OFF;
    beg = out - (start - strm->avail_out);
    end = out + (strm->avail_out - 257);
#ifdef INFLATE_STRICT
    dmax = state->dmax;
#endif
    wsize = state->wsize;
    whave = state->whave;
    wnext = state->wnext;
    window = state->window;
    hold = state->hold;
    bits = state->bits;
    lcode = state->lencode;
    dcode = state->distcode;
    lmask = (1U << state->lenbits) - 1;
    dmask = (1U << state->distbits) - 1;

    /* decode literals and length/distances until end-of-block or not enough
       input data or output space */
    do {
        if (bits < 15) {
            hold += (unsigned long)(PUP(in)) << bits;
            bits += 8;
            hold += (unsigned long)(PUP(in)) << bits;
            bits += 8;
        }
        here = lcode[hold & lmask];
      dolen:
        op = (unsigned)(here.bits);
        hold >>= op;
        bits -= op;
        op = (unsigned)(here.op);
        if (op == 0) {                          /* literal */
            Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
                    "inflate:         literal '%c'\n" :
                    "inflate:         literal 0x%02x\n", here.val));
            PUP(out) = (unsigned char)(here.val);
        }
        else if (op & 16) {                     /* length base */
            len = (unsigned)(here.val);
            op &= 15;                           /* number of extra bits */
            if (op) {
                if (bits < op) {
                    hold += (unsigned long)(PUP(in)) << bits;
                    bits += 8;
                }
                len += (unsigned)hold & ((1U << op) - 1);
                hold >>= op;
                bits -= op;
            }
            Tracevv((stderr, "inflate:         length %u\n", len));
            if (bits < 15) {
                hold += (unsigned long)(PUP(in)) << bits;
                bits += 8;
                hold += (unsigned long)(PUP(in)) << bits;
                bits += 8;
            }
            here = dcode[hold & dmask];
          dodist:
            op = (unsigned)(here.bits);
            hold >>= op;
            bits -= op;
            op = (unsigned)(here.op);
            if (op & 16) {                      /* distance base */
                dist = (unsigned)(here.val);
                op &= 15;                       /* number of extra bits */
                if (bits < op) {
                    hold += (unsigned long)(PUP(in)) << bits;
                    bits += 8;
                    if (bits < op) {
                        hold += (unsigned long)(PUP(in)) << bits;
                        bits += 8;
                    }
                }
                dist += (unsigned)hold & ((1U << op) - 1);
#ifdef INFLATE_STRICT
                if (dist > dmax) {
                    strm->msg = (char *)"invalid distance too far back";
                    state->mode = BAD;
                    break;
                }
#endif
                hold >>= op;
                bits -= op;
                Tracevv((stderr, "inflate:         distance %u\n", dist));
                op = (unsigned)(out - beg);     /* max distance in output */
                if (dist > op) {                /* see if copy from window */
                    op = dist - op;             /* distance back in window */
                    if (op > whave) {
                        if (state->sane) {
                            strm->msg =
                                (char *)"invalid distance too far back";
                            state->mode = BAD;
                            break;
                        }
#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
                        if (len <= op - whave) {
                            do {
                                PUP(out) = 0;
                            } while (--len);
                            continue;
                        }
                        len -= op - whave;
                        do {
                            PUP(out) = 0;
                        } while (--op > whave);
                        if (op == 0) {
                            from = out - dist;
                            do {
                                PUP(out) = PUP(from);
                            } while (--len);
                            continue;
                        }
#endif
                    }
                    from = window - OFF;
                    if (wnext == 0) {           /* very common case */
                        from += wsize - op;
                        if (op < len) {         /* some from window */
                            len -= op;
                            do {
                                PUP(out) = PUP(from);
                            } while (--op);
                            from = out - dist;  /* rest from output */
                        }
                    }
                    else if (wnext < op) {      /* wrap around window */
                        from += wsize + wnext - op;
                        op -= wnext;
                        if (op < len) {         /* some from end of window */
                            len -= op;
                            do {
                                PUP(out) = PUP(from);
                            } while (--op);
                            from = window - OFF;
                            if (wnext < len) {  /* some from start of window */
                                op = wnext;
                                len -= op;
                                do {
                                    PUP(out) = PUP(from);
                                } while (--op);
                                from = out - dist;      /* rest from output */
                            }
                        }
                    }
                    else {                      /* contiguous in window */
                        from += wnext - op;
                        if (op < len) {         /* some from window */
                            len -= op;
                            do {
                                PUP(out) = PUP(from);
                            } while (--op);
                            from = out - dist;  /* rest from output */
                        }
                    }
                    while (len > 2) {
                        PUP(out) = PUP(from);
                        PUP(out) = PUP(from);
                        PUP(out) = PUP(from);
                        len -= 3;
                    }
                    if (len) {
                        PUP(out) = PUP(from);
                        if (len > 1)
                            PUP(out) = PUP(from);
                    }
                }
                else {
                    from = out - dist;          /* copy direct from output */
                    do {                        /* minimum length is three */
                        PUP(out) = PUP(from);
                        PUP(out) = PUP(from);
                        PUP(out) = PUP(from);
                        len -= 3;
                    } while (len > 2);
                    if (len) {
                        PUP(out) = PUP(from);
                        if (len > 1)
                            PUP(out) = PUP(from);
                    }
                }
            }
            else if ((op & 64) == 0) {          /* 2nd level distance code */
                here = dcode[here.val + (hold & ((1U << op) - 1))];
                goto dodist;
            }
            else {
                strm->msg = (char *)"invalid distance code";
                state->mode = BAD;
                break;
            }
        }
        else if ((op & 64) == 0) {              /* 2nd level length code */
            here = lcode[here.val + (hold & ((1U << op) - 1))];
            goto dolen;
        }
        else if (op & 32) {                     /* end-of-block */
            Tracevv((stderr, "inflate:         end of block\n"));
            state->mode = TYPE;
            break;
        }
        else {
            strm->msg = (char *)"invalid literal/length code";
            state->mode = BAD;
            break;
        }
    } while (in < last && out < end);

    /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
    len = bits >> 3;
    in -= len;
    bits -= len << 3;
    hold &= (1U << bits) - 1;

    /* update state and return */
    strm->next_in = in + OFF;
    strm->next_out = out + OFF;
    strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
    strm->avail_out = (unsigned)(out < end ?
                                 257 + (end - out) : 257 - (out - end));
    state->hold = hold;
    state->bits = bits;
    return;
}

// Assembly:
subq $0x40, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x38(%rsp), %rcx
movl 0x8(%rcx), %ecx
subl $0x5, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq 0x18(%rax), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movl 0x34(%rsp), %ecx
movq 0x38(%rsp), %rdx
subl 0x20(%rdx), %ecx
movl %ecx, %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x38(%rsp), %rcx
movl 0x20(%rcx), %ecx
subl $0x101, %ecx            # imm = 0x101
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x4(%rsp)
movq 0x28(%rsp), %rax
movl 0x38(%rax), %eax
movl %eax, -0x8(%rsp)
movq 0x28(%rsp), %rax
movl 0x3c(%rax), %eax
movl %eax, -0xc(%rsp)
movq 0x28(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rsp)
movq 0x28(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x20(%rsp)
movq 0x28(%rsp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x24(%rsp)
movq 0x28(%rsp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x30(%rsp)
movq 0x28(%rsp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x38(%rsp)
movq 0x28(%rsp), %rax
movl 0x70(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x3c(%rsp)
movq 0x28(%rsp), %rax
movl 0x74(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x40(%rsp)
cmpl $0xf, -0x24(%rsp)
jae 0x131df3
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rsp)
movzbl 0x1(%rax), %eax
movl -0x24(%rsp), %ecx
shlq %cl, %rax
addq -0x20(%rsp), %rax
movq %rax, -0x20(%rsp)
movl -0x24(%rsp), %eax
addl $0x8, %eax
movl %eax, -0x24(%rsp)
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rsp)
movzbl 0x1(%rax), %eax
movl -0x24(%rsp), %ecx
shlq %cl, %rax
addq -0x20(%rsp), %rax
movq %rax, -0x20(%rsp)
movl -0x24(%rsp), %eax
addl $0x8, %eax
movl %eax, -0x24(%rsp)
movq -0x30(%rsp), %rax
movq -0x20(%rsp), %rcx
movl -0x3c(%rsp), %edx
andq %rdx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rsp)
movzbl -0x43(%rsp), %eax
movl %eax, -0x48(%rsp)
movl -0x48(%rsp), %ecx
movq -0x20(%rsp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x20(%rsp)
movl -0x48(%rsp), %ecx
movl -0x24(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rsp)
movzbl -0x44(%rsp), %eax
movl %eax, -0x48(%rsp)
cmpl $0x0, -0x48(%rsp)
jne 0x131e65
movw -0x42(%rsp), %ax
movb %al, %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
jmp 0x13261c
movl -0x48(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x13259d
movzwl -0x42(%rsp), %eax
movl %eax, -0x4c(%rsp)
movl -0x48(%rsp), %eax
andl $0xf, %eax
movl %eax, -0x48(%rsp)
cmpl $0x0, -0x48(%rsp)
je 0x131f0b
movl -0x24(%rsp), %eax
cmpl -0x48(%rsp), %eax
jae 0x131ecb
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rsp)
movzbl 0x1(%rax), %eax
movl -0x24(%rsp), %ecx
shlq %cl, %rax
addq -0x20(%rsp), %rax
movq %rax, -0x20(%rsp)
movl -0x24(%rsp), %eax
addl $0x8, %eax
movl %eax, -0x24(%rsp)
movq -0x20(%rsp), %rax
movl -0x48(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
addl -0x4c(%rsp), %eax
movl %eax, -0x4c(%rsp)
movl -0x48(%rsp), %ecx
movq -0x20(%rsp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x20(%rsp)
movl -0x48(%rsp), %ecx
movl -0x24(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rsp)
cmpl $0xf, -0x24(%rsp)
jae 0x131f74
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rsp)
movzbl 0x1(%rax), %eax
movl -0x24(%rsp), %ecx
shlq %cl, %rax
addq -0x20(%rsp), %rax
movq %rax, -0x20(%rsp)
movl -0x24(%rsp), %eax
addl $0x8, %eax
movl %eax, -0x24(%rsp)
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rsp)
movzbl 0x1(%rax), %eax
movl -0x24(%rsp), %ecx
shlq %cl, %rax
addq -0x20(%rsp), %rax
movq %rax, -0x20(%rsp)
movl -0x24(%rsp), %eax
addl $0x8, %eax
movl %eax, -0x24(%rsp)
movq -0x38(%rsp), %rax
movq -0x20(%rsp), %rcx
movl -0x40(%rsp), %edx
andq %rdx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rsp)
movzbl -0x43(%rsp), %eax
movl %eax, -0x48(%rsp)
movl -0x48(%rsp), %ecx
movq -0x20(%rsp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x20(%rsp)
movl -0x48(%rsp), %ecx
movl -0x24(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rsp)
movzbl -0x44(%rsp), %eax
movl %eax, -0x48(%rsp)
movl -0x48(%rsp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x132534
movzwl -0x42(%rsp), %eax
movl %eax, -0x50(%rsp)
movl -0x48(%rsp), %eax
andl $0xf, %eax
movl %eax, -0x48(%rsp)
movl -0x24(%rsp), %eax
cmpl -0x48(%rsp), %eax
jae 0x13205b
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rsp)
movzbl 0x1(%rax), %eax
movl -0x24(%rsp), %ecx
shlq %cl, %rax
addq -0x20(%rsp), %rax
movq %rax, -0x20(%rsp)
movl -0x24(%rsp), %eax
addl $0x8, %eax
movl %eax, -0x24(%rsp)
movl -0x24(%rsp), %eax
cmpl -0x48(%rsp), %eax
jae 0x132059
movq 0x20(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x20(%rsp)
movzbl 0x1(%rax), %eax
movl -0x24(%rsp), %ecx
shlq %cl, %rax
addq -0x20(%rsp), %rax
movq %rax, -0x20(%rsp)
movl -0x24(%rsp), %eax
addl $0x8, %eax
movl %eax, -0x24(%rsp)
jmp 0x13205b
movq -0x20(%rsp), %rax
movl -0x48(%rsp), %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
andl %ecx, %eax
addl -0x50(%rsp), %eax
movl %eax, -0x50(%rsp)
movl -0x48(%rsp), %ecx
movq -0x20(%rsp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x20(%rsp)
movl -0x48(%rsp), %ecx
movl -0x24(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rcx, %rax
movl %eax, -0x48(%rsp)
movl -0x50(%rsp), %eax
cmpl -0x48(%rsp), %eax
jbe 0x13242a
movl -0x50(%rsp), %eax
subl -0x48(%rsp), %eax
movl %eax, -0x48(%rsp)
movl -0x48(%rsp), %eax
cmpl -0x8(%rsp), %eax
jbe 0x132100
movq 0x28(%rsp), %rax
cmpl $0x0, 0x1be0(%rax)
je 0x1320fe
movq 0x38(%rsp), %rax
leaq 0xc2d9(%rip), %rcx      # 0x13e3c3
movq %rcx, 0x30(%rax)
movq 0x28(%rsp), %rax
movl $0x1d, (%rax)
jmp 0x13264c
jmp 0x132100
movq -0x18(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rsp)
cmpl $0x0, -0xc(%rsp)
jne 0x13219d
movl -0x4(%rsp), %ecx
subl -0x48(%rsp), %ecx
movq -0x58(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x58(%rsp)
movl -0x48(%rsp), %eax
cmpl -0x4c(%rsp), %eax
jae 0x132198
movl -0x48(%rsp), %ecx
movl -0x4c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x4c(%rsp)
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movl -0x48(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rsp)
cmpl $0x0, %eax
jne 0x132148
movq 0x10(%rsp), %rax
movl -0x50(%rsp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rsp)
jmp 0x132330
movl -0xc(%rsp), %eax
cmpl -0x48(%rsp), %eax
jae 0x1322ad
movl -0x4(%rsp), %ecx
addl -0xc(%rsp), %ecx
subl -0x48(%rsp), %ecx
movq -0x58(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x58(%rsp)
movl -0xc(%rsp), %ecx
movl -0x48(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x48(%rsp)
movl -0x48(%rsp), %eax
cmpl -0x4c(%rsp), %eax
jae 0x1322a8
movl -0x48(%rsp), %ecx
movl -0x4c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x4c(%rsp)
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movl -0x48(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rsp)
cmpl $0x0, %eax
jne 0x1321f0
movq -0x18(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rsp)
movl -0xc(%rsp), %eax
cmpl -0x4c(%rsp), %eax
jae 0x1322a6
movl -0xc(%rsp), %eax
movl %eax, -0x48(%rsp)
movl -0x48(%rsp), %ecx
movl -0x4c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x4c(%rsp)
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movl -0x48(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rsp)
cmpl $0x0, %eax
jne 0x132256
movq 0x10(%rsp), %rax
movl -0x50(%rsp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rsp)
jmp 0x1322a8
jmp 0x13232e
movl -0xc(%rsp), %ecx
subl -0x48(%rsp), %ecx
movq -0x58(%rsp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x58(%rsp)
movl -0x48(%rsp), %eax
cmpl -0x4c(%rsp), %eax
jae 0x13232c
movl -0x48(%rsp), %ecx
movl -0x4c(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x4c(%rsp)
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movl -0x48(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rsp)
cmpl $0x0, %eax
jne 0x1322dc
movq 0x10(%rsp), %rax
movl -0x50(%rsp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rsp)
jmp 0x13232e
jmp 0x132330
jmp 0x132332
cmpl $0x2, -0x4c(%rsp)
jbe 0x1323c5
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movl -0x4c(%rsp), %eax
subl $0x3, %eax
movl %eax, -0x4c(%rsp)
jmp 0x132332
cmpl $0x0, -0x4c(%rsp)
je 0x132425
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
cmpl $0x1, -0x4c(%rsp)
jbe 0x132423
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
jmp 0x132425
jmp 0x132532
movq 0x10(%rsp), %rax
movl -0x50(%rsp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rsp)
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
movl -0x4c(%rsp), %eax
subl $0x3, %eax
movl %eax, -0x4c(%rsp)
cmpl $0x2, -0x4c(%rsp)
ja 0x132442
cmpl $0x0, -0x4c(%rsp)
je 0x132530
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
cmpl $0x1, -0x4c(%rsp)
jbe 0x13252e
movq -0x58(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x58(%rsp)
movb 0x1(%rax), %cl
movq 0x10(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x10(%rsp)
movb %cl, 0x1(%rax)
jmp 0x132530
jmp 0x132532
jmp 0x13259b
movl -0x48(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x13257b
movq -0x38(%rsp), %rax
movzwl -0x42(%rsp), %ecx
movq %rcx, -0x60(%rsp)
movq -0x20(%rsp), %rdx
movl -0x48(%rsp), %ecx
movl $0x1, %esi
shll %cl, %esi
movq -0x60(%rsp), %rcx
subl $0x1, %esi
movl %esi, %esi
andq %rsi, %rdx
addq %rdx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rsp)
jmp 0x131f8c
movq 0x38(%rsp), %rax
leaq 0xbe26(%rip), %rcx      # 0x13e3ad
movq %rcx, 0x30(%rax)
movq 0x28(%rsp), %rax
movl $0x1d, (%rax)
jmp 0x13264c
jmp 0x13261a
movl -0x48(%rsp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x1325e4
movq -0x30(%rsp), %rax
movzwl -0x42(%rsp), %ecx
movq %rcx, -0x68(%rsp)
movq -0x20(%rsp), %rdx
movl -0x48(%rsp), %ecx
movl $0x1, %esi
shll %cl, %esi
movq -0x68(%rsp), %rcx
subl $0x1, %esi
movl %esi, %esi
andq %rsi, %rdx
addq %rdx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x44(%rsp)
jmp 0x131e0b
movl -0x48(%rsp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1325fd
movq 0x28(%rsp), %rax
movl $0xb, (%rax)
jmp 0x13264c
movq 0x38(%rsp), %rax
leaq 0xbd88(%rip), %rcx      # 0x13e391
movq %rcx, 0x30(%rax)
movq 0x28(%rsp), %rax
movl $0x1d, (%rax)
jmp 0x13264c
jmp 0x13261c
jmp 0x13261e
movq 0x20(%rsp), %rcx
xorl %eax, %eax
cmpq 0x18(%rsp), %rcx
movb %al, -0x69(%rsp)
jae 0x132640
movq 0x10(%rsp), %rax
cmpq (%rsp), %rax
setb %al
movb %al, -0x69(%rsp)
movb -0x69(%rsp), %al
testb $0x1, %al
jne 0x131d8a
movl -0x24(%rsp), %eax
shrl $0x3, %eax
movl %eax, -0x4c(%rsp)
movl -0x4c(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movl -0x4c(%rsp), %ecx
shll $0x3, %ecx
movl -0x24(%rsp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rsp)
movl -0x24(%rsp), %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, %eax
andq -0x20(%rsp), %rax
movq %rax, -0x20(%rsp)
movq 0x20(%rsp), %rcx
addq $0x1, %rcx
movq 0x38(%rsp), %rax
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
addq $0x1, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x1326e3
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
subq %rcx, %rax
addq $0x5, %rax
movq %rax, -0x78(%rsp)
jmp 0x1326fd
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
subq %rax, %rcx
movl $0x5, %eax
subq %rcx, %rax
movq %rax, -0x78(%rsp)
movq -0x78(%rsp), %rax
movl %eax, %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x10(%rsp), %rax
cmpq (%rsp), %rax
jae 0x132730
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rcx, %rax
addq $0x101, %rax            # imm = 0x101
movq %rax, -0x80(%rsp)
jmp 0x132749
movq 0x10(%rsp), %rcx
movq (%rsp), %rax
subq %rax, %rcx
movl $0x101, %eax            # imm = 0x101
subq %rcx, %rax
movq %rax, -0x80(%rsp)
movq -0x80(%rsp), %rax
movl %eax, %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x20(%rax)
movq -0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x48(%rax)
movl -0x24(%rsp), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x50(%rax)
addq $0x40, %rsp
retq