// File: /workspace/github_cpp_makefile_star2_O2/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 $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 0x182e4
testl %eax, %eax
je 0x187f5
cmpl $0x1, %r14d
jne 0x1837c
pushq $0x1
popq %r14
jmp 0x187f8
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 0x1922b
movl %eax, %ebp
movq %r15, %rdi
callq 0x1922b
cmpl $0x43674249, %eax       # imm = 0x43674249
je 0x185b8
cmpl $0x49444154, %eax       # imm = 0x49444154
je 0x18650
cmpl $0x49484452, %eax       # imm = 0x49484452
je 0x18445
cmpl $0x504c5445, %eax       # imm = 0x504C5445
je 0x185ce
cmpl $0x74524e53, %eax       # imm = 0x74524E53
je 0x18554
cmpl $0x49454e44, %eax       # imm = 0x49454E44
je 0x187de
testl %r12d, %r12d
jne 0x187e7
xorl %r12d, %r12d
btl $0x1d, %eax
jb 0x185bf
jmp 0x1881f
testl %r12d, %r12d
je 0x1880d
cmpl $0xd, %ebp
jne 0x18816
movq %r15, %rdi
callq 0x1922b
movl %eax, (%r15)
cmpl $0x1000001, %eax        # imm = 0x1000001
jae 0x187ba
movq %r15, %rdi
callq 0x1922b
movl %eax, 0x4(%r15)
cmpl $0x1000001, %eax        # imm = 0x1000001
jae 0x187ba
movq %r15, %rdi
callq 0x17a36
cmpb $0x8, %al
ja 0x18b6d
movzbl %al, %eax
movq %rax, 0x38(%rsp)
movl $0x116, %ecx            # imm = 0x116
btl %eax, %ecx
jae 0x18b6d
movq %r15, %rdi
callq 0x17a36
cmpb $0x7, %al
jae 0x187d5
movl %eax, %ebp
movzbl %al, %eax
movb $0x3, %bl
movq %rax, 0x50(%rsp)
cmpl $0x3, %eax
je 0x184d8
movl %r14d, %ebx
testb $0x1, %bpl
jne 0x187d5
movq %r15, %rdi
callq 0x17a36
testb %al, %al
jne 0x18868
movq %r15, %rdi
callq 0x17a36
testb %al, %al
jne 0x18874
movq %r15, %rdi
callq 0x17a36
cmpb $0x2, %al
jae 0x18880
movl (%r15), %esi
testl %esi, %esi
je 0x187cc
movl 0x4(%r15), %ecx
testl %ecx, %ecx
je 0x187cc
movzbl %al, %r8d
testb %bl, %bl
movl %r8d, 0x48(%rsp)
je 0x18777
movl $0x1, 0x8(%r15)
xorl %r12d, %r12d
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %esi
shrl $0x2, %eax
cmpl %ecx, %eax
jae 0x1870f
jmp 0x187ba
testl %r12d, %r12d
jne 0x187e7
movq 0x30(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x18837
testb %r14b, %r14b
je 0x1871f
cmpl $0x2, 0x18(%rsp)
movq 0x20(%rsp), %rax
je 0x1888c
testl %eax, %eax
je 0x18899
cmpl %ebp, %eax
jb 0x18856
movl %ebp, %ebx
xorl %r14d, %r14d
cmpq %r14, %rbx
je 0x186dc
movq %r15, %rdi
callq 0x17a36
movb %al, 0x93(%rsp,%r14,4)
incq %r14
jmp 0x1859a
pushq $0x1
popq %rax
movl %eax, 0x2c(%rsp)
movq %r15, %rdi
movl %ebp, %esi
callq 0x17c0d
jmp 0x1870c
testl %r12d, %r12d
jne 0x187e7
cmpl $0x301, %ebp            # imm = 0x301
jae 0x187c3
movl %ebp, %eax
xorl %edx, %edx
movw $0x3, %cx
divw %cx
movzwl %ax, %ecx
leal (%rcx,%rcx,2), %eax
cmpl %ebp, %eax
jne 0x187c3
movq %r14, %rbp
movq %rcx, 0x20(%rsp)
movl %ecx, %ebx
xorl %r14d, %r14d
cmpq %r14, %rbx
je 0x186d5
movq %r15, %rdi
callq 0x17a36
movb %al, 0x90(%rsp,%r14,4)
movq %r15, %rdi
callq 0x17a36
movb %al, 0x91(%rsp,%r14,4)
movq %r15, %rdi
callq 0x17a36
movb %al, 0x92(%rsp,%r14,4)
movb $-0x1, 0x93(%rsp,%r14,4)
incq %r14
jmp 0x18609
testl %r12d, %r12d
jne 0x187e7
testb %r14b, %r14b
je 0x18669
cmpl $0x0, 0x20(%rsp)
je 0x18840
cmpl $0x2, 0x18(%rsp)
je 0x18849
movq 0x8(%rsp), %rcx
leal (%rcx,%rbp), %ebx
cmpl %ecx, %ebx
jl 0x187f5
cmpl %r13d, %ebx
jbe 0x186e3
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 0x186a5
movq (%r12), %rdi
movl %r13d, %esi
callq 0x4530
testq %rax, %rax
je 0x18dc4
movq %rax, (%r12)
movq 0x8(%rsp), %rcx
jmp 0x186eb
xorl %r12d, %r12d
movl %ebp, %ebx
jmp 0x1870f
movb $0x4, %bl
xorl %r12d, %r12d
jmp 0x1870f
movq 0x30(%rsp), %rax
movq (%rax), %rax
movl %ecx, %esi
addq %rax, %rsi
movq %r15, %rdi
movl %ebp, %edx
callq 0x1924c
testl %eax, %eax
je 0x1885f
xorl %r12d, %r12d
movl %ebx, %eax
movq %rax, 0x8(%rsp)
movl %r14d, %ebx
movq %r15, %rdi
callq 0x1922b
movl %ebx, %r14d
jmp 0x183da
movl 0x8(%r15), %eax
testb $0x1, %al
je 0x18b61
leal (%rax,%rax), %ecx
cmpl %ebp, %ecx
jne 0x18856
movl 0x38(%rsp), %ebx
xorl %r14d, %r14d
leaq 0x96cc(%rip), %r12      # 0x21e10
cltq
cmpq %rax, %r14
jge 0x18769
movq %r15, %rdi
callq 0x17ab7
movl %eax, %ecx
movb (%rbx,%r12), %al
mulb %cl
movb %al, 0x5(%rsp,%r14)
incq %r14
movl 0x8(%r15), %eax
jmp 0x18744
movb $0x1, %al
movq %rax, 0x60(%rsp)
xorl %r12d, %r12d
xorl %ebx, %ebx
jmp 0x1870f
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 0x187ba
xorl %r12d, %r12d
movl $0x0, %ebx
cmpl $0x2, 0x18(%rsp)
jne 0x1870f
jmp 0x18373
leaq 0x99fe(%rip), %rax      # 0x221bf
jmp 0x187ee
leaq 0x9c37(%rip), %rax      # 0x22401
jmp 0x187ee
leaq 0x9c11(%rip), %rax      # 0x223e4
jmp 0x187ee
leaq 0x9bc7(%rip), %rax      # 0x223a3
jmp 0x187ee
testl %r12d, %r12d
je 0x188a5
leaq 0x9c04(%rip), %rax      # 0x223f2
movq %rax, 0x16bdb(%rip)     # 0x2f3d0
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 0x9b63(%rip), %rax      # 0x22377
jmp 0x187ee
leaq 0x9b68(%rip), %rax      # 0x22385
jmp 0x187ee
leaq 0x16b6a(%rip), %rcx     # 0x2f390
bswapl %eax
movl %eax, 0x16b62(%rip)     # 0x2f390
movq %rcx, 0x16b9b(%rip)     # 0x2f3d0
jmp 0x187f5
leaq 0x9bd0(%rip), %rax      # 0x2240e
jmp 0x187ee
leaq 0x9c05(%rip), %rax      # 0x2244c
jmp 0x187ee
movzbl %r14b, %eax
movl %eax, 0x8(%r15)
jmp 0x18373
leaq 0x9bd2(%rip), %rax      # 0x2242f
jmp 0x187ee
leaq 0x9bee(%rip), %rax      # 0x22454
jmp 0x187ee
leaq 0x9b3e(%rip), %rax      # 0x223ad
jmp 0x187ee
leaq 0x9b42(%rip), %rax      # 0x223bd
jmp 0x187ee
leaq 0x9b48(%rip), %rax      # 0x223cf
jmp 0x187ee
movl $0x4, 0x8(%r15)
jmp 0x18373
leaq 0x9b7e(%rip), %rax      # 0x2241e
jmp 0x187ee
movq %r14, 0x78(%rsp)
pushq $0x1
popq %r14
cmpl $0x0, 0x18(%rsp)
jne 0x187f8
movq 0x30(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x18b79
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 0x12e63
movq 0x10(%rsp), %r13
movq %rax, 0x10(%r13)
testq %rax, %rax
je 0x187f5
movq 0x8(%r13), %rdi
callq 0x43a0
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 0x18b99
imull %ecx, %r8d
imull %r9d, %r8d
movq %r8, %rdi
movl %edx, %ebp
movq %rsi, %r14
movl %ecx, %ebx
callq 0x4420
movq %r14, %rsi
movl %ebp, %r8d
movq %rax, 0x58(%rsp)
movl %ebx, 0x40(%rsp)
movslq %ebx, %r13
xorl %r10d, %r10d
leaq 0x947e(%rip), %r11      # 0x21e20
cmpq $0x7, %r10
je 0x18b85
movq 0x10(%rsp), %rax
movq (%rax), %rdi
movslq (%r11,%r10,4), %rcx
leaq 0x94a1(%rip), %rax      # 0x21e60
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 0x945b(%rip), %rax      # 0x21e40
movl (%rax,%r10,4), %ecx
movl %ecx, 0x8(%rsp)
notl %ecx
addl 0x4(%rdi), %ecx
leaq 0x9487(%rip), %rax      # 0x21e80
movl (%rax,%r10,4), %ebp
addl %ebp, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %ebp
movq %r12, 0x20(%rsp)
cmpl %r9d, %r12d
ja 0x18b59
cmpl %ecx, %ebp
ja 0x18b59
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 0x192ec
popq %rcx
popq %rdx
testl %eax, %eax
je 0x18c8f
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 0x18b26
movq %r14, 0x30(%rsp)
imulq %rbx, %r14
movq 0x18(%rsp), %r12
xorl %ebp, %ebp
cmpq %rbx, %rbp
jge 0x18b0f
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 0x42a0
incq %rbp
addq 0x20(%rsp), %r12
jmp 0x18ada
movq 0x30(%rsp), %r14
incq %r14
movl 0x70(%rsp), %ebp
addl %ebp, 0x8(%rsp)
movl 0x6c(%rsp), %r12d
jmp 0x18ac3
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x43a0
movl %r12d, %eax
movq 0x88(%rsp), %rsi
addq %rax, %rsi
movl 0x68(%rsp), %r8d
subl %r12d, %r8d
movq 0x80(%rsp), %r10
leaq 0x92c7(%rip), %r11      # 0x21e20
incq %r10
jmp 0x189a2
leaq 0x98d4(%rip), %rax      # 0x2243c
jmp 0x187ee
leaq 0x981e(%rip), %rax      # 0x22392
jmp 0x187ee
leaq 0x98de(%rip), %rax      # 0x2245e
jmp 0x187ee
movq 0x10(%rsp), %r13
movq 0x58(%rsp), %rax
movq %rax, 0x18(%r13)
pushq $0x1
popq %r14
jmp 0x18bb3
movq %r13, %rdi
pushq 0x50(%rsp)
pushq 0x40(%rsp)
callq 0x192ec
popq %rcx
popq %rdx
testl %eax, %eax
je 0x187f5
cmpb $0x0, 0x60(%rsp)
je 0x18c2f
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 0x18bfa
cmpl $0x2, %edx
jne 0x18e09
movb 0x5(%rsp), %dl
xorl %esi, %esi
cmpl %esi, %ecx
je 0x18c2f
cmpb %dl, (%rax,%rsi,2)
setne %dil
negb %dil
movb %dil, 0x1(%rax,%rsi,2)
incq %rsi
jmp 0x18be2
movb 0x5(%rsp), %dl
movb 0x6(%rsp), %sil
movb 0x7(%rsp), %dil
xorl %r8d, %r8d
cmpl %r8d, %ecx
je 0x18c2f
cmpb %dl, (%rax,%r8,4)
jne 0x18c2a
cmpb %sil, 0x1(%rax,%r8,4)
jne 0x18c2a
cmpb %dil, 0x2(%rax,%r8,4)
jne 0x18c2a
movb $0x0, 0x3(%rax,%r8,4)
incq %r8
jmp 0x18c0b
cmpl $0x0, 0x2c(%rsp)
je 0x18d40
cmpl $0x0, 0x1679f(%rip)     # 0x2f3e0
je 0x18d40
cmpl $0x3, 0xc(%r15)
jl 0x18d40
movq (%r13), %rdx
movq 0x18(%r13), %rsi
movl 0x4(%rdx), %eax
movl 0xc(%rdx), %ecx
imull (%rdx), %eax
cmpl $0x4, %ecx
je 0x18c9e
cmpl $0x3, %ecx
jne 0x18e28
movq 0x10(%rsp), %r13
subl $0x1, %eax
jb 0x18d40
movb (%rsi), %cl
movb 0x2(%rsi), %dl
movb %dl, (%rsi)
movb %cl, 0x2(%rsi)
addq $0x3, %rsi
jmp 0x18c76
movq 0x58(%rsp), %rdi
callq 0x43a0
jmp 0x187f5
cmpl $0x0, 0x16737(%rip)     # 0x2f3dc
je 0x18d1e
movl %eax, %edi
xorl %r8d, %r8d
movq 0x10(%rsp), %r13
cmpl %r8d, %edi
je 0x18d40
movzbl 0x3(%rsi,%r8,4), %r9d
movb (%rsi,%r8,4), %al
movb 0x2(%rsi,%r8,4), %cl
testw %r9w, %r9w
je 0x18d10
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 0x18cb1
movl %eax, %eax
xorl %ecx, %ecx
movq 0x10(%rsp), %r13
cmpl %ecx, %eax
je 0x18d40
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 0x18d27
movq 0x78(%rsp), %rax
testb %al, %al
je 0x18df6
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 0x4420
testq %rax, %rax
je 0x18dc4
movq %rax, %r12
movl %ebp, %eax
xorl %ecx, %ecx
cmpl $0x3, %ebx
jne 0x18dd0
movq %r12, %rdx
cmpq %rcx, %rax
je 0x18dea
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 0x18d8e
leaq 0x93fe(%rip), %rax      # 0x221c9
jmp 0x187ee
cmpq %rcx, %rax
je 0x18dea
movzbl (%r15,%rcx), %edx
movl 0x90(%rsp,%rdx,4), %edx
movl %edx, (%r12,%rcx,4)
incq %rcx
jmp 0x18dd0
movq %r15, %rdi
callq 0x43a0
movq %r12, 0x18(%r13)
movq 0x10(%r13), %rdi
callq 0x43a0
andq $0x0, 0x10(%r13)
jmp 0x187f8
leaq 0x9741(%rip), %rdi      # 0x22551
leaq 0x9482(%rip), %rsi      # 0x22299
leaq 0x974c(%rip), %rcx      # 0x2256a
movl $0x1070, %edx           # imm = 0x1070
callq 0x4210
leaq 0x9777(%rip), %rdi      # 0x225a6
leaq 0x9463(%rip), %rsi      # 0x22299
leaq 0x977b(%rip), %rcx      # 0x225b8
movl $0x10c1, %edx           # imm = 0x10C1
callq 0x4210