// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./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 0x12e22
movq %rsi, %r13
movl %r15d, %edi
movl %r9d, 0x1c(%rsp)
movl %r9d, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0xf848
movq %r14, 0x80(%rsp)
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x122da
movq 0x78(%rsp), %r14
movl %r14d, %edi
movl %r15d, %esi
movl %ebx, %edx
movl $0x7, %ecx
callq 0xf725
testl %eax, %eax
je 0x122e3
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 0x12305
leaq 0x5b4b(%rip), %rax      # 0x17e23
jmp 0x122ea
leaq 0x5818(%rip), %rax      # 0x17af9
jmp 0x122ea
leaq 0x5805(%rip), %rax      # 0x17aef
movq %rax, 0x9f37(%rip)      # 0x1c228
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 0x12a26
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 0x4f4b(%rip), %r15      # 0x172f4
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 0x124a5
movl %r9d, %eax
imull %ecx, %eax
addq 0x18(%r12), %rax
cmpl $0x7, %ebx
jg 0x12418
cmpl 0x40(%rsp), %r8d
ja 0x12e60
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 0x1243f
leaq 0x5116(%rip), %rcx      # 0x1754c
movq 0x20(%rsp), %rsi
movb (%rsi,%rcx), %r8b
leaq (%rax,%r11), %rcx
movzbl %r8b, %r9d
testl %r14d, %r14d
jle 0x12484
movl %r14d, %esi
xorl %edi, %edi
cmpb $0x6, %r8b
ja 0x1247c
movslq (%r15,%r9,4), %r10
addq %r15, %r10
jmpq *%r10
movb (%rdx,%rdi), %r10b
jmp 0x12478
movb (%rcx,%rdi), %r10b
jmp 0x12474
movb (%rcx,%rdi), %r10b
shrb %r10b
addb (%rdx,%rdi), %r10b
movb %r10b, (%rax,%rdi)
incq %rdi
cmpq %rdi, %rsi
jne 0x12451
cmpl $0x8, %ebx
jne 0x124bb
movq 0x60(%rsp), %rsi
cmpl 0x18(%rsp), %esi
je 0x12498
movb $-0x1, (%rax,%rsi)
addq %rsi, %rdx
movq 0xb0(%rsp), %rsi
jmp 0x124da
leaq 0x5989(%rip), %rax      # 0x17e35
movq %rax, 0x9d75(%rip)      # 0x1c228
movq %rdx, %r13
jmp 0x12a0c
cmpl $0x10, %ebx
jne 0x124df
movslq %r14d, %rsi
movq 0x60(%rsp), %rdi
cmpl 0x18(%rsp), %edi
je 0x124d4
movw $0xffff, (%rax,%rsi)    # imm = 0xFFFF
addq %rsi, %rdx
movq %rbp, %rsi
movq %rdx, %r13
jmp 0x124e8
addq $0x2, %r13
movl $0x1, %esi
leaq (%rax,%rsi), %rdi
cmpb $0x0, 0xf(%rsp)
je 0x1253a
movq 0x90(%rsp), %rcx
decl %ecx
imull %r14d, %ecx
movslq %ecx, %rdx
movq %rdx, 0x48(%rsp)
cmpb $0x6, %r8b
ja 0x12711
leaq 0x4e12(%rip), %r8       # 0x1732c
movslq (%r8,%r9,4), %rdx
addq %r8, %rdx
jmpq *%rdx
movq %r13, %rsi
movq 0x48(%rsp), %rdx
callq 0x2150
movq 0x38(%rsp), %r11
jmp 0x12711
movl 0x8c(%rsp), %edx
cmpl 0x18(%rsp), %edx
jne 0x12e41
cmpb $0x6, %r8b
ja 0x129b6
leaq 0x4db4(%rip), %r8       # 0x17310
movslq (%r8,%r9,4), %rdx
addq %r8, %rdx
jmpq *%rdx
movl 0x8(%rsp), %edx
testl %edx, %edx
je 0x129b6
movslq %r14d, %rax
movl %r14d, %ecx
testl %r14d, %r14d
jle 0x1258f
xorl %esi, %esi
movb (%r13,%rsi), %r8b
movb %r8b, (%rdi,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x1257e
movb $-0x1, (%rdi,%rax)
addq %rax, %r13
addq %rbp, %rdi
decl %edx
jne 0x12577
jmp 0x129b6
testl %ecx, %ecx
jle 0x12711
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 0x125fc
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 0x125b7
jmp 0x12711
testl %ecx, %ecx
jle 0x12711
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 0x12642
jmp 0x12711
testl %ecx, %ecx
jle 0x12711
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 0x12675
jmp 0x12711
testl %ecx, %ecx
jle 0x12711
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 0x126a9
jmp 0x12711
testl %ecx, %ecx
jle 0x12711
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 0x126d1
jmp 0x12711
testl %ecx, %ecx
jle 0x12711
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 0x126fc
addq 0x48(%rsp), %r13
movl 0xf0(%rsp), %ebx
jmp 0x129f3
movl 0x8(%rsp), %edx
testl %edx, %edx
movq 0x30(%rsp), %r9
je 0x129b6
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 0x127cb
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 0x127ac
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 0x12764
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 0x4ae4(%rip), %r15      # 0x172f4
jne 0x1275c
jmp 0x129b6
movl 0x8(%rsp), %edx
testl %edx, %edx
je 0x129b6
movslq %r14d, %rax
movl %r14d, %ecx
testl %r14d, %r14d
jle 0x1284e
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 0x12839
movb $-0x1, (%rdi,%rax)
addq %rax, %r13
addq %rbp, %rdi
decl %edx
jne 0x1282d
jmp 0x129b6
movl 0x8(%rsp), %edx
testl %edx, %edx
je 0x129b6
movslq %r14d, %rax
movl %r14d, %ecx
testl %r14d, %r14d
movq 0x30(%rsp), %r15
jle 0x128a6
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 0x12883
movb $-0x1, (%rdi,%rax)
addq %rax, %r13
addq %rbp, %rdi
decl %edx
leaq 0x4a3b(%rip), %r15      # 0x172f4
jne 0x12873
jmp 0x129b6
movl 0x8(%rsp), %r8d
testl %r8d, %r8d
movq 0x30(%rsp), %r9
je 0x129b6
movslq %r14d, %rcx
movl %r14d, %edx
addq %r9, %rax
addq %rsi, %rax
movl %r8d, %esi
testl %r14d, %r14d
jle 0x128ff
xorl %r8d, %r8d
movb (%rax,%r8), %r9b
addb (%r13,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %rdx
jne 0x128ea
movb $-0x1, (%rdi,%rcx)
addq %rcx, %r13
addq %rbp, %rdi
addq %rbp, %rax
decl %esi
jne 0x128e2
jmp 0x129b6
movl 0x8(%rsp), %r8d
testl %r8d, %r8d
movq 0x30(%rsp), %r9
je 0x129b6
movslq %r14d, %rcx
movl %r14d, %edx
addq %r9, %rax
addq %rsi, %rax
movl %r8d, %esi
testl %r14d, %r14d
jle 0x12957
xorl %r8d, %r8d
movb (%rax,%r8), %r9b
shrb %r9b
addb (%r13,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %rdx
jne 0x1293f
movb $-0x1, (%rdi,%rcx)
addq %rcx, %r13
addq %rbp, %rdi
addq %rbp, %rax
decl %esi
jne 0x12937
jmp 0x129b6
movl 0x8(%rsp), %r8d
testl %r8d, %r8d
movq 0x30(%rsp), %r9
je 0x129b6
movslq %r14d, %rcx
movl %r14d, %edx
addq %r9, %rax
addq %rsi, %rax
movl %r8d, %esi
testl %r14d, %r14d
jle 0x129a5
xorl %r8d, %r8d
movb (%rax,%r8), %r9b
addb (%r13,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %rdx
jne 0x12990
movb $-0x1, (%rdi,%rcx)
addq %rcx, %r13
addq %rbp, %rdi
addq %rbp, %rax
decl %esi
jne 0x12988
cmpb $0x0, 0xe(%rsp)
je 0x129f3
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 0x129e7
jmp 0x12a07
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 0x122f1
incq %rcx
addl %r9d, %edi
cmpq %rsi, %rcx
jne 0x123cd
movl $0x1, %eax
cmpl $0x7, %ebx
jg 0x12dee
movl 0x1c(%rsp), %edi
testl %edi, %edi
je 0x122f3
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 0x12a9a
leaq 0x4a2a(%rip), %rax      # 0x174c0
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 0x12cdc
cmpl $0x2, %ebx
je 0x12c32
cmpl $0x1, %ebx
jne 0x12d3b
movl 0x10(%rsp), %ebx
movl %ebx, %eax
cmpl $0x8, %ebx
jl 0x12b8c
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 0x12adf
addq %r14, %r12
addq %r14, %r13
movq %r13, %r9
testl %eax, %eax
jle 0x12ba0
movb (%r12), %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x2, %eax
jl 0x12bb7
movb (%r12), %bl
addb %bl, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x3, %eax
jl 0x12bcf
movb (%r12), %bl
shlb $0x2, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x4, %eax
jl 0x12be7
movb (%r12), %bl
shlb $0x3, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x5, %eax
jl 0x12bff
movb (%r12), %bl
shlb $0x4, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x6, %eax
jl 0x12c17
movb (%r12), %bl
shlb $0x5, %bl
sarb $0x7, %bl
andb %bpl, %bl
movb %bl, (%r9)
incq %r9
cmpl $0x7, %eax
jne 0x12d3b
movb (%r12), %al
shlb $0x6, %al
sarb $0x7, %al
andb %bpl, %al
jmp 0x12d38
movl 0x10(%rsp), %eax
movl %eax, %ebx
cmpl $0x4, %eax
jl 0x12ca1
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 0x12c45
addq %r14, %r12
addq %r14, %r13
movq %r13, %r9
testl %ebx, %ebx
jle 0x12cb5
movb (%r12), %al
shrb $0x6, %al
mulb %bpl
movb %al, (%r9)
incq %r9
cmpl $0x2, %ebx
jl 0x12ccc
movb (%r12), %al
shrb $0x4, %al
andb $0x3, %al
mulb %bpl
movb %al, (%r9)
incq %r9
cmpl $0x3, %ebx
jne 0x12d3b
movb (%r12), %al
shrb $0x2, %al
andb $0x3, %al
jmp 0x12d35
movl 0x10(%rsp), %ebx
movl %ebx, %eax
cmpl $0x2, %ebx
jl 0x12d29
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 0x12cef
addq %r14, %r12
addq %r14, %r13
movq %r13, %r9
cmpl $0x1, %eax
jne 0x12d3b
movb (%r12), %al
shrb $0x4, %al
mulb %bpl
movb %al, (%r9)
movq 0x78(%rsp), %rax
cmpl 0x18(%rsp), %eax
movq 0x80(%rsp), %r12
je 0x12dc9
movq 0x18(%r12), %rax
movq 0x60(%rsp), %r9
cmpl $0x1, %r9d
je 0x12da7
cmpl $0x3, %r9d
jne 0x12e7f
testl %r10d, %r10d
js 0x12dc9
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 0x12d7d
jmp 0x12dc9
testl %r10d, %r10d
js 0x12dc9
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 0x12db4
incq %r15
movl 0x14(%rsp), %r9d
addl %r9d, %r14d
cmpq %rdi, %r15
movl 0xf0(%rsp), %ebx
jne 0x12a88
movl $0x1, %eax
jmp 0x122f3
cmpl $0x10, %ebx
jne 0x122f3
movl 0x2c(%rsp), %ecx
imull 0x1c(%rsp), %ecx
testl %ecx, %ecx
je 0x122f3
movq 0x18(%r12), %rsi
movl %ecx, %ecx
xorl %edx, %edx
rolw $0x8, (%rsi,%rdx,2)
incq %rdx
cmpl %edx, %ecx
jne 0x12e11
jmp 0x122f3
leaq 0x4f61(%rip), %rdi      # 0x17d8a
leaq 0x4b56(%rip), %rsi      # 0x17986
leaq 0x4f7c(%rip), %rcx      # 0x17db3
movl $0x1139, %edx           # imm = 0x1139
callq 0x2100
leaq 0x5011(%rip), %rdi      # 0x17e59
leaq 0x4b37(%rip), %rsi      # 0x17986
leaq 0x4f5d(%rip), %rcx      # 0x17db3
movl $0x118d, %edx           # imm = 0x118D
callq 0x2100
leaq 0x4fdd(%rip), %rdi      # 0x17e44
leaq 0x4b18(%rip), %rsi      # 0x17986
leaq 0x4f3e(%rip), %rcx      # 0x17db3
movl $0x114f, %edx           # imm = 0x114F
callq 0x2100
leaq 0x4fe4(%rip), %rdi      # 0x17e6a
leaq 0x4af9(%rip), %rsi      # 0x17986
leaq 0x4f1f(%rip), %rcx      # 0x17db3
movl $0x11e6, %edx           # imm = 0x11E6
callq 0x2100