// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/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)
{
   stbi__context *s = a->s;
   stbi__uint32 i,j,stride = x*out_n;
   stbi__uint32 img_len, img_width_bytes;
   int k;
   int img_n = s->img_n; // copy it into a local for later

   STBI_ASSERT(out_n == s->img_n || out_n == s->img_n+1);
   a->out = (stbi_uc *) stbi__malloc(x * y * out_n); // 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++;
      int filter_bytes = img_n;
      int width = x;
      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 {
         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)*img_n;
         #define 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;
            CASE(STBI__F_sub)          cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); 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] + cur[k-filter_bytes])>>1)); break;
            CASE(STBI__F_paeth)        cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); break;
            CASE(STBI__F_avg_first)    cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); break;
            CASE(STBI__F_paeth_first)  cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); break;
         }
         #undef CASE
         raw += nk;
      } else {
         STBI_ASSERT(img_n+1 == out_n);
         #define CASE(f) \
             case f:     \
                for (i=x-1; i >= 1; --i, cur[img_n]=255,raw+=img_n,cur+=out_n,prior+=out_n) \
                   for (k=0; k < img_n; ++k)
         switch (filter) {
            CASE(STBI__F_none)         cur[k] = raw[k]; break;
            CASE(STBI__F_sub)          cur[k] = STBI__BYTECAST(raw[k] + cur[k-out_n]); 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] + cur[k-out_n])>>1)); break;
            CASE(STBI__F_paeth)        cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],prior[k],prior[k-out_n])); break;
            CASE(STBI__F_avg_first)    cur[k] = STBI__BYTECAST(raw[k] + (cur[k-out_n] >> 1)); break;
            CASE(STBI__F_paeth_first)  cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-out_n],0,0)); break;
         }
         #undef CASE
      }
   }

   // we make a separate pass to expand bits to pixels; for performance,
   // this could run two scanlines behind the above code, so it won't
   // intefere with filtering but will still be in the cache.
   if (depth < 8) {
      for (j=0; j < y; ++j) {
         stbi_uc *cur = a->out + stride*j;
         stbi_uc *in  = a->out + stride*j + x*out_n - img_width_bytes;
         // unpack 1/2/4-bit into a 8-bit buffer. allows us to keep the common 8-bit path optimal at minimal cost for 1/2/4-bit
         // png guarante byte alignment, if width is not multiple of 8/4/2 we'll decode dummy trailing data that will be skipped in the later loop
         stbi_uc scale = (color == 0) ? stbi__depth_scale_table[depth] : 1; // scale grayscale values to 0..255 range

         // note that the final byte might overshoot and write more data than desired.
         // we can allocate enough data that this never writes out of memory, but it
         // could also overwrite the next scanline. can it overwrite non-empty data
         // on the next scanline? yes, consider 1-pixel-wide scanlines with 1-bit-per-pixel.
         // so we need to explicitly clamp the final ones

         if (depth == 4) {
            for (k=x*img_n; k >= 2; k-=2, ++in) {
               *cur++ = scale * ((*in >> 4)       );
               *cur++ = scale * ((*in     ) & 0x0f);
            }
            if (k > 0) *cur++ = scale * ((*in >> 4)       );
         } else if (depth == 2) {
            for (k=x*img_n; k >= 4; k-=4, ++in) {
               *cur++ = scale * ((*in >> 6)       );
               *cur++ = scale * ((*in >> 4) & 0x03);
               *cur++ = scale * ((*in >> 2) & 0x03);
               *cur++ = scale * ((*in     ) & 0x03);
            }
            if (k > 0) *cur++ = scale * ((*in >> 6)       );
            if (k > 1) *cur++ = scale * ((*in >> 4) & 0x03);
            if (k > 2) *cur++ = scale * ((*in >> 2) & 0x03);
         } else if (depth == 1) {
            for (k=x*img_n; k >= 8; k-=8, ++in) {
               *cur++ = scale * ((*in >> 7)       );
               *cur++ = scale * ((*in >> 6) & 0x01);
               *cur++ = scale * ((*in >> 5) & 0x01);
               *cur++ = scale * ((*in >> 4) & 0x01);
               *cur++ = scale * ((*in >> 3) & 0x01);
               *cur++ = scale * ((*in >> 2) & 0x01);
               *cur++ = scale * ((*in >> 1) & 0x01);
               *cur++ = scale * ((*in     ) & 0x01);
            }
            if (k > 0) *cur++ = scale * ((*in >> 7)       );
            if (k > 1) *cur++ = scale * ((*in >> 6) & 0x01);
            if (k > 2) *cur++ = scale * ((*in >> 5) & 0x01);
            if (k > 3) *cur++ = scale * ((*in >> 4) & 0x01);
            if (k > 4) *cur++ = scale * ((*in >> 3) & 0x01);
            if (k > 5) *cur++ = scale * ((*in >> 2) & 0x01);
            if (k > 6) *cur++ = scale * ((*in >> 1) & 0x01);
         }
         if (img_n != out_n) {
            // insert alpha = 255
            stbi_uc *cur = a->out + stride*j;
            int i;
            if (img_n == 1) {
               for (i=x-1; i >= 0; --i) {
                  cur[i*2+1] = 255;
                  cur[i*2+0] = cur[i];
               }
            } else {
               STBI_ASSERT(img_n == 3);
               for (i=x-1; i >= 0; --i) {
                  cur[i*4+3] = 255;
                  cur[i*4+2] = cur[i*3+2];
                  cur[i*4+1] = cur[i*3+1];
                  cur[i*4+0] = cur[i*3+0];
               }
            }
         }
      }
   }

   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %ecx, %r14d
movl %edx, 0x30(%rsp)
movq (%rdi), %rbx
movl 0x8(%rbx), %ecx
cmpl %r14d, %ecx
sete %al
movq %rcx, 0x50(%rsp)
incl %ecx
movl %ecx, 0x84(%rsp)
cmpl %r14d, %ecx
sete %cl
orb %al, %cl
je 0x1e038
movl %r9d, %ebp
movl %r8d, %r13d
movq %rsi, %r12
movq %rdi, %r15
movl %r8d, %eax
imull %r14d, %eax
movl %eax, 0xc(%rsp)
movl %eax, %edi
imull %r9d, %edi
callq 0x8430
movq %r15, 0x70(%rsp)
movq %rax, 0x18(%r15)
testq %rax, %rax
je 0x1dc21
movq 0x50(%rsp), %rax
imull %r13d, %eax
movl %eax, 0x8(%rsp)
movl %eax, %ecx
imull 0xe0(%rsp), %ecx
addl $0x7, %ecx
shrl $0x3, %ecx
leal 0x1(%rcx), %eax
imull %ebp, %eax
movq %r13, %rdx
cmpl %r13d, (%rbx)
jne 0x1d54d
cmpl %ebp, 0x4(%rbx)
jne 0x1d54d
cmpl 0x30(%rsp), %eax
je 0x1d553
leaq 0x4d76(%rip), %rax      # 0x222be
jmp 0x1dc28
cmpl 0x30(%rsp), %eax
ja 0x1d541
movq %rcx, 0x68(%rsp)
movl %r14d, 0x24(%rsp)
movl %ebp, 0x5c(%rsp)
testl %ebp, %ebp
movq 0x50(%rsp), %r15
movq %rdx, %r11
je 0x1dc45
movl %r15d, %r14d
movslq %r15d, %r13
movl 0x24(%rsp), %edx
cmpl %edx, %r15d
sete %al
movl 0xc(%rsp), %esi
movl %esi, %ecx
movq %rcx, %rdi
negq %rdi
movq %rdi, 0x40(%rsp)
cmpl $0x8, 0xe0(%rsp)
setl %dil
subl 0x68(%rsp), %esi
movq %rsi, 0x98(%rsp)
movslq %edx, %r10
orb %al, %dil
movb %dil, 0x7(%rsp)
leal -0x1(%r11), %eax
movl %eax, (%rsp)
movl 0x5c(%rsp), %eax
movq %rax, 0xa0(%rsp)
movq %r10, %rax
negq %rax
movq %rax, 0x38(%rsp)
subq %rcx, %rax
movq %rax, 0x90(%rsp)
xorl %esi, %esi
xorl %edx, %edx
movq %r13, 0x88(%rsp)
movq %r11, 0x60(%rsp)
movq %r10, 0x28(%rsp)
movl %esi, %esi
leaq 0x1(%r12), %rdi
movzbl (%r12), %eax
movq %rax, 0x30(%rsp)
cmpq $0x5, %rax
movq %rsi, 0x18(%rsp)
movq %rdx, 0x78(%rsp)
jae 0x1d70f
movq 0x70(%rsp), %rax
movq 0x18(%rax), %r8
movl 0xc(%rsp), %eax
movl %eax, %ecx
imull %edx, %ecx
movq %r8, 0x48(%rsp)
addq %r8, %rcx
movq %rcx, %rax
movl %r15d, 0x10(%rsp)
movl %r11d, %r8d
cmpl $0x7, 0xe0(%rsp)
jg 0x1d672
movq %rdx, %r9
movq 0x68(%rsp), %rdx
cmpl %r11d, %edx
ja 0x1e095
movq 0x98(%rsp), %rax
addq %rcx, %rax
movl $0x1, 0x10(%rsp)
movl %edx, %r8d
movq %r9, %rdx
movq 0x30(%rsp), %rsi
movl %esi, %r11d
testq %rdx, %rdx
jne 0x1d68f
leaq 0x45a6(%rip), %rdx      # 0x21c2c
movq 0x30(%rsp), %rsi
movb (%rsi,%rdx), %r11b
movzbl %r11b, %r10d
cmpl $0x0, 0x10(%rsp)
jle 0x1d6ec
movl 0x10(%rsp), %edx
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %r9
addq %r9, %rsi
addq 0x18(%rsp), %rsi
xorl %r9d, %r9d
cmpb $0x6, %r11b
ja 0x1d6e4
leaq 0x4384(%rip), %rbp      # 0x21a44
movslq (%rbp,%r10,4), %rbx
addq %rbp, %rbx
jmpq *%rbx
movb (%rdi,%r9), %bl
jmp 0x1d6e0
movb (%rsi,%r9), %bl
jmp 0x1d6dc
movb (%rsi,%r9), %bl
shrb %bl
addb (%rdi,%r9), %bl
movb %bl, (%rax,%r9)
incq %r9
cmpq %r9, %rdx
jne 0x1d6b3
cmpl $0x8, 0xe0(%rsp)
jne 0x1d725
cmpl 0x24(%rsp), %r15d
je 0x1d702
movb $-0x1, (%rax,%r13)
addq %r13, %rdi
movq 0x28(%rsp), %rdx
movq %rdi, %r12
jmp 0x1d72e
leaq 0x4bba(%rip), %rax      # 0x222d0
movq %rax, 0xaceb(%rip)      # 0x28408
movq %rdi, %r12
jmp 0x1d9aa
addq $0x2, %r12
movl $0x1, %edx
leaq (%rax,%rdx), %rdi
cmpb $0x0, 0x7(%rsp)
je 0x1d76d
decl %r8d
imull %r15d, %r8d
movslq %r8d, %rbp
cmpb $0x6, %r11b
ja 0x1d9a2
leaq 0x4328(%rip), %rsi      # 0x21a7c
movslq (%rsi,%r10,4), %rcx
addq %rsi, %rcx
jmpq *%rcx
movq %r12, %rsi
movq %rbp, %rdx
callq 0x82a0
jmp 0x1d9a2
movl 0x84(%rsp), %esi
cmpl 0x24(%rsp), %esi
jne 0x1e076
cmpb $0x6, %r11b
ja 0x1d9a5
addq 0x40(%rsp), %rcx
addq %rdx, %rcx
leaq 0x42c9(%rip), %r8       # 0x21a60
movslq (%r8,%r10,4), %rsi
addq %r8, %rsi
movq 0x60(%rsp), %r11
jmpq *%rsi
movl (%rsp), %eax
testl %eax, %eax
movq 0x28(%rsp), %r10
je 0x1d9aa
testl %r15d, %r15d
jle 0x1d7cb
xorl %ecx, %ecx
movb (%r12,%rcx), %dl
movb %dl, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %r14
jne 0x1d7bc
movb $-0x1, (%rdi,%r13)
addq %r13, %r12
addq %r10, %rdi
decl %eax
jne 0x1d7b5
jmp 0x1d9aa
testl %r8d, %r8d
jle 0x1d9a2
movslq 0x10(%rsp), %r9
movl %r8d, %ecx
movq %rcx, 0x10(%rsp)
movq %rdx, %rsi
subq %r9, %rsi
addq %rsi, %rax
movq 0x48(%rsp), %rcx
addq 0x40(%rsp), %rcx
addq 0x18(%rsp), %rdx
movq %rdx, %rsi
subq %r9, %rsi
addq %rcx, %rsi
addq %rcx, %rdx
xorl %r8d, %r8d
movzbl (%rax,%r8), %r9d
movzbl (%rdx,%r8), %r11d
movzbl (%rsi,%r8), %r10d
leal (%r11,%r9), %r13d
subl %r10d, %r13d
movl %r13d, %ecx
subl %r9d, %ecx
movl %ecx, %ebx
negl %ebx
cmovsl %ecx, %ebx
movl %r13d, %ecx
subl %r11d, %ecx
movl %ecx, %r15d
negl %r15d
cmovsl %ecx, %r15d
subl %r10d, %r13d
movl %r13d, %ecx
negl %ecx
cmovsl %r13d, %ecx
cmpl %ecx, %r15d
ja 0x1d863
movl %r11d, %r10d
cmpl %ecx, %ebx
cmoval %r10d, %r9d
cmpl %r15d, %ebx
cmoval %r10d, %r9d
addb (%r12,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, 0x10(%rsp)
movq 0x50(%rsp), %r15
movq 0x88(%rsp), %r13
jne 0x1d81c
jmp 0x1d9a2
testl %r8d, %r8d
jle 0x1d9a2
movl %r8d, %eax
movq 0x48(%rsp), %rcx
addq 0x40(%rsp), %rcx
addq 0x18(%rsp), %rdx
addq %rcx, %rdx
xorl %ecx, %ecx
movb (%rdx,%rcx), %sil
addb (%r12,%rcx), %sil
movb %sil, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x1d8b4
jmp 0x1d9a2
testl %r8d, %r8d
jle 0x1d9a2
movslq 0x10(%rsp), %rsi
movl %r8d, %ecx
movq %rdx, %r8
subq %rsi, %r8
addq %r8, %rax
movq 0x48(%rsp), %rsi
addq 0x40(%rsp), %rsi
addq 0x18(%rsp), %rdx
addq %rsi, %rdx
xorl %esi, %esi
movzbl (%rdx,%rsi), %r8d
movzbl (%rax,%rsi), %r9d
addl %r8d, %r9d
shrl %r9d
addb (%r12,%rsi), %r9b
movb %r9b, (%rdi,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x1d8fb
jmp 0x1d9a2
testl %r8d, %r8d
jle 0x1d9a2
movslq 0x10(%rsp), %rsi
movl %r8d, %ecx
subq %rsi, %rdx
addq %rdx, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
addb (%r12,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x1d935
jmp 0x1d9a2
testl %r8d, %r8d
jle 0x1d9a2
movslq 0x10(%rsp), %rsi
movl %r8d, %ecx
subq %rsi, %rdx
addq %rdx, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
shrb %sil
addb (%r12,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x1d960
jmp 0x1d9a2
testl %r8d, %r8d
jle 0x1d9a2
movslq 0x10(%rsp), %rsi
movl %r8d, %ecx
subq %rsi, %rdx
addq %rdx, %rax
xorl %edx, %edx
movb (%rax,%rdx), %sil
addb (%r12,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %rcx
jne 0x1d98e
addq %rbp, %r12
movq 0x60(%rsp), %r11
cmpb $0x5, 0x30(%rsp)
jae 0x1dc2f
movq 0x78(%rsp), %rdx
incq %rdx
movq 0x18(%rsp), %rsi
addl 0xc(%rsp), %esi
cmpq 0xa0(%rsp), %rdx
jne 0x1d5f4
jmp 0x1dc45
movl (%rsp), %esi
testl %esi, %esi
je 0x1d9aa
addq 0x38(%rsp), %rax
addq %rdx, %rax
movq 0x48(%rsp), %r8
addq 0x90(%rsp), %r8
addq 0x18(%rsp), %rdx
addq %r8, %rdx
testl %r15d, %r15d
jle 0x1da69
xorl %r8d, %r8d
movzbl (%rax,%r8), %r9d
movzbl (%rcx,%r8), %r11d
movzbl (%rdx,%r8), %r10d
leal (%r11,%r9), %r13d
subl %r10d, %r13d
movl %r13d, %ebp
subl %r9d, %ebp
movl %ebp, %ebx
negl %ebx
cmovsl %ebp, %ebx
movl %r13d, %ebp
subl %r11d, %ebp
movl %ebp, %r15d
negl %r15d
cmovsl %ebp, %r15d
subl %r10d, %r13d
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
cmpl %ebp, %r15d
ja 0x1da4c
movl %r11d, %r10d
cmpl %ebp, %ebx
cmoval %r10d, %r9d
cmpl %r15d, %ebx
cmoval %r10d, %r9d
addb (%r12,%r8), %r9b
movb %r9b, (%rdi,%r8)
incq %r8
cmpq %r8, %r14
jne 0x1da05
movq 0x88(%rsp), %r13
movb $-0x1, (%rdi,%r13)
addq %r13, %r12
movq 0x28(%rsp), %r10
addq %r10, %rdi
addq %r10, %rcx
addq %r10, %rax
addq %r10, %rdx
decl %esi
movq 0x60(%rsp), %r11
movq 0x50(%rsp), %r15
jne 0x1d9fd
jmp 0x1d9aa
movl (%rsp), %edx
movl %edx, %eax
testl %edx, %edx
movq 0x28(%rsp), %r10
je 0x1d9aa
testl %r15d, %r15d
jle 0x1dace
xorl %edx, %edx
movb (%rcx,%rdx), %sil
addb (%r12,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %r14
jne 0x1daba
movb $-0x1, (%rdi,%r13)
addq %r13, %r12
addq %r10, %rdi
addq %r10, %rcx
decl %eax
jne 0x1dab3
jmp 0x1d9aa
movl (%rsp), %esi
testl %esi, %esi
movq 0x28(%rsp), %r10
je 0x1d9aa
addq 0x38(%rsp), %rax
addq %rdx, %rax
movl %esi, %edx
testl %r15d, %r15d
jle 0x1db26
xorl %esi, %esi
movzbl (%rcx,%rsi), %r8d
movzbl (%rax,%rsi), %r9d
addl %r8d, %r9d
shrl %r9d
addb (%r12,%rsi), %r9b
movb %r9b, (%rdi,%rsi)
incq %rsi
cmpq %rsi, %r14
jne 0x1db06
movb $-0x1, (%rdi,%r13)
addq %r13, %r12
addq %r10, %rdi
addq %r10, %rcx
addq %r10, %rax
decl %edx
jne 0x1daff
jmp 0x1d9aa
movl (%rsp), %ecx
testl %ecx, %ecx
movq 0x28(%rsp), %r10
je 0x1d9aa
addq 0x38(%rsp), %rax
addq %rdx, %rax
testl %r15d, %r15d
jle 0x1db73
xorl %edx, %edx
movb (%rax,%rdx), %sil
addb (%r12,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %r14
jne 0x1db5f
movb $-0x1, (%rdi,%r13)
addq %r13, %r12
addq %r10, %rdi
addq %r10, %rax
decl %ecx
jne 0x1db58
jmp 0x1d9aa
movl (%rsp), %ecx
testl %ecx, %ecx
movq 0x28(%rsp), %r10
je 0x1d9aa
addq 0x38(%rsp), %rax
addq %rdx, %rax
testl %r15d, %r15d
jle 0x1dbc0
xorl %edx, %edx
movb (%rax,%rdx), %sil
shrb %sil
addb (%r12,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %r14
jne 0x1dba9
movb $-0x1, (%rdi,%r13)
addq %r13, %r12
addq %r10, %rdi
addq %r10, %rax
decl %ecx
jne 0x1dba2
jmp 0x1d9aa
movl (%rsp), %ecx
testl %ecx, %ecx
movq 0x28(%rsp), %r10
je 0x1d9aa
addq 0x38(%rsp), %rax
addq %rdx, %rax
testl %r15d, %r15d
jle 0x1dc0a
xorl %edx, %edx
movb (%rax,%rdx), %sil
addb (%r12,%rdx), %sil
movb %sil, (%rdi,%rdx)
incq %rdx
cmpq %rdx, %r14
jne 0x1dbf6
movb $-0x1, (%rdi,%r13)
addq %r13, %r12
addq %r10, %rdi
addq %r10, %rax
decl %ecx
jne 0x1dbef
jmp 0x1d9aa
leaq 0x435f(%rip), %rax      # 0x21f87
movq %rax, 0xa7d9(%rip)      # 0x28408
xorl %ecx, %ecx
movl %ecx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xe0(%rsp), %edi
cmpl $0x8, %edi
setge %al
movl 0x5c(%rsp), %r8d
testl %r8d, %r8d
sete %dl
movl $0x1, %ecx
orb %al, %dl
jne 0x1dc31
movl 0xe8(%rsp), %edx
movl 0xc(%rsp), %eax
movl 0x68(%rsp), %esi
movl %edi, %edi
movq %rdi, 0x30(%rsp)
decl %r11d
movl %r8d, %r8d
movq %rax, %r9
subq %rsi, %r9
negq %rsi
leaq (%r11,%r11,2), %rdi
addq $0x2, %rdi
movq %rdi, 0x78(%rsp)
movq %r11, %rdi
leaq 0x1(%r11), %r10
movq %r10, 0x18(%rsp)
xorl %ebx, %ebx
addq %rax, %rsi
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x70(%rsp), %r14
movb $0x1, %bpl
testl %edx, %edx
jne 0x1dccb
movq 0x30(%rsp), %rax
leaq 0x3ed9(%rip), %r10      # 0x21ba0
movb (%rax,%r10), %bpl
movq 0x18(%r14), %r10
movl 0xc(%rsp), %eax
movl %eax, %r14d
imull %r12d, %r14d
addq %r10, %r14
leaq (%r14,%rsi), %r13
movl %r15d, %r15d
movl 0xe0(%rsp), %eax
cmpl $0x4, %eax
je 0x1df36
cmpl $0x2, %eax
je 0x1de84
cmpl $0x1, %eax
jne 0x1df99
movl 0x8(%rsp), %r11d
movl %r11d, %eax
cmpl $0x8, %r11d
jl 0x1ddd3
leaq (%r10,%r9), %r13
movl 0x8(%rsp), %eax
movl %eax, %r11d
movb (%r13,%r15), %al
sarb $0x7, %al
andb %bpl, %al
movb %al, (%r10,%r15)
movb (%r13,%r15), %al
addb %al, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x1(%r10,%r15)
movb (%r13,%r15), %al
shlb $0x2, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x2(%r10,%r15)
movb (%r13,%r15), %al
shlb $0x3, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x3(%r10,%r15)
movb (%r13,%r15), %al
shlb $0x4, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x4(%r10,%r15)
movb (%r13,%r15), %al
shlb $0x5, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x5(%r10,%r15)
movb (%r13,%r15), %al
shlb $0x6, %al
sarb $0x7, %al
andb %bpl, %al
movb %al, 0x6(%r10,%r15)
testb $0x1, (%r13,%r15)
movzbl %bpl, %eax
cmovel %ebx, %eax
movb %al, 0x7(%r10,%r15)
leal -0x8(%r11), %eax
incq %r13
addq $0x8, %r10
cmpl $0xf, %r11d
jg 0x1dd20
addq %r15, %r13
addq %r15, %r10
movq %r10, %r14
testl %eax, %eax
jle 0x1dde8
movb (%r13), %r10b
sarb $0x7, %r10b
andb %bpl, %r10b
movb %r10b, (%r14)
incq %r14
cmpl $0x2, %eax
jl 0x1de01
movb (%r13), %r10b
addb %r10b, %r10b
sarb $0x7, %r10b
andb %bpl, %r10b
movb %r10b, (%r14)
incq %r14
cmpl $0x3, %eax
jl 0x1de1b
movb (%r13), %r10b
shlb $0x2, %r10b
sarb $0x7, %r10b
andb %bpl, %r10b
movb %r10b, (%r14)
incq %r14
cmpl $0x4, %eax
jl 0x1de35
movb (%r13), %r10b
shlb $0x3, %r10b
sarb $0x7, %r10b
andb %bpl, %r10b
movb %r10b, (%r14)
incq %r14
cmpl $0x5, %eax
jl 0x1de4f
movb (%r13), %r10b
shlb $0x4, %r10b
sarb $0x7, %r10b
andb %bpl, %r10b
movb %r10b, (%r14)
incq %r14
cmpl $0x6, %eax
jl 0x1de69
movb (%r13), %r10b
shlb $0x5, %r10b
sarb $0x7, %r10b
andb %bpl, %r10b
movb %r10b, (%r14)
incq %r14
cmpl $0x7, %eax
jne 0x1df99
movb (%r13), %al
shlb $0x6, %al
sarb $0x7, %al
andb %bpl, %al
jmp 0x1df96
movl 0x8(%rsp), %eax
movl %eax, %r11d
cmpl $0x4, %eax
jl 0x1def8
leaq (%r10,%r9), %r13
movl 0x8(%rsp), %r11d
movl %r11d, %r14d
movb (%r13,%r15), %al
shrb $0x6, %al
mulb %bpl
movb %al, (%r10,%r15)
movb (%r13,%r15), %al
shrb $0x4, %al
andb $0x3, %al
mulb %bpl
movb %al, 0x1(%r10,%r15)
movb (%r13,%r15), %al
shrb $0x2, %al
andb $0x3, %al
mulb %bpl
movb %al, 0x2(%r10,%r15)
movb (%r13,%r15), %al
andb $0x3, %al
mulb %bpl
movb %al, 0x3(%r10,%r15)
leal -0x4(%r14), %r11d
incq %r13
addq $0x4, %r10
cmpl $0x7, %r14d
jg 0x1de99
addq %r15, %r13
addq %r15, %r10
movq %r10, %r14
testl %r11d, %r11d
jle 0x1df0d
movb (%r13), %al
shrb $0x6, %al
mulb %bpl
movb %al, (%r14)
incq %r14
cmpl $0x2, %r11d
jl 0x1df25
movb (%r13), %al
shrb $0x4, %al
andb $0x3, %al
mulb %bpl
movb %al, (%r14)
incq %r14
cmpl $0x3, %r11d
jne 0x1df99
movb (%r13), %al
shrb $0x2, %al
andb $0x3, %al
jmp 0x1df93
movl 0x8(%rsp), %r11d
movl %r11d, %eax
cmpl $0x2, %r11d
jl 0x1df87
leaq (%r10,%r9), %r13
movl 0x8(%rsp), %eax
movl %eax, %r11d
movb (%r13,%r15), %al
shrb $0x4, %al
mulb %bpl
movb %al, (%r10,%r15)
movb (%r13,%r15), %al
andb $0xf, %al
mulb %bpl
movb %al, 0x1(%r10,%r15)
leal -0x2(%r11), %eax
incq %r13
addq $0x2, %r10
cmpl $0x3, %r11d
jg 0x1df4c
addq %r15, %r13
addq %r15, %r10
movq %r10, %r14
cmpl $0x1, %eax
jne 0x1df99
movb (%r13), %al
shrb $0x4, %al
mulb %bpl
movb %al, (%r14)
movq 0x50(%rsp), %r10
cmpl 0x24(%rsp), %r10d
movq 0x70(%rsp), %r14
je 0x1e022
movq 0x18(%r14), %rax
cmpl $0x1, %r10d
je 0x1e001
cmpl $0x3, %r10d
jne 0x1e057
movq %rdi, %r10
testl %r10d, %r10d
js 0x1e022
addq %r15, %rax
movq 0x78(%rsp), %r10
addq %rax, %r10
movq 0x18(%rsp), %r11
movb $-0x1, -0x1(%rax,%r11,4)
movb (%r10), %bpl
movb %bpl, -0x2(%rax,%r11,4)
movb -0x1(%r10), %bpl
movb %bpl, -0x3(%rax,%r11,4)
movb -0x2(%r10), %bpl
movb %bpl, -0x4(%rax,%r11,4)
addq $-0x3, %r10
decq %r11
jg 0x1dfd6
jmp 0x1e022
testl %edi, %edi
js 0x1e022
addq %r15, %rax
movq 0x18(%rsp), %r10
movb $-0x1, -0x1(%rax,%r10,2)
movb -0x1(%rax,%r10), %r11b
movb %r11b, -0x2(%rax,%r10,2)
decq %r10
jg 0x1e00d
incq %r12
addl 0xc(%rsp), %r15d
cmpq %r8, %r12
jne 0x1dcb4
jmp 0x1dc31
leaq 0x41e6(%rip), %rdi      # 0x22225
leaq 0x4011(%rip), %rsi      # 0x22057
leaq 0x4201(%rip), %rcx      # 0x2224e
movl $0xf7d, %edx            # imm = 0xF7D
callq 0x8210
leaq 0x42a7(%rip), %rdi      # 0x22305
leaq 0x3ff2(%rip), %rsi      # 0x22057
leaq 0x41e2(%rip), %rcx      # 0x2224e
movl $0x1018, %edx           # imm = 0x1018
callq 0x8210
leaq 0x4277(%rip), %rdi      # 0x222f4
leaq 0x3fd3(%rip), %rsi      # 0x22057
leaq 0x41c3(%rip), %rcx      # 0x2224e
movl $0xfc8, %edx            # imm = 0xFC8
callq 0x8210
leaq 0x4243(%rip), %rdi      # 0x222df
leaq 0x3fb4(%rip), %rsi      # 0x22057
leaq 0x41a4(%rip), %rcx      # 0x2224e
movl $0xf93, %edx            # imm = 0xF93
callq 0x8210