LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./filebuf.h
// Function: FileBuf::reset()
void reset() {
		if(_inf != NULL) {
			_inf->clear();
			_inf->seekg(0, std::ios::beg);
		} else if(_ins != NULL) {
			_ins->clear();
			_ins->seekg(0, std::ios::beg);
		} else if (_zIn != NULL) {
			gzrewind(_zIn);
		} else {
			rewind(_in);
		}
		_cur = BUF_SZ;
		_buf_sz = BUF_SZ;
		_done = false;
	}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x26caf
movq (%rdi), %rax
addq -0x18(%rax), %rdi
xorl %esi, %esi
callq 0x45a0
movq 0x10(%rbx), %rdi
jmp 0x26cca
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x26ce6
movq (%rdi), %rax
addq -0x18(%rax), %rdi
xorl %esi, %esi
callq 0x45a0
movq 0x18(%rbx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4420
movl $0x40000, %eax          # imm = 0x40000
movq %rax, 0x20(%rbx)
movq %rax, 0x28(%rbx)
movb $0x0, 0x30(%rbx)
popq %rbx
retq
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x26cf6
callq 0x4340
jmp 0x26cd3
movq (%rbx), %rdi
callq 0x4070
jmp 0x26cd3
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/bt2_locks.cpp
// Function: mcs_lock::lock(mcs_lock::mcs_node&)
void mcs_lock::lock(mcs_node &node) {
	node.next = nullptr;

	mcs_node *pred = q.exchange(&node, std::memory_order_acq_rel);
	if (pred) {
		node.unlocked = false;
		pred->next.store(&node, std::memory_order_release);
		spin_while_eq(node.unlocked, false);
	}
	node.unlocked.load(std::memory_order_acquire);
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
xorl %eax, %eax
xchgq %rax, (%rsi)
movq %rsi, %rax
xchgq %rax, (%rdi)
testq %rax, %rax
je 0x2729f
leaq 0x8(%rbx), %rsi
xorl %ecx, %ecx
xchgb %cl, 0x8(%rbx)
movq %rbx, (%rax)
xorl %edx, %edx
callq 0x27318
movb 0x8(%rbx), %al
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/bt2_locks.cpp
// Function: mcs_lock::unlock(mcs_lock::mcs_node&)
void mcs_lock::unlock(mcs_node &node) {
	if (!node.next.load(std::memory_order_acquire)) {
		mcs_node *node_ptr = &node;
		if (q.compare_exchange_strong(node_ptr,
					      (mcs_node *)nullptr,
					      std::memory_order_release))
			return;
		spin_while_eq(node.next, (mcs_node *)nullptr);
	}
	node.next.load(std::memory_order_acquire)->unlocked.store(true, std::memory_order_release);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rax
testq %rax, %rax
jne 0x272d7
movq %rdi, %r14
movq %rsp, %rsi
movq %rbx, (%rsi)
pushq $0x3
popq %rcx
xorl %edx, %edx
callq 0x2734e
testb %al, %al
jne 0x272de
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x273a6
movq (%rbx), %rax
movb $0x1, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/fractalgen.cpp
// Function: eval(complex, unsigned int, complex)
unsigned eval(const complex comp, unsigned max,
              const complex arg)
{
    complex c = comp;
    for (unsigned i = 0; i < max; i++)
    {
        if (c.abs() > 2)
            return i;
        c = c * c + arg;
    }
    return max;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
vmovupd (%rdi), %xmm0
vmovsd 0x8(%rdi), %xmm1
leaq 0x10(%rsp), %r15
movq %rdx, %r14
movl %esi, %ebx
xorl %ebp, %ebp
movq %rsp, %r12
vmovapd %xmm0, (%r15)
cmpl %ebp, %ebx
je 0x24b9
vmulsd %xmm1, %xmm1, %xmm1
vfmadd213sd %xmm1, %xmm0, %xmm0 # xmm0 = (xmm0 * xmm0) + xmm1
vsqrtsd %xmm0, %xmm0, %xmm0
vucomisd 0xbb7a(%rip), %xmm0     # 0xe008
ja 0x24b7
movq %r12, %rdi
movq %r15, %rsi
movq %r15, %rdx
callq 0x3712
vmovapd (%rsp), %xmm0
incl %ebp
vaddpd (%r14), %xmm0, %xmm0
vmovapd %xmm0, 0x10(%rsp)
vshufpd $0x1, %xmm0, %xmm0, %xmm1 # xmm1 = xmm0[1,0]
jmp 0x2475
movl %ebp, %ebx
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/fractalgen.cpp
// Function: set_pixel(unsigned char, unsigned char, unsigned char, unsigned int, unsigned int, std::vector<unsigned char, std::allocator<unsigned char>>&, unsigned int)
void set_pixel(unsigned char r, unsigned char g, unsigned char b,
               unsigned x, unsigned y, vector<unsigned char> &vec,
               unsigned height)
{
    unsigned index = (x + y * height) * 4;
    vec.at(index + 0) = r;
    vec.at(index + 1) = g;
    vec.at(index + 2) = b;
    vec.at(index + 3) = 0xff;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %r14d
imull 0x30(%rsp), %r14d
movl %esi, %r15d
movl %edi, %r12d
movq %r9, %rbx
movl %edx, %ebp
movq %r9, %rdi
addl %ecx, %r14d
leal (,%r14,4), %esi
callq 0x372c
leal 0x1(,%r14,4), %esi
movq %rbx, %rdi
movb %r12b, (%rax)
callq 0x372c
leal 0x2(,%r14,4), %esi
movq %rbx, %rdi
movb %r15b, (%rax)
callq 0x372c
leal 0x3(,%r14,4), %esi
movq %rbx, %rdi
movb %bpl, (%rax)
callq 0x372c
movb $-0x1, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/fractalgen.cpp
// Function: htoi(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
unsigned char htoi(std::string str)
{
    if (str.size() != 2)
        return 0;
    unsigned char res = 0;
    unsigned char c = str.at(0);
    if (c >= '0' && c <= '9')
        res += (c - 0x30) * 16;
    else if (c >= 'a' && c <= 'f')
        res += (c - 'a' + 10) * 16;
    else if (c >= 'A' && c <= 'F')
        res += (c - 'A' + 10) * 16;
    else
        cout << "unknown hex char '" << c << "'.\n";

    c = str.at(1);
    if (c >= '0' && c <= '9')
        res += (c - 0x30) * 1;
    else if (c >= 'a' && c <= 'f')
        res += (c - 'a' + 10) * 1;
    else if (c >= 'A' && c <= 'F')
        res += (c - 'A' + 10) * 1;
    else
        cout << "unknown hex char '" << c << "'.\n";

    return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpq $0x2, 0x8(%rdi)
jne 0x255f
xorl %esi, %esi
movq %rdi, %r14
callq 0x22b0
movb (%rax), %bl
leal -0x30(%rbx), %eax
cmpb $0x9, %al
ja 0x2566
shlb $0x4, %bl
jmp 0x25ab
xorl %ebx, %ebx
jmp 0x261a
leal -0x61(%rbx), %eax
cmpb $0x5, %al
jbe 0x2574
leal -0x41(%rbx), %eax
cmpb $0x5, %al
ja 0x257c
shlb $0x4, %bl
addb $-0x70, %bl
jmp 0x25ab
movq 0x12a55(%rip), %rdi     # 0x14fd8
leaq 0xba99(%rip), %rsi      # 0xe023
callq 0x2110
movsbl %bl, %esi
movq %rax, %rdi
callq 0x2160
leaq 0xbb6d(%rip), %rsi      # 0xe10e
movq %rax, %rdi
callq 0x2110
xorl %ebx, %ebx
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x22b0
movb (%rax), %r14b
leal -0x30(%r14), %eax
cmpb $0x9, %al
ja 0x25c7
addb %bl, %al
movl %eax, %ebx
jmp 0x261a
leal -0x61(%r14), %eax
cmpb $0x5, %al
ja 0x25d8
addb %bl, %r14b
addb $-0x57, %r14b
jmp 0x25e7
leal -0x41(%r14), %eax
cmpb $0x5, %al
ja 0x25ec
addb %bl, %r14b
addb $-0x37, %r14b
movl %r14d, %ebx
jmp 0x261a
movq 0x129e5(%rip), %rdi     # 0x14fd8
leaq 0xba29(%rip), %rsi      # 0xe023
callq 0x2110
movsbl %r14b, %esi
movq %rax, %rdi
callq 0x2160
leaq 0xbafc(%rip), %rsi      # 0xe10e
movq %rax, %rdi
callq 0x2110
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/./complex.hpp
// Function: complex::operator*=(complex const&)
complex& operator*=(const complex& rhs)
    {
        double tmp_a = (a * rhs.a) - (b * rhs.b);
        double tmp_b = (b * rhs.a) + (a * rhs.b);
        a = tmp_a;
        b = tmp_b;
        return *this;
    }

// Assembly:
vmovsd 0x8(%rdi), %xmm1
vmovsd 0x8(%rsi), %xmm3
vmovsd (%rdi), %xmm0
vmovsd (%rsi), %xmm2
movq %rdi, %rax
vmulsd %xmm1, %xmm3, %xmm4
vfmsub231sd %xmm2, %xmm0, %xmm4 # xmm4 = (xmm0 * xmm2) - xmm4
vmulsd %xmm3, %xmm0, %xmm0
vfmadd231sd %xmm2, %xmm1, %xmm0 # xmm0 = (xmm1 * xmm2) + xmm0
vmovsd %xmm4, (%rdi)
vmovsd %xmm0, 0x8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_load_file(unsigned char**, unsigned long*, char const*)
unsigned lodepng_load_file(unsigned char** out, size_t* outsize, const char* filename)
{
  long size = lodepng_filesize(filename);
  if (size < 0) return 78;
  *outsize = (size_t)size;

  *out = (unsigned char*)lodepng_malloc((size_t)size);
  if(!(*out) && size > 0) return 83; /*the above malloc failed*/

  return lodepng_buffer_file(*out, (size_t)size, filename);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
movq %rdx, %rdi
movq %rdx, %rbx
movq %rsi, %r12
callq 0x3c16
testq %rax, %rax
js 0x3bf1
movq %rax, %rdi
movq %rax, %r14
movq %rax, (%r12)
callq 0x21c0
testq %rax, %rax
movq %rax, (%r15)
sete %cl
testq %r14, %r14
setne %dl
testb %cl, %dl
je 0x3c00
pushq $0x53
jmp 0x3bf3
pushq $0x4e
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3c7b
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_filesize(char const*)
static long lodepng_filesize(const char* filename)
{
  FILE* file;
  long size;
  file = fopen(filename, "rb");
  if(!file) return -1;

  if(fseek(file, 0, SEEK_END) != 0)
  {
    fclose(file);
    return -1;
  }

  size = ftell(file);
  /* It may give LONG_MAX as directory size, this is invalid for us. */
  if(size == LONG_MAX) size = -1;

  fclose(file);
  return size;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xc05b(%rip), %rsi      # 0xfc7c
callq 0x2170
testq %rax, %rax
je 0x3c45
movq %rax, %rbx
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x2150
testl %eax, %eax
je 0x3c4b
pushq $-0x1
popq %r14
jmp 0x3c68
pushq $-0x1
popq %r14
jmp 0x3c70
movq %rbx, %rdi
callq 0x2030
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rcx, %rax
pushq $-0x1
popq %r14
cmovneq %rax, %r14
movq %rbx, %rdi
callq 0x2120
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_buffer_file(unsigned char*, unsigned long, char const*)
static unsigned lodepng_buffer_file(unsigned char* out, size_t size, const char* filename)
{
  FILE* file;
  size_t readsize;
  file = fopen(filename, "rb");
  if(!file) return 78;

  readsize = fread(out, 1, size, file);
  fclose(file);

  if (readsize != size) return 78;
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0xbff2(%rip), %rsi      # 0xfc7c
movq %rdi, %r15
movq %rdx, %rdi
callq 0x2170
testq %rax, %rax
je 0x3cc6
movq %rax, %r14
pushq $0x1
popq %rsi
movq %r15, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x21f0
movq %r14, %rdi
movq %rax, %r15
callq 0x2120
xorl %ecx, %ecx
cmpq %rbx, %r15
pushq $0x4e
popq %rax
cmovel %ecx, %eax
jmp 0x3cc9
pushq $0x4e
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/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((char*)buffer , 1 , buffersize, file);
  fclose(file);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
leaq 0xb0b3(%rip), %rsi      # 0xed91
movq %rdi, %r14
movq %rdx, %rdi
callq 0x2170
testq %rax, %rax
je 0x3d0e
movq %rax, %r15
pushq $0x1
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
callq 0x22c0
movq %r15, %rdi
callq 0x2120
xorl %eax, %eax
jmp 0x3d11
pushq $0x4f
popq %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: bpmnode_create(BPMLists*, int, unsigned int, BPMNode*)
static BPMNode* bpmnode_create(BPMLists* lists, int weight, unsigned index, BPMNode* tail)
{
  unsigned i;
  BPMNode* result;

  /*memory full, so garbage collect*/
  if(lists->nextfree >= lists->numfree)
  {
    /*mark only those that are in use*/
    for(i = 0; i != lists->memsize; ++i) lists->memory[i].in_use = 0;
    for(i = 0; i != lists->listsize; ++i)
    {
      BPMNode* node;
      for(node = lists->chains0[i]; node != 0; node = node->tail) node->in_use = 1;
      for(node = lists->chains1[i]; node != 0; node = node->tail) node->in_use = 1;
    }
    /*collect those that are free*/
    lists->numfree = 0;
    for(i = 0; i != lists->memsize; ++i)
    {
      if(!lists->memory[i].in_use) lists->freelist[lists->numfree++] = &lists->memory[i];
    }
    lists->nextfree = 0;
  }

  result = lists->freelist[lists->nextfree++];
  result->weight = weight;
  result->index = index;
  result->tail = tail;
  return result;
}

// Assembly:
pushq %r14
pushq %rbx
movl 0x14(%rdi), %r8d
cmpl 0x10(%rdi), %r8d
jae 0x40ce
movq 0x18(%rdi), %rax
leal 0x1(%r8), %r9d
movl %r9d, 0x14(%rdi)
movl %r8d, %edi
movq (%rax,%rdi,8), %rax
movl %esi, (%rax)
movl %edx, 0x4(%rax)
movq %rcx, 0x8(%rax)
popq %rbx
popq %r14
retq
movl (%rdi), %eax
xorl %r8d, %r8d
imulq $0x18, %rax, %rax
cmpq %r8, %rax
je 0x40ec
movq 0x8(%rdi), %r9
andl $0x0, 0x10(%r9,%r8)
addq $0x18, %r8
jmp 0x40d7
movl 0x20(%rdi), %r8d
xorl %r9d, %r9d
cmpq %r8, %r9
je 0x413c
movq 0x28(%rdi), %r11
leaq (,%r9,8), %r10
addq %r10, %r11
movq (%r11), %r11
testq %r11, %r11
je 0x411d
movl $0x1, 0x10(%r11)
addq $0x8, %r11
jmp 0x4107
addq 0x30(%rdi), %r10
movq (%r10), %r10
testq %r10, %r10
je 0x4137
movl $0x1, 0x10(%r10)
addq $0x8, %r10
jmp 0x4121
incq %r9
jmp 0x40f3
andl $0x0, 0x10(%rdi)
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
cmpq %r9, %rax
je 0x40ae
movq 0x8(%rdi), %r11
cmpl $0x0, 0x10(%r11,%r9)
jne 0x4173
movq 0x18(%rdi), %rbx
movl %r10d, %r14d
incl %r10d
addq %r9, %r11
movl %r10d, 0x10(%rdi)
movq %r11, (%rbx,%r14,8)
addq $0x18, %r9
jmp 0x4149
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: boundaryPM(BPMLists*, BPMNode*, unsigned long, int, int)
static void boundaryPM(BPMLists* lists, BPMNode* leaves, size_t numpresent, int c, int num)
{
  unsigned lastindex = lists->chains1[c]->index;

  if(c == 0)
  {
    if(lastindex >= numpresent) return;
    lists->chains0[c] = lists->chains1[c];
    lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, 0);
  }
  else
  {
    /*sum of the weights of the head nodes of the previous lookahead chains.*/
    int sum = lists->chains0[c - 1]->weight + lists->chains1[c - 1]->weight;
    lists->chains0[c] = lists->chains1[c];
    if(lastindex < numpresent && sum > leaves[lastindex].weight)
    {
      lists->chains1[c] = bpmnode_create(lists, leaves[lastindex].weight, lastindex + 1, lists->chains1[c]->tail);
      return;
    }
    lists->chains1[c] = bpmnode_create(lists, sum, lastindex, lists->chains1[c - 1]);
    /*in the end we are only interested in the chain of the last list, so no
    need to recurse if we're at the last one (this gives measurable speedup)*/
    if(num + 1 < (int)(2 * numpresent - 2))
    {
      boundaryPM(lists, leaves, numpresent, c - 1, num);
      boundaryPM(lists, leaves, numpresent, c - 1, num);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movslq %ecx, %r15
movq %rdx, %r12
leal -0x2(%rdx,%rdx), %edx
leal 0x1(%r8), %eax
movq %rsi, %r14
movq %rdi, %rbx
movq %r8, 0x8(%rsp)
xorl %ebp, %ebp
leaq (,%r15,8), %r13
movq %r15, %rcx
negq %rcx
decl %r15d
movl %eax, 0x4(%rsp)
movl %edx, (%rsp)
movq %rcx, 0x10(%rsp)
movq 0x30(%rbx), %rcx
addq %r13, %rcx
movq (%rcx,%rbp,8), %rax
movl 0x4(%rax), %edx
cmpq %rbp, 0x10(%rsp)
je 0x4246
movq 0x28(%rbx), %rdi
movq -0x8(%rcx,%rbp,8), %rcx
addq %r13, %rdi
movl (%rcx), %esi
movq -0x8(%rdi,%rbp,8), %r8
addl (%r8), %esi
movq %rax, (%rdi,%rbp,8)
cmpq %r12, %rdx
jae 0x41ff
imulq $0x18, %rdx, %rax
movl (%r14,%rax), %eax
cmpl %eax, %esi
jg 0x426f
movq 0x30(%rbx), %rax
movq %rbx, %rdi
addq %r13, %rax
movq -0x8(%rax,%rbp,8), %rcx
callq 0x40a1
movq 0x30(%rbx), %rcx
addq %r13, %rcx
movq %rax, (%rcx,%rbp,8)
movl (%rsp), %ecx
cmpl %ecx, 0x4(%rsp)
jge 0x4293
leal (%r15,%rbp), %ecx
movq 0x8(%rsp), %r8
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x4179
decq %rbp
jmp 0x41bf
cmpq %r12, %rdx
jae 0x4293
movq 0x28(%rbx), %rcx
movq %rbx, %rdi
movq %rax, (%rcx)
imulq $0x18, %rdx, %rax
incl %edx
xorl %ecx, %ecx
movl (%r14,%rax), %esi
callq 0x40a1
movq 0x30(%rbx), %rcx
movq %rax, (%rcx)
jmp 0x4293
movq 0x30(%rbx), %rcx
incl %edx
movq %rbx, %rdi
movl %eax, %esi
addq %r13, %rcx
movq (%rcx,%rbp,8), %rcx
movq 0x8(%rcx), %rcx
callq 0x40a1
addq 0x30(%rbx), %r13
movq %rax, (%r13,%rbp,8)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_zlib_decompress(unsigned char**, unsigned long*, unsigned char const*, unsigned long, LodePNGDecompressSettings const*)
unsigned lodepng_zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in,
                                 size_t insize, const LodePNGDecompressSettings* settings)
{
  unsigned error = 0;
  unsigned CM, CINFO, FDICT;

  if(insize < 2) return 53; /*error, size of zlib data too small*/
  /*read information from zlib header*/
  if((in[0] * 256 + in[1]) % 31 != 0)
  {
    /*error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way*/
    return 24;
  }

  CM = in[0] & 15;
  CINFO = (in[0] >> 4) & 15;
  /*FCHECK = in[1] & 31;*/ /*FCHECK is already tested above*/
  FDICT = (in[1] >> 5) & 1;
  /*FLEVEL = (in[1] >> 6) & 3;*/ /*FLEVEL is not used here*/

  if(CM != 8 || CINFO > 7)
  {
    /*error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec*/
    return 25;
  }
  if(FDICT != 0)
  {
    /*error: the specification of PNG says about the zlib stream:
      "The additional flags shall not specify a preset dictionary."*/
    return 26;
  }

  error = inflate(out, outsize, in + 2, insize - 2, settings);
  if(error) return error;

  if(!settings->ignore_adler32)
  {
    unsigned ADLER32 = lodepng_read32bitInt(&in[insize - 4]);
    unsigned checksum = adler32(*out, (unsigned)(*outsize));
    if(checksum != ADLER32) return 58; /*error, adler checksum not correct, data must be corrupted*/
  }

  return 0; /*no error*/
}

// Assembly:
cmpq $0x2, %rcx
jae 0x593d
pushq $0x35
popq %rax
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movzbl (%rdx), %esi
movq %rcx, %r15
movzbl 0x1(%rdx), %ecx
movq %rdi, %r14
movw $0x1f, %di
movq %rdx, %r12
xorl %edx, %edx
movl %esi, %eax
shll $0x8, %eax
orl %ecx, %eax
divw %di
testw %dx, %dx
je 0x5974
pushq $0x18
jmp 0x59b6
movl %esi, %eax
andl $0xf, %eax
cmpl $0x8, %eax
setne %al
testb %sil, %sil
sets %dl
orb %al, %dl
je 0x598d
pushq $0x19
jmp 0x59b6
testb $0x20, %cl
jne 0x59b4
movq 0x10(%r8), %rax
leaq 0x2(%r12), %rdx
leaq -0x2(%r15), %rcx
movq %r8, %r13
movq %r14, %rdi
movq %rbx, %rsi
testq %rax, %rax
je 0x59c6
movq %r13, %r8
callq *%rax
jmp 0x59cb
pushq $0x1a
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x42a2
testl %eax, %eax
jne 0x59b7
cmpl $0x0, (%r13)
jne 0x59f0
leaq -0x4(%r12,%r15), %rdi
callq 0x3ba8
movq (%r14), %rdi
movl (%rbx), %esi
movl %eax, %ebp
callq 0x59f8
cmpl %ebp, %eax
jne 0x59f4
xorl %eax, %eax
jmp 0x59b7
pushq $0x3a
jmp 0x59b6
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_zlib_compress(unsigned char**, unsigned long*, unsigned char const*, unsigned long, LodePNGCompressSettings const*)
unsigned lodepng_zlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in,
                               size_t insize, const LodePNGCompressSettings* settings)
{
  /*initially, *out must be NULL and outsize 0, if you just give some random *out
  that's pointing to a non allocated buffer, this'll crash*/
  ucvector outv;
  size_t i;
  unsigned error;
  unsigned char* deflatedata = 0;
  size_t deflatesize = 0;

  /*zlib data: 1 byte CMF (CM+CINFO), 1 byte FLG, deflate data, 4 byte ADLER32 checksum of the Decompressed data*/
  unsigned CMF = 120; /*0b01111000: CM 8, CINFO 7. With CINFO 7, any window size up to 32768 can be used.*/
  unsigned FLEVEL = 0;
  unsigned FDICT = 0;
  unsigned CMFFLG = 256 * CMF + FDICT * 32 + FLEVEL * 64;
  unsigned FCHECK = 31 - CMFFLG % 31;
  CMFFLG += FCHECK;

  /*ucvector-controlled version of the output buffer, for dynamic array*/
  ucvector_init_buffer(&outv, *out, *outsize);

  ucvector_push_back(&outv, (unsigned char)(CMFFLG >> 8));
  ucvector_push_back(&outv, (unsigned char)(CMFFLG & 255));

  error = deflate(&deflatedata, &deflatesize, in, insize, settings);

  if(!error)
  {
    unsigned ADLER32 = adler32(in, (unsigned)insize);
    for(i = 0; i != deflatesize; ++i) ucvector_push_back(&outv, deflatedata[i]);
    lodepng_free(deflatedata);
    lodepng_add32bitInt(&outv, ADLER32);
  }

  *out = outv.data;
  *outsize = outv.size;

  return error;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
andq $0x0, 0x8(%rsp)
andq $0x0, (%rsp)
movq %rcx, %r15
leaq 0x10(%rsp), %rbp
movq %r8, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movq (%rsi), %rcx
movq %rax, (%rbp)
movq %rcx, 0x8(%rbp)
movq %rcx, 0x10(%rbp)
pushq $0x78
popq %rsi
movq %rbp, %rdi
callq 0x5b34
pushq $0x1
popq %rsi
movq %rbp, %rdi
callq 0x5b34
movq 0x20(%r13), %rax
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r13, %r8
testq %rax, %rax
je 0x5ac3
callq *%rax
jmp 0x5ac8
callq 0x4b68
movl %eax, %ebp
testl %eax, %eax
jne 0x5b13
movq %r12, %rdi
movl %r15d, %esi
callq 0x59f8
leaq 0x10(%rsp), %r12
movl %eax, %r15d
xorl %r13d, %r13d
movq 0x8(%rsp), %rdi
cmpq (%rsp), %r13
je 0x5b01
movzbl (%rdi,%r13), %esi
movq %r12, %rdi
callq 0x5b34
incq %r13
jmp 0x5ae4
callq 0x2180
leaq 0x10(%rsp), %rdi
movl %r15d, %esi
callq 0x5b60
movq 0x10(%rsp), %rax
movq %rax, (%r14)
movq 0x18(%rsp), %rax
movq %rax, (%rbx)
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/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]) & 0xff] ^ (r >> 8);
  }
  return r ^ 0xffffffffu;
}

// Assembly:
pushq $-0x1
popq %rax
leaq 0x88f0(%rip), %rdx      # 0xe4c0
xorl %ecx, %ecx
cmpq %rcx, %rsi
je 0x5bee
movb (%rdi,%rcx), %r8b
incq %rcx
xorb %al, %r8b
shrl $0x8, %eax
movzbl %r8b, %r8d
xorl (%rdx,%r8,4), %eax
jmp 0x5bd2
notl %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_chunk_check_crc(unsigned char const*)
unsigned lodepng_chunk_check_crc(const unsigned char* chunk)
{
  unsigned length = lodepng_chunk_length(chunk);
  unsigned CRC = lodepng_read32bitInt(&chunk[length + 8]);
  /*the CRC is taken of the data and the 4 chunk type letters, not the length*/
  unsigned checksum = lodepng_crc32(&chunk[4], length + 4);
  if(CRC != checksum) return 1;
  else return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x3ba8
movl %eax, %r14d
leal 0x8(%r14), %edi
addq %rbx, %rdi
callq 0x3ba8
addq $0x4, %rbx
addl $0x4, %r14d
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5bc6
xorl %ecx, %ecx
cmpl %eax, %ebp
setne %cl
movl %ecx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_chunk_append(unsigned char**, unsigned long*, unsigned char const*)
unsigned lodepng_chunk_append(unsigned char** out, size_t* outlength, const unsigned char* chunk)
{
  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*)lodepng_realloc(*out, new_length);
  if(!new_buffer) return 83; /*alloc fail*/
  (*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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r12
movq %rdx, %rdi
movq %rdx, %rbx
movq %rsi, %r15
callq 0x3ba8
movq (%r15), %rbp
movl %eax, %r14d
addl $0xc, %r14d
movq %rbp, %r13
addq %r14, %r13
jae 0x5d4b
pushq $0x4d
jmp 0x5d7d
movq (%r12), %rdi
movq %r13, %rsi
callq 0x2260
testq %rax, %rax
je 0x5d7b
addq %rax, %rbp
movq %rax, (%r12)
movq %r13, (%r15)
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x5d7e
movb (%rbx,%rcx), %dl
movb %dl, (%rbp,%rcx)
incq %rcx
jmp 0x5d6a
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/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) + length + 12;
  if(new_length < length + 12 || new_length < (*outlength)) return 77; /*integer overflow happened*/
  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
leaq 0xc(%r13), %rbp
addq (%rsi), %rbp
movl %edx, %r14d
movq %rsi, %r15
leal 0xc(%r14), %esi
setb %al
cmpq %rsi, %rbp
setb %sil
orb %al, %sil
je 0x5dbf
pushq $0x4d
jmp 0x5e39
movq %rdi, %r12
movq (%rdi), %rdi
movq %rbp, %rsi
movq %r8, %rbx
movq %rcx, (%rsp)
callq 0x2260
testq %rax, %rax
je 0x5e37
movq %rax, (%r12)
movq %rbp, (%r15)
subq %r13, %rbp
movq %r14, %rdx
movl %edx, %ecx
shrl $0x18, %ecx
negq %r13
movb %cl, -0xc(%rax,%rbp)
movl %edx, %ecx
shrl $0x10, %ecx
leaq -0xc(%rax,%rbp), %rdi
movb %cl, -0xb(%rax,%rbp)
movq (%rsp), %rcx
movb %dh, -0xa(%rax,%rbp)
movb %dl, -0x9(%rax,%rbp)
movl (%rcx), %ecx
movl %ecx, -0x8(%rax,%rbp)
pushq $0x8
popq %rax
leaq (%r13,%rax), %rcx
cmpq $0x8, %rcx
je 0x5e2e
movb -0x8(%rbx,%rax), %cl
movl %eax, %edx
incq %rax
movb %cl, (%rdi,%rdx)
jmp 0x5e15
callq 0x5cca
xorl %eax, %eax
jmp 0x5e3a
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_color_mode_copy(LodePNGColorMode*, LodePNGColorMode const*)
unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source)
{
  size_t i;
  lodepng_color_mode_cleanup(dest);
  *dest = *source;
  if(source->palette)
  {
    dest->palette = (unsigned char*)lodepng_malloc(1024);
    if(!dest->palette && source->palettesize) return 83; /*alloc fail*/
    for(i = 0; i != source->palettesize * 4; ++i) dest->palette[i] = source->palette[i];
  }
  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x5e68
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
vmovups (%rbx), %ymm0
vmovups %ymm0, (%r14)
cmpq $0x0, 0x8(%rbx)
je 0x5ee1
movl $0x400, %edi            # imm = 0x400
vzeroupper
callq 0x21c0
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x5ee5
xorl %eax, %eax
xorl %ecx, %ecx
movq 0x10(%rbx), %rdx
shlq $0x2, %rdx
cmpq %rdx, %rcx
je 0x5eef
movq 0x8(%rbx), %rdx
movq 0x8(%r14), %rsi
movb (%rdx,%rcx), %dl
movb %dl, (%rsi,%rcx)
incq %rcx
jmp 0x5ec1
xorl %eax, %eax
jmp 0x5eef
cmpq $0x0, 0x10(%rbx)
je 0x5ebd
pushq $0x53
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
vzeroupper
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/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)
{
  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->palette) /*allocate palette if empty*/
  {
    /*room for 256 colors with 4 bytes each*/
    data = (unsigned char*)lodepng_realloc(info->palette, 1024);
    if(!data) return 83; /*alloc fail*/
    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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rdi), %rax
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %r14
testq %rax, %rax
jne 0x5f2c
movl $0x400, %edi            # imm = 0x400
callq 0x21c0
testq %rax, %rax
je 0x5f69
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rcx
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
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x53
popq %rax
jmp 0x5f60
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_has_palette_alpha(LodePNGColorMode const*)
unsigned lodepng_has_palette_alpha(const LodePNGColorMode* info)
{
  size_t i;
  for(i = 0; i != info->palettesize; ++i)
  {
    if(info->palette[i * 4 + 3] < 255) return 1;
  }
  return 0;
}

// Assembly:
movq 0x10(%rdi), %rcx
xorl %eax, %eax
pushq $0x1
popq %rdx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x5fda
movq 0x8(%rdi), %r8
cmpb $-0x1, 0x3(%r8,%rsi,4)
leaq 0x1(%rsi), %rsi
je 0x5fc3
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_get_raw_size(unsigned int, unsigned int, LodePNGColorMode const*)
size_t lodepng_get_raw_size(unsigned w, unsigned h, const LodePNGColorMode* color)
{
  /*will not overflow for any color type if roughly w * h < 268435455*/
  size_t bpp = lodepng_get_bpp(color);
  size_t n = w * h;
  return ((n / 8) * bpp) + ((n & 7) * bpp + 7) / 8;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
movq %rdx, %rdi
movl %esi, %ebx
callq 0x5f6e
imull %ebx, %r14d
movl %eax, %eax
movl %r14d, %ecx
andl $0x7, %r14d
shrl $0x3, %ecx
imulq %rax, %r14
imulq %rax, %rcx
addq $0x7, %r14
shrq $0x3, %r14
addq %rcx, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_get_raw_size_lct(unsigned int, unsigned int, LodePNGColorType, unsigned int)
size_t lodepng_get_raw_size_lct(unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth)
{
  /*will not overflow for any color type if roughly w * h < 268435455*/
  size_t bpp = lodepng_get_bpp_lct(colortype, bitdepth);
  size_t n = w * h;
  return ((n / 8) * bpp) + ((n & 7) * bpp + 7) / 8;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
movl %edx, %edi
movl %ecx, %ebx
movl %esi, %ebp
callq 0x5f84
imull %ebp, %r14d
imull %ebx, %eax
movl %r14d, %ecx
shrl $0x3, %ecx
andl $0x7, %r14d
imulq %rax, %rcx
imulq %r14, %rax
addq $0x7, %rax
shrq $0x3, %rax
addq %rcx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: LodePNGText_cleanup(LodePNGInfo*)
static void LodePNGText_cleanup(LodePNGInfo* info)
{
  size_t i;
  for(i = 0; i != info->text_num; ++i)
  {
    string_cleanup(&info->text_keys[i]);
    string_cleanup(&info->text_strings[i]);
  }
  lodepng_free(info->text_keys);
  lodepng_free(info->text_strings);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x50(%rbx), %rdi
cmpq 0x48(%rbx), %r15
je 0x609f
addq %r14, %rdi
callq 0xbdca
movq 0x58(%rbx), %rdi
addq %r14, %rdi
callq 0xbdca
incq %r15
addq $0x8, %r14
jmp 0x6078
callq 0x2180
movq 0x58(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2180
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/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;

  string_init(&info->text_keys[info->text_num - 1]);
  string_set(&info->text_keys[info->text_num - 1], key);

  string_init(&info->text_strings[info->text_num - 1]);
  string_set(&info->text_strings[info->text_num - 1], str);

  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x48(%rdi), %rax
movq %rdi, %r14
movq 0x50(%rdi), %rdi
movq %rsi, %r15
movq %rdx, %rbx
leaq 0x8(,%rax,8), %rsi
callq 0x2260
movq %rax, %r12
movq 0x48(%r14), %rax
movq 0x58(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x2260
testq %r12, %r12
movq %rax, %r13
setne %al
testq %r13, %r13
setne %cl
testb %cl, %al
je 0x6161
movq 0x48(%r14), %rax
leaq (%r12,%rax,8), %rdi
leaq 0x1(%rax), %rcx
movq %rcx, 0x48(%r14)
movq %r12, 0x50(%r14)
movq %r13, 0x58(%r14)
callq 0x617e
movq 0x48(%r14), %rax
movq 0x50(%r14), %rcx
movq %r15, %rsi
leaq -0x8(%rcx,%rax,8), %rdi
callq 0x6189
movq 0x48(%r14), %rax
movq 0x58(%r14), %rcx
leaq -0x8(%rcx,%rax,8), %rdi
callq 0x617e
movq 0x48(%r14), %rax
movq 0x58(%r14), %rcx
movq %rbx, %rsi
leaq -0x8(%rcx,%rax,8), %rdi
callq 0x6189
xorl %eax, %eax
jmp 0x6174
movq %r12, %rdi
callq 0x2180
movq %r13, %rdi
callq 0x2180
pushq $0x53
popq %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: string_set(char**, char const*)
static void string_set(char** out, const char* in)
{
  size_t insize = strlen(in), i;
  if(string_resize(out, insize))
  {
    for(i = 0; i != insize; ++i)
    {
      (*out)[i] = in[i];
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq %rsi, %rdi
movq %rsi, %rbx
callq 0x2070
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xbddc
testl %eax, %eax
je 0x61c3
xorl %eax, %eax
cmpq %rax, %r15
je 0x61c3
movb (%rbx,%rax), %cl
movq (%r14), %rdx
movb %cl, (%rdx,%rax)
incq %rax
jmp 0x61b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: LodePNGIText_cleanup(LodePNGInfo*)
static void LodePNGIText_cleanup(LodePNGInfo* info)
{
  size_t i;
  for(i = 0; i != info->itext_num; ++i)
  {
    string_cleanup(&info->itext_keys[i]);
    string_cleanup(&info->itext_langtags[i]);
    string_cleanup(&info->itext_transkeys[i]);
    string_cleanup(&info->itext_strings[i]);
  }
  lodepng_free(info->itext_keys);
  lodepng_free(info->itext_langtags);
  lodepng_free(info->itext_transkeys);
  lodepng_free(info->itext_strings);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x68(%rbx), %rdi
cmpq 0x60(%rbx), %r15
je 0x621b
addq %r14, %rdi
callq 0xbdca
movq 0x70(%rbx), %rdi
addq %r14, %rdi
callq 0xbdca
movq 0x78(%rbx), %rdi
addq %r14, %rdi
callq 0xbdca
movq 0x80(%rbx), %rdi
addq %r14, %rdi
callq 0xbdca
incq %r15
addq $0x8, %r14
jmp 0x61d9
callq 0x2180
movq 0x70(%rbx), %rdi
callq 0x2180
movq 0x78(%rbx), %rdi
callq 0x2180
movq 0x80(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2180
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/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);

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

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x10, %rdi
callq 0x5e68
movq %rbx, %rdi
callq 0x606a
movq %rbx, %rdi
callq 0x61cb
movq %rbx, %rdi
popq %rbx
jmp 0x6473
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_info_copy(LodePNGInfo*, LodePNGInfo const*)
unsigned lodepng_info_copy(LodePNGInfo* dest, const LodePNGInfo* source)
{
  lodepng_info_cleanup(dest);
  *dest = *source;
  lodepng_color_mode_init(&dest->color);
  CERROR_TRY_RETURN(lodepng_color_mode_copy(&dest->color, &source->color));

#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  CERROR_TRY_RETURN(LodePNGText_copy(dest, source));
  CERROR_TRY_RETURN(LodePNGIText_copy(dest, source));

  LodePNGUnknownChunks_init(dest);
  CERROR_TRY_RETURN(LodePNGUnknownChunks_copy(dest, source));
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x6450
vmovups (%rbx), %zmm0
vmovups 0x40(%rbx), %zmm1
vmovups 0x80(%rbx), %zmm2
vmovups 0xa8(%rbx), %zmm3
leaq 0x10(%r14), %rdi
leaq 0x10(%rbx), %rsi
movabsq $0x800000006, %rax      # imm = 0x800000006
vmovups %zmm0, (%r14)
vxorps %xmm0, %xmm0, %xmm0
vmovups %zmm3, 0xa8(%r14)
vmovups %zmm2, 0x80(%r14)
vmovups %zmm1, 0x40(%r14)
movq %rax, 0x10(%r14)
vmovups %ymm0, 0x18(%r14)
vzeroupper
callq 0x5e80
testl %eax, %eax
jne 0x65a8
andq $0x0, 0x58(%r14)
vxorps %xmm0, %xmm0, %xmm0
xorl %r12d, %r12d
vmovups %xmm0, 0x48(%r14)
cmpq 0x48(%rbx), %r12
je 0x6558
movq 0x50(%rbx), %rax
movq 0x58(%rbx), %rcx
movq %r14, %rdi
movq (%rax,%r12,8), %rsi
movq (%rcx,%r12,8), %rdx
callq 0x60b2
incq %r12
testl %eax, %eax
je 0x6531
jmp 0x65a8
andq $0x0, 0x80(%r14)
vxorps %xmm0, %xmm0, %xmm0
xorl %r12d, %r12d
vmovups %ymm0, 0x60(%r14)
cmpq 0x60(%rbx), %r12
je 0x65bd
movq 0x68(%rbx), %rax
movq 0x70(%rbx), %rcx
movq %r14, %rdi
movq (%rax,%r12,8), %rsi
movq (%rcx,%r12,8), %rdx
movq 0x78(%rbx), %rcx
movq 0x80(%rbx), %rax
movq (%rcx,%r12,8), %rcx
movq (%rax,%r12,8), %r8
vzeroupper
callq 0x6243
incq %r12
testl %eax, %eax
je 0x656d
movl %eax, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
vzeroupper
callq 0x6423
movq %r14, %rdi
callq 0x6473
xorl %r15d, %r15d
pushq $0x53
popq %rbp
xorl %r13d, %r13d
cmpq $0x3, %r13
je 0x65ab
movq 0xd0(%rbx,%r13,8), %r12
movq %r12, %rdi
movq %r12, 0xd0(%r14,%r13,8)
callq 0x21c0
testq %rax, %rax
movq %rax, 0xb8(%r14,%r13,8)
sete %al
testq %r12, %r12
setne %cl
testb %al, %cl
jne 0x663e
xorl %eax, %eax
cmpq %r12, %rax
jae 0x6639
movq 0xb8(%rbx,%r13,8), %rcx
movq 0xb8(%r14,%r13,8), %rdx
movb (%rcx,%rax), %cl
movb %cl, (%rdx,%rax)
incq %rax
movq 0xd0(%rbx,%r13,8), %r12
jmp 0x6611
incq %r13
jmp 0x65d9
movl %ebp, %r15d
jmp 0x65ab
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: lodepng_color_mode_equal(LodePNGColorMode const*, LodePNGColorMode const*)
static int lodepng_color_mode_equal(const LodePNGColorMode* a, const LodePNGColorMode* b)
{
  size_t i;
  if(a->colortype != b->colortype) return 0;
  if(a->bitdepth != b->bitdepth) return 0;
  if(a->key_defined != b->key_defined) return 0;
  if(a->key_defined)
  {
    if(a->key_r != b->key_r) return 0;
    if(a->key_g != b->key_g) return 0;
    if(a->key_b != b->key_b) return 0;
  }
  /*if one of the palette sizes is 0, then we consider it to be the same as the
  other: it means that e.g. the palette was not given by the user and should be
  considered the same as the palette inside the PNG.*/
  if(1/*a->palettesize != 0 && b->palettesize != 0*/) {
    if(a->palettesize != b->palettesize) return 0;
    for(i = 0; i != a->palettesize * 4; ++i)
    {
      if(a->palette[i] != b->palette[i]) return 0;
    }
  }
  return 1;
}

// Assembly:
movl (%rdi), %ecx
xorl %eax, %eax
cmpl (%rsi), %ecx
jne 0x6ba0
movl 0x4(%rdi), %ecx
cmpl 0x4(%rsi), %ecx
jne 0x6ba0
movl 0x18(%rdi), %ecx
cmpl 0x18(%rsi), %ecx
jne 0x6ba0
testl %ecx, %ecx
je 0x6b6c
movl 0x1c(%rdi), %ecx
cmpl 0x1c(%rsi), %ecx
jne 0x6ba0
movl 0x20(%rdi), %ecx
cmpl 0x20(%rsi), %ecx
jne 0x6ba0
movl 0x24(%rdi), %ecx
cmpl 0x24(%rsi), %ecx
jne 0x6ba0
movq 0x10(%rdi), %rcx
cmpq 0x10(%rsi), %rcx
jne 0x6ba0
shlq $0x2, %rcx
xorl %r8d, %r8d
pushq $0x1
popq %rdx
cmpq %r8, %rcx
je 0x6ba1
movq 0x8(%rdi), %rax
movq 0x8(%rsi), %r10
leaq 0x1(%r8), %r11
movb (%rax,%r8), %r9b
xorl %eax, %eax
cmpb (%r10,%r8), %r9b
movq %r11, %r8
je 0x6b80
retq
movl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: color_tree_add(ColorTree*, unsigned char, unsigned char, unsigned char, unsigned char, unsigned int)
static void color_tree_add(ColorTree* tree,
                           unsigned char r, unsigned char g, unsigned char b, unsigned char a, unsigned index)
{
  int bit;
  for(bit = 0; bit < 8; ++bit)
  {
    int i = 8 * ((r >> bit) & 1) + 4 * ((g >> bit) & 1) + 2 * ((b >> bit) & 1) + 1 * ((a >> bit) & 1);
    if(!tree->children[i])
    {
      tree->children[i] = (ColorTree*)lodepng_malloc(sizeof(ColorTree));
      color_tree_init(tree->children[i]);
    }
    tree = tree->children[i];
  }
  tree->index = (int)index;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, (%rsp)
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r14d
movq %rdi, %r13
xorl %ebx, %ebx
movl %r8d, 0x4(%rsp)
cmpl $0x8, %ebx
je 0x6c44
shrxl %ebx, %r12d, %edi
shrxl %ebx, %r8d, %r10d
shrxl %ebx, %r14d, %eax
shrxl %ebx, %r15d, %r9d
andl $0x1, %edi
andl $0x1, %r10d
andl $0x1, %eax
andl $0x1, %r9d
leal (%r10,%rdi,4), %edi
leal (%rdi,%rax,8), %eax
leal (%rax,%r9,2), %ebp
movq (%r13,%rbp,8), %rax
testq %rax, %rax
jne 0x6c3d
movl $0x88, %edi
callq 0x21c0
movq %rax, %rdi
movq %rax, (%r13,%rbp,8)
callq 0x6ba4
movl 0x4(%rsp), %r8d
movq (%r13,%rbp,8), %rax
incl %ebx
movq %rax, %r13
jmp 0x6be0
movl (%rsp), %eax
movl %eax, 0x80(%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: getPixelColorRGBA16(unsigned short*, unsigned short*, unsigned short*, unsigned short*, unsigned char const*, unsigned long, LodePNGColorMode const*)
static void getPixelColorRGBA16(unsigned short* r, unsigned short* g, unsigned short* b, unsigned short* a,
                                const unsigned char* in, size_t i, const LodePNGColorMode* mode)
{
  if(mode->colortype == LCT_GREY)
  {
    *r = *g = *b = 256 * in[i * 2 + 0] + in[i * 2 + 1];
    if(mode->key_defined && 256U * in[i * 2 + 0] + in[i * 2 + 1] == mode->key_r) *a = 0;
    else *a = 65535;
  }
  else if(mode->colortype == LCT_RGB)
  {
    *r = 256u * in[i * 6 + 0] + in[i * 6 + 1];
    *g = 256u * in[i * 6 + 2] + in[i * 6 + 3];
    *b = 256u * in[i * 6 + 4] + in[i * 6 + 5];
    if(mode->key_defined
       && 256u * in[i * 6 + 0] + in[i * 6 + 1] == mode->key_r
       && 256u * in[i * 6 + 2] + in[i * 6 + 3] == mode->key_g
       && 256u * in[i * 6 + 4] + in[i * 6 + 5] == mode->key_b) *a = 0;
    else *a = 65535;
  }
  else if(mode->colortype == LCT_GREY_ALPHA)
  {
    *r = *g = *b = 256u * in[i * 4 + 0] + in[i * 4 + 1];
    *a = 256u * in[i * 4 + 2] + in[i * 4 + 3];
  }
  else if(mode->colortype == LCT_RGBA)
  {
    *r = 256u * in[i * 8 + 0] + in[i * 8 + 1];
    *g = 256u * in[i * 8 + 2] + in[i * 8 + 3];
    *b = 256u * in[i * 8 + 4] + in[i * 8 + 5];
    *a = 256u * in[i * 8 + 6] + in[i * 8 + 7];
  }
}

// Assembly:
movq 0x8(%rsp), %rax
movl (%rax), %r10d
cmpq $0x6, %r10
ja 0x6d93
leaq 0x7712(%rip), %r11      # 0xe388
movslq (%r11,%r10,4), %r10
addq %r11, %r10
jmpq *%r10
movzbl (%r8,%r9,2), %r10d
movzbl 0x1(%r8,%r9,2), %r11d
shll $0x8, %r10d
orl %r10d, %r11d
movw %r11w, (%rdx)
movw %r11w, (%rsi)
movw %r11w, (%rdi)
cmpl $0x0, 0x18(%rax)
je 0x6d62
leaq 0x1(%r9,%r9), %rdx
addq %r9, %r9
movzbl (%r8,%r9), %esi
movzbl (%r8,%rdx), %edx
shll $0x8, %esi
orl %esi, %edx
cmpl 0x1c(%rax), %edx
jne 0x6d62
xorl %eax, %eax
jmp 0x6d90
movzwl (%r8,%r9,4), %eax
movbew %ax, (%rdx)
movbew %ax, (%rsi)
movbew %ax, (%rdi)
movbew 0x2(%r8,%r9,4), %ax
jmp 0x6d90
imulq $0x6, %r9, %r9
movzbl (%r8,%r9), %r10d
movzbl 0x1(%r8,%r9), %r11d
shll $0x8, %r10d
orl %r10d, %r11d
movw %r11w, (%rdi)
movzwl 0x2(%r8,%r9), %edi
movbew %di, (%rsi)
movzwl 0x4(%r8,%r9), %esi
movbew %si, (%rdx)
cmpl $0x0, 0x18(%rax)
je 0x6d62
leaq 0x1(%r9), %rdx
movzbl (%r8,%r9), %esi
movzbl (%r8,%rdx), %edx
shll $0x8, %esi
orl %esi, %edx
cmpl 0x1c(%rax), %edx
jne 0x6d62
movbew 0x2(%r8,%r9), %dx
movzwl %dx, %edx
cmpl 0x20(%rax), %edx
jne 0x6d62
movbew 0x4(%r8,%r9), %dx
movzwl %dx, %edx
cmpl 0x24(%rax), %edx
je 0x6cc8
movw $0xffff, %ax            # imm = 0xFFFF
jmp 0x6d90
movzwl (%r8,%r9,8), %eax
movbew %ax, (%rdi)
movzwl 0x2(%r8,%r9,8), %eax
movbew %ax, (%rsi)
movzwl 0x4(%r8,%r9,8), %eax
movbew %ax, (%rdx)
movbew 0x6(%r8,%r9,8), %ax
movw %ax, (%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: color_tree_cleanup(ColorTree*)
static void color_tree_cleanup(ColorTree* tree)
{
  int i;
  for(i = 0; i != 16; ++i)
  {
    if(tree->children[i])
    {
      color_tree_cleanup(tree->children[i]);
      lodepng_free(tree->children[i]);
    }
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq $0x10, %r14
je 0x7469
movq (%rbx,%r14,8), %rdi
testq %rdi, %rdi
je 0x7464
callq 0x743d
movq (%rbx,%r14,8), %rdi
callq 0x2180
incq %r14
jmp 0x7447
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/phillip-h[P]fractal-gen/lodepng.cpp
// Function: checkColorValidity(LodePNGColorType, unsigned int)
static unsigned checkColorValidity(LodePNGColorType 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 $0x1f
popq %rax
cmpl $0x6, %edi
ja 0x7f6f
leaq 0x64b1(%rip), %rdx      # 0xe3e0
movl %edi, %ecx
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $-0x8, %esi
andl $-0x9, %esi
pushq $0x25
popq %rax
cmovel %esi, %eax
retq
pushq $0x25
popq %rax
cmpl $0x10, %esi
ja 0x7f6f
movl $0x10116, %ecx          # imm = 0x10116
btl %esi, %ecx
jae 0x7f6f
xorl %eax, %eax
retq
decl %esi
cmpl $0x8, %esi
jae 0x7f70
leaq 0x7d8a(%rip), %rcx      # 0xfcf4
movl %esi, %eax
movl (%rcx,%rax,4), %eax
retq
pushq $0x25
popq %rax
retq