// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__tga_load(stbi__context*, int*, int*, int*, int, stbi__result_info*)
static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri)
{
   //   read in the TGA header stuff
   int tga_offset = stbi__get8(s);
   int tga_indexed = stbi__get8(s);
   int tga_image_type = stbi__get8(s);
   int tga_is_RLE = 0;
   int tga_palette_start = stbi__get16le(s);
   int tga_palette_len = stbi__get16le(s);
   int tga_palette_bits = stbi__get8(s);
   int tga_x_origin = stbi__get16le(s);
   int tga_y_origin = stbi__get16le(s);
   int tga_width = stbi__get16le(s);
   int tga_height = stbi__get16le(s);
   int tga_bits_per_pixel = stbi__get8(s);
   int tga_comp, tga_rgb16=0;
   int tga_inverted = stbi__get8(s);
   // int tga_alpha_bits = tga_inverted & 15; // the 4 lowest bits - unused (useless?)
   //   image data
   unsigned char *tga_data;
   unsigned char *tga_palette = NULL;
   int i, j;
   unsigned char raw_data[4] = {0};
   int RLE_count = 0;
   int RLE_repeating = 0;
   int read_next_pixel = 1;
   STBI_NOTUSED(ri);

   //   do a tiny bit of precessing
   if ( tga_image_type >= 8 )
   {
      tga_image_type -= 8;
      tga_is_RLE = 1;
   }
   tga_inverted = 1 - ((tga_inverted >> 5) & 1);

   //   If I'm paletted, then I'll use the number of bits from the palette
   if ( tga_indexed ) tga_comp = stbi__tga_get_comp(tga_palette_bits, 0, &tga_rgb16);
   else tga_comp = stbi__tga_get_comp(tga_bits_per_pixel, (tga_image_type == 3), &tga_rgb16);

   if(!tga_comp) // shouldn't really happen, stbi__tga_test() should have ensured basic consistency
      return stbi__errpuc("bad format", "Can't find out TGA pixelformat");

   //   tga info
   *x = tga_width;
   *y = tga_height;
   if (comp) *comp = tga_comp;

   if (!stbi__mad3sizes_valid(tga_width, tga_height, tga_comp, 0))
      return stbi__errpuc("too large", "Corrupt TGA");

   tga_data = (unsigned char*)stbi__malloc_mad3(tga_width, tga_height, tga_comp, 0);
   if (!tga_data) return stbi__errpuc("outofmem", "Out of memory");

   // skip to the data's starting position (offset usually = 0)
   stbi__skip(s, tga_offset );

   if ( !tga_indexed && !tga_is_RLE && !tga_rgb16 ) {
      for (i=0; i < tga_height; ++i) {
         int row = tga_inverted ? tga_height -i - 1 : i;
         stbi_uc *tga_row = tga_data + row*tga_width*tga_comp;
         stbi__getn(s, tga_row, tga_width * tga_comp);
      }
   } else  {
      //   do I need to load a palette?
      if ( tga_indexed)
      {
         //   any data to skip? (offset usually = 0)
         stbi__skip(s, tga_palette_start );
         //   load the palette
         tga_palette = (unsigned char*)stbi__malloc_mad2(tga_palette_len, tga_comp, 0);
         if (!tga_palette) {
            STBI_FREE(tga_data);
            return stbi__errpuc("outofmem", "Out of memory");
         }
         if (tga_rgb16) {
            stbi_uc *pal_entry = tga_palette;
            STBI_ASSERT(tga_comp == STBI_rgb);
            for (i=0; i < tga_palette_len; ++i) {
               stbi__tga_read_rgb16(s, pal_entry);
               pal_entry += tga_comp;
            }
         } else if (!stbi__getn(s, tga_palette, tga_palette_len * tga_comp)) {
               STBI_FREE(tga_data);
               STBI_FREE(tga_palette);
               return stbi__errpuc("bad palette", "Corrupt TGA");
         }
      }
      //   load the data
      for (i=0; i < tga_width * tga_height; ++i)
      {
         //   if I'm in RLE mode, do I need to get a RLE stbi__pngchunk?
         if ( tga_is_RLE )
         {
            if ( RLE_count == 0 )
            {
               //   yep, get the next byte as a RLE command
               int RLE_cmd = stbi__get8(s);
               RLE_count = 1 + (RLE_cmd & 127);
               RLE_repeating = RLE_cmd >> 7;
               read_next_pixel = 1;
            } else if ( !RLE_repeating )
            {
               read_next_pixel = 1;
            }
         } else
         {
            read_next_pixel = 1;
         }
         //   OK, if I need to read a pixel, do it now
         if ( read_next_pixel )
         {
            //   load however much data we did have
            if ( tga_indexed )
            {
               // read in index, then perform the lookup
               int pal_idx = (tga_bits_per_pixel == 8) ? stbi__get8(s) : stbi__get16le(s);
               if ( pal_idx >= tga_palette_len ) {
                  // invalid index
                  pal_idx = 0;
               }
               pal_idx *= tga_comp;
               for (j = 0; j < tga_comp; ++j) {
                  raw_data[j] = tga_palette[pal_idx+j];
               }
            } else if(tga_rgb16) {
               STBI_ASSERT(tga_comp == STBI_rgb);
               stbi__tga_read_rgb16(s, raw_data);
            } else {
               //   read in the data raw
               for (j = 0; j < tga_comp; ++j) {
                  raw_data[j] = stbi__get8(s);
               }
            }
            //   clear the reading flag for the next pixel
            read_next_pixel = 0;
         } // end of reading a pixel

         // copy data
         for (j = 0; j < tga_comp; ++j)
           tga_data[i*tga_comp+j] = raw_data[j];

         //   in case we're in RLE mode, keep counting down
         --RLE_count;
      }
      //   do I need to invert the image?
      if ( tga_inverted )
      {
         for (j = 0; j*2 < tga_height; ++j)
         {
            int index1 = j * tga_width * tga_comp;
            int index2 = (tga_height - 1 - j) * tga_width * tga_comp;
            for (i = tga_width * tga_comp; i > 0; --i)
            {
               unsigned char temp = tga_data[index1];
               tga_data[index1] = tga_data[index2];
               tga_data[index2] = temp;
               ++index1;
               ++index2;
            }
         }
      }
      //   clear my palette, if I had one
      if ( tga_palette != NULL )
      {
         STBI_FREE( tga_palette );
      }
   }

   // swap RGB - if the source data was RGB16, it already is in the right order
   if (tga_comp >= 3 && !tga_rgb16)
   {
      unsigned char* tga_pixel = tga_data;
      for (i=0; i < tga_width * tga_height; ++i)
      {
         unsigned char temp = tga_pixel[0];
         tga_pixel[0] = tga_pixel[2];
         tga_pixel[2] = temp;
         tga_pixel += tga_comp;
      }
   }

   // convert to target component count
   if (req_comp && req_comp != tga_comp)
      tga_data = stbi__convert_format(tga_data, tga_comp, req_comp, tga_width, tga_height);

   //   the things I do to get rid of an error message, and yet keep
   //   Microsoft's C compilers happy... [8^(
   tga_palette_start = tga_palette_len = tga_palette_bits =
         tga_x_origin = tga_y_origin = 0;
   //   OK, done
   return tga_data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, %ebx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
movq 0xb8(%rdi), %rax
cmpq 0xc0(%rdi), %rax
jb 0xc760
cmpl $0x0, 0x30(%r14)
je 0xc730
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %r15
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xc73a
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0xc759
movl $0x0, 0x10(%rsp)
jmp 0xc772
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movzbl (%rax), %eax
movl %eax, 0x10(%rsp)
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
movl %ebx, 0x64(%rsp)
movq %r13, 0x38(%rsp)
movq %rbp, 0x58(%rsp)
jb 0xc7ed
cmpl $0x0, 0x30(%r14)
je 0xc7c3
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %r15
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xc7c7
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0xc7e6
xorl %ebp, %ebp
jmp 0xc7ff
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
cmpb $0x0, (%rax)
setne %bpl
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0xc872
cmpl $0x0, 0x30(%r14)
je 0xc842
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %r15
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xc84c
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0xc86b
movl $0x0, 0x34(%rsp)
jmp 0xc883
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
movl %eax, 0x34(%rsp)
movq %r14, %rdi
callq 0x12ebf
movl %eax, %ebx
movq %r14, %rdi
callq 0x12ebf
movl %eax, 0x30(%rsp)
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
movq %r12, 0x8(%rsp)
movl %ebx, 0x18(%rsp)
jb 0xc910
cmpl $0x0, 0x30(%r14)
je 0xc8e5
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %r15
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xc8ea
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0xc909
xorl %r12d, %r12d
jmp 0xc91e
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %r12b
movq %r14, %rdi
callq 0x12ebf
movq %r14, %rdi
callq 0x12ebf
movq %r14, %rdi
callq 0x12ebf
movl %eax, %r15d
movq %r14, %rdi
callq 0x12ebf
movl %eax, %esi
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0xc9c0
cmpl $0x0, 0x30(%r14)
je 0xc98e
movl %ebp, %ebx
movq %rsi, %rbp
movl %r15d, %r13d
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %r15
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xc992
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0xc9b1
xorl %ebx, %ebx
jmp 0xc9cd
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
movl %r13d, %r15d
movq %rbp, %rsi
movl %ebx, %ebp
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %bl
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0xca52
cmpl $0x0, 0x30(%r14)
je 0xca1c
movl %ebx, 0x40(%rsp)
movl %ebp, %ebx
movq %rsi, %rbp
movl %r15d, %r13d
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %r15
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xca20
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0xca3f
movb $0x1, %al
jmp 0xca63
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
movl %r13d, %r15d
movq %rbp, %rsi
movl %ebx, %ebp
movl 0x40(%rsp), %ebx
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
testb $0x20, (%rax)
sete %al
movb %al, 0x7(%rsp)
movl $0x0, 0x14(%rsp)
testb %bpl, %bpl
je 0xcaa4
movzbl %r12b, %eax
movb $0x1, %cl
movl %ecx, 0x1c(%rsp)
cmpl $0x17, %eax
jg 0xcaea
leal -0xf(%rax), %ecx
cmpl $0x2, %ecx
jae 0xcb25
movl $0x3, %r13d
movb $0x1, %al
movl $0x0, 0x1c(%rsp)
jmp 0xcb4a
movzbl %bl, %eax
movb $0x1, %cl
movl %ecx, 0x1c(%rsp)
cmpl $0xf, %eax
movq 0x8(%rsp), %rdi
jle 0xcafe
cmpl $0x20, %eax
je 0xcb1a
cmpl $0x18, %eax
je 0xcb1a
cmpl $0x10, %eax
jne 0xcb3e
movl 0x34(%rsp), %edx
movzbl %dl, %eax
leal -0x8(%rax), %ecx
cmpb $0x8, %dl
cmovbl %eax, %ecx
xorl %r13d, %r13d
cmpl $0x3, %ecx
sete %al
jne 0xcb08
movb %al, %r13b
xorl $0x3, %r13d
jmp 0xcb3a
cmpl $0x18, %eax
je 0xcaf4
cmpl $0x20, %eax
jne 0xcb45
shrb $0x3, %r12b
movzbl %r12b, %r13d
jmp 0xcb30
cmpl $0x8, %eax
je 0xcb34
cmpl $0xf, %eax
jne 0xcb3e
movl $0x3, %r13d
movb $0x1, %al
movl $0x0, 0x1c(%rsp)
jmp 0xcb4f
movl %ebx, %eax
shrb $0x3, %al
movzbl %al, %r13d
jmp 0xcb3a
cmpl $0x8, %eax
jne 0xcb45
movl $0x1, %r13d
xorl %eax, %eax
jmp 0xcb4a
movl $0x1, %r13d
xorl %eax, %eax
jmp 0xcb4f
xorl %eax, %eax
xorl %r13d, %r13d
jmp 0xcb4f
xorl %eax, %eax
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
testl %r13d, %r13d
je 0xcc3c
movl %eax, 0x44(%rsp)
movq 0x58(%rsp), %rax
movl %r15d, (%rax)
movq 0x38(%rsp), %rax
movl %esi, (%rax)
testq %rdi, %rdi
je 0xcb73
movl %r13d, (%rdi)
movl %r15d, %edi
movl %r13d, %edx
xorl %ecx, %ecx
movq %rsi, %r12
callq 0xf725
testl %eax, %eax
je 0xcc48
movl %r15d, %edi
movq %r12, 0x20(%rsp)
movl %r12d, %esi
movl %r13d, 0x8(%rsp)
movl %r13d, %edx
xorl %ecx, %ecx
callq 0xf848
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0xccc4
movl %ebx, 0x40(%rsp)
cmpb $0x8, 0x34(%rsp)
setae %bl
movq %r14, %rdi
movl 0x10(%rsp), %esi
callq 0xf6d7
movl %ebp, %eax
movl 0x44(%rsp), %ecx
orb %cl, %al
orb %bl, %al
je 0xcc51
testb %bpl, %bpl
je 0xcca8
movq %r14, %rdi
movl 0x18(%rsp), %esi
callq 0xf6d7
movl 0x30(%rsp), %edi
movl 0x8(%rsp), %esi
xorl %edx, %edx
callq 0xf782
testq %rax, %rax
je 0xccba
movq %rax, %r12
cmpb $0x0, 0x1c(%rsp)
je 0xcce3
movl 0x8(%rsp), %edx
imull 0x30(%rsp), %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x11f02
testl %eax, %eax
je 0xd16f
movq %r12, 0x48(%rsp)
movl %ebp, 0x18(%rsp)
jmp 0xcd78
leaq 0xb550(%rip), %rax      # 0x18193
jmp 0xcccb
leaq 0xaea0(%rip), %rax      # 0x17aef
jmp 0xcccb
movl %r15d, 0x2c(%rsp)
cmpl $0x0, 0x20(%rsp)
movb 0x7(%rsp), %r13b
movq 0x38(%rsp), %r12
je 0xd0fb
movl 0x8(%rsp), %ebp
imull 0x2c(%rsp), %ebp
movq 0x20(%rsp), %rax
leal -0x1(%rax), %ebx
xorl %r15d, %r15d
testb %r13b, %r13b
movl %r15d, %eax
cmovnel %ebx, %eax
imull %ebp, %eax
movslq %eax, %rsi
addq %r12, %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x11f02
incl %r15d
addl $-0x1, %ebx
jb 0xcc7f
jmp 0xd0fb
movl %ebp, 0x18(%rsp)
movq $0x0, 0x48(%rsp)
jmp 0xcd78
movq 0x38(%rsp), %rdi
callq 0x21e0
leaq 0xae2e(%rip), %rax      # 0x17af9
movq %rax, 0xf556(%rip)      # 0x1c228
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, 0x18(%rsp)
movl 0x8(%rsp), %eax
cmpl $0x3, %eax
movl 0x30(%rsp), %eax
jne 0xd1ac
movl %r15d, %ebp
testl %eax, %eax
movq %r12, 0x48(%rsp)
je 0xcd75
movl %eax, %eax
leaq (%rax,%rax,2), %rbx
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x12ebf
movl %eax, %ecx
shrl $0xa, %ecx
andl $0x1f, %ecx
movl %eax, %edx
shrl $0x5, %edx
andl $0x1f, %edx
andl $0x1f, %eax
movl %ecx, %esi
shll $0x8, %esi
subl %ecx, %esi
imulq $0x8421085, %rsi, %rcx  # imm = 0x8421085
shrq $0x20, %rcx
movb %cl, (%r12,%r15)
movl %edx, %ecx
shll $0x8, %ecx
subl %edx, %ecx
imulq $0x8421085, %rcx, %rcx  # imm = 0x8421085
shrq $0x20, %rcx
movb %cl, 0x1(%r12,%r15)
movl %eax, %ecx
shll $0x8, %ecx
subl %eax, %ecx
imulq $0x8421085, %rcx, %rax  # imm = 0x8421085
shrq $0x20, %rax
movb %al, 0x2(%r12,%r15)
addq $0x3, %r15
cmpl %r15d, %ebx
jne 0xcd0d
movl %ebp, %r15d
movq 0x20(%rsp), %rax
movl %r15d, 0x2c(%rsp)
imull %r15d, %eax
testl %eax, %eax
je 0xd075
leaq 0x38(%r14), %rbp
movl 0x8(%rsp), %ecx
cmpl $0x1, %ecx
movl %ecx, %r15d
adcl $0x0, %r15d
leaq 0x39(%r14), %rcx
movq %rcx, 0x50(%rsp)
movl %eax, %eax
movq %rax, 0x58(%rsp)
xorl %r12d, %r12d
xorl %eax, %eax
movl $0x0, 0x10(%rsp)
xorl %r13d, %r13d
cmpb $0x8, 0x34(%rsp)
jb 0xce6e
testl %r13d, %r13d
je 0xcde5
xorl %ecx, %ecx
cmpl $0x0, 0x10(%rsp)
setne %cl
andb %cl, %al
movl %ecx, 0x10(%rsp)
jmp 0xce70
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0xce4f
cmpl $0x0, 0x30(%r14)
je 0xce24
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %rbp, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xce28
movq %rbp, 0xb8(%r14)
cltq
addq %rbp, %rax
movq %rax, 0xc0(%r14)
jmp 0xce48
xorl %eax, %eax
jmp 0xce5d
movl $0x0, 0x30(%r14)
movq %rbp, 0xb8(%r14)
movq 0x50(%rsp), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movzbl (%rax), %eax
movl %eax, %r13d
andl $0x7f, %r13d
incl %r13d
shrl $0x7, %eax
movl %eax, 0x10(%rsp)
xorl %eax, %eax
testb %al, %al
jne 0xd046
cmpb $0x0, 0x18(%rsp)
je 0xced8
cmpb $0x8, 0x40(%rsp)
jne 0xcf71
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0xd015
cmpl $0x0, 0x30(%r14)
je 0xcfea
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %rbp, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xcfee
movq %rbp, 0xb8(%r14)
cltq
addq %rbp, %rax
movq %rax, 0xc0(%r14)
jmp 0xd00e
cmpb $0x0, 0x1c(%rsp)
je 0xcf80
xorl %ebx, %ebx
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0xcf4f
cmpl $0x0, 0x30(%r14)
je 0xcf24
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq %rbp, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xcf28
movq %rbp, 0xb8(%r14)
cltq
addq %rbp, %rax
movq %rax, 0xc0(%r14)
jmp 0xcf48
xorl %eax, %eax
jmp 0xcf5c
movl $0x0, 0x30(%r14)
movq %rbp, 0xb8(%r14)
movq 0x50(%rsp), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
movb %al, 0x14(%rsp,%rbx)
incq %rbx
cmpq %rbx, %r15
jne 0xcee5
jmp 0xd046
movq %r14, %rdi
callq 0x12ebf
movl %eax, %esi
jmp 0xd023
cmpl $0x3, 0x8(%rsp)
jne 0xd18d
movq %r14, %rdi
callq 0x12ebf
movl %eax, %ecx
shrl $0xa, %ecx
andl $0x1f, %ecx
movl %eax, %edx
shrl $0x5, %edx
andl $0x1f, %edx
andl $0x1f, %eax
movl %ecx, %esi
shll $0x8, %esi
subl %ecx, %esi
imulq $0x8421085, %rsi, %rcx  # imm = 0x8421085
shrq $0x20, %rcx
movb %cl, 0x14(%rsp)
movl %edx, %ecx
shll $0x8, %ecx
subl %edx, %ecx
imulq $0x8421085, %rcx, %rcx  # imm = 0x8421085
shrq $0x20, %rcx
movb %cl, 0x15(%rsp)
movl %eax, %ecx
shll $0x8, %ecx
subl %eax, %ecx
imulq $0x8421085, %rcx, %rax  # imm = 0x8421085
shrq $0x20, %rax
movb %al, 0x16(%rsp)
jmp 0xd046
xorl %esi, %esi
jmp 0xd023
movl $0x0, 0x30(%r14)
movq %rbp, 0xb8(%r14)
movq 0x50(%rsp), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movzbl (%rax), %esi
cmpl 0x30(%rsp), %esi
movl $0x0, %eax
cmovael %eax, %esi
imull 0x8(%rsp), %esi
addq 0x48(%rsp), %rsi
leaq 0x14(%rsp), %rdi
movq %r15, %rdx
callq 0x2150
movl 0x8(%rsp), %eax
movl %eax, %edi
imull %r12d, %edi
addq 0x38(%rsp), %rdi
leaq 0x14(%rsp), %rsi
movq %r15, %rdx
callq 0x2150
decl %r13d
incq %r12
movb $0x1, %al
cmpq 0x58(%rsp), %r12
jne 0xcdc0
cmpl $0x0, 0x20(%rsp)
sete %al
movb 0x7(%rsp), %cl
xorb $0x1, %cl
orb %al, %cl
movl 0x2c(%rsp), %ecx
movq 0x38(%rsp), %r12
movq 0x48(%rsp), %r15
jne 0xd0ee
movl 0x8(%rsp), %eax
imull %ecx, %eax
movq 0x20(%rsp), %rcx
decl %ecx
movl %eax, %edx
imull %ecx, %edx
shrl %ecx
leal 0x1(%rax), %esi
xorl %edi, %edi
xorl %r8d, %r8d
movl %edi, %edi
testl %eax, %eax
je 0xd0de
movslq %edx, %r9
movl %esi, %r10d
movq %r12, %r11
movb (%r11,%rdi), %bl
movb (%r11,%r9), %bpl
movb %bpl, (%r11,%rdi)
movb %bl, (%r11,%r9)
incq %r11
decl %r10d
cmpl $0x1, %r10d
jg 0xd0c2
leal 0x1(%r8), %r9d
subl %eax, %edx
addl %eax, %edi
cmpl %ecx, %r8d
movl %r9d, %r8d
jne 0xd0b3
testq %r15, %r15
je 0xd0fb
movq %r15, %rdi
callq 0x21e0
movl 0x8(%rsp), %esi
cmpl $0x3, %esi
setb %al
movl 0x44(%rsp), %ecx
orb %al, %cl
movl 0x2c(%rsp), %ecx
movq %r12, %rax
movq 0x20(%rsp), %r8
jne 0xd145
movl %r8d, %r9d
imull %ecx, %r9d
testl %r9d, %r9d
je 0xd145
movl %esi, %r10d
movq %rax, %rdx
addq $0x2, %rdx
movb -0x2(%rdx), %r11b
movb (%rdx), %dil
movb %dil, -0x2(%rdx)
movb %r11b, (%rdx)
addq %r10, %rdx
decl %r9d
jne 0xd12f
movl 0x64(%rsp), %edx
testl %edx, %edx
je 0xccd4
cmpl %edx, %esi
je 0xccd4
movq %rax, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x115e7
movq 0x38(%rsp), %rdi
callq 0x21e0
movq %r12, %rdi
callq 0x21e0
leaq 0xb114(%rip), %rax      # 0x1829c
jmp 0xcccb
leaq 0xb09e(%rip), %rdi      # 0x18232
leaq 0xa7eb(%rip), %rsi      # 0x17986
leaq 0xb0a5(%rip), %rcx      # 0x18247
movl $0x1611, %edx           # imm = 0x1611
callq 0x2100
leaq 0xb07f(%rip), %rdi      # 0x18232
leaq 0xa7cc(%rip), %rsi      # 0x17986
leaq 0xb086(%rip), %rcx      # 0x18247
movl $0x15e0, %edx           # imm = 0x15E0
callq 0x2100