// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/include/stb_image.h
// Function: stbi__create_png_image_raw(stbi__png*, unsigned char*, unsigned int, int, unsigned int, unsigned int, int, int)
static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 raw_len, int out_n, stbi__uint32 x, stbi__uint32 y, int depth, int color)
{
   int bytes = (depth == 16? 2 : 1);
   stbi__context *s = a->s;
   stbi__uint32 i,j,stride = x*out_n*bytes;
   stbi__uint32 img_len, img_width_bytes;
   int k;
   int img_n = s->img_n; // copy it into a local for later

   int output_bytes = out_n*bytes;
   int filter_bytes = img_n*bytes;
   int width = x;

   STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1);
   a->out = (stbi_uc *) stbi__malloc_mad3(x, y, output_bytes, 0); // extra bytes to write off the end into
   if (!a->out) return stbi__err("outofmem", "Out of memory");

   if (!stbi__mad3sizes_valid(img_n, x, depth, 7)) return stbi__err("too large", "Corrupt PNG");
   img_width_bytes = (((img_n * x * depth) + 7) >> 3);
   img_len = (img_width_bytes + 1) * y;

   // we used to check for exact match between raw_len and img_len on non-interlaced PNGs,
   // but issue #276 reported a PNG in the wild that had extra data at the end (all zeros),
   // so just check for raw_len < img_len always.
   if (raw_len < img_len) return stbi__err("not enough pixels","Corrupt PNG");

   for (j=0; j < y; ++j) {
      stbi_uc *cur = a->out + stride*j;
      stbi_uc *prior;
      int filter = *raw++;

      if (filter > 4)
         return stbi__err("invalid filter","Corrupt PNG");

      if (depth < 8) {
         STBI_ASSERT(img_width_bytes <= x);
         cur += x*out_n - img_width_bytes; // store output to the rightmost img_len bytes, so we can decode in place
         filter_bytes = 1;
         width = img_width_bytes;
      }
      prior = cur - stride; // bugfix: need to compute this after 'cur +=' computation above

      // if first row, use special filter that doesn't sample previous row
      if (j == 0) filter = first_row_filter[filter];

      // handle first byte explicitly
      for (k=0; k < filter_bytes; ++k) {
         switch (filter) {
            case STBI__F_none       : cur[k] = raw[k]; break;
            case STBI__F_sub        : cur[k] = raw[k]; break;
            case STBI__F_up         : cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
            case STBI__F_avg        : cur[k] = STBI__BYTECAST(raw[k] + (prior[k]>>1)); break;
            case STBI__F_paeth      : cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(0,prior[k],0)); break;
            case STBI__F_avg_first  : cur[k] = raw[k]; break;
            case STBI__F_paeth_first: cur[k] = raw[k]; break;
         }
      }

      if (depth == 8) {
         if (img_n != out_n)
            cur[img_n] = 255; // first pixel
         raw += img_n;
         cur += out_n;
         prior += out_n;
      } else if (depth == 16) {
         if (img_n != out_n) {
            cur[filter_bytes]   = 255; // first pixel top byte
            cur[filter_bytes+1] = 255; // first pixel bottom byte
         }
         raw += filter_bytes;
         cur += output_bytes;
         prior += output_bytes;
      } else {
         raw += 1;
         cur += 1;
         prior += 1;
      }

      // this is a little gross, so that we don't switch per-pixel or per-component
      if (depth < 8 || img_n == out_n) {
         int nk = (width - 1)*filter_bytes;
         #define STBI__CASE(f) \
             case f:     \
                for (k=0; k < nk; ++k)
         switch (filter) {
            // "none" filter turns into a memcpy here; make that explicit.
            case STBI__F_none:         memcpy(cur, raw, nk); break;
            STBI__CASE(STBI__F_sub)          { cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); } break;
            STBI__CASE(STBI__F_up)           { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
            STBI__CASE(STBI__F_avg)          { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); } break;
            STBI__CASE(STBI__F_paeth)        { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); } break;
            STBI__CASE(STBI__F_avg_first)    { cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); } break;
            STBI__CASE(STBI__F_paeth_first)  { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); } break;
         }
         #undef STBI__CASE
         raw += nk;
      } else {
         STBI_ASSERT(img_n+1 == out_n);
         #define STBI__CASE(f) \
             case f:     \
                for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \
                   for (k=0; k < filter_bytes; ++k)
         switch (filter) {
            STBI__CASE(STBI__F_none)         { cur[k] = raw[k]; } break;
            STBI__CASE(STBI__F_sub)          { cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); } break;
            STBI__CASE(STBI__F_up)           { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
            STBI__CASE(STBI__F_avg)          { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); } break;
            STBI__CASE(STBI__F_paeth)        { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); } break;
            STBI__CASE(STBI__F_avg_first)    { cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); } break;
            STBI__CASE(STBI__F_paeth_first)  { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); } break;
         }
         #undef STBI__CASE

         // the loop above sets the high byte of the pixels' alpha, but for
         // 16 bit png files we also need the low byte set. we'll do that here.
         if (depth == 16) {
            cur = a->out + stride*j; // start at the beginning of the row again
            for (i=0; i < x; ++i,cur+=output_bytes) {
               cur[filter_bytes+1] = 255;
            }
         }
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movl %ecx, %r10d
movq %rdi, %r12
cmpl $0x10, 0xf0(%rsp)
sete %cl
movl %r8d, %eax
imull %r10d, %eax
movl %eax, 0x30(%rsp)
shll %cl, %eax
movl %eax, 0x2c(%rsp)
movq (%rdi), %rax
movl 0x8(%rax), %edi
movl %r10d, %ebx
shll %cl, %ebx
movl %edi, %r13d
shll %cl, %r13d
cmpl %r10d, %edi
sete %al
movq %rdi, 0x40(%rsp)
leal 0x1(%rdi), %ecx
movl %r10d, 0x24(%rsp)
movl %ecx, 0x74(%rsp)
cmpl %r10d, %ecx
sete %cl
orb %al, %cl
je 0x3554b
movl %r8d, %r15d
movl %edx, %r14d
movq %rsi, %rbp
movl $0x0, 0xc(%rsp)
movl %r8d, %edi
movl %r9d, 0x28(%rsp)
movl %r9d, %esi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x31ec4
movq %rax, 0x18(%r12)
testq %rax, %rax
je 0x34997
movl %r13d, 0x34(%rsp)
movq %r12, 0x50(%rsp)
movq 0x40(%rsp), %r12
movl %r12d, %edi
movl %r15d, %esi
movl 0xf0(%rsp), %r13d
movl %r13d, %edx
movl $0x7, %ecx
callq 0x31db0
testl %eax, %eax
je 0x349a3
movl %r12d, %eax
imull %r15d, %eax
movl %eax, 0x14(%rsp)
movl %eax, %edi
imull %r13d, %edi
addl $0x7, %edi
shrl $0x3, %edi
leal 0x1(%rdi), %eax
movl 0x28(%rsp), %edx
imull %edx, %eax
cmpl %r14d, %eax
jbe 0x349af
leaq 0xb324(%rip), %rax      # 0x3fcb6
jmp 0x350e6
leaq 0xafee(%rip), %rax      # 0x3f98c
jmp 0x350e6
leaq 0xafd8(%rip), %rax      # 0x3f982
jmp 0x350e6
movl %r13d, %r10d
testl %edx, %edx
je 0x35103
cmpl $0x8, %r10d
setl %r14b
movl 0x24(%rsp), %r9d
movq 0x40(%rsp), %rcx
cmpl %r9d, %ecx
sete %al
movb (%rbp), %sil
cmpb $0x4, %sil
movq 0x50(%rsp), %r12
ja 0x350df
movq %r15, %r11
movslq %ecx, %rcx
movq %rcx, 0x78(%rsp)
movl 0x30(%rsp), %ecx
subl %edi, %ecx
movq %rcx, 0xa0(%rsp)
movl 0x2c(%rsp), %ecx
movslq %ebx, %r8
movq %r8, 0x18(%rsp)
movq %rcx, %rbx
movslq %r9d, %rcx
movq %rcx, 0xa8(%rsp)
orb %al, %r14b
movb %r14b, 0x13(%rsp)
leal -0x1(%r15), %eax
movl %eax, 0x8(%rsp)
movl %edx, %eax
movq %rax, 0x60(%rsp)
movq 0x18(%r12), %rax
negq %r8
movq %r8, 0x38(%rsp)
subq %rbx, %r8
movq %r8, 0x98(%rsp)
negq %rbx
xorl %edx, %edx
leaq 0x8d35(%rip), %r14      # 0x3d788
movl %r11d, %ecx
movq %rcx, 0x80(%rsp)
xorl %r8d, %r8d
movl 0x34(%rsp), %r13d
movq %rdi, 0x58(%rsp)
movq %rbx, 0x90(%rsp)
movq %r15, 0x88(%rsp)
cmpl $0x7, %r10d
movq %rdx, 0xb0(%rsp)
jg 0x34aa8
cmpl %r11d, %edi
ja 0x35589
addq 0xa0(%rsp), %rax
movl $0x1, %r13d
movq %rdi, 0x80(%rsp)
movl %r10d, %r15d
testq %r8, %r8
movq %r8, 0x68(%rsp)
jne 0x34ac4
movzbl %sil, %ecx
leaq 0x8f8c(%rip), %rdx      # 0x3da4c
movb (%rcx,%rdx), %sil
leaq 0x1(%rbp), %rdi
leaq (%rax,%rbx), %rdx
movzbl %sil, %r9d
testl %r13d, %r13d
jle 0x34b0c
movl %r13d, %r8d
xorl %r10d, %r10d
cmpb $0x6, %sil
ja 0x34b04
movslq (%r14,%r9,4), %rcx
addq %r14, %rcx
jmpq *%rcx
movb (%rdi,%r10), %cl
jmp 0x34b00
movb (%rdx,%r10), %cl
jmp 0x34afc
movb (%rdx,%r10), %cl
shrb %cl
addb (%rdi,%r10), %cl
movb %cl, (%rax,%r10)
incq %r10
cmpq %r10, %r8
jne 0x34adb
movl %r15d, %r10d
cmpl $0x8, %r15d
jne 0x34b37
movl 0x24(%rsp), %ecx
cmpl %ecx, 0x40(%rsp)
je 0x34b28
movq 0x78(%rsp), %rcx
movb $-0x1, (%rax,%rcx)
addq 0x78(%rsp), %rdi
movq 0xa8(%rsp), %r8
jmp 0x34b60
cmpl $0x10, %r10d
jne 0x34b65
movslq %r13d, %rcx
movl 0x24(%rsp), %r8d
cmpl %r8d, 0x40(%rsp)
je 0x34b58
movb $-0x1, %r8b
movb %r8b, (%rax,%rcx)
movb %r8b, 0x1(%rcx,%rax)
addq %rcx, %rdi
movq 0x18(%rsp), %r8
movq %rdi, %rbp
jmp 0x34b6f
addq $0x2, %rbp
movl $0x1, %r8d
leaq (%rax,%r8), %rdi
cmpb $0x0, 0x13(%rsp)
je 0x34bbf
movq 0x80(%rsp), %rcx
decl %ecx
imull %r13d, %ecx
movslq %ecx, %rdx
movq %rdx, 0x48(%rsp)
cmpb $0x6, %sil
ja 0x34d9b
leaq 0x8c1f(%rip), %rsi      # 0x3d7c0
movslq (%rsi,%r9,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
movq %rbp, %rsi
movq 0x48(%rsp), %rdx
callq 0x6330
movl %r15d, %r10d
jmp 0x34d9b
movl 0x24(%rsp), %ecx
cmpl %ecx, 0x74(%rsp)
jne 0x3556a
cmpb $0x6, %sil
ja 0x3504f
leaq 0x8bc6(%rip), %rsi      # 0x3d7a4
movslq (%rsi,%r9,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movl 0x8(%rsp), %edx
testl %edx, %edx
je 0x3504f
movslq %r13d, %rax
movl %r13d, %ecx
testl %r13d, %r13d
jle 0x34c11
xorl %esi, %esi
movb (%rbp,%rsi), %r8b
movb %r8b, (%rdi,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x34c00
movb $-0x1, (%rdi,%rax)
addq %rax, %rbp
addq 0x18(%rsp), %rdi
decl %edx
jne 0x34bf9
jmp 0x3504f
testl %ecx, %ecx
jle 0x34d9b
movslq %r13d, %rdx
movl %ecx, %ecx
subq %rdx, %r8
addq %r8, %rax
xorl %edx, %edx
movzbl (%rax), %esi
movzbl (%rdi,%rbx), %r9d
movzbl (%rax,%rbx), %r8d
leal (%r9,%rsi), %r15d
subl %r8d, %r15d
movl %r15d, %r11d
subl %esi, %r11d
movl %r11d, %r10d
negl %r10d
cmovsl %r11d, %r10d
movl %r15d, %ebx
subl %r9d, %ebx
movl %ebx, %r11d
negl %r11d
cmovsl %ebx, %r11d
subl %r8d, %r15d
movl %r15d, %ebx
negl %ebx
cmovsl %r15d, %ebx
cmpl %ebx, %r11d
ja 0x34c83
movl %r9d, %r8d
cmpl %ebx, %r10d
cmoval %r8d, %esi
cmpl %r11d, %r10d
cmoval %r8d, %esi
addb (%rbp,%rdx), %sil
movb %sil, (%rdi)
incq %rdx
incq %rax
incq %rdi
cmpq %rdx, %rcx
movl 0xf0(%rsp), %r10d
movq 0x90(%rsp), %rbx
jne 0x34c3b
jmp 0x34d9b
testl %ecx, %ecx
jle 0x34d9b
movl %ecx, %eax
leaq (%rdi,%rbx), %rcx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
addb (%rbp,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x34ccc
jmp 0x34d9b
testl %ecx, %ecx
jle 0x34d9b
movslq %r13d, %rdx
movl %ecx, %ecx
subq %rdx, %r8
addq %r8, %rax
leaq (%rdi,%rbx), %rdx
xorl %esi, %esi
movzbl (%rdx,%rsi), %r8d
movzbl (%rax,%rsi), %r9d
addl %r8d, %r9d
shrl %r9d
addb (%rbp,%rsi), %r9b
movb %r9b, (%rdi,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x34cff
jmp 0x34d9b
testl %ecx, %ecx
jle 0x34d9b
movslq %r13d, %rdx
movl %ecx, %ecx
subq %rdx, %r8
addq %r8, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
addb (%rbp,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x34d33
jmp 0x34d9b
testl %ecx, %ecx
jle 0x34d9b
movslq %r13d, %rdx
movl %ecx, %ecx
subq %rdx, %r8
addq %r8, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
shrb %sil
addb (%rbp,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x34d5b
jmp 0x34d9b
testl %ecx, %ecx
jle 0x34d9b
movslq %r13d, %rdx
movl %ecx, %ecx
subq %rdx, %r8
addq %r8, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
addb (%rbp,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x34d86
addq 0x48(%rsp), %rbp
movl 0x28(%rsp), %edx
movq 0x88(%rsp), %r11
jmp 0x35099
movl 0x8(%rsp), %ecx
testl %ecx, %ecx
je 0x3504f
addq %r8, %rdx
movslq %r13d, %rsi
movq %rsi, 0x48(%rsp)
movl %r13d, %r9d
movq 0x38(%rsp), %rsi
leaq (%rax,%rsi), %r10
addq %r8, %r10
addq 0x98(%rsp), %rax
addq %r8, %rax
movl %ecx, %r8d
movl %r13d, 0x34(%rsp)
testl %r13d, %r13d
jle 0x34e56
xorl %r11d, %r11d
movzbl (%r10,%r11), %ecx
movzbl (%rdx,%r11), %r12d
movzbl (%rax,%r11), %r15d
leal (%r12,%rcx), %r13d
subl %r15d, %r13d
movl %r13d, %ebx
subl %ecx, %ebx
movl %ebx, %esi
negl %esi
cmovsl %ebx, %esi
movl %r13d, %r14d
subl %r12d, %r14d
movl %r14d, %ebx
negl %ebx
cmovsl %r14d, %ebx
subl %r15d, %r13d
movl %r13d, %r14d
negl %r14d
cmovsl %r13d, %r14d
cmpl %r14d, %ebx
ja 0x34e38
movl %r12d, %r15d
cmpl %r14d, %esi
cmoval %r15d, %ecx
cmpl %ebx, %esi
cmoval %r15d, %ecx
addb (%rbp,%r11), %cl
movb %cl, (%rdi,%r11)
incq %r11
cmpq %r11, %r9
jne 0x34df2
movq 0x48(%rsp), %rcx
movb $-0x1, (%rdi,%rcx)
addq %rcx, %rbp
movq 0x18(%rsp), %rcx
addq %rcx, %rdi
addq %rcx, %rdx
addq %rcx, %r10
addq %rcx, %rax
decl %r8d
movq 0x50(%rsp), %r12
movq 0x88(%rsp), %r11
movl 0xf0(%rsp), %r15d
movl 0x34(%rsp), %r13d
movq 0x90(%rsp), %rbx
leaq 0x88e9(%rip), %r14      # 0x3d788
jne 0x34dea
jmp 0x3504f
movl 0x8(%rsp), %ecx
testl %ecx, %ecx
je 0x3504f
movslq %r13d, %rax
movl %r13d, %edx
testl %r13d, %r13d
jle 0x34edd
leaq (%rdi,%rbx), %rsi
xorl %r8d, %r8d
movb (%rsi,%r8), %r9b
addb (%rbp,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %rdx
jne 0x34ec8
movb $-0x1, (%rdi,%rax)
addq %rax, %rbp
addq 0x18(%rsp), %rdi
decl %ecx
jne 0x34ebc
jmp 0x3504f
movl 0x8(%rsp), %esi
testl %esi, %esi
je 0x3504f
movslq %r13d, %rax
movl %r13d, %edx
movq %r12, %r14
testl %r13d, %r13d
movq 0x38(%rsp), %r12
jle 0x34f3a
movq %rdi, %rcx
xorl %r8d, %r8d
movzbl (%rcx,%rbx), %r9d
movzbl (%rcx,%r12), %r10d
addl %r9d, %r10d
shrl %r10d
addb (%rbp,%r8), %r10b
movb %r10b, (%rcx)
incq %r8
incq %rcx
cmpq %r8, %rdx
jne 0x34f17
movb $-0x1, (%rdi,%rax)
addq %rax, %rbp
addq 0x18(%rsp), %rdi
decl %esi
movq %r14, %r12
leaq 0x8836(%rip), %r14      # 0x3d788
jne 0x34f04
jmp 0x3504f
movl 0x8(%rsp), %ecx
testl %ecx, %ecx
je 0x3504f
movslq %r13d, %rdx
movl %r13d, %esi
addq 0x38(%rsp), %rax
addq %r8, %rax
movl %ecx, %r8d
testl %r13d, %r13d
jle 0x34f92
xorl %ecx, %ecx
movb (%rax,%rcx), %r9b
addb (%rbp,%rcx), %r9b
movb %r9b, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x34f7d
movb $-0x1, (%rdi,%rdx)
addq %rdx, %rbp
movq 0x18(%rsp), %rcx
addq %rcx, %rdi
addq %rcx, %rax
decl %r8d
jne 0x34f76
jmp 0x3504f
movl 0x8(%rsp), %ecx
testl %ecx, %ecx
je 0x3504f
movslq %r13d, %rdx
movl %r13d, %esi
addq 0x38(%rsp), %rax
addq %r8, %rax
movl %ecx, %r8d
testl %r13d, %r13d
jle 0x34fea
xorl %ecx, %ecx
movb (%rax,%rcx), %r9b
shrb %r9b
addb (%rbp,%rcx), %r9b
movb %r9b, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x34fd2
movb $-0x1, (%rdi,%rdx)
addq %rdx, %rbp
movq 0x18(%rsp), %rcx
addq %rcx, %rdi
addq %rcx, %rax
decl %r8d
jne 0x34fcb
jmp 0x3504f
movl 0x8(%rsp), %ecx
testl %ecx, %ecx
je 0x3504f
movslq %r13d, %rdx
movl %r13d, %esi
addq 0x38(%rsp), %rax
addq %r8, %rax
movl %ecx, %r8d
testl %r13d, %r13d
jle 0x35038
xorl %ecx, %ecx
movb (%rax,%rcx), %r9b
addb (%rbp,%rcx), %r9b
movb %r9b, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %rsi
jne 0x35023
movb $-0x1, (%rdi,%rdx)
addq %rdx, %rbp
movq 0x18(%rsp), %rcx
addq %rcx, %rdi
addq %rcx, %rax
decl %r8d
jne 0x3501c
movl %r15d, %r10d
cmpl $0x10, %r15d
jne 0x35095
testl %r11d, %r11d
movl 0x28(%rsp), %edx
movq 0x58(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x68(%rsp), %r8
je 0x350d3
movq 0x18(%r12), %rax
movslq %r13d, %rcx
addq 0xb0(%rsp), %rcx
addq %rcx, %rax
incq %rax
movl %r11d, %ecx
movb $-0x1, (%rax)
addq %rsi, %rax
decl %ecx
jne 0x35089
jmp 0x350a3
movl 0x28(%rsp), %edx
movq 0x58(%rsp), %rdi
movq 0x68(%rsp), %r8
incq %r8
cmpq 0x60(%rsp), %r8
je 0x35144
movl 0x2c(%rsp), %eax
movl %eax, %edx
imull %r8d, %edx
movq 0x18(%r12), %rax
addq %rdx, %rax
movb (%rbp), %sil
cmpb $0x5, %sil
jb 0x34a7b
jmp 0x350df
incq %r8
cmpq 0x60(%rsp), %r8
jne 0x350b1
jmp 0x35116
leaq 0xabe2(%rip), %rax      # 0x3fcc8
movq %rax, 0x1a3db(%rip)     # 0x4f4c8
movl 0xc(%rsp), %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, 0xc(%rsp)
cmpl $0x10, %r10d
movq 0x50(%rsp), %r12
jne 0x350ed
movl 0x30(%rsp), %ecx
imull %edx, %ecx
testl %ecx, %ecx
je 0x35527
movl $0x1, 0xc(%rsp)
movq 0x18(%r12), %rax
movl %ecx, %ecx
xorl %edx, %edx
rolw $0x8, (%rax,%rdx,2)
incq %rdx
cmpl %edx, %ecx
jne 0x35136
jmp 0x350ed
cmpl $0x8, %r10d
jge 0x35534
testl %edx, %edx
je 0x35527
movl $0x1, 0xc(%rsp)
movl 0x30(%rsp), %eax
movl %edi, %ecx
movslq %r10d, %rdx
decl %r11d
movq %rax, %rsi
subq %rcx, %rsi
negq %rcx
leaq (%r11,%r11,2), %rdi
addq $0x2, %rdi
movq %rdi, 0x18(%rsp)
leaq 0x1(%r11), %r8
xorl %r9d, %r9d
addq %rax, %rcx
leaq 0x882f(%rip), %r10      # 0x3d9c0
movq %r11, %rdi
xorl %r11d, %r11d
xorl %ebx, %ebx
movb $0x1, %bpl
cmpl $0x0, 0xf8(%rsp)
jne 0x351aa
movb (%rdx,%r10), %bpl
movq 0x18(%r12), %r15
movl 0x2c(%rsp), %eax
movl %eax, %r12d
imull %ebx, %r12d
addq %r15, %r12
leaq (%r12,%rcx), %r14
movl %r11d, %r11d
movl 0xf0(%rsp), %eax
cmpl $0x4, %eax
je 0x35426
cmpl $0x2, %eax
je 0x3536d
cmpl $0x1, %eax
jne 0x35488
movl 0x14(%rsp), %r13d
movl %r13d, %eax
cmpl $0x8, %r13d
jl 0x352ad
leaq (%r15,%rsi), %r14
movl 0x14(%rsp), %eax
movl %eax, %r12d
movb (%r14,%r11), %al
sarb $0x7, %al
andb %bpl, %al
movb %al, (%r15,%r11)
movb (%r14,%r11), %al
addb %al, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x1(%r15,%r11)
movb (%r14,%r11), %al
shlb $0x2, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x2(%r15,%r11)
movb (%r14,%r11), %al
shlb $0x3, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x3(%r15,%r11)
movb (%r14,%r11), %al
shlb $0x4, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x4(%r15,%r11)
movb (%r14,%r11), %al
shlb $0x5, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x5(%r15,%r11)
movb (%r14,%r11), %al
shlb $0x6, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x6(%r15,%r11)
testb $0x1, (%r14,%r11)
movzbl %bpl, %eax
cmovel %r9d, %eax
movb %al, 0x7(%r15,%r11)
leal -0x8(%r12), %eax
incq %r14
addq $0x8, %r15
cmpl $0xf, %r12d
ja 0x35200
addq %r11, %r14
addq %r11, %r15
movq %r15, %r12
testl %eax, %eax
jle 0x35488
movb (%r14), %r15b
sarb $0x7, %r15b
andb %bpl, %r15b
movb %r15b, (%r12)
cmpl $0x1, %eax
je 0x35488
movb (%r14), %r15b
addb %r15b, %r15b
sarb $0x7, %r15b
andb %bpl, %r15b
movb %r15b, 0x1(%r12)
cmpl $0x3, %eax
jb 0x35488
movb (%r14), %r15b
shlb $0x2, %r15b
sarb $0x7, %r15b
andb %bpl, %r15b
movb %r15b, 0x2(%r12)
cmpl $0x3, %eax
je 0x35488
movb (%r14), %r15b
shlb $0x3, %r15b
sarb $0x7, %r15b
andb %bpl, %r15b
movb %r15b, 0x3(%r12)
cmpl $0x5, %eax
jb 0x35488
movb (%r14), %r15b
shlb $0x4, %r15b
sarb $0x7, %r15b
andb %bpl, %r15b
movb %r15b, 0x4(%r12)
cmpl $0x5, %eax
je 0x35488
movb (%r14), %r15b
shlb $0x5, %r15b
sarb $0x7, %r15b
andb %bpl, %r15b
movb %r15b, 0x5(%r12)
cmpl $0x7, %eax
jne 0x35488
movb (%r14), %al
shlb $0x6, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x6(%r12)
jmp 0x35488
movl 0x14(%rsp), %eax
movl %eax, %r13d
cmpl $0x4, %eax
jl 0x353de
leaq (%r15,%rsi), %r14
movl 0x14(%rsp), %r13d
movl %r13d, %r12d
movb (%r14,%r11), %al
shrb $0x6, %al
mulb %bpl
movb %al, (%r15,%r11)
movb (%r14,%r11), %al
shrb $0x4, %al
andb $0x3, %al
mulb %bpl
movb %al, 0x1(%r15,%r11)
movb (%r14,%r11), %al
shrb $0x2, %al
andb $0x3, %al
mulb %bpl
movb %al, 0x2(%r15,%r11)
movb (%r14,%r11), %al
andb $0x3, %al
mulb %bpl
movb %al, 0x3(%r15,%r11)
leal -0x4(%r12), %r13d
incq %r14
addq $0x4, %r15
cmpl $0x7, %r12d
ja 0x35382
addq %r11, %r14
addq %r11, %r15
movq %r15, %r12
testl %r13d, %r13d
jle 0x35488
movb (%r14), %al
shrb $0x6, %al
mulb %bpl
movb %al, (%r12)
cmpl $0x1, %r13d
je 0x35488
movb (%r14), %al
shrb $0x4, %al
andb $0x3, %al
mulb %bpl
movb %al, 0x1(%r12)
cmpl $0x3, %r13d
jne 0x35488
movb (%r14), %al
shrb $0x2, %al
andb $0x3, %al
mulb %bpl
movb %al, 0x2(%r12)
jmp 0x35488
movl 0x14(%rsp), %r13d
movl %r13d, %eax
cmpl $0x2, %r13d
jl 0x35476
leaq (%r15,%rsi), %r14
movl 0x14(%rsp), %eax
movl %eax, %r12d
movb (%r14,%r11), %al
shrb $0x4, %al
mulb %bpl
movb %al, (%r15,%r11)
movb (%r14,%r11), %al
andb $0xf, %al
mulb %bpl
movb %al, 0x1(%r15,%r11)
leal -0x2(%r12), %eax
incq %r14
addq $0x2, %r15
cmpl $0x3, %r12d
ja 0x3543c
addq %r11, %r14
addq %r11, %r15
movq %r15, %r12
cmpl $0x1, %eax
jne 0x35488
movb (%r14), %al
shrb $0x4, %al
mulb %bpl
movb %al, (%r12)
movq 0x40(%rsp), %r15
cmpl 0x24(%rsp), %r15d
movq 0x50(%rsp), %r12
je 0x3550f
movq %rdi, %r14
movq 0x18(%r12), %rax
cmpl $0x1, %r15d
je 0x354ef
cmpl $0x3, %r15d
jne 0x355a8
testl %r14d, %r14d
js 0x3550f
addq %r11, %rax
movq 0x18(%rsp), %r14
addq %rax, %r14
movq %r8, %r15
movb $-0x1, -0x1(%rax,%r15,4)
movb (%r14), %bpl
movb %bpl, -0x2(%rax,%r15,4)
movb -0x1(%r14), %bpl
movb %bpl, -0x3(%rax,%r15,4)
movb -0x2(%r14), %bpl
movb %bpl, -0x4(%rax,%r15,4)
addq $-0x3, %r14
decq %r15
jg 0x354c4
jmp 0x3550f
testl %r14d, %r14d
js 0x3550f
addq %r11, %rax
movq %r8, %r14
movb $-0x1, -0x1(%rax,%r14,2)
movb -0x1(%rax,%r14), %bpl
movb %bpl, -0x2(%rax,%r14,2)
decq %r14
jg 0x354fa
incq %rbx
addl 0x2c(%rsp), %r11d
cmpq 0x60(%rsp), %rbx
jne 0x35199
jmp 0x350ed
movl $0x1, 0xc(%rsp)
jmp 0x350ed
movl $0x1, 0xc(%rsp)
cmpl $0x10, %r10d
jne 0x350ed
jmp 0x35116
leaq 0xa6cb(%rip), %rdi      # 0x3fc1d
leaq 0xa2ba(%rip), %rsi      # 0x3f813
leaq 0xa6e6(%rip), %rcx      # 0x3fc46
movl $0x1139, %edx           # imm = 0x1139
callq 0x6250
leaq 0xa77b(%rip), %rdi      # 0x3fcec
leaq 0xa29b(%rip), %rsi      # 0x3f813
leaq 0xa6c7(%rip), %rcx      # 0x3fc46
movl $0x118d, %edx           # imm = 0x118D
callq 0x6250
leaq 0xa747(%rip), %rdi      # 0x3fcd7
leaq 0xa27c(%rip), %rsi      # 0x3f813
leaq 0xa6a8(%rip), %rcx      # 0x3fc46
movl $0x114f, %edx           # imm = 0x114F
callq 0x6250
leaq 0xa74e(%rip), %rdi      # 0x3fcfd
leaq 0xa25d(%rip), %rsi      # 0x3f813
leaq 0xa689(%rip), %rcx      # 0x3fc46
movl $0x11e6, %edx           # imm = 0x11E6
callq 0x6250