LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/jpeg/jmemmgr.c
// Function: do_sarray_io
LOCAL(void)
do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, jboolean writing)
/* Do backing store read or write of a virtual sample array */
{
  long bytesperrow, file_offset, byte_count, rows, thisrow, i;

  bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE);
  file_offset = ptr->cur_start_row * bytesperrow;
  /* Loop to read or write each allocation chunk in mem_buffer */
  for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) {
    /* One chunk, but check for short chunk at end of buffer */
    rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i);
    /* Transfer no more than is currently defined */
    thisrow = (long) ptr->cur_start_row + i;
    rows = MIN(rows, (long) ptr->first_undef_row - thisrow);
    /* Transfer no more than fits in file */
    rows = MIN(rows, (long) ptr->rows_in_array - thisrow);
    if (rows <= 0)		/* this chunk might be past end of file! */
      break;
    byte_count = rows * bytesperrow;
    if (writing)
      (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,
					    (void FAR *) ptr->mem_buffer[i],
					    file_offset, byte_count);
    else
      (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,
					   (void FAR *) ptr->mem_buffer[i],
					   file_offset, byte_count);
    file_offset += byte_count;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movl 0xc(%rsi), %eax
movl 0x1c(%rsi), %r15d
movq %rax, 0x8(%rsp)
imulq %rax, %r15
xorl %eax, %eax
testl %edx, %edx
setne %al
leaq 0x38(%rsi), %r12
leaq 0x38(,%rax,8), %r14
xorl %ebp, %ebp
movl 0x14(%rbx), %eax
subq %rbp, %rax
jbe 0x7a04e
movl 0x8(%rbx), %r13d
movl 0x18(%rbx), %ecx
cmpq %rcx, %rax
cmovlq %rax, %rcx
movl 0x1c(%rbx), %eax
addq %rbp, %rax
movl 0x20(%rbx), %edx
subq %rax, %rdx
cmpq %rdx, %rcx
cmovlq %rcx, %rdx
subq %rax, %r13
cmpq %r13, %rdx
cmovlq %rdx, %r13
testq %r13, %r13
jle 0x7a04e
imulq 0x8(%rsp), %r13
movq (%rbx), %rax
movq (%rax,%rbp,8), %rdx
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rcx
movq %r13, %r8
callq *(%rbx,%r14)
addq %r13, %r15
movl 0x18(%rbx), %eax
addq %rax, %rbp
jmp 0x79fec
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/jpeg/jmemmgr.c
// Function: do_barray_io
LOCAL(void)
do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, jboolean writing)
/* Do backing store read or write of a virtual coefficient-block array */
{
  long bytesperrow, file_offset, byte_count, rows, thisrow, i;

  bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK);
  file_offset = ptr->cur_start_row * bytesperrow;
  /* Loop to read or write each allocation chunk in mem_buffer */
  for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) {
    /* One chunk, but check for short chunk at end of buffer */
    rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i);
    /* Transfer no more than is currently defined */
    thisrow = (long) ptr->cur_start_row + i;
    rows = MIN(rows, (long) ptr->first_undef_row - thisrow);
    /* Transfer no more than fits in file */
    rows = MIN(rows, (long) ptr->rows_in_array - thisrow);
    if (rows <= 0)		/* this chunk might be past end of file! */
      break;
    byte_count = rows * bytesperrow;
    if (writing)
      (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info,
					    (void FAR *) ptr->mem_buffer[i],
					    file_offset, byte_count);
    else
      (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info,
					   (void FAR *) ptr->mem_buffer[i],
					   file_offset, byte_count);
    file_offset += byte_count;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
movl 0xc(%rsi), %ebp
movl 0x1c(%rsi), %r15d
shlq $0x7, %rbp
imulq %rbp, %r15
xorl %eax, %eax
testl %edx, %edx
setne %al
leaq 0x38(%rsi), %rcx
movq %rcx, 0x8(%rsp)
leaq 0x38(,%rax,8), %r14
xorl %r12d, %r12d
movl 0x14(%rbx), %eax
subq %r12, %rax
jbe 0x7a0ff
movl 0x8(%rbx), %r13d
movl 0x18(%rbx), %ecx
cmpq %rcx, %rax
cmovlq %rax, %rcx
movl 0x1c(%rbx), %eax
addq %r12, %rax
movl 0x20(%rbx), %edx
subq %rax, %rdx
cmpq %rdx, %rcx
cmovlq %rcx, %rdx
subq %rax, %r13
cmpq %r13, %rdx
cmovlq %rdx, %r13
testq %r13, %r13
jle 0x7a0ff
imulq %rbp, %r13
movq (%rbx), %rax
movq (%rax,%r12,8), %rdx
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %r15, %rcx
movq %r13, %r8
callq *(%rbx,%r14)
addq %r13, %r15
movl 0x18(%rbx), %eax
addq %rax, %r12
jmp 0x7a09d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/png.c
// Function: png_set_sig_bytes
void PNGAPI
png_set_sig_bytes(png_structp png_ptr, int num_bytes)
{
   png_debug(1, "in png_set_sig_bytes");

   if (png_ptr == NULL)
      return;

   if (num_bytes > 8)
      png_error(png_ptr, "Too many bytes for PNG signature");

   png_ptr->sig_bytes = (png_byte)(num_bytes < 0 ? 0 : num_bytes);
}

// Assembly:
testq %rdi, %rdi
je 0x7a178
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0x9, %esi
jl 0x7a165
leaq 0x22bc3(%rip), %rsi     # 0x9cd20
movq %rbx, %rdi
callq 0x849c0
xorl %eax, %eax
testl %ebp, %ebp
cmovgl %ebp, %eax
movb %al, 0x254(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/png.c
// Function: png_sig_cmp
int PNGAPI
png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
{
   png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
   if (num_to_check > 8)
      num_to_check = 8;
   else if (num_to_check < 1)
      return (-1);

   if (start > 7)
      return (-1);

   if (start + num_to_check > 8)
      num_to_check = 8 - start;

   return ((int)(png_memcmp(&sig[start], &png_signature[start], num_to_check)));
}

// Assembly:
cmpq $0x8, %rdx
jbe 0x7a184
pushq $0x8
popq %rdx
jmp 0x7a189
testq %rdx, %rdx
je 0x7a18f
cmpq $0x7, %rsi
jbe 0x7a193
pushq $-0x1
popq %rax
retq
leaq (%rdx,%rsi), %rcx
pushq $0x8
popq %rax
subq %rsi, %rax
cmpq $0x9, %rcx
cmovbq %rdx, %rax
addq %rsi, %rdi
leaq 0x22fcd(%rip), %rcx     # 0x9d17c
addq %rsi, %rcx
movq %rcx, %rsi
movq %rax, %rdx
jmp 0xe1f0
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/png.c
// Function: png_zalloc
voidpf /* PRIVATE */
png_zalloc(voidpf png_ptr, uInt items, uInt size)
{
   png_voidp ptr;
   png_structp p=(png_structp)png_ptr;
   png_uint_32 save_flags=p->flags;
   png_alloc_size_t num_bytes;

   if (png_ptr == NULL)
      return (NULL);
   if (items > PNG_UINT_32_MAX/size)
   {
     png_warning (p, "Potential overflow in png_zalloc()");
     return (NULL);
   }
   num_bytes = (png_alloc_size_t)items * size;

   p->flags|=PNG_FLAG_MALLOC_NULL_MEM_OK;
   ptr = (png_voidp)png_malloc((png_structp)png_ptr, num_bytes);
   p->flags=save_flags;

   return ((voidpf)ptr);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edx, %ecx
movq %rdi, %rbx
movl %edx, %eax
mull %esi
jno 0x7a1de
leaq 0x22b6f(%rip), %rsi     # 0x9cd41
movq %rbx, %rdi
callq 0x84a53
xorl %eax, %eax
jmp 0x7a207
movl 0x120(%rbx), %ebp
movl %esi, %eax
movl %ecx, %esi
imulq %rax, %rsi
movl %ebp, %eax
orl $0x100000, %eax         # imm = 0x100000
movl %eax, 0x120(%rbx)
movq %rbx, %rdi
callq 0x848bb
movl %ebp, 0x120(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/png.c
// Function: png_info_init_3
void PNGAPI
png_info_init_3(png_infopp ptr_ptr, png_size_t png_info_struct_size)
{
   png_infop info_ptr = *ptr_ptr;

   png_debug(1, "in png_info_init_3");

   if (info_ptr == NULL)
      return;

   if (png_sizeof(png_info) > png_info_struct_size)
   {
      png_destroy_struct(info_ptr);
      info_ptr = (png_infop)png_create_struct(PNG_STRUCT_INFO);
      *ptr_ptr = info_ptr;
   }

   /* Set everything to 0 */
   png_memset(info_ptr, 0, png_sizeof(png_info));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x7a2cd
cmpq $0x16f, %rsi            # imm = 0x16F
ja 0x7a2c0
callq 0x84861
pushq $0x2
popq %rdi
callq 0x847e4
movq %rax, %rdi
movq %rax, (%rbx)
movl $0x170, %edx            # imm = 0x170
xorl %esi, %esi
popq %rbx
jmp 0xe270
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/png.c
// Function: png_destroy_info_struct
void PNGAPI
png_destroy_info_struct(png_structp png_ptr, png_infopp info_ptr_ptr)
{
   png_infop info_ptr = NULL;

   png_debug(1, "in png_destroy_info_struct");

   if (png_ptr == NULL)
      return;

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

   if (info_ptr != NULL)
   {
      png_info_destroy(png_ptr, info_ptr);

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

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x7a319
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq (%rsi), %r15
testq %r15, %r15
je 0x7a314
movq %rdi, %r14
movq %r15, %rsi
callq 0x7a31a
movq 0x418(%r14), %rdx
movq 0x428(%r14), %rsi
movq %r15, %rdi
callq 0x8486a
andq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/png.c
// Function: png_info_destroy
void /* PRIVATE */
png_info_destroy(png_structp png_ptr, png_infop info_ptr)
{
   png_debug(1, "in png_info_destroy");

   png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);

#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
   if (png_ptr->num_chunk_list)
   {
      png_free(png_ptr, png_ptr->chunk_list);
      png_ptr->chunk_list = NULL;
      png_ptr->num_chunk_list = 0;
   }
#endif

   png_info_init_3(&info_ptr, png_sizeof(png_info));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $-0x1
popq %rcx
movl $0x7fff, %edx           # imm = 0x7FFF
callq 0x7a3b5
cmpl $0x0, 0x3f0(%r14)
je 0x7a35a
movq 0x3f8(%r14), %rsi
movq %r14, %rdi
callq 0x84923
andq $0x0, 0x3f8(%r14)
andl $0x0, 0x3f0(%r14)
testq %rbx, %rbx
je 0x7a375
movl $0x170, %edx            # imm = 0x170
movq %rbx, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xe270
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/png.c
// Function: png_data_freer
void PNGAPI
png_data_freer(png_structp png_ptr, png_infop info_ptr,
   int freer, png_uint_32 mask)
{
   png_debug(1, "in png_data_freer");

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

   if (freer == PNG_DESTROY_WILL_FREE_DATA)
      info_ptr->free_me |= mask;
   else if (freer == PNG_USER_WILL_FREE_DATA)
      info_ptr->free_me &= ~mask;
   else
      png_warning(png_ptr,
         "Unknown freer parameter in png_data_freer");
}

// Assembly:
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %r8b
orb %al, %r8b
jne 0x7a3a8
cmpl $0x2, %edx
je 0x7a3a0
cmpl $0x1, %edx
jne 0x7a3a9
orl %ecx, 0xe4(%rsi)
retq
notl %ecx
andl %ecx, 0xe4(%rsi)
retq
leaq 0x229b4(%rip), %rsi     # 0x9cd64
jmp 0x84a53
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/png.c
// Function: png_convert_to_rfc1123
png_charp PNGAPI
png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
{
   static PNG_CONST char short_months[12][4] =
        {"Jan", "Feb", "Mar", "Apr", "May", "Jun",
         "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};

   if (png_ptr == NULL)
      return (NULL);
   if (png_ptr->time_buffer == NULL)
   {
      png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29*
         png_sizeof(char)));
   }

#ifdef USE_FAR_KEYWORD
   {
      char near_time_buf[29];
      png_snprintf6(near_time_buf, 29, "%d %s %d %02d:%02d:%02d +0000",
          ptime->day % 32, short_months[(ptime->month - 1) % 12],
          ptime->year, ptime->hour % 24, ptime->minute % 60,
          ptime->second % 61);
      png_memcpy(png_ptr->time_buffer, near_time_buf,
          29*png_sizeof(char));
   }
#else
   png_snprintf6(png_ptr->time_buffer, 29, "%d %s %d %02d:%02d:%02d +0000",
       ptime->day % 32, short_months[(ptime->month - 1) % 12],
       ptime->year, ptime->hour % 24, ptime->minute % 60,
       ptime->second % 61);
#endif
   return ((png_charp)png_ptr->time_buffer);
}

// Assembly:
testq %rdi, %rdi
je 0x7a85c
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x3d0(%rdi), %rdi
testq %rdi, %rdi
jne 0x7a7dd
pushq $0x1d
popq %rsi
movq %rbx, %rdi
callq 0x848bb
movq %rax, %rdi
movq %rax, 0x3d0(%rbx)
movzbl 0x3(%r14), %ecx
andl $0x1f, %ecx
movzbl 0x2(%r14), %eax
decl %eax
movw $0xc, %si
cwtd
idivw %si
movswq %dx, %rax
leaq 0x22990(%rip), %rdx     # 0x9d190
leaq (%rdx,%rax,4), %r8
movzwl (%r14), %r9d
movzbl 0x4(%r14), %eax
movb $0x18, %dl
divb %dl
movzbl %ah, %eax
movq %rax, %r10
movzbl 0x5(%r14), %eax
movb $0x3c, %dl
divb %dl
movzbl %ah, %eax
movq %rax, %r11
movzbl 0x6(%r14), %eax
movb $0x3d, %dl
divb %dl
movzbl %ah, %ebp
subq $0x8, %rsp
leaq 0x22551(%rip), %rdx     # 0x9cd8e
pushq $0x1d
popq %rsi
xorl %eax, %eax
pushq %rbp
pushq %r11
pushq %r10
callq 0xe780
addq $0x20, %rsp
movq 0x3d0(%rbx), %rax
popq %rbx
popq %r14
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/png.c
// Function: png_handle_as_unknown
int PNGAPI
png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
{
   /* Check chunk_name and return "keep" value if it's on the list, else 0 */
   int i;
   png_bytep p;
   if (png_ptr == NULL || chunk_name == NULL || png_ptr->num_chunk_list<=0)
      return 0;
   p = png_ptr->chunk_list + png_ptr->num_chunk_list*5 - 5;
   for (i = png_ptr->num_chunk_list; i; i--, p -= 5)
      if (!png_memcmp(chunk_name, p, 4))
        return ((int)*(p + 4));
   return 0;
}

// Assembly:
testq %rdi, %rdi
sete %cl
testq %rsi, %rsi
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x7a8c5
movl 0x3f0(%rdi), %ecx
testl %ecx, %ecx
jle 0x7a8c5
movq 0x3f8(%rdi), %rdx
leal (%rcx,%rcx,4), %edi
incl %ecx
addq %rdi, %rdx
addq $-0x5, %rdx
decl %ecx
je 0x7a8c5
leaq -0x5(%rdx), %rdi
movl (%rsi), %r8d
cmpl (%rdx), %r8d
movq %rdi, %rdx
jne 0x7a8ae
movzbl 0x9(%rdi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_gAMA
void PNGAPI
png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
{
   double png_gamma;

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

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

   /* Check for overflow */
   if (file_gamma > 21474.83)
   {
      png_warning(png_ptr, "Limiting gamma to 21474.83");
      png_gamma=21474.83;
   }
   else
      png_gamma = file_gamma;
   info_ptr->gamma = (float)png_gamma;
#ifdef PNG_FIXED_POINT_SUPPORTED
   info_ptr->int_gamma = (int)(png_gamma*100000.+.5);
#endif
   info_ptr->valid |= PNG_INFO_gAMA;
   if (png_gamma == 0.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 0x7afb3
movq %rsi, %r14
movq %rdi, %rbx
ucomisd 0x22286(%rip), %xmm0    # 0x9d1d0
jbe 0x7af63
leaq 0x222cd(%rip), %rsi     # 0x9d220
movq %rbx, %rdi
callq 0x84a53
movsd 0x2226d(%rip), %xmm0    # 0x9d1d0
cvtsd2ss %xmm0, %xmm1
movss %xmm1, 0x34(%r14)
movsd 0x22263(%rip), %xmm1    # 0x9d1d8
mulsd %xmm0, %xmm1
addsd 0x1808f(%rip), %xmm1    # 0x93010
cvttsd2si %xmm1, %eax
movl %eax, 0x148(%r14)
orb $0x1, 0x8(%r14)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7afb3
jp 0x7afb3
leaq 0x22297(%rip), %rsi     # 0x9d23b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x84a53
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7b010
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
jns 0x7afea
leaq 0x2226b(%rip), %rsi     # 0x9d24b
movq %rbx, %rdi
callq 0x84a53
xorl %edx, %edx
cvtsi2sd %edx, %xmm0
divsd 0x221e2(%rip), %xmm0    # 0x9d1d8
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x34(%r14)
movl %edx, 0x148(%r14)
orb $0x1, 0x8(%r14)
testl %edx, %edx
je 0x7b018
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x2221c(%rip), %rsi     # 0x9d23b
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x84a53
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7b0b7
movq %rsi, %rbx
movq %rdi, %r15
movl $0xfffffeff, %eax       # imm = 0xFFFFFEFF
addl 0x20(%rsi), %eax
cmpw $0xfeff, %ax            # imm = 0xFEFF
ja 0x7b060
leaq 0x2220c(%rip), %rsi     # 0x9d26a
jmp 0x7b0c4
movq %rdx, %r14
pushq $0x8
popq %rdx
movq %r15, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x7a3b5
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
callq 0x84960
movq %rax, 0x398(%r15)
testq %rax, %rax
je 0x7b0bd
xorl %ecx, %ecx
movzwl 0x20(%rbx), %edx
cmpq %rdx, %rcx
jae 0x7b0a5
movzwl (%r14,%rcx,2), %edx
movw %dx, (%rax,%rcx,2)
incq %rcx
jmp 0x7b08e
movq %rax, 0x98(%rbx)
orb $0x40, 0x8(%rbx)
orb $0x8, 0xe4(%rbx)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x221d4(%rip), %rsi     # 0x9d298
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x84a53
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7b19d
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 0x7aabc
popq %rax
popq %rcx
movb 0x25(%rbx), %dl
cmpb $0x3, %dl
jne 0x7b14e
movb $0x1, 0x29(%rbx)
movb $0x1, %cl
jmp 0x7b164
movl %edx, %eax
andb $0x2, %al
leal 0x1(%rax), %ecx
movb %cl, 0x29(%rbx)
testb $0x4, %dl
je 0x7b164
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 0x7b178
xorl %eax, %eax
jmp 0x7b199
movl %ebp, %ecx
cmpb $0x8, %al
jb 0x7b18a
shrb $0x3, %al
movzbl %al, %eax
imulq %rcx, %rax
jmp 0x7b199
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_O2/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 0x7b47d
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x101, %ebp            # imm = 0x101
jb 0x7b423
cmpb $0x3, 0x25(%rbx)
jne 0x7b488
leaq 0x21f38(%rip), %rsi     # 0x9d353
movq %r14, %rdi
callq 0x849c0
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1000, %edx           # imm = 0x1000
xorl %ecx, %ecx
callq 0x7a3b5
movl $0x300, %esi            # imm = 0x300
movq %r14, %rdi
callq 0x8489d
movq %rax, 0x238(%r14)
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0xe380
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 0x21ec4(%rip), %rsi     # 0x9d353
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x84a53
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7b5ec
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 0x84960
testq %rax, %rax
je 0x7b695
movq %rax, %rbp
movq %rax, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0xe380
movl (%rsp), %r14d
movq %r15, %rdi
movq %r14, %rsi
callq 0x84960
testq %rax, %rax
je 0x7b69e
movq %rax, %r13
movq %rax, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0xe380
pushq $0x10
popq %rdx
movq %r15, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x7a3b5
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 0x7b5dd
leaq 0x21cce(%rip), %rsi     # 0x9d36a
jmp 0x7b6b0
movq %r15, %rdi
movq %rbp, %rsi
callq 0x84923
leaq 0x21ce4(%rip), %rsi     # 0x9d394
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x84a53
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7b9d1
testb $0x2, 0x11d(%rdi)
jne 0x7b9d1
movq (%rdx), %rax
movq %rax, 0x50(%rsi)
orb $0x2, 0x9(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7bacb
movq %r8, %r15
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, %r12
testq %rdx, %rdx
je 0x7ba48
movq %r12, %rdi
movq %rbx, %rsi
movl $0x2000, %edx           # imm = 0x2000
xorl %ecx, %ecx
callq 0x7a3b5
movl $0x100, %esi            # imm = 0x100
movq %r12, %rdi
callq 0x848bb
movq %rax, 0x60(%rbx)
movq %rax, 0x2d8(%r12)
leal -0x1(%r14), %ecx
cmpl $0xff, %ecx
ja 0x7ba48
movl %r14d, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0xe380
testq %r15, %r15
je 0x7ba6d
movb 0x24(%rbx), %cl
pushq $0x1
popq %rax
shll %cl, %eax
movzbl 0x25(%rbx), %ecx
cmpl $0x2, %ecx
je 0x7ba79
testl %ecx, %ecx
jne 0x7baa3
movzwl 0x8(%r15), %ecx
cmpl %ecx, %eax
jl 0x7ba94
jmp 0x7baa3
movw %r14w, 0x22(%rbx)
testl %r14d, %r14d
jne 0x7bac0
jmp 0x7bacb
movzwl 0x2(%r15), %ecx
cmpl %ecx, %eax
jl 0x7ba94
movzwl 0x4(%r15), %ecx
cmpl %ecx, %eax
jb 0x7ba94
movzwl 0x6(%r15), %ecx
cmpl %ecx, %eax
jae 0x7baa3
leaq 0x21947(%rip), %rsi     # 0x9d3e2
movq %r12, %rdi
callq 0x84a53
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_O2/tomfunkhouser[P]gaps/pkgs/png/pngset.c
// Function: png_set_keep_unknown_chunks
void PNGAPI
png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
   chunk_list, int num_chunks)
{
   png_bytep new_list, p;
   int i, old_num_chunks;
   if (png_ptr == NULL)
      return;
   if (num_chunks == 0)
   {
      if (keep == PNG_HANDLE_CHUNK_ALWAYS || keep == PNG_HANDLE_CHUNK_IF_SAFE)
         png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS;
      else
         png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS;

      if (keep == PNG_HANDLE_CHUNK_ALWAYS)
         png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS;
      else
         png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS;
      return;
   }
   if (chunk_list == NULL)
      return;
   old_num_chunks = png_ptr->num_chunk_list;
   new_list=(png_bytep)png_malloc(png_ptr,
      (png_size_t)
       (5*(num_chunks + old_num_chunks)));
   if (png_ptr->chunk_list != NULL)
   {
      png_memcpy(new_list, png_ptr->chunk_list,
          (png_size_t)(5*old_num_chunks));
      png_free(png_ptr, png_ptr->chunk_list);
      png_ptr->chunk_list=NULL;
   }
   png_memcpy(new_list + 5*old_num_chunks, chunk_list,
       (png_size_t)(5*num_chunks));
   for (p = new_list + 5*old_num_chunks + 4, i = 0; i<num_chunks; i++, p += 5)
      *p=(png_byte)keep;
   png_ptr->num_chunk_list = old_num_chunks + num_chunks;
   png_ptr->chunk_list = new_list;
   png_ptr->free_me |= PNG_FREE_LIST;
}

// Assembly:
testq %rdi, %rdi
je 0x7bf75
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
testl %ecx, %ecx
je 0x7bf2e
movq %rdx, %r12
testq %rdx, %rdx
je 0x7bf67
movslq 0x3f0(%rbx), %r13
movslq %r14d, %rax
addq %r13, %rax
movq %rax, (%rsp)
leaq (%rax,%rax,4), %rsi
movq %rbx, %rdi
callq 0x848bb
movq %rax, %r15
movq 0x3f8(%rbx), %rsi
leaq (%r13,%r13,4), %r13
testq %rsi, %rsi
je 0x7bee2
movq %r15, %rdi
movq %r13, %rdx
callq 0xe380
movq 0x3f8(%rbx), %rsi
movq %rbx, %rdi
callq 0x84923
andq $0x0, 0x3f8(%rbx)
leaq (%r15,%r13), %rdi
leal (%r14,%r14,4), %eax
movslq %eax, %rdx
movq %r12, %rsi
callq 0xe380
leaq (%r15,%r13), %rax
addq $0x4, %rax
xorl %ecx, %ecx
testl %r14d, %r14d
cmovgl %r14d, %ecx
subl $0x1, %ecx
jb 0x7bf14
movb %bpl, (%rax)
addq $0x5, %rax
jmp 0x7bf06
movq (%rsp), %rax
movl %eax, 0x3f0(%rbx)
movq %r15, 0x3f8(%rbx)
orb $0x4, 0x3d9(%rbx)
jmp 0x7bf67
movl %ebp, %eax
andl $-0x2, %eax
cmpl $0x2, %eax
jne 0x7bf4a
movl 0x120(%rbx), %eax
cmpl $0x3, %ebp
jne 0x7bf57
orl $0x18000, %eax          # imm = 0x18000
jmp 0x7bf61
movl $0xffff7fff, %eax       # imm = 0xFFFF7FFF
andl 0x120(%rbx), %eax
jmp 0x7bf5c
orl $0x8000, %eax           # imm = 0x8000
andl $0xfffeffff, %eax       # imm = 0xFFFEFFFF
movl %eax, 0x120(%rbx)
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/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 0x7bfdf
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 0x7bfc8
pushq $0x40
popq %rdx
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x7a3b5
movq %r14, 0x140(%rbx)
testq %r14, %r14
je 0x7bfd8
orb $-0x80, 0x9(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c02e
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x198(%rdi), %rsi
callq 0x84923
movq %r14, 0x1a0(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x848bb
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_O2/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 0x7c309
testq %rdx, %rdx
je 0x7c309
movl 0x8(%rsi), %ecx
andl $0x20, %ecx
je 0x7c309
addq $0x72, %rsi
movq %rsi, (%rdx)
pushq $0x20
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c3ce
testb $0x4, 0x8(%rsi)
je 0x7c3ce
testq %rdx, %rdx
je 0x7c33e
cvtss2sd 0xa0(%rsi), %xmm0
movsd %xmm0, (%rdx)
testq %rcx, %rcx
je 0x7c34f
cvtss2sd 0xa4(%rsi), %xmm0
movsd %xmm0, (%rcx)
testq %r8, %r8
je 0x7c361
cvtss2sd 0xa8(%rsi), %xmm0
movsd %xmm0, (%r8)
movq 0x8(%rsp), %rax
testq %r9, %r9
je 0x7c378
cvtss2sd 0xac(%rsi), %xmm0
movsd %xmm0, (%r9)
movq 0x10(%rsp), %rcx
testq %rax, %rax
je 0x7c38e
cvtss2sd 0xb0(%rsi), %xmm0
movsd %xmm0, (%rax)
movq 0x18(%rsp), %rax
testq %rcx, %rcx
je 0x7c3a4
cvtss2sd 0xb4(%rsi), %xmm0
movsd %xmm0, (%rcx)
movq 0x20(%rsp), %rcx
testq %rax, %rax
je 0x7c3ba
cvtss2sd 0xb8(%rsi), %xmm0
movsd %xmm0, (%rax)
pushq $0x4
popq %rax
testq %rcx, %rcx
je 0x7c3ce
cvtss2sd 0xbc(%rsi), %xmm0
movsd %xmm0, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c473
testb $0x4, 0x8(%rsi)
je 0x7c473
testq %rdx, %rdx
je 0x7c3ff
movl 0x14c(%rsi), %eax
movl %eax, (%rdx)
testq %rcx, %rcx
je 0x7c40c
movl 0x150(%rsi), %eax
movl %eax, (%rcx)
testq %r8, %r8
je 0x7c41a
movl 0x154(%rsi), %eax
movl %eax, (%r8)
movq 0x8(%rsp), %rax
testq %r9, %r9
je 0x7c42d
movl 0x158(%rsi), %ecx
movl %ecx, (%r9)
movq 0x10(%rsp), %rcx
testq %rax, %rax
je 0x7c43f
movl 0x15c(%rsi), %edx
movl %edx, (%rax)
movq 0x18(%rsp), %rax
testq %rcx, %rcx
je 0x7c451
movl 0x160(%rsi), %edx
movl %edx, (%rcx)
movq 0x20(%rsp), %rcx
testq %rax, %rax
je 0x7c463
movl 0x164(%rsi), %edx
movl %edx, (%rax)
pushq $0x4
popq %rax
testq %rcx, %rcx
je 0x7c473
movl 0x168(%rsi), %edx
movl %edx, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c4a1
testq %rdx, %rdx
je 0x7c4a1
movl 0x8(%rsi), %ecx
andl $0x1, %ecx
je 0x7c4a1
cvtss2sd 0x34(%rsi), %xmm0
movsd %xmm0, (%rdx)
pushq $0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c4ce
testq %rdx, %rdx
je 0x7c4ce
movl 0x8(%rsi), %ecx
andl $0x1, %ecx
je 0x7c4ce
movl 0x148(%rsi), %eax
movl %eax, (%rdx)
pushq $0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c4fd
testq %rdx, %rdx
je 0x7c4fd
movl $0x800, %ecx            # imm = 0x800
andl 0x8(%rsi), %ecx
je 0x7c4fd
movzbl 0x38(%rsi), %eax
movl %eax, (%rdx)
movl $0x800, %eax            # imm = 0x800
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c557
testq %r9, %r9
je 0x7c557
testq %r8, %r8
je 0x7c557
testq %rdx, %rdx
je 0x7c557
movl $0x1000, %edi           # imm = 0x1000
andl 0x8(%rsi), %edi
je 0x7c557
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_O2/tomfunkhouser[P]gaps/pkgs/png/pngget.c
// Function: png_get_sPLT
png_uint_32 PNGAPI
png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
             png_sPLT_tpp spalettes)
{
   if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
   {
     *spalettes = info_ptr->splt_palettes;
     return ((png_uint_32)info_ptr->splt_palettes_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 0x7c584
movq 0x110(%rsi), %rax
movq %rax, (%rdx)
movl 0x118(%rsi), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c5b3
testq %rdx, %rdx
je 0x7c5b3
movl 0x8(%rsi), %ecx
andl $0x40, %ecx
je 0x7c5b3
movq 0x98(%rsi), %rax
movq %rax, (%rdx)
pushq $0x40
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7c680
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 0x7c63e
movzbl 0x26(%rsi), %edx
movl %edx, (%r10)
movq 0x10(%rsp), %rdx
testq %rax, %rax
je 0x7c650
movzbl 0x27(%rsi), %r9d
movl %r9d, (%rax)
movzbl 0x28(%rsi), %r9d
testq %rdx, %rdx
je 0x7c65d
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 0x7aabc
popq %rax
popq %rcx
pushq $0x1
popq %rax
addq $0x8, %rsp
retq