LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c6cb
testq %r8, %r8
je 0x7c6cb
testq %rcx, %rcx
je 0x7c6cb
testq %rdx, %rdx
je 0x7c6cb
movl $0x100, %edi            # imm = 0x100
andl 0x8(%rsi), %edi
je 0x7c6cb
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_O2/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 0x7c794
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 0x7c794
pushq %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x7c793
movq 0x18(%rsp), %r10
testq %r10, %r10
je 0x7c793
movq 0x20(%rsp), %r11
testq %r11, %r11
je 0x7c793
movl $0x400, %ebx            # imm = 0x400
andl 0x8(%rsi), %ebx
je 0x7c793
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_O2/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 0x7c7d7
testb $0x40, 0x9(%rsi)
je 0x7c7d7
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_O2/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 0x7c862
testq %rdx, %rdx
je 0x7c862
movl 0x8(%rsi), %edi
andl $0x8, %edi
je 0x7c862
movq 0x18(%rsi), %rax
movq %rax, (%rdx)
movzwl 0x20(%rsi), %eax
movl %eax, (%rcx)
pushq $0x8
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c88e
testq %rdx, %rdx
je 0x7c88e
movl 0x8(%rsi), %ecx
andl $0x2, %ecx
je 0x7c88e
addq $0x58, %rsi
movq %rsi, (%rdx)
pushq $0x2
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c8bf
movl 0x3c(%rsi), %eax
testl %eax, %eax
jle 0x7c8bf
testq %rdx, %rdx
je 0x7c8b4
movq 0x48(%rsi), %rdi
movq %rdi, (%rdx)
testq %rcx, %rcx
je 0x7c8c9
movl %eax, (%rcx)
movl 0x3c(%rsi), %eax
retq
xorl %eax, %eax
testq %rcx, %rcx
je 0x7c8c9
andl $0x0, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c8f9
testq %rdx, %rdx
je 0x7c8f9
movl $0x200, %ecx            # imm = 0x200
andl 0x8(%rsi), %ecx
je 0x7c8f9
addq $0x50, %rsi
movq %rsi, (%rdx)
movl $0x200, %eax            # imm = 0x200
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c966
testb $0x10, 0x8(%rsi)
je 0x7c966
cmpb $0x3, 0x25(%rsi)
jne 0x7c92c
testq %rdx, %rdx
je 0x7c93d
movq 0x60(%rsi), %rax
movq %rax, (%rdx)
pushq $0x10
popq %rax
jmp 0x7c93f
testq %r8, %r8
je 0x7c94d
pushq $0x10
popq %rax
leaq 0x68(%rsi), %rdi
movq %rdi, (%r8)
jmp 0x7c94f
xorl %eax, %eax
testq %r8, %r8
je 0x7c958
leaq 0x68(%rsi), %rdx
movq %rdx, (%r8)
jmp 0x7c958
xorl %eax, %eax
testq %rdx, %rdx
je 0x7c958
andq $0x0, (%rdx)
testq %rcx, %rcx
je 0x7c966
movzwl 0x22(%rsi), %eax
movl %eax, (%rcx)
pushq $0x10
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c993
movq 0xe8(%rsi), %rax
movq %rax, (%rdx)
movl 0xf0(%rsi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7d1c0
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testb $0x40, 0x120(%rdi)
jne 0x7d1c1
movq %r14, %rdi
callq 0x8e9df
jmp 0x7d1d0
retq
leaq 0x2048d(%rip), %rsi     # 0x9d655
movq %r14, %rdi
callq 0x84a53
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x81427
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7d6fc
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 0x7d6ad
movl %ecx, %r12d
xorl %r13d, %r13d
cmpl %r13d, %r12d
je 0x7d6f3
movq (%r15,%r13,8), %rsi
movq (%r14,%r13,8), %rdx
movq %rbx, %rdi
callq 0x7d1f5
incq %r13
jmp 0x7d693
testq %r15, %r15
je 0x7d6d0
movl %ecx, %r14d
xorl %r12d, %r12d
cmpl %r12d, %r14d
je 0x7d6f3
movq (%r15,%r12,8), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x7d1f5
incq %r12
jmp 0x7d6b8
testq %r14, %r14
je 0x7d6f3
movl %ecx, %r15d
xorl %r12d, %r12d
cmpl %r12d, %r15d
je 0x7d6f3
movq (%r14,%r12,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x7d1f5
incq %r12
jmp 0x7d6db
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7d764
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x8ed3c
movl %eax, %ebp
movl 0x1c0(%r14), %r15d
movl %r15d, 0x1c4(%r14)
xorl %r12d, %r12d
testl %eax, %eax
cmovlel %r12d, %ebp
cmpl %ebp, %r12d
je 0x7d756
xorl %r13d, %r13d
cmpl %r13d, %r15d
je 0x7d751
movq (%rbx,%r13,8), %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x7d1f5
incq %r13
jmp 0x7d739
incl %r12d
jmp 0x7d731
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7db97
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 0x7db89
movq %rsi, %r12
testq %rsi, %rsi
je 0x7dae1
movq (%r12), %rbp
jmp 0x7dae3
xorl %ebp, %ebp
testq %rdx, %rdx
movq %rdx, 0x10(%rsp)
je 0x7daf2
movq (%rdx), %r13
jmp 0x7daf5
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 0x7db98
testq %rbp, %rbp
je 0x7db43
pushq $-0x1
popq %rcx
movq %r15, %rdi
movq %rbp, %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0x7a3b5
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x8486a
andq $0x0, (%r12)
testq %r13, %r13
movq 0x8(%rsp), %r12
je 0x7db77
pushq $-0x1
popq %rcx
movq %r15, %rdi
movq %r13, %rsi
movl $0x4000, %edx           # imm = 0x4000
callq 0x7a3b5
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x8486a
movq 0x10(%rsp), %rax
andq $0x0, (%rax)
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x8486a
andq $0x0, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7e077
movq %rdx, %r14
movq %rdi, %rbx
movq 0xf8(%rdi), %rcx
pushq $0x1
popq %rax
movq %rsi, %rdi
movq %rax, %rsi
callq 0xe6f0
cmpq %r14, %rax
jne 0x7e07f
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x1f6e2(%rip), %rsi     # 0x9d768
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x849c0
// File: /workspace/github_cpp_makefile_star2_O2/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
je 0x7ecd0
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl %edx, %r15d
xorl %r12d, %r12d
cmpl %r12d, %r15d
je 0x7ecc5
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x7ecd1
incq %r12
jmp 0x7ecaf
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwrite.c
// Function: png_write_image
void PNGAPI
png_write_image(png_structp png_ptr, png_bytepp image)
{
   png_uint_32 i; /* row index */
   int pass, num_pass; /* pass variables */
   png_bytepp rp; /* points to current row */

   if (png_ptr == NULL)
      return;

   png_debug(1, "in png_write_image");

#ifdef PNG_WRITE_INTERLACING_SUPPORTED
   /* Initialize interlace handling.  If image is not interlaced,
    * this will set pass to 1
    */
   num_pass = png_set_interlace_handling(png_ptr);
#else
   num_pass = 1;
#endif
   /* Loop through passes */
   for (pass = 0; pass < num_pass; pass++)
   {
      /* Loop through image */
      for (i = 0, rp = image; i < png_ptr->height; i++, rp++)
      {
         png_write_row(png_ptr, *rp);
      }
   }
}

// Assembly:
testq %rdi, %rdi
je 0x7ef5b
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x8ed3c
movl %eax, %ebp
xorl %r15d, %r15d
testl %eax, %eax
cmovlel %r15d, %ebp
cmpl %ebp, %r15d
je 0x7ef53
xorl %r12d, %r12d
cmpl 0x1c0(%r14), %r12d
jae 0x7ef4e
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x7ecd1
incq %r12
jmp 0x7ef34
incl %r15d
jmp 0x7ef2c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwrite.c
// Function: png_write_flush
void PNGAPI
png_write_flush(png_structp png_ptr)
{
   int wrote_IDAT;

   png_debug(1, "in png_write_flush");

   if (png_ptr == NULL)
      return;
   /* We have already written out all of the data */
   if (png_ptr->row_number >= png_ptr->num_rows)
      return;

   do
   {
      int ret;

      /* Compress the data */
      ret = deflate(&png_ptr->zstream, Z_SYNC_FLUSH);
      wrote_IDAT = 0;

      /* Check for compression errors */
      if (ret != Z_OK)
      {
         if (png_ptr->zstream.msg != NULL)
            png_error(png_ptr, png_ptr->zstream.msg);
         else
            png_error(png_ptr, "zlib error");
      }

      if (!(png_ptr->zstream.avail_out))
      {
         /* Write the IDAT and reset the zlib output buffer */
         png_write_IDAT(png_ptr, png_ptr->zbuf,
                        png_ptr->zbuf_size);
         png_ptr->zstream.next_out = png_ptr->zbuf;
         png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
         wrote_IDAT = 1;
      }
   } while(wrote_IDAT == 1);

   /* If there is any data left to be output, write it into a new IDAT */
   if (png_ptr->zbuf_size != png_ptr->zstream.avail_out)
   {
      /* Write the IDAT and reset the zlib output buffer */
      png_write_IDAT(png_ptr, png_ptr->zbuf,
                     png_ptr->zbuf_size - png_ptr->zstream.avail_out);
      png_ptr->zstream.next_out = png_ptr->zbuf;
      png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
   }
   png_ptr->flush_rows = 0;
   png_flush(png_ptr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x7f002
movq %rdi, %rbx
movl 0x1e4(%rdi), %eax
cmpl 0x1c4(%rdi), %eax
jae 0x7f002
leaq 0x128(%rbx), %r14
pushq $0x2
popq %rbp
leaq 0x1e641(%rip), %r15     # 0x9d5e2
movq %r14, %rdi
movl %ebp, %esi
callq 0x856ed
testl %eax, %eax
je 0x7efc5
movq 0x158(%rbx), %rsi
testq %rsi, %rsi
cmoveq %r15, %rsi
movq %rbx, %rdi
callq 0x849c0
movl 0x148(%rbx), %eax
testq %rax, %rax
jne 0x7f00d
movq 0x198(%rbx), %rsi
movq 0x1a0(%rbx), %rdx
movq %rbx, %rdi
callq 0x8f7c6
movq 0x198(%rbx), %rax
movq %rax, 0x140(%rbx)
movl 0x1a0(%rbx), %eax
movl %eax, 0x148(%rbx)
jmp 0x7efa1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x1a0(%rbx), %rdx
subq %rax, %rdx
je 0x7f042
movq 0x198(%rbx), %rsi
movq %rbx, %rdi
callq 0x8f7c6
movq 0x198(%rbx), %rax
movq %rax, 0x140(%rbx)
movl 0x1a0(%rbx), %eax
movl %eax, 0x148(%rbx)
andl $0x0, 0x284(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9222f
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwrite.c
// Function: png_set_compression_window_bits
void PNGAPI
png_set_compression_window_bits(png_structp png_ptr, int window_bits)
{
   if (png_ptr == NULL)
      return;
   if (window_bits > 15)
      png_warning(png_ptr, "Only compression windows <= 32k supported by PNG");
   else if (window_bits < 8)
      png_warning(png_ptr, "Only compression windows >= 256 supported by PNG");
#ifndef WBITS_8_OK
   /* Avoid libpng bug with 256-byte windows */
   if (window_bits == 8)
     {
       png_warning(png_ptr, "Compression window is being reset to 512");
       window_bits = 9;
     }
#endif
   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS;
   png_ptr->zlib_window_bits = window_bits;
}

// Assembly:
testq %rdi, %rdi
je 0x7f4f5
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0xf, %esi
jle 0x7f4c0
leaq 0x1e4d9(%rip), %rsi     # 0x9d997
jmp 0x7f4da
cmpl $0x8, %ebp
jge 0x7f4ce
leaq 0x1e4fc(%rip), %rsi     # 0x9d9c8
jmp 0x7f4da
jne 0x7f4e2
pushq $0x9
popq %rbp
leaq 0x1e51f(%rip), %rsi     # 0x9d9f9
movq %rbx, %rdi
callq 0x84a53
orb $0x8, 0x120(%rbx)
movl %ebp, 0x1b0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwrite.c
// Function: png_set_compression_method
void PNGAPI
png_set_compression_method(png_structp png_ptr, int method)
{
   png_debug(1, "in png_set_compression_method");

   if (png_ptr == NULL)
      return;
   if (method != 8)
      png_warning(png_ptr, "Only compression method 8 is supported by PNG");
   png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD;
   png_ptr->zlib_method = method;
}

// Assembly:
testq %rdi, %rdi
je 0x7f52e
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x8, %esi
je 0x7f518
leaq 0x1e512(%rip), %rsi     # 0x9da22
movq %r14, %rdi
callq 0x84a53
orb $0x10, 0x120(%r14)
movl %ebx, 0x1ac(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngrtran.c
// Function: png_set_background
void PNGAPI
png_set_background(png_structp png_ptr,
   png_color_16p background_color, int background_gamma_code,
   int need_expand, double background_gamma)
{
   png_debug(1, "in png_set_background");
 
   if (png_ptr == NULL)
      return;
   if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN)
   {
      png_warning(png_ptr, "Application must supply a known background gamma");
      return;
   }

   png_ptr->transformations |= PNG_BACKGROUND;
   png_memcpy(&(png_ptr->background), background_color,
      png_sizeof(png_color_16));
   png_ptr->background_gamma = (float)background_gamma;
   png_ptr->background_gamma_type = (png_byte)(background_gamma_code);
   png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0);
}

// Assembly:
testq %rdi, %rdi
je 0x7f73c
testl %edx, %edx
je 0x7f73d
movl $0x80, %eax
orl 0x124(%rdi), %eax
movl %eax, 0x124(%rdi)
movq (%rsi), %r8
movq %r8, 0x260(%rdi)
movzwl 0x8(%rsi), %esi
movw %si, 0x268(%rdi)
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x25c(%rdi)
movb %dl, 0x258(%rdi)
xorl %edx, %edx
testl %ecx, %ecx
setne %dl
shll $0x8, %edx
orl %eax, %edx
movl %edx, 0x124(%rdi)
retq
leaq 0x1e455(%rip), %rsi     # 0x9db99
jmp 0x84a53
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngrtran.c
// Function: png_set_gamma
void PNGAPI
png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
{
   png_debug(1, "in png_set_gamma");

   if (png_ptr == NULL)
      return;

   if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) ||
       (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) ||
       (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
     png_ptr->transformations |= PNG_GAMMA;
   png_ptr->gamma = (float)file_gamma;
   png_ptr->screen_gamma = (float)scrn_gamma;
}

// Assembly:
testq %rdi, %rdi
je 0x80096
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
addsd 0x12fc7(%rip), %xmm2    # 0x93020
andpd 0x1320f(%rip), %xmm2    # 0x93270
ucomisd 0x1dae7(%rip), %xmm2    # 0x9db50
ja 0x8007f
movb 0x24e(%rdi), %al
testb $0x4, %al
sete %cl
cmpb $0x3, %al
setne %al
testb %cl, %al
jne 0x80086
orb $0x20, 0x125(%rdi)
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
cvtpd2ps %xmm1, %xmm0
movlpd %xmm0, 0x28c(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngrtran.c
// Function: png_set_rgb_to_gray
void PNGAPI
png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red,
   double green)
{
   int red_fixed = (int)((float)red*100000.0 + 0.5);
   int green_fixed = (int)((float)green*100000.0 + 0.5);
   if (png_ptr == NULL)
      return;
   png_set_rgb_to_gray_fixed(png_ptr, error_action, red_fixed, green_fixed);
}

// Assembly:
testq %rdi, %rdi
je 0x8013c
cvtsd2ss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x1d0c9(%rip), %xmm2    # 0x9d1d8
mulsd %xmm2, %xmm1
movsd 0x12ef5(%rip), %xmm3    # 0x93010
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %ecx
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm0
cvttsd2si %xmm0, %edx
jmp 0x8013d
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngwtran.c
// Function: png_do_write_intrapixel
void /* PRIVATE */
png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
{
   png_debug(1, "in png_do_write_intrapixel");

   if (
       (row_info->color_type & PNG_COLOR_MASK_COLOR))
   {
      int bytes_per_pixel;
      png_uint_32 row_width = row_info->width;
      if (row_info->bit_depth == 8)
      {
         png_bytep rp;
         png_uint_32 i;

         if (row_info->color_type == PNG_COLOR_TYPE_RGB)
            bytes_per_pixel = 3;
         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
            bytes_per_pixel = 4;
         else
            return;

         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
         {
            *(rp)   = (png_byte)((*rp     - *(rp+1))&0xff);
            *(rp+2) = (png_byte)((*(rp+2) - *(rp+1))&0xff);
         }
      }
      else if (row_info->bit_depth == 16)
      {
         png_bytep rp;
         png_uint_32 i;

         if (row_info->color_type == PNG_COLOR_TYPE_RGB)
            bytes_per_pixel = 6;
         else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
            bytes_per_pixel = 8;
         else
            return;

         for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
         {
            png_uint_32 s0   = (*(rp  ) << 8) | *(rp+1);
            png_uint_32 s1   = (*(rp+2) << 8) | *(rp+3);
            png_uint_32 s2   = (*(rp+4) << 8) | *(rp+5);
            png_uint_32 red  = (png_uint_32)((s0 - s1) & 0xffffL);
            png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL);
            *(rp  ) = (png_byte)((red >> 8) & 0xff);
            *(rp+1) = (png_byte)(red & 0xff);
            *(rp+4) = (png_byte)((blue >> 8) & 0xff);
            *(rp+5) = (png_byte)(blue & 0xff);
         }
      }
   }
}

// Assembly:
pushq %rbx
movzbl 0x10(%rdi), %ecx
testb $0x2, %cl
je 0x847e0
movl (%rdi), %eax
movzbl 0x11(%rdi), %edx
cmpl $0x10, %edx
je 0x8475f
cmpl $0x8, %edx
jne 0x847e0
cmpl $0x2, %ecx
je 0x84775
cmpl $0x6, %ecx
jne 0x847e0
movabsq $0x4, %rcx
jmp 0x8477f
cmpl $0x2, %ecx
je 0x84795
cmpl $0x6, %ecx
jne 0x847e0
movabsq $0x8, %rcx
jmp 0x8479f
movabsq $0x3, %rcx
addq $0x2, %rsi
subl $0x1, %eax
jb 0x847e0
movb -0x1(%rsi), %dl
subb %dl, -0x2(%rsi)
subb %dl, (%rsi)
addq %rcx, %rsi
jmp 0x84783
movabsq $0x6, %rcx
addq $0x5, %rsi
subl $0x1, %eax
jb 0x847e0
movzwl -0x5(%rsi), %edx
rolw $0x8, %dx
movzwl -0x3(%rsi), %edi
movzwl %dx, %edx
rolw $0x8, %di
movzwl %di, %edi
movzwl -0x1(%rsi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %ebx
subl %edi, %edx
subl %edi, %ebx
movb %dh, -0x5(%rsi)
movb %dl, -0x4(%rsi)
movb %bh, -0x1(%rsi)
movb %bl, (%rsi)
addq %rcx, %rsi
jmp 0x847a3
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngmem.c
// Function: png_calloc
png_voidp PNGAPI
png_calloc(png_structp png_ptr, png_alloc_size_t size)
{
   png_voidp ret;

   ret = (png_malloc(png_ptr, size));
   if (ret != NULL)
      png_memset(ret,0,(png_size_t)size);
   return (ret);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x848bb
testq %rax, %rax
je 0x848b9
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0xe270
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngmem.c
// Function: png_malloc_warn
png_voidp PNGAPI
png_malloc_warn(png_structp png_ptr, png_alloc_size_t size)
{
   png_voidp ptr;
   png_uint_32 save_flags;
   if (png_ptr == NULL)
      return (NULL);

   save_flags = png_ptr->flags;
   png_ptr->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
   ptr = (png_voidp)png_malloc((png_structp)png_ptr, size);
   png_ptr->flags=save_flags;
   return(ptr);
}

// Assembly:
testq %rdi, %rdi
je 0x84990
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x120(%rdi), %ebp
movl %ebp, %eax
orl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x120(%rdi)
callq 0x848bb
movl %ebp, 0x120(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngerror.c
// Function: png_warning
void PNGAPI
png_warning(png_structp png_ptr, png_const_charp warning_message)
{
   int offset = 0;
   if (png_ptr != NULL)
   {
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
   if (png_ptr->flags&
     (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
#endif
     {
       if (*warning_message == PNG_LITERAL_SHARP)
       {
           for (offset = 1; offset < 15; offset++)
              if (warning_message[offset] == ' ')
                  break;
       }
     }
   }
   if (png_ptr != NULL && png_ptr->warning_fn != NULL)
      (*(png_ptr->warning_fn))(png_ptr, warning_message + offset);
   else
      png_default_warning(png_ptr, warning_message + offset);
}

// Assembly:
movq %rsi, %rdx
xorl %eax, %eax
testq %rdi, %rdi
je 0x84a91
cmpb $0x23, (%rdx)
jne 0x84a7b
pushq $0x1
popq %rcx
pushq $0xf
popq %rax
cmpq $0xf, %rcx
je 0x84a7b
cmpb $0x20, (%rdx,%rcx)
je 0x84a79
incq %rcx
jmp 0x84a68
movl %ecx, %eax
movq 0xd8(%rdi), %rcx
testq %rcx, %rcx
je 0x84a91
movl %eax, %eax
addq %rax, %rdx
movq %rdx, %rsi
jmpq *%rcx
pushq %rbx
movl %eax, %eax
addq %rax, %rdx
movq 0x55522(%rip), %rbx     # 0xd9fc0
movq (%rbx), %rdi
leaq 0x19229(%rip), %rsi     # 0x9dcd1
xorl %eax, %eax
callq 0xe6a0
movq (%rbx), %rsi
pushq $0xa
popq %rdi
popq %rbx
jmp 0xe5c0
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngerror.c
// Function: png_chunk_error
void PNGAPI
png_chunk_error(png_structp png_ptr, png_const_charp error_message)
{
   char msg[18+PNG_MAX_ERROR_TEXT];
   if (png_ptr == NULL)
     png_error(png_ptr, error_message);
   else
   {
     png_format_buffer(png_ptr, msg, error_message);
     png_error(png_ptr, msg);
   }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rdx
testq %rdi, %rdi
jne 0x84ad4
xorl %edi, %edi
movq %rdx, %rsi
callq 0x849c0
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x84aed
movq %rbx, %rdi
movq %r14, %rsi
callq 0x849c0
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngerror.c
// Function: png_format_buffer
static void /* PRIVATE */
png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
   error_message)
{
   int iout = 0, iin = 0;

   while (iin < 4)
   {
      int c = png_ptr->chunk_name[iin++];
      if (isnonalpha(c))
      {
         buffer[iout++] = PNG_LITERAL_LEFT_SQUARE_BRACKET;
         buffer[iout++] = png_digit[(c & 0xf0) >> 4];
         buffer[iout++] = png_digit[c & 0x0f];
         buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET;
      }
      else
      {
         buffer[iout++] = (png_byte)c;
      }
   }

   if (error_message == NULL)
      buffer[iout] = '\0';
   else
   {
      buffer[iout++] = ':';
      buffer[iout++] = ' ';
      png_memcpy(buffer + iout, error_message, PNG_MAX_ERROR_TEXT);
      buffer[iout + PNG_MAX_ERROR_TEXT - 1] = '\0';
   }
}

// Assembly:
xorl %eax, %eax
leaq 0x191ba(%rip), %rcx     # 0x9dcb0
xorl %r10d, %r10d
movslq %r10d, %r8
cmpq $0x4, %rax
je 0x84b6a
movb 0x244(%rdi,%rax), %r9b
leal -0x7b(%r9), %r10d
cmpb $-0x3a, %r10b
setb %r10b
leal -0x5b(%r9), %r11d
cmpb $0x6, %r11b
setb %r11b
orb %r10b, %r11b
cmpb $0x1, %r11b
jne 0x84b5d
movzbl %r9b, %r9d
movb $0x5b, (%rsi,%r8)
movl %r9d, %r10d
shrl $0x4, %r10d
movb (%r10,%rcx), %r10b
movb %r10b, 0x1(%rsi,%r8)
andl $0xf, %r9d
movb (%r9,%rcx), %r9b
movb %r9b, 0x2(%rsi,%r8)
leal 0x4(%r8), %r10d
movb $0x5d, 0x3(%rsi,%r8)
jmp 0x84b65
leal 0x1(%r8), %r10d
movb %r9b, (%rsi,%r8)
incq %rax
jmp 0x84af9
addq %r8, %rsi
testq %rdx, %rdx
je 0x84b9a
movw $0x203a, (%rsi)         # imm = 0x203A
movups (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movups 0x20(%rdx), %xmm2
movups 0x2f(%rdx), %xmm3
movups %xmm0, 0x2(%rsi)
movups %xmm1, 0x12(%rsi)
movups %xmm2, 0x22(%rsi)
movups %xmm3, 0x31(%rsi)
addq $0x41, %rsi
movb $0x0, (%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngerror.c
// Function: png_chunk_warning
void PNGAPI
png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
{
   char msg[18+PNG_MAX_ERROR_TEXT];
   if (png_ptr == NULL)
     png_warning(png_ptr, warning_message);
   else
   {
     png_format_buffer(png_ptr, msg, warning_message);
     png_warning(png_ptr, msg);
   }
}

// Assembly:
movq %rsi, %rdx
testq %rdi, %rdi
je 0x84bce
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x84aed
movq %rbx, %rdi
movq %r14, %rsi
callq 0x84a53
addq $0x58, %rsp
popq %rbx
popq %r14
retq
xorl %edi, %edi
movq %rdx, %rsi
jmp 0x84a53
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/crc32.c
// Function: crc32_combine_
local uLong crc32_combine_(crc1, crc2, len2)
    uLong crc1;
    uLong crc2;
    z_off64_t len2;
{
    int n;
    unsigned long row;
    unsigned long even[GF2_DIM];    /* even-power-of-two zeros operator */
    unsigned long odd[GF2_DIM];     /* odd-power-of-two zeros operator */

    /* degenerate case (also disallow negative lengths) */
    if (len2 <= 0)
        return crc1;

    /* put operator for one zero bit in odd */
    odd[0] = 0xedb88320UL;          /* CRC-32 polynomial */
    row = 1;
    for (n = 1; n < GF2_DIM; n++) {
        odd[n] = row;
        row <<= 1;
    }

    /* put operator for two zero bits in even */
    gf2_matrix_square(even, odd);

    /* put operator for four zero bits in odd */
    gf2_matrix_square(odd, even);

    /* apply len2 zeros to crc1 (first square will put the operator for one
       zero byte, eight zero bits, in even) */
    do {
        /* apply zeros operator for this bit of len2 */
        gf2_matrix_square(even, odd);
        if (len2 & 1)
            crc1 = gf2_matrix_times(even, crc1);
        len2 >>= 1;

        /* if no more bits set, then done */
        if (len2 == 0)
            break;

        /* another iteration of the loop with odd and even swapped */
        gf2_matrix_square(odd, even);
        if (len2 & 1)
            crc1 = gf2_matrix_times(odd, crc1);
        len2 >>= 1;

        /* if no more bits set, then done */
    } while (len2 != 0);

    /* return combined crc */
    crc1 ^= crc2;
    return crc1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdi, %rbx
testq %rdx, %rdx
jle 0x84fa6
movq %rdx, %r15
movq %rsi, %r14
movl $0xedb88320, %eax       # imm = 0xEDB88320
movq %rax, (%rsp)
pushq $0x1
popq %rax
movq %rax, %rcx
cmpq $0x20, %rax
je 0x84f2e
movq %rcx, (%rsp,%rax,8)
addq %rcx, %rcx
incq %rax
jmp 0x84f1c
leaq 0x100(%rsp), %r12
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x84fbf
movq %r13, %rdi
movq %r12, %rsi
callq 0x84fbf
movq %r12, %rdi
movq %r13, %rsi
callq 0x84fbf
testb $0x1, %r15b
je 0x84f6e
movq %r12, %rdi
movq %rbx, %rsi
callq 0x84fee
movq %rax, %rbx
cmpq $0x2, %r15
jb 0x84fa3
movq %r13, %rdi
movq %r12, %rsi
callq 0x84fbf
testb $0x2, %r15b
je 0x84f93
movq %r13, %rdi
movq %rbx, %rsi
callq 0x84fee
movq %rax, %rbx
movq %r15, %rax
shrq $0x2, %rax
cmpq $0x3, %r15
movq %rax, %r15
ja 0x84f4f
xorq %r14, %rbx
movq %rbx, %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/deflate.c
// Function: deflateEnd
int ZEXPORT deflateEnd (strm)
    z_streamp strm;
{
    int status;

    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;

    status = strm->state->status;
    if (status != INIT_STATE &&
        status != EXTRA_STATE &&
        status != NAME_STATE &&
        status != COMMENT_STATE &&
        status != HCRC_STATE &&
        status != BUSY_STATE &&
        status != FINISH_STATE) {
      return Z_STREAM_ERROR;
    }

    /* Deallocate in reverse order of allocations: */
    TRY_FREE(strm, strm->state->pending_buf);
    TRY_FREE(strm, strm->state->head);
    TRY_FREE(strm, strm->state->prev);
    TRY_FREE(strm, strm->state->window);

    ZFREE(strm, strm->state);
    strm->state = Z_NULL;

    return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK;
}

// Assembly:
pushq $-0x2
popq %rax
testq %rdi, %rdi
je 0x8536a
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rsi
testq %rsi, %rsi
je 0x85363
movl 0x8(%rsi), %r14d
leal -0x45(%r14), %ecx
cmpl $0x2c, %ecx
ja 0x8536b
movabsq $0x100400400011, %rdx   # imm = 0x100400400011
btq %rcx, %rdx
jae 0x8536b
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x85303
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x68(%rsi), %rax
testq %rax, %rax
je 0x8531a
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x60(%rsi), %rax
testq %rax, %rax
je 0x85331
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x50(%rsi), %rax
testq %rax, %rax
je 0x85348
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
andq $0x0, 0x38(%rbx)
xorl %eax, %eax
cmpl $0x71, %r14d
setne %al
leal (%rax,%rax,2), %eax
addl $-0x3, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
cmpl $0x29a, %r14d           # imm = 0x29A
je 0x852ec
cmpl $0x2a, %r14d
je 0x852ec
jmp 0x85363
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/deflate.c
// Function: deflateReset
int ZEXPORT deflateReset (strm)
    z_streamp strm;
{
    deflate_state *s;

    if (strm == Z_NULL || strm->state == Z_NULL ||
        strm->zalloc == (alloc_func)0 || strm->zfree == (free_func)0) {
        return Z_STREAM_ERROR;
    }

    strm->total_in = strm->total_out = 0;
    strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */
    strm->data_type = Z_UNKNOWN;

    s = (deflate_state *)strm->state;
    s->pending = 0;
    s->pending_out = s->pending_buf;

    if (s->wrap < 0) {
        s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */
    }
    s->status = s->wrap ? INIT_STATE : BUSY_STATE;
    strm->adler =
#ifdef GZIP
        s->wrap == 2 ? crc32(0L, Z_NULL, 0) :
#endif
        adler32(0L, Z_NULL, 0);
    s->last_flush = Z_NO_FLUSH;

    _tr_init(s);
    lm_init(s);

    return Z_OK;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
pushq $-0x2
popq %rbp
testq %rdi, %rdi
je 0x854ac
movq %rdi, %r14
movq 0x38(%rdi), %rbx
testq %rbx, %rbx
je 0x854ac
cmpq $0x0, 0x40(%r14)
je 0x854ac
cmpq $0x0, 0x48(%r14)
je 0x854ac
andq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movl $0x2, 0x58(%r14)
andl $0x0, 0x28(%rbx)
movq 0x10(%rbx), %rax
movq %rax, 0x20(%rbx)
movl 0x2c(%rbx), %eax
testl %eax, %eax
jns 0x853e7
negl %eax
movl %eax, 0x2c(%rbx)
testl %eax, %eax
pushq $0x71
popq %rcx
pushq $0x2a
popq %rdx
cmovel %ecx, %edx
movl %edx, 0x8(%rbx)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
cmpl $0x2, %eax
jne 0x85407
callq 0x84c30
jmp 0x8540c
callq 0x922c0
movq %rax, 0x60(%r14)
andl $0x0, 0x40(%rbx)
movq %rbx, %rdi
callq 0x89cd4
movl 0x44(%rbx), %eax
addq %rax, %rax
movq %rax, 0x58(%rbx)
movq 0x68(%rbx), %rdi
movl 0x74(%rbx), %edx
decl %edx
andw $0x0, (%rdi,%rdx,2)
addq %rdx, %rdx
xorl %ebp, %ebp
xorl %esi, %esi
callq 0xe270
movslq 0xb4(%rbx), %rax
shlq $0x4, %rax
leaq 0x547ee(%rip), %rcx     # 0xd9c40
movzwl 0x2(%rax,%rcx), %edx
movl %edx, 0xb0(%rbx)
movzwl (%rax,%rcx), %edx
movl %edx, 0xbc(%rbx)
movzwl 0x4(%rax,%rcx), %edx
movl %edx, 0xc0(%rbx)
movzwl 0x6(%rax,%rcx), %eax
movl %eax, 0xac(%rbx)
andq $0x0, 0x88(%rbx)
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0xa4(%rbx)
movl $0x2, 0x90(%rbx)
andq $0x0, 0x98(%rbx)
andl $0x0, 0x70(%rbx)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/deflate.c
// Function: deflateSetDictionary
int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
    z_streamp strm;
    const Bytef *dictionary;
    uInt  dictLength;
{
    deflate_state *s;
    uInt length = dictLength;
    uInt n;
    IPos hash_head = 0;

    if (strm == Z_NULL || strm->state == Z_NULL || dictionary == Z_NULL ||
        strm->state->wrap == 2 ||
        (strm->state->wrap == 1 && strm->state->status != INIT_STATE))
        return Z_STREAM_ERROR;

    s = strm->state;
    if (s->wrap)
        strm->adler = adler32(strm->adler, dictionary, dictLength);

    if (length < MIN_MATCH) return Z_OK;
    if (length > s->w_size) {
        length = s->w_size;
        dictionary += dictLength - length; /* use the tail of the dictionary */
    }
    zmemcpy(s->window, dictionary, length);
    s->strstart = length;
    s->block_start = (long)length;

    /* Insert all strings in the hash table (except for the last two bytes).
     * s->lookahead stays null, so s->ins_h will be recomputed at the next
     * call of fill_window.
     */
    s->ins_h = s->window[0];
    UPDATE_HASH(s, s->ins_h, s->window[1]);
    for (n = 0; n <= length - MIN_MATCH; n++) {
        INSERT_STRING(s, n, hash_head);
    }
    if (hash_head) hash_head = 0;  /* to make compiler happy */
    return Z_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq $-0x2
popq %r14
testq %rdi, %rdi
je 0x85516
movq %rsi, %r15
movq %rdi, %r12
movq 0x38(%rdi), %r13
testq %r13, %r13
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x85516
movl %edx, %ebx
movl 0x2c(%r13), %eax
testl %eax, %eax
je 0x8550e
cmpl $0x2, %eax
je 0x85516
cmpl $0x1, %eax
jne 0x854fa
cmpl $0x2a, 0x8(%r13)
jne 0x85516
movq 0x60(%r12), %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x922c0
movq %rax, 0x60(%r12)
xorl %r14d, %r14d
cmpl $0x3, %ebx
jae 0x85523
movl %r14d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl 0x44(%r13), %eax
xorl %r14d, %r14d
movl %ebx, %ecx
subl %eax, %ecx
cmovbl %r14d, %ecx
addq %rcx, %r15
cmpl %ebx, %eax
cmovbl %eax, %ebx
movq 0x50(%r13), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xe380
movl %ebx, 0x9c(%r13)
movq %rbx, 0x88(%r13)
movq 0x50(%r13), %rax
movzbl (%rax), %edx
movl %edx, 0x70(%r13)
movl 0x80(%r13), %ecx
shll %cl, %edx
movzbl 0x1(%rax), %r10d
xorl %edx, %r10d
movl 0x7c(%r13), %edx
andl %edx, %r10d
movl %r10d, 0x70(%r13)
movq 0x68(%r13), %rsi
movq 0x60(%r13), %rdi
movl 0x4c(%r13), %r8d
addl $-0x2, %ebx
xorl %r9d, %r9d
cmpq %r9, %rbx
je 0x85516
shll %cl, %r10d
leal 0x2(%r9), %r11d
movzbl (%rax,%r11), %r11d
xorl %r10d, %r11d
andl %edx, %r11d
movl %r11d, 0x70(%r13)
movzwl (%rsi,%r11,2), %r10d
movl %r8d, %r15d
andl %r9d, %r15d
movw %r10w, (%rdi,%r15,2)
movw %r9w, (%rsi,%r11,2)
incq %r9
movl %r11d, %r10d
jmp 0x85590
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/deflate.c
// Function: deflateParams
int ZEXPORT deflateParams(strm, level, strategy)
    z_streamp strm;
    int level;
    int strategy;
{
    deflate_state *s;
    compress_func func;
    int err = Z_OK;

    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
    s = strm->state;

#ifdef FASTEST
    if (level != 0) level = 1;
#else
    if (level == Z_DEFAULT_COMPRESSION) level = 6;
#endif
    if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) {
        return Z_STREAM_ERROR;
    }
    func = configuration_table[s->level].func;

    if ((strategy != s->strategy || func != configuration_table[level].func) &&
        strm->total_in != 0) {
        /* Flush the last buffer: */
        err = deflate(strm, Z_BLOCK);
    }
    if (s->level != level) {
        s->level = level;
        s->max_lazy_match   = configuration_table[level].max_lazy;
        s->good_match       = configuration_table[level].good_length;
        s->nice_match       = configuration_table[level].nice_length;
        s->max_chain_length = configuration_table[level].max_chain;
    }
    s->strategy = strategy;
    return err;
}

// Assembly:
pushq $-0x2
popq %rax
testq %rdi, %rdi
je 0x856ec
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x38(%rdi), %r14
testq %r14, %r14
je 0x856e4
movl %edx, %ebx
cmpl $-0x1, %esi
pushq $0x6
popq %rbp
cmovnel %esi, %ebp
cmpl $0xa, %ebp
setae %cl
cmpl $0x5, %edx
setae %dl
orb %cl, %dl
jne 0x856e4
leaq 0x545e7(%rip), %r15     # 0xd9c40
movl %ebp, %r12d
cmpl %ebx, 0xb8(%r14)
jne 0x85683
movslq 0xb4(%r14), %rax
shlq $0x4, %rax
movq 0x8(%rax,%r15), %rax
movq %r12, %rcx
shlq $0x4, %rcx
cmpq 0x8(%rcx,%r15), %rax
je 0x85694
cmpq $0x0, 0x10(%rdi)
je 0x85694
pushq $0x5
popq %rsi
callq 0x856ed
jmp 0x85696
xorl %eax, %eax
cmpl %ebp, 0xb4(%r14)
je 0x856dd
movl %ebp, 0xb4(%r14)
shlq $0x4, %r12
movzwl 0x2(%r12,%r15), %ecx
movl %ecx, 0xb0(%r14)
movzwl (%r12,%r15), %ecx
movl %ecx, 0xbc(%r14)
movzwl 0x4(%r12,%r15), %ecx
movl %ecx, 0xc0(%r14)
movzwl 0x6(%r12,%r15), %ecx
movl %ecx, 0xac(%r14)
movl %ebx, 0xb8(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq