LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_gAMA_fixed
void PNGAPI
png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
   int_gamma)
{
   png_fixed_point png_gamma;

   png_debug1(1, "in %s storage function", "gAMA");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

   if (int_gamma > (png_fixed_point)PNG_UINT_31_MAX)
   {
      png_warning(png_ptr, "Limiting gamma to 21474.83");
      png_gamma=PNG_UINT_31_MAX;
   }
   else
   {
      if (int_gamma < 0)
      {
         png_warning(png_ptr, "Setting negative gamma to zero");
         png_gamma = 0;
      }
      else
         png_gamma = int_gamma;
   }
#ifdef PNG_FLOATING_POINT_SUPPORTED
   info_ptr->gamma = (float)(png_gamma/100000.);
#endif
#ifdef PNG_FIXED_POINT_SUPPORTED
   info_ptr->int_gamma = png_gamma;
#endif
   info_ptr->valid |= PNG_INFO_gAMA;
   if (png_gamma == 0)
      png_warning(png_ptr, "Setting gamma=0");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x87cac
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
jns 0x87c86
leaq 0x248ef(%rip), %rsi     # 0xac56b
movq %rbx, %rdi
callq 0x9214d
xorl %edx, %edx
cvtsi2sd %edx, %xmm0
divsd 0x248a6(%rip), %xmm0    # 0xac538
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x34(%r14)
movl %edx, 0x148(%r14)
orb $0x1, 0x8(%r14)
testl %edx, %edx
je 0x87cb4
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x248a0(%rip), %rsi     # 0xac55b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x9214d
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_hIST
void PNGAPI
png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
{
   int i;

   png_debug1(1, "in %s storage function", "hIST");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

   if (info_ptr->num_palette == 0 || info_ptr->num_palette
       > PNG_MAX_PALETTE_LENGTH)
   {
      png_warning(png_ptr,
         "Invalid palette size, hIST allocation skipped");
      return;
   }

   png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);
   /* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in
    * version 1.2.1
    */
   png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr,
      PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16));
   if (png_ptr->hist == NULL)
   {
      png_warning(png_ptr, "Insufficient memory for hIST chunk data");
      return;
   }

   for (i = 0; i < info_ptr->num_palette; i++)
      png_ptr->hist[i] = hist[i];
   info_ptr->hist = png_ptr->hist;
   info_ptr->valid |= PNG_INFO_hIST;

   info_ptr->free_me |= PNG_FREE_HIST;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x87d5e
movq %rsi, %rbx
movq %rdi, %r15
movl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
addl 0x20(%rsi), %eax
movzwl %ax, %eax
cmpl $0xfeff, %eax           # imm = 0xFEFF
ja 0x87d00
leaq 0x2488c(%rip), %rsi     # 0xac58a
jmp 0x87d6b
movq %rdx, %r14
movq %r15, %rdi
movq %rbx, %rsi
movl $0x8, %edx
xorl %ecx, %ecx
callq 0x86f61
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
callq 0x92056
movq %rax, 0x398(%r15)
testq %rax, %rax
je 0x87d64
cmpw $0x0, 0x20(%rbx)
je 0x87d4c
xorl %ecx, %ecx
movzwl (%r14,%rcx,2), %edx
movw %dx, (%rax,%rcx,2)
incq %rcx
movzwl 0x20(%rbx), %edx
cmpq %rdx, %rcx
jb 0x87d37
movq %rax, 0x98(%rbx)
orb $0x40, 0x8(%rbx)
orb $0x8, 0xe4(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2484d(%rip), %rsi     # 0xac5b8
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x9214d
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_IHDR
void PNGAPI
png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
   png_uint_32 width, png_uint_32 height, int bit_depth,
   int color_type, int interlace_type, int compression_type,
   int filter_type)
{
   png_debug1(1, "in %s storage function", "IHDR");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

   info_ptr->width = width;
   info_ptr->height = height;
   info_ptr->bit_depth = (png_byte)bit_depth;
   info_ptr->color_type = (png_byte)color_type;
   info_ptr->compression_type = (png_byte)compression_type;
   info_ptr->filter_type = (png_byte)filter_type;
   info_ptr->interlace_type = (png_byte)interlace_type;

   png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height,
       info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,
       info_ptr->compression_type, info_ptr->filter_type);

   if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
      info_ptr->channels = 1;
   else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
      info_ptr->channels = 3;
   else
      info_ptr->channels = 1;
   if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
      info_ptr->channels++;
   info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);

   /* Check for potential overflow */
   if (width > (PNG_UINT_32_MAX
                 >> 3)      /* 8-byte RGBA pixels */
                 - 64       /* bigrowbuf hack */
                 - 1        /* filter byte */
                 - 7*8      /* rounding of width to multiple of 8 pixels */
                 - 8)       /* extra max_pixel_depth pad */
      info_ptr->rowbytes = 0;
   else
      info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ebp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %dl
orb %al, %dl
jne 0x87e46
movq %rsi, %rbx
movl 0x30(%rsp), %r11d
movl 0x28(%rsp), %r10d
movl 0x20(%rsp), %eax
movl %ebp, (%rsi)
movl %ecx, 0x4(%rsi)
movb %r8b, 0x24(%rsi)
movb %r9b, 0x25(%rsi)
movb %r10b, 0x26(%rsi)
movb %r11b, 0x27(%rsi)
movb %al, 0x28(%rsi)
movl $0xff, %edx
andl %edx, %r8d
andl %edx, %r9d
andl %edx, %eax
andl %edx, %r10d
andl %edx, %r11d
movl %ebp, %esi
movl %ecx, %edx
movl %r8d, %ecx
movl %r9d, %r8d
movl %eax, %r9d
pushq %r11
pushq %r10
callq 0x87742
addq $0x10, %rsp
movb 0x25(%rbx), %dl
cmpb $0x3, %dl
jne 0x87df7
movb $0x1, 0x29(%rbx)
movb $0x1, %cl
jmp 0x87e0d
movl %edx, %eax
andb $0x2, %al
leal 0x1(%rax), %ecx
movb %cl, 0x29(%rbx)
testb $0x4, %dl
je 0x87e0d
addb $0x2, %al
movb %al, 0x29(%rbx)
movl %eax, %ecx
movb 0x24(%rbx), %al
mulb %cl
movb %al, 0x2a(%rbx)
cmpl $0x1fffff7e, %ebp       # imm = 0x1FFFFF7E
jbe 0x87e21
xorl %eax, %eax
jmp 0x87e42
movl %ebp, %ecx
cmpb $0x8, %al
jb 0x87e33
shrb $0x3, %al
movzbl %al, %eax
imulq %rcx, %rax
jmp 0x87e42
movzbl %al, %eax
imulq %rcx, %rax
addq $0x7, %rax
shrq $0x3, %rax
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_PLTE
void PNGAPI
png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
   png_colorp palette, int num_palette)
{

   png_debug1(1, "in %s storage function", "PLTE");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

   if (num_palette < 0 || num_palette > PNG_MAX_PALETTE_LENGTH)
   {
      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
         png_error(png_ptr, "Invalid palette length");
      else
      {
         png_warning(png_ptr, "Invalid palette length");
         return;
      }
   }

   /* It may not actually be necessary to set png_ptr->palette here;
    * we do it for backward compatibility with the way the png_handle_tRNS
    * function used to do the allocation.
    */
   png_free_data(png_ptr, info_ptr, PNG_FREE_PLTE, 0);

   /* Changed in libpng-1.2.1 to allocate PNG_MAX_PALETTE_LENGTH instead
    * of num_palette entries, in case of an invalid PNG file that has
    * too-large sample values.
    */
   png_ptr->palette = (png_colorp)png_calloc(png_ptr,
      PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color));
   png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof(png_color));
   info_ptr->palette = png_ptr->palette;
   info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;

   info_ptr->free_me |= PNG_FREE_PLTE;

   info_ptr->valid |= PNG_INFO_PLTE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebp
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x8812a
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x101, %ebp            # imm = 0x101
jb 0x880d0
cmpb $0x3, 0x25(%rbx)
jne 0x88135
leaq 0x245ab(%rip), %rsi     # 0xac673
movq %r14, %rdi
callq 0x920b4
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1000, %edx           # imm = 0x1000
xorl %ecx, %ecx
callq 0x86f61
movl $0x300, %esi            # imm = 0x300
movq %r14, %rdi
callq 0x91f8a
movq %rax, 0x238(%r14)
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0xe370
movq 0x238(%r14), %rax
movq %rax, 0x18(%rbx)
movw %bp, 0x240(%r14)
movw %bp, 0x20(%rbx)
orb $0x10, 0xe5(%rbx)
orb $0x8, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24537(%rip), %rsi     # 0xac673
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9214d
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_iCCP
void PNGAPI
png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
             png_charp name, int compression_type,
             png_charp profile, png_uint_32 proflen)
{
   png_charp new_iccp_name;
   png_charp new_iccp_profile;
   png_uint_32 length;

   png_debug1(1, "in %s storage function", "iCCP");

   if (png_ptr == NULL || info_ptr == NULL || name == NULL || profile == NULL)
      return;

   length = png_strlen(name)+1;
   new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length);
   if (new_iccp_name == NULL)
   {
        png_warning(png_ptr, "Insufficient memory to process iCCP chunk");
      return;
   }
   png_memcpy(new_iccp_name, name, length);
   new_iccp_profile = (png_charp)png_malloc_warn(png_ptr, proflen);
   if (new_iccp_profile == NULL)
   {
      png_free (png_ptr, new_iccp_name);
      png_warning(png_ptr,
          "Insufficient memory to process iCCP profile");
      return;
   }
   png_memcpy(new_iccp_profile, profile, (png_size_t)proflen);

   png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0);

   info_ptr->iccp_proflen = proflen;
   info_ptr->iccp_name = new_iccp_name;
   info_ptr->iccp_profile = new_iccp_profile;
   /* Compression is always zero but is here so the API and info structure
    * does not have to change if we introduce multiple compression types
    */
   info_ptr->iccp_compression = (png_byte)compression_type;
   info_ptr->free_me |= PNG_FREE_ICCP;
   info_ptr->valid |= PNG_INFO_iCCP;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %xmm0
movq %rdi, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %r8, %xmm0
movq %rdx, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm0
shufps $0xdd, %xmm2, %xmm0     # xmm0 = xmm0[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm0, %xmm1
movmskps %xmm1, %eax
testl %eax, %eax
je 0x88282
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r8, %r12
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r15
movl %r9d, (%rsp)
movl %ecx, 0x4(%rsp)
movq %rdx, %rdi
callq 0xe1e0
movq %rax, %r14
incl %r14d
movq %r15, %rdi
movq %r14, %rsi
callq 0x92056
testq %rax, %rax
je 0x8832d
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0xe370
movl (%rsp), %r14d
movq %r15, %rdi
movq %r14, %rsi
callq 0x92056
testq %rax, %rax
je 0x88336
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xe370
movq %r15, %rdi
movq %rbx, %rsi
movl $0x10, %edx
xorl %ecx, %ecx
callq 0x86f61
movl (%rsp), %eax
movl %eax, 0x108(%rbx)
movq %rbp, 0xf8(%rbx)
movq %r13, 0x100(%rbx)
movl 0x4(%rsp), %eax
movb %al, 0x10c(%rbx)
orb $0x10, 0xe4(%rbx)
orb $0x10, 0x9(%rbx)
jmp 0x88273
leaq 0x24356(%rip), %rsi     # 0xac68a
jmp 0x88348
movq %r15, %rdi
movq %rbp, %rsi
callq 0x92016
leaq 0x2436c(%rip), %rsi     # 0xac6b4
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9214d
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_tIME
void PNGAPI
png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
{
   png_debug1(1, "in %s storage function", "tIME");

   if (png_ptr == NULL || info_ptr == NULL ||
       (png_ptr->mode & PNG_WROTE_tIME))
      return;

   png_memcpy(&(info_ptr->mod_time), mod_time, png_sizeof(png_time));
   info_ptr->valid |= PNG_INFO_tIME;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x88672
testb $0x2, 0x11d(%rdi)
jne 0x88672
movq (%rdx), %rax
movq %rax, 0x50(%rsi)
orb $0x2, 0x9(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_tRNS
void PNGAPI
png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
   png_bytep trans_alpha, int num_trans, png_color_16p trans_color)
{
   png_debug1(1, "in %s storage function", "tRNS");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

   if (trans_alpha != NULL)
   {
       /* It may not actually be necessary to set png_ptr->trans_alpha here;
        * we do it for backward compatibility with the way the png_handle_tRNS
        * function used to do the allocation.
        */

       png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);

       /* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */
       png_ptr->trans_alpha = info_ptr->trans_alpha = (png_bytep)png_malloc(png_ptr,
           (png_size_t)PNG_MAX_PALETTE_LENGTH);
       if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH)
          png_memcpy(info_ptr->trans_alpha, trans_alpha, (png_size_t)num_trans);
   }

   if (trans_color != NULL)
   {
      int sample_max = (1 << info_ptr->bit_depth);
      if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
          (int)trans_color->gray > sample_max) ||
          (info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
          ((int)trans_color->red > sample_max ||
          (int)trans_color->green > sample_max ||
          (int)trans_color->blue > sample_max)))
         png_warning(png_ptr,
            "tRNS chunk has out-of-range samples for bit_depth");
      png_memcpy(&(info_ptr->trans_color), trans_color,
         png_sizeof(png_color_16));
      if (num_trans == 0)
         num_trans = 1;
   }

   info_ptr->num_trans = (png_uint_16)num_trans;
   if (num_trans != 0)
   {
      info_ptr->valid |= PNG_INFO_tRNS;
      info_ptr->free_me |= PNG_FREE_TRNS;
   }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, %r14d
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x8876e
movq %r8, %r15
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r12
testq %rdx, %rdx
je 0x886e9
movq %r12, %rdi
movq %rbx, %rsi
movl $0x2000, %edx           # imm = 0x2000
xorl %ecx, %ecx
callq 0x86f61
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
callq 0x91fa8
movq %rax, 0x60(%rbx)
movq %rax, 0x2d8(%r12)
leal -0x1(%r14), %ecx
cmpl $0xff, %ecx
ja 0x886e9
movl %r14d, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0xe370
testq %r15, %r15
je 0x88710
movb 0x24(%rbx), %cl
movl $0x1, %eax
shll %cl, %eax
movzbl 0x25(%rbx), %ecx
cmpl $0x2, %ecx
je 0x8871c
testl %ecx, %ecx
jne 0x88746
movzwl 0x8(%r15), %ecx
cmpl %ecx, %eax
jl 0x88737
jmp 0x88746
movw %r14w, 0x22(%rbx)
testl %r14d, %r14d
jne 0x88763
jmp 0x8876e
movzwl 0x2(%r15), %ecx
cmpl %ecx, %eax
jl 0x88737
movzwl 0x4(%r15), %ecx
cmpl %ecx, %eax
jb 0x88737
movzwl 0x6(%r15), %ecx
cmpl %ecx, %eax
jae 0x88746
leaq 0x23fc4(%rip), %rsi     # 0xac702
movq %r12, %rdi
callq 0x9214d
movzwl 0x8(%r15), %eax
movw %ax, 0x70(%rbx)
movq (%r15), %rax
movq %rax, 0x68(%rbx)
cmpl $0x1, %r14d
adcl $0x0, %r14d
movw %r14w, 0x22(%rbx)
orb $0x10, 0x8(%rbx)
orb $0x20, 0xe5(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_rows
void PNGAPI
png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
{
   png_debug1(1, "in %s storage function", "rows");

   if (png_ptr == NULL || info_ptr == NULL)
      return;

   if (info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers))
      png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);
   info_ptr->row_pointers = row_pointers;
   if (row_pointers)
      info_ptr->valid |= PNG_INFO_IDAT;
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x891bf
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq 0x140(%rsi), %rax
testq %rax, %rax
sete %cl
cmpq %rdx, %rax
sete %al
orb %cl, %al
jne 0x891a8
movq %rbx, %rsi
movl $0x40, %edx
xorl %ecx, %ecx
callq 0x86f61
movq %r14, 0x140(%rbx)
testq %r14, %r14
je 0x891b8
orb $-0x80, 0x9(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_compression_buffer_size
void PNGAPI
png_set_compression_buffer_size(png_structp png_ptr,
    png_size_t size)
{
    if (png_ptr == NULL)
       return;
    png_free(png_ptr, png_ptr->zbuf);
    png_ptr->zbuf_size = size;
    png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size);
    png_ptr->zstream.next_out = png_ptr->zbuf;
    png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
}

// Assembly:
testq %rdi, %rdi
je 0x8920e
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x198(%rdi), %rsi
callq 0x92016
movq %r14, 0x1a0(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x91fa8
movq %rax, 0x198(%rbx)
movq %rax, 0x140(%rbx)
movl 0x1a0(%rbx), %eax
movl %eax, 0x148(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_bKGD
png_uint_32 PNGAPI
png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
   png_color_16p *background)
{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)
      && background != NULL)
   {
      png_debug1(1, "in %s retrieval function", "bKGD");

      *background = &(info_ptr->background);
      return (PNG_INFO_bKGD);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dil
xorl %eax, %eax
orb %cl, %dil
jne 0x894ee
testq %rdx, %rdx
je 0x894ee
movl 0x8(%rsi), %ecx
andl $0x20, %ecx
je 0x894ee
addq $0x72, %rsi
movq %rsi, (%rdx)
movl $0x20, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_cHRM
png_uint_32 PNGAPI
png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
   double *white_x, double *white_y, double *red_x, double *red_y,
   double *green_x, double *green_y, double *blue_x, double *blue_y)
{
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
   {
      png_debug1(1, "in %s retrieval function", "cHRM");

      if (white_x != NULL)
         *white_x = (double)info_ptr->x_white;
      if (white_y != NULL)
         *white_y = (double)info_ptr->y_white;
      if (red_x != NULL)
         *red_x = (double)info_ptr->x_red;
      if (red_y != NULL)
         *red_y = (double)info_ptr->y_red;
      if (green_x != NULL)
         *green_x = (double)info_ptr->x_green;
      if (green_y != NULL)
         *green_y = (double)info_ptr->y_green;
      if (blue_x != NULL)
         *blue_x = (double)info_ptr->x_blue;
      if (blue_y != NULL)
         *blue_y = (double)info_ptr->y_blue;
      return (PNG_INFO_cHRM);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %dil
testq %rsi, %rsi
sete %r10b
xorl %eax, %eax
orb %dil, %r10b
jne 0x895ca
testb $0x4, 0x8(%rsi)
je 0x895ca
testq %rdx, %rdx
je 0x89523
cvtss2sd 0xa0(%rsi), %xmm0
movsd %xmm0, (%rdx)
testq %rcx, %rcx
je 0x89537
xorps %xmm0, %xmm0
cvtss2sd 0xa4(%rsi), %xmm0
movsd %xmm0, (%rcx)
testq %r8, %r8
je 0x8954c
xorps %xmm0, %xmm0
cvtss2sd 0xa8(%rsi), %xmm0
movsd %xmm0, (%r8)
movq 0x8(%rsp), %rax
testq %r9, %r9
je 0x89566
xorps %xmm0, %xmm0
cvtss2sd 0xac(%rsi), %xmm0
movsd %xmm0, (%r9)
movq 0x10(%rsp), %rcx
testq %rax, %rax
je 0x8957f
xorps %xmm0, %xmm0
cvtss2sd 0xb0(%rsi), %xmm0
movsd %xmm0, (%rax)
movq 0x18(%rsp), %rax
testq %rcx, %rcx
je 0x89598
xorps %xmm0, %xmm0
cvtss2sd 0xb4(%rsi), %xmm0
movsd %xmm0, (%rcx)
movq 0x20(%rsp), %rcx
testq %rax, %rax
je 0x895b1
xorps %xmm0, %xmm0
cvtss2sd 0xb8(%rsi), %xmm0
movsd %xmm0, (%rax)
movl $0x4, %eax
testq %rcx, %rcx
je 0x895ca
xorps %xmm0, %xmm0
cvtss2sd 0xbc(%rsi), %xmm0
movsd %xmm0, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_cHRM_fixed
png_uint_32 PNGAPI
png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
   png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x,
   png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y,
   png_fixed_point *blue_x, png_fixed_point *blue_y)
{
   png_debug1(1, "in %s retrieval function", "cHRM");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
   {
      if (white_x != NULL)
         *white_x = info_ptr->int_x_white;
      if (white_y != NULL)
         *white_y = info_ptr->int_y_white;
      if (red_x != NULL)
         *red_x = info_ptr->int_x_red;
      if (red_y != NULL)
         *red_y = info_ptr->int_y_red;
      if (green_x != NULL)
         *green_x = info_ptr->int_x_green;
      if (green_y != NULL)
         *green_y = info_ptr->int_y_green;
      if (blue_x != NULL)
         *blue_x = info_ptr->int_x_blue;
      if (blue_y != NULL)
         *blue_y = info_ptr->int_y_blue;
      return (PNG_INFO_cHRM);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %dil
testq %rsi, %rsi
sete %r10b
xorl %eax, %eax
orb %dil, %r10b
jne 0x89671
testb $0x4, 0x8(%rsi)
je 0x89671
testq %rdx, %rdx
je 0x895fb
movl 0x14c(%rsi), %eax
movl %eax, (%rdx)
testq %rcx, %rcx
je 0x89608
movl 0x150(%rsi), %eax
movl %eax, (%rcx)
testq %r8, %r8
je 0x89616
movl 0x154(%rsi), %eax
movl %eax, (%r8)
movq 0x8(%rsp), %rax
testq %r9, %r9
je 0x89629
movl 0x158(%rsi), %ecx
movl %ecx, (%r9)
movq 0x10(%rsp), %rcx
testq %rax, %rax
je 0x8963b
movl 0x15c(%rsi), %edx
movl %edx, (%rax)
movq 0x18(%rsp), %rax
testq %rcx, %rcx
je 0x8964d
movl 0x160(%rsi), %edx
movl %edx, (%rcx)
movq 0x20(%rsp), %rcx
testq %rax, %rax
je 0x8965f
movl 0x164(%rsi), %edx
movl %edx, (%rax)
movl $0x4, %eax
testq %rcx, %rcx
je 0x89671
movl 0x168(%rsi), %edx
movl %edx, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_gAMA
png_uint_32 PNGAPI
png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
{
   png_debug1(1, "in %s retrieval function", "gAMA");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
      && file_gamma != NULL)
   {
      *file_gamma = (double)info_ptr->gamma;
      return (PNG_INFO_gAMA);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dil
xorl %eax, %eax
orb %cl, %dil
jne 0x896a1
testq %rdx, %rdx
je 0x896a1
movl 0x8(%rsi), %ecx
andl $0x1, %ecx
je 0x896a1
cvtss2sd 0x34(%rsi), %xmm0
movsd %xmm0, (%rdx)
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_gAMA_fixed
png_uint_32 PNGAPI
png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
    png_fixed_point *int_file_gamma)
{
   png_debug1(1, "in %s retrieval function", "gAMA");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
      && int_file_gamma != NULL)
   {
      *int_file_gamma = info_ptr->int_gamma;
      return (PNG_INFO_gAMA);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dil
xorl %eax, %eax
orb %cl, %dil
jne 0x896d0
testq %rdx, %rdx
je 0x896d0
movl 0x8(%rsi), %ecx
andl $0x1, %ecx
je 0x896d0
movl 0x148(%rsi), %eax
movl %eax, (%rdx)
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_sRGB
png_uint_32 PNGAPI
png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
{
   png_debug1(1, "in %s retrieval function", "sRGB");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)
      && file_srgb_intent != NULL)
   {
      *file_srgb_intent = (int)info_ptr->srgb_intent;
      return (PNG_INFO_sRGB);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dil
xorl %eax, %eax
orb %cl, %dil
jne 0x896ff
testq %rdx, %rdx
je 0x896ff
movl $0x800, %ecx            # imm = 0x800
andl 0x8(%rsi), %ecx
je 0x896ff
movzbl 0x38(%rsi), %eax
movl %eax, (%rdx)
movl $0x800, %eax            # imm = 0x800
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_iCCP
png_uint_32 PNGAPI
png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
             png_charpp name, int *compression_type,
             png_charpp profile, png_uint_32 *proflen)
{
   png_debug1(1, "in %s retrieval function", "iCCP");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)
      && name != NULL && profile != NULL && proflen != NULL)
   {
      *name = info_ptr->iccp_name;
      *profile = info_ptr->iccp_profile;
      /* Compression_type is a dummy so the API won't have to change
       * if we introduce multiple compression types later.
       */
      *proflen = (int)info_ptr->iccp_proflen;
      *compression_type = (int)info_ptr->iccp_compression;
      return (PNG_INFO_iCCP);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %dil
testq %rsi, %rsi
sete %r10b
xorl %eax, %eax
orb %dil, %r10b
jne 0x89759
testq %r9, %r9
je 0x89759
testq %r8, %r8
je 0x89759
testq %rdx, %rdx
je 0x89759
movl $0x1000, %edi           # imm = 0x1000
andl 0x8(%rsi), %edi
je 0x89759
movq 0xf8(%rsi), %rax
movq %rax, (%rdx)
movq 0x100(%rsi), %rax
movq %rax, (%r8)
movl 0x108(%rsi), %eax
movl %eax, (%r9)
movzbl 0x10c(%rsi), %eax
movl %eax, (%rcx)
movl $0x1000, %eax           # imm = 0x1000
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_hIST
png_uint_32 PNGAPI
png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
{
   png_debug1(1, "in %s retrieval function", "hIST");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)
      && hist != NULL)
   {
      *hist = info_ptr->hist;
      return (PNG_INFO_hIST);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dil
xorl %eax, %eax
orb %cl, %dil
jne 0x897b7
testq %rdx, %rdx
je 0x897b7
movl 0x8(%rsi), %ecx
andl $0x40, %ecx
je 0x897b7
movq 0x98(%rsi), %rax
movq %rax, (%rdx)
movl $0x40, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_IHDR
png_uint_32 PNGAPI
png_get_IHDR(png_structp png_ptr, png_infop info_ptr,
   png_uint_32 *width, png_uint_32 *height, int *bit_depth,
   int *color_type, int *interlace_type, int *compression_type,
   int *filter_type)

{
   png_debug1(1, "in %s retrieval function", "IHDR");

   if (png_ptr == NULL || info_ptr == NULL || width == NULL ||
       height == NULL || bit_depth == NULL || color_type == NULL)
      return (0);

   *width = info_ptr->width;
   *height = info_ptr->height;
   *bit_depth = info_ptr->bit_depth;
   *color_type = info_ptr->color_type;

   if (compression_type != NULL)
      *compression_type = info_ptr->compression_type;

   if (filter_type != NULL)
      *filter_type = info_ptr->filter_type;

   if (interlace_type != NULL)
      *interlace_type = info_ptr->interlace_type;

   /* This is redundant if we can be sure that the info_ptr values were all
    * assigned in png_set_IHDR().  We do the check anyhow in case an
    * application has ignored our advice not to mess with the members
    * of info_ptr directly.
    */
   png_check_IHDR (png_ptr, info_ptr->width, info_ptr->height,
       info_ptr->bit_depth, info_ptr->color_type, info_ptr->interlace_type,
       info_ptr->compression_type, info_ptr->filter_type);

   return (1);
}

// Assembly:
movq %rsi, %xmm0
movq %rdi, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %rcx, %xmm0
movq %rdx, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
testq %r8, %r8
sete %al
testq %r9, %r9
sete %r10b
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm0
shufps $0xdd, %xmm2, %xmm0     # xmm0 = xmm0[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm0, %xmm1
movmskps %xmm1, %r11d
testl %r11d, %r11d
setne %r11b
orb %al, %r10b
xorl %eax, %eax
orb %r11b, %r10b
jne 0x89888
pushq %rax
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %r10
movl (%rsi), %r11d
movl %r11d, (%rdx)
movl 0x4(%rsi), %edx
movl %edx, (%rcx)
movzbl 0x24(%rsi), %ecx
movl %ecx, (%r8)
movzbl 0x25(%rsi), %r8d
movl %r8d, (%r9)
testq %r10, %r10
je 0x89842
movzbl 0x26(%rsi), %edx
movl %edx, (%r10)
movq 0x10(%rsp), %rdx
testq %rax, %rax
je 0x89854
movzbl 0x27(%rsi), %r9d
movl %r9d, (%rax)
movzbl 0x28(%rsi), %r9d
testq %rdx, %rdx
je 0x89861
movl %r9d, (%rdx)
movl (%rsi), %eax
movl 0x4(%rsi), %edx
movzbl 0x26(%rsi), %r10d
movzbl 0x27(%rsi), %r11d
movl %eax, %esi
pushq %r11
pushq %r10
callq 0x87742
addq $0x10, %rsp
movl $0x1, %eax
addq $0x8, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_oFFs
png_uint_32 PNGAPI
png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
   png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
{
   png_debug1(1, "in %s retrieval function", "oFFs");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
      && offset_x != NULL && offset_y != NULL && unit_type != NULL)
   {
      *offset_x = info_ptr->x_offset;
      *offset_y = info_ptr->y_offset;
      *unit_type = (int)info_ptr->offset_unit_type;
      return (PNG_INFO_oFFs);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %dil
testq %rsi, %rsi
sete %r9b
xorl %eax, %eax
orb %dil, %r9b
jne 0x898d3
testq %r8, %r8
je 0x898d3
testq %rcx, %rcx
je 0x898d3
testq %rdx, %rdx
je 0x898d3
movl $0x100, %edi            # imm = 0x100
andl 0x8(%rsi), %edi
je 0x898d3
movl 0x7c(%rsi), %eax
movl %eax, (%rdx)
movl 0x80(%rsi), %eax
movl %eax, (%rcx)
movzbl 0x84(%rsi), %eax
movl %eax, (%r8)
movl $0x100, %eax            # imm = 0x100
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_pCAL
png_uint_32 PNGAPI
png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
   png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams,
   png_charp *units, png_charpp *params)
{
   png_debug1(1, "in %s retrieval function", "pCAL");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL)
       && purpose != NULL && X0 != NULL && X1 != NULL && type != NULL &&
       nparams != NULL && units != NULL && params != NULL)
   {
      *purpose = info_ptr->pcal_purpose;
      *X0 = info_ptr->pcal_X0;
      *X1 = info_ptr->pcal_X1;
      *type = (int)info_ptr->pcal_type;
      *nparams = (int)info_ptr->pcal_nparams;
      *units = info_ptr->pcal_units;
      *params = info_ptr->pcal_params;
      return (PNG_INFO_pCAL);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %dil
testq %rsi, %rsi
sete %r10b
xorl %eax, %eax
orb %dil, %r10b
jne 0x8999c
movq %rcx, %xmm0
movq %rdx, %xmm1
punpcklqdq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0]
movq %r9, %xmm0
movq %r8, %xmm2
punpcklqdq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0]
pxor %xmm0, %xmm0
pcmpeqd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
movdqa %xmm1, %xmm0
shufps $0xdd, %xmm2, %xmm0     # xmm0 = xmm0[1,3],xmm2[1,3]
shufps $0x88, %xmm2, %xmm1     # xmm1 = xmm1[0,2],xmm2[0,2]
andps %xmm0, %xmm1
movmskps %xmm1, %edi
testl %edi, %edi
jne 0x8999c
pushq %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8999b
movq 0x18(%rsp), %r10
testq %r10, %r10
je 0x8999b
movq 0x20(%rsp), %r11
testq %r11, %r11
je 0x8999b
movl $0x400, %ebx            # imm = 0x400
andl 0x8(%rsi), %ebx
je 0x8999b
movq 0xc0(%rsi), %rax
movq %rax, (%rdx)
movl 0xc8(%rsi), %eax
movl %eax, (%rcx)
movl 0xcc(%rsi), %eax
movl %eax, (%r8)
movzbl 0xe0(%rsi), %eax
movl %eax, (%r9)
movzbl 0xe1(%rsi), %eax
movl %eax, (%rdi)
movq 0xd0(%rsi), %rax
movq %rax, (%r10)
movq 0xd8(%rsi), %rax
movq %rax, (%r11)
movl $0x400, %eax            # imm = 0x400
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_sCAL
png_uint_32 PNGAPI
png_get_sCAL(png_structp png_ptr, png_infop info_ptr,
             int *unit, double *width, double *height)
{
    if (png_ptr != NULL && info_ptr != NULL &&
        (info_ptr->valid & PNG_INFO_sCAL))
    {
        *unit = info_ptr->scal_unit;
        *width = info_ptr->scal_pixel_width;
        *height = info_ptr->scal_pixel_height;
        return (PNG_INFO_sCAL);
    }
    return(0);
}

// Assembly:
testq %rdi, %rdi
sete %dil
testq %rsi, %rsi
sete %r9b
xorl %eax, %eax
orb %dil, %r9b
jne 0x899df
testb $0x40, 0x9(%rsi)
je 0x899df
movzbl 0x11c(%rsi), %eax
movl %eax, (%rdx)
movsd 0x120(%rsi), %xmm0
movsd %xmm0, (%rcx)
movsd 0x128(%rsi), %xmm0
movsd %xmm0, (%r8)
movl $0x4000, %eax           # imm = 0x4000
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_PLTE
png_uint_32 PNGAPI
png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
   int *num_palette)
{
   png_debug1(1, "in %s retrieval function", "PLTE");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_PLTE)
       && palette != NULL)
   {
      *palette = info_ptr->palette;
      *num_palette = info_ptr->num_palette;
      png_debug1(3, "num_palette = %d", *num_palette);
      return (PNG_INFO_PLTE);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %dil
testq %rsi, %rsi
sete %r8b
xorl %eax, %eax
orb %dil, %r8b
jne 0x89a6c
testq %rdx, %rdx
je 0x89a6c
movl 0x8(%rsi), %edi
andl $0x8, %edi
je 0x89a6c
movq 0x18(%rsi), %rax
movq %rax, (%rdx)
movzwl 0x20(%rsi), %eax
movl %eax, (%rcx)
movl $0x8, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_sBIT
png_uint_32 PNGAPI
png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
{
   png_debug1(1, "in %s retrieval function", "sBIT");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)
      && sig_bit != NULL)
   {
      *sig_bit = &(info_ptr->sig_bit);
      return (PNG_INFO_sBIT);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dil
xorl %eax, %eax
orb %cl, %dil
jne 0x89a9a
testq %rdx, %rdx
je 0x89a9a
movl 0x8(%rsi), %ecx
andl $0x2, %ecx
je 0x89a9a
addq $0x58, %rsi
movq %rsi, (%rdx)
movl $0x2, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_text
png_uint_32 PNGAPI
png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
   int *num_text)
{
   if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)
   {
      png_debug1(1, "in %s retrieval function",
         (png_ptr->chunk_name[0] == '\0' ? "text"
             : (png_const_charp)png_ptr->chunk_name));

      if (text_ptr != NULL)
         *text_ptr = info_ptr->text;

      if (num_text != NULL)
         *num_text = info_ptr->num_text;

      return ((png_uint_32)info_ptr->num_text);
   }
   if (num_text != NULL)
     *num_text = 0;
   return(0);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %dil
orb %al, %dil
jne 0x89acb
movl 0x3c(%rsi), %eax
testl %eax, %eax
jle 0x89acb
testq %rdx, %rdx
je 0x89ac0
movq 0x48(%rsi), %rdi
movq %rdi, (%rdx)
testq %rcx, %rcx
je 0x89ad8
movl %eax, (%rcx)
movl 0x3c(%rsi), %eax
retq
xorl %eax, %eax
testq %rcx, %rcx
je 0x89ad8
movl $0x0, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_tIME
png_uint_32 PNGAPI
png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
{
   png_debug1(1, "in %s retrieval function", "tIME");

   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME)
       && mod_time != NULL)
   {
      *mod_time = &(info_ptr->mod_time);
      return (PNG_INFO_tIME);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dil
xorl %eax, %eax
orb %cl, %dil
jne 0x89b08
testq %rdx, %rdx
je 0x89b08
movl $0x200, %ecx            # imm = 0x200
andl 0x8(%rsi), %ecx
je 0x89b08
addq $0x50, %rsi
movq %rsi, (%rdx)
movl $0x200, %eax            # imm = 0x200
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_tRNS
png_uint_32 PNGAPI
png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
   png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)
{
   png_uint_32 retval = 0;
   if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
   {
      png_debug1(1, "in %s retrieval function", "tRNS");

      if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
      {
          if (trans_alpha != NULL)
          {
             *trans_alpha = info_ptr->trans_alpha;
             retval |= PNG_INFO_tRNS;
          }

          if (trans_color != NULL)
             *trans_color = &(info_ptr->trans_color);
      }
      else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */
      {
          if (trans_color != NULL)
          {
             *trans_color = &(info_ptr->trans_color);
             retval |= PNG_INFO_tRNS;
          }

          if (trans_alpha != NULL)
             *trans_alpha = NULL;
      }
      if (num_trans != NULL)
      {
         *num_trans = info_ptr->num_trans;
         retval |= PNG_INFO_tRNS;
      }
   }
   return (retval);
}

// Assembly:
testq %rdi, %rdi
sete %dil
testq %rsi, %rsi
sete %r9b
xorl %eax, %eax
orb %dil, %r9b
jne 0x89b7e
testb $0x10, 0x8(%rsi)
je 0x89b7e
cmpb $0x3, 0x25(%rsi)
jne 0x89b3d
testq %rdx, %rdx
je 0x89b50
movq 0x60(%rsi), %rax
movq %rax, (%rdx)
movl $0x10, %eax
jmp 0x89b52
testq %r8, %r8
je 0x89b60
leaq 0x68(%rsi), %rax
movq %rax, (%r8)
movl $0x10, %eax
jmp 0x89b62
xorl %eax, %eax
testq %r8, %r8
je 0x89b6e
leaq 0x68(%rsi), %rdx
movq %rdx, (%r8)
jmp 0x89b6e
xorl %eax, %eax
testq %rdx, %rdx
je 0x89b6e
movq $0x0, (%rdx)
testq %rcx, %rcx
je 0x89b7e
movzwl 0x22(%rsi), %eax
movl %eax, (%rcx)
movl $0x10, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_unknown_chunks
png_uint_32 PNGAPI
png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
             png_unknown_chunkpp unknowns)
{
   if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL)
   {
     *unknowns = info_ptr->unknown_chunks;
     return ((png_uint_32)info_ptr->unknown_chunks_num);
   }
   return (0);
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
testq %rdx, %rdx
sete %dil
xorl %eax, %eax
orb %cl, %dil
jne 0x89bab
movq 0xe8(%rsi), %rax
movq %rax, (%rdx)
movl 0xf0(%rsi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngread.c
// Function: png_read_update_info
void PNGAPI
png_read_update_info(png_structp png_ptr, png_infop info_ptr)
{
   png_debug(1, "in png_read_update_info");
 
   if (png_ptr == NULL)
      return;
   if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
      png_read_start_row(png_ptr);
   else
      png_warning(png_ptr,
      "Ignoring extra png_read_update_info() call; row buffer not reallocated");

   png_read_transform_info(png_ptr, info_ptr);
}

// Assembly:
testq %rdi, %rdi
je 0x8a40b
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testb $0x40, 0x120(%rdi)
jne 0x8a40c
movq %r14, %rdi
callq 0x9d02a
jmp 0x8a41b
retq
leaq 0x22562(%rip), %rsi     # 0xac975
movq %r14, %rdi
callq 0x9214d
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x8e828
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngread.c
// Function: png_read_rows
void PNGAPI
png_read_rows(png_structp png_ptr, png_bytepp row,
   png_bytepp display_row, png_uint_32 num_rows)
{
   png_uint_32 i;
   png_bytepp rp;
   png_bytepp dp;

   png_debug(1, "in png_read_rows");
 
   if (png_ptr == NULL)
      return;
   rp = row;
   dp = display_row;
   if (rp != NULL && dp != NULL)
      for (i = 0; i < num_rows; i++)
      {
         png_bytep rptr = *rp++;
         png_bytep dptr = *dp++;

         png_read_row(png_ptr, rptr, dptr);
      }
   else if (rp != NULL)
      for (i = 0; i < num_rows; i++)
      {
         png_bytep rptr = *rp;
         png_read_row(png_ptr, rptr, NULL);
         rp++;
      }
   else if (dp != NULL)
      for (i = 0; i < num_rows; i++)
      {
         png_bytep dptr = *dp;
         png_read_row(png_ptr, NULL, dptr);
         dp++;
      }
}

// Assembly:
testq %rdi, %rdi
je 0x8a951
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
testq %rsi, %rsi
sete %al
testq %rdx, %rdx
sete %dl
orb %al, %dl
jne 0x8a8f6
testl %ecx, %ecx
je 0x8a948
movl %ecx, %r12d
xorl %r13d, %r13d
movq (%r15,%r13,8), %rsi
movq (%r14,%r13,8), %rdx
movq %rbx, %rdi
callq 0x8a440
incq %r13
cmpl %r13d, %r12d
jne 0x8a8dc
jmp 0x8a948
testq %r15, %r15
je 0x8a91d
testl %ecx, %ecx
je 0x8a948
movl %ecx, %r14d
xorl %r12d, %r12d
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x8a440
incq %r12
cmpl %r12d, %r14d
jne 0x8a905
jmp 0x8a948
testq %r14, %r14
sete %al
testl %ecx, %ecx
sete %dl
orb %al, %dl
jne 0x8a948
movl %ecx, %r15d
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8a440
incq %r12
cmpl %r12d, %r15d
jne 0x8a932
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngread.c
// Function: png_read_image
void PNGAPI
png_read_image(png_structp png_ptr, png_bytepp image)
{
   png_uint_32 i, image_height;
   int pass, j;
   png_bytepp rp;

   png_debug(1, "in png_read_image");
 
   if (png_ptr == NULL)
      return;

#ifdef PNG_READ_INTERLACING_SUPPORTED
   pass = png_set_interlace_handling(png_ptr);
#else
   if (png_ptr->interlaced)
      png_error(png_ptr,
        "Cannot read interlaced image -- interlace handler disabled");
   pass = 1;
#endif


   image_height=png_ptr->height;
   png_ptr->num_rows = image_height; /* Make sure this is set correctly */

   for (j = 0; j < pass; j++)
   {
      rp = image;
      for (i = 0; i < image_height; i++)
      {
         png_read_row(png_ptr, *rp, NULL);
         rp++;
      }
   }
}

// Assembly:
testq %rdi, %rdi
je 0x8a9b8
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x9d38c
movl 0x1c0(%r14), %r15d
movl %r15d, 0x1c4(%r14)
testl %eax, %eax
jle 0x8a9aa
movl %eax, %ebp
xorl %r12d, %r12d
testq %r15, %r15
je 0x8a9a2
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x8a440
incq %r13
cmpl %r13d, %r15d
jne 0x8a98c
incl %r12d
cmpl %ebp, %r12d
jne 0x8a984
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngread.c
// Function: png_destroy_read_struct
void PNGAPI
png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
   png_infopp end_info_ptr_ptr)
{
   png_structp png_ptr = NULL;
   png_infop info_ptr = NULL, end_info_ptr = NULL;
#ifdef PNG_USER_MEM_SUPPORTED
   png_free_ptr free_fn = NULL;
   png_voidp mem_ptr = NULL;
#endif

   png_debug(1, "in png_destroy_read_struct");
 
   if (png_ptr_ptr != NULL)
      png_ptr = *png_ptr_ptr;
   if (png_ptr == NULL)
      return;

#ifdef PNG_USER_MEM_SUPPORTED
   free_fn = png_ptr->free_fn;
   mem_ptr = png_ptr->mem_ptr;
#endif

   if (info_ptr_ptr != NULL)
      info_ptr = *info_ptr_ptr;

   if (end_info_ptr_ptr != NULL)
      end_info_ptr = *end_info_ptr_ptr;

   png_read_destroy(png_ptr, info_ptr, end_info_ptr);

   if (info_ptr != NULL)
   {
#ifdef PNG_TEXT_SUPPORTED
      png_free_data(png_ptr, info_ptr, PNG_FREE_TEXT, -1);
#endif

#ifdef PNG_USER_MEM_SUPPORTED
      png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn,
          (png_voidp)mem_ptr);
#else
      png_destroy_struct((png_voidp)info_ptr);
#endif
      *info_ptr_ptr = NULL;
   }

   if (end_info_ptr != NULL)
   {
#ifdef PNG_READ_TEXT_SUPPORTED
      png_free_data(png_ptr, end_info_ptr, PNG_FREE_TEXT, -1);
#endif
#ifdef PNG_USER_MEM_SUPPORTED
      png_destroy_struct_2((png_voidp)end_info_ptr, (png_free_ptr)free_fn,
         (png_voidp)mem_ptr);
#else
      png_destroy_struct((png_voidp)end_info_ptr);
#endif
      *end_info_ptr_ptr = NULL;
   }

   if (png_ptr != NULL)
   {
#ifdef PNG_USER_MEM_SUPPORTED
      png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn,
          (png_voidp)mem_ptr);
#else
      png_destroy_struct((png_voidp)png_ptr);
#endif
      *png_ptr_ptr = NULL;
   }
}

// Assembly:
testq %rdi, %rdi
je 0x8ae04
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq (%rdi), %r15
testq %r15, %r15
je 0x8adf6
movq %rsi, %r12
testq %rsi, %rsi
je 0x8ad41
movq (%r12), %rbp
jmp 0x8ad43
xorl %ebp, %ebp
testq %rdx, %rdx
movq %rdx, 0x10(%rsp)
je 0x8ad52
movq (%rdx), %r13
jmp 0x8ad55
xorl %r13d, %r13d
movq 0x418(%r15), %r14
movq 0x428(%r15), %rax
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x8ae05
testq %rbp, %rbp
je 0x8ada8
movq %r15, %rdi
movq %rbp, %rsi
movl $0x4000, %edx           # imm = 0x4000
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x86f61
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x91f57
movq $0x0, (%r12)
testq %r13, %r13
movq 0x8(%rsp), %r12
je 0x8ade1
movq %r15, %rdi
movq %r13, %rsi
movl $0x4000, %edx           # imm = 0x4000
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x86f61
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x91f57
movq 0x10(%rsp), %rax
movq $0x0, (%rax)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x91f57
movq $0x0, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngrio.c
// Function: png_default_read_data
void PNGAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
   png_size_t check;

   if (png_ptr == NULL)
      return;
   /* fread() returns 0 on error, so it is OK to store this in a png_size_t
    * instead of an int, which is what fread() actually returns.
    */
   check = fread(data, 1, length, (png_FILE_p)png_ptr->io_ptr);

   if (check != length)
      png_error(png_ptr, "Read Error");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x8b345
movq %rdx, %r14
movq %rsi, %rax
movq %rdi, %rbx
movq 0xf8(%rdi), %rcx
movl $0x1, %esi
movq %rax, %rdi
callq 0xe6c0
cmpq %r14, %rax
jne 0x8b34d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x21734(%rip), %rsi     # 0xaca88
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x920b4
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngwrite.c
// Function: png_write_rows
void PNGAPI
png_write_rows(png_structp png_ptr, png_bytepp row,
   png_uint_32 num_rows)
{
   png_uint_32 i; /* row counter */
   png_bytepp rp; /* row pointer */

   png_debug(1, "in png_write_rows");

   if (png_ptr == NULL)
      return;

   /* Loop through the rows */
   for (i = 0, rp = row; i < num_rows; i++, rp++)
   {
      png_write_row(png_ptr, *rp);
   }
}

// Assembly:
testq %rdi, %rdi
sete %al
testl %edx, %edx
sete %cl
orb %al, %cl
jne 0x8bfc6
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x8bfc7
incq %r12
cmpl %r12d, %r15d
jne 0x8bfa7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq