LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8c25e
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x9d38c
testl %eax, %eax
jle 0x8c256
movl %eax, %ebp
movl 0x1c0(%r14), %eax
xorl %r15d, %r15d
testl %eax, %eax
movl $0x0, %eax
je 0x8c24e
xorl %r12d, %r12d
movq (%rbx,%r12,8), %rsi
movq %r14, %rdi
callq 0x8bfc7
movl 0x1c0(%r14), %eax
incq %r12
cmpl %eax, %r12d
jb 0x8c233
incl %r15d
cmpl %ebp, %r15d
jne 0x8c227
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x8c303
movq %rdi, %rbx
movl 0x1e4(%rdi), %eax
cmpl 0x1c4(%rdi), %eax
jae 0x8c303
leaq 0x128(%rbx), %r14
leaq 0x20663(%rip), %r15     # 0xac902
movq %r14, %rdi
movl $0x2, %esi
callq 0x92f18
testl %eax, %eax
je 0x8c2c6
movq 0x158(%rbx), %rsi
testq %rsi, %rsi
cmoveq %r15, %rsi
movq %rbx, %rdi
callq 0x920b4
movl 0x148(%rbx), %eax
testq %rax, %rax
jne 0x8c309
movq 0x198(%rbx), %rsi
movq 0x1a0(%rbx), %rdx
movq %rbx, %rdi
callq 0x9ded8
movq 0x198(%rbx), %rax
movq %rax, 0x140(%rbx)
movl 0x1a0(%rbx), %eax
movl %eax, 0x148(%rbx)
jmp 0x8c29f
popq %rbx
popq %r14
popq %r15
retq
movq 0x1a0(%rbx), %rdx
subq %rax, %rdx
je 0x8c33e
movq 0x198(%rbx), %rsi
movq %rbx, %rdi
callq 0x9ded8
movq 0x198(%rbx), %rax
movq %rax, 0x140(%rbx)
movl 0x1a0(%rbx), %eax
movl %eax, 0x148(%rbx)
movl $0x0, 0x284(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xa0b51
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8c7fc
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
cmpl $0xf, %esi
jle 0x8c7c5
leaq 0x204f4(%rip), %rsi     # 0xaccb7
jmp 0x8c7e1
cmpl $0x8, %ebp
jge 0x8c7d3
leaq 0x20517(%rip), %rsi     # 0xacce8
jmp 0x8c7e1
jne 0x8c7e9
movl $0x9, %ebp
leaq 0x20538(%rip), %rsi     # 0xacd19
movq %rbx, %rdi
callq 0x9214d
orb $0x8, 0x120(%rbx)
movl %ebp, 0x1b0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8c835
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x8, %esi
je 0x8c81f
leaq 0x2052b(%rip), %rsi     # 0xacd42
movq %r14, %rdi
callq 0x9214d
orb $0x10, 0x120(%r14)
movl %ebx, 0x1ac(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8ca44
testl %edx, %edx
je 0x8ca45
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 0x2046d(%rip), %rsi     # 0xaceb9
jmp 0x9214d
// File: /workspace/github_cpp_makefile_star2_O3/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 0x8d3a9
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
addsd 0x14cdc(%rip), %xmm2    # 0xa2048
andpd 0x14efc(%rip), %xmm2    # 0xa2270
ucomisd 0x1faf4(%rip), %xmm2    # 0xace70
ja 0x8d392
movb 0x24e(%rdi), %al
testb $0x4, %al
sete %cl
cmpb $0x3, %al
setne %al
testb %cl, %al
jne 0x8d399
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_O3/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 0x8d44f
cvtsd2ss %xmm1, %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x1f116(%rip), %xmm2    # 0xac538
mulsd %xmm2, %xmm1
movsd 0x14c02(%rip), %xmm3    # 0xa2030
addsd %xmm3, %xmm1
cvttsd2si %xmm1, %ecx
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm0
cvttsd2si %xmm0, %edx
jmp 0x8d450
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/pngrtran.c
// Function: png_do_read_intrapixel
void /* PRIVATE */
png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
{
   png_debug(1, "in png_do_read_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)((256 + *rp + *(rp+1))&0xff);
            *(rp+2) = (png_byte)((256 + *(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 + 65536L) & 0xffffL);
            png_uint_32 blue = (png_uint_32)((s2 + s1 + 65536L) & 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 0x917df
movl (%rdi), %eax
movzbl 0x11(%rdi), %edx
cmpl $0x10, %edx
je 0x91769
cmpl $0x8, %edx
jne 0x917df
cmpl $0x2, %ecx
je 0x9177a
cmpl $0x6, %ecx
jne 0x917df
movl $0x4, %ecx
jmp 0x9177f
cmpl $0x2, %ecx
je 0x91798
cmpl $0x6, %ecx
jne 0x917df
movl $0x8, %ecx
jmp 0x9179d
movl $0x3, %ecx
testl %eax, %eax
je 0x917df
addq $0x2, %rsi
movb -0x1(%rsi), %dl
addb %dl, -0x2(%rsi)
addb %dl, (%rsi)
addq %rcx, %rsi
decl %eax
jne 0x91787
jmp 0x917df
movl $0x6, %ecx
testl %eax, %eax
je 0x917df
addq $0x5, %rsi
movzwl -0x5(%rsi), %edx
movzwl -0x3(%rsi), %edi
rolw $0x8, %dx
movzwl %dx, %edx
rolw $0x8, %di
movzwl %di, %edi
movzwl -0x1(%rsi), %r8d
rolw $0x8, %r8w
movzwl %r8w, %ebx
addl %edi, %edx
addl %edi, %ebx
movb %dh, -0x5(%rsi)
movb %dl, -0x4(%rsi)
movb %bh, -0x1(%rsi)
movb %bl, (%rsi)
addq %rcx, %rsi
decl %eax
jne 0x917a5
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/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 0x91eaf
movl (%rdi), %eax
movzbl 0x11(%rdi), %edx
cmpl $0x10, %edx
je 0x91e39
cmpl $0x8, %edx
jne 0x91eaf
cmpl $0x2, %ecx
je 0x91e4a
cmpl $0x6, %ecx
jne 0x91eaf
movl $0x4, %ecx
jmp 0x91e4f
cmpl $0x2, %ecx
je 0x91e68
cmpl $0x6, %ecx
jne 0x91eaf
movl $0x8, %ecx
jmp 0x91e6d
movl $0x3, %ecx
testl %eax, %eax
je 0x91eaf
addq $0x2, %rsi
movb -0x1(%rsi), %dl
subb %dl, -0x2(%rsi)
subb %dl, (%rsi)
addq %rcx, %rsi
decl %eax
jne 0x91e57
jmp 0x91eaf
movl $0x6, %ecx
testl %eax, %eax
je 0x91eaf
addq $0x5, %rsi
movzwl -0x5(%rsi), %edx
movzwl -0x3(%rsi), %edi
rolw $0x8, %dx
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
decl %eax
jne 0x91e75
popq %rbx
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/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 0x91fa8
testq %rax, %rax
je 0x91fa6
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0xe260
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x92086
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 0x91fa8
movl %ebp, 0x120(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rax
testq %rdi, %rdi
je 0x92189
cmpb $0x23, (%rsi)
jne 0x92175
movl $0x1, %eax
cmpb $0x20, (%rsi,%rax)
je 0x92171
incq %rax
cmpq $0xf, %rax
jne 0x9215d
movl $0xf, %eax
movl %eax, %eax
jmp 0x92177
xorl %eax, %eax
movq 0xd8(%rdi), %rcx
addq %rax, %rsi
testq %rcx, %rcx
je 0x92193
popq %rax
jmpq *%rcx
movq %rsi, %rdi
callq 0xee36
jmp 0x9219b
movq %rsi, %rdi
callq 0xee0e
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x921b6
xorl %edi, %edi
movq %rdx, %rsi
callq 0x920b4
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x921cf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x920b4
// File: /workspace/github_cpp_makefile_star2_O3/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 0x1adf8(%rip), %rcx     # 0xacfd0
xorl %r8d, %r8d
movb 0x244(%rdi,%rax), %r10b
leal -0x7b(%r10), %r9d
cmpb $-0x3a, %r9b
setb %r9b
leal -0x5b(%r10), %r11d
cmpb $0x6, %r11b
setb %r11b
orb %r9b, %r11b
movslq %r8d, %r9
cmpb $0x1, %r11b
jne 0x92239
movzbl %r10b, %r8d
movb $0x5b, (%rsi,%r9)
movl %r8d, %r10d
shrl $0x4, %r10d
movb (%r10,%rcx), %r10b
movb %r10b, 0x1(%rsi,%r9)
andl $0xf, %r8d
movb (%r8,%rcx), %r8b
movb %r8b, 0x2(%rsi,%r9)
leal 0x4(%r9), %r8d
movb $0x5d, 0x3(%rsi,%r9)
jmp 0x92241
leal 0x1(%r9), %r8d
movb %r10b, (%rsi,%r9)
incq %rax
cmpq $0x4, %rax
jne 0x921db
movslq %r8d, %rax
addq %rax, %rsi
testq %rdx, %rdx
je 0x9227d
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_O3/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:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rdx
testq %rdi, %rdi
je 0x922b1
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rsi
callq 0x921cf
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9214d
addq $0x58, %rsp
popq %rbx
popq %r14
retq
movq %rdx, %rdi
callq 0xee5e
jmp 0x922a9
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x92b5d
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rsi
testq %rsi, %rsi
je 0x92b56
movl 0x8(%rsi), %r14d
leal -0x45(%r14), %ecx
cmpl $0x2c, %ecx
ja 0x92b5e
movabsq $0x100400400011, %rdx   # imm = 0x100400400011
btq %rcx, %rdx
jae 0x92b5e
movq 0x10(%rsi), %rax
testq %rax, %rax
je 0x92af3
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x68(%rsi), %rax
testq %rax, %rax
je 0x92b0a
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x60(%rsi), %rax
testq %rax, %rax
je 0x92b21
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x50(%rsi), %rax
testq %rax, %rax
je 0x92b38
movq 0x50(%rbx), %rdi
movq %rax, %rsi
callq *0x48(%rbx)
movq 0x38(%rbx), %rsi
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
movq $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 0x92adc
cmpl $0x2a, %r14d
je 0x92adc
jmp 0x92b56
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movl $0xfffffffe, %r15d      # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x92cad
movq %rdi, %r14
movq 0x38(%rdi), %rbx
testq %rbx, %rbx
je 0x92cad
cmpq $0x0, 0x40(%r14)
je 0x92cad
cmpq $0x0, 0x48(%r14)
je 0x92cad
movq $0x0, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%r14)
movl $0x2, 0x58(%r14)
movl $0x0, 0x28(%rbx)
movq 0x10(%rbx), %rax
movq %rax, 0x20(%rbx)
movl 0x2c(%rbx), %eax
testl %eax, %eax
jns 0x92be4
negl %eax
movl %eax, 0x2c(%rbx)
testl %eax, %eax
movl $0x71, %ecx
movl $0x2a, %edx
cmovel %ecx, %edx
movl %edx, 0x8(%rbx)
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
cmpl $0x2, %eax
jne 0x92c08
callq 0x92310
jmp 0x92c0d
callq 0xa0be4
movq %rax, 0x60(%r14)
xorl %r15d, %r15d
movl %r15d, 0x40(%rbx)
movq %rbx, %rdi
callq 0x97738
movl 0x44(%rbx), %eax
addq %rax, %rax
movq %rax, 0x58(%rbx)
movq 0x68(%rbx), %rdi
movl 0x74(%rbx), %edx
decl %edx
movw $0x0, (%rdi,%rdx,2)
addq %rdx, %rdx
xorl %esi, %esi
callq 0xe260
movslq 0xb4(%rbx), %rax
shlq $0x4, %rax
leaq 0x51fdb(%rip), %rcx     # 0xe4c30
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)
movq %r15, 0x88(%rbx)
movabsq $0x200000000, %rax      # imm = 0x200000000
movq %rax, 0xa4(%rbx)
movl $0x2, 0x90(%rbx)
movq %r15, 0x98(%rbx)
movl %r15d, 0x70(%rbx)
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x92dda
movq %rsi, %r15
movq %rdi, %r12
movq 0x38(%rdi), %r13
testq %r13, %r13
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x92dda
movl %edx, %ebx
movl 0x2c(%r13), %eax
testl %eax, %eax
je 0x92d23
cmpl $0x2, %eax
je 0x92dda
cmpl $0x1, %eax
jne 0x92d0f
cmpl $0x2a, 0x8(%r13)
jne 0x92dda
movq 0x60(%r12), %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0xa0be4
movq %rax, 0x60(%r12)
xorl %r14d, %r14d
cmpl $0x3, %ebx
jb 0x92dda
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 0xe370
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), %r9d
xorl %edx, %r9d
movl 0x7c(%r13), %edx
andl %edx, %r9d
movl %r9d, 0x70(%r13)
movq 0x68(%r13), %rsi
movq 0x60(%r13), %rdi
movl 0x4c(%r13), %r8d
leal -0x2(%rbx), %r10d
cmpl $0x1, %r10d
adcl $-0x2, %ebx
xorl %r10d, %r10d
shll %cl, %r9d
leal 0x2(%r10), %r11d
movzbl (%rax,%r11), %r11d
xorl %r9d, %r11d
andl %edx, %r11d
movl %r11d, 0x70(%r13)
movzwl (%rsi,%r11,2), %r9d
movl %r8d, %r15d
andl %r10d, %r15d
movw %r9w, (%rdi,%r15,2)
movw %r10w, (%rsi,%r11,2)
incq %r10
movl %r11d, %r9d
cmpq %r10, %rbx
jne 0x92da4
movl %r14d, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x92f17
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x38(%rdi), %r14
testq %r14, %r14
je 0x92f0f
movl %edx, %ebx
cmpl $-0x1, %esi
movl $0x6, %ebp
cmovnel %esi, %ebp
cmpl $0xa, %ebp
setae %cl
cmpl $0x5, %edx
setae %dl
orb %cl, %dl
jne 0x92f0f
leaq 0x51dae(%rip), %r15     # 0xe4c30
movl %ebp, %r12d
cmpl %ebx, 0xb8(%r14)
jne 0x92eac
movslq 0xb4(%r14), %rax
shlq $0x4, %rax
movq 0x8(%rax,%r15), %rax
movq %r12, %rcx
shlq $0x4, %rcx
cmpq 0x8(%rcx,%r15), %rax
je 0x92ebf
cmpq $0x0, 0x10(%rdi)
je 0x92ebf
movl $0x5, %esi
callq 0x92f18
jmp 0x92ec1
xorl %eax, %eax
cmpl %ebp, 0xb4(%r14)
je 0x92f08
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
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/deflate.c
// Function: deflateBound
uLong ZEXPORT deflateBound(strm, sourceLen)
    z_streamp strm;
    uLong sourceLen;
{
    deflate_state *s;
    uLong complen, wraplen;
    Bytef *str;

    /* conservative upper bound for compressed data */
    complen = sourceLen +
              ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5;

    /* if can't get parameters, return conservative bound plus zlib wrapper */
    if (strm == Z_NULL || strm->state == Z_NULL)
        return complen + 6;

    /* compute wrapper length */
    s = strm->state;
    switch (s->wrap) {
    case 0:                                 /* raw deflate */
        wraplen = 0;
        break;
    case 1:                                 /* zlib wrapper */
        wraplen = 6 + (s->strstart ? 4 : 0);
        break;
    case 2:                                 /* gzip wrapper */
        wraplen = 18;
        if (s->gzhead != Z_NULL) {          /* user-supplied gzip header */
            if (s->gzhead->extra != Z_NULL)
                wraplen += 2 + s->gzhead->extra_len;
            str = s->gzhead->name;
            if (str != Z_NULL)
                do {
                    wraplen++;
                } while (*str++);
            str = s->gzhead->comment;
            if (str != Z_NULL)
                do {
                    wraplen++;
                } while (*str++);
            if (s->gzhead->hcrc)
                wraplen += 2;
        }
        break;
    default:                                /* for compiler happiness */
        wraplen = 6;
    }

    /* if not default parameters, return conservative bound */
    if (s->w_bits != 15 || s->hash_bits != 8 + 7)
        return complen + wraplen;

    /* default settings: return tight bound for that case */
    return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
           (sourceLen >> 25) + 13 - 6 + wraplen;
}

// Assembly:
leaq 0x7(%rsi), %rcx
movq %rcx, %rax
shrq $0x3, %rax
addq %rsi, %rax
leaq 0x3f(%rsi), %rdx
shrq $0x6, %rdx
testq %rdi, %rdi
je 0x938f1
movq 0x38(%rdi), %rdi
testq %rdi, %rdi
je 0x938f1
movl 0x2c(%rdi), %r10d
testq %r10, %r10
je 0x93966
cmpl $0x2, %r10d
je 0x938f9
cmpl $0x1, %r10d
jne 0x93917
xorl %r8d, %r8d
cmpl $0x0, 0x9c(%rdi)
setne %r8b
leaq 0x6(,%r8,4), %r10
jmp 0x93966
addq %rdx, %rax
addq $0xb, %rax
retq
movq 0x30(%rdi), %r8
testq %r8, %r8
je 0x9391f
cmpq $0x0, 0x18(%r8)
je 0x93927
movl 0x20(%r8), %r9d
addl $0x2, %r9d
addq $0x12, %r9
jmp 0x9392d
movl $0x6, %r10d
jmp 0x93966
movl $0x12, %r10d
jmp 0x93966
movl $0x12, %r9d
movq 0x28(%r8), %r10
testq %r10, %r10
je 0x93943
incq %r9
cmpb $0x0, (%r10)
leaq 0x1(%r10), %r10
jne 0x93936
movq 0x38(%r8), %r10
testq %r10, %r10
je 0x93959
incq %r9
cmpb $0x0, (%r10)
leaq 0x1(%r10), %r10
jne 0x9394c
leaq 0x2(%r9), %r10
cmpl $0x0, 0x44(%r8)
cmoveq %r9, %r10
cmpl $0xf, 0x48(%rdi)
jne 0x93994
cmpl $0xf, 0x78(%rdi)
jne 0x93994
movq %rsi, %rax
shrq $0xc, %rax
movq %rsi, %rdx
shrq $0xe, %rdx
shrq $0x19, %rsi
addq %rdx, %rsi
addq %rax, %rcx
addq %rsi, %rcx
addq %r10, %rcx
movq %rcx, %rax
retq
addq %rdx, %rax
addq $0x5, %rax
addq %r10, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/deflate.c
// Function: deflate_huff
local block_state deflate_huff(s, flush)
    deflate_state *s;
    int flush;
{
    int bflush;             /* set if current block must be flushed */

    for (;;) {
        /* Make sure that we have a literal to write. */
        if (s->lookahead == 0) {
            fill_window(s);
            if (s->lookahead == 0) {
                if (flush == Z_NO_FLUSH)
                    return need_more;
                break;      /* flush the current block */
            }
        }

        /* Output a literal byte */
        s->match_length = 0;
        Tracevv((stderr,"%c", s->window[s->strstart]));
        _tr_tally_lit (s, s->window[s->strstart], bflush);
        s->lookahead--;
        s->strstart++;
        if (bflush) FLUSH_BLOCK(s, 0);
    }
    FLUSH_BLOCK(s, flush == Z_FINISH);
    return flush == Z_FINISH ? finish_done : block_done;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %ebp, %ebp
cmpl $0x0, 0xa4(%r14)
jne 0x93a1c
movq %r14, %rdi
callq 0x94ab7
cmpl $0x0, 0xa4(%r14)
je 0x93ae0
movl $0x0, 0x90(%r14)
movq 0x50(%r14), %rax
movl 0x9c(%r14), %ecx
movzbl (%rax,%rcx), %eax
movq 0x1700(%r14), %rcx
movl 0x16fc(%r14), %edx
movw $0x0, (%rcx,%rdx,2)
movq 0x16f0(%r14), %rcx
leal 0x1(%rdx), %esi
movl %esi, 0x16fc(%r14)
movb %al, (%rcx,%rdx)
incw 0xc4(%r14,%rax,4)
movl 0x16fc(%r14), %ecx
movl 0x16f8(%r14), %edx
decl %edx
decl 0xa4(%r14)
movl 0x9c(%r14), %eax
incl %eax
movl %eax, 0x9c(%r14)
cmpl %edx, %ecx
jne 0x939fc
movq 0x88(%r14), %rcx
testq %rcx, %rcx
js 0x93aaa
movl %ecx, %esi
addq 0x50(%r14), %rsi
jmp 0x93aac
xorl %esi, %esi
movl %eax, %edx
subq %rcx, %rdx
movq %r14, %rdi
xorl %ecx, %ecx
callq 0x97fbc
movl 0x9c(%r14), %eax
movq %rax, 0x88(%r14)
movq (%r14), %rdi
callq 0x9399f
movq (%r14), %rax
cmpl $0x0, 0x20(%rax)
jne 0x939fc
jmp 0x93b53
testl %ebx, %ebx
je 0x93af8
movq 0x88(%r14), %rax
testq %rax, %rax
js 0x93afc
movl %eax, %esi
addq 0x50(%r14), %rsi
jmp 0x93afe
xorl %ebp, %ebp
jmp 0x93b53
xorl %esi, %esi
movl 0x9c(%r14), %edx
subq %rax, %rdx
xorl %ecx, %ecx
cmpl $0x4, %ebx
sete %cl
movq %r14, %rdi
callq 0x97fbc
movl 0x9c(%r14), %eax
movq %rax, 0x88(%r14)
movq (%r14), %rdi
callq 0x9399f
movq (%r14), %rax
cmpl $0x0, 0x20(%rax)
je 0x93b48
xorl %eax, %eax
cmpl $0x4, %ebx
sete %al
leal 0x1(,%rax,2), %ebp
jmp 0x93b53
xorl %ebp, %ebp
cmpl $0x4, %ebx
sete %bpl
addl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/inflate.c
// Function: inflateReset2
int ZEXPORT inflateReset2(strm, windowBits)
z_streamp strm;
int windowBits;
{
    int wrap;
    struct inflate_state FAR *state;

    /* get the state */
    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;

    /* extract wrap request from windowBits parameter */
    if (windowBits < 0) {
        wrap = 0;
        windowBits = -windowBits;
    }
    else {
        wrap = (windowBits >> 4) + 1;
#ifdef GUNZIP
        if (windowBits < 48)
            windowBits &= 15;
#endif
    }

    /* set number of window bits, free window if different */
    if (windowBits && (windowBits < 8 || windowBits > 15))
        return Z_STREAM_ERROR;
    if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
        ZFREE(strm, state->window);
        state->window = Z_NULL;
    }

    /* update state and reset the rest of it */
    state->wrap = wrap;
    state->wbits = (unsigned)windowBits;
    return inflateReset(strm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x95018
movq %rdi, %rbx
movq 0x38(%rdi), %r15
testq %r15, %r15
je 0x95018
movl %esi, %r14d
testl %esi, %esi
js 0x94fcd
movl %r14d, %ebp
shrl $0x4, %ebp
incl %ebp
movl %r14d, %eax
andl $0xf, %eax
cmpl $0x30, %r14d
cmovael %r14d, %eax
movl %eax, %r14d
jmp 0x94fd2
negl %r14d
xorl %ebp, %ebp
leal -0x8(%r14), %eax
cmpl $0x8, %eax
jae 0x95013
movq 0x40(%r15), %rsi
testq %rsi, %rsi
je 0x94ff9
cmpl %r14d, 0x30(%r15)
je 0x94ff9
movq 0x50(%rbx), %rdi
callq *0x48(%rbx)
movq $0x0, 0x40(%r15)
movl %ebp, 0x8(%r15)
movl %r14d, 0x30(%r15)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x94f20
testl %r14d, %r14d
je 0x94fdb
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/inflate.c
// Function: inflateInit2_
int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
z_streamp strm;
int windowBits;
const char *version;
int stream_size;
{
    int ret;
    struct inflate_state FAR *state;

    if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
        stream_size != (int)(sizeof(z_stream)))
        return Z_VERSION_ERROR;
    if (strm == Z_NULL) return Z_STREAM_ERROR;
    strm->msg = Z_NULL;                 /* in case we return an error */
    if (strm->zalloc == (alloc_func)0) {
        strm->zalloc = zcalloc;
        strm->opaque = (voidpf)0;
    }
    if (strm->zfree == (free_func)0) strm->zfree = zcfree;
    state = (struct inflate_state FAR *)
            ZALLOC(strm, 1, sizeof(struct inflate_state));
    if (state == Z_NULL) return Z_MEM_ERROR;
    Tracev((stderr, "inflate: allocated\n"));
    strm->state = (struct internal_state FAR *)state;
    state->window = Z_NULL;
    ret = inflateReset2(strm, windowBits);
    if (ret != Z_OK) {
        ZFREE(strm, state);
        strm->state = Z_NULL;
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0xfffffffa, %r14d      # imm = 0xFFFFFFFA
testq %rdx, %rdx
je 0x950f0
cmpl $0x70, %ecx
jne 0x950f0
cmpb $0x31, (%rdx)
jne 0x950f0
movq %rdi, %rbx
testq %rdi, %rdi
je 0x950dd
movl %esi, %ebp
movq $0x0, 0x30(%rbx)
movq 0x40(%rbx), %rax
testq %rax, %rax
jne 0x95082
leaq 0x4939(%rip), %rax      # 0x999af
movq %rax, 0x40(%rbx)
movq $0x0, 0x50(%rbx)
cmpq $0x0, 0x48(%rbx)
jne 0x95094
leaq 0x4929(%rip), %rcx      # 0x999b9
movq %rcx, 0x48(%rbx)
movq 0x50(%rbx), %rdi
movl $0x1, %esi
movl $0x1bf0, %edx           # imm = 0x1BF0
callq *%rax
testq %rax, %rax
je 0x950e5
movq %rax, %r15
movq %rax, 0x38(%rbx)
movq $0x0, 0x40(%rax)
movq %rbx, %rdi
movl %ebp, %esi
callq 0x94f93
testl %eax, %eax
je 0x950ed
movl %eax, %r14d
movq 0x50(%rbx), %rdi
movq %r15, %rsi
callq *0x48(%rbx)
movq $0x0, 0x38(%rbx)
jmp 0x950f0
movl $0xfffffffe, %r14d      # imm = 0xFFFFFFFE
jmp 0x950f0
movl $0xfffffffc, %r14d      # imm = 0xFFFFFFFC
jmp 0x950f0
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/inflate.c
// Function: inflatePrime
int ZEXPORT inflatePrime(strm, bits, value)
z_streamp strm;
int bits;
int value;
{
    struct inflate_state FAR *state;

    if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
    state = (struct inflate_state FAR *)strm->state;
    if (bits < 0) {
        state->hold = 0;
        state->bits = 0;
        return Z_OK;
    }
    if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
    value &= (1L << bits) - 1;
    state->hold += value << state->bits;
    state->bits += bits;
    return Z_OK;
}

// Assembly:
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
testq %rdi, %rdi
je 0x95169
movq 0x38(%rdi), %r8
testq %r8, %r8
je 0x95169
testl %esi, %esi
js 0x95157
cmpl $0x10, %esi
ja 0x95169
movl 0x50(%r8), %edi
leal (%rdi,%rsi), %r9d
cmpl $0x20, %r9d
ja 0x95169
movq $-0x1, %rax
movl %esi, %ecx
shlq %cl, %rax
notl %eax
andl %edx, %eax
movl %edi, %ecx
shll %cl, %eax
cltq
addq %rax, 0x48(%r8)
movl %r9d, 0x50(%r8)
jmp 0x95167
movq $0x0, 0x48(%r8)
movl $0x0, 0x50(%r8)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/inflate.c
// Function: updatewindow
local int updatewindow(strm, out)
z_streamp strm;
unsigned out;
{
    struct inflate_state FAR *state;
    unsigned copy, dist;

    state = (struct inflate_state FAR *)strm->state;

    /* if it hasn't been done already, allocate space for the window */
    if (state->window == Z_NULL) {
        state->window = (unsigned char FAR *)
                        ZALLOC(strm, 1U << state->wbits,
                               sizeof(unsigned char));
        if (state->window == Z_NULL) return 1;
    }

    /* if window not in use yet, initialize */
    if (state->wsize == 0) {
        state->wsize = 1U << state->wbits;
        state->wnext = 0;
        state->whave = 0;
    }

    /* copy state->wsize or less output bytes into the circular window */
    copy = out - strm->avail_out;
    if (copy >= state->wsize) {
        zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
        state->wnext = 0;
        state->whave = state->wsize;
    }
    else {
        dist = state->wsize - state->wnext;
        if (dist > copy) dist = copy;
        zmemcpy(state->window + state->wnext, strm->next_out - copy, dist);
        copy -= dist;
        if (copy) {
            zmemcpy(state->window, strm->next_out - copy, copy);
            state->wnext = copy;
            state->whave = state->wsize;
        }
        else {
            state->wnext += dist;
            if (state->wnext == state->wsize) state->wnext = 0;
            if (state->whave < state->wsize) state->whave += dist;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
movq 0x38(%rdi), %r12
movq 0x40(%r12), %rdi
testq %rdi, %rdi
jne 0x96d4c
movq 0x50(%r14), %rdi
movb 0x30(%r12), %cl
movl $0x1, %ebp
movl $0x1, %esi
shll %cl, %esi
movl $0x1, %edx
callq *0x40(%r14)
movq %rax, %rdi
movq %rax, 0x40(%r12)
testq %rax, %rax
je 0x96de0
movl 0x34(%r12), %ebp
testl %ebp, %ebp
jne 0x96d6f
movb 0x30(%r12), %cl
movl $0x1, %ebp
shll %cl, %ebp
movl %ebp, 0x34(%r12)
movq $0x0, 0x38(%r12)
subl 0x20(%r14), %ebx
cmpl %ebp, %ebx
jae 0x96dbd
movl 0x3c(%r12), %eax
subl %eax, %ebp
cmpl %ebx, %ebp
movl %ebx, %r15d
cmovbl %ebp, %r15d
addq %rax, %rdi
movq 0x18(%r14), %rsi
movl %ebx, %eax
subq %rax, %rsi
movq %r15, %rdx
callq 0xe370
cmpl %ebp, %ebx
jbe 0x96deb
subl %r15d, %ebx
movq 0x40(%r12), %rdi
movq 0x18(%r14), %rsi
subq %rbx, %rsi
movq %rbx, %rdx
callq 0xe370
movl %ebx, 0x3c(%r12)
jmp 0x96dd4
movq 0x18(%r14), %rsi
movl %ebp, %edx
subq %rdx, %rsi
callq 0xe370
movl $0x0, 0x3c(%r12)
movl 0x34(%r12), %eax
movl %eax, 0x38(%r12)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl 0x3c(%r12), %ecx
addl %r15d, %ecx
movl 0x34(%r12), %edx
movl 0x38(%r12), %eax
xorl %ebp, %ebp
cmpl %edx, %ecx
cmovel %ebp, %ecx
movl %ecx, 0x3c(%r12)
cmpl %edx, %eax
jae 0x96de0
addl %r15d, %eax
movl %eax, 0x38(%r12)
jmp 0x96de0
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: tr_align
void ZLIB_INTERNAL _tr_align(s)
    deflate_state *s;
{
    send_bits(s, STATIC_TREES<<1, 3);
    send_code(s, END_BLOCK, static_ltree);
#ifdef DEBUG
    s->compressed_len += 10L; /* 3 for block type, 7 for EOB */
#endif
    bi_flush(s);
    /* Of the 10 bits for the empty block, we have already sent
     * (10 - bi_valid) bits. The lookahead for the last real code (before
     * the EOB of the previous block) was thus at least one plus the length
     * of the EOB plus what we have just sent of the empty static block.
     */
    if (1 + s->last_eob_len + 10 - s->bi_valid < 9) {
        send_bits(s, STATIC_TREES<<1, 3);
        send_code(s, END_BLOCK, static_ltree);
#ifdef DEBUG
        s->compressed_len += 10L;
#endif
        bi_flush(s);
    }
    s->last_eob_len = 7;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x1724(%rdi), %eax
movl $0x2, %esi
movl $0x2, %edx
movl %eax, %ecx
shll %cl, %edx
orw 0x1720(%rdi), %dx
movw %dx, 0x1720(%rdi)
cmpl $0xe, %eax
jl 0x97e06
movq 0x10(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %edi
movl %edi, 0x28(%rbx)
movb %dl, (%rax,%rcx)
movb 0x1721(%rbx), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %edi
movl %edi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movl 0x1724(%rbx), %eax
movb $0x10, %cl
subb %al, %cl
shrl %cl, %esi
movw %si, 0x1720(%rbx)
addl $-0xd, %eax
movl %esi, %edx
jmp 0x97e09
addl $0x3, %eax
movl %eax, 0x1724(%rbx)
cmpl $0xa, %eax
jl 0x97e4e
movq 0x10(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %esi
movl %esi, 0x28(%rbx)
movb %dl, (%rax,%rcx)
movb 0x1721(%rbx), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movw $0x0, 0x1720(%rbx)
movl 0x1724(%rbx), %eax
addl $-0x9, %eax
jmp 0x97e51
addl $0x7, %eax
movl %eax, 0x1724(%rbx)
movq %rbx, %rdi
callq 0x97f3f
movl 0x171c(%rbx), %ecx
movl 0x1724(%rbx), %eax
subl %eax, %ecx
addl $0xb, %ecx
cmpl $0x8, %ecx
jg 0x97f33
movl $0x2, %esi
movl $0x2, %edx
movl %eax, %ecx
shll %cl, %edx
orw 0x1720(%rbx), %dx
movw %dx, 0x1720(%rbx)
cmpl $0xe, %eax
jl 0x97eda
movq 0x10(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %edi
movl %edi, 0x28(%rbx)
movb %dl, (%rax,%rcx)
movb 0x1721(%rbx), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %edi
movl %edi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movl 0x1724(%rbx), %eax
movb $0x10, %cl
subb %al, %cl
shrl %cl, %esi
movw %si, 0x1720(%rbx)
addl $-0xd, %eax
movl %esi, %edx
jmp 0x97edd
addl $0x3, %eax
movl %eax, 0x1724(%rbx)
cmpl $0xa, %eax
jl 0x97f22
movq 0x10(%rbx), %rax
movl 0x28(%rbx), %ecx
leal 0x1(%rcx), %esi
movl %esi, 0x28(%rbx)
movb %dl, (%rax,%rcx)
movb 0x1721(%rbx), %al
movq 0x10(%rbx), %rcx
movl 0x28(%rbx), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rbx)
movb %al, (%rcx,%rdx)
movw $0x0, 0x1720(%rbx)
movl 0x1724(%rbx), %eax
addl $-0x9, %eax
jmp 0x97f25
addl $0x7, %eax
movl %eax, 0x1724(%rbx)
movq %rbx, %rdi
callq 0x97f3f
movl $0x7, 0x171c(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: bi_flush
local void bi_flush(s)
    deflate_state *s;
{
    if (s->bi_valid == 16) {
        put_short(s, s->bi_buf);
        s->bi_buf = 0;
        s->bi_valid = 0;
    } else if (s->bi_valid >= 8) {
        put_byte(s, (Byte)s->bi_buf);
        s->bi_buf >>= 8;
        s->bi_valid -= 8;
    }
}

// Assembly:
movl 0x1724(%rdi), %eax
cmpl $0x10, %eax
jne 0x97f83
movb 0x1720(%rdi), %al
movq 0x10(%rdi), %rcx
movl 0x28(%rdi), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rdi)
movb %al, (%rcx,%rdx)
movb 0x1721(%rdi), %al
movq 0x10(%rdi), %rcx
movl 0x28(%rdi), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rdi)
movb %al, (%rcx,%rdx)
movw $0x0, 0x1720(%rdi)
xorl %eax, %eax
jmp 0x97fb5
cmpl $0x8, %eax
jl 0x97fbb
movb 0x1720(%rdi), %al
movq 0x10(%rdi), %rcx
movl 0x28(%rdi), %edx
leal 0x1(%rdx), %esi
movl %esi, 0x28(%rdi)
movb %al, (%rcx,%rdx)
movzbl 0x1721(%rdi), %eax
movw %ax, 0x1720(%rdi)
movl 0x1724(%rdi), %eax
addl $-0x8, %eax
movl %eax, 0x1724(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/tomfunkhouser[P]gaps/pkgs/png/trees.c
// Function: bi_windup
local void bi_windup(s)
    deflate_state *s;
{
    if (s->bi_valid > 8) {
        put_short(s, s->bi_buf);
    } else if (s->bi_valid > 0) {
        put_byte(s, (Byte)s->bi_buf);
    }
    s->bi_buf = 0;
    s->bi_valid = 0;
#ifdef DEBUG
    s->bits_sent = (s->bits_sent+7) & ~7;
#endif
}

// Assembly:
movl 0x1724(%rdi), %eax
cmpl $0x9, %eax
jl 0x99218
movb 0x1720(%rdi), %dl
leaq 0x10(%rdi), %rcx
movq 0x10(%rdi), %rsi
leaq 0x28(%rdi), %rax
movl 0x28(%rdi), %r8d
leal 0x1(%r8), %r9d
movl %r9d, 0x28(%rdi)
movb %dl, (%rsi,%r8)
movzbl 0x1721(%rdi), %edx
jmp 0x9922b
testl %eax, %eax
jle 0x9923a
movzwl 0x1720(%rdi), %edx
leaq 0x10(%rdi), %rcx
leaq 0x28(%rdi), %rax
movq (%rcx), %rcx
movl (%rax), %esi
leal 0x1(%rsi), %r8d
movl %r8d, (%rax)
movb %dl, (%rcx,%rsi)
movw $0x0, 0x1720(%rdi)
movl $0x0, 0x1724(%rdi)
retq