// File: /workspace/github_c_makefile_star2_O1/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 $0x4f8, %rsp            # imm = 0x4F8
movl %edx, %r14d
movl %esi, %ebx
movq (%rdi), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rdi, 0x20(%rsp)
movq $0x0, 0x18(%rdi)
movq %rbp, %rdi
callq 0x1bbe5
testl %eax, %eax
je 0x1ce5d
movl %r14d, 0x68(%rsp)
movl $0x1, 0x4(%rsp)
movl %ebx, 0x3c(%rsp)
cmpl $0x1, %ebx
je 0x1ce65
movq 0x20(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x58(%rsp)
leaq 0x38(%rbp), %r15
leaq 0x39(%rbp), %rax
movq %rax, 0x40(%rsp)
movq $0x0, 0xc0(%rsp)
movl $0x1, 0x8(%rsp)
movq $0x0, 0x78(%rsp)
xorl %r12d, %r12d
movl $0x0, 0x4c(%rsp)
movq $0x0, 0x60(%rsp)
xorl %r13d, %r13d
movq $0x0, 0x70(%rsp)
movq $0x0, 0x88(%rsp)
movl $0x0, 0xc(%rsp)
movq %rbp, 0x10(%rsp)
movq %r15, 0x90(%rsp)
movq %r12, 0x18(%rsp)
movq %r13, 0x28(%rsp)
movq %rbp, %rdi
callq 0x1aea1
movl %eax, %r13d
shll $0x10, %r13d
movq %rbp, %rdi
callq 0x1aea1
movl %eax, %r12d
leal (%r12,%r13), %r15d
movq %rbp, %rdi
callq 0x1aea1
movl %eax, %r14d
movl %eax, %ebx
shll $0x10, %ebx
movq %rbp, %rdi
callq 0x1aea1
orl %eax, %ebx
cmpl $0x49484451, %ebx       # imm = 0x49484451
jg 0x1be13
cmpl $0x43674249, %ebx       # imm = 0x43674249
je 0x1beb5
cmpl $0x49444154, %ebx       # imm = 0x49444154
movq 0x10(%rsp), %rbp
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %r12
je 0x1bf57
cmpl $0x49454e44, %ebx       # imm = 0x49454E44
jne 0x1bf04
cmpl $0x0, 0x8(%rsp)
je 0x1bfef
leaq 0x63b2(%rip), %rax      # 0x221b1
movq %rax, 0xc602(%rip)      # 0x28408
movl $0x0, 0x4(%rsp)
jmp 0x1ccd8
cmpl $0x74524e53, %ebx       # imm = 0x74524E53
je 0x1bedc
cmpl $0x504c5445, %ebx       # imm = 0x504C5445
je 0x1bf7f
cmpl $0x49484452, %ebx       # imm = 0x49484452
movq 0x10(%rsp), %rbp
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %r12
jne 0x1bf04
cmpl $0x0, 0x8(%rsp)
je 0x1c007
cmpl $0xd, %r15d
jne 0x1c230
movq %rbp, %rdi
callq 0x1aea1
movl %eax, %ebx
shll $0x10, %ebx
movq %rbp, %rdi
callq 0x1aea1
orl %ebx, %eax
movl %eax, (%rbp)
cmpl $0x1000001, %eax        # imm = 0x1000001
movq 0x90(%rsp), %r15
jae 0x1bea9
movq %rbp, %rdi
callq 0x1aea1
movl %eax, %ebx
shll $0x10, %ebx
movq %rbp, %rdi
callq 0x1aea1
orl %ebx, %eax
movl %eax, 0x4(%rbp)
cmpl $0x1000001, %eax        # imm = 0x1000001
jb 0x1c428
leaq 0x60cd(%rip), %rax      # 0x21f7d
jmp 0x1c237
movl $0x1, 0x4c(%rsp)
movq 0x10(%rsp), %rbp
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %r12
movq %rbp, %rdi
movl %r15d, %esi
callq 0x1b0e3
jmp 0x1c25d
cmpl $0x0, 0x8(%rsp)
je 0x1bfb1
leaq 0x62c3(%rip), %rax      # 0x221b1
movq %rax, 0xc513(%rip)      # 0x28408
xorl %eax, %eax
movl $0x1, 0x8(%rsp)
jmp 0x1bfd8
cmpl $0x0, 0x8(%rsp)
jne 0x1bf62
movl $0x0, 0x8(%rsp)
btl $0xd, %r14d
jb 0x1becc
movl %ebx, %ecx
shrl $0x18, %ecx
movb %cl, 0xc47b(%rip)       # 0x283a0
movl %ebx, %ecx
shrl $0x10, %ecx
movb %cl, 0xc471(%rip)       # 0x283a1
movb %bh, 0xc46c(%rip)       # 0x283a2
movb %al, 0xc467(%rip)       # 0x283a3
leaq 0xc45d(%rip), %rax      # 0x283a0
movq %rax, 0xc4be(%rip)      # 0x28408
movl $0x0, 0x8(%rsp)
jmp 0x1c04a
cmpl $0x0, 0x8(%rsp)
je 0x1c013
leaq 0x6248(%rip), %rax      # 0x221b1
movq %rax, 0xc498(%rip)      # 0x28408
xorl %eax, %eax
movl $0x1, 0x8(%rsp)
jmp 0x1c04c
cmpl $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rbp
movq 0x28(%rsp), %r13
je 0x1c059
leaq 0x6216(%rip), %rax      # 0x221b1
movq %rax, 0xc466(%rip)      # 0x28408
xorl %eax, %eax
movl $0x1, 0x8(%rsp)
jmp 0x1c28c
movq 0x58(%rsp), %rax
cmpq $0x0, (%rax)
je 0x1c2c6
leaq 0x6206(%rip), %rax      # 0x221cd
movq %rax, 0xc43a(%rip)      # 0x28408
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
movl $0x0, 0x4(%rsp)
movq 0x10(%rsp), %rbp
movq 0x28(%rsp), %r13
jmp 0x1c294
cmpl $0x0, 0x3c(%rsp)
je 0x1c2ff
movl $0x1, 0x4(%rsp)
jmp 0x1ccd8
leaq 0x6128(%rip), %rax      # 0x22136
jmp 0x1c237
cmpb $0x0, 0xc(%rsp)
movq 0x60(%rsp), %rax
je 0x1c29e
testl %eax, %eax
jne 0x1c29e
leaq 0x61d9(%rip), %rax      # 0x2220b
movq %rax, 0xc3cf(%rip)      # 0x28408
movl $0x0, 0x8(%rsp)
movq $0x0, 0x60(%rsp)
xorl %eax, %eax
movl $0x0, 0x4(%rsp)
jmp 0x1ccda
cmpl $0x301, %r15d           # imm = 0x301
jae 0x1c274
movl %r12d, %eax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
shrq $0x20, %rax
movq %rax, 0x60(%rsp)
leal (%rax,%rax,2), %eax
cmpl %r15d, %eax
jne 0x1c274
movl $0x0, 0x8(%rsp)
cmpl $0x3, %r12d
movq 0x90(%rsp), %r15
jb 0x1ccf1
movl 0x60(%rsp), %ebx
xorl %r14d, %r14d
movq 0x18(%rsp), %r12
movq 0xb8(%rbp), %rax
cmpq 0xc0(%rbp), %rax
jb 0x1c110
cmpl $0x0, 0x30(%rbp)
je 0x1c0e7
movq 0x28(%rbp), %rdi
movl 0x34(%rbp), %edx
movq %r15, %rsi
callq *0x10(%rbp)
testl %eax, %eax
je 0x1c0eb
movq %r15, 0xb8(%rbp)
cltq
addq %r15, %rax
movq %rax, 0xc0(%rbp)
jmp 0x1c109
xorl %eax, %eax
jmp 0x1c11d
movl $0x0, 0x30(%rbp)
movq %r15, 0xb8(%rbp)
movq 0x40(%rsp), %rax
movq %rax, 0xc0(%rbp)
movb $0x0, 0x38(%rbp)
movq 0xb8(%rbp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbp)
movb (%rax), %al
movb %al, 0xf0(%rsp,%r14,4)
movq 0xb8(%rbp), %rax
cmpq 0xc0(%rbp), %rax
jb 0x1c18a
cmpl $0x0, 0x30(%rbp)
je 0x1c161
movq 0x28(%rbp), %rdi
movl 0x34(%rbp), %edx
movq %r15, %rsi
callq *0x10(%rbp)
testl %eax, %eax
je 0x1c165
movq %r15, 0xb8(%rbp)
cltq
addq %r15, %rax
movq %rax, 0xc0(%rbp)
jmp 0x1c183
xorl %eax, %eax
jmp 0x1c197
movl $0x0, 0x30(%rbp)
movq %r15, 0xb8(%rbp)
movq 0x40(%rsp), %rax
movq %rax, 0xc0(%rbp)
movb $0x0, 0x38(%rbp)
movq 0xb8(%rbp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbp)
movb (%rax), %al
movb %al, 0xf1(%rsp,%r14,4)
movq 0xb8(%rbp), %rax
cmpq 0xc0(%rbp), %rax
jb 0x1c204
cmpl $0x0, 0x30(%rbp)
je 0x1c1db
movq 0x28(%rbp), %rdi
movl 0x34(%rbp), %edx
movq %r15, %rsi
callq *0x10(%rbp)
testl %eax, %eax
je 0x1c1df
movq %r15, 0xb8(%rbp)
cltq
addq %r15, %rax
movq %rax, 0xc0(%rbp)
jmp 0x1c1fd
xorl %eax, %eax
jmp 0x1c211
movl $0x0, 0x30(%rbp)
movq %r15, 0xb8(%rbp)
movq 0x40(%rsp), %rax
movq %rax, 0xc0(%rbp)
movb $0x0, 0x38(%rbp)
movq 0xb8(%rbp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbp)
movb (%rax), %al
movb %al, 0xf2(%rsp,%r14,4)
movb $-0x1, 0xf3(%rsp,%r14,4)
incq %r14
cmpq %r14, %rbx
jne 0x1c0ab
jmp 0x1c25d
leaq 0x5f0d(%rip), %rax      # 0x22144
movq %rax, 0xc1ca(%rip)      # 0x28408
xorl %ecx, %ecx
movl $0x0, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, %eax
testb %cl, %cl
je 0x1ccda
movq %rbp, %rdi
callq 0x1aea1
movq %rbp, %rdi
callq 0x1aea1
movb $0x1, %al
jmp 0x1ccda
leaq 0x5f45(%rip), %rax      # 0x221c0
movq %rax, 0xc186(%rip)      # 0x28408
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
movl $0x0, 0x4(%rsp)
movq 0x18(%rsp), %r12
jmp 0x1ccda
cmpl $0x2, 0x3c(%rsp)
jne 0x1c3be
movzbl 0xc(%rsp), %eax
movl %eax, 0x8(%rbp)
movl $0x1, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
jmp 0x1ccd8
cmpb $0x0, 0xc(%rsp)
je 0x1c473
cmpl $0x2, 0x3c(%rsp)
jne 0x1c4a7
movq 0x10(%rsp), %rbp
movl $0x4, 0x8(%rbp)
movl $0x1, 0x4(%rsp)
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
jmp 0x1bfe5
movq 0x58(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1c49b
movl (%rbp), %eax
imull %r12d, %eax
addl $0x7, %eax
shrl $0x3, %eax
movl 0x4(%rbp), %ecx
movl 0x8(%rbp), %edx
imull %ecx, %edx
imull %eax, %edx
addl %ecx, %edx
movl %edx, 0x6c(%rsp)
xorl %r8d, %r8d
cmpl $0x0, 0x4c(%rsp)
sete %r8b
movq 0x70(%rsp), %rsi
leaq 0x6c(%rsp), %rcx
callq 0x11344
movq 0x20(%rsp), %rcx
movq %rax, 0x10(%rcx)
movl $0x0, 0x4(%rsp)
testq %rax, %rax
je 0x1ccd8
movl 0x68(%rsp), %r12d
cmpl $0x3, %r12d
setne %bl
movq 0x58(%rsp), %r14
movq (%r14), %rdi
callq 0x83f0
movq $0x0, (%r14)
movl 0x8(%rbp), %eax
leal 0x1(%rax), %ecx
cmpl %r12d, %ecx
sete %dl
cmpb $0x0, 0xc(%rsp)
sete %sil
andb %bl, %sil
andb %dl, %sil
cmpb $0x0, 0x88(%rsp)
setne %dl
orb %sil, %dl
cmpb $0x1, %dl
jne 0x1c4c9
movl %ecx, 0xc(%rbp)
jmp 0x1c4cc
movq 0x70(%rsp), %rax
leal (%r15,%rax), %ebp
movl $0x0, 0x8(%rsp)
cmpl %eax, %ebp
jl 0x1cb86
cmpl %r13d, %ebp
jbe 0x1cb3a
cmpl $0x1001, %r15d          # imm = 0x1001
movl $0x1000, %eax           # imm = 0x1000
cmovael %r15d, %eax
testl %r13d, %r13d
cmovnel %r13d, %eax
movl %eax, %r13d
leal (,%r13,2), %eax
cmpl %r13d, %ebp
ja 0x1c3f7
movq 0x58(%rsp), %rbx
movq (%rbx), %rdi
movl %r13d, %esi
callq 0x8590
testq %rax, %rax
je 0x1cb1f
movq %rax, (%rbx)
jmp 0x1cb35
movq 0xb8(%rbp), %rax
cmpq 0xc0(%rbp), %rax
jb 0x1caa3
cmpl $0x0, 0x30(%rbp)
je 0x1c8ba
movq 0x28(%rbp), %rdi
movl 0x34(%rbp), %edx
movq %r15, %rsi
callq *0x10(%rbp)
testl %eax, %eax
je 0x1ca7e
movq %r15, 0xb8(%rbp)
cltq
addq %r15, %rax
movq %rax, 0xc0(%rbp)
jmp 0x1ca9c
movq 0x10(%rsp), %rbp
movl 0x8(%rbp), %eax
testb $0x1, %al
leaq 0x571c(%rip), %r12      # 0x21ba0
movq 0x28(%rsp), %r13
jne 0x1c7b1
leaq 0x5d65(%rip), %rax      # 0x221fb
jmp 0x1c980
leaq 0x5d7b(%rip), %rax      # 0x2221d
jmp 0x1bdff
movq 0x60(%rsp), %rax
testl %eax, %eax
je 0x1c896
cmpl %r15d, %eax
jae 0x1c8c1
leaq 0x5d2a(%rip), %rax      # 0x221ee
jmp 0x1bfc7
movl %eax, 0xc(%rbp)
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rdi), %rsi
movl 0x6c(%rsp), %edx
movslq 0xc(%rbp), %rcx
movl (%rax), %r8d
movl 0x4(%rax), %r9d
cmpl $0x0, 0xc0(%rsp)
movq 0x18(%rsp), %r12
je 0x1c809
movq %rsi, 0xc8(%rsp)
movq %rcx, 0xa0(%rsp)
imull %ecx, %r8d
imull %r9d, %r8d
movq %r8, %rdi
movl %edx, 0x38(%rsp)
callq 0x8430
movl 0x38(%rsp), %r9d
movq 0x20(%rsp), %rdi
movq %rax, 0x80(%rsp)
xorl %r10d, %r10d
movq (%rdi), %rbx
leaq 0x5673(%rip), %rax      # 0x21bb0
movslq (%rax,%r10,4), %rcx
leaq 0x56a8(%rip), %rax      # 0x21bf0
movslq (%rax,%r10,4), %r11
movq %rcx, 0x98(%rsp)
movl %ecx, %esi
notl %esi
addl (%rbx), %esi
addl %r11d, %esi
movl %esi, %eax
xorl %edx, %edx
divl %r11d
movl %eax, 0x54(%rsp)
leaq 0x5661(%rip), %rax      # 0x21bd0
movl (%rax,%r10,4), %r8d
leaq 0x5696(%rip), %rax      # 0x21c10
movl (%rax,%r10,4), %r14d
movl %r8d, %ecx
notl %ecx
addl 0x4(%rbx), %ecx
addl %r14d, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %r14d
movl %eax, 0x48(%rsp)
movb $0x1, %al
cmpl %esi, %r11d
ja 0x1c78e
cmpl %ecx, %r14d
ja 0x1c78e
movl %r14d, 0x50(%rsp)
movl %r8d, 0xb0(%rsp)
movq %r11, %r14
movq %r10, 0xd0(%rsp)
movl 0x54(%rsp), %r8d
movl %r8d, %eax
imull %r12d, %eax
imull 0x8(%rbx), %eax
movl %eax, 0xbc(%rsp)
movq 0xc8(%rsp), %rsi
movl %r9d, 0x38(%rsp)
movl %r9d, %edx
movq 0xa0(%rsp), %rcx
movl 0x48(%rsp), %ebx
movl %ebx, %r9d
pushq 0x78(%rsp)
pushq %r12
callq 0x1d497
addq $0x10, %rsp
testl %eax, %eax
je 0x1c76d
testl %ebx, %ebx
movl 0xb0(%rsp), %ebp
movl 0x50(%rsp), %edx
jle 0x1c71b
movslq 0x54(%rsp), %r12
movl 0x48(%rsp), %eax
movq %rax, 0xd8(%rsp)
movq 0xa0(%rsp), %rax
imull %eax, %ebp
imull %eax, %edx
movq 0x98(%rsp), %rbx
imulq %rax, %rbx
addq 0x80(%rsp), %rbx
movq %rbx, 0x98(%rsp)
imulq %rax, %r14
movq $0x0, 0xa8(%rsp)
movl %edx, 0x50(%rsp)
cmpl $0x0, 0x54(%rsp)
movq 0xa0(%rsp), %r15
jle 0x1c6f4
movq 0x20(%rsp), %rax
movq (%rax), %rdx
movq %rdx, 0xb0(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0xa8(%rsp), %rax
imulq %r12, %rax
movq %rax, 0xe0(%rsp)
movq 0x98(%rsp), %rbx
xorl %r13d, %r13d
movq 0xb0(%rsp), %rax
movl (%rax), %edi
imull %ebp, %edi
addq %rbx, %rdi
movq 0xe0(%rsp), %rax
leaq (%rax,%r13), %rsi
imulq %r15, %rsi
addq 0xe8(%rsp), %rsi
movq %r15, %rdx
callq 0x82a0
incq %r13
addq %r14, %rbx
cmpq %r12, %r13
jl 0x1c6b9
movq 0xa8(%rsp), %rdi
incq %rdi
movl 0x50(%rsp), %edx
addl %edx, %ebp
movq %rdi, 0xa8(%rsp)
cmpq 0xd8(%rsp), %rdi
jb 0x1c66f
movl 0xbc(%rsp), %ebp
addl $0x7, %ebp
sarl $0x3, %ebp
incl %ebp
imull 0x48(%rsp), %ebp
movq 0x20(%rsp), %rbx
movq 0x18(%rbx), %rdi
callq 0x83f0
movq %rbx, %rdi
movl %ebp, %eax
addq %rax, 0xc8(%rsp)
movl 0x38(%rsp), %r9d
subl %ebp, %r9d
movq 0x10(%rsp), %rbp
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %r12
movq 0xd0(%rsp), %r10
movb $0x1, %al
jmp 0x1c78e
movq 0x80(%rsp), %rdi
callq 0x83f0
xorl %eax, %eax
movq 0x20(%rsp), %rdi
movl 0x38(%rsp), %r9d
movq 0xd0(%rsp), %r10
testb %al, %al
je 0x1ccd8
incq %r10
cmpq $0x7, %r10
jne 0x1c533
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rdi)
jmp 0x1c825
addl %eax, %eax
cmpl %r15d, %eax
jne 0x1c979
movb $0x1, %al
movq %rax, 0x88(%rsp)
cmpl $0x0, 0x8(%rbp)
jle 0x1c7f4
movl 0x18(%rsp), %ebx
xorl %r14d, %r14d
movq %rbp, %rdi
callq 0x1aea1
movl %eax, %ecx
movb (%rbx,%r12), %al
mulb %cl
movb %al, 0x35(%rsp,%r14)
incq %r14
movslq 0x8(%rbp), %rax
cmpq %rax, %r14
jl 0x1c7d3
movl $0x0, 0x8(%rsp)
movl $0x0, 0xc(%rsp)
jmp 0x1ccf1
pushq 0x78(%rsp)
pushq %r12
callq 0x1d497
movq 0x30(%rsp), %rdi
addq $0x10, %rsp
testl %eax, %eax
je 0x1ccd8
cmpb $0x0, 0x88(%rsp)
je 0x1c9c0
movl 0xc(%rbp), %ecx
movq (%rdi), %rdx
movq 0x18(%rdi), %rax
movl 0x4(%rdx), %edi
imull (%rdx), %edi
cmpl $0x2, %ecx
je 0x1c99e
cmpl $0x4, %ecx
jne 0x1ce7b
testl %edi, %edi
je 0x1c9c0
movb 0x35(%rsp), %cl
movb 0x36(%rsp), %dl
movb 0x37(%rsp), %sil
movl %edi, %edi
xorl %r8d, %r8d
cmpb %cl, (%rax,%r8,4)
jne 0x1c889
cmpb %dl, 0x1(%rax,%r8,4)
jne 0x1c889
cmpb %sil, 0x2(%rax,%r8,4)
jne 0x1c889
movb $0x0, 0x3(%rax,%r8,4)
incq %r8
cmpl %r8d, %edi
jne 0x1c86f
jmp 0x1c9c0
leaq 0x5940(%rip), %rax      # 0x221dd
movq %rax, 0xbb64(%rip)      # 0x28408
movl $0x0, 0x8(%rsp)
movq $0x0, 0x60(%rsp)
jmp 0x1bfd6
xorl %eax, %eax
jmp 0x1cab0
movb $0x4, %al
movl %eax, 0xc(%rsp)
movl $0x0, 0x8(%rsp)
testl %r15d, %r15d
je 0x1cce7
addl %r13d, %r12d
xorl %ebx, %ebx
movq 0x10(%rsp), %rbp
movq 0x90(%rsp), %r15
movq 0x28(%rsp), %r13
movq 0xb8(%rbp), %rax
cmpq 0xc0(%rbp), %rax
jb 0x1c954
cmpl $0x0, 0x30(%rbp)
je 0x1c92b
movq 0x28(%rbp), %rdi
movl 0x34(%rbp), %edx
movq %r15, %rsi
callq *0x10(%rbp)
testl %eax, %eax
je 0x1c92f
movq %r15, 0xb8(%rbp)
cltq
addq %r15, %rax
movq %rax, 0xc0(%rbp)
jmp 0x1c94d
xorl %eax, %eax
jmp 0x1c961
movl $0x0, 0x30(%rbp)
movq %r15, 0xb8(%rbp)
movq 0x40(%rsp), %rax
movq %rax, 0xc0(%rbp)
movb $0x0, 0x38(%rbp)
movq 0xb8(%rbp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbp)
movb (%rax), %al
movb %al, 0xf3(%rsp,%rbx,4)
incq %rbx
cmpq %rbx, %r12
jne 0x1c8ef
jmp 0x1ccf1
leaq 0x586e(%rip), %rax      # 0x221ee
movq %rax, 0xba81(%rip)      # 0x28408
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
movl $0x0, 0xc(%rsp)
jmp 0x1c28c
testl %edi, %edi
je 0x1c9c0
movb 0x35(%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 0x1c9aa
cmpl $0x0, 0x4c(%rsp)
je 0x1c9e0
cmpl $0x0, 0xba4a(%rip)      # 0x28418
je 0x1c9e0
cmpl $0x3, 0xc(%rbp)
jl 0x1c9e0
movq 0x20(%rsp), %rdi
callq 0x1d3a3
cmpb $0x0, 0xc(%rsp)
je 0x1ccbd
movl 0x68(%rsp), %eax
cmpl $0x3, %eax
movzbl 0xc(%rsp), %r14d
movl %r14d, 0x8(%rbp)
cmovgel %eax, %r14d
movl %r14d, 0xc(%rbp)
movq 0x20(%rsp), %rcx
movq (%rcx), %rax
movq 0x18(%rcx), %rbx
movl 0x4(%rax), %ebp
imull (%rax), %ebp
movl %ebp, %edi
imull %r14d, %edi
callq 0x8430
movq %rax, %r12
testq %rax, %rax
je 0x1cc6e
cmpl $0x3, %r14d
jne 0x1cc7e
testl %ebp, %ebp
je 0x1cc9d
movl %ebp, %eax
xorl %ecx, %ecx
movq %r12, %rdx
movzbl (%rbx,%rcx), %esi
movb 0xf0(%rsp,%rsi,4), %dil
movb %dil, (%rdx)
movb 0xf1(%rsp,%rsi,4), %dil
movb %dil, 0x1(%rdx)
movb 0xf2(%rsp,%rsi,4), %sil
movb %sil, 0x2(%rdx)
addq $0x3, %rdx
incq %rcx
cmpq %rcx, %rax
jne 0x1ca46
jmp 0x1cc9d
movl $0x0, 0x30(%rbp)
movq %r15, 0xb8(%rbp)
movq 0x40(%rsp), %rax
movq %rax, 0xc0(%rbp)
movb $0x0, 0x38(%rbp)
movq 0xb8(%rbp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbp)
movb (%rax), %al
movzbl %al, %r12d
cmpb $0x8, %r12b
ja 0x1cb0c
movl $0x116, %eax            # imm = 0x116
btl %r12d, %eax
jae 0x1cb0c
movq 0xb8(%rbp), %rax
cmpq 0xc0(%rbp), %rax
jb 0x1cbcb
cmpl $0x0, 0x30(%rbp)
je 0x1cb18
movq 0x28(%rbp), %rdi
movl 0x34(%rbp), %edx
movq %r15, %rsi
callq *0x10(%rbp)
testl %eax, %eax
je 0x1cba6
movq %r15, 0xb8(%rbp)
cltq
addq %r15, %rax
movq %rax, 0xc0(%rbp)
jmp 0x1cbc4
leaq 0x563e(%rip), %rax      # 0x22151
jmp 0x1c237
xorl %ebp, %ebp
jmp 0x1cbd9
leaq 0x5461(%rip), %rcx      # 0x21f87
movq %rcx, 0xb8db(%rip)      # 0x28408
movl $0x0, 0x4(%rsp)
testq %rax, %rax
je 0x1cb9a
movq 0x58(%rsp), %rax
movl 0x70(%rsp), %esi
addq (%rax), %rsi
movq 0x10(%rsp), %rdi
movl %r15d, %edx
callq 0x1d2f6
testl %eax, %eax
je 0x1cb70
movl $0x0, 0x8(%rsp)
movl %ebp, %eax
movq %rax, 0x70(%rsp)
movq 0x10(%rsp), %rbp
jmp 0x1c25d
leaq 0x569c(%rip), %rax      # 0x22213
movq %rax, 0xb88a(%rip)      # 0x28408
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
movl $0x0, 0x4(%rsp)
movq 0x10(%rsp), %rbp
jmp 0x1ccda
movl $0x0, 0x8(%rsp)
xorl %eax, %eax
jmp 0x1cb90
movl $0x0, 0x30(%rbp)
movq %r15, 0xb8(%rbp)
movq 0x40(%rsp), %rax
movq %rax, 0xc0(%rbp)
movb $0x0, 0x38(%rbp)
movq 0xb8(%rbp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbp)
movb (%rax), %bpl
movzbl %bpl, %eax
cmpb $0x7, %al
movq %rax, 0x78(%rsp)
jb 0x1cc08
leaq 0x5575(%rip), %rax      # 0x22162
movq %rax, 0xb814(%rip)      # 0x28408
xorl %ecx, %ecx
movl $0x0, 0x4(%rsp)
movq 0x10(%rsp), %rbp
jmp 0x1c248
movb $0x3, %bl
cmpl $0x3, %eax
je 0x1cc1b
testb $0x1, %bpl
jne 0x1cbe6
movl 0xc(%rsp), %ecx
movl %ecx, %ebx
movq 0x10(%rsp), %r14
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0x1cd22
cmpl $0x0, 0x30(%r14)
je 0x1cd3e
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1ccfb
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0x1cd1b
leaq 0x5312(%rip), %rax      # 0x21f87
movq %rax, 0xb78c(%rip)      # 0x28408
jmp 0x1ccae
testl %ebp, %ebp
je 0x1cc9d
movl %ebp, %eax
xorl %ecx, %ecx
movzbl (%rbx,%rcx), %edx
movl 0xf0(%rsp,%rdx,4), %edx
movl %edx, (%r12,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x1cc86
movq %rbx, %rdi
callq 0x83f0
movq 0x20(%rsp), %rax
movq %r12, 0x18(%rax)
testq %r12, %r12
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %r12
je 0x1ccd8
movq 0x20(%rsp), %rbx
movq 0x10(%rbx), %rdi
callq 0x83f0
movq $0x0, 0x10(%rbx)
jmp 0x1bffa
xorl %eax, %eax
testb %al, %al
jne 0x1bd70
jmp 0x1ce65
movq 0x10(%rsp), %rbp
movq 0x28(%rsp), %r13
movq 0x18(%rsp), %r12
jmp 0x1c25d
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
movq 0x40(%rsp), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
cmpb $0x0, (%rax)
je 0x1cd3e
leaq 0x5433(%rip), %rax      # 0x2216c
jmp 0x1cdc8
movq %r14, %rdi
callq 0x1ae1d
testb %al, %al
je 0x1cd53
leaq 0x542b(%rip), %rax      # 0x2217c
jmp 0x1cdc8
movq %r14, %rdi
callq 0x1ae1d
movzbl %al, %eax
movq %rax, 0xc0(%rsp)
cmpb $0x2, %al
jb 0x1cd73
leaq 0x541d(%rip), %rax      # 0x2218e
jmp 0x1cdc8
movl (%r14), %esi
testl %esi, %esi
je 0x1cdc1
movl 0x4(%r14), %ecx
testl %ecx, %ecx
je 0x1cdc1
testb %bl, %bl
je 0x1cde7
movq 0x10(%rsp), %rbp
movl $0x1, 0x8(%rbp)
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %esi
shrl $0x2, %eax
cmpl %ecx, %eax
jae 0x1ce50
leaq 0x51d0(%rip), %rax      # 0x21f7d
movq %rax, 0xb654(%rip)      # 0x28408
xorl %ecx, %ecx
movl %ebx, %eax
movl %eax, 0xc(%rsp)
jmp 0x1c240
leaq 0x53db(%rip), %rax      # 0x221a3
movq %rax, 0xb639(%rip)      # 0x28408
xorl %ecx, %ecx
movl %ebx, %eax
movl %eax, 0xc(%rsp)
movl $0x0, 0x4(%rsp)
movq %r14, %rbp
jmp 0x1c248
movq 0x78(%rsp), %rax
andl $0x2, %eax
xorl %edx, %edx
cmpb $0x4, %bpl
setae %dl
leal 0x1(%rdx,%rax), %edi
movq 0x10(%rsp), %rbp
movl %edi, 0x8(%rbp)
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
divl %esi
xorl %edx, %edx
divl %edi
cmpl %ecx, %eax
jae 0x1ce32
leaq 0x5161(%rip), %rax      # 0x21f7d
movq %rax, 0xb5e5(%rip)      # 0x28408
xorl %ecx, %ecx
movl $0x0, 0xc(%rsp)
jmp 0x1c240
cmpl $0x2, 0x3c(%rsp)
jne 0x1ce50
movl $0x1, 0x4(%rsp)
xorl %ecx, %ecx
movl $0x0, 0xc(%rsp)
jmp 0x1c248
movb $0x1, %cl
movl %ebx, %eax
movl %eax, 0xc(%rsp)
jmp 0x1c248
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
addq $0x4f8, %rsp            # imm = 0x4F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x548e(%rip), %rdi      # 0x22310
leaq 0x51ce(%rip), %rsi      # 0x22057
leaq 0x5499(%rip), %rcx      # 0x22329
movl $0x1059, %edx           # imm = 0x1059
callq 0x8210