// File: alan0201tw[P]RayTracer/include/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]={0};
   stbi__uint16 tc16[3];
   stbi__uint32 ioff=0, idata_limit=0, i, pal_len=0;
   int first=1,k,interlace=0, color=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?)");
            z->depth = stbi__get8(s);  if (z->depth != 1 && z->depth != 2 && z->depth != 4 && z->depth != 8 && z->depth != 16)  return stbi__err("1/2/4/8/16-bit only","PNG not supported: 1/2/4/8/16-bit only");
            color = stbi__get8(s);  if (color > 6)         return stbi__err("bad ctype","Corrupt PNG");
            if (color == 3 && z->depth == 16)                  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;
               if (z->depth == 16) {
                  for (k = 0; k < s->img_n; ++k) tc16[k] = (stbi__uint16)stbi__get16be(s); // copy the values as-is
               } else {
                  for (k = 0; k < s->img_n; ++k) tc[k] = (stbi_uc)(stbi__get16be(s) & 255) * stbi__depth_scale_table[z->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 * z->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, z->depth, color, interlace)) return 0;
            if (has_trans) {
               if (z->depth == 16) {
                  if (!stbi__compute_transparency16(z, tc16, s->img_out_n)) return 0;
               } else {
                  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;
            } else if (has_trans) {
               // non-paletted image with tRNS -> source image has (constant) alpha
               ++s->img_n;
            }
            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
movq %rsp, %rbp
subq $0x490, %rsp            # imm = 0x490
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movb $0x0, -0x421(%rbp)
movb $0x0, -0x422(%rbp)
leaq -0x425(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x7290
movl $0x0, -0x430(%rbp)
movl $0x0, -0x434(%rbp)
movl $0x0, -0x43c(%rbp)
movl $0x1, -0x440(%rbp)
movl $0x0, -0x448(%rbp)
movl $0x0, -0x44c(%rbp)
movl $0x0, -0x450(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x458(%rbp)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x458(%rbp), %rdi
callq 0x69890
cmpl $0x0, %eax
jne 0x69bbb
movl $0x0, -0x4(%rbp)
jmp 0x6a84d
cmpl $0x1, -0x14(%rbp)
jne 0x69bcd
movl $0x1, -0x4(%rbp)
jmp 0x6a84d
jmp 0x69bcf
movq -0x458(%rbp), %rdi
callq 0x6b3e0
movq %rax, -0x460(%rbp)
movl -0x45c(%rbp), %eax
movl %eax, -0x484(%rbp)
subl $0x43674249, %eax       # imm = 0x43674249
je 0x69c55
jmp 0x69bf7
movl -0x484(%rbp), %eax
subl $0x49444154, %eax       # imm = 0x49444154
je 0x6a305
jmp 0x69c0a
movl -0x484(%rbp), %eax
subl $0x49454e44, %eax       # imm = 0x49454E44
je 0x6a4ad
jmp 0x69c1d
movl -0x484(%rbp), %eax
subl $0x49484452, %eax       # imm = 0x49484452
je 0x69c76
jmp 0x69c2c
movl -0x484(%rbp), %eax
subl $0x504c5445, %eax       # imm = 0x504C5445
je 0x69fbe
jmp 0x69c3f
movl -0x484(%rbp), %eax
subl $0x74524e53, %eax       # imm = 0x74524E53
je 0x6a0e7
jmp 0x6a79c
movl $0x1, -0x450(%rbp)
movq -0x458(%rbp), %rdi
movl -0x460(%rbp), %esi
callq 0x661f0
jmp 0x6a83c
cmpl $0x0, -0x440(%rbp)
jne 0x69c93
leaq 0x1761b(%rip), %rdi     # 0x812a1
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movl $0x0, -0x440(%rbp)
cmpl $0xd, -0x460(%rbp)
je 0x69cba
leaq 0x17602(%rip), %rdi     # 0x812af
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x458(%rbp), %rdi
callq 0x6b410
movl %eax, %ecx
movq -0x458(%rbp), %rax
movl %ecx, (%rax)
movq -0x458(%rbp), %rax
cmpl $0x1000000, (%rax)      # imm = 0x1000000
jbe 0x69cf4
leaq 0x17411(%rip), %rdi     # 0x810f8
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x458(%rbp), %rdi
callq 0x6b410
movl %eax, %ecx
movq -0x458(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x458(%rbp), %rax
cmpl $0x1000000, 0x4(%rax)   # imm = 0x1000000
jbe 0x69d30
leaq 0x173d5(%rip), %rdi     # 0x810f8
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x458(%rbp), %rdi
callq 0x65d00
movzbl %al, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x20(%rax)
je 0x69d8c
movq -0x10(%rbp), %rax
cmpl $0x2, 0x20(%rax)
je 0x69d8c
movq -0x10(%rbp), %rax
cmpl $0x4, 0x20(%rax)
je 0x69d8c
movq -0x10(%rbp), %rax
cmpl $0x8, 0x20(%rax)
je 0x69d8c
movq -0x10(%rbp), %rax
cmpl $0x10, 0x20(%rax)
je 0x69d8c
leaq 0x1753d(%rip), %rdi     # 0x812bc
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x458(%rbp), %rdi
callq 0x65d00
movzbl %al, %eax
movl %eax, -0x44c(%rbp)
cmpl $0x6, -0x44c(%rbp)
jle 0x69dbe
leaq 0x1751f(%rip), %rdi     # 0x812d0
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
cmpl $0x3, -0x44c(%rbp)
jne 0x69de5
movq -0x10(%rbp), %rax
cmpl $0x10, 0x20(%rax)
jne 0x69de5
leaq 0x174f8(%rip), %rdi     # 0x812d0
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
cmpl $0x3, -0x44c(%rbp)
jne 0x69df7
movb $0x3, -0x421(%rbp)
jmp 0x69e1b
movl -0x44c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x69e19
leaq 0x174c4(%rip), %rdi     # 0x812d0
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
jmp 0x69e1b
movq -0x458(%rbp), %rdi
callq 0x65d00
movzbl %al, %eax
movl %eax, -0x464(%rbp)
cmpl $0x0, -0x464(%rbp)
je 0x69e4d
leaq 0x1749a(%rip), %rdi     # 0x812da
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x458(%rbp), %rdi
callq 0x65d00
movzbl %al, %eax
movl %eax, -0x468(%rbp)
cmpl $0x0, -0x468(%rbp)
je 0x69e7f
leaq 0x17478(%rip), %rdi     # 0x812ea
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x458(%rbp), %rdi
callq 0x65d00
movzbl %al, %eax
movl %eax, -0x448(%rbp)
cmpl $0x1, -0x448(%rbp)
jle 0x69eb1
leaq 0x17458(%rip), %rdi     # 0x812fc
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x458(%rbp), %rax
cmpl $0x0, (%rax)
je 0x69eca
movq -0x458(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x69ede
leaq 0x17440(%rip), %rdi     # 0x81311
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
cmpb $0x0, -0x421(%rbp)
jne 0x69f76
movl -0x44c(%rbp), %edx
andl $0x2, %edx
movl $0x1, %ecx
movl $0x3, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movl -0x44c(%rbp), %esi
andl $0x4, %esi
xorl %eax, %eax
movl $0x1, %edx
cmpl $0x0, %esi
cmovnel %edx, %eax
addl %eax, %ecx
movq -0x458(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x458(%rbp), %rcx
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl (%rcx)
movq -0x458(%rbp), %rcx
xorl %edx, %edx
divl 0x8(%rcx)
movq -0x458(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x69f62
leaq 0x171a3(%rip), %rdi     # 0x810f8
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
cmpl $0x2, -0x14(%rbp)
jne 0x69f74
movl $0x1, -0x4(%rbp)
jmp 0x6a84d
jmp 0x69fb9
movq -0x458(%rbp), %rax
movl $0x1, 0x8(%rax)
movq -0x458(%rbp), %rcx
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl (%rcx)
shrl $0x2, %eax
movq -0x458(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x69fb7
leaq 0x1714e(%rip), %rdi     # 0x810f8
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
jmp 0x69fb9
jmp 0x6a83c
cmpl $0x0, -0x440(%rbp)
je 0x69fdb
leaq 0x17351(%rip), %rdi     # 0x8131f
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
cmpl $0x300, -0x460(%rbp)    # imm = 0x300
jbe 0x69ffb
leaq 0x17340(%rip), %rdi     # 0x8132e
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movl -0x460(%rbp), %eax
movl $0x3, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x43c(%rbp)
imull $0x3, -0x43c(%rbp), %eax
cmpl -0x460(%rbp), %eax
je 0x6a033
leaq 0x17308(%rip), %rdi     # 0x8132e
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movl $0x0, -0x438(%rbp)
movl -0x438(%rbp), %eax
cmpl -0x43c(%rbp), %eax
jae 0x6a0e2
movq -0x458(%rbp), %rdi
callq 0x65d00
movb %al, %cl
movl -0x438(%rbp), %eax
shll $0x2, %eax
addl $0x0, %eax
movl %eax, %eax
movb %cl, -0x420(%rbp,%rax)
movq -0x458(%rbp), %rdi
callq 0x65d00
movb %al, %cl
movl -0x438(%rbp), %eax
shll $0x2, %eax
addl $0x1, %eax
movl %eax, %eax
movb %cl, -0x420(%rbp,%rax)
movq -0x458(%rbp), %rdi
callq 0x65d00
movb %al, %cl
movl -0x438(%rbp), %eax
shll $0x2, %eax
addl $0x2, %eax
movl %eax, %eax
movb %cl, -0x420(%rbp,%rax)
movl -0x438(%rbp), %eax
shll $0x2, %eax
addl $0x3, %eax
movl %eax, %eax
movb $-0x1, -0x420(%rbp,%rax)
movl -0x438(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x438(%rbp)
jmp 0x6a03d
jmp 0x6a83c
cmpl $0x0, -0x440(%rbp)
je 0x6a104
leaq 0x17228(%rip), %rdi     # 0x8131f
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6a123
leaq 0x17225(%rip), %rdi     # 0x8133b
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
cmpb $0x0, -0x421(%rbp)
je 0x6a1e7
cmpl $0x2, -0x14(%rbp)
jne 0x6a150
movq -0x458(%rbp), %rax
movl $0x4, 0x8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6a84d
cmpl $0x0, -0x43c(%rbp)
jne 0x6a16d
leaq 0x171eb(%rip), %rdi     # 0x8134b
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movl -0x460(%rbp), %eax
cmpl -0x43c(%rbp), %eax
jbe 0x6a18f
leaq 0x171da(%rip), %rdi     # 0x8135c
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movb $0x4, -0x421(%rbp)
movl $0x0, -0x438(%rbp)
movl -0x438(%rbp), %eax
cmpl -0x460(%rbp), %eax
jae 0x6a1e2
movq -0x458(%rbp), %rdi
callq 0x65d00
movb %al, %cl
movl -0x438(%rbp), %eax
shll $0x2, %eax
addl $0x3, %eax
movl %eax, %eax
movb %cl, -0x420(%rbp,%rax)
movl -0x438(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x438(%rbp)
jmp 0x6a1a0
jmp 0x6a300
movq -0x458(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x6a20d
leaq 0x17169(%rip), %rdi     # 0x81369
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movl -0x460(%rbp), %eax
movq -0x458(%rbp), %rcx
movl 0x8(%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
je 0x6a237
leaq 0x17132(%rip), %rdi     # 0x8135c
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movb $0x1, -0x422(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x10, 0x20(%rax)
jne 0x6a295
movl $0x0, -0x444(%rbp)
movl -0x444(%rbp), %eax
movq -0x458(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x6a293
movq -0x458(%rbp), %rdi
callq 0x65e40
movw %ax, %cx
movslq -0x444(%rbp), %rax
movw %cx, -0x42c(%rbp,%rax,2)
movl -0x444(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x444(%rbp)
jmp 0x6a252
jmp 0x6a2fe
movl $0x0, -0x444(%rbp)
movl -0x444(%rbp), %eax
movq -0x458(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x6a2fc
movq -0x458(%rbp), %rdi
callq 0x65e40
andl $0xff, %eax
movzbl %al, %eax
movq -0x10(%rbp), %rcx
movslq 0x20(%rcx), %rdx
leaq 0x15294(%rip), %rcx     # 0x7f568
movzbl (%rcx,%rdx), %ecx
imull %ecx, %eax
movb %al, %cl
movslq -0x444(%rbp), %rax
movb %cl, -0x425(%rbp,%rax)
movl -0x444(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x444(%rbp)
jmp 0x6a29f
jmp 0x6a2fe
jmp 0x6a300
jmp 0x6a83c
cmpl $0x0, -0x440(%rbp)
je 0x6a322
leaq 0x1700a(%rip), %rdi     # 0x8131f
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
cmpb $0x0, -0x421(%rbp)
je 0x6a348
cmpl $0x0, -0x43c(%rbp)
jne 0x6a348
leaq 0x1703e(%rip), %rdi     # 0x81379
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
cmpl $0x2, -0x14(%rbp)
jne 0x6a36b
movzbl -0x421(%rbp), %ecx
movq -0x458(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6a84d
movl -0x430(%rbp), %eax
addl -0x460(%rbp), %eax
cmpl -0x430(%rbp), %eax
jge 0x6a38b
movl $0x0, -0x4(%rbp)
jmp 0x6a84d
movl -0x430(%rbp), %eax
addl -0x460(%rbp), %eax
cmpl -0x434(%rbp), %eax
jbe 0x6a45a
movl -0x434(%rbp), %eax
movl %eax, -0x46c(%rbp)
cmpl $0x0, -0x434(%rbp)
jne 0x6a3eb
cmpl $0x1000, -0x460(%rbp)   # imm = 0x1000
jbe 0x6a3d2
movl -0x460(%rbp), %eax
movl %eax, -0x488(%rbp)
jmp 0x6a3df
movl $0x1000, %eax           # imm = 0x1000
movl %eax, -0x488(%rbp)
jmp 0x6a3df
movl -0x488(%rbp), %eax
movl %eax, -0x434(%rbp)
jmp 0x6a3ed
movl -0x430(%rbp), %eax
addl -0x460(%rbp), %eax
cmpl -0x434(%rbp), %eax
jbe 0x6a411
movl -0x434(%rbp), %eax
shll %eax
movl %eax, -0x434(%rbp)
jmp 0x6a3ed
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x434(%rbp), %eax
movl %eax, %esi
callq 0x77d0
movq %rax, -0x478(%rbp)
cmpq $0x0, -0x478(%rbp)
jne 0x6a44b
leaq 0x16cc4(%rip), %rdi     # 0x81102
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x478(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x458(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x430(%rbp), %eax
addq %rax, %rsi
movl -0x460(%rbp), %edx
callq 0x6b450
cmpl $0x0, %eax
jne 0x6a496
leaq 0x16ef8(%rip), %rdi     # 0x81381
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movl -0x460(%rbp), %eax
addl -0x430(%rbp), %eax
movl %eax, -0x430(%rbp)
jmp 0x6a83c
cmpl $0x0, -0x440(%rbp)
je 0x6a4ca
leaq 0x16e62(%rip), %rdi     # 0x8131f
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
cmpl $0x0, -0x14(%rbp)
je 0x6a4dc
movl $0x1, -0x4(%rbp)
jmp 0x6a84d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x6a4fb
leaq 0x16e9d(%rip), %rdi     # 0x8138b
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x458(%rbp), %rax
movl (%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x20(%rcx), %eax
addl $0x7, %eax
shrl $0x3, %eax
movl %eax, -0x480(%rbp)
movl -0x480(%rbp), %eax
movq -0x458(%rbp), %rcx
imull 0x4(%rcx), %eax
movq -0x458(%rbp), %rcx
imull 0x8(%rcx), %eax
movq -0x458(%rbp), %rcx
addl 0x4(%rcx), %eax
movl %eax, -0x47c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x430(%rbp), %esi
movl -0x47c(%rbp), %edx
cmpl $0x0, -0x450(%rbp)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %r8d
leaq -0x47c(%rbp), %rcx
callq 0x57120
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x6a598
movl $0x0, -0x4(%rbp)
jmp 0x6a84d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x75e0
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movl -0x18(%rbp), %eax
movq -0x458(%rbp), %rcx
movl 0x8(%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0x6a5d4
cmpl $0x3, -0x18(%rbp)
je 0x6a5d4
cmpb $0x0, -0x421(%rbp)
je 0x6a5dd
cmpb $0x0, -0x422(%rbp)
je 0x6a5f6
movq -0x458(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movq -0x458(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x6a60a
movq -0x458(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x458(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movl -0x47c(%rbp), %edx
movq -0x458(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x10(%rbp), %rax
movl 0x20(%rax), %r8d
movl -0x44c(%rbp), %r9d
movl -0x448(%rbp), %eax
movl %eax, (%rsp)
callq 0x6b580
cmpl $0x0, %eax
jne 0x6a654
movl $0x0, -0x4(%rbp)
jmp 0x6a84d
cmpb $0x0, -0x422(%rbp)
je 0x6a6c3
movq -0x10(%rbp), %rax
cmpl $0x10, 0x20(%rax)
jne 0x6a694
movq -0x10(%rbp), %rdi
leaq -0x42c(%rbp), %rsi
movq -0x458(%rbp), %rax
movl 0xc(%rax), %edx
callq 0x6b950
cmpl $0x0, %eax
jne 0x6a692
movl $0x0, -0x4(%rbp)
jmp 0x6a84d
jmp 0x6a6c1
movq -0x10(%rbp), %rdi
leaq -0x425(%rbp), %rsi
movq -0x458(%rbp), %rax
movl 0xc(%rax), %edx
callq 0x6baa0
cmpl $0x0, %eax
jne 0x6a6bf
movl $0x0, -0x4(%rbp)
jmp 0x6a84d
jmp 0x6a6c1
jmp 0x6a6c3
cmpl $0x0, -0x450(%rbp)
je 0x6a6eb
cmpl $0x0, 0x46465(%rip)     # 0xb0b38
je 0x6a6eb
movq -0x458(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jle 0x6a6eb
movq -0x10(%rbp), %rdi
callq 0x6bbe0
cmpb $0x0, -0x421(%rbp)
je 0x6a75c
movzbl -0x421(%rbp), %ecx
movq -0x458(%rbp), %rax
movl %ecx, 0x8(%rax)
movzbl -0x421(%rbp), %ecx
movq -0x458(%rbp), %rax
movl %ecx, 0xc(%rax)
cmpl $0x3, -0x18(%rbp)
jl 0x6a729
movl -0x18(%rbp), %ecx
movq -0x458(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x10(%rbp), %rdi
leaq -0x420(%rbp), %rsi
movl -0x43c(%rbp), %edx
movq -0x458(%rbp), %rax
movl 0xc(%rax), %ecx
callq 0x6bdd0
cmpl $0x0, %eax
jne 0x6a75a
movl $0x0, -0x4(%rbp)
jmp 0x6a84d
jmp 0x6a777
cmpb $0x0, -0x422(%rbp)
je 0x6a775
movq -0x458(%rbp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
jmp 0x6a777
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x75e0
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x6a84d
cmpl $0x0, -0x440(%rbp)
je 0x6a7b9
leaq 0x16b73(%rip), %rdi     # 0x8131f
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movl -0x45c(%rbp), %eax
andl $0x20000000, %eax       # imm = 0x20000000
cmpl $0x0, %eax
jne 0x6a82a
movl -0x45c(%rbp), %eax
shrl $0x18, %eax
andl $0xff, %eax
movb %al, 0x45df3(%rip)      # 0xb05d0
movl -0x45c(%rbp), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, 0x45de0(%rip)      # 0xb05d1
movl -0x45c(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, 0x45dcd(%rip)      # 0xb05d2
movl -0x45c(%rbp), %eax
shrl $0x0, %eax
andl $0xff, %eax
movb %al, 0x45dba(%rip)      # 0xb05d3
leaq 0x45db0(%rip), %rdi     # 0xb05d0
callq 0x56040
movl %eax, -0x4(%rbp)
jmp 0x6a84d
movq -0x458(%rbp), %rdi
movl -0x460(%rbp), %esi
callq 0x661f0
movq -0x458(%rbp), %rdi
callq 0x6b410
jmp 0x69bcf
movl -0x4(%rbp), %eax
addq $0x490, %rsp            # imm = 0x490
popq %rbp
retq
nopl (%rax)