LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_chunk_next(unsigned char*, unsigned char*)
unsigned char* lodepng_chunk_next(unsigned char* chunk, unsigned char* end) {
  size_t available_size = (size_t)(end - chunk);
  if(chunk >= end || available_size < 12) return end; /*too small to contain a chunk*/
  if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47
    && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) {
    /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */
    return chunk + 8;
  } else {
    size_t total_chunk_length;
    if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end;
    if(total_chunk_length > available_size) return end; /*outside of range*/
    return chunk + total_chunk_length;
  }
}

// Assembly:
movq %rsi, %rax
movq %rsi, %rcx
subq %rdi, %rcx
setbe %dl
cmpq $0xc, %rcx
setb %sil
orb %dl, %sil
jne 0x4fe1
movzbl (%rdi), %edx
cmpq $0x89, %rdx
jne 0x4fb1
cmpb $0x50, 0x1(%rdi)
jne 0x4fb1
cmpb $0x4e, 0x2(%rdi)
jne 0x4fb1
cmpb $0x47, 0x3(%rdi)
jne 0x4fb1
cmpb $0xd, 0x4(%rdi)
jne 0x4fb1
cmpb $0xa, 0x5(%rdi)
jne 0x4fb1
cmpb $0x1a, 0x6(%rdi)
jne 0x4fb1
cmpb $0xa, 0x7(%rdi)
jne 0x4fb1
addq $0x8, %rdi
movq %rdi, %rax
retq
shll $0x18, %edx
movzbl 0x1(%rdi), %esi
shll $0x10, %esi
orl %edx, %esi
movzbl 0x2(%rdi), %edx
shll $0x8, %edx
orl %esi, %edx
movzbl 0x3(%rdi), %esi
leaq (%rdx,%rsi), %r8
addq %rsi, %rdx
addq $0xc, %rdx
cmpq %rcx, %rdx
leaq 0xc(%rdi,%r8), %rcx
cmovbeq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_chunk_next_const(unsigned char const*, unsigned char const*)
const unsigned char* lodepng_chunk_next_const(const unsigned char* chunk, const unsigned char* end) {
  size_t available_size = (size_t)(end - chunk);
  if(chunk >= end || available_size < 12) return end; /*too small to contain a chunk*/
  if(chunk[0] == 0x89 && chunk[1] == 0x50 && chunk[2] == 0x4e && chunk[3] == 0x47
    && chunk[4] == 0x0d && chunk[5] == 0x0a && chunk[6] == 0x1a && chunk[7] == 0x0a) {
    /* Is PNG magic header at start of PNG file. Jump to first actual chunk. */
    return chunk + 8;
  } else {
    size_t total_chunk_length;
    if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end;
    if(total_chunk_length > available_size) return end; /*outside of range*/
    return chunk + total_chunk_length;
  }
}

// Assembly:
movq %rsi, %rax
movq %rsi, %rcx
subq %rdi, %rcx
setbe %dl
cmpq $0xc, %rcx
setb %sil
orb %dl, %sil
jne 0x5069
movzbl (%rdi), %edx
cmpq $0x89, %rdx
jne 0x5039
cmpb $0x50, 0x1(%rdi)
jne 0x5039
cmpb $0x4e, 0x2(%rdi)
jne 0x5039
cmpb $0x47, 0x3(%rdi)
jne 0x5039
cmpb $0xd, 0x4(%rdi)
jne 0x5039
cmpb $0xa, 0x5(%rdi)
jne 0x5039
cmpb $0x1a, 0x6(%rdi)
jne 0x5039
cmpb $0xa, 0x7(%rdi)
jne 0x5039
addq $0x8, %rdi
movq %rdi, %rax
retq
shll $0x18, %edx
movzbl 0x1(%rdi), %esi
shll $0x10, %esi
orl %edx, %esi
movzbl 0x2(%rdi), %edx
shll $0x8, %edx
orl %esi, %edx
movzbl 0x3(%rdi), %esi
leaq (%rdx,%rsi), %r8
addq %rsi, %rdx
addq $0xc, %rdx
cmpq %rcx, %rdx
leaq 0xc(%rdi,%r8), %rcx
cmovbeq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_chunk_append(unsigned char**, unsigned long*, unsigned char const*)
unsigned lodepng_chunk_append(unsigned char** out, size_t* outsize, const unsigned char* chunk) {
  unsigned i;
  size_t total_chunk_length, new_length;
  unsigned char *chunk_start, *new_buffer;

  if(!lodepng_chunk_type_name_valid(chunk)) {
    return 121; /* invalid chunk type name */
  }
  if(lodepng_chunk_reserved(chunk)) {
    return 122; /* invalid third lowercase character */
  }

  if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return 77;
  if(lodepng_addofl(*outsize, total_chunk_length, &new_length)) return 77;

  new_buffer = (unsigned char*)lodepng_realloc(*out, new_length);
  if(!new_buffer) return 83; /*alloc fail*/
  (*out) = new_buffer;
  (*outsize) = new_length;
  chunk_start = &(*out)[new_length - total_chunk_length];

  for(i = 0; i != total_chunk_length; ++i) chunk_start[i] = chunk[i];

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x4, %eax
movb (%rbx,%rax), %cl
andb $-0x21, %cl
addb $-0x5b, %cl
cmpb $-0x1a, %cl
jb 0x5176
leaq 0x1(%rax), %rdx
cmpq $0x7, %rax
movq %rdx, %rax
jne 0x515b
movl $0x79, %eax
cmpb $-0x1a, %cl
jb 0x51e0
movl $0x7a, %eax
testb $0x20, 0x6(%rbx)
jne 0x51e0
movl (%rbx), %r13d
bswapl %r13d
addq $0xc, %r13
movq (%r14), %rbp
movq %r13, %r12
movl $0x4d, %eax
addq %rbp, %r12
jb 0x51e0
movq (%r15), %rdi
movq %r12, %rsi
callq 0x2350
testq %rax, %rax
je 0x51db
movq %rax, (%r15)
movq %r12, (%r14)
addq %rax, %rbp
movl $0x1, %ecx
xorl %eax, %eax
xorl %edx, %edx
movb (%rbx,%rdx), %sil
movb %sil, (%rbp,%rdx)
movl %ecx, %edx
incl %ecx
cmpq %rdx, %r13
jne 0x51c7
jmp 0x51e0
movl $0x53, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_chunk_createv(ucvector*, unsigned long, char const*, unsigned char const*)
static unsigned lodepng_chunk_createv(ucvector* out,
                                      size_t length, const char* type, const unsigned char* data) {
  unsigned char* chunk;
  CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, length, type));

  /*3: the data*/
  lodepng_memcpy(chunk + 8, data, length);

  /*4: CRC (of the chunkname characters and the data)*/
  lodepng_chunk_generate_crc(chunk);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movq %rdx, %rcx
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x8(%rsp), %rdi
movq %r14, %rdx
callq 0xe9f0
testl %eax, %eax
jne 0x5285
movq 0x8(%rsp), %r15
testq %r14, %r14
je 0x527b
leaq 0x8(%r15), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x21d0
movq %r15, %rdi
callq 0x4f2f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_color_mode_copy(LodePNGColorMode*, LodePNGColorMode const*)
unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source) {
  lodepng_color_mode_cleanup(dest);
  lodepng_memcpy(dest, source, sizeof(LodePNGColorMode));
  if(source->palette) {
    dest->palette = (unsigned char*)lodepng_malloc(1024);
    if(!dest->palette && source->palettesize) return 83; /*alloc fail*/
    lodepng_memcpy(dest->palette, source->palette, source->palettesize * 4);
  }
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x5301
callq 0x2290
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
cmpq $0x0, 0x8(%rbx)
je 0x5352
movl $0x400, %edi            # imm = 0x400
callq 0x22a0
movq %rax, (%r15)
testq %rax, %rax
je 0x535c
movq 0x10(%rbx), %rdx
shlq $0x2, %rdx
testq %rdx, %rdx
je 0x5352
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21d0
xorl %ecx, %ecx
movl %ecx, %eax
popq %rbx
popq %r14
popq %r15
retq
movl $0x53, %ecx
cmpq $0x0, 0x10(%rbx)
jne 0x5354
jmp 0x5339
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_color_mode_alloc_palette(LodePNGColorMode*)
static void lodepng_color_mode_alloc_palette(LodePNGColorMode* info) {
  size_t i;
  /*if the palette is already allocated, it will have size 1024 so no reallocation needed in that case*/
  /*the palette must have room for up to 256 colors with 4 bytes each.*/
  if(!info->palette) info->palette = (unsigned char*)lodepng_malloc(1024);
  if(!info->palette) return; /*alloc fail*/
  for(i = 0; i != 256; ++i) {
    /*Initialize all unused colors with black, the value used for invalid palette indices.
    This is an error according to the PNG spec, but common PNG decoders make it black instead.
    That makes color conversion slightly faster due to no error handling needed.*/
    info->palette[i * 4 + 0] = 0;
    info->palette[i * 4 + 1] = 0;
    info->palette[i * 4 + 2] = 0;
    info->palette[i * 4 + 3] = 255;
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rdi)
jne 0x5419
movl $0x400, %edi            # imm = 0x400
callq 0x22a0
movq %rax, 0x8(%rbx)
cmpq $0x0, 0x8(%rbx)
je 0x5450
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movb %al, (%rdx,%rcx,4)
movq 0x8(%rbx), %rdx
movb %al, 0x1(%rdx,%rcx,4)
movq 0x8(%rbx), %rdx
movb %al, 0x2(%rdx,%rcx,4)
movq 0x8(%rbx), %rdx
movb $-0x1, 0x3(%rdx,%rcx,4)
incq %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x5424
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_add_text_sized(LodePNGInfo*, char const*, char const*, unsigned long)
static unsigned lodepng_add_text_sized(LodePNGInfo* info, const char* key, const char* str, size_t size) {
  char** new_keys = (char**)(lodepng_realloc(info->text_keys, sizeof(char*) * (info->text_num + 1)));
  char** new_strings = (char**)(lodepng_realloc(info->text_strings, sizeof(char*) * (info->text_num + 1)));

  if(new_keys) info->text_keys = new_keys;
  if(new_strings) info->text_strings = new_strings;

  if(!new_keys || !new_strings) return 83; /*alloc fail*/

  ++info->text_num;
  info->text_keys[info->text_num - 1] = alloc_string(key);
  info->text_strings[info->text_num - 1] = alloc_string_sized(str, size);
  if(!info->text_keys[info->text_num - 1] || !info->text_strings[info->text_num - 1]) return 83; /*alloc fail*/

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2350
movq %rax, %r13
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2350
testq %r13, %r13
je 0x55b9
movq %r13, 0x50(%rbx)
testq %rax, %rax
je 0x55c2
movq %rax, 0x58(%rbx)
testq %rax, %rax
sete %al
testq %r13, %r13
sete %cl
movl $0x53, %ebp
orb %al, %cl
jne 0x5642
incq 0x48(%rbx)
movq %r12, %rdi
callq 0x59de
movq 0x48(%rbx), %r13
movq 0x50(%rbx), %rcx
movq %rax, -0x8(%rcx,%r13,8)
leaq 0x1(%r14), %rdi
callq 0x22a0
movq %rax, %r12
testq %rax, %rax
je 0x5619
testq %r14, %r14
je 0x5614
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21d0
movb $0x0, (%r12,%r14)
movq 0x58(%rbx), %rax
movq %r12, -0x8(%rax,%r13,8)
movq 0x50(%rbx), %rax
cmpq $0x0, -0x8(%rax,%r13,8)
je 0x5642
movq 0x58(%rbx), %rax
xorl %ecx, %ecx
cmpq $0x0, -0x8(%rax,%r13,8)
movl $0x53, %ebp
cmovnel %ecx, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_add_itext_sized(LodePNGInfo*, char const*, char const*, char const*, char const*, unsigned long)
static unsigned lodepng_add_itext_sized(LodePNGInfo* info, const char* key, const char* langtag,
                                        const char* transkey, const char* str, size_t size) {
  char** new_keys = (char**)(lodepng_realloc(info->itext_keys, sizeof(char*) * (info->itext_num + 1)));
  char** new_langtags = (char**)(lodepng_realloc(info->itext_langtags, sizeof(char*) * (info->itext_num + 1)));
  char** new_transkeys = (char**)(lodepng_realloc(info->itext_transkeys, sizeof(char*) * (info->itext_num + 1)));
  char** new_strings = (char**)(lodepng_realloc(info->itext_strings, sizeof(char*) * (info->itext_num + 1)));

  if(new_keys) info->itext_keys = new_keys;
  if(new_langtags) info->itext_langtags = new_langtags;
  if(new_transkeys) info->itext_transkeys = new_transkeys;
  if(new_strings) info->itext_strings = new_strings;

  if(!new_keys || !new_langtags || !new_transkeys || !new_strings) return 83; /*alloc fail*/

  ++info->itext_num;

  info->itext_keys[info->itext_num - 1] = alloc_string(key);
  info->itext_langtags[info->itext_num - 1] = alloc_string(langtag);
  info->itext_transkeys[info->itext_num - 1] = alloc_string(transkey);
  info->itext_strings[info->itext_num - 1] = alloc_string_sized(str, size);

  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, (%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rsi, %rbp
movq %rdi, %r14
movq 0x60(%rdi), %rax
movq 0x68(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2350
movq %rax, %r15
movq 0x60(%r14), %rax
movq 0x70(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2350
movq %rax, %r12
movq 0x60(%r14), %rax
movq 0x78(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2350
movq %rax, %r13
movq 0x60(%r14), %rax
movq 0x80(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2350
testq %r15, %r15
je 0x57f4
movq %r15, 0x68(%r14)
testq %r12, %r12
je 0x57fd
movq %r12, 0x70(%r14)
testq %r13, %r13
je 0x5806
movq %r13, 0x78(%r14)
testq %rax, %rax
je 0x5812
movq %rax, 0x80(%r14)
movl $0x53, %ecx
testq %r15, %r15
je 0x58b6
testq %r12, %r12
je 0x58b6
testq %r13, %r13
je 0x58b6
testq %rax, %rax
je 0x58b6
incq 0x60(%r14)
movq %rbp, %rdi
callq 0x59de
movq 0x60(%r14), %rcx
movq 0x68(%r14), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq 0x8(%rsp), %rdi
callq 0x59de
movq 0x60(%r14), %rcx
movq 0x70(%r14), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq 0x10(%rsp), %rdi
callq 0x59de
movq 0x60(%r14), %r12
movq 0x78(%r14), %rcx
movq %rax, -0x8(%rcx,%r12,8)
leaq 0x1(%rbx), %rdi
callq 0x22a0
movq %rax, %r15
testq %rax, %rax
je 0x58a8
testq %rbx, %rbx
je 0x58a3
movq %r15, %rdi
movq (%rsp), %rsi
movq %rbx, %rdx
callq 0x21d0
movb $0x0, (%r15,%rbx)
movq 0x80(%r14), %rax
movq %r15, -0x8(%rax,%r12,8)
xorl %ecx, %ecx
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_set_icc(LodePNGInfo*, char const*, unsigned char const*, unsigned int)
unsigned lodepng_set_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) {
  if(info->iccp_defined) lodepng_clear_icc(info);

  if(profile_size == 0) return 100; /*invalid ICC profile size*/

  info->iccp_name = alloc_string(name);
  if(!info->iccp_name) return 83; /*alloc fail*/

  info->iccp_profile = (unsigned char*)lodepng_malloc(profile_size);
  if(!info->iccp_profile) {
    lodepng_free(info->iccp_name);
    return 83; /*alloc fail*/
  }

  lodepng_memcpy(info->iccp_profile, profile, profile_size);
  info->iccp_profile_size = profile_size;
  info->iccp_defined = 1;

  return 0; /*ok*/
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
cmpl $0x0, 0xfc(%rdi)
je 0x591d
movq 0x100(%r14), %rdi
callq 0x2290
xorl %r13d, %r13d
movq %r13, 0x100(%r14)
movq 0x108(%r14), %rdi
callq 0x2290
movq %r13, 0x108(%r14)
movl %r13d, 0x110(%r14)
movl %r13d, 0xfc(%r14)
testl %ebx, %ebx
je 0x5978
movq %r12, %rdi
callq 0x59de
movq %rax, 0x100(%r14)
movl $0x53, %ebp
testq %rax, %rax
je 0x5987
movq %rax, %r12
movl %ebx, %r13d
movq %r13, %rdi
callq 0x22a0
movq %rax, 0x108(%r14)
testq %rax, %rax
je 0x597f
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x21d0
movl %ebx, 0x110(%r14)
movl $0x1, 0xfc(%r14)
xorl %ebp, %ebp
jmp 0x5987
movl $0x64, %ebp
jmp 0x5987
movq %r12, %rdi
callq 0x2290
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_set_exif(LodePNGInfo*, unsigned char const*, unsigned int)
unsigned lodepng_set_exif(LodePNGInfo* info, const unsigned char* exif, unsigned exif_size) {
  if(info->exif_defined) lodepng_clear_exif(info);
  info->exif = (unsigned char*)lodepng_malloc(exif_size);

  if(!info->exif) return 83; /*alloc fail*/

  lodepng_memcpy(info->exif, exif, exif_size);
  info->exif_size = exif_size;
  info->exif_defined = 1;

  return 0; /*ok*/
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
cmpl $0x0, 0x88(%rdi)
je 0x5a6b
movq 0x90(%r14), %rdi
callq 0x2290
movq $0x0, 0x90(%r14)
xorl %eax, %eax
movl %eax, 0x98(%r14)
movl %eax, 0x88(%r14)
movl %ebx, %r12d
movq %r12, %rdi
callq 0x22a0
movq %rax, 0x90(%r14)
testq %rax, %rax
je 0x5aaa
testl %ebx, %ebx
je 0x5a94
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x21d0
movl %ebx, 0x98(%r14)
movl $0x1, 0x88(%r14)
xorl %eax, %eax
jmp 0x5aaf
movl $0x53, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_clear_exif(LodePNGInfo*)
void lodepng_clear_exif(LodePNGInfo* info) {
  lodepng_free(info->exif);
  info->exif = NULL;
  info->exif_size = 0;
  info->exif_defined = 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
callq 0x2290
movq $0x0, 0x90(%rbx)
xorl %eax, %eax
movl %eax, 0x98(%rbx)
movl %eax, 0x88(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_info_cleanup(LodePNGInfo*)
void lodepng_info_cleanup(LodePNGInfo* info) {
  lodepng_color_mode_cleanup(&info->color);
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  LodePNGText_cleanup(info);
  LodePNGIText_cleanup(info);

  lodepng_clear_icc(info);
  lodepng_clear_exif(info);

  LodePNGUnknownChunks_cleanup(info);
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x5baa
callq 0x2290
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %rbx, %rdi
callq 0x5655
movq %rbx, %rdi
callq 0x56b7
movq 0x100(%rbx), %rdi
callq 0x2290
xorl %r14d, %r14d
movq %r14, 0x100(%rbx)
movq 0x108(%rbx), %rdi
callq 0x2290
movq %r14, 0x108(%rbx)
movl %r14d, 0x110(%rbx)
movl %r14d, 0xfc(%rbx)
movq 0x90(%rbx), %rdi
callq 0x2290
movq %r14, 0x90(%rbx)
movl %r14d, 0x98(%rbx)
movl %r14d, 0x88(%rbx)
movq 0x178(%rbx,%r14,8), %rdi
callq 0x2290
incq %r14
cmpq $0x3, %r14
jne 0x5c19
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: color_tree_add(ColorTree*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned int)
static unsigned color_tree_add(ColorTree* tree,
                               unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index) {
  int bit;
  for(bit = 0; bit < 8; ++bit) {
    int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1);
    if(!tree->children[i]) {
      tree->children[i] = (ColorTree*)lodepng_malloc(sizeof(ColorTree));
      if(!tree->children[i]) return 83; /*alloc fail*/
      color_tree_init(tree->children[i]);
    }
    tree = tree->children[i];
  }
  tree->index = (int)index;
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, 0x4(%rsp)
movl %r8d, %r14d
movl %ecx, %r15d
movl %edx, %r13d
movq %rdi, %r12
xorl %ebx, %ebx
movl %esi, (%rsp)
movl %esi, %eax
movl %ebx, %ecx
shrl %cl, %eax
movl %r13d, %edi
shrl %cl, %edi
andl $0x1, %eax
andl $0x1, %edi
movl %r15d, %r10d
shrl %cl, %r10d
andl $0x1, %r10d
xorl %ecx, %ecx
btl %ebx, %r14d
setb %cl
leal (%rcx,%rdi,4), %ecx
leal (%rcx,%rax,8), %eax
leal (%rax,%r10,2), %ebp
cmpq $0x0, (%r12,%rbp,8)
jne 0x6560
movl $0x88, %edi
callq 0x22a0
movq %rax, (%r12,%rbp,8)
testq %rax, %rax
je 0x6577
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rax)
movups %xmm0, 0x60(%rax)
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl $0xffffffff, 0x80(%rax) # imm = 0xFFFFFFFF
movl (%rsp), %esi
movq (%r12,%rbp,8), %r12
movb $0x1, %al
testb %al, %al
je 0x657e
incl %ebx
cmpl $0x8, %ebx
jne 0x64e9
jmp 0x6585
xorl %eax, %eax
movl (%rsp), %esi
jmp 0x6566
movl $0x53, %eax
jmp 0x6593
movl 0x4(%rsp), %eax
movl %eax, 0x80(%r12)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: readChunk_tEXt(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_tEXt(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
  unsigned error = 0;
  char *key = 0, *str = 0;

  while(!error) /*not really a while loop, only used to break on error*/ {
    unsigned length, string2_begin;

    length = 0;
    while(length < chunkLength && data[length] != 0) ++length;
    /*even though it's not allowed by the standard, no error is thrown if
    there's no null termination char, if the text is empty*/
    if(length < 1 || length > 79) CERROR_BREAK(error, 89); /*keyword too short or long*/

    key = (char*)lodepng_malloc(length + 1);
    if(!key) CERROR_BREAK(error, 83); /*alloc fail*/

    lodepng_memcpy(key, data, length);
    key[length] = 0;

    string2_begin = length + 1; /*skip keyword null terminator*/

    length = (unsigned)(chunkLength < string2_begin ? 0 : chunkLength - string2_begin);
    str = (char*)lodepng_malloc(length + 1);
    if(!str) CERROR_BREAK(error, 83); /*alloc fail*/

    lodepng_memcpy(str, data + string2_begin, length);
    str[length] = 0;

    error = lodepng_add_text(info, key, str);

    break;
  }

  lodepng_free(key);
  lodepng_free(str);

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
testq %rdx, %rdx
je 0x85f0
xorl %ebx, %ebx
xorl %r13d, %r13d
cmpb $0x0, (%r15,%rbx)
je 0x85f5
incl %r13d
movq %r13, %rbx
cmpq %r14, %r13
jb 0x85dc
jmp 0x85f5
xorl %r13d, %r13d
xorl %ebx, %ebx
leal -0x50(%r13), %eax
cmpl $-0x4f, %eax
jae 0x8608
movl $0x59, %ebp
jmp 0x86ab
movq %rdi, 0x8(%rsp)
leal 0x1(%r13), %edi
movq %rdi, 0x10(%rsp)
callq 0x22a0
movl $0x53, %ebp
testq %rax, %rax
je 0x86ab
movq %rax, %r12
testl %r13d, %r13d
je 0x863f
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x21d0
movb $0x0, (%r12,%rbx)
xorl %eax, %eax
movq 0x10(%rsp), %rbx
subq %rbx, %r14
cmovbq %rax, %r14
leal 0x1(%r14), %edi
callq 0x22a0
testq %rax, %rax
je 0x86ae
movq %rax, %r13
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
andq %rax, %r14
je 0x867e
addq %rbx, %r15
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x21d0
movb $0x0, (%r13,%r14)
movq $-0x1, %rcx
cmpb $0x0, 0x1(%r13,%rcx)
leaq 0x1(%rcx), %rcx
jne 0x868b
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x556c
movl %eax, %ebp
jmp 0x86b1
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %r12, %rdi
callq 0x2290
movq %r13, %rdi
callq 0x2290
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: readChunk_mDCV(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_mDCV(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
  if(chunkLength != 24) return 119; /*invalid mDCV chunk size*/

  info->mdcv_defined = 1;
  info->mdcv_red_x = 256u * data[0] + data[1];
  info->mdcv_red_y = 256u * data[2] + data[3];
  info->mdcv_green_x = 256u * data[4] + data[5];
  info->mdcv_green_y = 256u * data[6] + data[7];
  info->mdcv_blue_x = 256u * data[8] + data[9];
  info->mdcv_blue_y = 256u * data[10] + data[11];
  info->mdcv_white_x = 256u * data[12] + data[13];
  info->mdcv_white_y = 256u * data[14] + data[15];
  info->mdcv_max_luminance = 16777216u * data[16] + 65536u * data[17] + 256u * data[18] + data[19];
  info->mdcv_min_luminance = 16777216u * data[20] + 65536u * data[21] + 256u * data[22] + data[23];

  return 0; /* OK */
}

// Assembly:
movl $0x77, %eax
cmpq $0x18, %rdx
jne 0x8e85
movl $0x1, 0x128(%rdi)
movzwl (%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x12c(%rdi)
movzwl 0x2(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x130(%rdi)
movzwl 0x4(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x134(%rdi)
movzwl 0x6(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x138(%rdi)
movzwl 0x8(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x13c(%rdi)
movzwl 0xa(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x140(%rdi)
movzwl 0xc(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x144(%rdi)
movzwl 0xe(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x148(%rdi)
movl 0x10(%rsi), %eax
bswapl %eax
movl %eax, 0x14c(%rdi)
movl 0x14(%rsi), %eax
bswapl %eax
movl %eax, 0x150(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movl $0x78, %eax
cmpq $0x8, %rdx
jne 0x8eb2
movl $0x1, 0x154(%rdi)
movl (%rsi), %eax
bswapl %eax
movl %eax, 0x158(%rdi)
movl 0x4(%rsi), %eax
bswapl %eax
movl %eax, 0x15c(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
movq %r8, %rax
movq %rcx, %r8
movl 0x2a0(%rsp), %ecx
movq %rsp, %rbx
movq $0x1, 0x38(%rbx)
movl $0x1000000, %r10d       # imm = 0x1000000
movq %r10, 0x40(%rbx)
movq %r10, 0x48(%rbx)
movabsq $0x100000000, %r10      # imm = 0x100000000
movq %r10, 0x30(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, (%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps 0x67dd5(%rip), %xmm1    # 0x72020
movaps %xmm1, 0x50(%rbx)
movabsq $0x100000080, %r10      # imm = 0x100000080
movq %r10, 0x60(%rbx)
movups %xmm0, 0x68(%rbx)
xorl %r10d, %r10d
movq %r10, 0x78(%rbx)
movabsq $0x500000001, %r11      # imm = 0x500000001
movq %r11, 0x84(%rbx)
movl $0x1, %r11d
movl %r11d, 0x80(%rbx)
movaps %xmm0, 0x90(%rbx)
movl %r11d, 0xa0(%rbx)
movaps %xmm0, 0xc0(%rbx)
movabsq $0x800000006, %r14      # imm = 0x800000006
movq %r14, 0xa8(%rbx)
movaps %xmm0, 0xb0(%rbx)
movups %xmm0, 0xf8(%rbx)
movq %r14, 0xe0(%rbx)
movups %xmm0, 0xe8(%rbx)
movl %r10d, 0xd8(%rbx)
movq %r10, 0xd0(%rbx)
movl %r10d, 0x188(%rbx)
movl %r10d, 0x198(%rbx)
movl %r10d, 0x1a0(%rbx)
movl %r10d, 0x1c4(%rbx)
movl %r10d, 0x158(%rbx)
movups %xmm0, 0x148(%rbx)
movups %xmm0, 0x138(%rbx)
movups %xmm0, 0x128(%rbx)
movups %xmm0, 0x118(%rbx)
movups %xmm0, 0x108(%rbx)
movaps %xmm0, 0x160(%rbx)
movl %r10d, 0x1dc(%rbx)
movups %xmm0, 0x1cc(%rbx)
movups %xmm0, 0x234(%rbx)
movups %xmm0, 0x224(%rbx)
movups %xmm0, 0x214(%rbx)
movups %xmm0, 0x204(%rbx)
movups %xmm0, 0x1f4(%rbx)
movups %xmm0, 0x1e4(%rbx)
movups %xmm0, 0x268(%rbx)
movups %xmm0, 0x258(%rbx)
movups %xmm0, 0x248(%rbx)
movl %r11d, 0x278(%rbx)
movl %r9d, 0xa8(%rbx)
movl %ecx, 0xac(%rbx)
movq %r10, 0x38(%rbx)
movq %rbx, %rcx
movq %rax, %r9
callq 0x90ac
movl %eax, %ebp
movq %rbx, %rdi
callq 0xa504
movl %ebp, %eax
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: lodepng_state_init(LodePNGState*)
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:
movq $0x1, 0x38(%rdi)
movl $0x1000000, %eax        # imm = 0x1000000
movq %rax, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x30(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, 0x20(%rdi)
movaps 0x67c3d(%rip), %xmm1    # 0x72020
movups %xmm1, 0x50(%rdi)
movabsq $0x100000080, %rax      # imm = 0x100000080
movq %rax, 0x60(%rdi)
movups %xmm0, 0x68(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x78(%rdi)
movabsq $0x500000001, %rax      # imm = 0x500000001
movq %rax, 0x84(%rdi)
movl $0x1, %eax
movl %eax, 0x80(%rdi)
movups %xmm0, 0x90(%rdi)
movl %eax, 0xa0(%rdi)
movups %xmm0, 0xc0(%rdi)
movabsq $0x800000006, %rdx      # imm = 0x800000006
movq %rdx, 0xa8(%rdi)
movups %xmm0, 0xb0(%rdi)
movups %xmm0, 0xf8(%rdi)
movq %rdx, 0xe0(%rdi)
movups %xmm0, 0xe8(%rdi)
movl %ecx, 0xd8(%rdi)
movq %rcx, 0xd0(%rdi)
movl %ecx, 0x188(%rdi)
movl %ecx, 0x198(%rdi)
movl %ecx, 0x1a0(%rdi)
movl %ecx, 0x1c4(%rdi)
movl %ecx, 0x158(%rdi)
movups %xmm0, 0x148(%rdi)
movups %xmm0, 0x138(%rdi)
movups %xmm0, 0x128(%rdi)
movups %xmm0, 0x118(%rdi)
movups %xmm0, 0x108(%rdi)
movups %xmm0, 0x160(%rdi)
movl %ecx, 0x1dc(%rdi)
movups %xmm0, 0x1cc(%rdi)
movups %xmm0, 0x234(%rdi)
movups %xmm0, 0x224(%rdi)
movups %xmm0, 0x214(%rdi)
movups %xmm0, 0x204(%rdi)
movups %xmm0, 0x1f4(%rdi)
movups %xmm0, 0x1e4(%rdi)
movups %xmm0, 0x268(%rdi)
movups %xmm0, 0x258(%rdi)
movups %xmm0, 0x248(%rdi)
movl %eax, 0x278(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %esi, %eax
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r15
movups %xmm0, 0x10(%r15)
movabsq $0x1000000006, %rsi     # imm = 0x1000000006
movq %rsi, -0x8(%r15)
movups %xmm0, (%r15)
movb %ah, (%rsp)
movq %rsp, %rsi
movb %al, 0x1(%rsi)
movb %dh, 0x2(%rsp)
movb %dl, 0x3(%rsi)
movb %ch, 0x4(%rsp)
movb %cl, 0x5(%rsi)
movw $0xffff, 0x6(%rsi)      # imm = 0xFFFF
leaq 0x8(%rsp), %r14
movl $0x1, %edx
movl $0x1, %ecx
movq %r14, %r8
callq 0x72be
movl %eax, %ebx
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0xb602
callq 0x2290
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movl %ebx, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r9d, %r15d
movl %r8d, %r14d
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %ebx
movq %rdi, %rsi
leaq 0x6898a(%rip), %rcx     # 0x74753
leaq 0x8(%rsp), %rdi
movl $0xd, %edx
callq 0xe9f0
testl %eax, %eax
jne 0xbe2b
movq 0x8(%rsp), %rdi
movl %ebx, %eax
shrl $0x18, %eax
movb %al, 0x8(%rdi)
movl %ebx, %eax
shrl $0x10, %eax
movb %al, 0x9(%rdi)
movb %bh, 0xa(%rdi)
movb %bl, 0xb(%rdi)
movl %r12d, %ecx
movl %r12d, %eax
shrl $0x18, %eax
movb %al, 0xc(%rdi)
movl %r12d, %eax
shrl $0x10, %eax
movb %al, 0xd(%rdi)
movb %ch, 0xe(%rdi)
movb %cl, 0xf(%rdi)
movb %r14b, 0x10(%rdi)
movb %bpl, 0x11(%rdi)
movw $0x0, 0x12(%rdi)
movb %r15b, 0x14(%rdi)
callq 0x4f2f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movl $0x74, %eax
cmpl $0xff, 0x118(%rsi)
ja 0xbf37
cmpl $0xff, 0x11c(%rbx)
ja 0xbf37
cmpl $0xff, 0x120(%rbx)
ja 0xbf37
cmpl $0xff, 0x124(%rbx)
ja 0xbf37
movq %rdi, %rsi
leaq 0x688a0(%rip), %rcx     # 0x74794
leaq 0x8(%rsp), %rdi
movl $0x4, %edx
callq 0xe9f0
testl %eax, %eax
jne 0xbf37
movb 0x118(%rbx), %al
movq 0x8(%rsp), %rdi
movb %al, 0x8(%rdi)
movb 0x11c(%rbx), %al
movb %al, 0x9(%rdi)
movb 0x120(%rbx), %al
movb %al, 0xa(%rdi)
movb 0x124(%rbx), %al
movb %al, 0xb(%rdi)
callq 0x4f2f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x686e9(%rip), %rcx     # 0x7479e
leaq 0x8(%rsp), %rdi
movl $0x8, %edx
callq 0xe9f0
testl %eax, %eax
jne 0xc0ea
movq 0x8(%rsp), %rdi
movl 0x158(%rbx), %eax
bswapl %eax
movl %eax, 0x8(%rdi)
movl 0x15c(%rbx), %eax
bswapl %eax
movl %eax, 0xc(%rdi)
callq 0x4f2f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r8
movq %rsi, %r14
movq %rdi, %r15
xorl %eax, %eax
movq %rax, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq %rax, (%rsp)
movq 0x100(%rsi), %rax
movq $-0x1, %rbx
cmpb $0x0, 0x1(%rax,%rbx)
leaq 0x1(%rbx), %rbx
jne 0xc121
leaq -0x50(%rbx), %rax
movl $0x59, %ebp
cmpq $-0x4f, %rax
jb 0xc1d8
movq 0x108(%r14), %rdx
movl 0x110(%r14), %ecx
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0xd16b
movl %eax, %ebp
testl %eax, %eax
jne 0xc182
movq (%rsp), %rax
leaq (%rax,%rbx), %rdx
addq $0x2, %rdx
leaq 0x6861c(%rip), %rcx     # 0x7478f
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0xe9f0
movl %eax, %ebp
testl %ebp, %ebp
jne 0xc1ce
movq 0x10(%rsp), %r15
testq %rbx, %rbx
je 0xc1a3
movq 0x100(%r14), %rsi
leaq 0x8(%r15), %rdi
movq %rbx, %rdx
callq 0x21d0
movw $0x0, 0x8(%r15,%rbx)
movq (%rsp), %rdx
testq %rdx, %rdx
je 0xc1c6
movq 0x8(%rsp), %rsi
leaq (%r15,%rbx), %rdi
addq $0xa, %rdi
callq 0x21d0
movq %r15, %rdi
callq 0x4f2f
movq 0x8(%rsp), %rdi
callq 0x2290
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x68589(%rip), %rcx     # 0x74780
leaq 0x8(%rsp), %rdi
movl $0x4, %edx
callq 0xe9f0
testl %eax, %eax
jne 0xc221
movq 0x8(%rsp), %rdi
movl 0xcc(%rbx), %eax
bswapl %eax
movl %eax, 0x8(%rdi)
callq 0x4f2f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x6854c(%rip), %rcx     # 0x74785
leaq 0x8(%rsp), %rdi
movl $0x20, %edx
callq 0xe9f0
testl %eax, %eax
jne 0xc2b0
movq 0x8(%rsp), %rdi
movl 0xd4(%rbx), %eax
bswapl %eax
movl %eax, 0x8(%rdi)
movl 0xd8(%rbx), %eax
bswapl %eax
movl %eax, 0xc(%rdi)
movl 0xdc(%rbx), %eax
bswapl %eax
movl %eax, 0x10(%rdi)
movl 0xe0(%rbx), %eax
bswapl %eax
movl %eax, 0x14(%rdi)
movl 0xe4(%rbx), %eax
bswapl %eax
movl %eax, 0x18(%rdi)
movl 0xe8(%rbx), %eax
bswapl %eax
movl %eax, 0x1c(%rdi)
movl 0xec(%rbx), %eax
bswapl %eax
movl %eax, 0x20(%rdi)
movl 0xf0(%rbx), %eax
bswapl %eax
movl %eax, 0x24(%rdi)
callq 0x4f2f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq 0x10(%rsi), %rcx
leaq -0x101(%rcx), %rdx
movl $0x44, %eax
cmpq $-0x100, %rdx
jb 0xc546
movq %rdi, %rsi
leaq (%rcx,%rcx,2), %rdx
leaq 0x6826a(%rip), %rcx     # 0x74758
leaq 0x8(%rsp), %rdi
callq 0xe9f0
testl %eax, %eax
jne 0xc546
cmpq $0x0, 0x10(%rbx)
je 0xc53a
movq 0x8(%rsp), %rax
addq $0xa, %rax
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movb (%rdx,%rcx,4), %dl
movb %dl, -0x2(%rax)
movq 0x8(%rbx), %rdx
movb 0x1(%rdx,%rcx,4), %dl
movb %dl, -0x1(%rax)
movq 0x8(%rbx), %rdx
movb 0x2(%rdx,%rcx,4), %dl
movb %dl, (%rax)
incq %rcx
addq $0x3, %rax
cmpq 0x10(%rbx), %rcx
jne 0xc50e
movq 0x8(%rsp), %rdi
callq 0x4f2f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_tRNS(ucvector*, LodePNGColorMode const*)
static unsigned addChunk_tRNS(ucvector* out, const LodePNGColorMode* info) {
  unsigned char* chunk = 0;

  if(info->colortype == LCT_PALETTE) {
    size_t i, amount = info->palettesize;
    /*the tail of palette values that all have 255 as alpha, does not have to be encoded*/
    for(i = info->palettesize; i != 0; --i) {
      if(info->palette[4 * (i - 1) + 3] != 255) break;
      --amount;
    }
    if(amount) {
      CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, amount, "tRNS"));
      /*add the alpha channel values from the palette*/
      for(i = 0; i != amount; ++i) chunk[8 + i] = info->palette[4 * i + 3];
    }
  } else if(info->colortype == LCT_GREY) {
    if(info->key_defined) {
      CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 2, "tRNS"));
      chunk[8] = (unsigned char)(info->key_r >> 8);
      chunk[9] = (unsigned char)(info->key_r & 255);
    }
  } else if(info->colortype == LCT_RGB) {
    if(info->key_defined) {
      CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 6, "tRNS"));
      chunk[8] = (unsigned char)(info->key_r >> 8);
      chunk[9] = (unsigned char)(info->key_r & 255);
      chunk[10] = (unsigned char)(info->key_g >> 8);
      chunk[11] = (unsigned char)(info->key_g & 255);
      chunk[12] = (unsigned char)(info->key_b >> 8);
      chunk[13] = (unsigned char)(info->key_b & 255);
    }
  }

  if(chunk) lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rsi
movq $0x0, (%rsp)
movl (%rbx), %eax
testl %eax, %eax
je 0xc612
cmpl $0x2, %eax
je 0xc5c6
cmpl $0x3, %eax
jne 0xc667
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0xc596
movq 0x8(%rbx), %rax
cmpb $-0x1, -0x1(%rax,%r14,4)
jne 0xc596
decq %r14
jne 0xc586
xorl %r14d, %r14d
movb $0x1, %r15b
testq %r14, %r14
je 0xc634
leaq 0x681b4(%rip), %rcx     # 0x7475d
movq %rsp, %rdi
movq %r14, %rdx
callq 0xe9f0
movl %eax, %ebp
testl %eax, %eax
je 0xc648
xorl %r15d, %r15d
jmp 0xc662
cmpl $0x0, 0x18(%rbx)
je 0xc667
leaq 0x68186(%rip), %rcx     # 0x7475d
movq %rsp, %rdi
movl $0x6, %edx
callq 0xe9f0
testl %eax, %eax
jne 0xc630
movb 0x1d(%rbx), %al
movq (%rsp), %rcx
movb %al, 0x8(%rcx)
movb 0x1c(%rbx), %al
movb %al, 0x9(%rcx)
movb 0x21(%rbx), %al
movb %al, 0xa(%rcx)
movb 0x20(%rbx), %al
movb %al, 0xb(%rcx)
movb 0x25(%rbx), %al
movb %al, 0xc(%rcx)
movb 0x24(%rbx), %al
movb %al, 0xd(%rcx)
jmp 0xc667
cmpl $0x0, 0x18(%rbx)
je 0xc667
leaq 0x6813e(%rip), %rcx     # 0x7475d
movq %rsp, %rdi
movl $0x2, %edx
callq 0xe9f0
testl %eax, %eax
je 0xc636
movl %eax, %ebp
jmp 0xc677
jmp 0xc662
movb 0x1d(%rbx), %al
movq (%rsp), %rcx
movb %al, 0x8(%rcx)
movb 0x1c(%rbx), %al
movb %al, 0x9(%rcx)
jmp 0xc667
movq (%rsp), %rax
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movb 0x3(%rdx,%rcx,4), %dl
movb %dl, 0x8(%rax,%rcx)
incq %rcx
cmpq %rcx, %r14
jne 0xc64e
testb %r15b, %r15b
je 0xc677
movq (%rsp), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0xc677
callq 0x4f2f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/lodepng.cpp
// Function: addChunk_bKGD(ucvector*, LodePNGInfo const*)
static unsigned addChunk_bKGD(ucvector* out, const LodePNGInfo* info) {
  unsigned char* chunk = 0;
  if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) {
    CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 2, "bKGD"));
    chunk[8] = (unsigned char)(info->background_r >> 8);
    chunk[9] = (unsigned char)(info->background_r & 255);
  } else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) {
    CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 6, "bKGD"));
    chunk[8] = (unsigned char)(info->background_r >> 8);
    chunk[9] = (unsigned char)(info->background_r & 255);
    chunk[10] = (unsigned char)(info->background_g >> 8);
    chunk[11] = (unsigned char)(info->background_g & 255);
    chunk[12] = (unsigned char)(info->background_b >> 8);
    chunk[13] = (unsigned char)(info->background_b & 255);
  } else if(info->color.colortype == LCT_PALETTE) {
    CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, 1, "bKGD"));
    chunk[8] = (unsigned char)(info->background_r & 255); /*palette index*/
  }
  if(chunk) lodepng_chunk_generate_crc(chunk);
  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq $0x0, (%rsp)
movl 0x10(%rsi), %eax
cmpq $0x6, %rax
ja 0xc744
movq %rdi, %rsi
leaq 0x65af3(%rip), %rcx     # 0x7219c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x680a9(%rip), %rcx     # 0x74762
movq %rsp, %rdi
movl $0x2, %edx
callq 0xe9f0
testl %eax, %eax
jne 0xc736
movb 0x3d(%rbx), %al
movq (%rsp), %rcx
movb %al, 0x8(%rcx)
movb 0x3c(%rbx), %al
movb %al, 0x9(%rcx)
jmp 0xc744
leaq 0x6807f(%rip), %rcx     # 0x74762
movq %rsp, %rdi
movl $0x6, %edx
callq 0xe9f0
testl %eax, %eax
jne 0xc736
movb 0x3d(%rbx), %al
movq (%rsp), %rcx
movb %al, 0x8(%rcx)
movb 0x3c(%rbx), %al
movb %al, 0x9(%rcx)
movb 0x41(%rbx), %al
movb %al, 0xa(%rcx)
movb 0x40(%rbx), %al
movb %al, 0xb(%rcx)
movb 0x45(%rbx), %al
movb %al, 0xc(%rcx)
movb 0x44(%rbx), %al
movb %al, 0xd(%rcx)
jmp 0xc744
leaq 0x6803d(%rip), %rcx     # 0x74762
movq %rsp, %rdi
movl $0x1, %edx
callq 0xe9f0
testl %eax, %eax
je 0xc73a
movl %eax, %ebp
jmp 0xc754
movb 0x3c(%rbx), %al
movq (%rsp), %rcx
movb %al, 0x8(%rcx)
movq (%rsp), %rdi
xorl %ebp, %ebp
testq %rdi, %rdi
je 0xc754
callq 0x4f2f
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq 0x6800c(%rip), %rcx     # 0x7477b
leaq 0x8(%rsp), %rdi
movl $0x9, %edx
callq 0xe9f0
testl %eax, %eax
jne 0xc7ad
movq 0x8(%rsp), %rdi
movl 0xbc(%rbx), %eax
bswapl %eax
movl %eax, 0x8(%rdi)
movl 0xc0(%rbx), %eax
bswapl %eax
movl %eax, 0xc(%rdi)
movb 0xc4(%rbx), %al
movb %al, 0x10(%rdi)
callq 0x4f2f
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq