// File: tomfunkhouser[P]gaps/pkgs/png/pngrtran.c
// Function: png_do_rgb_to_gray
int /* PRIVATE */
png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)

{
   png_uint_32 i;

   png_uint_32 row_width = row_info->width;
   int rgb_error = 0;

   png_debug(1, "in png_do_rgb_to_gray");

   if (
      (row_info->color_type & PNG_COLOR_MASK_COLOR))
   {
      png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff;
      png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff;
      png_uint_32 bc = png_ptr->rgb_to_gray_blue_coeff;

      if (row_info->color_type == PNG_COLOR_TYPE_RGB)
      {
         if (row_info->bit_depth == 8)
         {
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
            if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL)
            {
               png_bytep sp = row;
               png_bytep dp = row;

               for (i = 0; i < row_width; i++)
               {
                  png_byte red   = png_ptr->gamma_to_1[*(sp++)];
                  png_byte green = png_ptr->gamma_to_1[*(sp++)];
                  png_byte blue  = png_ptr->gamma_to_1[*(sp++)];
                  if (red != green || red != blue)
                  {
                     rgb_error |= 1;
                     *(dp++) = png_ptr->gamma_from_1[
                       (rc*red + gc*green + bc*blue)>>15];
                  }
                  else
                     *(dp++) = *(sp - 1);
               }
            }
            else
#endif
            {
               png_bytep sp = row;
               png_bytep dp = row;
               for (i = 0; i < row_width; i++)
               {
                  png_byte red   = *(sp++);
                  png_byte green = *(sp++);
                  png_byte blue  = *(sp++);
                  if (red != green || red != blue)
                  {
                     rgb_error |= 1;
                     *(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15);
                  }
                  else
                     *(dp++) = *(sp - 1);
               }
            }
         }

         else /* RGB bit_depth == 16 */
         {
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
            if (png_ptr->gamma_16_to_1 != NULL &&
                png_ptr->gamma_16_from_1 != NULL)
            {
               png_bytep sp = row;
               png_bytep dp = row;
               for (i = 0; i < row_width; i++)
               {
                  png_uint_16 red, green, blue, w;

                  red   = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
                  green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
                  blue  = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;

                  if (red == green && red == blue)
                     w = red;
                  else
                  {
                     png_uint_16 red_1   = png_ptr->gamma_16_to_1[(red&0xff) >>
                                  png_ptr->gamma_shift][red>>8];
                     png_uint_16 green_1 =
                         png_ptr->gamma_16_to_1[(green&0xff) >>
                                  png_ptr->gamma_shift][green>>8];
                     png_uint_16 blue_1  = png_ptr->gamma_16_to_1[(blue&0xff) >>
                                  png_ptr->gamma_shift][blue>>8];
                     png_uint_16 gray16  = (png_uint_16)((rc*red_1 + gc*green_1
                                  + bc*blue_1)>>15);
                     w = png_ptr->gamma_16_from_1[(gray16&0xff) >>
                         png_ptr->gamma_shift][gray16 >> 8];
                     rgb_error |= 1;
                  }

                  *(dp++) = (png_byte)((w>>8) & 0xff);
                  *(dp++) = (png_byte)(w & 0xff);
               }
            }
            else
#endif
            {
               png_bytep sp = row;
               png_bytep dp = row;
               for (i = 0; i < row_width; i++)
               {
                  png_uint_16 red, green, blue, gray16;

                  red   = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
                  green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
                  blue  = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;

                  if (red != green || red != blue)
                     rgb_error |= 1;
                  gray16  = (png_uint_16)((rc*red + gc*green + bc*blue)>>15);
                  *(dp++) = (png_byte)((gray16>>8) & 0xff);
                  *(dp++) = (png_byte)(gray16 & 0xff);
               }
            }
         }
      }
      if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
      {
         if (row_info->bit_depth == 8)
         {
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
            if (png_ptr->gamma_from_1 != NULL && png_ptr->gamma_to_1 != NULL)
            {
               png_bytep sp = row;
               png_bytep dp = row;
               for (i = 0; i < row_width; i++)
               {
                  png_byte red   = png_ptr->gamma_to_1[*(sp++)];
                  png_byte green = png_ptr->gamma_to_1[*(sp++)];
                  png_byte blue  = png_ptr->gamma_to_1[*(sp++)];
                  if (red != green || red != blue)
                     rgb_error |= 1;
                  *(dp++) =  png_ptr->gamma_from_1
                             [(rc*red + gc*green + bc*blue)>>15];
                  *(dp++) = *(sp++);  /* alpha */
               }
            }
            else
#endif
            {
               png_bytep sp = row;
               png_bytep dp = row;
               for (i = 0; i < row_width; i++)
               {
                  png_byte red   = *(sp++);
                  png_byte green = *(sp++);
                  png_byte blue  = *(sp++);
                  if (red != green || red != blue)
                     rgb_error |= 1;
                  *(dp++) =  (png_byte)((rc*red + gc*green + bc*blue)>>15);
                  *(dp++) = *(sp++);  /* alpha */
               }
            }
         }
         else /* RGBA bit_depth == 16 */
         {
#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
            if (png_ptr->gamma_16_to_1 != NULL &&
                png_ptr->gamma_16_from_1 != NULL)
            {
               png_bytep sp = row;
               png_bytep dp = row;
               for (i = 0; i < row_width; i++)
               {
                  png_uint_16 red, green, blue, w;

                  red   = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
                  green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
                  blue  = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;

                  if (red == green && red == blue)
                     w = red;
                  else
                  {
                     png_uint_16 red_1   = png_ptr->gamma_16_to_1[(red&0xff) >>
                         png_ptr->gamma_shift][red>>8];
                     png_uint_16 green_1 =
                         png_ptr->gamma_16_to_1[(green&0xff) >>
                         png_ptr->gamma_shift][green>>8];
                     png_uint_16 blue_1  = png_ptr->gamma_16_to_1[(blue&0xff) >>
                         png_ptr->gamma_shift][blue>>8];
                     png_uint_16 gray16  = (png_uint_16)((rc * red_1
                         + gc * green_1 + bc * blue_1)>>15);
                     w = png_ptr->gamma_16_from_1[(gray16&0xff) >>
                         png_ptr->gamma_shift][gray16 >> 8];
                     rgb_error |= 1;
                  }

                  *(dp++) = (png_byte)((w>>8) & 0xff);
                  *(dp++) = (png_byte)(w & 0xff);
                  *(dp++) = *(sp++);  /* alpha */
                  *(dp++) = *(sp++);
               }
            }
            else
#endif
            {
               png_bytep sp = row;
               png_bytep dp = row;
               for (i = 0; i < row_width; i++)
               {
                  png_uint_16 red, green, blue, gray16;
                  red   = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;
                  green = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;
                  blue  = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;
                  if (red != green || red != blue)
                     rgb_error |= 1;
                  gray16  = (png_uint_16)((rc*red + gc*green + bc*blue)>>15);
                  *(dp++) = (png_byte)((gray16>>8) & 0xff);
                  *(dp++) = (png_byte)(gray16 & 0xff);
                  *(dp++) = *(sp++);  /* alpha */
                  *(dp++) = *(sp++);
               }
            }
         }
      }
   row_info->channels -= (png_byte)2;
      row_info->color_type &= ~PNG_COLOR_MASK_COLOR;
      row_info->pixel_depth = (png_byte)(row_info->channels *
         row_info->bit_depth);
      row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
   }
   return rgb_error;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq %rdx, 0x70(%rsp)
movq 0x78(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x68(%rsp)
movl $0x0, 0x64(%rsp)
movq 0x78(%rsp), %rax
movzbl 0x10(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x10ce90
movq 0x80(%rsp), %rax
movzwl 0x402(%rax), %eax
movl %eax, 0x60(%rsp)
movq 0x80(%rsp), %rax
movzwl 0x404(%rax), %eax
movl %eax, 0x5c(%rsp)
movq 0x80(%rsp), %rax
movzwl 0x406(%rax), %eax
movl %eax, 0x58(%rsp)
movq 0x78(%rsp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x2, %eax
jne 0x10c6aa
movq 0x78(%rsp), %rax
movzbl 0x11(%rax), %eax
cmpl $0x8, %eax
jne 0x10c2bb
movq 0x80(%rsp), %rax
cmpq $0x0, 0x2a0(%rax)
je 0x10c1af
movq 0x80(%rsp), %rax
cmpq $0x0, 0x2a8(%rax)
je 0x10c1af
movq 0x70(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x48(%rsp)
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x10c1aa
movq 0x80(%rsp), %rax
movq 0x2a8(%rax), %rax
movq 0x50(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x50(%rsp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %al
movb %al, 0x47(%rsp)
movq 0x80(%rsp), %rax
movq 0x2a8(%rax), %rax
movq 0x50(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x50(%rsp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %al
movb %al, 0x46(%rsp)
movq 0x80(%rsp), %rax
movq 0x2a8(%rax), %rax
movq 0x50(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0x50(%rsp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %al
movb %al, 0x45(%rsp)
movzbl 0x47(%rsp), %eax
movzbl 0x46(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10c11e
movzbl 0x47(%rsp), %eax
movzbl 0x45(%rsp), %ecx
cmpl %ecx, %eax
je 0x10c17d
movl 0x64(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x64(%rsp)
movq 0x80(%rsp), %rax
movq 0x2a0(%rax), %rax
movl 0x60(%rsp), %ecx
movzbl 0x47(%rsp), %edx
imull %edx, %ecx
movl 0x5c(%rsp), %edx
movzbl 0x46(%rsp), %esi
imull %esi, %edx
addl %edx, %ecx
movl 0x58(%rsp), %edx
movzbl 0x45(%rsp), %esi
imull %esi, %edx
addl %edx, %ecx
shrl $0xf, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %cl
movq 0x48(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x48(%rsp)
movb %cl, (%rax)
jmp 0x10c198
movq 0x50(%rsp), %rax
movb -0x1(%rax), %cl
movq 0x48(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x48(%rsp)
movb %cl, (%rax)
jmp 0x10c19a
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x10c076
jmp 0x10c2b6
movq 0x70(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x30(%rsp)
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x10c2b4
movq 0x38(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rsp)
movb (%rax), %al
movb %al, 0x2f(%rsp)
movq 0x38(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rsp)
movb (%rax), %al
movb %al, 0x2e(%rsp)
movq 0x38(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x38(%rsp)
movb (%rax), %al
movb %al, 0x2d(%rsp)
movzbl 0x2f(%rsp), %eax
movzbl 0x2e(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10c23a
movzbl 0x2f(%rsp), %eax
movzbl 0x2d(%rsp), %ecx
cmpl %ecx, %eax
je 0x10c287
movl 0x64(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x64(%rsp)
movl 0x60(%rsp), %eax
movzbl 0x2f(%rsp), %ecx
imull %ecx, %eax
movl 0x5c(%rsp), %ecx
movzbl 0x2e(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl 0x58(%rsp), %ecx
movzbl 0x2d(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
shrl $0xf, %eax
movb %al, %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, (%rax)
jmp 0x10c2a2
movq 0x38(%rsp), %rax
movb -0x1(%rax), %cl
movq 0x30(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x30(%rsp)
movb %cl, (%rax)
jmp 0x10c2a4
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x10c1cb
jmp 0x10c2b6
jmp 0x10c6a8
movq 0x80(%rsp), %rax
cmpq $0x0, 0x2c0(%rax)
je 0x10c564
movq 0x80(%rsp), %rax
cmpq $0x0, 0x2b8(%rax)
je 0x10c564
movq 0x70(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x10c55f
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq 0x20(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, 0x16(%rsp)
movq 0x20(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq 0x20(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, 0x14(%rsp)
movq 0x20(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq 0x20(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, 0x12(%rsp)
movq 0x20(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x20(%rsp)
movzwl 0x16(%rsp), %eax
movzwl 0x14(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10c3b7
movzwl 0x16(%rsp), %eax
movzwl 0x12(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10c3b7
movw 0x16(%rsp), %ax
movw %ax, 0x10(%rsp)
jmp 0x10c50e
movq 0x80(%rsp), %rax
movq 0x2c0(%rax), %rax
movzwl 0x16(%rsp), %edx
andl $0xff, %edx
movq 0x80(%rsp), %rcx
movl 0x288(%rcx), %ecx
sarl %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movzwl 0x16(%rsp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, 0xe(%rsp)
movq 0x80(%rsp), %rax
movq 0x2c0(%rax), %rax
movzwl 0x14(%rsp), %edx
andl $0xff, %edx
movq 0x80(%rsp), %rcx
movl 0x288(%rcx), %ecx
sarl %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movzwl 0x14(%rsp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, 0xc(%rsp)
movq 0x80(%rsp), %rax
movq 0x2c0(%rax), %rax
movzwl 0x12(%rsp), %edx
andl $0xff, %edx
movq 0x80(%rsp), %rcx
movl 0x288(%rcx), %ecx
sarl %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movzwl 0x12(%rsp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, 0xa(%rsp)
movl 0x60(%rsp), %eax
movzwl 0xe(%rsp), %ecx
imull %ecx, %eax
movl 0x5c(%rsp), %ecx
movzwl 0xc(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl 0x58(%rsp), %ecx
movzwl 0xa(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
shrl $0xf, %eax
movw %ax, 0x8(%rsp)
movq 0x80(%rsp), %rax
movq 0x2b8(%rax), %rax
movzwl 0x8(%rsp), %edx
andl $0xff, %edx
movq 0x80(%rsp), %rcx
movl 0x288(%rcx), %ecx
sarl %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movzwl 0x8(%rsp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, 0x10(%rsp)
movl 0x64(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x64(%rsp)
movzwl 0x10(%rsp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq 0x18(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x18(%rsp)
movb %cl, (%rax)
movzwl 0x10(%rsp), %eax
andl $0xff, %eax
movb %al, %cl
movq 0x18(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x18(%rsp)
movb %cl, (%rax)
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x10c303
jmp 0x10c6a6
movq 0x70(%rsp), %rax
movq %rax, (%rsp)
movq 0x70(%rsp), %rax
movq %rax, -0x8(%rsp)
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x10c6a4
movq (%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq (%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, -0xa(%rsp)
movq (%rsp), %rax
addq $0x2, %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq (%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, -0xc(%rsp)
movq (%rsp), %rax
addq $0x2, %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq (%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, -0xe(%rsp)
movq (%rsp), %rax
addq $0x2, %rax
movq %rax, (%rsp)
movzwl -0xa(%rsp), %eax
movzwl -0xc(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10c618
movzwl -0xa(%rsp), %eax
movzwl -0xe(%rsp), %ecx
cmpl %ecx, %eax
je 0x10c623
movl 0x64(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x64(%rsp)
movl 0x60(%rsp), %eax
movzwl -0xa(%rsp), %ecx
imull %ecx, %eax
movl 0x5c(%rsp), %ecx
movzwl -0xc(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl 0x58(%rsp), %ecx
movzwl -0xe(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
shrl $0xf, %eax
movw %ax, -0x10(%rsp)
movzwl -0x10(%rsp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x8(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rsp)
movb %cl, (%rax)
movzwl -0x10(%rsp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x8(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x8(%rsp)
movb %cl, (%rax)
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x10c57f
jmp 0x10c6a6
jmp 0x10c6a8
jmp 0x10c6aa
movq 0x78(%rsp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x6, %eax
jne 0x10cdfd
movq 0x78(%rsp), %rax
movzbl 0x11(%rax), %eax
cmpl $0x8, %eax
jne 0x10c969
movq 0x80(%rsp), %rax
cmpq $0x0, 0x2a0(%rax)
je 0x10c856
movq 0x80(%rsp), %rax
cmpq $0x0, 0x2a8(%rax)
je 0x10c856
movq 0x70(%rsp), %rax
movq %rax, -0x18(%rsp)
movq 0x70(%rsp), %rax
movq %rax, -0x20(%rsp)
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x10c851
movq 0x80(%rsp), %rax
movq 0x2a8(%rax), %rax
movq -0x18(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rsp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %al
movb %al, -0x21(%rsp)
movq 0x80(%rsp), %rax
movq 0x2a8(%rax), %rax
movq -0x18(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rsp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %al
movb %al, -0x22(%rsp)
movq 0x80(%rsp), %rax
movq 0x2a8(%rax), %rax
movq -0x18(%rsp), %rcx
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rsp)
movzbl (%rcx), %ecx
movb (%rax,%rcx), %al
movb %al, -0x23(%rsp)
movzbl -0x21(%rsp), %eax
movzbl -0x22(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10c7be
movzbl -0x21(%rsp), %eax
movzbl -0x23(%rsp), %ecx
cmpl %ecx, %eax
je 0x10c7c9
movl 0x64(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x64(%rsp)
movq 0x80(%rsp), %rax
movq 0x2a0(%rax), %rax
movl 0x60(%rsp), %ecx
movzbl -0x21(%rsp), %edx
imull %edx, %ecx
movl 0x5c(%rsp), %edx
movzbl -0x22(%rsp), %esi
imull %esi, %edx
addl %edx, %ecx
movl 0x58(%rsp), %edx
movzbl -0x23(%rsp), %esi
imull %esi, %edx
addl %edx, %ecx
shrl $0xf, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %cl
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rsp)
movb %cl, (%rax)
movq -0x18(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x18(%rsp)
movb (%rax), %cl
movq -0x20(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x20(%rsp)
movb %cl, (%rax)
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x10c716
jmp 0x10c964
movq 0x70(%rsp), %rax
movq %rax, -0x30(%rsp)
movq 0x70(%rsp), %rax
movq %rax, -0x38(%rsp)
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x10c962
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rsp)
movb (%rax), %al
movb %al, -0x39(%rsp)
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rsp)
movb (%rax), %al
movb %al, -0x3a(%rsp)
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rsp)
movb (%rax), %al
movb %al, -0x3b(%rsp)
movzbl -0x39(%rsp), %eax
movzbl -0x3a(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10c8e1
movzbl -0x39(%rsp), %eax
movzbl -0x3b(%rsp), %ecx
cmpl %ecx, %eax
je 0x10c8ec
movl 0x64(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x64(%rsp)
movl 0x60(%rsp), %eax
movzbl -0x39(%rsp), %ecx
imull %ecx, %eax
movl 0x5c(%rsp), %ecx
movzbl -0x3a(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl 0x58(%rsp), %ecx
movzbl -0x3b(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
shrl $0xf, %eax
movb %al, %cl
movq -0x38(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rsp)
movb %cl, (%rax)
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rsp)
movb (%rax), %cl
movq -0x38(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rsp)
movb %cl, (%rax)
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x10c872
jmp 0x10c964
jmp 0x10cdfb
movq 0x80(%rsp), %rax
cmpq $0x0, 0x2c0(%rax)
je 0x10cc5e
movq 0x80(%rsp), %rax
cmpq $0x0, 0x2b8(%rax)
je 0x10cc5e
movq 0x70(%rsp), %rax
movq %rax, -0x48(%rsp)
movq 0x70(%rsp), %rax
movq %rax, -0x50(%rsp)
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x10cc59
movq -0x48(%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x48(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, -0x52(%rsp)
movq -0x48(%rsp), %rax
addq $0x2, %rax
movq %rax, -0x48(%rsp)
movq -0x48(%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x48(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, -0x54(%rsp)
movq -0x48(%rsp), %rax
addq $0x2, %rax
movq %rax, -0x48(%rsp)
movq -0x48(%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x48(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, -0x56(%rsp)
movq -0x48(%rsp), %rax
addq $0x2, %rax
movq %rax, -0x48(%rsp)
movzwl -0x52(%rsp), %eax
movzwl -0x54(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10ca65
movzwl -0x52(%rsp), %eax
movzwl -0x56(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10ca65
movw -0x52(%rsp), %ax
movw %ax, -0x58(%rsp)
jmp 0x10cbbc
movq 0x80(%rsp), %rax
movq 0x2c0(%rax), %rax
movzwl -0x52(%rsp), %edx
andl $0xff, %edx
movq 0x80(%rsp), %rcx
movl 0x288(%rcx), %ecx
sarl %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movzwl -0x52(%rsp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x5a(%rsp)
movq 0x80(%rsp), %rax
movq 0x2c0(%rax), %rax
movzwl -0x54(%rsp), %edx
andl $0xff, %edx
movq 0x80(%rsp), %rcx
movl 0x288(%rcx), %ecx
sarl %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movzwl -0x54(%rsp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x5c(%rsp)
movq 0x80(%rsp), %rax
movq 0x2c0(%rax), %rax
movzwl -0x56(%rsp), %edx
andl $0xff, %edx
movq 0x80(%rsp), %rcx
movl 0x288(%rcx), %ecx
sarl %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movzwl -0x56(%rsp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x5e(%rsp)
movl 0x60(%rsp), %eax
movzwl -0x5a(%rsp), %ecx
imull %ecx, %eax
movl 0x5c(%rsp), %ecx
movzwl -0x5c(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl 0x58(%rsp), %ecx
movzwl -0x5e(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
shrl $0xf, %eax
movw %ax, -0x60(%rsp)
movq 0x80(%rsp), %rax
movq 0x2b8(%rax), %rax
movzwl -0x60(%rsp), %edx
andl $0xff, %edx
movq 0x80(%rsp), %rcx
movl 0x288(%rcx), %ecx
sarl %cl, %edx
movl %edx, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movzwl -0x60(%rsp), %ecx
sarl $0x8, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x58(%rsp)
movl 0x64(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x64(%rsp)
movzwl -0x58(%rsp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x50(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rsp)
movb %cl, (%rax)
movzwl -0x58(%rsp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x50(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rsp)
movb %cl, (%rax)
movq -0x48(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rsp)
movb (%rax), %cl
movq -0x50(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rsp)
movb %cl, (%rax)
movq -0x48(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rsp)
movb (%rax), %cl
movq -0x50(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x50(%rsp)
movb %cl, (%rax)
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x10c9b1
jmp 0x10cdf9
movq 0x70(%rsp), %rax
movq %rax, -0x68(%rsp)
movq 0x70(%rsp), %rax
movq %rax, -0x70(%rsp)
movl $0x0, 0x6c(%rsp)
movl 0x6c(%rsp), %eax
cmpl 0x68(%rsp), %eax
jae 0x10cdf7
movq -0x68(%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x68(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, -0x72(%rsp)
movq -0x68(%rsp), %rax
addq $0x2, %rax
movq %rax, -0x68(%rsp)
movq -0x68(%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x68(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, -0x74(%rsp)
movq -0x68(%rsp), %rax
addq $0x2, %rax
movq %rax, -0x68(%rsp)
movq -0x68(%rsp), %rax
movzbl (%rax), %eax
shll $0x8, %eax
movq -0x68(%rsp), %rcx
movzbl 0x1(%rcx), %ecx
orl %ecx, %eax
movw %ax, -0x76(%rsp)
movq -0x68(%rsp), %rax
addq $0x2, %rax
movq %rax, -0x68(%rsp)
movzwl -0x72(%rsp), %eax
movzwl -0x74(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10cd1f
movzwl -0x72(%rsp), %eax
movzwl -0x76(%rsp), %ecx
cmpl %ecx, %eax
je 0x10cd2a
movl 0x64(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x64(%rsp)
movl 0x60(%rsp), %eax
movzwl -0x72(%rsp), %ecx
imull %ecx, %eax
movl 0x5c(%rsp), %ecx
movzwl -0x74(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
movl 0x58(%rsp), %ecx
movzwl -0x76(%rsp), %edx
imull %edx, %ecx
addl %ecx, %eax
shrl $0xf, %eax
movw %ax, -0x78(%rsp)
movzwl -0x78(%rsp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x70(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x70(%rsp)
movb %cl, (%rax)
movzwl -0x78(%rsp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x70(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x70(%rsp)
movb %cl, (%rax)
movq -0x68(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rsp)
movb (%rax), %cl
movq -0x70(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x70(%rsp)
movb %cl, (%rax)
movq -0x68(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x68(%rsp)
movb (%rax), %cl
movq -0x70(%rsp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x70(%rsp)
movb %cl, (%rax)
movl 0x6c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x6c(%rsp)
jmp 0x10cc7a
jmp 0x10cdf9
jmp 0x10cdfb
jmp 0x10cdfd
movq 0x78(%rsp), %rax
movzbl 0x12(%rax), %ecx
subl $0x2, %ecx
movb %cl, 0x12(%rax)
movq 0x78(%rsp), %rax
movzbl 0x10(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x10(%rax)
movq 0x78(%rsp), %rax
movzbl 0x12(%rax), %eax
movq 0x78(%rsp), %rcx
movzbl 0x11(%rcx), %ecx
imull %ecx, %eax
movb %al, %cl
movq 0x78(%rsp), %rax
movb %cl, 0x13(%rax)
movq 0x78(%rsp), %rax
movzbl 0x13(%rax), %eax
cmpl $0x8, %eax
jl 0x10ce64
movl 0x68(%rsp), %eax
movq 0x78(%rsp), %rcx
movzbl 0x13(%rcx), %ecx
shrq $0x3, %rcx
imulq %rcx, %rax
movq %rax, -0x80(%rsp)
jmp 0x10ce82
movl 0x68(%rsp), %eax
movq 0x78(%rsp), %rcx
movzbl 0x13(%rcx), %ecx
imulq %rcx, %rax
addq $0x7, %rax
shrq $0x3, %rax
movq %rax, -0x80(%rsp)
movq -0x80(%rsp), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x8(%rax)
movl 0x64(%rsp), %eax
addq $0x88, %rsp
retq
nopl (%rax)