// File: /workspace/github_c_makefile_star2_O2/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__parse_png_file(stbi__png*, int, int)
static int stbi__parse_png_file(stbi__png *z, int scan, int req_comp)
{
   stbi_uc palette[1024], pal_img_n=0;
   stbi_uc has_trans=0, tc[3];
   stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0;
   int first=1,k,interlace=0, color=0, depth=0, is_iphone=0;
   stbi__context *s = z->s;

   z->expanded = NULL;
   z->idata = NULL;
   z->out = NULL;

   if (!stbi__check_png_header(s)) return 0;

   if (scan == STBI__SCAN_type) return 1;

   for (;;) {
      stbi__pngchunk c = stbi__get_chunk_header(s);
      switch (c.type) {
         case STBI__PNG_TYPE('C','g','B','I'):
            is_iphone = 1;
            stbi__skip(s, c.length);
            break;
         case STBI__PNG_TYPE('I','H','D','R'): {
            int comp,filter;
            if (!first) return stbi__err("multiple IHDR","Corrupt PNG");
            first = 0;
            if (c.length != 13) return stbi__err("bad IHDR len","Corrupt PNG");
            s->img_x = stbi__get32be(s); if (s->img_x > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)");
            s->img_y = stbi__get32be(s); if (s->img_y > (1 << 24)) return stbi__err("too large","Very large image (corrupt?)");
            depth = stbi__get8(s);  if (depth != 1 && depth != 2 && depth != 4 && depth != 8)  return stbi__err("1/2/4/8-bit only","PNG not supported: 1/2/4/8-bit only");
            color = stbi__get8(s);  if (color > 6)         return stbi__err("bad ctype","Corrupt PNG");
            if (color == 3) pal_img_n = 3; else if (color & 1) return stbi__err("bad ctype","Corrupt PNG");
            comp  = stbi__get8(s);  if (comp) return stbi__err("bad comp method","Corrupt PNG");
            filter= stbi__get8(s);  if (filter) return stbi__err("bad filter method","Corrupt PNG");
            interlace = stbi__get8(s); if (interlace>1) return stbi__err("bad interlace method","Corrupt PNG");
            if (!s->img_x || !s->img_y) return stbi__err("0-pixel image","Corrupt PNG");
            if (!pal_img_n) {
               s->img_n = (color & 2 ? 3 : 1) + (color & 4 ? 1 : 0);
               if ((1 << 30) / s->img_x / s->img_n < s->img_y) return stbi__err("too large", "Image too large to decode");
               if (scan == STBI__SCAN_header) return 1;
            } else {
               // if paletted, then pal_n is our final components, and
               // img_n is # components to decompress/filter.
               s->img_n = 1;
               if ((1 << 30) / s->img_x / 4 < s->img_y) return stbi__err("too large","Corrupt PNG");
               // if SCAN_header, have to scan to see if we have a tRNS
            }
            break;
         }

         case STBI__PNG_TYPE('P','L','T','E'):  {
            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
            if (c.length > 256*3) return stbi__err("invalid PLTE","Corrupt PNG");
            pal_len = c.length / 3;
            if (pal_len * 3 != c.length) return stbi__err("invalid PLTE","Corrupt PNG");
            for (i=0; i < pal_len; ++i) {
               palette[i*4+0] = stbi__get8(s);
               palette[i*4+1] = stbi__get8(s);
               palette[i*4+2] = stbi__get8(s);
               palette[i*4+3] = 255;
            }
            break;
         }

         case STBI__PNG_TYPE('t','R','N','S'): {
            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
            if (z->idata) return stbi__err("tRNS after IDAT","Corrupt PNG");
            if (pal_img_n) {
               if (scan == STBI__SCAN_header) { s->img_n = 4; return 1; }
               if (pal_len == 0) return stbi__err("tRNS before PLTE","Corrupt PNG");
               if (c.length > pal_len) return stbi__err("bad tRNS len","Corrupt PNG");
               pal_img_n = 4;
               for (i=0; i < c.length; ++i)
                  palette[i*4+3] = stbi__get8(s);
            } else {
               if (!(s->img_n & 1)) return stbi__err("tRNS with alpha","Corrupt PNG");
               if (c.length != (stbi__uint32) s->img_n*2) return stbi__err("bad tRNS len","Corrupt PNG");
               has_trans = 1;
               for (k=0; k < s->img_n; ++k)
                  tc[k] = (stbi_uc) (stbi__get16be(s) & 255) * stbi__depth_scale_table[depth]; // non 8-bit images will be larger
            }
            break;
         }

         case STBI__PNG_TYPE('I','D','A','T'): {
            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
            if (pal_img_n && !pal_len) return stbi__err("no PLTE","Corrupt PNG");
            if (scan == STBI__SCAN_header) { s->img_n = pal_img_n; return 1; }
            if ((int)(ioff + c.length) < (int)ioff) return 0;
            if (ioff + c.length > idata_limit) {
               stbi_uc *p;
               if (idata_limit == 0) idata_limit = c.length > 4096 ? c.length : 4096;
               while (ioff + c.length > idata_limit)
                  idata_limit *= 2;
               p = (stbi_uc *) STBI_REALLOC(z->idata, idata_limit); if (p == NULL) return stbi__err("outofmem", "Out of memory");
               z->idata = p;
            }
            if (!stbi__getn(s, z->idata+ioff,c.length)) return stbi__err("outofdata","Corrupt PNG");
            ioff += c.length;
            break;
         }

         case STBI__PNG_TYPE('I','E','N','D'): {
            stbi__uint32 raw_len, bpl;
            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
            if (scan != STBI__SCAN_load) return 1;
            if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG");
            // initial guess for decoded data size to avoid unnecessary reallocs
            bpl = (s->img_x * depth + 7) / 8; // bytes per line, per component
            raw_len = bpl * s->img_y * s->img_n /* pixels */ + s->img_y /* filter mode per row */;
            z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, raw_len, (int *) &raw_len, !is_iphone);
            if (z->expanded == NULL) return 0; // zlib should set error
            STBI_FREE(z->idata); z->idata = NULL;
            if ((req_comp == s->img_n+1 && req_comp != 3 && !pal_img_n) || has_trans)
               s->img_out_n = s->img_n+1;
            else
               s->img_out_n = s->img_n;
            if (!stbi__create_png_image(z, z->expanded, raw_len, s->img_out_n, depth, color, interlace)) return 0;
            if (has_trans)
               if (!stbi__compute_transparency(z, tc, s->img_out_n)) return 0;
            if (is_iphone && stbi__de_iphone_flag && s->img_out_n > 2)
               stbi__de_iphone(z);
            if (pal_img_n) {
               // pal_img_n == 3 or 4
               s->img_n = pal_img_n; // record the actual colors we had
               s->img_out_n = pal_img_n;
               if (req_comp >= 3) s->img_out_n = req_comp;
               if (!stbi__expand_png_palette(z, palette, pal_len, s->img_out_n))
                  return 0;
            }
            STBI_FREE(z->expanded); z->expanded = NULL;
            return 1;
         }

         default:
            // if critical, fail
            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
            if ((c.type & (1 << 29)) == 0) {
               #ifndef STBI_NO_FAILURE_STRINGS
               // not threadsafe
               static char invalid_chunk[] = "XXXX PNG chunk not known";
               invalid_chunk[0] = STBI__BYTECAST(c.type >> 24);
               invalid_chunk[1] = STBI__BYTECAST(c.type >> 16);
               invalid_chunk[2] = STBI__BYTECAST(c.type >>  8);
               invalid_chunk[3] = STBI__BYTECAST(c.type >>  0);
               #endif
               return stbi__err(invalid_chunk, "PNG not supported: unknown PNG chunk type");
            }
            stbi__skip(s, c.length);
            break;
      }
      // end of PNG chunk, read and skip CRC
      stbi__get32be(s);
   }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x498, %rsp            # imm = 0x498
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq (%rdi), %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
andq $0x0, 0x18(%rdi)
movq %r15, %rdi
callq 0x14b5e
testl %eax, %eax
je 0x1506f
cmpl $0x1, %r14d
jne 0x14bf6
pushq $0x1
popq %r14
jmp 0x15072
movl %r14d, 0x18(%rsp)
movl %ebp, 0x44(%rsp)
movq %rbx, 0x10(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x30(%rsp)
pushq $0x1
popq %r12
movl $0x0, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
movq $0x0, 0x38(%rsp)
movl $0x0, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
xorl %r13d, %r13d
movq $0x0, 0x8(%rsp)
movq $0x0, 0x60(%rsp)
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x15aa5
movl %eax, %ebp
movq %r15, %rdi
callq 0x15aa5
cmpl $0x43674249, %eax       # imm = 0x43674249
je 0x14e32
cmpl $0x49444154, %eax       # imm = 0x49444154
je 0x14eca
cmpl $0x49484452, %eax       # imm = 0x49484452
je 0x14cbf
cmpl $0x504c5445, %eax       # imm = 0x504C5445
je 0x14e48
cmpl $0x74524e53, %eax       # imm = 0x74524E53
je 0x14dce
cmpl $0x49454e44, %eax       # imm = 0x49454E44
je 0x15058
testl %r12d, %r12d
jne 0x15061
xorl %r12d, %r12d
btl $0x1d, %eax
jb 0x14e39
jmp 0x15099
testl %r12d, %r12d
je 0x15087
cmpl $0xd, %ebp
jne 0x15090
movq %r15, %rdi
callq 0x15aa5
movl %eax, (%r15)
cmpl $0x1000001, %eax        # imm = 0x1000001
jae 0x15034
movq %r15, %rdi
callq 0x15aa5
movl %eax, 0x4(%r15)
cmpl $0x1000001, %eax        # imm = 0x1000001
jae 0x15034
movq %r15, %rdi
callq 0x142b0
cmpb $0x8, %al
ja 0x153e7
movzbl %al, %eax
movq %rax, 0x38(%rsp)
movl $0x116, %ecx            # imm = 0x116
btl %eax, %ecx
jae 0x153e7
movq %r15, %rdi
callq 0x142b0
cmpb $0x7, %al
jae 0x1504f
movl %eax, %ebp
movzbl %al, %eax
movb $0x3, %bl
movq %rax, 0x50(%rsp)
cmpl $0x3, %eax
je 0x14d52
movl %r14d, %ebx
testb $0x1, %bpl
jne 0x1504f
movq %r15, %rdi
callq 0x142b0
testb %al, %al
jne 0x150e2
movq %r15, %rdi
callq 0x142b0
testb %al, %al
jne 0x150ee
movq %r15, %rdi
callq 0x142b0
cmpb $0x2, %al
jae 0x150fa
movl (%r15), %esi
testl %esi, %esi
je 0x15046
movl 0x4(%r15), %ecx
testl %ecx, %ecx
je 0x15046
movzbl %al, %r8d
testb %bl, %bl
movl %r8d, 0x48(%rsp)
je 0x14ff1
movl $0x1, 0x8(%r15)
xorl %r12d, %r12d
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %esi
shrl $0x2, %eax
cmpl %ecx, %eax
jae 0x14f89
jmp 0x15034
testl %r12d, %r12d
jne 0x15061
movq 0x30(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x150b1
testb %r14b, %r14b
je 0x14f99
cmpl $0x2, 0x18(%rsp)
movq 0x20(%rsp), %rax
je 0x15106
testl %eax, %eax
je 0x15113
cmpl %ebp, %eax
jb 0x150d0
movl %ebp, %ebx
xorl %r14d, %r14d
cmpq %r14, %rbx
je 0x14f56
movq %r15, %rdi
callq 0x142b0
movb %al, 0x93(%rsp,%r14,4)
incq %r14
jmp 0x14e14
pushq $0x1
popq %rax
movl %eax, 0x2c(%rsp)
movq %r15, %rdi
movl %ebp, %esi
callq 0x14487
jmp 0x14f86
testl %r12d, %r12d
jne 0x15061
cmpl $0x301, %ebp            # imm = 0x301
jae 0x1503d
movl %ebp, %eax
xorl %edx, %edx
movw $0x3, %cx
divw %cx
movzwl %ax, %ecx
leal (%rcx,%rcx,2), %eax
cmpl %ebp, %eax
jne 0x1503d
movq %r14, %rbp
movq %rcx, 0x20(%rsp)
movl %ecx, %ebx
xorl %r14d, %r14d
cmpq %r14, %rbx
je 0x14f4f
movq %r15, %rdi
callq 0x142b0
movb %al, 0x90(%rsp,%r14,4)
movq %r15, %rdi
callq 0x142b0
movb %al, 0x91(%rsp,%r14,4)
movq %r15, %rdi
callq 0x142b0
movb %al, 0x92(%rsp,%r14,4)
movb $-0x1, 0x93(%rsp,%r14,4)
incq %r14
jmp 0x14e83
testl %r12d, %r12d
jne 0x15061
testb %r14b, %r14b
je 0x14ee3
cmpl $0x0, 0x20(%rsp)
je 0x150ba
cmpl $0x2, 0x18(%rsp)
je 0x150c3
movq 0x8(%rsp), %rcx
leal (%rcx,%rbp), %ebx
cmpl %ecx, %ebx
jl 0x1506f
cmpl %r13d, %ebx
jbe 0x14f5d
cmpl $0x1001, %ebp           # imm = 0x1001
movl %ebp, %eax
movl $0x1000, %ecx           # imm = 0x1000
cmovbl %ecx, %eax
testl %r13d, %r13d
cmovnel %r13d, %eax
movq 0x30(%rsp), %r12
movl %eax, %r13d
leal (,%r13,2), %eax
cmpl %r13d, %ebx
ja 0x14f1f
movq (%r12), %rdi
movl %r13d, %esi
callq 0x8560
testq %rax, %rax
je 0x1563e
movq %rax, (%r12)
movq 0x8(%rsp), %rcx
jmp 0x14f65
xorl %r12d, %r12d
movl %ebp, %ebx
jmp 0x14f89
movb $0x4, %bl
xorl %r12d, %r12d
jmp 0x14f89
movq 0x30(%rsp), %rax
movq (%rax), %rax
movl %ecx, %esi
addq %rax, %rsi
movq %r15, %rdi
movl %ebp, %edx
callq 0x15ac6
testl %eax, %eax
je 0x150d9
xorl %r12d, %r12d
movl %ebx, %eax
movq %rax, 0x8(%rsp)
movl %r14d, %ebx
movq %r15, %rdi
callq 0x15aa5
movl %ebx, %r14d
jmp 0x14c54
movl 0x8(%r15), %eax
testb $0x1, %al
je 0x153db
leal (%rax,%rax), %ecx
cmpl %ebp, %ecx
jne 0x150d0
movl 0x38(%rsp), %ebx
xorl %r14d, %r14d
leaq 0x3b02(%rip), %r12      # 0x18ac0
cltq
cmpq %rax, %r14
jge 0x14fe3
movq %r15, %rdi
callq 0x14331
movl %eax, %ecx
movb (%rbx,%r12), %al
mulb %cl
movb %al, 0x5(%rsp,%r14)
incq %r14
movl 0x8(%r15), %eax
jmp 0x14fbe
movb $0x1, %al
movq %rax, 0x60(%rsp)
xorl %r12d, %r12d
xorl %ebx, %ebx
jmp 0x14f89
movq 0x50(%rsp), %rax
andl $0x2, %eax
xorl %edx, %edx
cmpb $0x4, %bpl
setae %dl
leal (%rdx,%rax), %edi
incl %edi
movl %edi, 0x8(%r15)
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %esi
xorl %edx, %edx
divl %edi
cmpl %ecx, %eax
jb 0x15034
xorl %r12d, %r12d
movl $0x0, %ebx
cmpl $0x2, 0x18(%rsp)
jne 0x14f89
jmp 0x14bed
leaq 0x3e52(%rip), %rax      # 0x18e8d
jmp 0x15068
leaq 0x408c(%rip), %rax      # 0x190d0
jmp 0x15068
leaq 0x4066(%rip), %rax      # 0x190b3
jmp 0x15068
leaq 0x401c(%rip), %rax      # 0x19072
jmp 0x15068
testl %r12d, %r12d
je 0x1511f
leaq 0x4059(%rip), %rax      # 0x190c1
movq %rax, 0xb399(%rip)      # 0x20408
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3fb8(%rip), %rax      # 0x19046
jmp 0x15068
leaq 0x3fbd(%rip), %rax      # 0x19054
jmp 0x15068
leaq 0xb300(%rip), %rcx      # 0x203a0
bswapl %eax
movl %eax, 0xb2f8(%rip)      # 0x203a0
movq %rcx, 0xb359(%rip)      # 0x20408
jmp 0x1506f
leaq 0x4025(%rip), %rax      # 0x190dd
jmp 0x15068
leaq 0x405a(%rip), %rax      # 0x1911b
jmp 0x15068
movzbl %r14b, %eax
movl %eax, 0x8(%r15)
jmp 0x14bed
leaq 0x4027(%rip), %rax      # 0x190fe
jmp 0x15068
leaq 0x4043(%rip), %rax      # 0x19123
jmp 0x15068
leaq 0x3f93(%rip), %rax      # 0x1907c
jmp 0x15068
leaq 0x3f97(%rip), %rax      # 0x1908c
jmp 0x15068
leaq 0x3f9d(%rip), %rax      # 0x1909e
jmp 0x15068
movl $0x4, 0x8(%r15)
jmp 0x14bed
leaq 0x3fd3(%rip), %rax      # 0x190ed
jmp 0x15068
movq %r14, 0x78(%rsp)
pushq $0x1
popq %r14
cmpl $0x0, 0x18(%rsp)
jne 0x15072
movq 0x30(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x153f3
movl (%r15), %eax
imull 0x38(%rsp), %eax
addl $0x7, %eax
shrl $0x3, %eax
movl 0x4(%r15), %ecx
movl 0x8(%r15), %edx
imull %ecx, %edx
imull %eax, %edx
addl %ecx, %edx
leaq 0x74(%rsp), %rcx
movl %edx, (%rcx)
xorl %r8d, %r8d
cmpl $0x0, 0x2c(%rsp)
sete %r8b
movq 0x8(%rsp), %rsi
callq 0xebe4
movq 0x10(%rsp), %r13
movq %rax, 0x10(%r13)
testq %rax, %rax
je 0x1506f
movq 0x8(%r13), %rdi
callq 0x83d0
andq $0x0, 0x8(%r13)
movl 0x8(%r15), %eax
leal 0x1(%rax), %esi
cmpb $0x0, 0x60(%rsp)
cmovnel %esi, %eax
movl 0x44(%rsp), %edx
cmpl $0x3, %edx
movl %eax, %ecx
cmovnel %esi, %ecx
cmpb $0x0, 0x78(%rsp)
cmovnel %eax, %ecx
cmpl %edx, %esi
cmovnel %eax, %ecx
movl %ecx, 0xc(%r15)
movq (%r13), %rax
movq 0x10(%r13), %rsi
movl 0x74(%rsp), %edx
movl (%rax), %r8d
movl 0x4(%rax), %r9d
cmpl $0x0, 0x48(%rsp)
je 0x15413
imull %ecx, %r8d
imull %r9d, %r8d
movq %r8, %rdi
movl %edx, %ebp
movq %rsi, %r14
movl %ecx, %ebx
callq 0x8420
movq %r14, %rsi
movl %ebp, %r8d
movq %rax, 0x58(%rsp)
movl %ebx, 0x40(%rsp)
movslq %ebx, %r13
xorl %r10d, %r10d
leaq 0x38b4(%rip), %r11      # 0x18ad0
cmpq $0x7, %r10
je 0x153ff
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movslq (%r11,%r10,4), %rcx
leaq 0x38d7(%rip), %rax      # 0x18b10
movslq (%rax,%r10,4), %r12
movq %rcx, 0x18(%rsp)
movl %ecx, %r9d
notl %r9d
addl (%rdi), %r9d
addl %r12d, %r9d
movl %r9d, %eax
xorl %edx, %edx
divl %r12d
movl %eax, %ebx
leaq 0x3891(%rip), %rax      # 0x18af0
movl (%rax,%r10,4), %ecx
movl %ecx, 0x8(%rsp)
notl %ecx
addl 0x4(%rdi), %ecx
leaq 0x38bd(%rip), %rax      # 0x18b30
movl (%rax,%r10,4), %ebp
addl %ebp, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebp
movq %r12, 0x20(%rsp)
cmpl %r9d, %r12d
ja 0x153d3
cmpl %ecx, %ebp
ja 0x153d3
movl %eax, %r14d
movq %r10, 0x80(%rsp)
movl %ebx, %r12d
movq 0x38(%rsp), %rax
imull %eax, %r12d
imull 0x8(%rdi), %r12d
movq 0x10(%rsp), %rdi
movq %rsi, 0x88(%rsp)
movl %r8d, 0x68(%rsp)
movl %r8d, %edx
movl 0x40(%rsp), %ecx
movl %ebx, %r8d
movl %r14d, %r9d
pushq 0x50(%rsp)
pushq %rax
callq 0x15b66
popq %rcx
popq %rdx
testl %eax, %eax
je 0x15509
addl $0x7, %r12d
sarl $0x3, %r12d
incl %r12d
imull %r14d, %r12d
movl 0x40(%rsp), %eax
movslq %ebx, %rbx
movslq %r14d, %rcx
movq %rcx, 0x48(%rsp)
movl 0x8(%rsp), %ecx
imull %eax, %ecx
movl %ecx, 0x8(%rsp)
imull %eax, %ebp
movq 0x18(%rsp), %r14
imulq %r13, %r14
addq 0x58(%rsp), %r14
movq %r14, 0x18(%rsp)
movq 0x20(%rsp), %rax
imulq %r13, %rax
movq %rax, 0x20(%rsp)
xorl %r14d, %r14d
movl %ebp, 0x70(%rsp)
movl %r12d, 0x6c(%rsp)
cmpq 0x48(%rsp), %r14
jge 0x153a0
movq %r14, 0x30(%rsp)
imulq %rbx, %r14
movq 0x18(%rsp), %r12
xorl %ebp, %ebp
cmpq %rbx, %rbp
jge 0x15389
movq 0x10(%rsp), %rcx
movq (%rcx), %rax
movl (%rax), %edi
imull 0x8(%rsp), %edi
addq %r12, %rdi
leaq (%r14,%rbp), %rsi
imulq %r13, %rsi
addq 0x18(%rcx), %rsi
movq %r13, %rdx
callq 0x8290
incq %rbp
addq 0x20(%rsp), %r12
jmp 0x15354
movq 0x30(%rsp), %r14
incq %r14
movl 0x70(%rsp), %ebp
addl %ebp, 0x8(%rsp)
movl 0x6c(%rsp), %r12d
jmp 0x1533d
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x83d0
movl %r12d, %eax
movq 0x88(%rsp), %rsi
addq %rax, %rsi
movl 0x68(%rsp), %r8d
subl %r12d, %r8d
movq 0x80(%rsp), %r10
leaq 0x36fd(%rip), %r11      # 0x18ad0
incq %r10
jmp 0x1521c
leaq 0x3d29(%rip), %rax      # 0x1910b
jmp 0x15068
leaq 0x3c73(%rip), %rax      # 0x19061
jmp 0x15068
leaq 0x3d33(%rip), %rax      # 0x1912d
jmp 0x15068
movq 0x10(%rsp), %r13
movq 0x58(%rsp), %rax
movq %rax, 0x18(%r13)
pushq $0x1
popq %r14
jmp 0x1542d
movq %r13, %rdi
pushq 0x50(%rsp)
pushq 0x40(%rsp)
callq 0x15b66
popq %rcx
popq %rdx
testl %eax, %eax
je 0x1506f
cmpb $0x0, 0x60(%rsp)
je 0x154a9
movl 0xc(%r15), %edx
movq (%r13), %rcx
movq 0x18(%r13), %rax
movl 0x4(%rcx), %esi
imull (%rcx), %esi
movl %esi, %ecx
cmpl $0x4, %edx
je 0x15474
cmpl $0x2, %edx
jne 0x15683
movb 0x5(%rsp), %dl
xorl %esi, %esi
cmpl %esi, %ecx
je 0x154a9
cmpb %dl, (%rax,%rsi,2)
setne %dil
negb %dil
movb %dil, 0x1(%rax,%rsi,2)
incq %rsi
jmp 0x1545c
movb 0x5(%rsp), %dl
movb 0x6(%rsp), %sil
movb 0x7(%rsp), %dil
xorl %r8d, %r8d
cmpl %r8d, %ecx
je 0x154a9
cmpb %dl, (%rax,%r8,4)
jne 0x154a4
cmpb %sil, 0x1(%rax,%r8,4)
jne 0x154a4
cmpb %dil, 0x2(%rax,%r8,4)
jne 0x154a4
movb $0x0, 0x3(%rax,%r8,4)
incq %r8
jmp 0x15485
cmpl $0x0, 0x2c(%rsp)
je 0x155ba
cmpl $0x0, 0xaf5d(%rip)      # 0x20418
je 0x155ba
cmpl $0x3, 0xc(%r15)
jl 0x155ba
movq (%r13), %rdx
movq 0x18(%r13), %rsi
movl 0x4(%rdx), %eax
movl 0xc(%rdx), %ecx
imull (%rdx), %eax
cmpl $0x4, %ecx
je 0x15518
cmpl $0x3, %ecx
jne 0x156a2
movq 0x10(%rsp), %r13
subl $0x1, %eax
jb 0x155ba
movb (%rsi), %cl
movb 0x2(%rsi), %dl
movb %dl, (%rsi)
movb %cl, 0x2(%rsi)
addq $0x3, %rsi
jmp 0x154f0
movq 0x58(%rsp), %rdi
callq 0x83d0
jmp 0x1506f
cmpl $0x0, 0xaef5(%rip)      # 0x20414
je 0x15598
movl %eax, %edi
xorl %r8d, %r8d
movq 0x10(%rsp), %r13
cmpl %r8d, %edi
je 0x155ba
movzbl 0x3(%rsi,%r8,4), %r9d
movb (%rsi,%r8,4), %al
movb 0x2(%rsi,%r8,4), %cl
testw %r9w, %r9w
je 0x1558a
movzbl %al, %r10d
movzbl %cl, %eax
movzwl %ax, %eax
imull $0xff, %eax, %eax
xorl %edx, %edx
divw %r9w
movzbl 0x1(%rsi,%r8,4), %ecx
imull $0xff, %ecx, %edx
movl %eax, %ecx
movl %edx, %eax
xorl %edx, %edx
divw %r9w
movb %al, 0x1(%rsi,%r8,4)
movzwl %r10w, %eax
imull $0xff, %eax, %eax
xorl %edx, %edx
divw %r9w
movb %cl, (%rsi,%r8,4)
movb %al, 0x2(%rsi,%r8,4)
incq %r8
jmp 0x1552b
movl %eax, %eax
xorl %ecx, %ecx
movq 0x10(%rsp), %r13
cmpl %ecx, %eax
je 0x155ba
movb (%rsi,%rcx,4), %dl
movb 0x2(%rsi,%rcx,4), %dil
movb %dil, (%rsi,%rcx,4)
movb %dl, 0x2(%rsi,%rcx,4)
incq %rcx
jmp 0x155a1
movq 0x78(%rsp), %rax
testb %al, %al
je 0x15670
movzbl %al, %ebx
movl %ebx, 0x8(%r15)
movl 0x44(%rsp), %eax
cmpl $0x3, %eax
cmovgel %eax, %ebx
movl %ebx, 0xc(%r15)
movq (%r13), %rax
movq 0x18(%r13), %r15
movl 0x4(%rax), %ebp
imull (%rax), %ebp
movl %ebp, %edi
imull %ebx, %edi
callq 0x8420
testq %rax, %rax
je 0x1563e
movq %rax, %r12
movl %ebp, %eax
xorl %ecx, %ecx
cmpl $0x3, %ebx
jne 0x1564a
movq %r12, %rdx
cmpq %rcx, %rax
je 0x15664
movzbl (%r15,%rcx), %esi
movb 0x90(%rsp,%rsi,4), %dil
movb %dil, (%rdx)
movb 0x91(%rsp,%rsi,4), %dil
movb %dil, 0x1(%rdx)
movb 0x92(%rsp,%rsi,4), %sil
movb %sil, 0x2(%rdx)
addq $0x3, %rdx
incq %rcx
jmp 0x15608
leaq 0x3852(%rip), %rax      # 0x18e97
jmp 0x15068
cmpq %rcx, %rax
je 0x15664
movzbl (%r15,%rcx), %edx
movl 0x90(%rsp,%rdx,4), %edx
movl %edx, (%r12,%rcx,4)
incq %rcx
jmp 0x1564a
movq %r15, %rdi
callq 0x83d0
movq %r12, 0x18(%r13)
movq 0x10(%r13), %rdi
callq 0x83d0
andq $0x0, 0x10(%r13)
jmp 0x15072
leaq 0x3b96(%rip), %rdi      # 0x19220
leaq 0x38d6(%rip), %rsi      # 0x18f67
leaq 0x3ba1(%rip), %rcx      # 0x19239
movl $0x1059, %edx           # imm = 0x1059
callq 0x8210
leaq 0x3bcc(%rip), %rdi      # 0x19275
leaq 0x38b7(%rip), %rsi      # 0x18f67
leaq 0x3bd0(%rip), %rcx      # 0x19287
movl $0x10aa, %edx           # imm = 0x10AA
callq 0x8210