// File: /workspace/github_c_makefile_star2_O3/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 0x1a2af
movl %eax, %ebx
shll $0x10, %ebx
movq %r12, %rdi
callq 0x1a2af
orl %ebx, %eax
cmpl $0x38425053, %eax       # imm = 0x38425053
jne 0x160e3
movq %r12, %rdi
callq 0x1a2af
cmpl $0x1, %eax
jne 0x160ef
cmpq $0x0, 0x10(%r12)
je 0x160fb
movq 0xb8(%r12), %rax
movq 0xc0(%r12), %rdx
movl %edx, %ecx
subl %eax, %ecx
cmpl $0x5, %ecx
jg 0x16103
movq %rdx, 0xb8(%r12)
movq 0x28(%r12), %rdi
movl $0x6, %esi
subl %ecx, %esi
callq *0x18(%r12)
jmp 0x1610f
leaq 0xb450(%rip), %rax      # 0x2153a
jmp 0x16211
leaq 0xb44c(%rip), %rax      # 0x21542
jmp 0x16211
movq 0xb8(%r12), %rax
addq $0x6, %rax
movq %rax, 0xb8(%r12)
movq %r12, %rdi
callq 0x1a2af
cmpl $0x11, %eax
jb 0x16128
leaq 0xb42d(%rip), %rax      # 0x21550
jmp 0x16211
movl %eax, %ebx
movq %r12, %rdi
callq 0x1a2af
movq %rax, (%rsp)
movq %r12, %rdi
callq 0x1a2af
movq %rax, 0x18(%rsp)
movq %r12, %rdi
callq 0x1a2af
movq %rax, 0x8(%rsp)
movq %r12, %rdi
callq 0x1a2af
movq %rax, 0x70(%rsp)
movq %r12, %rdi
callq 0x1a2af
cmpl $0x8, %eax
jne 0x16201
movq %r12, %rdi
callq 0x1a2af
cmpl $0x3, %eax
jne 0x1620a
movl %ebx, 0x14(%rsp)
movl %r14d, 0x54(%rsp)
movq %r12, %rdi
callq 0x1a2af
movl %eax, %ebx
shll $0x10, %ebx
movq %r12, %rdi
callq 0x1a2af
orl %eax, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x1a4eb
movq %r12, %rdi
callq 0x1a2af
movl %eax, %ebx
shll $0x10, %ebx
movq %r12, %rdi
callq 0x1a2af
orl %eax, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x1a4eb
movq %r12, %rdi
callq 0x1a2af
movl %eax, %ebx
shll $0x10, %ebx
movq %r12, %rdi
callq 0x1a2af
orl %eax, %ebx
movq %r12, %rdi
movl %ebx, %esi
callq 0x1a4eb
movq %r12, %rdi
callq 0x1a2af
cmpl $0x2, %eax
jb 0x1622c
leaq 0xb38e(%rip), %rax      # 0x2158d
jmp 0x16211
leaq 0xb35c(%rip), %rax      # 0x21564
jmp 0x16211
leaq 0xb369(%rip), %rax      # 0x2157a
movq %rax, 0x111d0(%rip)     # 0x273e8
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, 0x20(%rsp)
movq (%rsp), %rbx
shll $0x10, %ebx
movq 0x18(%rsp), %rax
addl %ebx, %eax
movq 0x8(%rsp), %r14
shll $0x10, %r14d
movq 0x70(%rsp), %rcx
addl %r14d, %ecx
movl %eax, 0x10(%rsp)
movl %ecx, 0x44(%rsp)
imull %ecx, %eax
movq %rax, 0x38(%rsp)
leal (,%rax,4), %eax
movslq %eax, %rdi
callq 0x8420
testq %rax, %rax
je 0x169da
movq %rbp, 0x58(%rsp)
movq %r13, 0x60(%rsp)
movq %r15, 0x68(%rsp)
movq 0x70(%rsp), %rdx
movl %edx, %ecx
orl %r14d, %ecx
movq 0x18(%rsp), %r13
movl %r13d, %r15d
orl %ebx, %r15d
imull %ecx, %r15d
movl 0x14(%rsp), %esi
movl %esi, %ecx
movq %rcx, 0x78(%rsp)
cmpl $0x0, 0x20(%rsp)
movq %rdx, %rcx
movq %rax, 0x48(%rsp)
je 0x169e6
imull 0x10(%rsp), %esi
addl %esi, %esi
movq %r12, %rdi
movq %rbx, (%rsp)
movq %rax, %rbx
movq %rcx, %rbp
movq %r14, 0x8(%rsp)
callq 0x1a4eb
leaq 0x38(%r12), %r14
leaq 0x39(%r12), %rax
movq %rax, 0x20(%rsp)
decq %r15
movq %r15, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa %xmm0, 0x80(%rsp)
addq $0x3c, %rbx
addl 0x8(%rsp), %ebp
addl (%rsp), %r13d
imull %ebp, %r13d
addq $0xf, %r13
andq $-0x10, %r13
xorl %eax, %eax
movq %r13, 0x18(%rsp)
movq %rax, 0x8(%rsp)
cmpq 0x78(%rsp), %rax
jae 0x16522
cmpl $0x0, 0x38(%rsp)
jle 0x169c0
movq 0x48(%rsp), %rax
movq 0x8(%rsp), %rcx
leaq (%rax,%rcx), %r15
xorl %ebp, %ebp
movq 0xb8(%r12), %rcx
movq 0xc0(%r12), %rax
cmpq %rax, %rcx
jae 0x1636f
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r12)
movb (%rcx), %cl
jmp 0x163cc
cmpl $0x0, 0x30(%r12)
je 0x1639c
movq 0x28(%r12), %rdi
movl 0x34(%r12), %edx
movq %r14, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0x163a3
cltq
addq %r14, %rax
movb (%r14), %cl
movq 0x20(%rsp), %rdx
jmp 0x163bc
movl %ebp, (%rsp)
xorl %ebp, %ebp
jmp 0x163e3
movl $0x0, 0x30(%r12)
movb $0x0, 0x38(%r12)
xorl %ecx, %ecx
movq 0x20(%rsp), %rdx
movq %rdx, %rax
movq %rax, 0xc0(%r12)
movq %rdx, 0xb8(%r12)
cmpb $-0x80, %cl
je 0x16513
movl %ebp, (%rsp)
movzbl %cl, %ebp
testb %cl, %cl
js 0x16486
incl %ebp
movl %ebp, %r13d
movq 0xb8(%r12), %rax
cmpq 0xc0(%r12), %rax
jae 0x1640a
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r12)
movb (%rax), %al
jmp 0x16465
cmpl $0x0, 0x30(%r12)
je 0x16438
movq 0x28(%r12), %rdi
movl 0x34(%r12), %edx
movq %r14, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0x1643c
movslq %eax, %rcx
addq %r14, %rcx
movb (%r14), %al
movq 0x20(%rsp), %rdx
jmp 0x16455
xorl %eax, %eax
jmp 0x16465
movl $0x0, 0x30(%r12)
movb $0x0, 0x38(%r12)
xorl %eax, %eax
movq 0x20(%rsp), %rdx
movq %rdx, %rcx
movq %rcx, 0xc0(%r12)
movq %rdx, 0xb8(%r12)
movb %al, (%r15)
addq $0x4, %r15
decl %r13d
jne 0x163e8
movl (%rsp), %eax
addl %ebp, %eax
movl %eax, %ebp
movq 0x18(%rsp), %r13
jmp 0x16513
cmpq %rax, %rdx
jae 0x1649b
leaq 0x1(%rdx), %rax
movq %rax, 0xb8(%r12)
movb (%rdx), %al
jmp 0x164f6
cmpl $0x0, 0x30(%r12)
je 0x164c9
movq 0x28(%r12), %rdi
movl 0x34(%r12), %edx
movq %r14, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0x164cd
movslq %eax, %rcx
addq %r14, %rcx
movb (%r14), %al
movq 0x20(%rsp), %rdx
jmp 0x164e6
xorl %eax, %eax
jmp 0x164f6
movl $0x0, 0x30(%r12)
movb $0x0, 0x38(%r12)
xorl %eax, %eax
movq 0x20(%rsp), %rdx
movq %rdx, %rcx
movq %rcx, 0xc0(%r12)
movq %rdx, 0xb8(%r12)
movl $0x101, %ecx            # imm = 0x101
subl %ebp, %ecx
addl $0xfffffeff, %ebp       # imm = 0xFFFFFEFF
movb %al, (%r15)
addq $0x4, %r15
incl %ebp
jne 0x16503
movl (%rsp), %ebp
addl %ecx, %ebp
cmpl 0x38(%rsp), %ebp
jl 0x1634a
jmp 0x169c0
cmpl $0x0, 0x38(%rsp)
jle 0x169c0
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 0xa440(%rip), %xmm2     # 0x20990
movdqa 0x80(%rsp), %xmm1
movdqa 0xa43f(%rip), %xmm3     # 0x209a0
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 0x165b4
movb %al, -0x3c(%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 0x165dc
movb %al, -0x38(%rbx,%rcx,4)
movdqa %xmm0, %xmm3
por 0xa398(%rip), %xmm3     # 0x20980
pxor 0xa3b0(%rip), %xmm3     # 0x209a0
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 0x16637
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 %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
movd %xmm2, %edx
shrl $0x18, %edx
testb $0x1, %dl
je 0x1666a
movb %al, -0x30(%rbx,%rcx,4)
movdqa %xmm0, %xmm2
por 0xa2fa(%rip), %xmm2     # 0x20970
pxor 0xa322(%rip), %xmm2     # 0x209a0
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 0x166ce
movb %al, -0x2c(%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 0x166f7
movb %al, -0x28(%rbx,%rcx,4)
movdqa %xmm0, %xmm3
por 0xa25d(%rip), %xmm3     # 0x20960
pxor 0xa295(%rip), %xmm3     # 0x209a0
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 0x16750
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 %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x3, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x16784
movb %al, -0x20(%rbx,%rcx,4)
movdqa %xmm0, %xmm2
por 0xa1c0(%rip), %xmm2     # 0x20950
pxor 0xa208(%rip), %xmm2     # 0x209a0
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 0x167e8
movb %al, -0x1c(%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 0x16811
movb %al, -0x18(%rbx,%rcx,4)
movdqa %xmm0, %xmm3
por 0xa123(%rip), %xmm3     # 0x20940
pxor 0xa17b(%rip), %xmm3     # 0x209a0
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 0x1686a
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 %xmm6, %xmm2
packssdw %xmm2, %xmm2
packsswb %xmm2, %xmm2
pextrw $0x5, %xmm2, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x1689e
movb %al, -0x10(%rbx,%rcx,4)
movdqa %xmm0, %xmm2
por 0xa086(%rip), %xmm2     # 0x20930
pxor 0xa0ee(%rip), %xmm2     # 0x209a0
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 0x16902
movb %al, -0xc(%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 0x1692b
movb %al, -0x8(%rbx,%rcx,4)
por 0x9fed(%rip), %xmm0     # 0x20920
pxor 0xa065(%rip), %xmm0     # 0x209a0
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 0x16980
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 %xmm6, %xmm1
packssdw %xmm1, %xmm0
packsswb %xmm0, %xmm0
pextrw $0x7, %xmm0, %edx
shrl $0x8, %edx
testb $0x1, %dl
je 0x169b3
movb %al, (%rbx,%rcx,4)
addq $0x10, %rcx
cmpq %rcx, %r13
jne 0x1653a
movq 0x8(%rsp), %rax
incq %rax
incq %rbx
cmpq $0x4, %rax
jne 0x1631f
jmp 0x17014
leaq 0xa5b6(%rip), %rax      # 0x20f97
jmp 0x16211
leaq 0x38(%r12), %rbp
leaq 0x39(%r12), %r8
decq %r15
movq %r15, %xmm0
pshufd $0x44, %xmm0, %xmm7     # xmm7 = xmm0[0,1,0,1]
addl %r14d, %ecx
addl %ebx, %r13d
imull %ecx, %r13d
leaq 0xf(%r13), %rbx
andq $-0x10, %rbx
xorl %ecx, %ecx
movdqa 0x9f06(%rip), %xmm8     # 0x20920
movdqa 0x9f0d(%rip), %xmm9     # 0x20930
movdqa 0x9f14(%rip), %xmm10    # 0x20940
movdqa 0x9f1b(%rip), %xmm11    # 0x20950
movdqa 0x9f22(%rip), %xmm12    # 0x20960
movdqa 0x9f29(%rip), %xmm13    # 0x20970
movdqa 0x9f30(%rip), %xmm14    # 0x20980
movdqa 0x9f37(%rip), %xmm15    # 0x20990
movq %rax, %r14
movdqa %xmm7, 0x20(%rsp)
movq %r13, 0x18(%rsp)
movq %rcx, (%rsp)
cmpq 0x78(%rsp), %rcx
jbe 0x16f0b
cmpl $0x0, 0x38(%rsp)
jle 0x17000
cmpq $0x3, (%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 0x9ef4(%rip), %xmm3     # 0x209a0
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 0x16aff
movb %al, (%r14,%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 0x16b28
movb %al, 0x4(%r14,%rcx,4)
movdqa %xmm0, %xmm3
por %xmm14, %xmm3
pxor 0x9e67(%rip), %xmm3     # 0x209a0
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 0x16b81
movb %al, 0x8(%r14,%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 0x16bb5
movb %al, 0xc(%r14,%rcx,4)
movdqa %xmm0, %xmm2
por %xmm13, %xmm2
pxor 0x9dda(%rip), %xmm2     # 0x209a0
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 0x16c17
movb %al, 0x10(%r14,%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 0x16c41
movb %al, 0x14(%r14,%rcx,4)
movdqa %xmm0, %xmm3
por %xmm12, %xmm3
pxor 0x9d4e(%rip), %xmm3     # 0x209a0
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 0x16c98
movb %al, 0x18(%r14,%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 0x16ccd
movb %al, 0x1c(%r14,%rcx,4)
movdqa %xmm0, %xmm2
por %xmm11, %xmm2
pxor 0x9cc2(%rip), %xmm2     # 0x209a0
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 0x16d2f
movb %al, 0x20(%r14,%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 0x16d59
movb %al, 0x24(%r14,%rcx,4)
movdqa %xmm0, %xmm3
por %xmm10, %xmm3
pxor 0x9c36(%rip), %xmm3     # 0x209a0
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 0x16db0
movb %al, 0x28(%r14,%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 0x16de5
movb %al, 0x2c(%r14,%rcx,4)
movdqa %xmm0, %xmm2
por %xmm9, %xmm2
pxor 0x9baa(%rip), %xmm2     # 0x209a0
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 0x16e47
movb %al, 0x30(%r14,%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 0x16e71
movb %al, 0x34(%r14,%rcx,4)
por %xmm8, %xmm0
pxor 0x9b22(%rip), %xmm0     # 0x209a0
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 0x16ec4
movb %al, 0x38(%r14,%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 0x16ef9
movb %al, 0x3c(%r14,%rcx,4)
addq $0x10, %rcx
cmpq %rcx, %rbx
jne 0x16a8d
jmp 0x17000
cmpl $0x0, 0x38(%rsp)
jle 0x17000
movq 0xb8(%r12), %rcx
movq 0xc0(%r12), %rax
xorl %r13d, %r13d
cmpq %rax, %rcx
jae 0x16f44
leaq 0x1(%rcx), %rdi
movq %rdi, 0xb8(%r12)
movb (%rcx), %dl
movq %rdi, %rcx
jmp 0x16fee
cmpl $0x0, 0x30(%r12)
je 0x16f72
movq %r8, %r15
movq 0x28(%r12), %rdi
movl 0x34(%r12), %edx
movq %rbp, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0x16f76
cltq
addq %rbp, %rax
movb (%rbp), %dl
movq %r15, %r8
jmp 0x16f8d
xorl %edx, %edx
jmp 0x16fee
movl $0x0, 0x30(%r12)
movb $0x0, 0x38(%r12)
xorl %edx, %edx
movq %r15, %r8
movq %r15, %rax
movdqa 0x20(%rsp), %xmm7
movdqa 0x9984(%rip), %xmm8     # 0x20920
movdqa 0x998b(%rip), %xmm9     # 0x20930
movdqa 0x9992(%rip), %xmm10    # 0x20940
movdqa 0x9999(%rip), %xmm11    # 0x20950
movdqa 0x99a0(%rip), %xmm12    # 0x20960
movdqa 0x99a7(%rip), %xmm13    # 0x20970
movdqa 0x99ae(%rip), %xmm14    # 0x20980
movdqa 0x99b5(%rip), %xmm15    # 0x20990
movq %rax, 0xc0(%r12)
movq %r8, 0xb8(%r12)
movq %r8, %rcx
movb %dl, (%r14,%r13,4)
incq %r13
cmpl %r13d, 0x18(%rsp)
jne 0x16f29
movq (%rsp), %rcx
incq %rcx
incq %r14
cmpq $0x4, %rcx
jne 0x16a67
movl 0x54(%rsp), %edx
testl $0xfffffffb, %edx       # imm = 0xFFFFFFFB
je 0x1705c
movq 0x48(%rsp), %rdi
movl $0x4, %esi
movl 0x44(%rsp), %ebx
movl %ebx, %ecx
movl 0x10(%rsp), %r8d
callq 0x1c3aa
movq %rax, 0x48(%rsp)
testq %rax, %rax
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %rdx
movl 0x14(%rsp), %esi
jne 0x17073
jmp 0x16218
movq 0x68(%rsp), %rax
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %rdx
movl 0x14(%rsp), %esi
movl 0x44(%rsp), %ebx
testq %rdx, %rdx
je 0x1707a
movl %esi, (%rdx)
movl 0x10(%rsp), %edx
movl %edx, (%rcx)
movl %ebx, (%rax)
movq 0x48(%rsp), %rax
jmp 0x1621a