// File: tomfunkhouser[P]gaps/pkgs/png/pngrtran.c
// Function: png_do_expand
void /* PRIVATE */
png_do_expand(png_row_infop row_info, png_bytep row,
   png_color_16p trans_value)
{
   int shift, value;
   png_bytep sp, dp;
   png_uint_32 i;
   png_uint_32 row_width=row_info->width;

   png_debug(1, "in png_do_expand");

   {
      if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
      {
         png_uint_16 gray = (png_uint_16)(trans_value ? trans_value->gray : 0);

         if (row_info->bit_depth < 8)
         {
            switch (row_info->bit_depth)
            {
               case 1:
               {
                  gray = (png_uint_16)((gray&0x01)*0xff);
                  sp = row + (png_size_t)((row_width - 1) >> 3);
                  dp = row + (png_size_t)row_width - 1;
                  shift = 7 - (int)((row_width + 7) & 0x07);
                  for (i = 0; i < row_width; i++)
                  {
                     if ((*sp >> shift) & 0x01)
                        *dp = 0xff;
                     else
                        *dp = 0;
                     if (shift == 7)
                     {
                        shift = 0;
                        sp--;
                     }
                     else
                        shift++;

                     dp--;
                  }
                  break;
               }

               case 2:
               {
                  gray = (png_uint_16)((gray&0x03)*0x55);
                  sp = row + (png_size_t)((row_width - 1) >> 2);
                  dp = row + (png_size_t)row_width - 1;
                  shift = (int)((3 - ((row_width + 3) & 0x03)) << 1);
                  for (i = 0; i < row_width; i++)
                  {
                     value = (*sp >> shift) & 0x03;
                     *dp = (png_byte)(value | (value << 2) | (value << 4) |
                        (value << 6));
                     if (shift == 6)
                     {
                        shift = 0;
                        sp--;
                     }
                     else
                        shift += 2;

                     dp--;
                  }
                  break;
               }

               case 4:
               {
                  gray = (png_uint_16)((gray&0x0f)*0x11);
                  sp = row + (png_size_t)((row_width - 1) >> 1);
                  dp = row + (png_size_t)row_width - 1;
                  shift = (int)((1 - ((row_width + 1) & 0x01)) << 2);
                  for (i = 0; i < row_width; i++)
                  {
                     value = (*sp >> shift) & 0x0f;
                     *dp = (png_byte)(value | (value << 4));
                     if (shift == 4)
                     {
                        shift = 0;
                        sp--;
                     }
                     else
                        shift = 4;

                     dp--;
                  }
                  break;
               }
            }

            row_info->bit_depth = 8;
            row_info->pixel_depth = 8;
            row_info->rowbytes = row_width;
         }

         if (trans_value != NULL)
         {
            if (row_info->bit_depth == 8)
            {
               gray = gray & 0xff;
               sp = row + (png_size_t)row_width - 1;
               dp = row + (png_size_t)(row_width << 1) - 1;
               for (i = 0; i < row_width; i++)
               {
                  if (*sp == gray)
                     *dp-- = 0;
                  else
                     *dp-- = 0xff;
                  *dp-- = *sp--;
               }
            }

            else if (row_info->bit_depth == 16)
            {
               png_byte gray_high = (gray >> 8) & 0xff;
               png_byte gray_low = gray & 0xff;
               sp = row + row_info->rowbytes - 1;
               dp = row + (row_info->rowbytes << 1) - 1;
               for (i = 0; i < row_width; i++)
               {
                  if (*(sp - 1) == gray_high && *(sp) == gray_low)
                  {
                     *dp-- = 0;
                     *dp-- = 0;
                  }
                  else
                  {
                     *dp-- = 0xff;
                     *dp-- = 0xff;
                  }
                  *dp-- = *sp--;
                  *dp-- = *sp--;
               }
            }

            row_info->color_type = PNG_COLOR_TYPE_GRAY_ALPHA;
            row_info->channels = 2;
            row_info->pixel_depth = (png_byte)(row_info->bit_depth << 1);
            row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
               row_width);
         }
      }
      else if (row_info->color_type == PNG_COLOR_TYPE_RGB && trans_value)
      {
         if (row_info->bit_depth == 8)
         {
            png_byte red = trans_value->red & 0xff;
            png_byte green = trans_value->green & 0xff;
            png_byte blue = trans_value->blue & 0xff;
            sp = row + (png_size_t)row_info->rowbytes - 1;
            dp = row + (png_size_t)(row_width << 2) - 1;
            for (i = 0; i < row_width; i++)
            {
               if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue)
                  *dp-- = 0;
               else
                  *dp-- = 0xff;
               *dp-- = *sp--;
               *dp-- = *sp--;
               *dp-- = *sp--;
            }
         }
         else if (row_info->bit_depth == 16)
         {
            png_byte red_high = (trans_value->red >> 8) & 0xff;
            png_byte green_high = (trans_value->green >> 8) & 0xff;
            png_byte blue_high = (trans_value->blue >> 8) & 0xff;
            png_byte red_low = trans_value->red & 0xff;
            png_byte green_low = trans_value->green & 0xff;
            png_byte blue_low = trans_value->blue & 0xff;
            sp = row + row_info->rowbytes - 1;
            dp = row + (png_size_t)(row_width << 3) - 1;
            for (i = 0; i < row_width; i++)
            {
               if (*(sp - 5) == red_high &&
                  *(sp - 4) == red_low &&
                  *(sp - 3) == green_high &&
                  *(sp - 2) == green_low &&
                  *(sp - 1) == blue_high &&
                  *(sp    ) == blue_low)
               {
                  *dp-- = 0;
                  *dp-- = 0;
               }
               else
               {
                  *dp-- = 0xff;
                  *dp-- = 0xff;
               }
               *dp-- = *sp--;
               *dp-- = *sp--;
               *dp-- = *sp--;
               *dp-- = *sp--;
               *dp-- = *sp--;
               *dp-- = *sp--;
            }
         }
         row_info->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
         row_info->channels = 4;
         row_info->pixel_depth = (png_byte)(row_info->bit_depth << 2);
         row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
      }
   }
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x8(%rsp), %rax
movl (%rax), %eax
movl %eax, -0x38(%rsp)
movq -0x8(%rsp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x0, %eax
jne 0x10baf3
cmpq $0x0, -0x18(%rsp)
je 0x10b523
movq -0x18(%rsp), %rax
movzwl 0x8(%rax), %eax
movl %eax, -0x4c(%rsp)
jmp 0x10b52b
xorl %eax, %eax
movl %eax, -0x4c(%rsp)
jmp 0x10b52b
movl -0x4c(%rsp), %eax
movw %ax, -0x3a(%rsp)
movq -0x8(%rsp), %rax
movzbl 0x11(%rax), %eax
cmpl $0x8, %eax
jge 0x10b841
movq -0x8(%rsp), %rax
movzbl 0x11(%rax), %eax
movl %eax, -0x50(%rsp)
subl $0x1, %eax
je 0x10b57b
jmp 0x10b55a
movl -0x50(%rsp), %eax
subl $0x2, %eax
je 0x10b655
jmp 0x10b569
movl -0x50(%rsp), %eax
subl $0x4, %eax
je 0x10b74a
jmp 0x10b820
movzwl -0x3a(%rsp), %eax
andl $0x1, %eax
imull $0xff, %eax, %eax
movw %ax, -0x3a(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
subl $0x1, %ecx
shrl $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl -0x38(%rsp), %ecx
addl $0x7, %ecx
andl $0x7, %ecx
movl $0x7, %eax
subl %ecx, %eax
movl %eax, -0x1c(%rsp)
movl $0x0, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x38(%rsp), %eax
jae 0x10b650
movq -0x28(%rsp), %rax
movzbl (%rax), %eax
movl -0x1c(%rsp), %ecx
sarl %cl, %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x10b603
movq -0x30(%rsp), %rax
movb $-0x1, (%rax)
jmp 0x10b60b
movq -0x30(%rsp), %rax
movb $0x0, (%rax)
cmpl $0x7, -0x1c(%rsp)
jne 0x10b62a
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rsp)
jmp 0x10b635
movl -0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rsp)
movq -0x30(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x10b5d9
jmp 0x10b820
movzwl -0x3a(%rsp), %eax
andl $0x3, %eax
imull $0x55, %eax, %eax
movw %ax, -0x3a(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
subl $0x1, %ecx
shrl $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl -0x38(%rsp), %ecx
addl $0x3, %ecx
andl $0x3, %ecx
movl $0x3, %eax
subl %ecx, %eax
shll %eax
movl %eax, -0x1c(%rsp)
movl $0x0, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x38(%rsp), %eax
jae 0x10b745
movq -0x28(%rsp), %rax
movzbl (%rax), %eax
movl -0x1c(%rsp), %ecx
sarl %cl, %eax
andl $0x3, %eax
movl %eax, -0x20(%rsp)
movl -0x20(%rsp), %eax
movl -0x20(%rsp), %ecx
shll $0x2, %ecx
orl %ecx, %eax
movl -0x20(%rsp), %ecx
shll $0x4, %ecx
orl %ecx, %eax
movl -0x20(%rsp), %ecx
shll $0x6, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x30(%rsp), %rax
movb %cl, (%rax)
cmpl $0x6, -0x1c(%rsp)
jne 0x10b71c
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rsp)
jmp 0x10b727
movl -0x1c(%rsp), %eax
addl $0x2, %eax
movl %eax, -0x1c(%rsp)
movq -0x30(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x10b6b2
jmp 0x10b820
movzwl -0x3a(%rsp), %eax
andl $0xf, %eax
imull $0x11, %eax, %eax
movw %ax, -0x3a(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
subl $0x1, %ecx
shrl %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x28(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl -0x38(%rsp), %ecx
addl $0x1, %ecx
andl $0x1, %ecx
movl $0x1, %eax
subl %ecx, %eax
shll $0x2, %eax
movl %eax, -0x1c(%rsp)
movl $0x0, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x38(%rsp), %eax
jae 0x10b81e
movq -0x28(%rsp), %rax
movzbl (%rax), %eax
movl -0x1c(%rsp), %ecx
sarl %cl, %eax
andl $0xf, %eax
movl %eax, -0x20(%rsp)
movl -0x20(%rsp), %eax
movl -0x20(%rsp), %ecx
shll $0x4, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x30(%rsp), %rax
movb %cl, (%rax)
cmpl $0x4, -0x1c(%rsp)
jne 0x10b7fb
movl $0x0, -0x1c(%rsp)
movq -0x28(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rsp)
jmp 0x10b803
movl $0x4, -0x1c(%rsp)
movq -0x30(%rsp), %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x10b7a7
jmp 0x10b820
movq -0x8(%rsp), %rax
movb $0x8, 0x11(%rax)
movq -0x8(%rsp), %rax
movb $0x8, 0x13(%rax)
movl -0x38(%rsp), %eax
movl %eax, %ecx
movq -0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x18(%rsp)
je 0x10baee
movq -0x8(%rsp), %rax
movzbl 0x11(%rax), %eax
cmpl $0x8, %eax
jne 0x10b921
movzwl -0x3a(%rsp), %eax
andl $0xff, %eax
movw %ax, -0x3a(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x28(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
shll %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl $0x0, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x38(%rsp), %eax
jae 0x10b91c
movq -0x28(%rsp), %rax
movzbl (%rax), %eax
movzwl -0x3a(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10b8d5
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $0x0, (%rax)
jmp 0x10b8e9
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $-0x1, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x10b8a4
jmp 0x10ba71
movq -0x8(%rsp), %rax
movzbl 0x11(%rax), %eax
cmpl $0x10, %eax
jne 0x10ba6f
movzwl -0x3a(%rsp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x3b(%rsp)
movzwl -0x3a(%rsp), %eax
andl $0xff, %eax
movb %al, -0x3c(%rsp)
movq -0x10(%rsp), %rax
movq -0x8(%rsp), %rcx
addq 0x8(%rcx), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rsp)
movq -0x10(%rsp), %rax
movq -0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
shlq %rcx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl $0x0, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x38(%rsp), %eax
jae 0x10ba6d
movq -0x28(%rsp), %rax
movzbl -0x1(%rax), %eax
movzbl -0x3b(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10b9e9
movq -0x28(%rsp), %rax
movzbl (%rax), %eax
movzbl -0x3c(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10b9e9
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $0x0, (%rax)
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $0x0, (%rax)
jmp 0x10ba11
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $-0x1, (%rax)
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $-0x1, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x10b98e
jmp 0x10ba6f
jmp 0x10ba71
movq -0x8(%rsp), %rax
movb $0x4, 0x10(%rax)
movq -0x8(%rsp), %rax
movb $0x2, 0x12(%rax)
movq -0x8(%rsp), %rax
movzbl 0x11(%rax), %eax
shll %eax
movb %al, %cl
movq -0x8(%rsp), %rax
movb %cl, 0x13(%rax)
movq -0x8(%rsp), %rax
movzbl 0x13(%rax), %eax
cmpl $0x8, %eax
jl 0x10bac2
movl -0x38(%rsp), %eax
movq -0x8(%rsp), %rcx
movzbl 0x13(%rcx), %ecx
shrq $0x3, %rcx
imulq %rcx, %rax
movq %rax, -0x58(%rsp)
jmp 0x10bae0
movl -0x38(%rsp), %eax
movq -0x8(%rsp), %rcx
movzbl 0x13(%rcx), %ecx
imulq %rcx, %rax
addq $0x7, %rax
shrq $0x3, %rax
movq %rax, -0x58(%rsp)
movq -0x58(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x10bf8d
movq -0x8(%rsp), %rax
movzbl 0x10(%rax), %eax
cmpl $0x2, %eax
jne 0x10bf8b
cmpq $0x0, -0x18(%rsp)
je 0x10bf8b
movq -0x8(%rsp), %rax
movzbl 0x11(%rax), %eax
cmpl $0x8, %eax
jne 0x10bc86
movq -0x18(%rsp), %rax
movzwl 0x2(%rax), %eax
andl $0xff, %eax
movb %al, -0x3d(%rsp)
movq -0x18(%rsp), %rax
movzwl 0x4(%rax), %eax
andl $0xff, %eax
movb %al, -0x3e(%rsp)
movq -0x18(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0xff, %eax
movb %al, -0x3f(%rsp)
movq -0x10(%rsp), %rax
movq -0x8(%rsp), %rcx
addq 0x8(%rcx), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
shll $0x2, %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl $0x0, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x38(%rsp), %eax
jae 0x10bc81
movq -0x28(%rsp), %rax
movzbl -0x2(%rax), %eax
movzbl -0x3d(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10bbeb
movq -0x28(%rsp), %rax
movzbl -0x1(%rax), %eax
movzbl -0x3e(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10bbeb
movq -0x28(%rsp), %rax
movzbl (%rax), %eax
movzbl -0x3f(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10bbeb
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $0x0, (%rax)
jmp 0x10bbff
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $-0x1, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x10bb92
jmp 0x10bf0d
movq -0x8(%rsp), %rax
movzbl 0x11(%rax), %eax
cmpl $0x10, %eax
jne 0x10bf0b
movq -0x18(%rsp), %rax
movzwl 0x2(%rax), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x40(%rsp)
movq -0x18(%rsp), %rax
movzwl 0x4(%rax), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x41(%rsp)
movq -0x18(%rsp), %rax
movzwl 0x6(%rax), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x42(%rsp)
movq -0x18(%rsp), %rax
movzwl 0x2(%rax), %eax
andl $0xff, %eax
movb %al, -0x43(%rsp)
movq -0x18(%rsp), %rax
movzwl 0x4(%rax), %eax
andl $0xff, %eax
movb %al, -0x44(%rsp)
movq -0x18(%rsp), %rax
movzwl 0x6(%rax), %eax
andl $0xff, %eax
movb %al, -0x45(%rsp)
movq -0x10(%rsp), %rax
movq -0x8(%rsp), %rcx
addq 0x8(%rcx), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rsp)
movq -0x10(%rsp), %rax
movl -0x38(%rsp), %ecx
shll $0x3, %ecx
movl %ecx, %ecx
addq %rcx, %rax
addq $-0x1, %rax
movq %rax, -0x30(%rsp)
movl $0x0, -0x34(%rsp)
movl -0x34(%rsp), %eax
cmpl -0x38(%rsp), %eax
jae 0x10bf09
movq -0x28(%rsp), %rax
movzbl -0x5(%rax), %eax
movzbl -0x40(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10bded
movq -0x28(%rsp), %rax
movzbl -0x4(%rax), %eax
movzbl -0x43(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10bded
movq -0x28(%rsp), %rax
movzbl -0x3(%rax), %eax
movzbl -0x41(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10bded
movq -0x28(%rsp), %rax
movzbl -0x2(%rax), %eax
movzbl -0x44(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10bded
movq -0x28(%rsp), %rax
movzbl -0x1(%rax), %eax
movzbl -0x42(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10bded
movq -0x28(%rsp), %rax
movzbl (%rax), %eax
movzbl -0x45(%rsp), %ecx
cmpl %ecx, %eax
jne 0x10bded
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $0x0, (%rax)
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $0x0, (%rax)
jmp 0x10be15
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $-0x1, (%rax)
movq -0x30(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x30(%rsp)
movb $-0x1, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x28(%rsp)
movb (%rax), %cl
movq -0x30(%rsp), %rax
movq %rax, %rdx
addq $-0x1, %rdx
movq %rdx, -0x30(%rsp)
movb %cl, (%rax)
movl -0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x10bd46
jmp 0x10bf0b
jmp 0x10bf0d
movq -0x8(%rsp), %rax
movb $0x6, 0x10(%rax)
movq -0x8(%rsp), %rax
movb $0x4, 0x12(%rax)
movq -0x8(%rsp), %rax
movzbl 0x11(%rax), %eax
shll $0x2, %eax
movb %al, %cl
movq -0x8(%rsp), %rax
movb %cl, 0x13(%rax)
movq -0x8(%rsp), %rax
movzbl 0x13(%rax), %eax
cmpl $0x8, %eax
jl 0x10bf5f
movl -0x38(%rsp), %eax
movq -0x8(%rsp), %rcx
movzbl 0x13(%rcx), %ecx
shrq $0x3, %rcx
imulq %rcx, %rax
movq %rax, -0x60(%rsp)
jmp 0x10bf7d
movl -0x38(%rsp), %eax
movq -0x8(%rsp), %rcx
movzbl 0x13(%rcx), %ecx
imulq %rcx, %rax
addq $0x7, %rax
shrq $0x3, %rax
movq %rax, -0x60(%rsp)
movq -0x60(%rsp), %rcx
movq -0x8(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x10bf8d
retq
nop