LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/Image.cpp
// Function: RayTracer::Image::operator[](unsigned int)
ImageRow Image::operator[](unsigned int index) {
    // Check if the index is within bounds
    if (index >= this->height) {
        throw out_of_range("Cannot get row " + to_string(index) + " from Image with height " + to_string(index));
    }

    // Get the correct pointer
    double* row = this->data + 3 * (index * this->width);
    return ImageRow(row, this->width);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %esi, %r14d
cmpl %esi, 0xc(%rdi)
jbe 0x6442f
movl 0x8(%rdi), %edx
imull %edx, %r14d
leal (%r14,%r14,2), %eax
shlq $0x3, %rax
addq (%rdi), %rax
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x3a210
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
movl %r14d, %esi
callq 0x6481e
leaq 0x24e7b(%rip), %rsi     # 0x892cb
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x5d118
leaq 0x24e75(%rip), %rsi     # 0x892db
leaq 0x68(%rsp), %rdi
callq 0x3a800
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x64491
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x6449e
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
movl %r14d, %esi
callq 0x6481e
leaq 0x88(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x6489e
movb $0x1, %bpl
leaq 0x88(%rsp), %rsi
movq %rbx, %rdi
callq 0x3a670
xorl %ebp, %ebp
movq 0x40ab2(%rip), %rsi     # 0xa4fa8
movq 0x40a93(%rip), %rdx     # 0xa4f90
movq %rbx, %rdi
callq 0x3a750
movq %rax, %r14
leaq 0x98(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64531
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64531
movq %rax, %r14
movb $0x1, %bpl
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64554
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64554
movq %rax, %r14
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x64573
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64573
movq %rax, %r14
movb $0x1, %bpl
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x64596
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x64596
movq %rax, %r14
movb $0x1, %bpl
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x645b9
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x645b9
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x645c6
movq %rbx, %rdi
callq 0x3a330
movq %r14, %rdi
callq 0x3a780
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_save_file(unsigned char const*, unsigned long, char const*)
unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename) {
  FILE* file;
  file = fopen(filename, "wb" );
  if(!file) return 79;
  fwrite(buffer, 1, buffersize, file);
  fclose(file);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x252d0(%rip), %rsi     # 0x89ea1
movq %rdx, %rdi
callq 0x3a520
testq %rax, %rax
je 0x64c00
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x3a830
movq %r15, %rdi
callq 0x3a450
xorl %eax, %eax
jmp 0x64c05
movl $0x4f, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: ensureBits17(LodePNGBitReader*, unsigned long)
static unsigned ensureBits17(LodePNGBitReader* reader, size_t nbits) {
  size_t start = reader->bp >> 3u;
  size_t size = reader->size;
  if(start + 2u < size) {
    reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u) |
                     ((unsigned)reader->data[start + 2] << 16u);
    reader->buffer >>= (reader->bp & 7u);
    return 1;
  } else {
    reader->buffer = 0;
    if(start + 0u < size) reader->buffer |= reader->data[start + 0];
    if(start + 1u < size) reader->buffer |= ((unsigned)reader->data[start + 1] << 8u);
    reader->buffer >>= (reader->bp & 7u);
    return reader->bp + nbits <= reader->bitsize;
  }
}

// Assembly:
movq 0x8(%rdi), %rdx
movq 0x18(%rdi), %rax
movq %rax, %rcx
shrq $0x3, %rcx
leaq 0x2(%rcx), %r8
cmpq %rdx, %r8
jae 0x64e5a
movq (%rdi), %rdx
movzwl (%rdx,%rcx), %esi
movzbl 0x2(%rdx,%rcx), %edx
shll $0x10, %edx
orl %esi, %edx
andb $0x7, %al
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x20(%rdi)
movl $0x1, %eax
retq
movl $0x0, 0x20(%rdi)
cmpq %rdx, %rcx
jae 0x64e72
movq (%rdi), %r8
movzbl (%r8,%rcx), %r8d
movl %r8d, 0x20(%rdi)
incq %rcx
cmpq %rdx, %rcx
jae 0x64e87
movq (%rdi), %rdx
movzbl (%rdx,%rcx), %ecx
shll $0x8, %ecx
orl %ecx, 0x20(%rdi)
movl %eax, %ecx
andb $0x7, %cl
shrl %cl, 0x20(%rdi)
addq %rax, %rsi
xorl %eax, %eax
cmpq 0x10(%rdi), %rsi
setbe %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: ensureBits9(LodePNGBitReader*, unsigned long)
static unsigned ensureBits9(LodePNGBitReader* reader, size_t nbits) {
  size_t start = reader->bp >> 3u;
  size_t size = reader->size;
  if(start + 1u < size) {
    reader->buffer = (unsigned)reader->data[start + 0] | ((unsigned)reader->data[start + 1] << 8u);
    reader->buffer >>= (reader->bp & 7u);
    return 1;
  } else {
    reader->buffer = 0;
    if(start + 0u < size) reader->buffer |= reader->data[start + 0];
    reader->buffer >>= (reader->bp & 7u);
    return reader->bp + nbits <= reader->bitsize;
  }
}

// Assembly:
movq 0x8(%rdi), %rdx
movq 0x18(%rdi), %rax
movq %rax, %rcx
shrq $0x3, %rcx
leaq 0x1(%rcx), %r8
cmpq %rdx, %r8
jae 0x64eca
movq (%rdi), %rdx
movzwl (%rdx,%rcx), %edx
andb $0x7, %al
movl %eax, %ecx
shrl %cl, %edx
movl %edx, 0x20(%rdi)
movl $0x1, %eax
retq
movl $0x0, 0x20(%rdi)
cmpq %rdx, %rcx
jae 0x64ee0
movq (%rdi), %rdx
movzbl (%rdx,%rcx), %ecx
movl %ecx, 0x20(%rdi)
movl %eax, %ecx
andb $0x7, %cl
shrl %cl, 0x20(%rdi)
addq %rax, %rsi
xorl %eax, %eax
cmpq 0x10(%rdi), %rsi
setbe %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: adler32(unsigned char const*, unsigned int)
static unsigned update_adler32(unsigned adler, const unsigned char* data, unsigned len) {
  unsigned s1 = adler & 0xffffu;
  unsigned s2 = (adler >> 16u) & 0xffffu;

  while(len != 0u) {
    unsigned i;
    /*at least 5552 sums can be done before the sums overflow, saving a lot of module divisions*/
    unsigned amount = len > 5552u ? 5552u : len;
    len -= amount;
    for(i = 0; i != amount; ++i) {
      s1 += (*data++);
      s2 += s1;
    }
    s1 %= 65521u;
    s2 %= 65521u;
  }

  return (s2 << 16u) | s1;
}

// Assembly:
testl %esi, %esi
je 0x67c25
pushq %rbp
pushq %r14
pushq %rbx
movl $0x1, %ecx
xorl %eax, %eax
movl $0x15b0, %edx           # imm = 0x15B0
movl $0x15b0, %r8d           # imm = 0x15B0
movl $0x80078071, %r9d       # imm = 0x80078071
cmpl %edx, %esi
movl $0x15b0, %r10d          # imm = 0x15B0
cmovbl %esi, %r10d
leal -0x1(%r10), %r11d
movl %esi, %ebx
cmpq %r8, %rbx
cmovaeq %r8, %rbx
xorl %r14d, %r14d
movzbl (%rdi,%r14), %ebp
addl %ebp, %ecx
addl %ecx, %eax
incq %r14
cmpl %r14d, %ebx
jne 0x67bd8
movl %ecx, %ebx
imulq %r9, %rbx
shrq $0x2f, %rbx
imull $0xfff1, %ebx, %ebx     # imm = 0xFFF1
subl %ebx, %ecx
movl %eax, %ebx
imulq %r9, %rbx
shrq $0x2f, %rbx
imull $0xfff1, %ebx, %ebx     # imm = 0xFFF1
subl %ebx, %eax
movl %r11d, %r11d
addq %r11, %rdi
incq %rdi
subl %r10d, %esi
jne 0x67bbc
shll $0x10, %eax
orl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl $0x1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_crc32(unsigned char const*, unsigned long)
unsigned lodepng_crc32(const unsigned char* data, size_t length) {
  unsigned r = 0xffffffffu;
  size_t i;
  for(i = 0; i < length; ++i) {
    r = lodepng_crc32_table[(r ^ data[i]) & 0xffu] ^ (r >> 8u);
  }
  return r ^ 0xffffffffu;
}

// Assembly:
testq %rsi, %rsi
je 0x67df1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
leaq 0x2180c(%rip), %rdx     # 0x895e0
movb (%rdi,%rcx), %r8b
xorb %al, %r8b
movzbl %r8b, %r8d
shrl $0x8, %eax
xorl (%rdx,%r8,4), %eax
incq %rcx
cmpq %rcx, %rsi
jne 0x67dd4
notl %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_chunk_next(unsigned char*, unsigned char*)
unsigned char* lodepng_chunk_next(unsigned char* chunk, unsigned char* end) {
  if(chunk >= end || end - chunk < 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;
    unsigned char* result;
    if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end;
    result = chunk + total_chunk_length;
    if(result < chunk) return end; /*pointer overflow*/
    return result;
  }
}

// Assembly:
movq %rsi, %rax
movq %rsi, %rcx
subq %rdi, %rcx
setbe %dl
cmpq $0xc, %rcx
setl %cl
orb %dl, %cl
jne 0x67fa4
movzbl (%rdi), %eax
cmpq $0x89, %rax
jne 0x67f80
cmpb $0x50, 0x1(%rdi)
jne 0x67f80
cmpb $0x4e, 0x2(%rdi)
jne 0x67f80
cmpb $0x47, 0x3(%rdi)
jne 0x67f80
cmpb $0xd, 0x4(%rdi)
jne 0x67f80
cmpb $0xa, 0x5(%rdi)
jne 0x67f80
cmpb $0x1a, 0x6(%rdi)
jne 0x67f80
cmpb $0xa, 0x7(%rdi)
jne 0x67f80
addq $0x8, %rdi
movq %rdi, %rax
retq
shll $0x18, %eax
movzbl 0x1(%rdi), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movzbl 0x2(%rdi), %eax
shll $0x8, %eax
orl %ecx, %eax
movzbl 0x3(%rdi), %ecx
orq %rax, %rcx
leaq (%rdi,%rcx), %rax
addq $0xc, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/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) {
  if(chunk >= end || end - chunk < 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;
    const unsigned char* result;
    if(lodepng_addofl(lodepng_chunk_length(chunk), 12, &total_chunk_length)) return end;
    result = chunk + total_chunk_length;
    if(result < chunk) return end; /*pointer overflow*/
    return result;
  }
}

// Assembly:
movq %rsi, %rax
movq %rsi, %rcx
subq %rdi, %rcx
setbe %dl
cmpq $0xc, %rcx
setl %cl
orb %dl, %cl
jne 0x6801d
movzbl (%rdi), %eax
cmpq $0x89, %rax
jne 0x67ff9
cmpb $0x50, 0x1(%rdi)
jne 0x67ff9
cmpb $0x4e, 0x2(%rdi)
jne 0x67ff9
cmpb $0x47, 0x3(%rdi)
jne 0x67ff9
cmpb $0xd, 0x4(%rdi)
jne 0x67ff9
cmpb $0xa, 0x5(%rdi)
jne 0x67ff9
cmpb $0x1a, 0x6(%rdi)
jne 0x67ff9
cmpb $0xa, 0x7(%rdi)
jne 0x67ff9
addq $0x8, %rdi
movq %rdi, %rax
retq
shll $0x18, %eax
movzbl 0x1(%rdi), %ecx
shll $0x10, %ecx
orl %eax, %ecx
movzbl 0x2(%rdi), %eax
shll $0x8, %eax
orl %ecx, %eax
movzbl 0x3(%rdi), %ecx
orq %rax, %rcx
leaq (%rdi,%rcx), %rax
addq $0xc, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_chunk_find(unsigned char*, unsigned char*, char const*)
unsigned char* lodepng_chunk_find(unsigned char* chunk, unsigned char* end, const char type[5]) {
  for(;;) {
    if(chunk >= end || end - chunk < 12) return 0; /* past file end: chunk + 12 > end */
    if(lodepng_chunk_type_equals(chunk, type)) return chunk;
    chunk = lodepng_chunk_next(chunk, end);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
subq %rdi, %rax
setbe %cl
cmpq $0xc, %rax
setl %al
orb %cl, %al
je 0x6803f
xorl %r14d, %r14d
jmp 0x6807b
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, %r12
xorl %r14d, %r14d
movq %r15, %rdi
movq %r12, %rsi
callq 0x67e10
testb %al, %al
jne 0x68078
movq %r15, %rdi
movq %rbx, %rsi
callq 0x67f2c
movq %rax, %r15
movq %rbx, %rax
subq %r15, %rax
jbe 0x6807b
cmpq $0xb, %rax
jg 0x6804b
jmp 0x6807b
movq %r15, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_chunk_find_const(unsigned char const*, unsigned char const*, char const*)
const unsigned char* lodepng_chunk_find_const(const unsigned char* chunk, const unsigned char* end, const char type[5]) {
  for(;;) {
    if(chunk >= end || end - chunk < 12) return 0; /* past file end: chunk + 12 > end */
    if(lodepng_chunk_type_equals(chunk, type)) return chunk;
    chunk = lodepng_chunk_next_const(chunk, end);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
subq %rdi, %rax
setbe %cl
cmpq $0xc, %rax
setl %al
orb %cl, %al
je 0x680ab
xorl %r14d, %r14d
jmp 0x680e7
movq %rsi, %rbx
movq %rdi, %r15
movq %rdx, %r12
xorl %r14d, %r14d
movq %r15, %rdi
movq %r12, %rsi
callq 0x67e10
testb %al, %al
jne 0x680e4
movq %r15, %rdi
movq %rbx, %rsi
callq 0x67fa5
movq %rax, %r15
movq %rbx, %rax
subq %r15, %rax
jbe 0x680e7
cmpq $0xb, %rax
jg 0x680b7
jmp 0x680e7
movq %r15, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_chunk_create(unsigned char**, unsigned long*, unsigned int, char const*, unsigned char const*)
unsigned lodepng_chunk_create(unsigned char** out, size_t* outlength, unsigned length,
                              const char* type, const unsigned char* data) {
  unsigned i;
  unsigned char *chunk, *new_buffer;
  size_t new_length = *outlength;
  if(lodepng_addofl(new_length, length, &new_length)) return 77;
  if(lodepng_addofl(new_length, 12, &new_length)) return 77;
  new_buffer = (unsigned char*)lodepng_realloc(*out, new_length);
  if(!new_buffer) return 83; /*alloc fail*/
  (*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] = (unsigned char)type[0];
  chunk[5] = (unsigned char)type[1];
  chunk[6] = (unsigned char)type[2];
  chunk[7] = (unsigned char)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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r13d
movq (%rsi), %rbp
movl $0x4d, %eax
addq %r13, %rbp
jb 0x6821b
subq $-0xc, %rbp
jae 0x6821b
movq %r8, %rbx
movq %rcx, %r14
movq %rsi, %r15
movq %rdi, %r12
movl %edx, 0x4(%rsp)
movq (%rdi), %rdi
movq %rbp, %rsi
callq 0x3a720
testq %rax, %rax
je 0x68216
movq %rax, (%r12)
movq %rbp, (%r15)
subq %r13, %rbp
leaq (%rax,%rbp), %rdi
addq $-0xc, %rdi
movl 0x4(%rsp), %edx
movl %edx, %ecx
shrl $0x18, %ecx
movb %cl, -0xc(%rax,%rbp)
movl %edx, %ecx
shrl $0x10, %ecx
movb %cl, -0xb(%rax,%rbp)
movb %dh, -0xa(%rax,%rbp)
movb %dl, -0x9(%rax,%rbp)
movl (%r14), %ecx
movl %ecx, -0x8(%rax,%rbp)
testl %edx, %edx
je 0x6820d
negq %r13
movl $0x8, %eax
movb -0x8(%rbx,%rax), %cl
movl %eax, %edx
movb %cl, (%rdi,%rdx)
leaq (%rax,%r13), %rcx
incq %rcx
incq %rax
cmpq $0x8, %rcx
jne 0x681f4
callq 0x67eeb
xorl %eax, %eax
jmp 0x6821b
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/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_color_mode_alloc_palette(LodePNGColorMode*)
void lodepng_color_mode_alloc_palette(LodePNGColorMode* info) {
  size_t i;
  /*room for 256 colors with 4 bytes each. Using realloc to avoid leak if it is being overwritten*/
  info->palette = (unsigned char*)lodepng_realloc(info->palette, 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
movq 0x8(%rdi), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x3a720
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x6828e
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 0x68262
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_color_mode_make(LodePNGColorType, unsigned int)
LodePNGColorMode lodepng_color_mode_make(LodePNGColorType colortype, unsigned bitdepth) {
  LodePNGColorMode result;
  lodepng_color_mode_init(&result);
  result.colortype = colortype;
  result.bitdepth = bitdepth;
  return result;
}

// Assembly:
movq %rdi, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_palette_add(LodePNGColorMode*, unsigned char, unsigned char, unsigned char, unsigned char)
unsigned lodepng_palette_add(LodePNGColorMode* info,
                             unsigned char r, unsigned char g, unsigned char b, unsigned char a) {
  if(!info->palette) /*allocate palette if empty*/ {
    lodepng_color_mode_alloc_palette(info);
    if(!info->palette) return 83; /*alloc fail*/
  }
  if(info->palettesize >= 256) {
    return 108; /*too many palette values*/
  }
  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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
cmpq $0x0, 0x8(%rdi)
jne 0x683aa
movq %r14, %rdi
callq 0x68243
cmpq $0x0, 0x8(%r14)
je 0x683f2
movq 0x10(%r14), %rcx
movl $0x6c, %eax
cmpq $0xff, %rcx
ja 0x683f7
movq 0x8(%r14), %rax
movb %r12b, (%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %r15b, 0x1(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bpl, 0x2(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bl, 0x3(%rax,%rcx,4)
incq 0x10(%r14)
xorl %eax, %eax
jmp 0x683f7
movl $0x53, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_add_text(LodePNGInfo*, char const*, char const*)
unsigned lodepng_add_text(LodePNGInfo* info, const char* key, const char* str) {
  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 || !new_strings) {
    lodepng_free(new_keys);
    lodepng_free(new_strings);
    return 83; /*alloc fail*/
  }

  ++info->text_num;
  info->text_keys = new_keys;
  info->text_strings = new_strings;

  info->text_keys[info->text_num - 1] = alloc_string(key);
  info->text_strings[info->text_num - 1] = alloc_string(str);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x48(%rdi), %rax
movq 0x50(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x3a720
movq %rax, %r12
movq 0x48(%rbx), %rax
movq 0x58(%rbx), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x3a720
movq %rax, %r13
testq %r12, %r12
setne %al
testq %r13, %r13
setne %cl
testb %cl, %al
je 0x685dd
incq 0x48(%rbx)
movq %r12, 0x50(%rbx)
movq %r13, 0x58(%rbx)
movq %r15, %rdi
callq 0x685fc
movq 0x48(%rbx), %rcx
movq 0x50(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
movq %r14, %rdi
callq 0x685fc
movq 0x48(%rbx), %rcx
movq 0x58(%rbx), %rdx
movq %rax, -0x8(%rdx,%rcx,8)
xorl %eax, %eax
jmp 0x685f2
movq %r12, %rdi
callq 0x3a530
movq %r13, %rdi
callq 0x3a530
movl $0x53, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: alloc_string(char const*)
static char* alloc_string(const char* in) {
  size_t insize = lodepng_strlen(in);
  char* out = (char*)lodepng_malloc(insize + 1);
  if(out) {
    size_t i;
    for(i = 0; i != insize; ++i) {
      out[i] = in[i];
    }
    out[i] = 0;
  }
  return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %ebx, %ebx
cmpb $0x0, (%r14,%rbx)
leaq 0x1(%rbx), %rbx
jne 0x68606
movq %rbx, %rdi
callq 0x3a5a0
movq %rax, %r15
testq %rax, %rax
je 0x68641
cmpq $0x1, %rbx
je 0x6863a
decq %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3a3a0
jmp 0x6863c
xorl %ebx, %ebx
movb $0x0, (%r15,%rbx)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_clear_icc(LodePNGInfo*)
void lodepng_clear_icc(LodePNGInfo* info) {
  string_cleanup(&info->iccp_name);
  lodepng_free(info->iccp_profile);
  info->iccp_profile = NULL;
  info->iccp_profile_size = 0;
  info->iccp_defined = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xf0(%rdi), %rdi
callq 0x3a530
xorl %r14d, %r14d
movq %r14, 0xf0(%rbx)
movq 0xf8(%rbx), %rdi
callq 0x3a530
movq %r14, 0xf8(%rbx)
movl %r14d, 0x100(%rbx)
movl %r14d, 0xe8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_assign_icc(LodePNGInfo*, char const*, unsigned char const*, unsigned int)
static unsigned lodepng_assign_icc(LodePNGInfo* info, const char* name, const unsigned char* profile, unsigned profile_size) {
  if(profile_size == 0) return 100; /*invalid ICC profile size*/

  info->iccp_name = alloc_string(name);
  info->iccp_profile = (unsigned char*)lodepng_malloc(profile_size);

  if(!info->iccp_name || !info->iccp_profile) return 83; /*alloc fail*/

  lodepng_memcpy(info->iccp_profile, profile, profile_size);
  info->iccp_profile_size = profile_size;

  return 0; /*ok*/
}

// Assembly:
testl %ecx, %ecx
je 0x68981
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, %ebx
movq %rdx, %r15
movq %rdi, %r14
movq %rsi, %rdi
callq 0x685fc
movq %rax, %r13
movq %rax, 0xf0(%r14)
movl %ebx, %r12d
movq %r12, %rdi
callq 0x3a5a0
movq %rax, 0xf8(%r14)
testq %r13, %r13
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
movl $0x53, %ecx
jne 0x68976
movq %rax, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x3a3a0
movl %ebx, 0x100(%r14)
xorl %ecx, %ecx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x68986
movl $0x64, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_info_init(LodePNGInfo*)
void lodepng_color_mode_init(LodePNGColorMode* info) {
  info->key_defined = 0;
  info->key_r = info->key_g = info->key_b = 0;
  info->colortype = LCT_RGBA;
  info->bitdepth = 8;
  info->palette = 0;
  info->palettesize = 0;
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x10(%rdi)
movups %xmm0, 0x18(%rdi)
xorl %eax, %eax
movl %eax, 0x8(%rdi)
movq $0x0, (%rdi)
movl %eax, 0xa4(%rdi)
movl %eax, 0xb4(%rdi)
movl %eax, 0xbc(%rdi)
movl %eax, 0xe0(%rdi)
movl %eax, 0xe8(%rdi)
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movl %eax, 0x88(%rdi)
movups %xmm0, 0xf0(%rdi)
movups %xmm0, 0x128(%rdi)
movups %xmm0, 0x118(%rdi)
movups %xmm0, 0x108(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/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);

  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 0x68a1c
callq 0x3a530
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %rbx, %rdi
callq 0x684f1
movq %rbx, %rdi
callq 0x6864c
movq 0xf0(%rbx), %rdi
callq 0x3a530
xorl %r14d, %r14d
movq %r14, 0xf0(%rbx)
movq 0xf8(%rbx), %rdi
callq 0x3a530
movq %r14, 0xf8(%rbx)
movl %r14d, 0x100(%rbx)
movl %r14d, 0xe8(%rbx)
movq 0x108(%rbx,%r14,8), %rdi
callq 0x3a530
incq %r14
cmpq $0x3, %r14
jne 0x68a6a
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: checkColorValidity(LodePNGColorType, unsigned int)
static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) {
  switch(colortype) {
    case LCT_GREY:       if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break;
    case LCT_RGB:        if(!(                                 bd == 8 || bd == 16)) return 37; break;
    case LCT_PALETTE:    if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8            )) return 37; break;
    case LCT_GREY_ALPHA: if(!(                                 bd == 8 || bd == 16)) return 37; break;
    case LCT_RGBA:       if(!(                                 bd == 8 || bd == 16)) return 37; break;
    default: return 31; /* invalid color type */
  }
  return 0; /*allowed color type / bits combination*/
}

// Assembly:
movl $0x1f, %eax
cmpl $0x6, %edi
ja 0x6ad2f
movl %edi, %ecx
leaq 0x1e818(%rip), %rdx     # 0x89500
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $-0x8, %esi
andl $-0x9, %esi
movl $0x25, %eax
cmovel %esi, %eax
retq
movl $0x25, %eax
cmpl $0x10, %esi
ja 0x6ad2f
movl $0x10116, %ecx          # imm = 0x10116
btl %esi, %ecx
jae 0x6ad2f
xorl %eax, %eax
retq
decl %esi
movl $0x25, %eax
cmpl $0x8, %esi
jae 0x6ad2f
movl %esi, %eax
leaq 0x203c4(%rip), %rcx     # 0x8b0f0
movl (%rcx,%rax,4), %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: readChunk_PLTE(LodePNGColorMode*, unsigned char const*, unsigned long)
static unsigned readChunk_PLTE(LodePNGColorMode* color, const unsigned char* data, size_t chunkLength) {
  unsigned pos = 0, i;
  color->palettesize = chunkLength / 3u;
  if(color->palettesize == 0 || color->palettesize > 256) return 38; /*error: palette too small or big*/
  lodepng_color_mode_alloc_palette(color);
  if(!color->palette && color->palettesize) {
    color->palettesize = 0;
    return 83; /*alloc fail*/
  }

  for(i = 0; i != color->palettesize; ++i) {
    color->palette[4 * i + 0] = data[pos++]; /*R*/
    color->palette[4 * i + 1] = data[pos++]; /*G*/
    color->palette[4 * i + 2] = data[pos++]; /*B*/
    color->palette[4 * i + 3] = 255; /*alpha*/
  }

  return 0; /* OK */
}

// Assembly:
movq %rdx, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
movq %rcx, %rax
mulq %rdx
shrq %rdx
movq %rdx, 0x10(%rdi)
addq $-0x303, %rcx           # imm = 0xFCFD
movl $0x26, %eax
cmpq $-0x300, %rcx           # imm = 0xFD00
jb 0x6b0c8
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x68243
cmpq $0x0, 0x8(%rbx)
je 0x6b0ad
xorl %eax, %eax
cmpq $0x0, 0x10(%rbx)
je 0x6b0c1
movl $0x3, %ecx
movl $0x1, %edx
movl $0x1, %esi
leal -0x1(%rdx), %edi
movb (%r14,%rdi), %dil
movq 0x8(%rbx), %r8
leal -0x3(%rcx), %r9d
movb %dil, (%r8,%r9)
leal 0x1(%rdx), %edi
movl %edx, %r8d
movb (%r14,%r8), %r8b
movq 0x8(%rbx), %r9
leal -0x2(%rcx), %r10d
movb %r8b, (%r9,%r10)
movb (%r14,%rdi), %dil
movq 0x8(%rbx), %r8
leal -0x1(%rcx), %r9d
movb %dil, (%r8,%r9)
movq 0x8(%rbx), %rdi
movl %ecx, %r8d
movb $-0x1, (%rdi,%r8)
movl %esi, %edi
incl %esi
addl $0x4, %ecx
addl $0x3, %edx
cmpq %rdi, 0x10(%rbx)
jne 0x6b056
jmp 0x6b0c1
cmpq $0x0, 0x10(%rbx)
je 0x6b03e
movq $0x0, 0x10(%rbx)
movl $0x53, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: readChunk_bKGD(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_bKGD(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
  if(info->color.colortype == LCT_PALETTE) {
    /*error: this chunk must be 1 byte for indexed color image*/
    if(chunkLength != 1) return 43;

    /*error: invalid palette index, or maybe this chunk appeared before PLTE*/
    if(data[0] >= info->color.palettesize) return 103;

    info->background_defined = 1;
    info->background_r = info->background_g = info->background_b = data[0];
  } else if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) {
    /*error: this chunk must be 2 bytes for grayscale image*/
    if(chunkLength != 2) return 44;

    /*the values are truncated to bitdepth in the PNG file*/
    info->background_defined = 1;
    info->background_r = info->background_g = info->background_b = 256u * data[0] + data[1];
  } else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) {
    /*error: this chunk must be 6 bytes for grayscale image*/
    if(chunkLength != 6) return 45;

    /*the values are truncated to bitdepth in the PNG file*/
    info->background_defined = 1;
    info->background_r = 256u * data[0] + data[1];
    info->background_g = 256u * data[2] + data[3];
    info->background_b = 256u * data[4] + data[5];
  }

  return 0; /* OK */
}

// Assembly:
movl 0x10(%rdi), %ecx
xorl %eax, %eax
cmpq $0x6, %rcx
ja 0x6b210
leaq 0x1e380(%rip), %r8      # 0x8951c
movslq (%r8,%rcx,4), %rcx
addq %r8, %rcx
jmpq *%rcx
movl $0x2c, %eax
cmpq $0x2, %rdx
jne 0x6b210
movl $0x1, 0x38(%rdi)
movzwl (%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x44(%rdi)
movl %eax, 0x40(%rdi)
movl $0x3c, %ecx
jmp 0x6b20b
movl $0x2d, %eax
cmpq $0x6, %rdx
jne 0x6b210
movl $0x1, 0x38(%rdi)
movzwl (%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x3c(%rdi)
movzwl 0x2(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl %eax, 0x40(%rdi)
movzwl 0x4(%rsi), %eax
rolw $0x8, %ax
movzwl %ax, %eax
movl $0x44, %ecx
movl %eax, (%rdi,%rcx)
xorl %eax, %eax
retq
movl $0x2b, %eax
cmpq $0x1, %rdx
jne 0x6b210
movzbl (%rsi), %ecx
movl $0x67, %eax
cmpq %rcx, 0x20(%rdi)
jbe 0x6b210
movl $0x1, 0x38(%rdi)
movzbl (%rsi), %eax
jmp 0x6b1c1
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: readChunk_cHRM(LodePNGInfo*, unsigned char const*, unsigned long)
static unsigned readChunk_cHRM(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
  if(chunkLength != 32) return 97; /*invalid cHRM chunk size*/

  info->chrm_defined = 1;
  info->chrm_white_x = 16777216u * data[ 0] + 65536u * data[ 1] + 256u * data[ 2] + data[ 3];
  info->chrm_white_y = 16777216u * data[ 4] + 65536u * data[ 5] + 256u * data[ 6] + data[ 7];
  info->chrm_red_x   = 16777216u * data[ 8] + 65536u * data[ 9] + 256u * data[10] + data[11];
  info->chrm_red_y   = 16777216u * data[12] + 65536u * data[13] + 256u * data[14] + data[15];
  info->chrm_green_x = 16777216u * data[16] + 65536u * data[17] + 256u * data[18] + data[19];
  info->chrm_green_y = 16777216u * data[20] + 65536u * data[21] + 256u * data[22] + data[23];
  info->chrm_blue_x  = 16777216u * data[24] + 65536u * data[25] + 256u * data[26] + data[27];
  info->chrm_blue_y  = 16777216u * data[28] + 65536u * data[29] + 256u * data[30] + data[31];

  return 0; /* OK */
}

// Assembly:
movl $0x61, %eax
cmpq $0x20, %rdx
jne 0x6b8a2
movl $0x1, 0xbc(%rdi)
movl (%rsi), %eax
bswapl %eax
movl %eax, 0xc0(%rdi)
movl 0x4(%rsi), %eax
bswapl %eax
movl %eax, 0xc4(%rdi)
movl 0x8(%rsi), %eax
bswapl %eax
movl %eax, 0xc8(%rdi)
movl 0xc(%rsi), %eax
bswapl %eax
movl %eax, 0xcc(%rdi)
movl 0x10(%rsi), %eax
bswapl %eax
movl %eax, 0xd0(%rdi)
movl 0x14(%rsi), %eax
bswapl %eax
movl %eax, 0xd4(%rdi)
movl 0x18(%rsi), %eax
bswapl %eax
movl %eax, 0xd8(%rdi)
movl 0x1c(%rsi), %eax
bswapl %eax
movl %eax, 0xdc(%rdi)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/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;
  error = lodepng_decode(out, w, h, &state, in, insize);
  lodepng_state_cleanup(&state);
  return error;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %r8, %rax
movq %rcx, %r8
movl 0x220(%rsp), %ecx
xorps %xmm0, %xmm0
movq %rsp, %rbx
movups %xmm0, 0x1c(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movaps 0x1ca7b(%rip), %xmm1    # 0x893b0
movups %xmm1, 0x2c(%rbx)
movaps 0x1ca80(%rip), %xmm1    # 0x893c0
movups %xmm1, 0x3c(%rbx)
movl $0x1, %r10d
movl %r10d, 0x4c(%rbx)
movaps %xmm0, 0x50(%rbx)
xorl %r11d, %r11d
movq %r11, 0x60(%rbx)
movl $0x5, 0x70(%rbx)
movabsq $0x100000001, %r14      # imm = 0x100000001
movq %r14, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movl %r10d, 0x88(%rbx)
movups %xmm0, 0xa8(%rbx)
movabsq $0x800000006, %r14      # imm = 0x800000006
movq %r14, 0x90(%rbx)
movups %xmm0, 0x98(%rbx)
movaps %xmm0, 0xe0(%rbx)
movq %r14, 0xc8(%rbx)
movaps %xmm0, 0xd0(%rbx)
movl %r11d, 0xc0(%rbx)
movq %r11, 0xb8(%rbx)
movl %r11d, 0x15c(%rbx)
movl %r11d, 0x16c(%rbx)
movl %r11d, 0x174(%rbx)
movl %r11d, 0x198(%rbx)
movl %r11d, 0x1a0(%rbx)
movl %r11d, 0x140(%rbx)
movaps %xmm0, 0x130(%rbx)
movaps %xmm0, 0x120(%rbx)
movaps %xmm0, 0x110(%rbx)
movaps %xmm0, 0x100(%rbx)
movaps %xmm0, 0xf0(%rbx)
movups %xmm0, 0x1a8(%rbx)
movaps %xmm0, 0x1e0(%rbx)
movaps %xmm0, 0x1d0(%rbx)
movaps %xmm0, 0x1c0(%rbx)
movl %r10d, 0x1f0(%rbx)
movl %r9d, 0x90(%rbx)
movl %ecx, 0x94(%rbx)
movq %rbx, %rcx
movq %rax, %r9
callq 0x6ba6d
movl %eax, %ebp
movq %rbx, %rdi
callq 0x6cb5b
movl %ebp, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/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;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
  settings->ignore_crc = 0;
  settings->ignore_critical = 0;
  settings->ignore_end = 0;
  lodepng_decompress_settings_init(&settings->zlibsettings);
}

// Assembly:
xorps %xmm0, %xmm0
movups %xmm0, 0x1c(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movaps 0x1c940(%rip), %xmm1    # 0x893b0
movups %xmm1, 0x2c(%rdi)
movaps 0x1c945(%rip), %xmm1    # 0x893c0
movups %xmm1, 0x3c(%rdi)
movl $0x1, %eax
movl %eax, 0x4c(%rdi)
movups %xmm0, 0x50(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x60(%rdi)
movl $0x5, 0x70(%rdi)
movabsq $0x100000001, %rdx      # imm = 0x100000001
movq %rdx, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movl %eax, 0x88(%rdi)
movups %xmm0, 0xa8(%rdi)
movabsq $0x800000006, %rdx      # imm = 0x800000006
movq %rdx, 0x90(%rdi)
movups %xmm0, 0x98(%rdi)
movups %xmm0, 0xe0(%rdi)
movq %rdx, 0xc8(%rdi)
movups %xmm0, 0xd0(%rdi)
movl %ecx, 0xc0(%rdi)
movq %rcx, 0xb8(%rdi)
movl %ecx, 0x15c(%rdi)
movl %ecx, 0x16c(%rdi)
movl %ecx, 0x174(%rdi)
movl %ecx, 0x198(%rdi)
movl %ecx, 0x1a0(%rdi)
movl %ecx, 0x140(%rdi)
movups %xmm0, 0x130(%rdi)
movups %xmm0, 0x120(%rdi)
movups %xmm0, 0x110(%rdi)
movups %xmm0, 0x100(%rdi)
movups %xmm0, 0xf0(%rdi)
movups %xmm0, 0x1a8(%rdi)
movups %xmm0, 0x1e0(%rdi)
movups %xmm0, 0x1d0(%rdi)
movups %xmm0, 0x1c0(%rdi)
movl %eax, 0x1f0(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_decode_file(unsigned char**, unsigned int*, unsigned int*, char const*, LodePNGColorType, unsigned int)
unsigned lodepng_decode_file(unsigned char** out, unsigned* w, unsigned* h, const char* filename,
                             LodePNGColorType colortype, unsigned bitdepth) {
  unsigned char* buffer = 0;
  size_t buffersize;
  unsigned error;
  /* safe output values in case error happens */
  *out = 0;
  *w = *h = 0;
  error = lodepng_load_file(&buffer, &buffersize, filename);
  if(!error) error = lodepng_decode_memory(out, w, h, buffer, buffersize, colortype, bitdepth);
  lodepng_free(buffer);
  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r9d, %ebp
movl %r8d, %ebx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
xorl %eax, %eax
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
movq %rax, (%r12)
movl %eax, (%rdx)
movl %eax, (%rsi)
leaq 0x10(%rsp), %rsi
movq %rcx, %rdx
callq 0x64a84
movl %eax, %r13d
testl %eax, %eax
jne 0x6cc25
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
movl %ebp, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %ebx, %r9d
callq 0x6c905
movl %eax, %r13d
movq 0x8(%rsp), %rdi
callq 0x3a530
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_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_encoder_settings_init(LodePNGEncoderSettings*)
void lodepng_compress_settings_init(LodePNGCompressSettings* settings) {
  /*compress with dynamic huffman tree (not in the mathematical sense, just not the predefined one)*/
  settings->btype = 2;
  settings->use_lz77 = 1;
  settings->windowsize = DEFAULT_WINDOWSIZE;
  settings->minmatch = 3;
  settings->nicematch = 128;
  settings->lazymatching = 1;

  settings->custom_zlib = 0;
  settings->custom_deflate = 0;
  settings->custom_context = 0;
}

// Assembly:
movaps 0x1c712(%rip), %xmm0    # 0x893a0
movups %xmm0, (%rdi)
movabsq $0x100000080, %rax      # imm = 0x100000080
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
movl $0x5, 0x38(%rdi)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movl $0x1, 0x50(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: lodepng_color_stats_add(LodePNGColorStats*, unsigned int, unsigned int, unsigned int, unsigned int)
static void lodepng_color_stats_add(LodePNGColorStats* stats,
                                    unsigned r, unsigned g, unsigned b, unsigned a) {
  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;
  lodepng_compute_color_stats(stats, image, 1, 1, &mode);
  lodepng_color_mode_cleanup(&mode);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %esi, %eax
xorps %xmm0, %xmm0
leaq 0x18(%rsp), %r14
movups %xmm0, 0x10(%r14)
movabsq $0x1000000006, %rsi     # imm = 0x1000000006
movq %rsi, -0x8(%r14)
movups %xmm0, (%r14)
movb %ah, 0x8(%rsp)
leaq 0x8(%rsp), %rsi
movb %al, 0x1(%rsi)
movb %dh, 0xa(%rsp)
movb %dl, 0x3(%rsi)
movb %ch, 0xc(%rsp)
movb %cl, 0x5(%rsi)
movw $0xffff, 0x6(%rsi)      # imm = 0xFFFF
leaq 0x10(%rsp), %rbx
movl $0x1, %edx
movl $0x1, %ecx
movq %rbx, %r8
callq 0x6a038
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x6d827
callq 0x3a530
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
addq $0x38, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/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 data[13];

  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*/

  return addChunk(out, "IHDR", data, sizeof(data));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl %r8d, %r10d
movl %esi, %eax
movq %rdi, %rbx
shrl $0x18, %esi
leaq 0x3(%rsp), %r8
movb %sil, (%r8)
movl %eax, %esi
shrl $0x10, %esi
movb %sil, 0x1(%r8)
movb %ah, 0x5(%rsp)
movb %al, 0x3(%r8)
movl %edx, %eax
shrl $0x18, %eax
movb %al, 0x4(%r8)
movl %edx, %eax
shrl $0x10, %eax
movb %al, 0x5(%r8)
movb %dh, 0x9(%rsp)
movb %dl, 0x7(%r8)
movb %r10b, 0x8(%r8)
movb %cl, 0x9(%r8)
movw $0x0, 0xa(%r8)
movb %r9b, 0xc(%r8)
leaq 0x8(%rdi), %rsi
leaq 0x1bda2(%rip), %rcx     # 0x89ea4
movl $0xd, %edx
callq 0x68168
testl %eax, %eax
jne 0x6e118
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/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) {
    CERROR_TRY_RETURN(lodepng_chunk_append(&out->data, &out->size, inchunk));
    out->allocsize = out->size; /*fix the allocsize again*/
    inchunk = lodepng_chunk_next(inchunk, data + datasize);
  }
  return 0;
}

// Assembly:
xorl %eax, %eax
testq %rdx, %rdx
je 0x6e192
pushq %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
leaq (%rsi,%rdx), %rax
movq %rax, (%rsp)
movq %rsi, %r15
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x680f6
testl %eax, %eax
cmovnel %eax, %ebp
jne 0x6e182
movq 0x8(%r12), %rax
movq %rax, 0x10(%r12)
movq %r15, %rdi
movq (%rsp), %rsi
callq 0x67f2c
movq %rax, %r15
subq %rbx, %rax
cmpq %r14, %rax
jb 0x6e148
xorl %eax, %eax
jmp 0x6e184
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/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: addChunk_cHRM(ucvector*, LodePNGInfo const*)
static unsigned addChunk_cHRM(ucvector* out, const LodePNGInfo* info) {
  unsigned char data[32];
  lodepng_set32bitInt(data + 0, info->chrm_white_x);
  lodepng_set32bitInt(data + 4, info->chrm_white_y);
  lodepng_set32bitInt(data + 8, info->chrm_red_x);
  lodepng_set32bitInt(data + 12, info->chrm_red_y);
  lodepng_set32bitInt(data + 16, info->chrm_green_x);
  lodepng_set32bitInt(data + 20, info->chrm_green_y);
  lodepng_set32bitInt(data + 24, info->chrm_blue_x);
  lodepng_set32bitInt(data + 28, info->chrm_blue_y);
  return addChunk(out, "cHRM", data, sizeof(data));
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl 0xc0(%rsi), %eax
bswapl %eax
movq %rsp, %r8
movl %eax, (%r8)
movl 0xc4(%rsi), %eax
bswapl %eax
movl %eax, 0x4(%r8)
movl 0xc8(%rsi), %eax
bswapl %eax
movl %eax, 0x8(%r8)
movl 0xcc(%rsi), %eax
bswapl %eax
movl %eax, 0xc(%r8)
movl 0xd0(%rsi), %eax
bswapl %eax
movl %eax, 0x10(%r8)
movl 0xd4(%rsi), %eax
bswapl %eax
movl %eax, 0x14(%r8)
movl 0xd8(%rsi), %eax
bswapl %eax
movl %eax, 0x18(%r8)
movl 0xdc(%rsi), %eax
bswapl %eax
movl %eax, 0x1c(%r8)
leaq 0x8(%rdi), %rsi
leaq 0x1b989(%rip), %rcx     # 0x89ed6
movl $0x20, %edx
callq 0x68168
testl %eax, %eax
jne 0x6e563
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: addChunk_bKGD(ucvector*, LodePNGInfo const*)
static unsigned addChunk_bKGD(ucvector* out, const LodePNGInfo* info) {
  unsigned char data[6];
  size_t size = 0;
  if(info->color.colortype == LCT_GREY || info->color.colortype == LCT_GREY_ALPHA) {
    data[0] = (unsigned char)(info->background_r >> 8);
    data[1] = (unsigned char)(info->background_r & 255);
    size = 2;
  } else if(info->color.colortype == LCT_RGB || info->color.colortype == LCT_RGBA) {
    data[0] = (unsigned char)(info->background_r >> 8);
    data[1] = (unsigned char)(info->background_r & 255);
    data[2] = (unsigned char)(info->background_g >> 8);
    data[3] = (unsigned char)(info->background_g & 255);
    data[4] = (unsigned char)(info->background_b >> 8);
    data[5] = (unsigned char)(info->background_b & 255);
    size = 6;
  } else if(info->color.colortype == LCT_PALETTE) {
    data[0] =(unsigned char)(info->background_r & 255); /*palette index*/
    size = 1;
  }
  return addChunk(out, "bKGD", data, size);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x10(%rsi), %eax
xorl %edx, %edx
cmpq $0x6, %rax
ja 0x6eaf6
leaq 0x1aa99(%rip), %rcx     # 0x89538
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzwl 0x3c(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0xa(%rsp)
movl $0x2, %edx
jmp 0x6eaf6
movzwl 0x3c(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0xa(%rsp)
movzwl 0x40(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0xc(%rsp)
movzwl 0x44(%rsi), %eax
rolw $0x8, %ax
movw %ax, 0xe(%rsp)
movl $0x6, %edx
jmp 0x6eaf6
movb 0x3c(%rsi), %al
movb %al, 0xa(%rsp)
movl $0x1, %edx
leaq 0x8(%rbx), %rsi
leaq 0x1b3b2(%rip), %rcx     # 0x89eb3
leaq 0xa(%rsp), %r8
movq %rbx, %rdi
callq 0x68168
testl %eax, %eax
jne 0x6eb1c
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: addChunk_pHYs(ucvector*, LodePNGInfo const*)
static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info) {
  unsigned char data[9];
  lodepng_set32bitInt(data + 0, info->phys_x);
  lodepng_set32bitInt(data + 4, info->phys_y);  data[8] = info->phys_unit;
  return addChunk(out, "pHYs", data, sizeof(data));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0xa8(%rsi), %eax
bswapl %eax
leaq 0x7(%rsp), %r8
movl %eax, (%r8)
movl 0xac(%rsi), %eax
bswapl %eax
movl %eax, 0x4(%r8)
movb 0xb0(%rsi), %al
movb %al, 0x8(%r8)
leaq 0x8(%rdi), %rsi
leaq 0x1b371(%rip), %rcx     # 0x89ecc
movl $0x9, %edx
callq 0x68168
testl %eax, %eax
jne 0x6eb71
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/LodePNG.cpp
// Function: addChunk_tIME(ucvector*, LodePNGTime const*)
static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time) {
  unsigned char data[7];
  data[0] = (unsigned char)(time->year >> 8);
  data[1] = (unsigned char)(time->year & 255);
  data[2] = (unsigned char)time->month;
  data[3] = (unsigned char)time->day;
  data[4] = (unsigned char)time->hour;
  data[5] = (unsigned char)time->minute;
  data[6] = (unsigned char)time->second;
  return addChunk(out, "tIME", data, sizeof(data));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movdqu (%rsi), %xmm0
movl (%rsi), %eax
movb %ah, 0x9(%rsp)
pand 0x1a7b4(%rip), %xmm0    # 0x893d0
packuswb %xmm0, %xmm0
packuswb %xmm0, %xmm0
leaq 0x9(%rsp), %r8
movd %xmm0, 0x1(%r8)
movb 0x10(%rsi), %al
movb %al, 0x5(%r8)
movb 0x14(%rsi), %al
movb %al, 0x6(%r8)
leaq 0x8(%rdi), %rsi
leaq 0x1b27f(%rip), %rcx     # 0x89ec7
movl $0x7, %edx
callq 0x68168
testl %eax, %eax
jne 0x6ec5e
movq 0x8(%rbx), %rax
movq %rax, 0x10(%rbx)
addq $0x10, %rsp
popq %rbx
retq