// File: /workspace/github_c_makefile_star2_O1/patriciogonzalezvivo[P]tprint/include/std/stb_image.h
// Function: stbi__psd_load(stbi__context*, int*, int*, int*, int)
static stbi_uc *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req_comp)
{
   int   pixelCount;
   int channelCount, compression;
   int channel, i, count, len;
   int w,h;
   stbi_uc *out;

   // Check identifier
   if (stbi__get32be(s) != 0x38425053)   // "8BPS"
      return stbi__errpuc("not PSD", "Corrupt PSD image");

   // Check file type version.
   if (stbi__get16be(s) != 1)
      return stbi__errpuc("wrong version", "Unsupported version of PSD image");

   // Skip 6 reserved bytes.
   stbi__skip(s, 6 );

   // Read the number of channels (R, G, B, A, etc).
   channelCount = stbi__get16be(s);
   if (channelCount < 0 || channelCount > 16)
      return stbi__errpuc("wrong channel count", "Unsupported number of channels in PSD image");

   // Read the rows and columns of the image.
   h = stbi__get32be(s);
   w = stbi__get32be(s);

   // Make sure the depth is 8 bits.
   if (stbi__get16be(s) != 8)
      return stbi__errpuc("unsupported bit depth", "PSD bit depth is not 8 bit");

   // Make sure the color mode is RGB.
   // Valid options are:
   //   0: Bitmap
   //   1: Grayscale
   //   2: Indexed color
   //   3: RGB color
   //   4: CMYK color
   //   7: Multichannel
   //   8: Duotone
   //   9: Lab color
   if (stbi__get16be(s) != 3)
      return stbi__errpuc("wrong color format", "PSD is not in RGB color format");

   // Skip the Mode Data.  (It's the palette for indexed color; other info for other modes.)
   stbi__skip(s,stbi__get32be(s) );

   // Skip the image resources.  (resolution, pen tool paths, etc)
   stbi__skip(s, stbi__get32be(s) );

   // Skip the reserved data.
   stbi__skip(s, stbi__get32be(s) );

   // Find out if the data is compressed.
   // Known values:
   //   0: no compression
   //   1: RLE compressed
   compression = stbi__get16be(s);
   if (compression > 1)
      return stbi__errpuc("bad compression", "PSD has an unknown compression format");

   // Create the destination image.
   out = (stbi_uc *) stbi__malloc(4 * w*h);
   if (!out) return stbi__errpuc("outofmem", "Out of memory");
   pixelCount = w*h;

   // Initialize the data to zero.
   //memset( out, 0, pixelCount * 4 );

   // Finally, the image data.
   if (compression) {
      // RLE as used by .PSD and .TIFF
      // Loop until you get the number of unpacked bytes you are expecting:
      //     Read the next source byte into n.
      //     If n is between 0 and 127 inclusive, copy the next n+1 bytes literally.
      //     Else if n is between -127 and -1 inclusive, copy the next byte -n+1 times.
      //     Else if n is 128, noop.
      // Endloop

      // The RLE-compressed data is preceeded by a 2-byte data count for each row in the data,
      // which we're going to just skip.
      stbi__skip(s, h * channelCount * 2 );

      // Read the RLE data by channel.
      for (channel = 0; channel < 4; channel++) {
         stbi_uc *p;

         p = out+channel;
         if (channel >= channelCount) {
            // Fill this channel with default data.
            for (i = 0; i < pixelCount; i++) *p = (channel == 3 ? 255 : 0), p += 4;
         } else {
            // Read the RLE data.
            count = 0;
            while (count < pixelCount) {
               len = stbi__get8(s);
               if (len == 128) {
                  // No-op.
               } else if (len < 128) {
                  // Copy next len+1 bytes literally.
                  len++;
                  count += len;
                  while (len) {
                     *p = stbi__get8(s);
                     p += 4;
                     len--;
                  }
               } else if (len > 128) {
                  stbi_uc   val;
                  // Next -len+1 bytes in the dest are replicated from next source byte.
                  // (Interpret len as a negative 8-bit int.)
                  len ^= 0x0FF;
                  len += 2;
                  val = stbi__get8(s);
                  count += len;
                  while (len) {
                     *p = val;
                     p += 4;
                     len--;
                  }
               }
            }
         }
      }

   } else {
      // We're at the raw image data.  It's each channel in order (Red, Green, Blue, Alpha, ...)
      // where each channel consists of an 8-bit value for each pixel in the image.

      // Read the data by channel.
      for (channel = 0; channel < 4; channel++) {
         stbi_uc *p;

         p = out + channel;
         if (channel > channelCount) {
            // Fill this channel with default data.
            for (i = 0; i < pixelCount; i++) *p = channel == 3 ? 255 : 0, p += 4;
         } else {
            // Read the data.
            for (i = 0; i < pixelCount; i++)
               *p = stbi__get8(s), p += 4;
         }
      }
   }

   if (req_comp && req_comp != 4) {
      out = stbi__convert_format(out, 4, req_comp, w, h);
      if (out == NULL) return out; // stbi__convert_format frees input on failure
   }

   if (comp) *comp = channelCount;
   *y = h;
   *x = w;

   return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r8d, %r14d
movq %rcx, %rbp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
callq 0x1aea1
movl %eax, %ebx
shll $0x10, %ebx
movq %r12, %rdi
callq 0x1aea1
orl %ebx, %eax
cmpl $0x38425053, %eax       # imm = 0x38425053
jne 0x16967
movq %r12, %rdi
callq 0x1aea1
cmpl $0x1, %eax
jne 0x16973
cmpq $0x0, 0x10(%r12)
je 0x1697f
movq 0xc0(%r12), %rcx
movl 0xb8(%r12), %edx
movl %ecx, %eax
subl %edx, %eax
cmpl $0x5, %eax
jg 0x1697f
movq %rcx, 0xb8(%r12)
movq 0x28(%r12), %rdi
movl $0x6, %esi
subl %eax, %esi
callq *0x18(%r12)
jmp 0x16988
leaq 0xbbbc(%rip), %rax      # 0x2252a
jmp 0x16a8b
leaq 0xbbb8(%rip), %rax      # 0x22532
jmp 0x16a8b
addq $0x6, 0xb8(%r12)
movq %r12, %rdi
callq 0x1aea1
cmpl $0x11, %eax
jb 0x169a1
leaq 0xbba4(%rip), %rax      # 0x22540
jmp 0x16a8b
movl %eax, %ebx
movq %r12, %rdi
callq 0x1aea1
movq %rax, 0x18(%rsp)
movq %r12, %rdi
callq 0x1aea1
movq %rax, 0x10(%rsp)
movq %r12, %rdi
callq 0x1aea1
movq %rax, 0x8(%rsp)
movq %r12, %rdi
callq 0x1aea1
movq %rax, 0x40(%rsp)
movq %r12, %rdi
callq 0x1aea1
cmpl $0x8, %eax
jne 0x16a7b
movq %r12, %rdi
callq 0x1aea1
cmpl $0x3, %eax
jne 0x16a84
movl %ebx, 0x24(%rsp)
movl %r14d, 0x4c(%rsp)
movq %r12, %rdi
callq 0x1aea1
movl %eax, %ebx
shll $0x10, %ebx
movq %r12, %rdi
callq 0x1aea1
orl %eax, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x1b0e3
movq %r12, %rdi
callq 0x1aea1
movl %eax, %ebx
shll $0x10, %ebx
movq %r12, %rdi
callq 0x1aea1
orl %eax, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x1b0e3
movq %r12, %rdi
callq 0x1aea1
movl %eax, %ebx
shll $0x10, %ebx
movq %r12, %rdi
callq 0x1aea1
orl %eax, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x1b0e3
movq %r12, %rdi
callq 0x1aea1
cmpl $0x2, %eax
jb 0x16aa6
leaq 0xbb04(%rip), %rax      # 0x2257d
jmp 0x16a8b
leaq 0xbad2(%rip), %rax      # 0x22554
jmp 0x16a8b
leaq 0xbadf(%rip), %rax      # 0x2256a
movq %rax, 0x11976(%rip)     # 0x28408
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %r14d
movq 0x18(%rsp), %rcx
shll $0x10, %ecx
movq 0x10(%rsp), %rax
movq %rcx, 0x18(%rsp)
addl %ecx, %eax
movq 0x8(%rsp), %rdx
shll $0x10, %edx
movq 0x40(%rsp), %rcx
movq %rdx, 0x8(%rsp)
addl %edx, %ecx
movl %eax, 0x20(%rsp)
movl %ecx, 0x34(%rsp)
imull %ecx, %eax
movq %rax, 0x28(%rsp)
leal (,%rax,4), %eax
movslq %eax, %rdi
callq 0x8430
testq %rax, %rax
je 0x1728f
movq %rax, %rbx
movq %rbp, 0x60(%rsp)
movq %r13, 0x68(%rsp)
movq %r15, 0x70(%rsp)
movl 0x24(%rsp), %esi
movl %esi, %eax
movq %rax, 0x78(%rsp)
testl %r14d, %r14d
movq %rbx, 0x38(%rsp)
je 0x1729b
imull 0x20(%rsp), %esi
addl %esi, %esi
movq %r12, %rdi
callq 0x1b0e3
leaq 0x38(%r12), %r14
leaq 0x39(%r12), %rax
movq %rax, 0x50(%rsp)
movq 0x40(%rsp), %rdi
movl %edi, %eax
movq 0x8(%rsp), %r8
orl %r8d, %eax
movq 0x10(%rsp), %rdx
movl %edx, %ecx
movq 0x18(%rsp), %rsi
orl %esi, %ecx
imull %eax, %ecx
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x80(%rsp)
addq $0x3c, %rbx
addl %r8d, %edi
addl %esi, %edx
imull %edi, %edx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rdx, 0x10(%rsp)
xorl %eax, %eax
movdqa 0xae05(%rip), %xmm7     # 0x219a0
pcmpeqd %xmm8, %xmm8
movq %rax, 0x8(%rsp)
cmpq 0x78(%rsp), %rax
jae 0x16df9
movq 0x28(%rsp), %rbp
testl %ebp, %ebp
jle 0x17275
movq 0x38(%rsp), %rax
movq 0x8(%rsp), %rcx
leaq (%rax,%rcx), %r13
xorl %r15d, %r15d
movq 0xb8(%r12), %rax
cmpq 0xc0(%r12), %rax
jb 0x16c52
cmpl $0x0, 0x30(%r12)
je 0x16c15
movq 0x28(%r12), %rdi
movl 0x34(%r12), %edx
movq %r14, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0x16c19
movq %r14, 0xb8(%r12)
cltq
addq %r14, %rax
movq %rax, 0xc0(%r12)
jmp 0x16c3d
xorl %eax, %eax
jmp 0x16c60
movl $0x0, 0x30(%r12)
movq %r14, 0xb8(%r12)
movq 0x50(%rsp), %rax
movq %rax, 0xc0(%r12)
movb $0x0, 0x38(%r12)
movdqa 0xad5b(%rip), %xmm7     # 0x219a0
pcmpeqd %xmm8, %xmm8
movq 0xb8(%r12), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r12)
movb (%rax), %al
cmpb $-0x80, %al
je 0x16deb
movl %r15d, 0x18(%rsp)
movzbl %al, %r15d
testb %al, %al
js 0x16d35
incl %r15d
movl %r15d, %ebp
movq 0xb8(%r12), %rax
cmpq 0xc0(%r12), %rax
jb 0x16d03
cmpl $0x0, 0x30(%r12)
je 0x16cc6
movq 0x28(%r12), %rdi
movl 0x34(%r12), %edx
movq %r14, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0x16cca
movq %r14, 0xb8(%r12)
cltq
addq %r14, %rax
movq %rax, 0xc0(%r12)
jmp 0x16cee
xorl %eax, %eax
jmp 0x16d11
movl $0x0, 0x30(%r12)
movq %r14, 0xb8(%r12)
movq 0x50(%rsp), %rax
movq %rax, 0xc0(%r12)
movb $0x0, 0x38(%r12)
movdqa 0xacaa(%rip), %xmm7     # 0x219a0
pcmpeqd %xmm8, %xmm8
movq 0xb8(%r12), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r12)
movb (%rax), %al
movb %al, (%r13)
addq $0x4, %r13
decl %ebp
jne 0x16c7f
movl 0x18(%rsp), %eax
addl %r15d, %eax
movl %eax, %r15d
movq 0x28(%rsp), %rbp
jmp 0x16deb
movq 0xb8(%r12), %rax
cmpq 0xc0(%r12), %rax
jb 0x16db9
cmpl $0x0, 0x30(%r12)
je 0x16d7c
movq 0x28(%r12), %rdi
movl 0x34(%r12), %edx
movq %r14, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0x16d80
movq %r14, 0xb8(%r12)
cltq
addq %r14, %rax
movq %rax, 0xc0(%r12)
jmp 0x16da4
xorl %eax, %eax
jmp 0x16dc7
movl $0x0, 0x30(%r12)
movq %r14, 0xb8(%r12)
movq 0x50(%rsp), %rax
movq %rax, 0xc0(%r12)
movb $0x0, 0x38(%r12)
movq 0xb8(%r12), %rax
movdqa 0xabec(%rip), %xmm7     # 0x219a0
pcmpeqd %xmm8, %xmm8
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r12)
movb (%rax), %al
movl $0x101, %ecx            # imm = 0x101
subl %r15d, %ecx
addl $0xfffffeff, %r15d      # imm = 0xFFFFFEFF
movb %al, (%r13)
addq $0x4, %r13
incl %r15d
jne 0x16dd6
movl 0x18(%rsp), %r15d
addl %ecx, %r15d
cmpl %ebp, %r15d
jl 0x16bce
jmp 0x17275
cmpl $0x0, 0x28(%rsp)
jle 0x17275
cmpq $0x3, 0x8(%rsp)
sete %al
negb %al
xorl %ecx, %ecx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, %xmm2
por 0xab69(%rip), %xmm2     # 0x21990
movdqa 0x80(%rsp), %xmm1
pxor %xmm7, %xmm1
pxor %xmm7, %xmm2
movdqa %xmm2, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm3     # xmm3 = xmm4[0,0,2,2]
pshuflw $0xe8, %xmm3, %xmm5     # xmm5 = xmm3[0,2,2,3,4,5,6,7]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm2, %xmm6     # xmm6 = xmm2[0,2,2,3,4,5,6,7]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
por %xmm6, %xmm5
pxor %xmm8, %xmm5
packssdw %xmm5, %xmm5
movd %xmm5, %edx
testb $0x1, %dl
je 0x16e80
movb %al, -0x3c(%rbx,%rcx,4)
pand %xmm3, %xmm2
por %xmm4, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm8, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
movd %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x16ea9
movb %al, -0x38(%rbx,%rcx,4)
movdqa %xmm0, %xmm3
por 0xaacb(%rip), %xmm3     # 0x21980
pxor %xmm7, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm2     # xmm2 = xmm4[0,0,2,2]
pcmpeqd %xmm1, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
movdqa %xmm3, %xmm5
pand %xmm2, %xmm5
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
por %xmm4, %xmm5
packssdw %xmm5, %xmm5
pxor %xmm8, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
movd %xmm5, %edx
shrl $0x10, %edx
testb $0x1, %dl
je 0x16f01
movb %al, -0x34(%rbx,%rcx,4)
pshufhw $0x84, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm3, %xmm3     # xmm3 = xmm3[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm3
pshufhw $0x84, %xmm4, %xmm2     # xmm2 = xmm4[0,1,2,3,4,5,4,6]
por %xmm3, %xmm2
pxor %xmm8, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
movd %xmm2, %edx
shrl $0x18, %edx
testb $0x1, %dl
je 0x16f35
movb %al, -0x30(%rbx,%rcx,4)
movdqa %xmm0, %xmm2
por 0xaa2f(%rip), %xmm2     # 0x21970
pxor %xmm7, %xmm2
movdqa %xmm2, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm3     # xmm3 = xmm4[0,0,2,2]
pshuflw $0xe8, %xmm3, %xmm5     # xmm5 = xmm3[0,2,2,3,4,5,6,7]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm2, %xmm6     # xmm6 = xmm2[0,2,2,3,4,5,6,7]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
por %xmm6, %xmm5
pxor %xmm8, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x2, %xmm5, %edx
testb $0x1, %dl
je 0x16f92
movb %al, -0x2c(%rbx,%rcx,4)
pand %xmm3, %xmm2
por %xmm4, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm8, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x2, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x16fbc
movb %al, -0x28(%rbx,%rcx,4)
movdqa %xmm0, %xmm3
por 0xa998(%rip), %xmm3     # 0x21960
pxor %xmm7, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm2     # xmm2 = xmm4[0,0,2,2]
pcmpeqd %xmm1, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
movdqa %xmm3, %xmm5
pand %xmm2, %xmm5
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
por %xmm4, %xmm5
packssdw %xmm5, %xmm5
pxor %xmm8, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x3, %xmm5, %edx
testb $0x1, %dl
je 0x17012
movb %al, -0x24(%rbx,%rcx,4)
pshufhw $0x84, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm3, %xmm3     # xmm3 = xmm3[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm3
pshufhw $0x84, %xmm4, %xmm2     # xmm2 = xmm4[0,1,2,3,4,5,4,6]
por %xmm3, %xmm2
pxor %xmm8, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x3, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x17047
movb %al, -0x20(%rbx,%rcx,4)
movdqa %xmm0, %xmm2
por 0xa8fd(%rip), %xmm2     # 0x21950
pxor %xmm7, %xmm2
movdqa %xmm2, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm3     # xmm3 = xmm4[0,0,2,2]
pshuflw $0xe8, %xmm3, %xmm5     # xmm5 = xmm3[0,2,2,3,4,5,6,7]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm2, %xmm6     # xmm6 = xmm2[0,2,2,3,4,5,6,7]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
por %xmm6, %xmm5
pxor %xmm8, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x170a4
movb %al, -0x1c(%rbx,%rcx,4)
pand %xmm3, %xmm2
por %xmm4, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm8, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x4, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x170ce
movb %al, -0x18(%rbx,%rcx,4)
movdqa %xmm0, %xmm3
por 0xa866(%rip), %xmm3     # 0x21940
pxor %xmm7, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm2     # xmm2 = xmm4[0,0,2,2]
pcmpeqd %xmm1, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
movdqa %xmm3, %xmm5
pand %xmm2, %xmm5
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
por %xmm4, %xmm5
packssdw %xmm5, %xmm5
pxor %xmm8, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x5, %xmm5, %edx
testb $0x1, %dl
je 0x17124
movb %al, -0x14(%rbx,%rcx,4)
pshufhw $0x84, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm3, %xmm3     # xmm3 = xmm3[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm3
pshufhw $0x84, %xmm4, %xmm2     # xmm2 = xmm4[0,1,2,3,4,5,4,6]
por %xmm3, %xmm2
pxor %xmm8, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x5, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x17159
movb %al, -0x10(%rbx,%rcx,4)
movdqa %xmm0, %xmm2
por 0xa7cb(%rip), %xmm2     # 0x21930
pxor %xmm7, %xmm2
movdqa %xmm2, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm3     # xmm3 = xmm4[0,0,2,2]
pshuflw $0xe8, %xmm3, %xmm5     # xmm5 = xmm3[0,2,2,3,4,5,6,7]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm2, %xmm6     # xmm6 = xmm2[0,2,2,3,4,5,6,7]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
por %xmm6, %xmm5
pxor %xmm8, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x6, %xmm5, %edx
testb $0x1, %dl
je 0x171b6
movb %al, -0xc(%rbx,%rcx,4)
pand %xmm3, %xmm2
por %xmm4, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm8, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x6, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x171e0
movb %al, -0x8(%rbx,%rcx,4)
por 0xa738(%rip), %xmm0     # 0x21920
pxor %xmm7, %xmm0
movdqa %xmm0, %xmm3
pcmpgtd %xmm1, %xmm3
pshufd $0xa0, %xmm3, %xmm2     # xmm2 = xmm3[0,0,2,2]
pcmpeqd %xmm1, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
movdqa %xmm0, %xmm4
pand %xmm2, %xmm4
pshufd $0xf5, %xmm3, %xmm1     # xmm1 = xmm3[1,1,3,3]
por %xmm1, %xmm4
packssdw %xmm4, %xmm3
pxor %xmm8, %xmm3
packssdw %xmm3, %xmm3
packsswb %xmm3, %xmm3
pextrw $0x7, %xmm3, %edx
testb $0x1, %dl
je 0x17232
movb %al, -0x4(%rbx,%rcx,4)
pshufhw $0x84, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm0
pshufhw $0x84, %xmm1, %xmm1     # xmm1 = xmm1[0,1,2,3,4,5,4,6]
por %xmm0, %xmm1
pxor %xmm8, %xmm1
packssdw %xmm1, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x17266
movb %al, (%rbx,%rcx,4)
addq $0x10, %rcx
cmpq %rcx, 0x10(%rsp)
jne 0x16e11
movq 0x8(%rsp), %rax
incq %rax
incq %rbx
cmpq $0x4, %rax
jne 0x16ba0
jmp 0x178e3
leaq 0xacf1(%rip), %rax      # 0x21f87
jmp 0x16a8b
leaq 0x38(%r12), %rbp
leaq 0x39(%r12), %rax
movq %rax, 0x80(%rsp)
movq 0x40(%rsp), %rdi
movl %edi, %eax
movq 0x8(%rsp), %r8
orl %r8d, %eax
movq 0x10(%rsp), %rdx
movl %edx, %ecx
movq 0x18(%rsp), %rsi
orl %esi, %ecx
imull %eax, %ecx
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm7     # xmm7 = xmm0[0,1,0,1]
addl %r8d, %edi
addl %esi, %edx
imull %edi, %edx
movq %rdx, %r14
leaq 0xf(%rdx), %r15
andq $-0x10, %r15
xorl %eax, %eax
movdqa 0xa628(%rip), %xmm8     # 0x21920
movdqa 0xa62f(%rip), %xmm9     # 0x21930
movdqa 0xa636(%rip), %xmm10    # 0x21940
movdqa 0xa63d(%rip), %xmm11    # 0x21950
movdqa 0xa644(%rip), %xmm12    # 0x21960
movdqa 0xa64b(%rip), %xmm13    # 0x21970
movdqa 0xa652(%rip), %xmm14    # 0x21980
movdqa 0xa659(%rip), %xmm15    # 0x21990
movdqa %xmm7, 0x50(%rsp)
movq %rax, 0x10(%rsp)
cmpq 0x78(%rsp), %rax
jbe 0x177d3
cmpl $0x0, 0x28(%rsp)
jle 0x178ce
cmpq $0x3, 0x10(%rsp)
sete %al
negb %al
xorl %ecx, %ecx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, %xmm2
por %xmm15, %xmm2
movdqa %xmm7, %xmm1
movdqa 0xa61c(%rip), %xmm3     # 0x219a0
pxor %xmm3, %xmm1
pxor %xmm3, %xmm2
movdqa %xmm2, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm3     # xmm3 = xmm4[0,0,2,2]
pshuflw $0xe8, %xmm3, %xmm5     # xmm5 = xmm3[0,2,2,3,4,5,6,7]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm2, %xmm6     # xmm6 = xmm2[0,2,2,3,4,5,6,7]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
por %xmm6, %xmm5
pcmpeqd %xmm6, %xmm6
pxor %xmm6, %xmm5
packssdw %xmm5, %xmm5
movd %xmm5, %edx
testb $0x1, %dl
je 0x173d6
movb %al, (%rbx,%rcx,4)
pand %xmm3, %xmm2
por %xmm4, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
movd %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x173fe
movb %al, 0x4(%rbx,%rcx,4)
movdqa %xmm0, %xmm3
por %xmm14, %xmm3
pxor 0xa591(%rip), %xmm3     # 0x219a0
movdqa %xmm3, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm2     # xmm2 = xmm4[0,0,2,2]
pcmpeqd %xmm1, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
movdqa %xmm3, %xmm5
pand %xmm2, %xmm5
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
por %xmm4, %xmm5
packssdw %xmm5, %xmm5
pxor %xmm6, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
movd %xmm5, %edx
shrl $0x10, %edx
testb $0x1, %dl
je 0x17456
movb %al, 0x8(%rbx,%rcx,4)
pshufhw $0x84, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm3, %xmm3     # xmm3 = xmm3[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm3
pshufhw $0x84, %xmm4, %xmm2     # xmm2 = xmm4[0,1,2,3,4,5,4,6]
por %xmm3, %xmm2
pxor %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
movd %xmm2, %edx
shrl $0x18, %edx
testb $0x1, %dl
je 0x17489
movb %al, 0xc(%rbx,%rcx,4)
movdqa %xmm0, %xmm2
por %xmm13, %xmm2
pxor 0xa506(%rip), %xmm2     # 0x219a0
movdqa %xmm2, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm3     # xmm3 = xmm4[0,0,2,2]
pshuflw $0xe8, %xmm3, %xmm5     # xmm5 = xmm3[0,2,2,3,4,5,6,7]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm2, %xmm6     # xmm6 = xmm2[0,2,2,3,4,5,6,7]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
por %xmm6, %xmm5
pcmpeqd %xmm6, %xmm6
pxor %xmm6, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x2, %xmm5, %edx
testb $0x1, %dl
je 0x174ea
movb %al, 0x10(%rbx,%rcx,4)
pand %xmm3, %xmm2
por %xmm4, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x2, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x17513
movb %al, 0x14(%rbx,%rcx,4)
movdqa %xmm0, %xmm3
por %xmm12, %xmm3
pxor 0xa47c(%rip), %xmm3     # 0x219a0
movdqa %xmm3, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm2     # xmm2 = xmm4[0,0,2,2]
pcmpeqd %xmm1, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
movdqa %xmm3, %xmm5
pand %xmm2, %xmm5
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
por %xmm4, %xmm5
packssdw %xmm5, %xmm5
pxor %xmm6, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x3, %xmm5, %edx
testb $0x1, %dl
je 0x17569
movb %al, 0x18(%rbx,%rcx,4)
pshufhw $0x84, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm3, %xmm3     # xmm3 = xmm3[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm3
pshufhw $0x84, %xmm4, %xmm2     # xmm2 = xmm4[0,1,2,3,4,5,4,6]
por %xmm3, %xmm2
pxor %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x3, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x1759d
movb %al, 0x1c(%rbx,%rcx,4)
movdqa %xmm0, %xmm2
por %xmm11, %xmm2
pxor 0xa3f2(%rip), %xmm2     # 0x219a0
movdqa %xmm2, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm3     # xmm3 = xmm4[0,0,2,2]
pshuflw $0xe8, %xmm3, %xmm5     # xmm5 = xmm3[0,2,2,3,4,5,6,7]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm2, %xmm6     # xmm6 = xmm2[0,2,2,3,4,5,6,7]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
por %xmm6, %xmm5
pcmpeqd %xmm6, %xmm6
pxor %xmm6, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x175fe
movb %al, 0x20(%rbx,%rcx,4)
pand %xmm3, %xmm2
por %xmm4, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x4, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x17627
movb %al, 0x24(%rbx,%rcx,4)
movdqa %xmm0, %xmm3
por %xmm10, %xmm3
pxor 0xa368(%rip), %xmm3     # 0x219a0
movdqa %xmm3, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm2     # xmm2 = xmm4[0,0,2,2]
pcmpeqd %xmm1, %xmm3
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
movdqa %xmm3, %xmm5
pand %xmm2, %xmm5
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
por %xmm4, %xmm5
packssdw %xmm5, %xmm5
pxor %xmm6, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x5, %xmm5, %edx
testb $0x1, %dl
je 0x1767d
movb %al, 0x28(%rbx,%rcx,4)
pshufhw $0x84, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm3, %xmm3     # xmm3 = xmm3[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm3
pshufhw $0x84, %xmm4, %xmm2     # xmm2 = xmm4[0,1,2,3,4,5,4,6]
por %xmm3, %xmm2
pxor %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x5, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x176b1
movb %al, 0x2c(%rbx,%rcx,4)
movdqa %xmm0, %xmm2
por %xmm9, %xmm2
pxor 0xa2de(%rip), %xmm2     # 0x219a0
movdqa %xmm2, %xmm4
pcmpgtd %xmm1, %xmm4
pshufd $0xa0, %xmm4, %xmm3     # xmm3 = xmm4[0,0,2,2]
pshuflw $0xe8, %xmm3, %xmm5     # xmm5 = xmm3[0,2,2,3,4,5,6,7]
pcmpeqd %xmm1, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pshuflw $0xe8, %xmm2, %xmm6     # xmm6 = xmm2[0,2,2,3,4,5,6,7]
pand %xmm5, %xmm6
pshufd $0xf5, %xmm4, %xmm4     # xmm4 = xmm4[1,1,3,3]
pshuflw $0xe8, %xmm4, %xmm5     # xmm5 = xmm4[0,2,2,3,4,5,6,7]
por %xmm6, %xmm5
pcmpeqd %xmm6, %xmm6
pxor %xmm6, %xmm5
packssdw %xmm5, %xmm5
packsswb %xmm5, %xmm5
pextrw $0x6, %xmm5, %edx
testb $0x1, %dl
je 0x17712
movb %al, 0x30(%rbx,%rcx,4)
pand %xmm3, %xmm2
por %xmm4, %xmm2
packssdw %xmm2, %xmm2
pxor %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x6, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x1773b
movb %al, 0x34(%rbx,%rcx,4)
por %xmm8, %xmm0
pxor 0xa258(%rip), %xmm0     # 0x219a0
movdqa %xmm0, %xmm3
pcmpgtd %xmm1, %xmm3
pshufd $0xa0, %xmm3, %xmm2     # xmm2 = xmm3[0,0,2,2]
pcmpeqd %xmm1, %xmm0
pshufd $0xf5, %xmm0, %xmm0     # xmm0 = xmm0[1,1,3,3]
movdqa %xmm0, %xmm4
pand %xmm2, %xmm4
pshufd $0xf5, %xmm3, %xmm1     # xmm1 = xmm3[1,1,3,3]
por %xmm1, %xmm4
packssdw %xmm4, %xmm3
pxor %xmm6, %xmm3
packssdw %xmm3, %xmm3
packsswb %xmm3, %xmm3
pextrw $0x7, %xmm3, %edx
testb $0x1, %dl
je 0x1778d
movb %al, 0x38(%rbx,%rcx,4)
pshufhw $0x84, %xmm2, %xmm2     # xmm2 = xmm2[0,1,2,3,4,5,4,6]
pshufhw $0x84, %xmm0, %xmm0     # xmm0 = xmm0[0,1,2,3,4,5,4,6]
pand %xmm2, %xmm0
pshufhw $0x84, %xmm1, %xmm1     # xmm1 = xmm1[0,1,2,3,4,5,4,6]
por %xmm0, %xmm1
pxor %xmm6, %xmm1
packssdw %xmm1, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x177c1
movb %al, 0x3c(%rbx,%rcx,4)
addq $0x10, %rcx
cmpq %rcx, %r15
jne 0x17365
jmp 0x178ce
cmpl $0x0, 0x28(%rsp)
jle 0x178ce
xorl %r13d, %r13d
movq 0xb8(%r12), %rax
cmpq 0xc0(%r12), %rax
jb 0x178b0
cmpl $0x0, 0x30(%r12)
je 0x1782c
movq 0x28(%r12), %rdi
movl 0x34(%r12), %edx
movq %rbp, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0x17833
movq %rbp, 0xb8(%r12)
cltq
addq %rbp, %rax
movq %rax, 0xc0(%r12)
jmp 0x1785a
xorl %eax, %eax
jmp 0x178be
movl $0x0, 0x30(%r12)
movq %rbp, 0xb8(%r12)
movq 0x80(%rsp), %rax
movq %rax, 0xc0(%r12)
movb $0x0, 0x38(%r12)
movdqa 0x50(%rsp), %xmm7
movdqa 0xa0b7(%rip), %xmm8     # 0x21920
movdqa 0xa0be(%rip), %xmm9     # 0x21930
movdqa 0xa0c5(%rip), %xmm10    # 0x21940
movdqa 0xa0cc(%rip), %xmm11    # 0x21950
movdqa 0xa0d3(%rip), %xmm12    # 0x21960
movdqa 0xa0da(%rip), %xmm13    # 0x21970
movdqa 0xa0e1(%rip), %xmm14    # 0x21980
movdqa 0xa0e8(%rip), %xmm15    # 0x21990
movq 0xb8(%r12), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r12)
movb (%rax), %al
movb %al, (%rbx,%r13,4)
incq %r13
cmpl %r13d, %r14d
jne 0x177e1
movq 0x10(%rsp), %rax
incq %rax
incq %rbx
cmpq $0x4, %rax
jne 0x1733d
movl 0x4c(%rsp), %edx
testl $0xfffffffb, %edx       # imm = 0xFFFFFFFB
je 0x17926
movq 0x38(%rsp), %rdi
movl $0x4, %esi
movl 0x34(%rsp), %ebx
movl %ebx, %ecx
movl 0x20(%rsp), %r8d
callq 0x1ce9a
testq %rax, %rax
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rcx
movq 0x60(%rsp), %rdx
movl 0x24(%rsp), %esi
jne 0x17942
jmp 0x16a92
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rcx
movq 0x60(%rsp), %rdx
movl 0x24(%rsp), %esi
movq 0x38(%rsp), %rax
movl 0x34(%rsp), %ebx
testq %rdx, %rdx
je 0x17949
movl %esi, (%rdx)
movl 0x20(%rsp), %edx
movl %edx, (%rcx)
movl %ebx, (%rdi)
jmp 0x16a94