// File: /workspace/github_c_makefile_star2_O3/archer1357[P]Offline-Raytracer/stb_image.c
// Function: stbi__parse_png_file
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, 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 == SCAN_type) return 1;

   for (;;) {
      stbi__pngchunk c = stbi__get_chunk_header(s);
      switch (c.type) {
         case PNG_TYPE('C','g','B','I'):
            is_iphone = 1;
            stbi__skip(s, c.length);
            break;
         case PNG_TYPE('I','H','D','R'): {
            int depth,color,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 != 8)        return stbi__err("8bit only","PNG not supported: 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 == 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 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 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 == 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); // non 8-bit images will be larger
            }
            break;
         }

         case 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 == SCAN_header) { s->img_n = pal_img_n; return 1; }
            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 *) 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 PNG_TYPE('I','E','N','D'): {
            stbi__uint32 raw_len;
            if (first) return stbi__err("first not IHDR", "Corrupt PNG");
            if (scan != SCAN_load) return 1;
            if (z->idata == NULL) return stbi__err("no IDAT","Corrupt PNG");
            z->expanded = (stbi_uc *) stbi_zlib_decode_malloc_guesssize_headerflag((char *) z->idata, ioff, 16384, (int *) &raw_len, !is_iphone);
            if (z->expanded == NULL) return 0; // zlib should set error
            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, 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;
            }
            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, 0x30(%rsp)
movq %rdi, %r12
movq (%rdi), %r14
leaq 0x8(%rdi), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
xorl %ebx, %ebx
leaq 0xc7387(%rip), %r15     # 0x4d88b8
movq %r14, %rdi
callq 0x410442
cmpb (%rbx,%r15), %al
jne 0x411976
incq %rbx
cmpq $0x8, %rbx
jne 0x411531
movl $0x1, %eax
cmpl $0x1, 0x30(%rsp)
je 0x411986
movq %r13, 0x18(%rsp)
movl %ebp, 0x44(%rsp)
movq %r12, 0x58(%rsp)
movl $0x1, %ebx
movq $0x0, 0x20(%rsp)
movl $0x0, 0x14(%rsp)
movq $0x0, 0x28(%rsp)
xorl %ebp, %ebp
xorl %r15d, %r15d
movq $0x0, 0x60(%rsp)
movl $0x0, 0x8(%rsp)
movq %r14, %rdi
callq 0x412356
movl %eax, %r12d
movq %r14, %rdi
callq 0x412356
cmpl $0x49484451, %eax       # imm = 0x49484451
jle 0x4116df
cmpl $0x74524e53, %eax       # imm = 0x74524E53
je 0x41176f
cmpl $0x504c5445, %eax       # imm = 0x504C5445
je 0x4117e9
cmpl $0x49484452, %eax       # imm = 0x49484452
jne 0x411891
testl %ebx, %ebx
je 0x4119cd
cmpl $0xd, %r12d
jne 0x4119df
movq %r14, %rdi
callq 0x412356
movl %eax, (%r14)
cmpl $0x1000001, %eax        # imm = 0x1000001
jae 0x411998
movq %r14, %rdi
callq 0x412356
movl %eax, 0x4(%r14)
cmpl $0x1000001, %eax        # imm = 0x1000001
jae 0x411998
movq %r14, %rdi
callq 0x410442
cmpb $0x8, %al
jne 0x411a2d
movq %r14, %rdi
callq 0x410442
cmpb $0x7, %al
jae 0x4119b3
movl %eax, %r12d
movzbl %al, %ebx
movb $0x3, %r13b
cmpl $0x3, %ebx
je 0x41165c
movl 0x8(%rsp), %eax
movl %eax, %r13d
testb $0x1, %r12b
jne 0x4119b3
movq %r14, %rdi
callq 0x410442
testb %al, %al
jne 0x411a39
movq %r14, %rdi
callq 0x410442
testb %al, %al
jne 0x411a45
movq %r14, %rdi
callq 0x410442
cmpb $0x2, %al
jae 0x411a51
movl (%r14), %esi
testl %esi, %esi
je 0x4119aa
movl 0x4(%r14), %ecx
testl %ecx, %ecx
je 0x4119aa
movzbl %al, %r8d
testb %r13b, %r13b
movq %r8, 0x20(%rsp)
je 0x41192e
movl $0x1, 0x8(%r14)
xorl %ebx, %ebx
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %esi
shrl $0x2, %eax
movl %r13d, %edx
movl %edx, 0x8(%rsp)
cmpl %ecx, %eax
jae 0x411969
jmp 0x411998
cmpl $0x43674249, %eax       # imm = 0x43674249
je 0x41187c
cmpl $0x49444154, %eax       # imm = 0x49444154
jne 0x411886
testl %ebx, %ebx
jne 0x4119c4
movl 0x8(%rsp), %eax
testb %al, %al
je 0x411710
cmpl $0x0, 0x28(%rsp)
je 0x411a00
cmpl $0x2, 0x30(%rsp)
je 0x411a0c
movq %r15, %r13
addl %r12d, %r15d
cmpl %ebp, %r15d
jbe 0x4118b5
cmpl $0x1001, %r12d          # imm = 0x1001
movl %r12d, %eax
movl $0x1000, %ecx           # imm = 0x1000
cmovbl %ecx, %eax
testl %ebp, %ebp
cmovnel %ebp, %eax
movl %eax, %ebp
leal (,%rbp,2), %eax
cmpl %ebp, %r15d
ja 0x411741
movq 0x18(%rsp), %rbx
movq (%rbx), %rdi
movl %ebp, %esi
callq 0x445f50
testq %rax, %rax
je 0x411eb2
movq %rax, (%rbx)
jmp 0x4118bd
testl %ebx, %ebx
jne 0x4119c4
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x4119d6
cmpb $0x0, 0x8(%rsp)
je 0x4118dd
cmpl $0x2, 0x30(%rsp)
je 0x411a5d
movq 0x28(%rsp), %rax
testl %eax, %eax
je 0x411a6f
cmpl %r12d, %eax
jb 0x411a21
movb $0x4, %al
movl %eax, 0x8(%rsp)
xorl %ebx, %ebx
testl %r12d, %r12d
je 0x4118b0
movq %r15, %r13
movl %r12d, %r15d
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x410442
movb %al, 0x93(%rsp,%r12,4)
incq %r12
cmpq %r12, %r15
jne 0x4117cc
jmp 0x411874
testl %ebx, %ebx
jne 0x4119c4
cmpl $0x301, %r12d           # imm = 0x301
jae 0x4119a1
movzwl %r12w, %eax
imull $0xaaab, %eax, %eax     # imm = 0xAAAB
shrl $0x11, %eax
movq %rax, 0x28(%rsp)
leal (%rax,%rax,2), %eax
cmpl %r12d, %eax
jne 0x4119a1
xorl %ebx, %ebx
cmpl $0x3, %r12d
jb 0x4118b0
movq %r15, %r13
movl 0x28(%rsp), %r15d
xorl %r12d, %r12d
movq %r14, %rdi
callq 0x410442
movb %al, 0x90(%rsp,%r12,4)
movq %r14, %rdi
callq 0x410442
movb %al, 0x91(%rsp,%r12,4)
movq %r14, %rdi
callq 0x410442
movb %al, 0x92(%rsp,%r12,4)
movb $-0x1, 0x93(%rsp,%r12,4)
incq %r12
cmpq %r12, %r15
jne 0x411833
movl %r13d, %r15d
jmp 0x411969
movl $0x1, 0x14(%rsp)
jmp 0x4118a5
cmpl $0x49454e44, %eax       # imm = 0x49454E44
je 0x4119bc
testl %ebx, %ebx
jne 0x4119c4
xorl %ebx, %ebx
btl $0x1d, %eax
jae 0x4119e8
movq %r14, %rdi
movl %r12d, %esi
callq 0x41060e
jmp 0x411969
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl %r13d, %esi
addq %rax, %rsi
movq %r14, %rdi
movl %r12d, %edx
callq 0x41239e
xorl %ebx, %ebx
testl %eax, %eax
jne 0x411969
jmp 0x411a15
movl 0x8(%r14), %eax
testb $0x1, %al
je 0x411d43
leal (%rax,%rax), %ecx
cmpl %r12d, %ecx
jne 0x411a21
movb $0x1, %cl
movq %rcx, 0x60(%rsp)
testl %eax, %eax
jle 0x411922
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x410442
movq %r14, %rdi
callq 0x410442
movb %al, 0xd(%rsp,%rbx)
incq %rbx
movslq 0x8(%r14), %rax
cmpq %rax, %rbx
jl 0x411902
xorl %ebx, %ebx
movl $0x0, 0x8(%rsp)
jmp 0x411969
andl $0x2, %ebx
xorl %eax, %eax
cmpb $0x4, %r12b
setae %al
leal (%rax,%rbx), %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 0x411998
xorl %ebx, %ebx
movl $0x0, 0x8(%rsp)
cmpl $0x2, 0x30(%rsp)
je 0x411a65
movq %r14, %rdi
callq 0x412356
jmp 0x41159f
leaq 0xc7167(%rip), %rax     # 0x4d8ae4
movq %rax, 0x10ab9c(%rip)    # 0x51c520
xorl %eax, %eax
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd0fe0(%rip), %rax     # 0x4e297f
jmp 0x41197d
leaq 0xc71cb(%rip), %rax     # 0x4d8b73
jmp 0x41197d
leaq 0xc71a5(%rip), %rax     # 0x4d8b56
jmp 0x41197d
leaq 0xc715b(%rip), %rax     # 0x4d8b15
jmp 0x41197d
testl %ebx, %ebx
je 0x411a7b
leaq 0xc7199(%rip), %rax     # 0x4d8b64
jmp 0x41197d
leaq 0xc711c(%rip), %rax     # 0x4d8af0
jmp 0x41197d
leaq 0xc71a3(%rip), %rax     # 0x4d8b80
jmp 0x41197d
leaq 0xc7118(%rip), %rax     # 0x4d8afe
jmp 0x41197d
leaq 0x107831(%rip), %rcx    # 0x519220
bswapl %eax
movl %eax, 0x107829(%rip)    # 0x519220
movq %rcx, 0x10ab22(%rip)    # 0x51c520
jmp 0x411984
leaq 0xc71b7(%rip), %rax     # 0x4d8bbe
jmp 0x41197d
movzbl %al, %eax
movl %eax, 0x8(%r14)
jmp 0x411a65
leaq 0xc71aa(%rip), %rax     # 0x4d8bc6
jmp 0x41197d
leaq 0xc7179(%rip), %rax     # 0x4d8ba1
jmp 0x41197d
leaq 0xc70d7(%rip), %rax     # 0x4d8b0b
jmp 0x41197d
leaq 0xc70df(%rip), %rax     # 0x4d8b1f
jmp 0x41197d
leaq 0xc70e3(%rip), %rax     # 0x4d8b2f
jmp 0x41197d
leaq 0xc70e9(%rip), %rax     # 0x4d8b41
jmp 0x41197d
movl $0x4, 0x8(%r14)
movl $0x1, %eax
jmp 0x411986
leaq 0xc711a(%rip), %rax     # 0x4d8b90
jmp 0x41197d
movl $0x1, %eax
cmpl $0x0, 0x30(%rsp)
jne 0x411986
movq 0x18(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x411d4f
xorl %r8d, %r8d
movl 0x14(%rsp), %ebx
testl %ebx, %ebx
sete %r8b
leaq 0x74(%rsp), %rcx
movl %r15d, %esi
movl $0x4000, %edx           # imm = 0x4000
callq 0x40dbdd
movq 0x58(%rsp), %r12
movq %rax, 0x10(%r12)
testq %rax, %rax
je 0x411984
movq 0x8(%r12), %rdi
callq 0x445c00
movq $0x0, 0x8(%r12)
movl 0x8(%r14), %eax
leal 0x1(%rax), %ecx
cmpb $0x0, 0x60(%rsp)
cmovnel %ecx, %eax
movl 0x44(%rsp), %edx
cmpl $0x3, %edx
movl %eax, %r15d
cmovnel %ecx, %r15d
cmpb $0x0, 0x8(%rsp)
cmovnel %eax, %r15d
cmpl %edx, %ecx
cmovnel %eax, %r15d
movl %r15d, 0xc(%r14)
movq (%r12), %rax
movq 0x10(%r12), %r13
movl 0x74(%rsp), %edx
movl (%rax), %r8d
movl 0x4(%rax), %r9d
cmpl $0x0, 0x20(%rsp)
je 0x411d5b
movl %ebx, 0x14(%rsp)
imull %r15d, %r8d
imull %r9d, %r8d
movq %r8, %rdi
movl %edx, %ebx
callq 0x4458c0
movl %ebx, %r8d
movq %rax, 0x48(%rsp)
movslq %r15d, %rax
movq %rax, 0x28(%rsp)
xorl %r9d, %r9d
leaq 0xc6aa0(%rip), %r10     # 0x4d8600
leaq 0xc6ad9(%rip), %r11     # 0x4d8640
movl %r15d, 0x3c(%rsp)
movq %r12, %rbx
movq (%r12), %rdi
movslq (%r10,%r9,4), %rax
movslq (%r11,%r9,4), %rbp
movq %rax, 0x50(%rsp)
movl %eax, %esi
notl %esi
addl (%rdi), %esi
addl %ebp, %esi
movl %esi, %eax
xorl %edx, %edx
divl %ebp
movl %eax, 0x10(%rsp)
leaq 0xc6a87(%rip), %rax     # 0x4d8620
movl (%rax,%r9,4), %ecx
movl %ecx, 0x20(%rsp)
notl %ecx
addl 0x4(%rdi), %ecx
leaq 0xc6ab3(%rip), %rax     # 0x4d8660
movl (%rax,%r9,4), %edi
addl %edi, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %edi
cmpl %esi, %ebp
ja 0x411d23
cmpl %ecx, %edi
ja 0x411d23
movq %rbp, %r12
movl %edi, %ebp
movq %r9, 0x78(%rsp)
movq %rbx, %rdi
movq %r13, 0x80(%rsp)
movq %r13, %rsi
movl %r8d, 0x6c(%rsp)
movl %r8d, %edx
movl %r15d, %ecx
movl 0x10(%rsp), %r8d
movl %eax, %r9d
movl %eax, %ebx
callq 0x412532
testl %eax, %eax
je 0x411dd7
movl %ebx, 0x40(%rsp)
testl %ebx, %ebx
movq 0x28(%rsp), %rdx
jle 0x411cd3
movl %ebp, %esi
movslq 0x10(%rsp), %rbp
movl 0x40(%rsp), %eax
movq %rax, 0x88(%rsp)
movq 0x50(%rsp), %rbx
imulq %rdx, %rbx
addq 0x48(%rsp), %rbx
movq %rbx, 0x50(%rsp)
movl 0x3c(%rsp), %eax
movl 0x20(%rsp), %ecx
imull %eax, %ecx
movl %ecx, 0x20(%rsp)
imull %eax, %esi
imulq %rdx, %r12
movq $0x0, 0x18(%rsp)
movl %esi, 0x70(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x411cb4
movq 0x58(%rsp), %rcx
movq (%rcx), %rax
movq 0x18(%rcx), %rcx
movq %rcx, 0x30(%rsp)
movq 0x18(%rsp), %rbx
imulq %rbp, %rbx
movl (%rax), %r15d
imull 0x20(%rsp), %r15d
addq 0x50(%rsp), %r15
xorl %r13d, %r13d
leaq (%rbx,%r13), %rsi
imulq %rdx, %rsi
addq 0x30(%rsp), %rsi
movq %r15, %rdi
callq 0x401058
movq 0x28(%rsp), %rdx
incq %r13
addq %r12, %r15
cmpq %rbp, %r13
jl 0x411c8f
movq 0x18(%rsp), %rcx
incq %rcx
movl 0x70(%rsp), %esi
addl %esi, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
cmpq 0x88(%rsp), %rcx
jb 0x411c5d
movq 0x58(%rsp), %r12
movq 0x18(%r12), %rdi
callq 0x445c00
movl 0x3c(%rsp), %r15d
movl 0x10(%rsp), %eax
imull %r15d, %eax
incl %eax
movl 0x40(%rsp), %ecx
imull %eax, %ecx
movslq %ecx, %rax
movq 0x80(%rsp), %r13
addq %rax, %r13
movl 0x6c(%rsp), %r8d
subl %eax, %r8d
movq 0x78(%rsp), %r9
leaq 0xc68e6(%rip), %r10     # 0x4d8600
leaq 0xc691f(%rip), %r11     # 0x4d8640
jmp 0x411d26
movq %rbx, %r12
incq %r9
cmpq $0x7, %r9
jne 0x411b6c
movq 0x48(%rsp), %rax
movq %rax, 0x18(%r12)
movl 0x14(%rsp), %ebx
jmp 0x411d71
leaq 0xc6e64(%rip), %rax     # 0x4d8bae
jmp 0x41197d
leaq 0xc6e7a(%rip), %rax     # 0x4d8bd0
jmp 0x41197d
movq %r12, %rdi
movq %r13, %rsi
movl %r15d, %ecx
callq 0x412532
testl %eax, %eax
je 0x411984
cmpb $0x0, 0x60(%rsp)
je 0x411e08
movl 0xc(%r14), %ecx
movq (%r12), %rdx
movq 0x18(%r12), %rax
movl 0x4(%rdx), %edi
imull (%rdx), %edi
cmpl $0x2, %ecx
je 0x411de6
cmpl $0x4, %ecx
jne 0x411f03
testl %edi, %edi
je 0x411e08
movb 0xd(%rsp), %cl
movb 0xe(%rsp), %dl
movb 0xf(%rsp), %sil
movl %edi, %edi
xorl %r8d, %r8d
cmpb %cl, (%rax,%r8,4)
jne 0x411dcd
cmpb %dl, 0x1(%rax,%r8,4)
jne 0x411dcd
cmpb %sil, 0x2(%rax,%r8,4)
jne 0x411dcd
movb $0x0, 0x3(%rax,%r8,4)
incq %r8
cmpl %r8d, %edi
jne 0x411db3
jmp 0x411e08
movq 0x48(%rsp), %rdi
callq 0x445c00
jmp 0x411984
testl %edi, %edi
je 0x411e08
movb 0xd(%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 0x411df2
testl %ebx, %ebx
je 0x411e2a
cmpl $0x0, 0x10a719(%rip)    # 0x51c52c
je 0x411e2a
cmpl $0x3, 0xc(%r14)
jl 0x411e2a
movq (%r12), %rdi
movq 0x18(%r12), %rsi
callq 0x412440
movl 0x8(%rsp), %eax
testb %al, %al
je 0x411eeb
movl 0x44(%rsp), %ebx
movzbl %al, %ebp
movl %ebp, 0x8(%r14)
cmpl $0x3, %ebx
cmovgel %ebx, %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 0x4458c0
testq %rax, %rax
je 0x411eb2
movq %rax, %r15
cmpl $0x3, %ebp
jne 0x411ebe
testl %ebx, %ebx
je 0x411ede
movl %ebx, %eax
xorl %ecx, %ecx
movq %r15, %rdx
movzbl (%r14,%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
cmpq %rcx, %rax
jne 0x411e7c
jmp 0x411ede
leaq 0xc6b16(%rip), %rax     # 0x4d89cf
jmp 0x41197d
testl %ebx, %ebx
je 0x411ede
movl %ebx, %eax
xorl %ecx, %ecx
movzbl (%r14,%rcx), %edx
movl 0x90(%rsp,%rdx,4), %edx
movl %edx, (%r15,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x411ec6
movq %r14, %rdi
callq 0x445c00
movq %r15, 0x18(%r12)
movq 0x10(%r12), %rdi
callq 0x445c00
movq $0x0, 0x10(%r12)
jmp 0x411a65
leaq 0xc6d8f(%rip), %rdi     # 0x4d8c99
leaq 0xc6b8d(%rip), %rsi     # 0x4d8a9e
leaq 0xc6d9a(%rip), %rcx     # 0x4d8cb2
movl $0x8dc, %edx            # imm = 0x8DC
callq 0x4209d0