LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: readChunk_cICP(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_cICP(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
  if(chunkLength != 4) return 117; /*invalid cICP chunk size*/

  info->cicp_defined = 1;
  /* No error checking for value ranges is done here, that is up to a CICP
  handling library, not the PNG decoding. Just pass on the metadata. */
  info->cicp_color_primaries = data[0];
  info->cicp_transfer_function = data[1];
  info->cicp_matrix_coefficients = data[2];
  info->cicp_video_full_range_flag = data[3];

  return 0; /* OK */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
je 0xbcd0
movl $0x75, -0x4(%rbp)
jmp 0xbd2c
movq -0x10(%rbp), %rax
movl $0x1, 0x114(%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x118(%rax)
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x11c(%rax)
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x120(%rax)
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x124(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: readChunk_cLLI(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_cLLI(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
  if(chunkLength != 8) return 120; /*invalid cLLI chunk size*/

  info->clli_defined = 1;
  info->clli_max_cll = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3];
  info->clli_max_fall = 16777216u * data[4] + 65536u * data[5] + 256u * data[6] + data[7];

  return 0; /* OK */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x8, -0x20(%rbp)
je 0xbf13
movl $0x78, -0x4(%rbp)
jmp 0xbf99
movq -0x10(%rbp), %rax
movl $0x1, 0x154(%rax)
movq -0x18(%rbp), %rax
movzbl (%rax), %ecx
shll $0x18, %ecx
movq -0x18(%rbp), %rax
movzbl 0x1(%rax), %eax
shll $0x10, %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
movzbl 0x2(%rax), %eax
shll $0x8, %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
movzbl 0x3(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x158(%rax)
movq -0x18(%rbp), %rax
movzbl 0x4(%rax), %ecx
shll $0x18, %ecx
movq -0x18(%rbp), %rax
movzbl 0x5(%rax), %eax
shll $0x10, %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
movzbl 0x6(%rax), %eax
shll $0x8, %eax
addl %eax, %ecx
movq -0x18(%rbp), %rax
movzbl 0x7(%rax), %eax
addl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x15c(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_decode_memory(unsigned char**, unsigned int*, unsigned int*, unsigned char const*, unsigned long, LodePNGColorType, unsigned int)
unsigned lodepng_decode_memory(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in,
                               size_t insize, LodePNGColorType colortype, unsigned bitdepth) {
  unsigned error;
  LodePNGState state;
  lodepng_state_init(&state);
  state.info_raw.colortype = colortype;
  state.info_raw.bitdepth = bitdepth;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  /*disable reading things that this function doesn't output*/
  state.decoder.read_text_chunks = 0;
  state.decoder.remember_unknown_chunks = 0;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
  error = lodepng_decode(out, w, h, &state, in, insize);
  lodepng_state_cleanup(&state);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl %r9d, -0x2c(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0xd2a0
movl -0x2c(%rbp), %eax
movl %eax, -0x208(%rbp)
movl 0x10(%rbp), %eax
movl %eax, -0x204(%rbp)
movl $0x0, -0x278(%rbp)
movl $0x0, -0x274(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
leaq -0x2b0(%rbp), %rcx
callq 0xc310
movl %eax, -0x30(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0xd300
movl -0x30(%rbp), %eax
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_decoder_settings_init(LodePNGDecoderSettings*)
void lodepng_decoder_settings_init(LodePNGDecoderSettings* settings) {
  settings->color_convert = 1;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  settings->read_text_chunks = 1;
  settings->remember_unknown_chunks = 0;
  settings->max_text_size = 16777216;
  settings->max_icc_size = 16777216; /* 16MB is much more than enough for any reasonable ICC profile */
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
  settings->ignore_crc = 0;
  settings->ignore_critical = 0;
  settings->ignore_end = 0;
  lodepng_decompress_settings_init(&settings->zlibsettings);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, 0x34(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x38(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x3c(%rax)
movq -0x8(%rbp), %rax
movq $0x1000000, 0x40(%rax)  # imm = 0x1000000
movq -0x8(%rbp), %rax
movq $0x1000000, 0x48(%rax)  # imm = 0x1000000
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rdi
callq 0x4bc0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: isGrayICCProfile(unsigned char const*, unsigned int)
static unsigned isGrayICCProfile(const unsigned char* profile, unsigned size) {
  /*
  It is a gray profile if bytes 16-19 are "GRAY", rgb profile if bytes 16-19
  are "RGB ". We do not perform any full parsing of the ICC profile here, other
  than check those 4 bytes to grayscale profile. Other than that, validity of
  the profile is not checked. This is needed only because the PNG specification
  requires using a non-gray color model if there is an ICC profile with "RGB "
  (sadly limiting compression opportunities if the input data is grayscale RGB
  data), and requires using a gray color model if it is "GRAY".
  */
  if(size < 20) return 0;
  return profile[16] == 'G' &&  profile[17] == 'R' &&  profile[18] == 'A' &&  profile[19] == 'Y';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x14, -0x14(%rbp)
jae 0xea4a
movl $0x0, -0x4(%rbp)
jmp 0xea9c
movq -0x10(%rbp), %rax
movzbl 0x10(%rax), %ecx
xorl %eax, %eax
cmpl $0x47, %ecx
movb %al, -0x15(%rbp)
jne 0xea91
movq -0x10(%rbp), %rax
movzbl 0x11(%rax), %ecx
xorl %eax, %eax
cmpl $0x52, %ecx
movb %al, -0x15(%rbp)
jne 0xea91
movq -0x10(%rbp), %rax
movzbl 0x12(%rax), %ecx
xorl %eax, %eax
cmpl $0x41, %ecx
movb %al, -0x15(%rbp)
jne 0xea91
movq -0x10(%rbp), %rax
movzbl 0x13(%rax), %eax
cmpl $0x59, %eax
sete %al
movb %al, -0x15(%rbp)
movb -0x15(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_color_stats_add(LodePNGColorStats*, unsigned int, unsigned int, unsigned int, unsigned int)
static unsigned lodepng_color_stats_add(LodePNGColorStats* stats,
                                        unsigned r, unsigned g, unsigned b, unsigned a) {
  unsigned error = 0;
  unsigned char image[8];
  LodePNGColorMode mode;
  lodepng_color_mode_init(&mode);
  image[0] = r >> 8; image[1] = r; image[2] = g >> 8; image[3] = g;
  image[4] = b >> 8; image[5] = b; image[6] = a >> 8; image[7] = a;
  mode.bitdepth = 16;
  mode.colortype = LCT_RGBA;
  error = lodepng_compute_color_stats(stats, image, 1, 1, &mode);
  lodepng_color_mode_cleanup(&mode);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x56a0
movl -0xc(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x24(%rbp)
movl -0xc(%rbp), %eax
movb %al, -0x23(%rbp)
movl -0x10(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x22(%rbp)
movl -0x10(%rbp), %eax
movb %al, -0x21(%rbp)
movl -0x14(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x20(%rbp)
movl -0x14(%rbp), %eax
movb %al, -0x1f(%rbp)
movl -0x18(%rbp), %eax
shrl $0x8, %eax
movb %al, -0x1e(%rbp)
movl -0x18(%rbp), %eax
movb %al, -0x1d(%rbp)
movl $0x10, -0x4c(%rbp)
movl $0x6, -0x50(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x24(%rbp), %rsi
movl $0x1, %ecx
leaq -0x50(%rbp), %r8
movl %ecx, %edx
callq 0x9360
movl %eax, -0x1c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x5710
movl -0x1c(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: writeSignature(ucvector*)
static unsigned writeSignature(ucvector* out) {
  size_t pos = out->size;
  const unsigned char signature[] = {137, 80, 78, 71, 13, 10, 26, 10};
  /*8 bytes PNG signature, aka the magic bytes*/
  if(!ucvector_resize(out, out->size + 8)) return 83; /*alloc fail*/
  lodepng_memcpy(out->data + pos, signature, 8);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq 0xa36bf(%rip), %rax     # 0xb29de
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x8, %rsi
callq 0x12cb0
cmpl $0x0, %eax
jne 0xf346
movl $0x53, -0x4(%rbp)
jmp 0xf366
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x8, %edx
callq 0x5820
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_IHDR(ucvector*, unsigned int, unsigned int, LodePNGColorType, unsigned int, unsigned int)
static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h,
                              LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) {
  unsigned char *chunk, *data;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 13, "IHDR"));
  data = chunk + 8;

  lodepng_set32bitInt(data + 0, w); /*width*/
  lodepng_set32bitInt(data + 4, h); /*height*/
  data[8] = (unsigned char)bitdepth; /*bit depth*/
  data[9] = (unsigned char)colortype; /*color type*/
  data[10] = 0; /*compression method*/
  data[11] = 0; /*filter method*/
  data[12] = interlace_method; /*interlace method*/

  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl %r8d, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x30(%rbp), %rdi
movl $0xd, %edx
leaq 0xa21ba(%rip), %rcx     # 0xb155b
callq 0x167a0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0xf3b7
movl -0x3c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf423
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x4af0
movq -0x38(%rbp), %rdi
addq $0x4, %rdi
movl -0x18(%rbp), %esi
callq 0x4af0
movl -0x20(%rbp), %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, 0x8(%rax)
movl -0x1c(%rbp), %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x38(%rbp), %rax
movb $0x0, 0xa(%rax)
movq -0x38(%rbp), %rax
movb $0x0, 0xb(%rax)
movl -0x24(%rbp), %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x30(%rbp), %rdi
callq 0x5020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_cICP(ucvector*, LodePNGInfo const*)
static unsigned addChunk_cICP(ucvector* out, const LodePNGInfo* info) {
  unsigned char* chunk;
  /* Allow up to 255 since they are bytes. The ITU-R-BT.709 spec has a more
  restricted set of valid values for each field, but that's up to the error
  handling of a CICP library, not the PNG encoding/decoding, to manage. */
  if(info->cicp_color_primaries > 255) return 116;
  if(info->cicp_transfer_function > 255) return 116;
  if(info->cicp_matrix_coefficients > 255) return 116;
  if(info->cicp_video_full_range_flag > 255) return 116;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 4, "cICP"));
  chunk[8 + 0] = (unsigned char)info->cicp_color_primaries;
  chunk[8 + 1] = (unsigned char)info->cicp_transfer_function;
  chunk[8 + 2] = (unsigned char)info->cicp_matrix_coefficients;
  chunk[8 + 3] = (unsigned char)info->cicp_video_full_range_flag;
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0xff, 0x118(%rax)
jbe 0xf4ec
movl $0x74, -0x4(%rbp)
jmp 0xf5c6
movq -0x18(%rbp), %rax
cmpl $0xff, 0x11c(%rax)
jbe 0xf508
movl $0x74, -0x4(%rbp)
jmp 0xf5c6
movq -0x18(%rbp), %rax
cmpl $0xff, 0x120(%rax)
jbe 0xf524
movl $0x74, -0x4(%rbp)
jmp 0xf5c6
movq -0x18(%rbp), %rax
cmpl $0xff, 0x124(%rax)
jbe 0xf540
movl $0x74, -0x4(%rbp)
jmp 0xf5c6
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x4, %edx
leaq 0xa2048(%rip), %rcx     # 0xb159c
callq 0x167a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xf56a
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf5c6
movq -0x18(%rbp), %rax
movl 0x118(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x18(%rbp), %rax
movl 0x11c(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x18(%rbp), %rax
movl 0x120(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xa(%rax)
movq -0x18(%rbp), %rax
movl 0x124(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xb(%rax)
movq -0x20(%rbp), %rdi
callq 0x5020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_cLLI(ucvector*, LodePNGInfo const*)
static unsigned addChunk_cLLI(ucvector* out, const LodePNGInfo* info) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 8, "cLLI"));
  lodepng_set32bitInt(chunk + 8 + 0, info->clli_max_cll);
  lodepng_set32bitInt(chunk + 8 + 4, info->clli_max_fall);
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x8, %edx
leaq 0xa1cf2(%rip), %rcx     # 0xb15a6
callq 0x167a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xf8ca
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xf90c
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movl 0x158(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
addq $0x4, %rdi
movq -0x18(%rbp), %rax
movl 0x15c(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
callq 0x5020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_iCCP(ucvector*, LodePNGInfo const*, LodePNGCompressSettings*)
static unsigned addChunk_iCCP(ucvector* out, const LodePNGInfo* info, LodePNGCompressSettings* zlibsettings) {
  unsigned error = 0;
  unsigned char* chunk = 0;
  unsigned char* compressed = 0;
  size_t compressedsize = 0;
  size_t keysize = lodepng_strlen(info->iccp_name);

  if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/
  error = zlib_compress(&compressed, &compressedsize,
                        info->iccp_profile, info->iccp_profile_size, zlibsettings);
  if(!error) {
    size_t size = keysize + 2 + compressedsize;
    error = lodepng_chunk_init(&chunk, out, size, "iCCP");
  }
  if(!error) {
    lodepng_memcpy(chunk + 8, info->iccp_name, keysize);
    chunk[8 + keysize] = 0; /*null termination char*/
    chunk[9 + keysize] = 0; /*compression method: 0*/
    lodepng_memcpy(chunk + 10 + keysize, compressed, compressedsize);
    lodepng_chunk_generate_crc(chunk);
  }

  lodepng_free(compressed);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq 0x100(%rax), %rdi
callq 0x4ed0
movq %rax, -0x48(%rbp)
cmpq $0x1, -0x48(%rbp)
jb 0xf975
cmpq $0x4f, -0x48(%rbp)
jbe 0xf981
movl $0x59, -0x4(%rbp)
jmp 0xfa50
movq -0x18(%rbp), %rax
movq 0x108(%rax), %rdx
movq -0x18(%rbp), %rax
movl 0x110(%rax), %eax
movl %eax, %ecx
movq -0x20(%rbp), %r8
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x119d0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xf9dd
movq -0x48(%rbp), %rax
addq $0x2, %rax
addq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x30(%rbp), %rdi
leaq 0xa1bc2(%rip), %rcx     # 0xb1597
callq 0x167a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0xfa41
movq -0x30(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movq 0x100(%rax), %rsi
movq -0x48(%rbp), %rdx
callq 0x5820
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
addq $0x8, %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rax
movq -0x48(%rbp), %rcx
addq $0x9, %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
addq $0xa, %rdi
addq -0x48(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x5820
movq -0x30(%rbp), %rdi
callq 0x5020
movq -0x38(%rbp), %rdi
callq 0x4230
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_gAMA(ucvector*, LodePNGInfo const*)
static unsigned addChunk_gAMA(ucvector* out, const LodePNGInfo* info) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 4, "gAMA"));
  lodepng_set32bitInt(chunk + 8, info->gama_gamma);
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x4, %edx
leaq 0xa1ac4(%rip), %rcx     # 0xb1588
callq 0x167a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xfada
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xfb01
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movl 0xcc(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
callq 0x5020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_cHRM(ucvector*, LodePNGInfo const*)
static unsigned addChunk_cHRM(ucvector* out, const LodePNGInfo* info) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 32, "cHRM"));
  lodepng_set32bitInt(chunk + 8, info->chrm_white_x);
  lodepng_set32bitInt(chunk + 12, info->chrm_white_y);
  lodepng_set32bitInt(chunk + 16, info->chrm_red_x);
  lodepng_set32bitInt(chunk + 20, info->chrm_red_y);
  lodepng_set32bitInt(chunk + 24, info->chrm_green_x);
  lodepng_set32bitInt(chunk + 28, info->chrm_green_y);
  lodepng_set32bitInt(chunk + 32, info->chrm_blue_x);
  lodepng_set32bitInt(chunk + 36, info->chrm_blue_y);
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x20, %edx
leaq 0xa1a59(%rip), %rcx     # 0xb158d
callq 0x167a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xfb4d
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xfc15
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movl 0xd4(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movq -0x18(%rbp), %rax
movl 0xd8(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rax
movl 0xdc(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
addq $0x14, %rdi
movq -0x18(%rbp), %rax
movl 0xe0(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rax
movl 0xe4(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
addq $0x1c, %rdi
movq -0x18(%rbp), %rax
movl 0xe8(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movq -0x18(%rbp), %rax
movl 0xec(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
addq $0x24, %rdi
movq -0x18(%rbp), %rax
movl 0xf0(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
callq 0x5020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_PLTE(ucvector*, LodePNGColorMode const*)
static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info) {
  unsigned char* chunk;
  size_t i, j = 8;

  if(info->palettesize == 0 || info->palettesize > 256) {
    return 68; /*invalid palette size, it is only allowed to be 1-256*/
  }

  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, info->palettesize * 3, "PLTE"));

  for(i = 0; i != info->palettesize; ++i) {
    /*add all channels except alpha channel*/
    chunk[j++] = info->palette[i * 4 + 0];
    chunk[j++] = info->palette[i * 4 + 1];
    chunk[j++] = info->palette[i * 4 + 2];
  }

  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x8, -0x30(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x10011
movq -0x18(%rbp), %rax
cmpq $0x100, 0x10(%rax)      # imm = 0x100
jbe 0x1001d
movl $0x44, -0x4(%rbp)
jmp 0x10106
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
imulq $0x3, 0x10(%rax), %rdx
leaq -0x20(%rbp), %rdi
leaq 0xa152b(%rip), %rcx     # 0xb1560
callq 0x167a0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x1004e
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x10106
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
je 0x100f6
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x2, %rcx
movb (%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x30(%rbp)
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x2, %rcx
movb 0x1(%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x30(%rbp)
movb %dl, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
shlq $0x2, %rcx
movb 0x2(%rax,%rcx), %dl
movq -0x20(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x30(%rbp)
movb %dl, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x10056
movq -0x20(%rbp), %rdi
callq 0x5020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_pHYs(ucvector*, LodePNGInfo const*)
static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 9, "pHYs"));
  lodepng_set32bitInt(chunk + 8, info->phys_x);
  lodepng_set32bitInt(chunk + 12, info->phys_y);
  chunk[16] = info->phys_unit;
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x9, %edx
leaq 0xa103f(%rip), %rcx     # 0xb1583
callq 0x167a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x1055a
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x105ab
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rax
movl 0xbc(%rax), %esi
callq 0x4af0
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movq -0x18(%rbp), %rax
movl 0xc0(%rax), %esi
callq 0x4af0
movq -0x18(%rbp), %rax
movl 0xc4(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x10(%rax)
movq -0x20(%rbp), %rdi
callq 0x5020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_IDAT(ucvector*, unsigned char const*, unsigned long, LodePNGCompressSettings*)
static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, size_t datasize,
                              LodePNGCompressSettings* zlibsettings) {
  unsigned error = 0;
  unsigned char* zlib = 0;
  size_t pos = 0;
  size_t zlibsize = 0;
  /* max chunk length allowed by the specification is 2147483647 bytes */
  const size_t max_chunk_length = 2147483647u;

  error = zlib_compress(&zlib, &zlibsize, data, datasize, zlibsettings);
  while(!error) {
    if(zlibsize - pos > max_chunk_length) {
      error = lodepng_chunk_createv(out, max_chunk_length, "IDAT", zlib + pos);
      pos += max_chunk_length;
    } else {
      error = lodepng_chunk_createv(out, zlibsize - pos, "IDAT", zlib + pos);
      break;
    }
  }
  lodepng_free(zlib);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x7fffffff, -0x48(%rbp) # imm = 0x7FFFFFFF
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x119d0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1062a
jmp 0x10691
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
cmpq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
jbe 0x1066a
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rcx
addq -0x38(%rbp), %rcx
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq 0xa2358(%rip), %rdx     # 0xb29aa
callq 0x5630
movl %eax, -0x24(%rbp)
movq -0x38(%rbp), %rax
addq $0x7fffffff, %rax       # imm = 0x7FFFFFFF
movq %rax, -0x38(%rbp)
jmp 0x1068f
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
subq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rcx
addq -0x38(%rbp), %rcx
leaq 0xa2325(%rip), %rdx     # 0xb29aa
callq 0x5630
movl %eax, -0x24(%rbp)
jmp 0x10691
jmp 0x1061b
movq -0x30(%rbp), %rdi
callq 0x4230
movl -0x24(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_tIME(ucvector*, LodePNGTime const*)
static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 7, "tIME"));
  chunk[8] = (unsigned char)(time->year >> 8);
  chunk[9] = (unsigned char)(time->year & 255);
  chunk[10] = (unsigned char)time->month;
  chunk[11] = (unsigned char)time->day;
  chunk[12] = (unsigned char)time->hour;
  chunk[13] = (unsigned char)time->minute;
  chunk[14] = (unsigned char)time->second;
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdi
movl $0x7, %edx
leaq 0xa0eaa(%rip), %rcx     # 0xb157e
callq 0x167a0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x106ed
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x10773
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x8, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x8(%rax)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x9(%rax)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xa(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xb(%rax)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xc(%rax)
movq -0x18(%rbp), %rax
movl 0x10(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xd(%rax)
movq -0x18(%rbp), %rax
movl 0x14(%rax), %eax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0xe(%rax)
movq -0x20(%rbp), %rdi
callq 0x5020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_zTXt(ucvector*, char const*, char const*, LodePNGCompressSettings*)
static unsigned addChunk_zTXt(ucvector* out, const char* keyword, const char* textstring,
                              LodePNGCompressSettings* zlibsettings) {
  unsigned error = 0;
  unsigned char* chunk = 0;
  unsigned char* compressed = 0;
  size_t compressedsize = 0;
  size_t textsize = lodepng_strlen(textstring);
  size_t keysize = lodepng_strlen(keyword);
  if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/

  error = zlib_compress(&compressed, &compressedsize,
                        (const unsigned char*)textstring, textsize, zlibsettings);
  if(!error) {
    size_t size = keysize + 2 + compressedsize;
    error = lodepng_chunk_init(&chunk, out, size, "zTXt");
  }
  if(!error) {
    lodepng_memcpy(chunk + 8, keyword, keysize);
    chunk[8 + keysize] = 0; /*null termination char*/
    chunk[9 + keysize] = 0; /*compression method: 0*/
    lodepng_memcpy(chunk + 10 + keysize, compressed, compressedsize);
    lodepng_chunk_generate_crc(chunk);
  }

  lodepng_free(compressed);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4ed0
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4ed0
movq %rax, -0x58(%rbp)
cmpq $0x1, -0x58(%rbp)
jb 0x107df
cmpq $0x4f, -0x58(%rbp)
jbe 0x107eb
movl $0x59, -0x4(%rbp)
jmp 0x108a4
movq -0x20(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq -0x40(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x119d0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x10838
movq -0x58(%rbp), %rax
addq $0x2, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq 0xa0d44(%rip), %rcx     # 0xb1574
callq 0x167a0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x10895
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x5820
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
addq $0x8, %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq -0x58(%rbp), %rcx
addq $0x9, %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rdi
addq $0xa, %rdi
addq -0x58(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x5820
movq -0x38(%rbp), %rdi
callq 0x5020
movq -0x40(%rbp), %rdi
callq 0x4230
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_tEXt(ucvector*, char const*, char const*)
static unsigned addChunk_tEXt(ucvector* out, const char* keyword, const char* textstring) {
  unsigned char* chunk = 0;
  size_t keysize = lodepng_strlen(keyword), textsize = lodepng_strlen(textstring);
  size_t size = keysize + 1 + textsize;
  if(keysize < 1 || keysize > 79) return 89; /*error: invalid keyword size*/
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, size, "tEXt"));
  lodepng_memcpy(chunk + 8, keyword, keysize);
  chunk[8 + keysize] = 0; /*null termination char*/
  lodepng_memcpy(chunk + 9 + keysize, textstring, textsize);
  lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4ed0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4ed0
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x1, -0x30(%rbp)
jb 0x10904
cmpq $0x4f, -0x30(%rbp)
jbe 0x1090d
movl $0x59, -0x4(%rbp)
jmp 0x10984
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x28(%rbp), %rdi
leaq 0xa0c4f(%rip), %rcx     # 0xb156f
callq 0x167a0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
je 0x10936
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x10984
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x5820
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
addq $0x8, %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rdi
addq $0x9, %rdi
addq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x5820
movq -0x28(%rbp), %rdi
callq 0x5020
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng::load_file(std::vector<unsigned char, std::allocator<unsigned char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
unsigned load_file(std::vector<unsigned char>& buffer, const std::string& filename) {
  unsigned error;
  FILE* file = fopen(filename.c_str(), "rb");
  if(!file) return 78;
  error = load_file_(buffer, file);
  fclose(file);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3100
movq %rax, %rdi
leaq 0x9ff82(%rip), %rsi     # 0xb1555
callq 0x32c0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x115ec
movl $0x4e, -0x4(%rbp)
jmp 0x1160b
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x11620
movl %eax, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
callq 0x3240
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng::load_file_(std::vector<unsigned char, std::allocator<unsigned char>>&, _IO_FILE*)
static unsigned load_file_(std::vector<unsigned char>& buffer, FILE* file) {
  long size = lodepng_filesize(file);
  if(size < 0) return 78;
  buffer.resize((size_t)size);
  if(size == 0) return 0; /*ok*/
  if(fread(&buffer[0], 1, buffer.size(), file) != buffer.size()) return 78;
  return 0; /*ok*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x12390
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0x1164d
movl $0x4e, -0x4(%rbp)
jmp 0x116c4
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x1a540
cmpq $0x0, -0x20(%rbp)
jne 0x1166c
movl $0x0, -0x4(%rbp)
jmp 0x116c4
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1a5f0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a400
movq -0x30(%rbp), %rdi
movq %rax, %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %esi
callq 0x3370
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x1a400
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
je 0x116bd
movl $0x4e, -0x4(%rbp)
jmp 0x116c4
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng::decompress(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned long, LodePNGDecompressSettings const&)
unsigned decompress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
                    const LodePNGDecompressSettings& settings) {
  unsigned char* buffer = 0;
  size_t buffersize = 0;
  unsigned error = zlib_decompress(&buffer, &buffersize, 0, in, insize, &settings);
  if(buffer) {
    out.insert(out.end(), buffer, &buffer[buffersize]);
    lodepng_free(buffer);
  }
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %r8
movq -0x20(%rbp), %r9
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x117d0
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x117c6
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a460
movq -0x48(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdx
movq -0x28(%rbp), %rcx
addq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rsi
callq 0x1a420
movq -0x28(%rbp), %rdi
callq 0x4230
movl -0x34(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: zlib_decompress(unsigned char**, unsigned long*, unsigned long, unsigned char const*, unsigned long, LodePNGDecompressSettings const*)
static unsigned zlib_decompress(unsigned char** out, size_t* outsize, size_t expected_size,
                                const unsigned char* in, size_t insize, const LodePNGDecompressSettings* settings) {
  unsigned error;
  if(settings->custom_zlib) {
    error = settings->custom_zlib(out, outsize, in, insize, settings);
    if(error) {
      /*the custom zlib is allowed to have its own error codes, however, we translate it to code 110*/
      error = 110;
      /*if there's a max output size, and the custom zlib returned error, then indicate that error instead*/
      if(settings->max_output_size && *outsize > settings->max_output_size) error = 109;
    }
  } else {
    ucvector v = ucvector_init(*out, *outsize);
    if(expected_size) {
      /*reserve the memory to avoid intermediate reallocations*/
      ucvector_resize(&v, *outsize + expected_size);
      v.size = *outsize;
    }
    error = lodepng_zlib_decompressv(&v, in, insize, settings);
    *out = v.data;
    *outsize = v.size;
  }
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x11850
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq *%rax
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
je 0x1184e
movl $0x6e, -0x34(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1184c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x1184c
movl $0x6d, -0x34(%rbp)
jmp 0x1184e
jmp 0x118bb
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq -0x50(%rbp), %rdi
callq 0x42c0
cmpq $0x0, -0x18(%rbp)
je 0x1188d
movq -0x10(%rbp), %rax
movq (%rax), %rsi
addq -0x18(%rbp), %rsi
leaq -0x50(%rbp), %rdi
callq 0x12cb0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x50(%rbp), %rdi
callq 0x4740
movl %eax, -0x34(%rbp)
movq -0x50(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl -0x34(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng::compress(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned long, LodePNGCompressSettings const&)
unsigned compress(std::vector<unsigned char>& out, const unsigned char* in, size_t insize,
                  const LodePNGCompressSettings& settings) {
  unsigned char* buffer = 0;
  size_t buffersize = 0;
  unsigned error = zlib_compress(&buffer, &buffersize, in, insize, &settings);
  if(buffer) {
    out.insert(out.end(), buffer, &buffer[buffersize]);
    lodepng_free(buffer);
  }
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x119d0
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x119c2
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a460
movq -0x48(%rbp), %rdi
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdx
movq -0x28(%rbp), %rcx
addq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rsi
callq 0x1a420
movq -0x28(%rbp), %rdi
callq 0x4230
movl -0x34(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: zlib_compress(unsigned char**, unsigned long*, unsigned char const*, unsigned long, LodePNGCompressSettings const*)
static unsigned zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in,
                              size_t insize, const LodePNGCompressSettings* settings) {
  if(settings->custom_zlib) {
    unsigned error = settings->custom_zlib(out, outsize, in, insize, settings);
    /*the custom zlib is allowed to have its own error codes, however, we translate it to code 111*/
    return error ? 111 : 0;
  } else {
    return lodepng_zlib_compress(out, outsize, in, insize, settings);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x11a2d
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq *%rax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %edx
xorl %eax, %eax
movl $0x6f, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x11a49
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x4890
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_filesize(_IO_FILE*)
static long lodepng_filesize(FILE* file) {
  long size;
  if(fseek(file, 0, SEEK_END) != 0) return -1;
  size = ftell(file);
  /* It may give LONG_MAX as directory size, this is invalid for us. */
  if(size == LONG_MAX) return -1;
  if(fseek(file, 0, SEEK_SET) != 0) return -1;
  return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x32b0
cmpl $0x0, %eax
je 0x123bd
movq $-0x1, -0x8(%rbp)
jmp 0x1240a
movq -0x10(%rbp), %rdi
callq 0x3030
movq %rax, -0x18(%rbp)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x18(%rbp)
jne 0x123e4
movq $-0x1, -0x8(%rbp)
jmp 0x1240a
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x32b0
cmpl $0x0, %eax
je 0x12402
movq $-0x1, -0x8(%rbp)
jmp 0x1240a
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: LodePNGBitReader_init(LodePNGBitReader*, unsigned char const*, unsigned long)
static unsigned LodePNGBitReader_init(LodePNGBitReader* reader, const unsigned char* data, size_t size) {
  size_t temp;
  reader->data = data;
  reader->size = size;
  /* size in bits, return error if overflow (if size_t is 32 bit this supports up to 500MB)  */
  if(lodepng_mulofl(size, 8u, &reader->bitsize)) return 105;
  /*ensure incremented bp can be compared to bitsize without overflow even when it would be incremented 32 too much and
  trying to ensure 32 more bits*/
  if(lodepng_addofl(reader->bitsize, 64u, &temp)) return 105;
  reader->bp = 0;
  reader->buffer = 0;
  return 0; /*ok*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x10, %rdx
movl $0x8, %esi
callq 0x12c00
cmpl $0x0, %eax
je 0x1246f
movl $0x69, -0x4(%rbp)
jmp 0x124b1
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movl $0x40, %esi
leaq -0x28(%rbp), %rdx
callq 0x5180
cmpl $0x0, %eax
je 0x12493
movl $0x69, -0x4(%rbp)
jmp 0x124b1
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: ensureBits9(LodePNGBitReader*, unsigned long)
static LODEPNG_INLINE void ensureBits9(LodePNGBitReader* reader, size_t nbits) {
  size_t start = reader->bp >> 3u;
  size_t size = reader->size;
  if(start + 1u < size) {
    reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u);
    reader->buffer >>= (reader->bp & 7u);
  } else {
    reader->buffer = 0;
    if(start + 0u < size) reader->buffer = reader->data[start + 0];
    reader->buffer >>= (reader->bp & 7u);
  }
  (void)nbits;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
shrq $0x3, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
addq $0x1, %rax
cmpq -0x20(%rbp), %rax
jae 0x1253d
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdx
movzbl 0x1(%rax,%rdx), %eax
shll $0x8, %eax
orl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
andq $0x7, %rcx
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
shrl %cl, %edx
movl %edx, %ecx
movl %ecx, 0x20(%rax)
jmp 0x12586
movq -0x8(%rbp), %rax
movl $0x0, 0x20(%rax)
movq -0x18(%rbp), %rax
addq $0x0, %rax
cmpq -0x20(%rbp), %rax
jae 0x1256c
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rcx
andq $0x7, %rcx
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
shrl %cl, %edx
movl %edx, %ecx
movl %ecx, 0x20(%rax)
popq %rbp
retq
nopl (%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: ucvector_reserve(ucvector*, unsigned long)
static unsigned ucvector_reserve(ucvector* p, size_t size) {
  if(size > p->allocsize) {
    size_t newsize = size + (p->allocsize >> 1u);
    void* data = lodepng_realloc(p->data, newsize);
    if(data) {
      p->allocsize = newsize;
      p->data = (unsigned char*)data;
    }
    else return 0; /*error: not enough memory*/
  }
  return 1; /*success*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jbe 0x12d53
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
shrq %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x5590
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x12d48
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x12d51
movl $0x0, -0x4(%rbp)
jmp 0x12d5a
jmp 0x12d53
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: lvandeve[P]lodepng/lodepng.cpp
// Function: HuffmanTree_init(HuffmanTree*)
static void HuffmanTree_init(HuffmanTree* tree) {
  tree->codes = 0;
  tree->lengths = 0;
  tree->table_len = 0;
  tree->table_value = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
popq %rbp
retq
nopl (%rax)