// File: /workspace/github_cpp_makefile_star2_O1/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 %r8d, %r15d
movl %ecx, %r8d
movq %rdi, %r14
movl 0xf0(%rsp), %ebx
cmpl $0x10, %ebx
sete %cl
movl %r15d, %eax
imull %r8d, %eax
movl %eax, 0x2c(%rsp)
shll %cl, %eax
movl %eax, 0x14(%rsp)
movq (%rdi), %rax
movl 0x8(%rax), %edi
movl %r8d, %ebp
shll %cl, %ebp
movl %edi, %r12d
shll %cl, %r12d
movl %edx, 0x20(%rsp)
cmpl %r8d, %edi
sete %al
movq %rdi, 0x78(%rsp)
leal 0x1(%rdi), %ecx
movl %r8d, 0x18(%rsp)
movl %ecx, 0x8c(%rsp)
cmpl %r8d, %ecx
sete %cl
orb %al, %cl
je 0x3582f
movq %rsi, %r13
movl %r15d, %edi
movl %r9d, 0x1c(%rsp)
movl %r9d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x32255
movq %r14, 0x80(%rsp)
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x34ce7
movq 0x78(%rsp), %r14
movl %r14d, %edi
movl %r15d, %esi
movl %ebx, %edx
movl $0x7, %ecx
callq 0x32132
testl %eax, %eax
je 0x34cf0
movslq %r14d, %rcx
movl %ecx, %eax
imull %r15d, %eax
movl %eax, 0x10(%rsp)
movl %eax, %r8d
imull %ebx, %r8d
addl $0x7, %r8d
shrl $0x3, %r8d
leal 0x1(%r8), %eax
movl 0x1c(%rsp), %edx
imull %edx, %eax
cmpl 0x20(%rsp), %eax
jbe 0x34d12
leaq 0xad69(%rip), %rax      # 0x3fa4e
jmp 0x34cf7
leaq 0xaa36(%rip), %rax      # 0x3f724
jmp 0x34cf7
leaq 0xaa23(%rip), %rax      # 0x3f71a
movq %rax, 0x1a7ea(%rip)     # 0x4f4e8
xorl %eax, %eax
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rcx, 0x60(%rsp)
testl %edx, %edx
movl 0x14(%rsp), %r9d
movl %r12d, %r14d
movq 0x80(%rsp), %r12
movq %r15, 0x40(%rsp)
je 0x35433
movl 0x18(%rsp), %esi
cmpl %esi, 0x78(%rsp)
sete %al
cmpl $0x10, %ebx
sete %cl
cmpl $0x8, %ebx
setl %dil
movl 0x2c(%rsp), %edx
subl %r8d, %edx
movq %rdx, 0xa8(%rsp)
movl %r9d, %edx
movq %rdx, %r11
negq %r11
movslq %ebp, %rbp
movslq %esi, %rsi
movq %rsi, 0xb0(%rsp)
orb %al, %dil
movb %dil, 0xf(%rsp)
movq 0x40(%rsp), %r10
leal -0x1(%r10), %eax
movl %eax, 0x8(%rsp)
testl %r10d, %r10d
setne %al
movl 0x1c(%rsp), %esi
andb %cl, %al
movb %al, 0xe(%rsp)
movq %rbp, %rax
negq %rax
movq %rax, 0x30(%rsp)
subq %rdx, %rax
movq %rax, 0xa0(%rsp)
xorl %edi, %edi
leaq 0x8762(%rip), %r15      # 0x3d518
xorl %ecx, %ecx
movl %r10d, %eax
movq %rax, 0x90(%rsp)
movq %r8, 0x58(%rsp)
movq %r11, 0x38(%rsp)
movq %rbp, 0x98(%rsp)
movq %rsi, 0x50(%rsp)
movl %edi, %edi
leaq 0x1(%r13), %rdx
movzbl (%r13), %eax
movq %rax, 0x20(%rsp)
cmpq $0x5, %rax
jae 0x34eb2
movl %r9d, %eax
imull %ecx, %eax
addq 0x18(%r12), %rax
cmpl $0x7, %ebx
jg 0x34e25
cmpl 0x40(%rsp), %r8d
ja 0x3586d
addq 0xa8(%rsp), %rax
movl $0x1, %r14d
movq %r8, 0x90(%rsp)
movq %rdi, 0x70(%rsp)
movq 0x20(%rsp), %rsi
movl %esi, %r8d
movq %rcx, 0x68(%rsp)
testq %rcx, %rcx
jne 0x34e4c
leaq 0x8999(%rip), %rcx      # 0x3d7dc
movq 0x20(%rsp), %rsi
movb (%rsi,%rcx), %r8b
leaq (%rax,%r11), %rcx
movzbl %r8b, %r9d
testl %r14d, %r14d
jle 0x34e91
movl %r14d, %esi
xorl %edi, %edi
cmpb $0x6, %r8b
ja 0x34e89
movslq (%r15,%r9,4), %r10
addq %r15, %r10
jmpq *%r10
movb (%rdx,%rdi), %r10b
jmp 0x34e85
movb (%rcx,%rdi), %r10b
jmp 0x34e81
movb (%rcx,%rdi), %r10b
shrb %r10b
addb (%rdx,%rdi), %r10b
movb %r10b, (%rax,%rdi)
incq %rdi
cmpq %rdi, %rsi
jne 0x34e5e
cmpl $0x8, %ebx
jne 0x34ec8
movq 0x60(%rsp), %rsi
cmpl 0x18(%rsp), %esi
je 0x34ea5
movb $-0x1, (%rax,%rsi)
addq %rsi, %rdx
movq 0xb0(%rsp), %rsi
jmp 0x34ee7
leaq 0xaba7(%rip), %rax      # 0x3fa60
movq %rax, 0x1a628(%rip)     # 0x4f4e8
movq %rdx, %r13
jmp 0x35419
cmpl $0x10, %ebx
jne 0x34eec
movslq %r14d, %rsi
movq 0x60(%rsp), %rdi
cmpl 0x18(%rsp), %edi
je 0x34ee1
movw $0xffff, (%rax,%rsi)    # imm = 0xFFFF
addq %rsi, %rdx
movq %rbp, %rsi
movq %rdx, %r13
jmp 0x34ef5
addq $0x2, %r13
movl $0x1, %esi
leaq (%rax,%rsi), %rdi
cmpb $0x0, 0xf(%rsp)
je 0x34f47
movq 0x90(%rsp), %rcx
decl %ecx
imull %r14d, %ecx
movslq %ecx, %rdx
movq %rdx, 0x48(%rsp)
cmpb $0x6, %r8b
ja 0x3511e
leaq 0x8629(%rip), %r8       # 0x3d550
movslq (%r8,%r9,4), %rdx
addq %r8, %rdx
jmpq *%rdx
movq %r13, %rsi
movq 0x48(%rsp), %rdx
callq 0x6330
movq 0x38(%rsp), %r11
jmp 0x3511e
movl 0x8c(%rsp), %edx
cmpl 0x18(%rsp), %edx
jne 0x3584e
cmpb $0x6, %r8b
ja 0x353c3
leaq 0x85cb(%rip), %r8       # 0x3d534
movslq (%r8,%r9,4), %rdx
addq %r8, %rdx
jmpq *%rdx
movl 0x8(%rsp), %edx
testl %edx, %edx
je 0x353c3
movslq %r14d, %rax
movl %r14d, %ecx
testl %r14d, %r14d
jle 0x34f9c
xorl %esi, %esi
movb (%r13,%rsi), %r8b
movb %r8b, (%rdi,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x34f8b
movb $-0x1, (%rdi,%rax)
addq %rax, %r13
addq %rbp, %rdi
decl %edx
jne 0x34f84
jmp 0x353c3
testl %ecx, %ecx
jle 0x3511e
movslq %r14d, %rdx
movl %ecx, %ecx
subq %rdx, %rsi
addq %rsi, %rax
xorl %edx, %edx
movzbl (%rax), %esi
movzbl (%rdi,%r11), %r9d
movzbl (%rax,%r11), %r8d
leal (%r9,%rsi), %ebp
subl %r8d, %ebp
movl %ebp, %r11d
subl %esi, %r11d
movl %r11d, %r10d
negl %r10d
cmovsl %r11d, %r10d
movl %ebp, %ebx
subl %r9d, %ebx
movl %ebx, %r11d
negl %r11d
cmovsl %ebx, %r11d
subl %r8d, %ebp
movl %ebp, %ebx
negl %ebx
cmovsl %ebp, %ebx
cmpl %ebx, %r11d
ja 0x35009
movl %r9d, %r8d
cmpl %ebx, %r10d
cmoval %r8d, %esi
cmpl %r11d, %r10d
cmoval %r8d, %esi
addb (%r13,%rdx), %sil
movb %sil, (%rdi)
incq %rdx
incq %rax
incq %rdi
cmpq %rdx, %rcx
movq 0x38(%rsp), %r11
movq 0x98(%rsp), %rbp
jne 0x34fc4
jmp 0x3511e
testl %ecx, %ecx
jle 0x3511e
movl %ecx, %eax
leaq (%rdi,%r11), %rcx
xorl %edx, %edx
movb (%rcx,%rdx), %sil
addb (%r13,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rax
jne 0x3504f
jmp 0x3511e
testl %ecx, %ecx
jle 0x3511e
movslq %r14d, %rdx
movl %ecx, %ecx
subq %rdx, %rsi
addq %rsi, %rax
leaq (%rdi,%r11), %rdx
xorl %esi, %esi
movzbl (%rdx,%rsi), %r8d
movzbl (%rax,%rsi), %r9d
addl %r8d, %r9d
shrl %r9d
addb (%r13,%rsi), %r9b
movb %r9b, (%rdi,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x35082
jmp 0x3511e
testl %ecx, %ecx
jle 0x3511e
movslq %r14d, %rdx
movl %ecx, %ecx
subq %rdx, %rsi
addq %rsi, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
addb (%r13,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x350b6
jmp 0x3511e
testl %ecx, %ecx
jle 0x3511e
movslq %r14d, %rdx
movl %ecx, %ecx
subq %rdx, %rsi
addq %rsi, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
shrb %sil
addb (%r13,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x350de
jmp 0x3511e
testl %ecx, %ecx
jle 0x3511e
movslq %r14d, %rdx
movl %ecx, %ecx
subq %rdx, %rsi
addq %rsi, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
addb (%r13,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x35109
addq 0x48(%rsp), %r13
movl 0xf0(%rsp), %ebx
jmp 0x35400
movl 0x8(%rsp), %edx
testl %edx, %edx
movq 0x30(%rsp), %r9
je 0x353c3
addq %rsi, %rcx
movslq %r14d, %r8
movq %r8, 0x48(%rsp)
movl %r14d, %r8d
addq %rax, %r9
addq %rsi, %r9
addq 0xa0(%rsp), %rax
addq %rsi, %rax
movl %edx, %esi
movl %r14d, 0x88(%rsp)
testl %r14d, %r14d
jle 0x351d8
xorl %r10d, %r10d
movzbl (%r9,%r10), %r11d
movzbl (%rcx,%r10), %r12d
movzbl (%rax,%r10), %ebx
leal (%r12,%r11), %ebp
subl %ebx, %ebp
movl %ebp, %r14d
subl %r11d, %r14d
movl %r14d, %edx
negl %edx
cmovsl %r14d, %edx
movl %ebp, %r15d
subl %r12d, %r15d
movl %r15d, %r14d
negl %r14d
cmovsl %r15d, %r14d
subl %ebx, %ebp
movl %ebp, %r15d
negl %r15d
cmovsl %ebp, %r15d
cmpl %r15d, %r14d
ja 0x351b9
movl %r12d, %ebx
cmpl %r15d, %edx
cmoval %ebx, %r11d
cmpl %r14d, %edx
cmoval %ebx, %r11d
addb (%r13,%r10), %r11b
movb %r11b, (%rdi,%r10)
incq %r10
cmpq %r10, %r8
jne 0x35171
movq 0x48(%rsp), %rdx
movb $-0x1, (%rdi,%rdx)
addq %rdx, %r13
movq 0x98(%rsp), %rbp
addq %rbp, %rdi
addq %rbp, %rcx
addq %rbp, %r9
addq %rbp, %rax
decl %esi
movq 0x80(%rsp), %r12
movl 0xf0(%rsp), %ebx
movl 0x88(%rsp), %r14d
movq 0x38(%rsp), %r11
leaq 0x82fb(%rip), %r15      # 0x3d518
jne 0x35169
jmp 0x353c3
movl 0x8(%rsp), %edx
testl %edx, %edx
je 0x353c3
movslq %r14d, %rax
movl %r14d, %ecx
testl %r14d, %r14d
jle 0x3525b
leaq (%rdi,%r11), %rsi
xorl %r8d, %r8d
movb (%rsi,%r8), %r9b
addb (%r13,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %rcx
jne 0x35246
movb $-0x1, (%rdi,%rax)
addq %rax, %r13
addq %rbp, %rdi
decl %edx
jne 0x3523a
jmp 0x353c3
movl 0x8(%rsp), %edx
testl %edx, %edx
je 0x353c3
movslq %r14d, %rax
movl %r14d, %ecx
testl %r14d, %r14d
movq 0x30(%rsp), %r15
jle 0x352b3
movq %rdi, %rsi
xorl %r8d, %r8d
movzbl (%rsi,%r11), %r9d
movzbl (%rsi,%r15), %r10d
addl %r9d, %r10d
shrl %r10d
addb (%r13,%r8), %r10b
movb %r10b, (%rsi)
incq %r8
incq %rsi
cmpq %r8, %rcx
jne 0x35290
movb $-0x1, (%rdi,%rax)
addq %rax, %r13
addq %rbp, %rdi
decl %edx
leaq 0x8252(%rip), %r15      # 0x3d518
jne 0x35280
jmp 0x353c3
movl 0x8(%rsp), %r8d
testl %r8d, %r8d
movq 0x30(%rsp), %r9
je 0x353c3
movslq %r14d, %rcx
movl %r14d, %edx
addq %r9, %rax
addq %rsi, %rax
movl %r8d, %esi
testl %r14d, %r14d
jle 0x3530c
xorl %r8d, %r8d
movb (%rax,%r8), %r9b
addb (%r13,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %rdx
jne 0x352f7
movb $-0x1, (%rdi,%rcx)
addq %rcx, %r13
addq %rbp, %rdi
addq %rbp, %rax
decl %esi
jne 0x352ef
jmp 0x353c3
movl 0x8(%rsp), %r8d
testl %r8d, %r8d
movq 0x30(%rsp), %r9
je 0x353c3
movslq %r14d, %rcx
movl %r14d, %edx
addq %r9, %rax
addq %rsi, %rax
movl %r8d, %esi
testl %r14d, %r14d
jle 0x35364
xorl %r8d, %r8d
movb (%rax,%r8), %r9b
shrb %r9b
addb (%r13,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %rdx
jne 0x3534c
movb $-0x1, (%rdi,%rcx)
addq %rcx, %r13
addq %rbp, %rdi
addq %rbp, %rax
decl %esi
jne 0x35344
jmp 0x353c3
movl 0x8(%rsp), %r8d
testl %r8d, %r8d
movq 0x30(%rsp), %r9
je 0x353c3
movslq %r14d, %rcx
movl %r14d, %edx
addq %r9, %rax
addq %rsi, %rax
movl %r8d, %esi
testl %r14d, %r14d
jle 0x353b2
xorl %r8d, %r8d
movb (%rax,%r8), %r9b
addb (%r13,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %rdx
jne 0x3539d
movb $-0x1, (%rdi,%rcx)
addq %rcx, %r13
addq %rbp, %rdi
addq %rbp, %rax
decl %esi
jne 0x35395
cmpb $0x0, 0xe(%rsp)
je 0x35400
movq 0x18(%r12), %rax
movslq %r14d, %rcx
movq 0x70(%rsp), %rdi
addq %rdi, %rcx
addq %rcx, %rax
incq %rax
movq 0x40(%rsp), %rcx
movl 0x14(%rsp), %r9d
movq 0x58(%rsp), %r8
movq 0x50(%rsp), %rsi
movb $-0x1, (%rax)
addq %rbp, %rax
decl %ecx
jne 0x353f4
jmp 0x35414
movl 0x14(%rsp), %r9d
movq 0x58(%rsp), %r8
movq 0x50(%rsp), %rsi
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rcx
cmpb $0x5, 0x20(%rsp)
jae 0x34cfe
incq %rcx
addl %r9d, %edi
cmpq %rsi, %rcx
jne 0x34dda
movl $0x1, %eax
cmpl $0x7, %ebx
jg 0x357fb
movl 0x1c(%rsp), %edi
testl %edi, %edi
je 0x34d00
movl 0xf8(%rsp), %ecx
movl 0x2c(%rsp), %eax
movl %r8d, %edx
movslq %ebx, %rsi
movq 0x40(%rsp), %r11
decl %r11d
movl %edi, %edi
movq %rax, %r8
subq %rdx, %r8
negq %rdx
leaq (%r11,%r11,2), %r10
addq $0x2, %r10
movq %r10, 0x38(%rsp)
movq %r11, %r10
incq %r11
movq %r11, 0x20(%rsp)
xorl %r11d, %r11d
addq %rax, %rdx
xorl %r14d, %r14d
xorl %r15d, %r15d
movb $0x1, %bpl
testl %ecx, %ecx
jne 0x354a7
leaq 0x82ad(%rip), %rax      # 0x3d750
movb (%rsi,%rax), %bpl
movq 0x18(%r12), %r13
imull %r15d, %r9d
addq %r13, %r9
leaq (%r9,%rdx), %r12
movl %r14d, %r14d
cmpl $0x4, %ebx
je 0x356e9
cmpl $0x2, %ebx
je 0x3563f
cmpl $0x1, %ebx
jne 0x35748
movl 0x10(%rsp), %ebx
movl %ebx, %eax
cmpl $0x8, %ebx
jl 0x35599
leaq (%r8,%r13), %r12
movl 0x10(%rsp), %eax
movl %eax, %r9d
movb (%r12,%r14), %al
sarb $0x7, %al
andb %bpl, %al
movb %al, (%r13,%r14)
movb (%r12,%r14), %al
addb %al, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x1(%r13,%r14)
movb (%r12,%r14), %al
shlb $0x2, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x2(%r13,%r14)
movb (%r12,%r14), %al
shlb $0x3, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x3(%r13,%r14)
movb (%r12,%r14), %al
shlb $0x4, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x4(%r13,%r14)
movb (%r12,%r14), %al
shlb $0x5, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x5(%r13,%r14)
movb (%r12,%r14), %al
shlb $0x6, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x6(%r13,%r14)
testb $0x1, (%r12,%r14)
movzbl %bpl, %eax
cmovel %r11d, %eax
movb %al, 0x7(%r13,%r14)
leal -0x8(%r9), %eax
incq %r12
addq $0x8, %r13
cmpl $0xf, %r9d
jg 0x354ec
addq %r14, %r12
addq %r14, %r13
movq %r13, %r9
testl %eax, %eax
jle 0x355ad
movb (%r12), %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x2, %eax
jl 0x355c4
movb (%r12), %bl
addb %bl, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x3, %eax
jl 0x355dc
movb (%r12), %bl
shlb $0x2, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x4, %eax
jl 0x355f4
movb (%r12), %bl
shlb $0x3, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x5, %eax
jl 0x3560c
movb (%r12), %bl
shlb $0x4, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x6, %eax
jl 0x35624
movb (%r12), %bl
shlb $0x5, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x7, %eax
jne 0x35748
movb (%r12), %al
shlb $0x6, %al
sarb $0x7, %al
andb %bpl, %al
jmp 0x35745
movl 0x10(%rsp), %eax
movl %eax, %ebx
cmpl $0x4, %eax
jl 0x356ae
leaq (%r8,%r13), %r12
movl 0x10(%rsp), %ebx
movl %ebx, %r9d
movb (%r12,%r14), %al
shrb $0x6, %al
mulb %bpl
movb %al, (%r13,%r14)
movb (%r12,%r14), %al
shrb $0x4, %al
andb $0x3, %al
mulb %bpl
movb %al, 0x1(%r13,%r14)
movb (%r12,%r14), %al
shrb $0x2, %al
andb $0x3, %al
mulb %bpl
movb %al, 0x2(%r13,%r14)
movb (%r12,%r14), %al
andb $0x3, %al
mulb %bpl
movb %al, 0x3(%r13,%r14)
leal -0x4(%r9), %ebx
incq %r12
addq $0x4, %r13
cmpl $0x7, %r9d
jg 0x35652
addq %r14, %r12
addq %r14, %r13
movq %r13, %r9
testl %ebx, %ebx
jle 0x356c2
movb (%r12), %al
shrb $0x6, %al
mulb %bpl
movb %al, (%r9)
incq %r9
cmpl $0x2, %ebx
jl 0x356d9
movb (%r12), %al
shrb $0x4, %al
andb $0x3, %al
mulb %bpl
movb %al, (%r9)
incq %r9
cmpl $0x3, %ebx
jne 0x35748
movb (%r12), %al
shrb $0x2, %al
andb $0x3, %al
jmp 0x35742
movl 0x10(%rsp), %ebx
movl %ebx, %eax
cmpl $0x2, %ebx
jl 0x35736
leaq (%r8,%r13), %r12
movl 0x10(%rsp), %eax
movl %eax, %r9d
movb (%r12,%r14), %al
shrb $0x4, %al
mulb %bpl
movb %al, (%r13,%r14)
movb (%r12,%r14), %al
andb $0xf, %al
mulb %bpl
movb %al, 0x1(%r13,%r14)
leal -0x2(%r9), %eax
incq %r12
addq $0x2, %r13
cmpl $0x3, %r9d
jg 0x356fc
addq %r14, %r12
addq %r14, %r13
movq %r13, %r9
cmpl $0x1, %eax
jne 0x35748
movb (%r12), %al
shrb $0x4, %al
mulb %bpl
movb %al, (%r9)
movq 0x78(%rsp), %rax
cmpl 0x18(%rsp), %eax
movq 0x80(%rsp), %r12
je 0x357d6
movq 0x18(%r12), %rax
movq 0x60(%rsp), %r9
cmpl $0x1, %r9d
je 0x357b4
cmpl $0x3, %r9d
jne 0x3588c
testl %r10d, %r10d
js 0x357d6
addq %r14, %rax
movq 0x38(%rsp), %r9
addq %rax, %r9
movq 0x20(%rsp), %rbx
movb $-0x1, -0x1(%rax,%rbx,4)
movb (%r9), %bpl
movb %bpl, -0x2(%rax,%rbx,4)
movb -0x1(%r9), %bpl
movb %bpl, -0x3(%rax,%rbx,4)
movb -0x2(%r9), %bpl
movb %bpl, -0x4(%rax,%rbx,4)
addq $-0x3, %r9
decq %rbx
jg 0x3578a
jmp 0x357d6
testl %r10d, %r10d
js 0x357d6
addq %r14, %rax
movq 0x20(%rsp), %r9
movb $-0x1, -0x1(%rax,%r9,2)
movb -0x1(%rax,%r9), %bl
movb %bl, -0x2(%rax,%r9,2)
decq %r9
jg 0x357c1
incq %r15
movl 0x14(%rsp), %r9d
addl %r9d, %r14d
cmpq %rdi, %r15
movl 0xf0(%rsp), %ebx
jne 0x35495
movl $0x1, %eax
jmp 0x34d00
cmpl $0x10, %ebx
jne 0x34d00
movl 0x2c(%rsp), %ecx
imull 0x1c(%rsp), %ecx
testl %ecx, %ecx
je 0x34d00
movq 0x18(%r12), %rsi
movl %ecx, %ecx
xorl %edx, %edx
rolw $0x8, (%rsi,%rdx,2)
incq %rdx
cmpl %edx, %ecx
jne 0x3581e
jmp 0x34d00
leaq 0xa17f(%rip), %rdi      # 0x3f9b5
leaq 0x9d6e(%rip), %rsi      # 0x3f5ab
leaq 0xa19a(%rip), %rcx      # 0x3f9de
movl $0x1139, %edx           # imm = 0x1139
callq 0x6250
leaq 0xa22f(%rip), %rdi      # 0x3fa84
leaq 0x9d4f(%rip), %rsi      # 0x3f5ab
leaq 0xa17b(%rip), %rcx      # 0x3f9de
movl $0x118d, %edx           # imm = 0x118D
callq 0x6250
leaq 0xa1fb(%rip), %rdi      # 0x3fa6f
leaq 0x9d30(%rip), %rsi      # 0x3f5ab
leaq 0xa15c(%rip), %rcx      # 0x3f9de
movl $0x114f, %edx           # imm = 0x114F
callq 0x6250
leaq 0xa202(%rip), %rdi      # 0x3fa95
leaq 0x9d11(%rip), %rsi      # 0x3f5ab
leaq 0xa13d(%rip), %rcx      # 0x3f9de
movl $0x11e6, %edx           # imm = 0x11E6
callq 0x6250