LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/image.cpp
// Function: Image::write_png(char*) const
void Image::write_png(char* filename) const
{
	std::vector<unsigned char> image;
	image.resize(_width * _height * 4);
	std::vector<unsigned char>::iterator imageIterator = image.begin();
	Color *currentPixel = _pixel;
	while (imageIterator != image.end()) {
		*imageIterator = (unsigned char)(currentPixel->r * 255.0);
		imageIterator++;
		*imageIterator = (unsigned char)(currentPixel->g * 255.0);
		imageIterator++;
		*imageIterator = (unsigned char)(currentPixel->b * 255.0);
		imageIterator++;
		*imageIterator = 255;
		imageIterator++;
		currentPixel++;
	}
	LodePNG::encode(filename, image, _width, _height);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
leaq -0x30(%rbp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl 0x8(%rbx), %eax
imull 0xc(%rbx), %eax
shll $0x2, %eax
movslq %eax, %rsi
callq 0x19db8
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x19a40
movq (%rbx), %rcx
movsd 0x16d18(%rip), %xmm0    # 0x30718
movsd (%rcx), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movb %dl, (%rax)
movsd 0x8(%rcx), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movb %dl, 0x1(%rax)
movsd 0x10(%rcx), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movb %dl, 0x2(%rax)
movb $-0x1, 0x3(%rax)
addq $0x4, %rax
addq $0x18, %rcx
cmpq -0x28(%rbp), %rax
jne 0x19a00
leaq -0x50(%rbp), %rdi
leaq -0x11(%rbp), %rdx
movq %r14, %rsi
callq 0x19dea
movl 0x8(%rbx), %edx
movl 0xc(%rbx), %ecx
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0x6, %r8d
movl $0x8, %r9d
callq 0x2214d
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19a88
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x42d0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x19a9d
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x42d0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x19ac9
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x19ac9
jmp 0x19ac6
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x19ade
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x4550
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: ucvector_resize(ucvector*, unsigned long)
static unsigned ucvector_resize(ucvector* p, size_t size) /*returns 1 if success, 0 if failure ==> nothing done*/
{
  if(size * sizeof(unsigned) > p->allocsize)
  {
    size_t newsize = size * sizeof(unsigned) * 2;
    void* data = realloc(p->data, newsize);
    if(data)
    {
      p->allocsize = newsize;
      p->data = (unsigned char*)data;
      p->size = size;
    }
    else return 0; /*error: not enough memory*/
  }
  else p->size = size;
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq (,%rsi,4), %rax
cmpq 0x10(%rdi), %rax
jbe 0x1ab79
leaq (,%rbx,8), %r15
movq (%r14), %rdi
movq %r15, %rsi
callq 0x44f0
testq %rax, %rax
je 0x1ab8d
movq %r15, 0x10(%r14)
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x1ab82
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodeZlib_add32bitInt(ucvector*, unsigned int)
void LodeZlib_add32bitInt(ucvector* buffer, unsigned value)
{
  ucvector_push_back(buffer, (unsigned char)((value >> 24) & 0xff));
  ucvector_push_back(buffer, (unsigned char)((value >> 16) & 0xff));
  ucvector_push_back(buffer, (unsigned char)((value >>  8) & 0xff));
  ucvector_push_back(buffer, (unsigned char)((value      ) & 0xff));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
incq %rsi
callq 0x1ab3c
testl %eax, %eax
je 0x1bc98
movl %r14d, %eax
shrl $0x18, %eax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
movb %al, -0x1(%rcx,%rdx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1bcbc
movl %r14d, %eax
shrl $0x10, %eax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
movb %al, -0x1(%rcx,%rdx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1bcdd
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movl %r14d, %edx
movb %dh, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1bcfc
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb %r14b, -0x1(%rax,%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_chunk_check_crc(unsigned char const*)
unsigned LodePNG_chunk_check_crc(const unsigned char* chunk) /*returns 0 if the crc is correct, error code if it's incorrect*/
{
  unsigned length = LodePNG_chunk_length(chunk);
  unsigned CRC = LodePNG_read32bitInt(&chunk[length + 8]);
  unsigned checksum = Crc32_crc(&chunk[4], length + 4); /*the CRC is taken of the data and the 4 chunk type letters, not the length*/
  if(CRC != checksum) return 1;
  else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl (%rdi), %esi
bswapl %esi
leal 0x8(%rsi), %eax
movl (%rdi,%rax), %ebx
bswapl %ebx
addq $0x4, %rdi
addl $0x4, %esi
callq 0x1c228
xorl %ecx, %ecx
cmpl %eax, %ebx
setne %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_append_chunk(unsigned char**, unsigned long*, unsigned char const*)
unsigned LodePNG_append_chunk(unsigned char** out, size_t* outlength, const unsigned char* chunk) /*appends chunk that was already created, to the data. Returns error code.*/
{
  unsigned i;
  unsigned total_chunk_length = LodePNG_chunk_length(chunk) + 12;
  unsigned char *chunk_start, *new_buffer;
  size_t new_length = (*outlength) + total_chunk_length;
  if(new_length < total_chunk_length || new_length < (*outlength)) return 77; /*integer overflow happened*/
  
  new_buffer = (unsigned char*)realloc(*out, new_length);
  if(!new_buffer) return 9929;
  (*out) = new_buffer;
  (*outlength) = 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
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movzbl (%rdx), %r15d
shll $0x18, %r15d
movzbl 0x1(%rdx), %r14d
shll $0x10, %r14d
leal (%r14,%r15), %eax
movzbl 0x2(%rdx), %r12d
shll $0x8, %r12d
orl %r12d, %eax
movzbl 0x3(%rdx), %ecx
leal (%rcx,%rax), %r8d
addl $0xc, %r8d
movq (%rsi), %rax
movq %r8, %r13
movl $0x4d, %edx
addq %rax, %r13
jb 0x1c3b2
movq %r8, -0x40(%rbp)
movq %rax, -0x30(%rbp)
movq %rcx, -0x38(%rbp)
movq %rsi, -0x50(%rbp)
movq %rdi, -0x48(%rbp)
movq (%rdi), %rdi
movq %r13, %rsi
callq 0x44f0
testq %rax, %rax
je 0x1c3ad
movq -0x48(%rbp), %rcx
movq %rax, (%rcx)
movq -0x50(%rbp), %rcx
movq %r13, (%rcx)
xorl %edx, %edx
cmpl $0x0, -0x40(%rbp)
je 0x1c3b2
addq -0x30(%rbp), %rax
orl %r14d, %r15d
orl %r12d, %r15d
movq -0x38(%rbp), %rcx
leal (%rcx,%r15), %edx
addl $0xb, %edx
incq %rdx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4260
xorl %edx, %edx
jmp 0x1c3b2
movl $0x26c9, %edx           # imm = 0x26C9
movl %edx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_create_chunk(unsigned char**, unsigned long*, unsigned int, char const*, unsigned char const*)
unsigned LodePNG_create_chunk(unsigned char** out, size_t* outlength, unsigned length, const char* type, const unsigned char* data) /*appends new chunk to out. Returns error code; may change memory address of out buffer*/
{
  unsigned i;
  unsigned char *chunk, *new_buffer;
  size_t new_length = (*outlength) + length + 12;
  if(new_length < length + 12 || new_length < (*outlength)) return 77; /*integer overflow happened*/
  new_buffer = (unsigned char*)realloc(*out, new_length);
  if(!new_buffer) return 9930;
  (*out) = new_buffer;
  (*outlength) = new_length;
  chunk = &(*out)[(*outlength) - length - 12];
  
  /*1: length*/
  LodePNG_set32bitInt(chunk, (unsigned)length);
  
  /*2: chunk name (4 letters)*/
  chunk[4] = type[0];
  chunk[5] = type[1];
  chunk[6] = type[2];
  chunk[7] = type[3];
  
  /*3: the data*/
  for(i = 0; i < length; i++) chunk[8 + i] = data[i];
  
  /*4: CRC (of the chunkname characters and the data)*/
  LodePNG_chunk_generate_crc(chunk);
  
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movl %edx, %r14d
leaq 0xc(%r14), %rbx
addq (%rsi), %rbx
setb %al
leal 0xc(%rdx), %esi
cmpq %rsi, %rbx
setb %sil
orb %al, %sil
movl $0x4d, %eax
jne 0x1c49e
movq %r8, %r15
movq %rdi, %r13
movq %rcx, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq (%rdi), %rdi
movq %rbx, %rsi
callq 0x44f0
testq %rax, %rax
je 0x1c499
movq %rax, (%r13)
movq %rbx, (%r12)
subq %r14, %rbx
leaq (%rax,%rbx), %rdi
addq $-0xc, %rdi
movq -0x38(%rbp), %rdx
movl %edx, %ecx
shrl $0x18, %ecx
movb %cl, -0xc(%rax,%rbx)
movl %edx, %ecx
shrl $0x10, %ecx
movb %cl, -0xb(%rax,%rbx)
movb %dh, -0xa(%rax,%rbx)
movb %dl, -0x9(%rax,%rbx)
movq -0x30(%rbp), %rsi
movb (%rsi), %cl
movb %cl, -0x8(%rax,%rbx)
movb 0x1(%rsi), %cl
movb %cl, -0x7(%rax,%rbx)
movb 0x2(%rsi), %cl
movb %cl, -0x6(%rax,%rbx)
movb 0x3(%rsi), %cl
movb %cl, -0x5(%rax,%rbx)
testl %edx, %edx
je 0x1c490
negq %r14
movl $0x8, %eax
movb -0x8(%r15,%rax), %cl
movl %eax, %edx
movb %cl, (%rdi,%rdx)
leaq (%r14,%rax), %rcx
incq %rcx
incq %rax
cmpq $0x8, %rcx
jne 0x1c476
callq 0x1c2b0
xorl %eax, %eax
jmp 0x1c49e
movl $0x26ca, %eax           # imm = 0x26CA
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_InfoColor_addPalette(LodePNG_InfoColor*, unsigned char, unsigned char, unsigned char, unsigned char)
unsigned LodePNG_InfoColor_addPalette(LodePNG_InfoColor* info, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
{
  unsigned char* data;
  /*the same resize technique as C++ std::vectors is used, and here it's made so that for a palette with the max of 256 colors, it'll have the exact alloc size*/
  if(!(info->palettesize & (info->palettesize - 1))) /*if palettesize is 0 or a power of two*/
  {
    /*allocated data must be at least 4* palettesize (for 4 color bytes)*/
    size_t alloc_size = info->palettesize == 0 ? 4 : info->palettesize * 4 * 2;
    data = (unsigned char*)realloc(info->palette, alloc_size);
    if(!data) return 9931;
    else info->palette = data;
  }
  info->palette[4 * info->palettesize + 0] = r;
  info->palette[4 * info->palettesize + 1] = g;
  info->palette[4 * info->palettesize + 2] = b;
  info->palette[4 * info->palettesize + 3] = a;
  info->palettesize++;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %r14
movq 0x10(%rdi), %rcx
leaq -0x1(%rcx), %rax
testq %rax, %rcx
jne 0x1c56d
leaq (,%rcx,8), %rax
testq %rcx, %rcx
movl $0x4, %esi
cmovneq %rax, %rsi
movq 0x8(%r14), %rdi
callq 0x44f0
testq %rax, %rax
je 0x1c5b0
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rcx
jmp 0x1c571
movq 0x8(%r14), %rax
movb %r13b, (%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %r12b, 0x1(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %r15b, 0x2(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bl, 0x3(%rax,%rcx,4)
incq 0x10(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x26cb, %eax           # imm = 0x26CB
jmp 0x1c5a1
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_UnknownChunks_copy(LodePNG_UnknownChunks*, LodePNG_UnknownChunks const*)
unsigned LodePNG_UnknownChunks_copy(LodePNG_UnknownChunks* dest, const LodePNG_UnknownChunks* src)
{
  unsigned i;
  
  LodePNG_UnknownChunks_cleanup(dest);
  
  for(i = 0; i < 3; i++)
  {
    size_t j;
    dest->datasize[i] = src->datasize[i];
    dest->data[i] = (unsigned char*)malloc(src->datasize[i]);
    if(!dest->data[i] && dest->datasize[i]) return 9932;
    for(j = 0; j < src->datasize[i]; j++) dest->data[i][j] = src->data[i][j];
  }
  
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
callq 0x4380
incq %r15
cmpq $0x3, %r15
jne 0x1c675
xorl %r12d, %r12d
movq 0x18(%rbx,%r12,8), %r15
movq %r15, 0x18(%r14,%r12,8)
movq %r15, %rdi
callq 0x4410
movq %rax, (%r14,%r12,8)
testq %rax, %rax
sete %al
testq %r15, %r15
setne %cl
testb %cl, %al
jne 0x1c6dc
testq %r15, %r15
je 0x1c6cf
xorl %eax, %eax
movq (%rbx,%r12,8), %rcx
movb (%rcx,%rax), %cl
movq (%r14,%r12,8), %rdx
movb %cl, (%rdx,%rax)
incq %rax
cmpq 0x18(%rbx,%r12,8), %rax
jb 0x1c6b7
incq %r12
cmpq $0x3, %r12
jne 0x1c68a
xorl %eax, %eax
jmp 0x1c6e1
movl $0x26cc, %eax           # imm = 0x26CC
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_Text_clear(LodePNG_Text*)
void LodePNG_Text_clear(LodePNG_Text* text)
{
  size_t i;
  for(i = 0; i < text->num; i++)
    {
    string_cleanup(&text->keys[i]);
    string_cleanup(&text->strings[i]);
    }
  free(text->keys);
  free(text->strings);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x1c74c
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x4380
movq %r14, (%r12,%r15,8)
movq 0x10(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x4380
movq %r14, (%r12,%r15,8)
incq %r15
cmpq (%rbx), %r15
jb 0x1c722
movq 0x8(%rbx), %rdi
callq 0x4380
movq 0x10(%rbx), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4380
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_Text_copy(LodePNG_Text*, LodePNG_Text const*)
unsigned LodePNG_Text_copy(LodePNG_Text* dest, const LodePNG_Text* source)
{
  size_t i = 0;
  dest->keys = 0;
  dest->strings = 0;
  dest->num = 0;
  for(i = 0; i < source->num; i++)
  {
    unsigned error = LodePNG_Text_add(dest, source->keys[i], source->strings[i]);
    if(error) return error;
  }
  return 0;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
cmpq $0x0, (%rsi)
je 0x1c7be
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq (%rax,%r15,8), %rsi
movq (%rcx,%r15,8), %rdx
movq %r14, %rdi
callq 0x1c7c1
testl %eax, %eax
jne 0x1c7b3
incq %r15
cmpq (%rbx), %r15
jb 0x1c78d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_Text_add(LodePNG_Text*, char const*, char const*)
unsigned LodePNG_Text_add(LodePNG_Text* text, const char* key, const char* str)
{
  char** new_keys = (char**)(realloc(text->keys, sizeof(char*) * (text->num + 1)));
  char** new_strings = (char**)(realloc(text->strings, sizeof(char*) * (text->num + 1)));
  if(!new_keys || !new_strings)
  {
    free(new_keys);
    free(new_strings);
    return 9933;
  }
  
  text->num++;
  text->keys = new_keys;
  text->strings = new_strings;
  
  string_init(&text->keys[text->num - 1]);
  string_set(&text->keys[text->num - 1], key);
  
  string_init(&text->strings[text->num - 1]);
  string_set(&text->strings[text->num - 1], str);
  
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x44f0
movq %rax, %r12
movq (%r14), %rax
movq 0x10(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x44f0
movq %rax, %r13
testq %r12, %r12
setne %al
testq %r13, %r13
setne %cl
testb %cl, %al
je 0x1c8a6
movq %r15, -0x30(%rbp)
movq %rbx, -0x38(%rbp)
movq (%r14), %r15
leaq 0x1(%r15), %rbx
movq %rbx, (%r14)
movq %r12, 0x8(%r14)
movq %r13, 0x10(%r14)
movq $0x0, (%r12,%r15,8)
movl $0x1, %edi
callq 0x4410
testq %rax, %rax
je 0x1c855
movb $0x0, (%rax)
movq %rax, (%r12,%r15,8)
leaq (%r12,%rbx,8), %rdi
addq $-0x8, %rdi
movq -0x30(%rbp), %rsi
callq 0x1c8ca
movq (%r14), %rbx
movq 0x10(%r14), %r15
movq $0x0, -0x8(%r15,%rbx,8)
movl $0x1, %edi
callq 0x4410
testq %rax, %rax
je 0x1c88d
movb $0x0, (%rax)
movq %rax, -0x8(%r15,%rbx,8)
movq 0x10(%r14), %rax
leaq (%rax,%rbx,8), %rdi
addq $-0x8, %rdi
movq -0x38(%rbp), %rsi
callq 0x1c8ca
xorl %eax, %eax
jmp 0x1c8bb
movq %r12, %rdi
callq 0x4380
movq %r13, %rdi
callq 0x4380
movl $0x26cd, %eax           # imm = 0x26CD
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_IText_clear(LodePNG_IText*)
void LodePNG_IText_clear(LodePNG_IText* text)
{
  size_t i;
  for(i = 0; i < text->num; i++)
    {
    string_cleanup(&text->keys[i]);
    string_cleanup(&text->langtags[i]);
    string_cleanup(&text->transkeys[i]);
    string_cleanup(&text->strings[i]);
    }
  free(text->keys);
  free(text->langtags);
  free(text->transkeys);
  free(text->strings);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, (%rdi)
je 0x1c9a9
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x4380
movq %r14, (%r12,%r15,8)
movq 0x10(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x4380
movq %r14, (%r12,%r15,8)
movq 0x18(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x4380
movq %r14, (%r12,%r15,8)
movq 0x20(%rbx), %r12
movq (%r12,%r15,8), %rdi
callq 0x4380
movq %r14, (%r12,%r15,8)
incq %r15
cmpq (%rbx), %r15
jb 0x1c95d
movq 0x8(%rbx), %rdi
callq 0x4380
movq 0x10(%rbx), %rdi
callq 0x4380
movq 0x18(%rbx), %rdi
callq 0x4380
movq 0x20(%rbx), %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4380
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_IText_copy(LodePNG_IText*, LodePNG_IText const*)
unsigned LodePNG_IText_copy(LodePNG_IText* dest, const LodePNG_IText* source)
{
  size_t i = 0;
  dest->keys = 0;
  dest->langtags = 0;
  dest->transkeys = 0;
  dest->strings = 0;
  dest->num = 0;
  for(i = 0; i < source->num; i++)
  {
    unsigned error = LodePNG_IText_add(dest, source->keys[i], source->langtags[i], source->transkeys[i], source->strings[i]);
    if(error) return error;
  }
  return 0;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
cmpq $0x0, (%rsi)
je 0x1ca41
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq (%rax,%r15,8), %rsi
movq (%rcx,%r15,8), %rdx
movq 0x18(%rbx), %rax
movq (%rax,%r15,8), %rcx
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %r8
movq %r14, %rdi
callq 0x1ca44
testl %eax, %eax
jne 0x1ca36
incq %r15
cmpq (%rbx), %r15
jb 0x1ca00
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_InfoPng_cleanup(LodePNG_InfoPng*)
void LodePNG_InfoPng_cleanup(LodePNG_InfoPng* info)
{
  LodePNG_InfoColor_cleanup(&info->color);
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  LodePNG_Text_cleanup(&info->text);
  LodePNG_IText_cleanup(&info->itext);
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
#ifdef LODEPNG_COMPILE_UNKNOWN_CHUNKS
  LodePNG_UnknownChunks_cleanup(&info->unknown_chunks);
#endif /*LODEPNG_COMPILE_UNKNOWN_CHUNKS*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0x1cca0
callq 0x4380
movq $0x0, 0x28(%rbx)
leaq 0x50(%rbx), %rdi
callq 0x1c708
leaq 0x68(%rbx), %rdi
callq 0x1c943
xorl %r14d, %r14d
movq 0xb0(%rbx,%r14,8), %rdi
callq 0x4380
incq %r14
cmpq $0x3, %r14
jne 0x1ccbd
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_InfoPng_copy(LodePNG_InfoPng*, LodePNG_InfoPng const*)
unsigned LodePNG_InfoPng_copy(LodePNG_InfoPng* dest, const LodePNG_InfoPng* source)
{
  unsigned error = 0;
  LodePNG_InfoPng_cleanup(dest);
  *dest = *source;
  LodePNG_InfoColor_init(&dest->color);
  error = LodePNG_InfoColor_copy(&dest->color, &source->color); if(error) return error;
  
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  error = LodePNG_Text_copy(&dest->text, &source->text); if(error) return error;
  error = LodePNG_IText_copy(&dest->itext, &source->itext); if(error) return error;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
  
#ifdef LODEPNG_COMPILE_UNKNOWN_CHUNKS
  LodePNG_UnknownChunks_init(&dest->unknown_chunks);
  error = LodePNG_UnknownChunks_copy(&dest->unknown_chunks, &source->unknown_chunks); if(error) return error;
#endif /*LODEPNG_COMPILE_UNKNOWN_CHUNKS*/
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1cc88
movl $0xe0, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4260
leaq 0x18(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x18(%r14)
movups %xmm0, 0x20(%r14)
leaq 0x18(%rbx), %rsi
callq 0x1cd80
testl %eax, %eax
jne 0x1cd48
leaq 0x50(%r14), %rdi
leaq 0x50(%rbx), %rsi
callq 0x1c766
testl %eax, %eax
jne 0x1cd48
leaq 0x68(%r14), %rdi
leaq 0x68(%rbx), %rsi
callq 0x1c9d5
testl %eax, %eax
je 0x1cd4d
popq %rbx
popq %r14
popq %rbp
retq
movl $0xb0, %eax
leaq (%r14,%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%r14)
movups %xmm0, 0xc0(%r14)
movups %xmm0, 0xb0(%r14)
addq %rax, %rbx
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1c661
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_InfoColor_copy(LodePNG_InfoColor*, LodePNG_InfoColor const*)
unsigned LodePNG_InfoColor_copy(LodePNG_InfoColor* dest, const LodePNG_InfoColor* source)
{
  size_t i;
  LodePNG_InfoColor_cleanup(dest);
  *dest = *source;
  dest->palette = (unsigned char*)malloc(source->palettesize * 4);
  if(!dest->palette && source->palettesize) return 9935;
  for(i = 0; i < source->palettesize * 4; i++) dest->palette[i] = source->palette[i];
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x1cd9f
callq 0x4380
movq $0x0, 0x10(%r14)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm0, (%r14)
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movq 0x10(%rbx), %r12
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x4410
movq %rax, 0x8(%r14)
testq %rax, %rax
sete %cl
testq %r12, %r12
setne %dl
movl $0x26cf, %eax           # imm = 0x26CF
testb %cl, %dl
jne 0x1ce13
xorl %eax, %eax
testq %r15, %r15
je 0x1ce13
xorl %ecx, %ecx
movq 0x8(%rbx), %rdx
movb (%rdx,%rcx), %dl
movq 0x8(%r14), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
movq 0x10(%rbx), %rdx
shlq $0x2, %rdx
cmpq %rdx, %rcx
jb 0x1cdf5
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_InfoRaw_copy(LodePNG_InfoRaw*, LodePNG_InfoRaw const*)
unsigned LodePNG_InfoRaw_copy(LodePNG_InfoRaw* dest, const LodePNG_InfoRaw* source)
{
  unsigned error = 0;
  LodePNG_InfoRaw_cleanup(dest);
  *dest = *source;
  LodePNG_InfoColor_init(&dest->color);
  error = LodePNG_InfoColor_copy(&dest->color, &source->color); if(error) return error;
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x1cedd
callq 0x4380
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, (%r14)
movups %xmm0, (%r15)
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1cd80
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: checkColorValidity(unsigned int, unsigned int)
static unsigned checkColorValidity(unsigned colorType, unsigned bd) /*bd = bitDepth*/
{
  switch(colorType)
  {
    case 0: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break; /*grey*/
    case 2: if(!(                                 bd == 8 || bd == 16)) return 37; break; /*RGB*/
    case 3: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8            )) return 37; break; /*palette*/
    case 4: if(!(                                 bd == 8 || bd == 16)) return 37; break; /*grey + alpha*/
    case 6: if(!(                                 bd == 8 || bd == 16)) return 37; break; /*RGBA*/
    default: return 31;
  }
  return 0; /*allowed color type / bits combination*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1f, %eax
cmpl $0x6, %edi
ja 0x1da1d
movl %edi, %ecx
leaq 0x12e44(%rip), %rdx     # 0x30818
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $-0x8, %esi
andl $-0x9, %esi
movl $0x25, %eax
cmovel %esi, %eax
jmp 0x1da1d
movl $0x25, %eax
cmpl $0x10, %esi
ja 0x1da1d
movl $0x10116, %ecx          # imm = 0x10116
btl %esi, %ecx
jae 0x1da1d
xorl %eax, %eax
jmp 0x1da1d
decl %esi
movl $0x25, %eax
cmpl $0x8, %esi
jae 0x1da1d
movl %esi, %eax
leaq 0x131f6(%rip), %rcx     # 0x30c10
movl (%rcx,%rax,4), %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_decode32f(unsigned char**, unsigned int*, unsigned int*, char const*)
unsigned LodePNG_decode32f(unsigned char** out, unsigned* w, unsigned* h, const char* filename)
{
  unsigned char* buffer;
  size_t buffersize;
  unsigned error;
  error = LodePNG_loadFile(&buffer, &buffersize, filename);
  if(!error) error = LodePNG_decode32(out, w, h, buffer, buffersize);
  free(buffer);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
leaq -0x38(%rbp), %r15
leaq -0x30(%rbp), %rsi
movq %r15, %rdi
movq %rcx, %rdx
callq 0x1ee88
movl %eax, %r13d
movq (%r15), %r15
testl %eax, %eax
jne 0x1ee6e
movq -0x30(%rbp), %r8
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x1ec4f
movl %eax, %r13d
movq %r15, %rdi
callq 0x4380
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_loadFile(unsigned char**, unsigned long*, char const*)
unsigned LodePNG_loadFile(unsigned char** out, size_t* outsize, const char* filename) /*designed for loading files from hard disk in a dynamically allocated buffer*/
{
  FILE* file;
  long size;
  
  /*provide some proper output values if error will happen*/
  *out = 0;
  *outsize = 0;

  file = fopen(filename, "rb");
  if(!file) return 78;

  /*get filesize:*/
  fseek(file , 0 , SEEK_END);
  size = ftell(file);
  rewind(file);
  
  /*read contents of the file into the vector*/
  *outsize = 0;
  *out = (unsigned char*)malloc((size_t)size);
  if(size && (*out)) (*outsize) = fread(*out, 1, (size_t)size, file);

  fclose(file);
  if(!(*out) && size) return 80; /*the above malloc failed*/
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, (%rdi)
movq %rax, (%rsi)
leaq 0x11d0e(%rip), %rsi     # 0x30bb9
movq %rdx, %rdi
callq 0x4370
testq %rax, %rax
je 0x1ef36
movq %rax, %r15
xorl %r13d, %r13d
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4330
movq %r15, %rdi
callq 0x4030
movq %rax, %r12
movq %r15, %rdi
callq 0x4080
movq $0x0, (%r14)
movq %r12, %rdi
callq 0x4410
movq %rax, (%rbx)
testq %r12, %r12
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x1ef18
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x4460
movq %rax, (%r14)
movq %r15, %rdi
callq 0x42b0
cmpq $0x0, (%rbx)
movl $0x50, %eax
cmovnel %r13d, %eax
testq %r12, %r12
cmovel %r13d, %eax
jmp 0x1ef3b
movl $0x4e, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_Decoder_copy(LodePNG_Decoder*, LodePNG_Decoder const*)
void LodePNG_Decoder_copy(LodePNG_Decoder* dest, const LodePNG_Decoder* source)
{
  LodePNG_Decoder_cleanup(dest);
  *dest = *source;
  LodePNG_InfoRaw_init(&dest->infoRaw);
  LodePNG_InfoPng_init(&dest->infoPng);
  dest->error = LodePNG_InfoRaw_copy(&dest->infoRaw, &source->infoRaw); if(dest->error) return;
  dest->error = LodePNG_InfoPng_copy(&dest->infoPng, &source->infoPng); if(dest->error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x1edee
movl $0x128, %edx            # imm = 0x128
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4260
leaq 0x18(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x18(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x70(%rbx)
movq %rax, 0x58(%rbx)
movups %xmm0, 0x60(%rbx)
xorl %eax, %eax
movl %eax, 0x50(%rbx)
movl %eax, 0xe0(%rbx)
movups %xmm0, 0xf0(%rbx)
movups %xmm0, 0x100(%rbx)
movups %xmm0, 0x110(%rbx)
movups %xmm0, 0x80(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xc0(%rbx)
movb $0x0, 0xd0(%rbx)
leaq 0x18(%r14), %rsi
callq 0x1cebb
movl %eax, 0x120(%rbx)
testl %eax, %eax
jne 0x1f02e
leaq 0x40(%rbx), %rdi
addq $0x40, %r14
movq %r14, %rsi
callq 0x1ccd8
movl %eax, 0x120(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: writeSignature(ucvector*)
static void writeSignature(ucvector* out)
{
  /*8 bytes PNG signature*/
  ucvector_push_back(out, 137);
  ucvector_push_back(out, 80);
  ucvector_push_back(out, 78);
  ucvector_push_back(out, 71);
  ucvector_push_back(out, 13);
  ucvector_push_back(out, 10);
  ucvector_push_back(out, 26);
  ucvector_push_back(out, 10);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
incq %rsi
callq 0x1ab3c
testl %eax, %eax
je 0x1fd03
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb $-0x77, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1fd22
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb $0x50, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1fd41
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb $0x4e, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1fd60
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb $0x47, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1fd7f
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb $0xd, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1fd9e
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb $0xa, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1fdbd
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb $0x1a, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1ab3c
testl %eax, %eax
je 0x1fddc
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb $0xa, -0x1(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: addUnknownChunks(ucvector*, unsigned char*, unsigned long)
static unsigned addUnknownChunks(ucvector* out, unsigned char* data, size_t datasize)
{
  unsigned char* inchunk = data;
  while((size_t)(inchunk - data) < datasize)
  {
    unsigned error = LodePNG_append_chunk(&out->data, &out->size, inchunk);
    if(error) return error; /*error: not enough memory*/
    out->allocsize = out->size; /*fix the allocsize again*/
    inchunk = LodePNG_chunk_next(inchunk);
  }
  return 0;
}

// Assembly:
xorl %eax, %eax
testq %rdx, %rdx
je 0x2007d
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x8(%rdi), %r13
movq %rsi, %r15
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1c2fb
testl %eax, %eax
jne 0x2006f
movq 0x8(%r12), %rax
movq %rax, 0x10(%r12)
movl (%r15), %eax
bswapl %eax
addl $0xc, %eax
addq %rax, %r15
movq %r15, %rax
subq %rbx, %rax
cmpq %r14, %rax
jb 0x2003b
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_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: addChunk_pHYs(ucvector*, LodePNG_InfoPng const*)
static unsigned addChunk_pHYs(ucvector* out, const LodePNG_InfoPng* info)
{
  unsigned error = 0;
  ucvector data;
  ucvector_init(&data);
  
  LodePNG_add32bitInt(&data, info->phys_x);
  LodePNG_add32bitInt(&data, info->phys_y);
  ucvector_push_back(&data, info->phys_unit);
  
  error = addChunk(out, "pHYs", data.data, data.size);
  ucvector_cleanup(&data);
  
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, -0x38(%rbp)
movl 0xa4(%rsi), %ebx
movl $0x20, %edi
callq 0x4410
movq %rax, %r14
xorl %r15d, %r15d
testq %rax, %rax
setne %r15b
shll $0x2, %r15d
leaq 0x4(%r15), %r13
bswapl %ebx
movl %ebx, -0x4(%rax,%r15)
movl 0xa8(%r12), %ebx
testq %rax, %rax
je 0x207e3
movq %r13, %r15
movl $0x20, %ecx
jmp 0x2080a
leal (,%r13,8), %esi
movq %r14, %rdi
movq %rsi, -0x30(%rbp)
callq 0x44f0
testq %rax, %rax
je 0x20808
movq %rax, %r14
movq %r13, %r15
movq -0x30(%rbp), %rcx
jmp 0x2080a
xorl %ecx, %ecx
bswapl %ebx
movl %ebx, -0x4(%r14,%r15)
movb 0xac(%r12), %bl
leaq 0x1(%r15), %r12
leal (,%r12,4), %eax
cmpl %ecx, %eax
jbe 0x20840
leal (,%r12,8), %esi
movq %r14, %rdi
callq 0x44f0
testq %rax, %rax
jne 0x20843
jmp 0x2084e
movq %r14, %rax
movb %bl, -0x1(%rax,%r12)
movq %r12, %r15
movq %rax, %r14
movq -0x38(%rbp), %rbx
leaq 0x8(%rbx), %rsi
leaq 0x1038f(%rip), %rcx     # 0x30bec
movq %rbx, %rdi
movl %r15d, %edx
movq %r14, %r8
callq 0x1c3c3
testl %eax, %eax
jne 0x20877
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4380
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: addChunk_IDAT(ucvector*, unsigned char const*, unsigned long, LodeZlib_DeflateSettings*)
static unsigned addChunk_IDAT(ucvector* out, const unsigned char* data, size_t datasize, LodeZlib_DeflateSettings* zlibsettings)
{
  ucvector zlibdata;
  unsigned error = 0;
  
  /*compress with the Zlib compressor*/
  ucvector_init(&zlibdata);
  error = LodePNG_compress(&zlibdata.data, &zlibdata.size, data, datasize, zlibsettings);
  if(!error) error = addChunk(out, "IDAT", zlibdata.data, zlibdata.size);
  ucvector_cleanup(&zlibdata);
  
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq -0x28(%rbp), %rsi
movaps %xmm0, -0x8(%rsi)
movq $0x0, 0x8(%rsi)
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x1be80
movq (%r14), %r14
testl %eax, %eax
jne 0x208e9
movl -0x28(%rbp), %edx
leaq 0x8(%rbx), %rsi
leaq 0x102e5(%rip), %rcx     # 0x30bbf
movq %rbx, %rdi
movq %r14, %r8
callq 0x1c3c3
testl %eax, %eax
je 0x20902
movl %eax, %r15d
movq %r14, %rdi
callq 0x4380
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
xorl %r15d, %r15d
jmp 0x208ec
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: addChunk_tIME(ucvector*, LodePNG_Time const*)
static unsigned addChunk_tIME(ucvector* out, const LodePNG_Time* time)
{
  unsigned error = 0;
  unsigned char* data = (unsigned char*)malloc(7);
  if(!data) return 9948;
  data[0] = (unsigned char)(time->year / 256);
  data[1] = (unsigned char)(time->year % 256);
  data[2] = time->month;
  data[3] = time->day;
  data[4] = time->hour;
  data[5] = time->minute;
  data[6] = time->second;
  error = addChunk(out, "tIME", data, 7);
  free(data);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movl $0x7, %edi
callq 0x4410
testq %rax, %rax
je 0x2099e
movq %rax, %r14
movzwl (%r15), %eax
rolw $0x8, %ax
movw %ax, (%r14)
movb 0x4(%r15), %al
movb %al, 0x2(%r14)
movb 0x5(%r15), %al
movb %al, 0x3(%r14)
movb 0x6(%r15), %al
movb %al, 0x4(%r14)
movb 0x7(%r15), %al
movb %al, 0x5(%r14)
movb 0x8(%r15), %al
movb %al, 0x6(%r14)
leaq 0x8(%rbx), %rsi
leaq 0x10277(%rip), %rcx     # 0x30be7
movq %rbx, %rdi
movl $0x7, %edx
movq %r14, %r8
callq 0x1c3c3
testl %eax, %eax
jne 0x2098c
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4380
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_encode32(unsigned char**, unsigned long*, unsigned char const*, unsigned int, unsigned int)
unsigned LodePNG_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h)
{
  unsigned error;
  LodePNG_Encoder encoder;
  LodePNG_Encoder_init(&encoder);
  LodePNG_encode(&encoder, out, outsize, image, w, h);
  error = encoder.error;
  LodePNG_Encoder_cleanup(&encoder);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movl %r8d, %r9d
movl %ecx, %r8d
movq %rdx, %rcx
movq %rsi, %rdx
movq %rdi, %rsi
movaps 0xf500(%rip), %xmm0     # 0x307d0
leaq -0x140(%rbp), %rbx
movups %xmm0, (%rbx)
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x10(%rbx)
xorl %eax, %eax
movl %eax, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x50(%rbx)
movabsq $0x800000006, %rdi      # imm = 0x800000006
movq %rdi, 0x38(%rbx)
movups %xmm0, 0x40(%rbx)
movl %eax, 0x30(%rbx)
movl %eax, 0xc0(%rbx)
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
movups %xmm0, 0xf0(%rbx)
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0x80(%rbx)
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
movb $0x0, 0xb0(%rbx)
movups %xmm0, 0x118(%rbx)
movq %rdi, 0x100(%rbx)
movups %xmm0, 0x108(%rbx)
movl $0x1, 0x128(%rbx)
movq %rbx, %rdi
callq 0x1f033
movl 0x128(%rbx), %r14d
movq %rbx, %rdi
callq 0x21432
movl %r14d, %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_encode32f(char const*, unsigned char const*, unsigned int, unsigned int)
unsigned LodePNG_encode32f(const char* filename, const unsigned char* image, unsigned w, unsigned h)
{
  unsigned char* buffer;
  size_t buffersize;
  unsigned error = LodePNG_encode32(&buffer, &buffersize, image, w, h);
  LodePNG_saveFile(buffer, buffersize, filename);
  free(buffer);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rdx
movq %rdi, %rbx
leaq -0x30(%rbp), %r14
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x212ac
movl %eax, %r12d
movq (%r14), %r14
movq (%r15), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x214c0
movq %r14, %rdi
callq 0x4380
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_Encoder_copy(LodePNG_Encoder*, LodePNG_Encoder const*)
void LodePNG_Encoder_copy(LodePNG_Encoder* dest, const LodePNG_Encoder* source)
{
  LodePNG_Encoder_cleanup(dest);
  *dest = *source;
  LodePNG_InfoPng_init(&dest->infoPng);
  LodePNG_InfoRaw_init(&dest->infoRaw);
  dest->error = LodePNG_InfoPng_copy(&dest->infoPng, &source->infoPng); if(dest->error) return;
  dest->error = LodePNG_InfoRaw_copy(&dest->infoRaw, &source->infoRaw); if(dest->error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x21432
movl $0x130, %edx            # imm = 0x130
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4260
leaq 0x20(%rbx), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x50(%rbx)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x38(%rbx)
movups %xmm0, 0x40(%rbx)
xorl %ecx, %ecx
movl %ecx, 0x30(%rbx)
movl %ecx, 0xc0(%rbx)
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
movups %xmm0, 0xf0(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x80(%rbx)
movups %xmm0, 0x90(%rbx)
movups %xmm0, 0xa0(%rbx)
movb $0x0, 0xb0(%rbx)
movups %xmm0, 0x118(%rbx)
movq %rax, 0x100(%rbx)
movups %xmm0, 0x108(%rbx)
leaq 0x20(%r14), %rsi
callq 0x1ccd8
movl %eax, 0x128(%rbx)
testl %eax, %eax
jne 0x21606
leaq 0x100(%rbx), %rdi
addq $0x100, %r14            # imm = 0x100
movq %r14, %rsi
callq 0x1cebb
movl %eax, 0x128(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodeZlib::decompress(std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>> const&, LodeZlib_DecompressSettings const&)
unsigned decompress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in, const LodeZlib_DecompressSettings& settings)
  {
    unsigned char* buffer = 0;
    size_t buffersize = 0;
    unsigned error = LodeZlib_decompress(&buffer, &buffersize, in.empty() ? 0 : &in[0], in.size(), &settings);
    if(buffer)
    {
      out.insert(out.end(), &buffer[0], &buffer[buffersize]);
      free(buffer);
    }
    return error;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r8
movq %rdi, %rbx
xorl %edi, %edi
leaq -0x28(%rbp), %r15
movq %rdi, (%r15)
leaq -0x20(%rbp), %rax
movq %rdi, (%rax)
movq (%rsi), %rdx
movq 0x8(%rsi), %rcx
subq %rdx, %rcx
cmoveq %rdi, %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x1bd0b
movl %eax, %r14d
movq (%r15), %r15
testq %r15, %r15
je 0x21670
movq 0x8(%rbx), %rsi
movq -0x20(%rbp), %rcx
addq %r15, %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x24384
movq %r15, %rdi
callq 0x4380
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodeZlib::compress(std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>> const&, LodeZlib_DeflateSettings const&)
unsigned compress(std::vector<unsigned char>& out, const std::vector<unsigned char>& in, const LodeZlib_DeflateSettings& settings)
  {
    unsigned char* buffer = 0;
    size_t buffersize = 0;
    unsigned error = LodeZlib_compress(&buffer, &buffersize, in.empty() ? 0 : &in[0], in.size(), &settings);
    if(buffer)
    {
      out.insert(out.end(), &buffer[0], &buffer[buffersize]);
      free(buffer);
    }
    return error;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r8
movq %rdi, %rbx
xorl %edi, %edi
leaq -0x28(%rbp), %r15
movq %rdi, (%r15)
leaq -0x20(%rbp), %rax
movq %rdi, (%rax)
movq (%rsi), %rdx
movq 0x8(%rsi), %rcx
subq %rdx, %rcx
cmoveq %rdi, %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x1be80
movl %eax, %r14d
movq (%r15), %r15
testq %r15, %r15
je 0x216e3
movq 0x8(%rbx), %rsi
movq -0x20(%rbp), %rcx
addq %r15, %rcx
movq %rbx, %rdi
movq %r15, %rdx
callq 0x24384
movq %r15, %rdi
callq 0x4380
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG::Decoder::decode(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned long)
void Decoder::decode(std::vector<unsigned char>& out, const unsigned char* in, size_t insize)
  {
    unsigned char* buffer;
    size_t buffersize;
    LodePNG_decode(this, &buffer, &buffersize, in, insize);
    if(buffer)
    {
      out.insert(out.end(), &buffer[0], &buffer[buffersize]);
      free(buffer);
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r8
movq %rdx, %rcx
movq %rsi, %rbx
leaq -0x20(%rbp), %r14
leaq -0x18(%rbp), %rdx
movq %r14, %rsi
callq 0x1da1f
movq (%r14), %r14
testq %r14, %r14
je 0x217f2
movq 0x8(%rbx), %rsi
movq -0x18(%rbp), %rcx
addq %r14, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x24384
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4380
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG::Encoder::encode(std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned char const*, unsigned int, unsigned int)
void Encoder::encode(std::vector<unsigned char>& out, const unsigned char* image, unsigned w, unsigned h)
  {
    unsigned char* buffer;
    size_t buffersize;
    LodePNG_encode(this, &buffer, &buffersize, image, w, h);
    if(buffer)
    {
      out.insert(out.end(), &buffer[0], &buffer[buffersize]);
      free(buffer);
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %r8d, %r9d
movl %ecx, %r8d
movq %rdx, %rcx
movq %rsi, %rbx
leaq -0x20(%rbp), %r14
leaq -0x18(%rbp), %rdx
movq %r14, %rsi
callq 0x1f033
movq (%r14), %r14
testq %r14, %r14
je 0x219b7
movq 0x8(%rbx), %rsi
movq -0x18(%rbp), %rcx
addq %r14, %rcx
movq %rbx, %rdi
movq %r14, %rdx
callq 0x24384
movq %r14, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x4380
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG::loadFile(std::vector<unsigned char, std::allocator<unsigned char>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void loadFile(std::vector<unsigned char>& buffer, const std::string& filename) //designed for loading files from hard disk in an std::vector
  {
    std::ifstream file(filename.c_str(), std::ios::in|std::ios::binary|std::ios::ate);
  
    /*get filesize*/
    std::streamsize size = 0;
    if(file.seekg(0, std::ios::end).good()) size = file.tellg();
    if(file.seekg(0, std::ios::beg).good()) size -= file.tellg();
  
    /*read contents of the file into the vector*/
    buffer.resize(size_t(size));
    if(size > 0) file.read((char*)(&buffer[0]), size);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
movq (%rsi), %rsi
leaq -0x218(%rbp), %r14
movq %r14, %rdi
movl $0xe, %edx
callq 0x4580
movq %r14, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x4420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
cmpl $0x0, 0x20(%rax,%rcx)
je 0x21bd8
xorl %r14d, %r14d
jmp 0x21be7
leaq -0x218(%rbp), %rdi
callq 0x4530
movq %rax, %r14
leaq -0x218(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
cmpl $0x0, 0x20(%rax,%rcx)
jne 0x21c14
leaq -0x218(%rbp), %rdi
callq 0x4530
subq %rax, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19db8
testq %r14, %r14
jle 0x21c36
movq (%rbx), %rsi
leaq -0x218(%rbp), %rdi
movq %r14, %rdx
callq 0x43c0
leaq -0x218(%rbp), %rdi
callq 0x40a0
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x21c52
jmp 0x21c52
movq %rax, %rbx
leaq -0x218(%rbp), %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x4550