// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/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");

   img_width_bytes = (((img_n * x * depth) + 7) >> 3);
   img_len = (img_width_bytes + 1) * y;
   if (s->img_x == x && s->img_y == y) {
      if (raw_len != img_len) return stbi__err("not enough pixels","Corrupt PNG");
   } else { // interlaced:
      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 = cur - stride;
      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;
      }

      // 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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r8d, %r12d
movl %ecx, %r8d
movq %rdi, %r15
cmpl $0x10, 0x10(%rbp)
sete %cl
movl %r12d, %eax
imull %r8d, %eax
movq %rax, -0x98(%rbp)
shll %cl, %eax
movq %rax, -0x90(%rbp)
movq (%rdi), %r14
movl 0x8(%r14), %edi
movl %r8d, %ebx
shll %cl, %ebx
movl %edi, %eax
shll %cl, %eax
movq %rax, -0x88(%rbp)
movl %edx, -0x48(%rbp)
movq %rsi, -0x38(%rbp)
cmpl %r8d, %edi
sete %al
movq %rdi, -0x78(%rbp)
leal 0x1(%rdi), %ecx
movl %r8d, -0x4c(%rbp)
movl %ecx, -0xc8(%rbp)
cmpl %r8d, %ecx
sete %cl
orb %al, %cl
je 0xb897
movl %r12d, %edi
movl %r9d, %esi
movl %ebx, %edx
xorl %ecx, %ecx
movl %r9d, %r13d
callq 0x8fee
movq %r15, -0x80(%rbp)
movq %rax, 0x18(%r15)
testq %rax, %rax
je 0xb41d
movq -0x78(%rbp), %rcx
movl %ecx, %eax
imull %r12d, %eax
movl %eax, -0x64(%rbp)
imull 0x10(%rbp), %eax
addl $0x7, %eax
shrl $0x3, %eax
movq %rax, -0xa0(%rbp)
incl %eax
imull %r13d, %eax
movq %r12, %r8
cmpl %r12d, (%r14)
movl %r13d, %edi
jne 0xad4a
cmpl %edi, 0x4(%r14)
jne 0xad4a
cmpl -0x48(%rbp), %eax
movq -0x38(%rbp), %r10
je 0xad53
leaq 0x6425(%rip), %rax      # 0x1116a
jmp 0xb80e
cmpl -0x48(%rbp), %eax
movq -0x38(%rbp), %r10
ja 0xad3e
movslq %ecx, %rax
movq %rax, -0xd0(%rbp)
movl -0x4c(%rbp), %edx
cmpl %edx, %ecx
sete %al
movq -0x90(%rbp), %r13
movl %r13d, %ecx
movq %rcx, %rsi
negq %rsi
movq %rsi, -0x108(%rbp)
movl 0x10(%rbp), %r9d
cmpl $0x8, %r9d
setl %r11b
movq -0x98(%rbp), %rsi
subl -0xa0(%rbp), %esi
movq %rsi, -0xf8(%rbp)
movslq %ebx, %rbx
movslq %edx, %rdx
movq %rdx, -0x100(%rbp)
orb %al, %r11b
movb %r11b, -0x39(%rbp)
movl %edi, -0xc4(%rbp)
movl %edi, %eax
movq %rax, -0xe0(%rbp)
movq %rbx, %rdx
negq %rdx
movq %rdx, -0x60(%rbp)
subq %rcx, %rdx
movq %rdx, -0xf0(%rbp)
xorl %eax, %eax
xorl %r15d, %r15d
movq %r8, -0x58(%rbp)
movq %r8, -0xd8(%rbp)
movq -0x80(%rbp), %r8
movq %rbx, -0xa8(%rbp)
cmpq -0xe0(%rbp), %r15
je 0xb429
movzbl (%r10), %edi
cmpq $0x4, %rdi
ja 0xb807
movq 0x18(%r8), %rcx
movl %r13d, %r8d
imull %r15d, %r8d
movq %rcx, -0xe8(%rbp)
addq %rcx, %r8
movq %r8, -0x38(%rbp)
cmpl $0x7, %r9d
leaq 0x53b3(%rip), %rsi      # 0x101e0
jg 0xae5e
movq -0xa0(%rbp), %rdx
cmpl -0x58(%rbp), %edx
ja 0xb859
movq -0xf8(%rbp), %rcx
addq %r8, %rcx
movq %rcx, -0x38(%rbp)
pushq $0x1
popq %rcx
movq %rcx, -0x88(%rbp)
movq %rdx, -0xd8(%rbp)
movq %r15, -0xb0(%rbp)
testq %r15, %r15
jne 0xae75
leaq 0x560b(%rip), %rcx      # 0x1047c
movb (%rdi,%rcx), %dil
movl %eax, %edx
movq -0x108(%rbp), %rcx
addq %rcx, %r8
movq -0x88(%rbp), %rax
testl %eax, %eax
movl $0x0, %r15d
cmovgl %eax, %r15d
leaq 0x1(%r10), %r13
movq -0xe8(%rbp), %rax
addq %rcx, %rax
movq %rdx, -0x70(%rbp)
movq %rax, -0x110(%rbp)
addq %rax, %rdx
xorl %ebx, %ebx
movq %rdi, -0xb8(%rbp)
movq %rdx, -0x30(%rbp)
movzbl %dil, %eax
cmpq %rbx, %r15
je 0xaf2f
cmpb $0x6, %dil
ja 0xaf2a
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
movb (%r13,%rbx), %al
jmp 0xaf23
movb (%r13,%rbx), %al
movb %al, -0x48(%rbp)
movzbl (%rdx,%rbx), %esi
xorl %edi, %edi
xorl %edx, %edx
movq %r10, %r12
movq %r8, %r14
callq 0xb8d5
movq -0x30(%rbp), %rdx
movq -0xb8(%rbp), %rdi
movq %r14, %r8
leaq 0x52d4(%rip), %rsi      # 0x101e0
movq %r12, %r10
addb -0x48(%rbp), %al
jmp 0xaf23
movb (%rdx,%rbx), %al
jmp 0xaf1e
movb (%rdx,%rbx), %al
shrb %al
addb (%r13,%rbx), %al
movq -0x38(%rbp), %rcx
movb %al, (%rcx,%rbx)
incq %rbx
jmp 0xaebd
movslq -0x88(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movl 0x10(%rbp), %r9d
cmpl $0x8, %r9d
jne 0xaf73
movq -0x78(%rbp), %rcx
cmpl -0x4c(%rbp), %ecx
movq -0xa8(%rbp), %rbx
je 0xaf63
movq -0xd0(%rbp), %rcx
movq -0x38(%rbp), %rdx
movb $-0x1, (%rdx,%rcx)
addq -0xd0(%rbp), %r13
movq -0x100(%rbp), %rdx
jmp 0xafa1
cmpl $0x10, %r9d
movq -0xa8(%rbp), %rbx
jne 0xafa6
movq -0x78(%rbp), %rcx
cmpl -0x4c(%rbp), %ecx
je 0xaf9a
movb $-0x1, %cl
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rsi
movb %cl, (%rsi,%rdx)
movb %cl, 0x1(%rdx,%rsi)
addq -0x30(%rbp), %r13
movq %rbx, %rdx
movq %r13, %r10
jmp 0xafad
addq $0x2, %r10
pushq $0x1
popq %rdx
movq -0x38(%rbp), %rcx
leaq (%rcx,%rdx), %r13
cmpb $0x0, -0x39(%rbp)
je 0xb028
movq -0xd8(%rbp), %rcx
leal -0x1(%rcx), %r14d
imull -0x88(%rbp), %r14d
movslq %r14d, %rcx
movq %rcx, -0x48(%rbp)
cmpb $0x6, %dil
movq -0xb0(%rbp), %r15
movq -0x110(%rbp), %r12
ja 0xb010
leaq 0x5228(%rip), %rcx      # 0x10218
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq %r10, -0x38(%rbp)
jmpq *%rax
movq %r13, %rdi
movq %r10, %rsi
movq -0x48(%rbp), %rdx
callq 0x10a0
movq -0x38(%rbp), %r10
addq -0x48(%rbp), %r10
movq -0x80(%rbp), %r8
movl 0x10(%rbp), %r9d
movq -0x90(%rbp), %r13
jmp 0xb2d1
movl -0xc8(%rbp), %ecx
cmpl -0x4c(%rbp), %ecx
jne 0xb878
cmpb $0x6, %dil
ja 0xb295
addq %rdx, %r8
leaq 0x51b1(%rip), %rcx      # 0x101fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x58(%rbp), %rax
decl %eax
je 0xb295
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0xb075
movb (%r10,%rcx), %dl
movb %dl, (%r13,%rcx)
incq %rcx
jmp 0xb062
movq -0x30(%rbp), %rcx
movb $-0x1, (%r13,%rcx)
addq %rcx, %r10
addq %rbx, %r13
jmp 0xb058
testl %r14d, %r14d
movl $0x0, %eax
cmovlel %eax, %r14d
addq -0x70(%rbp), %rdx
addq %rdx, %r12
negq -0x30(%rbp)
movq %r10, %rbx
subq $0x1, %r14
jb 0xb010
movb (%rbx), %r15b
movq -0x30(%rbp), %rax
movzbl (%r13,%rax), %edi
movzbl (%r12), %esi
movzbl (%r12,%rax), %edx
callq 0xb8d5
movq -0x38(%rbp), %r10
addb %r15b, %al
movq -0xb0(%rbp), %r15
movb %al, (%r13)
incq %r13
incq %r12
incq %rbx
jmp 0xb0a1
testl %r14d, %r14d
movl $0x0, %eax
cmovlel %eax, %r14d
addq -0x70(%rbp), %rdx
addq %rdx, %r12
xorl %eax, %eax
cmpq %rax, %r14
je 0xb010
movb (%r12,%rax), %cl
addb (%r10,%rax), %cl
movb %cl, (%r13,%rax)
incq %rax
jmp 0xb0f9
testl %r14d, %r14d
movl $0x0, %eax
cmovlel %eax, %r14d
addq -0x70(%rbp), %rdx
addq %rdx, %r12
movq %r13, %rax
subq -0x30(%rbp), %rax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0xb010
movzbl (%r12,%rcx), %edx
movzbl (%rax,%rcx), %esi
addl %edx, %esi
shrl %esi
addb (%r10,%rcx), %sil
movb %sil, (%r13,%rcx)
incq %rcx
jmp 0xb130
testl %r14d, %r14d
movl $0x0, %eax
cmovlel %eax, %r14d
movq %r13, %rax
subq -0x30(%rbp), %rax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0xb010
movb (%rax,%rcx), %dl
addb (%r10,%rcx), %dl
movb %dl, (%r13,%rcx)
incq %rcx
jmp 0xb169
testl %r14d, %r14d
movl $0x0, %eax
cmovlel %eax, %r14d
movq %r13, %rax
subq -0x30(%rbp), %rax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0xb010
movb (%rax,%rcx), %dl
shrb %dl
addb (%r10,%rcx), %dl
movb %dl, (%r13,%rcx)
incq %rcx
jmp 0xb198
testl %r14d, %r14d
movl $0x0, %eax
cmovlel %eax, %r14d
movq %r13, %rax
subq -0x30(%rbp), %rax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0xb010
movb (%rax,%rcx), %dl
addb (%r10,%rcx), %dl
movb %dl, (%r13,%rcx)
incq %rcx
jmp 0xb1c9
movq -0x38(%rbp), %rax
addq -0x60(%rbp), %rax
addq %rdx, %rax
movq %rax, -0x38(%rbp)
movq -0xe8(%rbp), %rax
addq -0xf0(%rbp), %rax
addq -0x70(%rbp), %rdx
addq %rax, %rdx
movq -0x58(%rbp), %rax
movl %eax, -0xb8(%rbp)
movq %r15, -0xc0(%rbp)
decl -0xb8(%rbp)
je 0xb291
movq %r13, -0x48(%rbp)
xorl %ebx, %ebx
cmpq %rbx, -0xc0(%rbp)
je 0xb26a
movb (%r10,%rbx), %r12b
movq -0x38(%rbp), %rax
movzbl (%rax,%rbx), %edi
movzbl (%r8,%rbx), %esi
movq %rdx, %r15
movzbl (%rdx,%rbx), %edx
movq %r10, %r14
movq %r8, %r13
callq 0xb8d5
movq %r15, %rdx
movq %r13, %r8
movq %r14, %r10
addb %r12b, %al
movq -0x48(%rbp), %rcx
movb %al, (%rcx,%rbx)
incq %rbx
jmp 0xb226
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %r13
movb $-0x1, (%r13,%rax)
addq %rax, %r10
movq -0xa8(%rbp), %rbx
addq %rbx, %r13
addq %rbx, %r8
addq %rbx, -0x38(%rbp)
addq %rbx, %rdx
jmp 0xb218
movl 0x10(%rbp), %r9d
cmpl $0x10, %r9d
movq -0x80(%rbp), %r8
movq -0x90(%rbp), %r13
movq -0xb0(%rbp), %r15
jne 0xb2d1
movq -0x88(%rbp), %rax
incl %eax
cltq
addq -0x70(%rbp), %rax
addq 0x18(%r8), %rax
movq -0x58(%rbp), %rcx
subl $0x1, %ecx
jb 0xb2d1
movb $-0x1, (%rax)
addq %rbx, %rax
jmp 0xb2c4
incq %r15
movq -0x70(%rbp), %rax
addl %r13d, %eax
jmp 0xadee
movq -0x58(%rbp), %rax
decl %eax
je 0xb295
xorl %ecx, %ecx
cmpq %rcx, %r15
je 0xb301
movb (%r8,%rcx), %dl
addb (%r10,%rcx), %dl
movb %dl, (%r13,%rcx)
incq %rcx
jmp 0xb2ea
movq -0x30(%rbp), %rcx
movb $-0x1, (%r13,%rcx)
addq %rcx, %r10
addq %rbx, %r13
addq %rbx, %r8
jmp 0xb2e4
movq -0x58(%rbp), %rax
decl %eax
je 0xb295
movq -0x60(%rbp), %rcx
addq %r13, %rcx
xorl %edx, %edx
cmpq %rdx, %r15
je 0xb34b
movzbl (%r8,%rdx), %esi
movzbl (%rcx,%rdx), %edi
addl %esi, %edi
shrl %edi
addb (%r10,%rdx), %dil
movb %dil, (%r13,%rdx)
incq %rdx
jmp 0xb32b
movq -0x30(%rbp), %rcx
movb $-0x1, (%r13,%rcx)
addq %rcx, %r10
addq %rbx, %r13
addq %rbx, %r8
jmp 0xb31a
movq -0x58(%rbp), %rax
decl %eax
je 0xb295
movq -0x60(%rbp), %rcx
addq %r13, %rcx
xorl %edx, %edx
cmpq %rdx, %r15
je 0xb38c
movb (%rcx,%rdx), %sil
addb (%r10,%rdx), %sil
movb %sil, (%r13,%rdx)
incq %rdx
jmp 0xb375
movq -0x30(%rbp), %rcx
movb $-0x1, (%r13,%rcx)
addq %rcx, %r10
addq %rbx, %r13
jmp 0xb364
movq -0x58(%rbp), %rax
decl %eax
je 0xb295
movq -0x60(%rbp), %rcx
addq %r13, %rcx
xorl %edx, %edx
cmpq %rdx, %r15
je 0xb3cd
movb (%rcx,%rdx), %sil
shrb %sil
addb (%r10,%rdx), %sil
movb %sil, (%r13,%rdx)
incq %rdx
jmp 0xb3b3
movq -0x30(%rbp), %rcx
movb $-0x1, (%r13,%rcx)
addq %rcx, %r10
addq %rbx, %r13
jmp 0xb3a2
movq -0x58(%rbp), %rax
decl %eax
je 0xb295
movq -0x60(%rbp), %rcx
addq %r13, %rcx
xorl %edx, %edx
cmpq %rdx, %r15
je 0xb40b
movb (%rcx,%rdx), %sil
addb (%r10,%rdx), %sil
movb %sil, (%r13,%rdx)
incq %rdx
jmp 0xb3f4
movq -0x30(%rbp), %rcx
movb $-0x1, (%r13,%rcx)
addq %rcx, %r10
addq %rbx, %r13
jmp 0xb3e3
leaq 0x5a24(%rip), %rax      # 0x10e48
jmp 0xb80e
cmpl $0x7, %r9d
jg 0xb829
movl -0x98(%rbp), %ecx
movl -0xa0(%rbp), %edx
movslq %r9d, %rax
movq %rax, -0x38(%rbp)
movq -0x58(%rbp), %r12
movl %r12d, %edi
movq %rcx, %rax
subq %rdx, %rax
movq %rax, -0x30(%rbp)
negq %rdx
leaq (%rdi,%rdi,2), %rax
addq $-0x3, %rax
movq %rax, -0x48(%rbp)
movl %r12d, %eax
decl %r12d
leal -0x4(,%rax,4), %esi
movl %esi, -0xc0(%rbp)
decq %rdi
leal -0x1(,%rax,2), %eax
movl %eax, -0x60(%rbp)
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %esi, %esi
cmpq -0xe0(%rbp), %rsi
je 0xb854
movb $0x1, %r14b
cmpl $0x0, 0x18(%rbp)
jne 0xb4b2
movq -0x38(%rbp), %rax
leaq 0x4f42(%rip), %r9       # 0x103f0
movb (%rax,%r9), %r14b
movl %r15d, %r15d
movq 0x18(%r8), %rax
imull %esi, %r13d
movl 0x10(%rbp), %r8d
cmpl $0x4, %r8d
je 0xb638
leaq (%rcx,%r13), %r10
addq %rdx, %r10
addq %rax, %r10
cmpl $0x2, %r8d
je 0xb596
cmpl $0x1, %r8d
jne 0xb741
addq %r15, %rax
addq $0x7, %rax
movl -0x64(%rbp), %r9d
cmpl $0x8, %r9d
jl 0xb697
movb (%r10), %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x7(%rax)
movb (%r10), %r8b
addb %r8b, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x6(%rax)
movb (%r10), %r8b
shlb $0x2, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x5(%rax)
movb (%r10), %r8b
shlb $0x3, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x4(%rax)
movb (%r10), %r8b
shlb $0x4, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x3(%rax)
movb (%r10), %r8b
shlb $0x5, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x2(%rax)
movb (%r10), %r8b
shlb $0x6, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x1(%rax)
movzbl %r14b, %r8d
testb $0x1, (%r10)
cmovel %ebx, %r8d
movb %r8b, (%rax)
addl $-0x8, %r9d
incq %r10
addq $0x8, %rax
jmp 0xb4f4
leaq (%rax,%r15), %r9
addq $0x3, %r9
movl -0x64(%rbp), %r11d
cmpl $0x4, %r11d
jl 0xb5eb
movb (%r10), %al
shrb $0x6, %al
mulb %r14b
movb %al, -0x3(%r9)
movb (%r10), %al
shrb $0x4, %al
andb $0x3, %al
mulb %r14b
movb %al, -0x2(%r9)
movb (%r10), %al
shrb $0x2, %al
andb $0x3, %al
mulb %r14b
movb %al, -0x1(%r9)
movb (%r10), %al
andb $0x3, %al
mulb %r14b
movb %al, (%r9)
addl $-0x4, %r11d
incq %r10
addq $0x4, %r9
jmp 0xb5a2
testl %r11d, %r11d
jle 0xb741
movb (%r10), %al
shrb $0x6, %al
mulb %r14b
movb %al, -0x3(%r9)
cmpl $0x1, %r11d
je 0xb741
movb (%r10), %al
shrb $0x4, %al
andb $0x3, %al
mulb %r14b
movb %al, -0x2(%r9)
cmpl $0x3, %r11d
jne 0xb741
movb (%r10), %al
shrb $0x2, %al
andb $0x3, %al
mulb %r14b
movb %al, -0x1(%r9)
jmp 0xb741
leaq (%rax,%r15), %r11
addq -0x30(%rbp), %r11
leaq (%rax,%r15), %r9
incq %r9
xorl %r10d, %r10d
movl -0x64(%rbp), %r8d
cmpl $0x2, %r8d
jl 0xb679
movb (%r11,%r10), %al
shrb $0x4, %al
mulb %r14b
movb %al, -0x1(%r9,%r10,2)
movb (%r11,%r10), %al
andb $0xf, %al
mulb %r14b
movb %al, (%r9,%r10,2)
addl $-0x2, %r8d
incq %r10
jmp 0xb64e
cmpl $0x1, %r8d
jne 0xb741
movb (%r11,%r10), %al
shrb $0x4, %al
mulb %r14b
movb %al, -0x1(%r9,%r10,2)
jmp 0xb741
testl %r9d, %r9d
jle 0xb741
movb (%r10), %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x7(%rax)
cmpl $0x1, %r9d
je 0xb741
movb (%r10), %r8b
addb %r8b, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x6(%rax)
cmpl $0x3, %r9d
jb 0xb741
movb (%r10), %r8b
shlb $0x2, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x5(%rax)
cmpl $0x3, %r9d
je 0xb741
movb (%r10), %r8b
shlb $0x3, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x4(%rax)
cmpl $0x5, %r9d
jb 0xb741
movb (%r10), %r8b
shlb $0x4, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x3(%rax)
cmpl $0x5, %r9d
je 0xb741
movb (%r10), %r8b
shlb $0x5, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x2(%rax)
cmpl $0x7, %r9d
jne 0xb741
movb (%r10), %r8b
shlb $0x6, %r8b
sarb $0x7, %r8b
andb %r14b, %r8b
movb %r8b, -0x1(%rax)
movq -0x78(%rbp), %rax
cmpl -0x4c(%rbp), %eax
je 0xb7b9
movq -0x80(%rbp), %rax
addq 0x18(%rax), %r13
movq -0x78(%rbp), %r8
cmpl $0x1, %r8d
je 0xb7cf
movl -0xc0(%rbp), %eax
movl %r12d, %r9d
movq -0x48(%rbp), %r10
cmpl $0x3, %r8d
je 0xb7b4
jmp 0xb8b6
leal 0x3(%rax), %r8d
movb $-0x1, (%r13,%r8)
movl %r10d, %r8d
movb 0x2(%r13,%r8), %r11b
leal 0x2(%rax), %r14d
movb %r11b, (%r13,%r14)
movb 0x1(%r13,%r8), %r11b
leal 0x1(%rax), %r14d
movb %r11b, (%r13,%r14)
movb (%r13,%r8), %r8b
movl %eax, %r11d
movb %r8b, (%r13,%r11)
addq $-0x3, %r10
decl %r9d
addl $-0x4, %eax
testl %r9d, %r9d
jns 0xb774
incq %rsi
movq -0x90(%rbp), %r13
addl %r13d, %r15d
movq -0x80(%rbp), %r8
jmp 0xb48d
movl -0x60(%rbp), %eax
xorl %r8d, %r8d
movl %r12d, %r9d
addl %r8d, %r9d
js 0xb7b9
leaq (%rdi,%r8), %r9
leal -0x1(%rax), %r10d
movl %eax, %r11d
movb $-0x1, (%r13,%r11)
andl $0x7fffffff, %r9d       # imm = 0x7FFFFFFF
movb (%r13,%r9), %r9b
movb %r9b, (%r13,%r10)
decq %r8
addl $-0x2, %eax
jmp 0xb7d5
leaq 0x596e(%rip), %rax      # 0x1117c
movq %rax, 0xa9db(%rip)      # 0x161f0
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rax
cmpl $0x10, %r9d
jne 0xb817
movq 0x18(%r8), %rdx
movq -0x98(%rbp), %rsi
imull -0xc4(%rbp), %esi
xorl %ecx, %ecx
cmpl %ecx, %esi
je 0xb817
rolw $0x8, (%rdx,%rcx,2)
incq %rcx
jmp 0xb846
pushq $0x1
popq %rax
jmp 0xb817
leaq 0x592b(%rip), %rdi      # 0x1118b
leaq 0x548b(%rip), %rsi      # 0x10cf2
leaq 0x588c(%rip), %rcx      # 0x110fa
movl $0x10d3, %edx           # imm = 0x10D3
callq 0x1080
leaq 0x5921(%rip), %rdi      # 0x111a0
leaq 0x546c(%rip), %rsi      # 0x10cf2
leaq 0x586d(%rip), %rcx      # 0x110fa
movl $0x1110, %edx           # imm = 0x1110
callq 0x1080
leaq 0x5833(%rip), %rdi      # 0x110d1
leaq 0x544d(%rip), %rsi      # 0x10cf2
leaq 0x584e(%rip), %rcx      # 0x110fa
movl $0x10be, %edx           # imm = 0x10BE
callq 0x1080
leaq 0x58f4(%rip), %rdi      # 0x111b1
leaq 0x542e(%rip), %rsi      # 0x10cf2
leaq 0x582f(%rip), %rcx      # 0x110fa
movl $0x1169, %edx           # imm = 0x1169
callq 0x1080