// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__tga_load(stbi__context*, int*, int*, int*, int)
static stbi_uc *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   //   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];
   int RLE_count = 0;
   int RLE_repeating = 0;
   int read_next_pixel = 1;

   //   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;

   tga_data = (unsigned char*)stbi__malloc( (size_t)tga_width * tga_height * tga_comp );
   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( tga_palette_len * tga_comp );
         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 $0x78, %rsp
movl %r8d, %r15d
movq %rcx, %r12
movq %rdx, 0x10(%rsp)
movq %rsi, %rbp
movq %rdi, %r14
movq 0xb8(%rdi), %rcx
movq 0xc0(%rdi), %rax
cmpq %rax, %rcx
jae 0x1c6af
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r14)
movb (%rcx), %cl
movl %ecx, 0x48(%rsp)
movq %rdx, %rcx
jmp 0x1c70f
cmpl $0x0, 0x30(%r14)
je 0x1c6da
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rbx
movl 0x34(%r14), %edx
movq %rbx, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1c6e4
cltq
addq %rbx, %rax
movb (%rbx), %cl
movl %ecx, 0x48(%rsp)
jmp 0x1c6fd
movl $0x0, 0x48(%rsp)
jmp 0x1c70f
movl $0x0, 0x30(%r14)
leaq 0x39(%r14), %rax
movb $0x0, 0x38(%r14)
movl $0x0, 0x48(%rsp)
movq %rax, 0xc0(%r14)
leaq 0x39(%r14), %rcx
movq %rcx, 0xb8(%r14)
cmpq %rax, %rcx
jae 0x1c72a
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r14)
movb (%rcx), %cl
movl %ecx, 0x24(%rsp)
movq %rdx, %rcx
jmp 0x1c78a
cmpl $0x0, 0x30(%r14)
je 0x1c755
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rbx
movl 0x34(%r14), %edx
movq %rbx, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1c75f
cltq
addq %rbx, %rax
movb (%rbx), %cl
movl %ecx, 0x24(%rsp)
jmp 0x1c778
movl $0x0, 0x24(%rsp)
jmp 0x1c78a
movl $0x0, 0x30(%r14)
leaq 0x39(%r14), %rax
movb $0x0, 0x38(%r14)
movl $0x0, 0x24(%rsp)
movq %rax, 0xc0(%r14)
leaq 0x39(%r14), %rcx
movq %rcx, 0xb8(%r14)
cmpq %rax, %rcx
movl %r15d, 0x74(%rsp)
jae 0x1c7a7
leaq 0x1(%rcx), %rax
movq %rax, 0xb8(%r14)
movb (%rcx), %al
movl %eax, 0x2c(%rsp)
jmp 0x1c807
cmpl $0x0, 0x30(%r14)
je 0x1c7d2
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rbx
movl 0x34(%r14), %edx
movq %rbx, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1c7dc
cltq
addq %rbx, %rax
movb (%rbx), %cl
movl %ecx, 0x2c(%rsp)
jmp 0x1c7f5
movl $0x0, 0x2c(%rsp)
jmp 0x1c807
movl $0x0, 0x30(%r14)
leaq 0x39(%r14), %rax
movb $0x0, 0x38(%r14)
movl $0x0, 0x2c(%rsp)
movq %rax, 0xc0(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xb8(%r14)
movq %r14, %rdi
callq 0x158c8
movl %eax, %r15d
movq %r14, %rdi
callq 0x158c8
movl %eax, 0x64(%rsp)
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
movl %r15d, 0x40(%rsp)
jae 0x1c842
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %bl
jmp 0x1c892
cmpl $0x0, 0x30(%r14)
je 0x1c869
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rbx
movl 0x34(%r14), %edx
movq %rbx, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1c86d
cltq
addq %rbx, %rax
movb (%rbx), %bl
jmp 0x1c880
xorl %ebx, %ebx
jmp 0x1c892
movl $0x0, 0x30(%r14)
leaq 0x39(%r14), %rax
movb $0x0, 0x38(%r14)
xorl %ebx, %ebx
movq %rax, 0xc0(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xb8(%r14)
movq %r14, %rdi
callq 0x158c8
movq %r14, %rdi
callq 0x158c8
movq %r14, %rdi
callq 0x158c8
movl %eax, %r15d
movq %r14, %rdi
callq 0x158c8
movl %eax, 0x34(%rsp)
movq 0xb8(%r14), %rcx
movq 0xc0(%r14), %rax
cmpq %rax, %rcx
jae 0x1c8e2
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r14)
movb (%rcx), %cl
movl %ecx, 0x28(%rsp)
movq %rdx, %rcx
jmp 0x1c948
cmpl $0x0, 0x30(%r14)
je 0x1c910
movl %ebx, %r13d
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rbx
movl 0x34(%r14), %edx
movq %rbx, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1c91a
cltq
addq %rbx, %rax
movb (%rbx), %cl
movl %ecx, 0x28(%rsp)
jmp 0x1c933
movl $0x0, 0x28(%rsp)
jmp 0x1c948
movl $0x0, 0x30(%r14)
leaq 0x39(%r14), %rax
movb $0x0, 0x38(%r14)
movl $0x0, 0x28(%rsp)
movq %rax, 0xc0(%r14)
leaq 0x39(%r14), %rcx
movq %rcx, 0xb8(%r14)
movl %r13d, %ebx
cmpq %rax, %rcx
jae 0x1c95d
leaq 0x1(%rcx), %rax
movq %rax, 0xb8(%r14)
movb (%rcx), %r13b
jmp 0x1c9b7
cmpl $0x0, 0x30(%r14)
je 0x1c987
movl %ebx, %r13d
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %rbx
movl 0x34(%r14), %edx
movq %rbx, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1c98c
cltq
addq %rbx, %rax
movb (%rbx), %cl
jmp 0x1c99f
xorl %r13d, %r13d
jmp 0x1c9b7
movl $0x0, 0x30(%r14)
leaq 0x39(%r14), %rax
movb $0x0, 0x38(%r14)
xorl %ecx, %ecx
movl %r13d, %ebx
movq %rax, 0xc0(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xb8(%r14)
movl %ecx, %r13d
cmpb $0x0, 0x24(%rsp)
je 0x1c9d5
movzbl %bl, %eax
cmpl $0x17, %eax
jg 0x1ca07
leal -0xf(%rax), %ecx
cmpl $0x2, %ecx
jb 0x1ca1d
cmpl $0x8, %eax
je 0x1ca2f
jmp 0x1ca41
movzbl 0x28(%rsp), %eax
cmpl $0xf, %eax
jle 0x1ca13
cmpl $0x20, %eax
je 0x1ca4d
cmpl $0x18, %eax
je 0x1ca4d
cmpl $0x10, %eax
jne 0x1ca41
movl 0x2c(%rsp), %edx
movzbl %dl, %eax
leal -0x8(%rax), %ecx
cmpb $0x8, %dl
cmovbl %eax, %ecx
cmpl $0x3, %ecx
jne 0x1ca1d
movb $0x2, %bl
jmp 0x1ca54
cmpl $0x18, %eax
je 0x1ca51
cmpl $0x20, %eax
je 0x1ca51
jmp 0x1ca41
cmpl $0x8, %eax
je 0x1ca2f
cmpl $0xf, %eax
jne 0x1ca41
movb $0x3, %bl
movb $0x1, %al
movl %eax, 0x1c(%rsp)
movl $0x0, 0x20(%rsp)
jmp 0x1ca62
movb $0x1, %al
movl %eax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movb $0x1, %bl
jmp 0x1ca62
leaq 0xfe3d(%rip), %rax      # 0x2c885
jmp 0x1cff4
movl 0x28(%rsp), %ebx
shrb $0x3, %bl
movb $0x1, %al
movl %eax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movl %ebx, 0x3c(%rsp)
movzbl %bl, %edx
movl %r15d, (%rbp)
movl 0x34(%rsp), %eax
movq 0x10(%rsp), %rcx
movl %eax, (%rcx)
testq %r12, %r12
je 0x1ca81
movl %edx, (%r12)
movl %eax, %ebp
imull %r15d, %ebp
movl %edx, 0xc(%rsp)
movl %edx, %edi
movq %rdi, 0x10(%rsp)
imulq %rbp, %rdi
callq 0x43f0
testq %rax, %rax
je 0x1cfed
movq %rax, %r12
movq %rbp, 0x68(%rsp)
movl %r15d, 0x54(%rsp)
movzbl 0x48(%rsp), %esi
shrb $0x5, %r13b
movl %r13d, 0x60(%rsp)
movl 0x24(%rsp), %r15d
testb %r15b, %r15b
setne %bpl
cmpb $0x8, 0x2c(%rsp)
setae %r13b
movq %r14, %rdi
callq 0x1e753
orb %bpl, %r13b
orb 0x1c(%rsp), %r13b
je 0x1cb44
testb %r15b, %r15b
je 0x1cb9a
movq %r14, %rdi
movl 0x40(%rsp), %esi
callq 0x1e753
movl 0x64(%rsp), %ebp
movl %ebp, %r15d
imull 0xc(%rsp), %r15d
movq %r15, %rdi
callq 0x43f0
testq %rax, %rax
je 0x1cfe5
movq %rax, %r13
cmpb $0x0, 0x20(%rsp)
je 0x1d010
movq %r14, %rdi
movq %r13, %rsi
movl %r15d, %edx
callq 0x20a46
testl %eax, %eax
je 0x1d0b0
movq %r13, 0x58(%rsp)
jmp 0x1cba3
movl 0x34(%rsp), %r8d
testl %r8d, %r8d
movl 0xc(%rsp), %esi
je 0x1cfbf
movl 0x54(%rsp), %ebp
imull %esi, %ebp
movl %r8d, %r15d
decl %r15d
xorl %r13d, %r13d
movq %r12, %rbx
movl 0x60(%rsp), %r12d
testb $0x1, %r12b
movl %r13d, %eax
cmovel %r15d, %eax
imull %ebp, %eax
movslq %eax, %rsi
addq %rbx, %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x20a46
incl %r13d
addl $-0x1, %r15d
jb 0x1cb6e
jmp 0x1cf7a
movq $0x0, 0x58(%rsp)
movq 0x10(%rsp), %rdx
movl 0xc(%rsp), %r15d
cmpl $0x0, 0x68(%rsp)
movl 0x24(%rsp), %ebx
je 0x1cefc
leaq 0x38(%r14), %rax
movq %rax, 0x48(%rsp)
leaq 0x39(%r14), %rax
movq %rax, 0x40(%rsp)
movb $0x1, %al
xorl %r13d, %r13d
movl $0x0, 0x38(%rsp)
xorl %ebp, %ebp
cmpb $0x8, 0x2c(%rsp)
jb 0x1ccae
testl %ebp, %ebp
je 0x1cc1c
xorl %ecx, %ecx
cmpl $0x0, 0x38(%rsp)
setne %dil
sete %sil
orb %al, %sil
movl $0x1, 0x38(%rsp)
testb $0x1, %sil
je 0x1cd9d
movb %dil, %cl
movl %ecx, 0x38(%rsp)
jmp 0x1ccae
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jae 0x1cc3b
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
jmp 0x1cc9d
cmpl $0x0, 0x30(%r14)
je 0x1cc6f
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq 0x48(%rsp), %rbp
movq %rbp, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1cc73
movslq %eax, %rcx
addq %rbp, %rcx
movb (%rbp), %al
movq 0x10(%rsp), %rdx
movq 0x40(%rsp), %rsi
jmp 0x1cc8f
xorl %eax, %eax
jmp 0x1cc9d
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %eax, %eax
movq 0x40(%rsp), %rsi
movq %rsi, %rcx
movq 0x10(%rsp), %rdx
movq %rcx, 0xc0(%r14)
movq %rsi, 0xb8(%r14)
movzbl %al, %eax
movl %eax, %ebp
andl $0x7f, %ebp
incl %ebp
shrl $0x7, %eax
movl %eax, 0x38(%rsp)
testb %bl, %bl
je 0x1cce3
cmpb $0x8, 0x28(%rsp)
jne 0x1cdad
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jae 0x1ce32
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %al
jmp 0x1ce6d
cmpb $0x0, 0x20(%rsp)
je 0x1cdc1
cmpb $0x0, 0x3c(%rsp)
je 0x1ceea
movq 0xb8(%r14), %rcx
movq 0xc0(%r14), %rax
xorl %r15d, %r15d
cmpq %rax, %rcx
jae 0x1cd22
leaq 0x1(%rcx), %rsi
movq %rsi, 0xb8(%r14)
movb (%rcx), %dil
movq %rsi, %rcx
jmp 0x1cd83
cmpl $0x0, 0x30(%r14)
je 0x1cd55
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq 0x48(%rsp), %rbx
movq %rbx, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1cd59
cltq
addq %rbx, %rax
movb (%rbx), %dil
movq 0x10(%rsp), %rdx
movq 0x40(%rsp), %rcx
jmp 0x1cd75
xorl %edi, %edi
jmp 0x1cd83
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %edi, %edi
movq 0x40(%rsp), %rcx
movq %rcx, %rax
movq 0x10(%rsp), %rdx
movq %rax, 0xc0(%r14)
movq %rcx, 0xb8(%r14)
movb %dil, 0x30(%rsp,%r15)
incq %r15
cmpq %r15, %rdx
jne 0x1cd0a
movl 0x24(%rsp), %ebx
movl 0xc(%rsp), %r15d
cmpb $0x0, 0x3c(%rsp)
jne 0x1ced1
jmp 0x1ceea
movq %r14, %rdi
callq 0x158c8
movl %eax, %esi
movq 0x10(%rsp), %rdx
jmp 0x1cea6
cmpl $0x3, %r15d
jne 0x1d0cc
movq %r14, %rdi
callq 0x158c8
movl %eax, %ecx
shrl $0xa, %ecx
andl $0x1f, %ecx
movl %ecx, %edx
shll $0x8, %edx
subl %ecx, %edx
movl $0xffff, %esi           # imm = 0xFFFF
andl %esi, %edx
imull $0x2109, %edx, %ecx     # imm = 0x2109
shrl $0x12, %ecx
movb %cl, 0x30(%rsp)
movl %eax, %ecx
shrl $0x5, %ecx
andl $0x1f, %ecx
movl %ecx, %edx
shll $0x8, %edx
subl %ecx, %edx
andl %esi, %edx
imull $0x2109, %edx, %ecx     # imm = 0x2109
shrl $0x12, %ecx
movb %cl, 0x31(%rsp)
andl $0x1f, %eax
movl %eax, %ecx
shll $0x8, %ecx
subl %eax, %ecx
andl %esi, %ecx
imull $0x2109, %ecx, %eax     # imm = 0x2109
shrl $0x12, %eax
movb %al, 0x32(%rsp)
jmp 0x1cecc
cmpl $0x0, 0x30(%r14)
je 0x1ce6b
movq 0x28(%r14), %rdi
movl 0x34(%r14), %edx
movq 0x48(%rsp), %r15
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0x1ce74
movslq %eax, %rcx
addq %r15, %rcx
movb (%r15), %al
movq 0x10(%rsp), %rdx
movl 0xc(%rsp), %r15d
movq 0x40(%rsp), %rsi
jmp 0x1ce95
xorl %eax, %eax
movq 0x10(%rsp), %rdx
jmp 0x1cea3
movl $0x0, 0x30(%r14)
movb $0x0, 0x38(%r14)
xorl %eax, %eax
movq 0x40(%rsp), %rsi
movq %rsi, %rcx
movq 0x10(%rsp), %rdx
movl 0xc(%rsp), %r15d
movq %rcx, 0xc0(%r14)
movq %rsi, 0xb8(%r14)
movzbl %al, %esi
cmpb $0x0, 0x3c(%rsp)
je 0x1ceea
cmpl 0x64(%rsp), %esi
movl $0x0, %eax
cmovael %eax, %esi
imull %r15d, %esi
addq 0x58(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x4290
movq 0x10(%rsp), %rdx
movl %r15d, %edi
imull %r13d, %edi
addq %r12, %rdi
leaq 0x30(%rsp), %rsi
callq 0x4290
movq 0x10(%rsp), %rdx
decl %ebp
incq %r13
xorl %eax, %eax
cmpq 0x68(%rsp), %r13
jne 0x1cbdd
movl 0x34(%rsp), %ecx
testl %ecx, %ecx
sete %al
movl 0x60(%rsp), %edx
orb %al, %dl
testb $0x1, %dl
movl 0x54(%rsp), %eax
movq 0x58(%rsp), %rdi
jne 0x1cf6d
imull 0xc(%rsp), %eax
decl %ecx
movl %eax, %edx
imull %ecx, %edx
shrl %ecx
leal 0x1(%rax), %esi
xorl %r15d, %r15d
xorl %r8d, %r8d
movl %r15d, %r15d
testl %eax, %eax
je 0x1cf5c
movslq %edx, %r9
movl %esi, %r10d
movq %r12, %r11
movb (%r11,%r15), %bpl
movb (%r11,%r9), %r14b
movb %r14b, (%r11,%r15)
movb %bpl, (%r11,%r9)
incq %r11
decl %r10d
cmpl $0x1, %r10d
jg 0x1cf40
leal 0x1(%r8), %r9d
subl %eax, %edx
addl %eax, %r15d
cmpl %ecx, %r8d
movl %r9d, %r8d
jne 0x1cf30
testq %rdi, %rdi
movq %r12, %rbx
je 0x1cf7a
callq 0x4380
cmpb $0x3, 0x3c(%rsp)
setb %al
movq 0x68(%rsp), %r9
testl %r9d, %r9d
sete %cl
orb %al, %cl
orb 0x1c(%rsp), %cl
movl 0x34(%rsp), %r8d
movq %rbx, %r12
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdi
jne 0x1cfbf
movq %r12, %rax
addq $0x2, %rax
movb -0x2(%rax), %cl
movb (%rax), %dl
movb %dl, -0x2(%rax)
movb %cl, (%rax)
addq %rdi, %rax
decl %r9d
jne 0x1cfad
movl 0x74(%rsp), %edx
testl %edx, %edx
movl 0x54(%rsp), %ecx
je 0x1cffe
cmpl %edx, %esi
je 0x1cffe
movq %r12, %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20612
movq %r12, %rdi
callq 0x4380
leaq 0xf2d5(%rip), %rax      # 0x2c2c9
movq %rax, 0x1a395(%rip)     # 0x37390
xorl %r12d, %r12d
movq %r12, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, 0x58(%rsp)
movl 0xc(%rsp), %r15d
cmpl $0x3, %r15d
jne 0x1d0eb
testl %ebp, %ebp
movq 0x10(%rsp), %rdx
je 0x1cbad
movl %ebp, %r13d
movq 0x58(%rsp), %r15
addq $0x2, %r15
movl $0xffff, %ebp           # imm = 0xFFFF
movq %r14, %rdi
callq 0x158c8
movq 0x10(%rsp), %rdx
movl %eax, %ecx
shrl $0xa, %ecx
andl $0x1f, %ecx
movl %ecx, %esi
shll $0x8, %esi
subl %ecx, %esi
andl %ebp, %esi
imull $0x2109, %esi, %ecx     # imm = 0x2109
shrl $0x12, %ecx
movb %cl, -0x2(%r15)
movl %eax, %ecx
shrl $0x5, %ecx
andl $0x1f, %ecx
movl %ecx, %esi
shll $0x8, %esi
subl %ecx, %esi
andl %ebp, %esi
imull $0x2109, %esi, %ecx     # imm = 0x2109
shrl $0x12, %ecx
movb %cl, -0x1(%r15)
andl $0x1f, %eax
movl %eax, %ecx
shll $0x8, %ecx
subl %eax, %ecx
andl %ebp, %ecx
imull $0x2109, %ecx, %eax     # imm = 0x2109
shrl $0x12, %eax
movb %al, (%r15)
addq %rdx, %r15
decl %r13d
jne 0x1d042
jmp 0x1cba8
movq %r12, %rdi
callq 0x4380
movq %r13, %rdi
callq 0x4380
leaq 0xf8aa(%rip), %rax      # 0x2c971
jmp 0x1cff4
leaq 0xf846(%rip), %rdi      # 0x2c919
leaq 0xf2bf(%rip), %rsi      # 0x2c399
leaq 0xf84d(%rip), %rcx      # 0x2c92e
movl $0x13f0, %edx           # imm = 0x13F0
callq 0x41f0
leaq 0xf827(%rip), %rdi      # 0x2c919
leaq 0xf2a0(%rip), %rsi      # 0x2c399
leaq 0xf82e(%rip), %rcx      # 0x2c92e
movl $0x13bf, %edx           # imm = 0x13BF
callq 0x41f0