// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image.hpp
// 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__uint32 idata_limit_old = 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;
               STBI_NOTUSED(idata_limit_old);
               p = (stbi_uc *) STBI_REALLOC_SIZED(z->idata, idata_limit_old, 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 $0x4b8, %rsp            # imm = 0x4B8
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
movq (%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %r14, %rdi
callq 0x1f6dc
testl %eax, %eax
je 0x20043
movl $0x1, %eax
cmpl $0x1, %r15d
je 0x20045
movl %r15d, 0x50(%rsp)
movl %ebp, 0x6c(%rsp)
movq %rbx, 0x78(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x58(%rsp)
leaq 0x38(%r14), %rax
movq %rax, 0x30(%rsp)
leaq 0x39(%r14), %rax
movq %rax, 0x18(%rsp)
movl $0x1, 0x8(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x60(%rsp)
movl $0x0, 0x3c(%rsp)
movq $0x0, 0x28(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x80(%rsp)
movl $0x0, 0x4(%rsp)
movq %r14, %rdi
callq 0x1e517
movl %eax, %ebx
shll $0x10, %ebx
movq %r14, %rdi
callq 0x1e517
movl %eax, %ebp
leal (%rbx,%rbp), %r15d
movq %r14, %rdi
callq 0x1e517
movl %eax, %r13d
movl %eax, %r12d
shll $0x10, %r13d
movq %r14, %rdi
callq 0x1e517
orl %eax, %r13d
cmpl $0x49484451, %r13d      # imm = 0x49484451
jle 0x1f964
cmpl $0x74524e53, %r13d      # imm = 0x74524E53
je 0x1fa0d
cmpl $0x504c5445, %r13d      # imm = 0x504C5445
je 0x1faff
cmpl $0x49484452, %r13d      # imm = 0x49484452
movl 0x8(%rsp), %ecx
jne 0x1fcd4
testl %ecx, %ecx
je 0x20057
cmpl $0xd, %r15d
jne 0x20069
movq %r14, %rdi
callq 0x1e517
movl %eax, %ebx
shll $0x10, %ebx
movq %r14, %rdi
callq 0x1e517
orl %ebx, %eax
movl %eax, (%r14)
cmpl $0x1000001, %eax        # imm = 0x1000001
jae 0x20009
movq %r14, %rdi
callq 0x1e517
movl %eax, %ebx
shll $0x10, %ebx
movq %r14, %rdi
callq 0x1e517
orl %ebx, %eax
movl %eax, 0x4(%r14)
cmpl $0x1000001, %eax        # imm = 0x1000001
jae 0x20009
movq 0xb8(%r14), %rdx
movq 0xc0(%r14), %rax
cmpq %rax, %rdx
jae 0x1fd1d
leaq 0x1(%rdx), %rcx
movq %rcx, 0xb8(%r14)
movb (%rdx), %dl
movl 0x4(%rsp), %ebp
movq 0x30(%rsp), %r13
jmp 0x1fe1c
cmpl $0x43674249, %r13d      # imm = 0x43674249
je 0x1fcb9
cmpl $0x49444154, %r13d      # imm = 0x49444154
jne 0x1fcc3
cmpl $0x0, 0x8(%rsp)
jne 0x20035
cmpb $0x0, 0x4(%rsp)
movq 0x28(%rsp), %rax
je 0x1f99d
testl %eax, %eax
je 0x20072
cmpl $0x2, 0x50(%rsp)
je 0x200a6
movq 0x10(%rsp), %rcx
leal (%r15,%rcx), %ebx
xorl %eax, %eax
cmpl %ecx, %ebx
jl 0x20045
movq 0x48(%rsp), %rcx
cmpl %ecx, %ebx
jbe 0x1fd5b
cmpl $0x1001, %r15d          # imm = 0x1001
movl $0x1000, %eax           # imm = 0x1000
cmovael %r15d, %eax
testl %ecx, %ecx
cmovnel %ecx, %eax
movl %eax, %ecx
leal (%rcx,%rcx), %eax
cmpl %ecx, %ebx
ja 0x1f9dd
movq 0x58(%rsp), %r13
movq (%r13), %rdi
movq %rcx, 0x48(%rsp)
movl %ecx, %esi
callq 0x4510
testq %rax, %rax
je 0x205a2
movq %rax, (%r13)
jmp 0x1fd63
cmpl $0x0, 0x8(%rsp)
jne 0x20035
movq 0x58(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x20060
cmpb $0x0, 0x4(%rsp)
je 0x1fd86
cmpl $0x2, 0x50(%rsp)
movq 0x30(%rsp), %r13
je 0x200f6
movq 0x28(%rsp), %rax
testl %eax, %eax
je 0x20108
cmpl %r15d, %eax
jb 0x200b1
movb $0x4, %al
movl %eax, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
testl %r15d, %r15d
je 0x1fcfa
movq 0xb8(%r14), %rcx
movq 0xc0(%r14), %rax
addl %ebx, %ebp
xorl %ebx, %ebx
cmpq %rax, %rcx
jae 0x1fa98
leaq 0x1(%rcx), %rsi
movq %rsi, 0xb8(%r14)
movb (%rcx), %dl
movq %rsi, %rcx
jmp 0x1faeb
cmpl $0x0, 0x30(%r14)
je 0x1fac2
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r13, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1fac6
cltq
addq %r13, %rax
movb (%r13), %dl
movq 0x18(%rsp), %rcx
jmp 0x1fadd
xorl %edx, %edx
jmp 0x1faeb
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %edx, %edx
movq 0x18(%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r14)
movq %rcx, 0xb8(%r14)
movb %dl, 0xb3(%rsp,%rbx,4)
incq %rbx
cmpq %rbx, %rbp
jne 0x1fa81
jmp 0x1fcfa
cmpl $0x0, 0x8(%rsp)
jne 0x20035
cmpl $0x301, %r15d           # imm = 0x301
jae 0x20012
imull $0xaaab, %ebp, %eax     # imm = 0xAAAB
shrl $0x11, %eax
movq %rax, 0x28(%rsp)
leal (%rax,%rax,2), %eax
cmpl %r15d, %eax
jne 0x20012
movl $0x0, 0x8(%rsp)
cmpl $0x3, %ebp
jb 0x1fcfa
movl 0x28(%rsp), %ebx
movq 0xb8(%r14), %rcx
movq 0xc0(%r14), %rax
xorl %r15d, %r15d
movq 0x30(%rsp), %r13
movq 0x18(%rsp), %rbp
cmpq %rax, %rcx
jae 0x1fb78
leaq 0x1(%rcx), %rsi
movq %rsi, 0xb8(%r14)
movb (%rcx), %dl
movq %rsi, %rcx
jmp 0x1fbc4
cmpl $0x0, 0x30(%r14)
je 0x1fb9d
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r13, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1fba1
cltq
addq %r13, %rax
movb (%r13), %dl
jmp 0x1fbb3
xorl %edx, %edx
jmp 0x1fbc4
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %edx, %edx
movq %rbp, %rax
movq %rax, 0xc0(%r14)
movq %rbp, 0xb8(%r14)
movq %rbp, %rcx
movb %dl, 0xb0(%rsp,%r15,4)
cmpq %rax, %rcx
jae 0x1fbe3
leaq 0x1(%rcx), %rsi
movq %rsi, 0xb8(%r14)
movb (%rcx), %dl
movq %rsi, %rcx
jmp 0x1fc2f
cmpl $0x0, 0x30(%r14)
je 0x1fc08
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r13, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1fc0c
cltq
addq %r13, %rax
movb (%r13), %dl
jmp 0x1fc1e
xorl %edx, %edx
jmp 0x1fc2f
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %edx, %edx
movq %rbp, %rax
movq %rax, 0xc0(%r14)
movq %rbp, 0xb8(%r14)
movq %rbp, %rcx
movb %dl, 0xb1(%rsp,%r15,4)
cmpq %rax, %rcx
jae 0x1fc4e
leaq 0x1(%rcx), %rsi
movq %rsi, 0xb8(%r14)
movb (%rcx), %dl
movq %rsi, %rcx
jmp 0x1fc9a
cmpl $0x0, 0x30(%r14)
je 0x1fc73
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r13, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1fc77
cltq
addq %r13, %rax
movb (%r13), %dl
jmp 0x1fc89
xorl %edx, %edx
jmp 0x1fc9a
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %edx, %edx
movq %rbp, %rax
movq %rax, 0xc0(%r14)
movq %rbp, 0xb8(%r14)
movq %rbp, %rcx
movb %dl, 0xb2(%rsp,%r15,4)
movb $-0x1, 0xb3(%rsp,%r15,4)
incq %r15
cmpq %r15, %rbx
jne 0x1fb61
jmp 0x1fcfa
movl $0x1, 0x3c(%rsp)
jmp 0x1fcef
cmpl $0x49454e44, %r13d      # imm = 0x49454E44
movl 0x8(%rsp), %ecx
je 0x2002d
testl %ecx, %ecx
jne 0x20035
movl $0x0, 0x8(%rsp)
btl $0xd, %r12d
jae 0x2007b
movq %r14, %rdi
movl %r15d, %esi
callq 0x1e753
movq 0x10(%rsp), %rax
movl %eax, %ebx
movq %r14, %rdi
callq 0x1e517
movq %r14, %rdi
callq 0x1e517
movl %ebx, %eax
movq %rax, 0x10(%rsp)
jmp 0x1f865
cmpl $0x0, 0x30(%r14)
movl 0x4(%rsp), %ebp
movq 0x30(%rsp), %r13
je 0x200ea
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r13, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1fdf7
cltq
addq %r13, %rax
movb (%r13), %dl
movq 0x18(%rsp), %rcx
jmp 0x1fe0e
movq 0x58(%rsp), %rax
movq (%rax), %rax
movl 0x10(%rsp), %esi
addq %rax, %rsi
movq %r14, %rdi
movl %r15d, %edx
callq 0x20a46
movl $0x0, 0x8(%rsp)
testl %eax, %eax
jne 0x1fd01
jmp 0x200ba
movl 0x8(%r14), %eax
testb $0x1, %al
je 0x2041c
leal (%rax,%rax), %ecx
cmpl %r15d, %ecx
jne 0x200b1
movb $0x1, %cl
movq %rcx, 0x80(%rsp)
testl %eax, %eax
jle 0x1fddb
movl 0x60(%rsp), %ebx
xorl %r15d, %r15d
leaq 0xc156(%rip), %r13      # 0x2bf10
movq %r14, %rdi
callq 0x1e517
movl %eax, %ecx
movb (%rbx,%r13), %al
mulb %cl
movb %al, 0x25(%rsp,%r15)
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x1fdba
movl $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rax
movl %eax, %ebx
movl $0x0, 0x4(%rsp)
jmp 0x1fd01
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %edx, %edx
movq 0x18(%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r14)
movq %rcx, 0xb8(%r14)
cmpb $0x8, %dl
ja 0x200ea
movzbl %dl, %edx
movq %rdx, 0x60(%rsp)
movl $0x116, %esi            # imm = 0x116
btl %edx, %esi
jae 0x200ea
cmpq %rax, %rcx
jae 0x1fe52
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r14)
movb (%rcx), %bl
movq %rdx, %rcx
jmp 0x1fea8
cmpl $0x0, 0x30(%r14)
je 0x1fe7c
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r13, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1fe83
cltq
addq %r13, %rax
movb (%r13), %bl
movq 0x18(%rsp), %rcx
jmp 0x1fe9a
xorl %ebx, %ebx
xorl %r15d, %r15d
jmp 0x1fed0
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %ebx, %ebx
movq 0x18(%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r14)
movq %rcx, 0xb8(%r14)
cmpb $0x7, %bl
jae 0x20024
cmpb $0x3, %bl
jne 0x1fec3
movl $0x3, %r15d
movb $0x3, %bl
movb $0x3, %bpl
jmp 0x1fed0
testb $0x1, %bl
jne 0x20024
movzbl %bl, %r15d
cmpq %rax, %rcx
jae 0x1fee4
leaq 0x1(%rcx), %rax
movq %rax, 0xb8(%r14)
movb (%rcx), %al
jmp 0x1ff34
cmpl $0x0, 0x30(%r14)
je 0x1ff3c
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r13, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1ff0f
movslq %eax, %rcx
addq %r13, %rcx
movb (%r13), %al
movq 0x18(%rsp), %rdx
jmp 0x1ff26
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %eax, %eax
movq 0x18(%rsp), %rdx
movq %rdx, %rcx
movq %rcx, 0xc0(%r14)
movq %rdx, 0xb8(%r14)
testb %al, %al
jne 0x200de
movq %r14, %rdi
callq 0x1e49c
testb %al, %al
jne 0x200c6
movq %r14, %rdi
callq 0x1e49c
cmpb $0x2, %al
jae 0x200d2
movl (%r14), %esi
testl %esi, %esi
je 0x2001b
movl 0x4(%r14), %ecx
testl %ecx, %ecx
je 0x2001b
movzbl %al, %r8d
testb %bpl, %bpl
movq %r15, 0x88(%rsp)
movq %r8, 0x40(%rsp)
je 0x1ffba
movl %ebp, 0x4(%rsp)
movl $0x1, 0x8(%r14)
movl $0x0, 0x8(%rsp)
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %esi
shrl $0x2, %eax
movq 0x10(%rsp), %rdx
movl %edx, %ebx
cmpl %ecx, %eax
jae 0x1fd01
jmp 0x20009
movl %r15d, %eax
andl $0x2, %eax
xorl %edx, %edx
cmpb $0x4, %bl
setae %dl
leal (%rdx,%rax), %edi
incl %edi
movl %edi, 0x8(%r14)
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %esi
xorl %edx, %edx
divl %edi
cmpl %ecx, %eax
jb 0x20009
movl $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rax
movl %eax, %ebx
movl $0x0, 0x4(%rsp)
cmpl $0x2, 0x50(%rsp)
jne 0x1fd01
jmp 0x200fe
leaq 0xc2af(%rip), %rax      # 0x2c2bf
jmp 0x2003c
leaq 0xc4e8(%rip), %rax      # 0x2c501
jmp 0x2003c
leaq 0xc4c2(%rip), %rax      # 0x2c4e4
jmp 0x2003c
leaq 0xc478(%rip), %rax      # 0x2c4a3
jmp 0x2003c
testl %ecx, %ecx
je 0x20114
leaq 0xc4b6(%rip), %rax      # 0x2c4f2
movq %rax, 0x1734d(%rip)     # 0x37390
xorl %eax, %eax
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xc419(%rip), %rax      # 0x2c477
jmp 0x2003c
leaq 0xc4a7(%rip), %rax      # 0x2c50e
jmp 0x2003c
leaq 0xc415(%rip), %rax      # 0x2c485
jmp 0x2003c
leaq 0xc4d3(%rip), %rax      # 0x2c54c
jmp 0x2003c
movl %r12d, %edx
movb %dh, 0x172cc(%rip)      # 0x37350
leaq 0x172c5(%rip), %rcx     # 0x37350
movb %dl, 0x172c0(%rip)      # 0x37351
movb %ah, 0x172bb(%rip)      # 0x37352
movb %al, 0x172b6(%rip)      # 0x37353
movq %rcx, 0x172ec(%rip)     # 0x37390
jmp 0x20043
movzbl 0x4(%rsp), %eax
movl %eax, 0x8(%r14)
jmp 0x200fe
leaq 0xc477(%rip), %rax      # 0x2c52f
jmp 0x2003c
leaq 0xc493(%rip), %rax      # 0x2c554
jmp 0x2003c
leaq 0xc3f0(%rip), %rax      # 0x2c4bd
jmp 0x2003c
leaq 0xc3f6(%rip), %rax      # 0x2c4cf
jmp 0x2003c
leaq 0xc3c8(%rip), %rax      # 0x2c4ad
jmp 0x2003c
leaq 0xc3a1(%rip), %rax      # 0x2c492
jmp 0x2003c
movl $0x4, 0x8(%r14)
movl $0x1, %eax
jmp 0x20045
leaq 0xc40f(%rip), %rax      # 0x2c51e
jmp 0x2003c
movl $0x1, %eax
cmpl $0x0, 0x50(%rsp)
jne 0x20045
movq 0x58(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x20428
movl (%r14), %eax
imull 0x60(%rsp), %eax
addl $0x7, %eax
shrl $0x3, %eax
movl 0x4(%r14), %ecx
movl 0x8(%r14), %edx
imull %ecx, %edx
imull %eax, %edx
addl %ecx, %edx
leaq 0x9c(%rsp), %rcx
movl %edx, (%rcx)
xorl %r8d, %r8d
cmpl $0x0, 0x3c(%rsp)
sete %r8b
movq 0x10(%rsp), %rsi
callq 0x156bb
movq 0x78(%rsp), %r12
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x20043
movq 0x8(%r12), %rdi
callq 0x4380
movq $0x0, 0x8(%r12)
movl 0x8(%r14), %eax
leal 0x1(%rax), %ecx
cmpb $0x0, 0x80(%rsp)
cmovnel %ecx, %eax
movl 0x6c(%rsp), %edx
cmpl $0x3, %edx
movl %eax, %ebx
cmovnel %ecx, %ebx
cmpb $0x0, 0x4(%rsp)
cmovnel %eax, %ebx
cmpl %edx, %ecx
cmovnel %eax, %ebx
movl %ebx, 0xc(%r14)
movq (%r12), %rax
movq 0x10(%r12), %r15
movl 0x9c(%rsp), %r13d
movl (%rax), %r8d
movl 0x4(%rax), %r9d
cmpl $0x0, 0x40(%rsp)
je 0x20434
imull %ebx, %r8d
imull %r9d, %r8d
movq %r8, %rdi
callq 0x43f0
movq %rax, 0x70(%rsp)
movl %ebx, 0x68(%rsp)
movslq %ebx, %rax
movq %rax, 0x8(%rsp)
xorl %r8d, %r8d
leaq 0xbd0a(%rip), %r9       # 0x2bf20
leaq 0xbd43(%rip), %r11      # 0x2bf60
movq %r12, %r10
movq (%r12), %rdi
movslq (%r9,%r8,4), %rax
movslq (%r11,%r8,4), %r12
movq %rax, 0x48(%rsp)
movl %eax, %esi
notl %esi
addl (%rdi), %esi
addl %r12d, %esi
movl %esi, %eax
xorl %edx, %edx
divl %r12d
movl %eax, 0x30(%rsp)
leaq 0xbcf4(%rip), %rax      # 0x2bf40
movl (%rax,%r8,4), %ecx
movl %ecx, 0x28(%rsp)
notl %ecx
addl 0x4(%rdi), %ecx
leaq 0xbd20(%rip), %rax      # 0x2bf80
movl (%rax,%r8,4), %ebx
addl %ebx, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebx
movl %eax, 0x40(%rsp)
cmpl %esi, %r12d
ja 0x20400
cmpl %ecx, %ebx
ja 0x20400
movq %r12, %rbp
movq %r8, 0xa8(%rsp)
movl 0x30(%rsp), %r8d
movl %r8d, %ecx
movq 0x60(%rsp), %rax
imull %eax, %ecx
imull 0x8(%rdi), %ecx
movl %ecx, 0x98(%rsp)
movq %r10, %rdi
movq %r15, %rsi
movl %r13d, %edx
movl 0x68(%rsp), %ecx
movl 0x40(%rsp), %r12d
movl %r12d, %r9d
pushq 0x88(%rsp)
pushq %rax
callq 0x20bda
addq $0x10, %rsp
testl %eax, %eax
je 0x204c4
movl %r13d, 0x94(%rsp)
movq %r15, 0xa0(%rsp)
testl %r12d, %r12d
movq 0x8(%rsp), %rdx
jle 0x203ad
movq %rbp, %r13
movl %ebx, %esi
movslq 0x30(%rsp), %rbp
movl 0x40(%rsp), %eax
movq %rax, 0x50(%rsp)
movq 0x48(%rsp), %rbx
imulq %rdx, %rbx
addq 0x70(%rsp), %rbx
movq %rbx, 0x48(%rsp)
movl 0x68(%rsp), %eax
movl 0x28(%rsp), %ecx
imull %eax, %ecx
movl %ecx, 0x28(%rsp)
imull %eax, %esi
imulq %rdx, %r13
movq $0x0, 0x18(%rsp)
movl %esi, 0x58(%rsp)
cmpl $0x0, 0x30(%rsp)
jle 0x20391
movq 0x78(%rsp), %rcx
movq (%rcx), %rax
movq 0x18(%rcx), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rsp), %r15
imulq %rbp, %r15
movl (%rax), %ebx
imull 0x28(%rsp), %ebx
addq 0x48(%rsp), %rbx
xorl %r12d, %r12d
leaq (%r12,%r15), %rsi
imulq %rdx, %rsi
addq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x4290
movq 0x8(%rsp), %rdx
incq %r12
addq %r13, %rbx
cmpq %rbp, %r12
jl 0x2036c
movq 0x18(%rsp), %rcx
incq %rcx
movl 0x58(%rsp), %esi
addl %esi, 0x28(%rsp)
movq %rcx, 0x18(%rsp)
cmpq 0x50(%rsp), %rcx
jb 0x2033c
movl 0x98(%rsp), %ebx
addl $0x7, %ebx
sarl $0x3, %ebx
incl %ebx
imull 0x40(%rsp), %ebx
movq 0x78(%rsp), %r12
movq 0x18(%r12), %rdi
callq 0x4380
movl %ebx, %eax
movq 0xa0(%rsp), %r15
addq %rax, %r15
movl 0x94(%rsp), %r13d
subl %ebx, %r13d
movq 0xa8(%rsp), %r8
leaq 0xbb29(%rip), %r9       # 0x2bf20
leaq 0xbb62(%rip), %r11      # 0x2bf60
jmp 0x20403
movq %r10, %r12
incq %r8
cmpq $0x7, %r8
jne 0x2021d
movq 0x70(%rsp), %rax
movq %rax, 0x18(%r12)
jmp 0x2045b
leaq 0xc119(%rip), %rax      # 0x2c53c
jmp 0x2003c
leaq 0xc12f(%rip), %rax      # 0x2c55e
jmp 0x2003c
movq %r12, %rdi
movq %r15, %rsi
movl %r13d, %edx
movl %ebx, %ecx
pushq 0x88(%rsp)
pushq 0x68(%rsp)
callq 0x20bda
addq $0x10, %rsp
testl %eax, %eax
je 0x20043
cmpb $0x0, 0x80(%rsp)
je 0x204f5
movl 0xc(%r14), %ecx
movq (%r12), %rdx
movq 0x18(%r12), %rax
movl 0x4(%rdx), %edi
imull (%rdx), %edi
cmpl $0x2, %ecx
je 0x204d3
cmpl $0x4, %ecx
jne 0x205f3
testl %edi, %edi
je 0x204f5
movb 0x25(%rsp), %cl
movb 0x26(%rsp), %dl
movb 0x27(%rsp), %sil
movl %edi, %edi
xorl %r8d, %r8d
cmpb %cl, (%rax,%r8,4)
jne 0x204ba
cmpb %dl, 0x1(%rax,%r8,4)
jne 0x204ba
cmpb %sil, 0x2(%rax,%r8,4)
jne 0x204ba
movb $0x0, 0x3(%rax,%r8,4)
incq %r8
cmpl %r8d, %edi
jne 0x204a0
jmp 0x204f5
movq 0x70(%rsp), %rdi
callq 0x4380
jmp 0x20043
testl %edi, %edi
je 0x204f5
movb 0x25(%rsp), %cl
movl %edi, %edx
xorl %esi, %esi
cmpb %cl, (%rax,%rsi,2)
setne %dil
negb %dil
movb %dil, 0x1(%rax,%rsi,2)
incq %rsi
cmpl %esi, %edx
jne 0x204df
cmpl $0x0, 0x3c(%rsp)
je 0x2051a
cmpl $0x0, 0x16e9d(%rip)     # 0x373a0
je 0x2051a
cmpl $0x3, 0xc(%r14)
jl 0x2051a
movq (%r12), %rdi
movq 0x18(%r12), %rsi
callq 0x20ae8
movl 0x4(%rsp), %eax
testb %al, %al
je 0x205db
movzbl %al, %ebp
movl %ebp, 0x8(%r14)
movl 0x6c(%rsp), %eax
cmpl $0x3, %eax
cmovgel %eax, %ebp
movl %ebp, 0xc(%r14)
movq (%r12), %rax
movq 0x18(%r12), %r14
movl 0x4(%rax), %ebx
imull (%rax), %ebx
movl %ebx, %edi
imull %ebp, %edi
callq 0x43f0
testq %rax, %rax
je 0x205a2
movq %rax, %r15
cmpl $0x3, %ebp
jne 0x205ae
testl %ebx, %ebx
je 0x205ce
movl %ebx, %eax
xorl %ecx, %ecx
movq %r15, %rdx
movzbl (%r14,%rcx), %esi
movb 0xb0(%rsp,%rsi,4), %dil
movb %dil, (%rdx)
movb 0xb1(%rsp,%rsi,4), %dil
movb %dil, 0x1(%rdx)
movb 0xb2(%rsp,%rsi,4), %sil
movb %sil, 0x2(%rdx)
addq $0x3, %rdx
incq %rcx
cmpq %rcx, %rax
jne 0x2056c
jmp 0x205ce
leaq 0xbd20(%rip), %rax      # 0x2c2c9
jmp 0x2003c
testl %ebx, %ebx
je 0x205ce
movl %ebx, %eax
xorl %ecx, %ecx
movzbl (%r14,%rcx), %edx
movl 0xb0(%rsp,%rdx,4), %edx
movl %edx, (%r15,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x205b6
movq %r14, %rdi
callq 0x4380
movq %r15, 0x18(%r12)
movq 0x10(%r12), %rdi
callq 0x4380
movq $0x0, 0x10(%r12)
jmp 0x200fe
leaq 0xc057(%rip), %rdi      # 0x2c651
leaq 0xbd98(%rip), %rsi      # 0x2c399
leaq 0xc062(%rip), %rcx      # 0x2c66a
movl $0x1070, %edx           # imm = 0x1070
callq 0x41f0