LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/liujan[P]randomforest/main.cpp
// Function: main
int main(int argc, const char * argv[]) {
    // insert code here...
    std::cout << "Hello, World!\n";
    
    RandomForest forest;
    forest.readTrainSample("train.csv");
    forest.readTestSample("test.csv");
    forest.buildTree(7000);
    forest.predict();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x29240, %rsp          # imm = 0x29240
movq 0x4095(%rip), %rdi      # 0x9fd8
leaq 0x1311(%rip), %rsi      # 0x725b
movl $0xe, %edx
callq 0x21e0
leaq -0x29250(%rbp), %rdi
callq 0x4d80
leaq -0x40(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1240(%rip), %rsi      # 0x71af
leaq 0x1242(%rip), %rdx      # 0x71b8
leaq -0x50(%rbp), %rdi
callq 0x6066
leaq -0x29250(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x5272
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x5fa4
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x1252(%rip), %rsi      # 0x7205
leaq 0x1253(%rip), %rdx      # 0x720d
leaq -0x30(%rbp), %rdi
callq 0x6066
leaq -0x29250(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x55c6
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x5fe8
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x21b0
leaq -0x29250(%rbp), %rdi
movl $0x1b58, %esi           # imm = 0x1B58
callq 0x4f3c
leaq -0x29250(%rbp), %rdi
callq 0x5018
leaq -0x29250(%rbp), %rdi
callq 0x5914
xorl %eax, %eax
addq $0x29240, %rsp          # imm = 0x29240
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x6052
movq -0x20(%rbp), %rsi
jmp 0x6043
jmp 0x604f
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r14, %rdi
je 0x6052
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x21b0
jmp 0x6052
jmp 0x604f
movq %rax, %rbx
leaq -0x29250(%rbp), %rdi
callq 0x5914
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/main.cpp
// Function: main
int main(int argc, char *argv[])
{
	cout << "Introduction to Computer Graphics - Raytracer" << endl << endl;
	if (argc != 3) {
		cerr << "Usage: " << argv[0] << " in-file out-file.png" << endl;
		return 1;
	}

	Raytracer raytracer;

	if (!raytracer.readScene(argv[1])) {
		cerr << "Error: reading scene from " << argv[1] << " failed - no output generated."<< endl;
		return 1;
	}
	raytracer.renderToFile(argv[2]);
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
movq 0x22e9d(%rip), %r15     # 0x3bfd0
leaq 0x182bb(%rip), %rsi     # 0x313f5
movl $0x2d, %edx
movq %r15, %rdi
callq 0x5360
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x51e0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x51e0
cmpl $0x3, %r14d
jne 0x191c3
movq 0x8(%rbx), %rsi
leaq -0x20(%rbp), %rdi
callq 0x19bb6
testb %al, %al
je 0x19202
movq 0x10(%rbx), %rsi
leaq -0x20(%rbp), %rdi
callq 0x1a276
xorl %eax, %eax
jmp 0x192c0
movq 0x22e26(%rip), %r14     # 0x3bff0
leaq 0x18252(%rip), %rsi     # 0x31423
movl $0x7, %edx
movq %r14, %rdi
callq 0x5360
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x19242
movq %rbx, %rdi
callq 0x5120
movq 0x22dfb(%rip), %rdi     # 0x3bff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x5360
jmp 0x1925a
movq 0x22de7(%rip), %r14     # 0x3bff0
leaq 0x18231(%rip), %rsi     # 0x31441
movl $0x1a, %edx
movq %r14, %rdi
callq 0x5360
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
je 0x19268
movq %rbx, %rdi
callq 0x5120
movq 0x22dbb(%rip), %rdi     # 0x3bff0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x5360
jmp 0x19280
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x5510
leaq 0x181ca(%rip), %rsi     # 0x3142b
movl $0x15, %edx
jmp 0x1928c
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x5510
leaq 0x181d5(%rip), %rsi     # 0x3145c
movl $0x1e, %edx
movq %r14, %rdi
callq 0x5360
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq %r14, %rdi
callq 0x5050
movq %rax, %rdi
callq 0x51e0
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/raytracer.cpp
// Function: operator>>(YAML::Node const&, Triple&)
void operator >> (const YAML::Node& node, Triple& t)
{
	assert(node.size()==3);
    node[0] >> t.x;
    node[1] >> t.y;
    node[2] >> t.z;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x28aa4
cmpl $0x3, %eax
jne 0x19350
movq %r14, %rdi
xorl %esi, %esi
callq 0x28b34
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x28c3c
testb %al, %al
je 0x1936f
movq %r14, %rdi
movl $0x1, %esi
callq 0x28b34
movq %rax, %r15
leaq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x28c3c
testb %al, %al
je 0x1938d
movq %r14, %rdi
movl $0x2, %esi
callq 0x28b34
movq %rax, %r14
addq $0x10, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x28c3c
testb %al, %al
je 0x193ab
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18124(%rip), %rdi     # 0x3147b
leaq 0x1812c(%rip), %rsi     # 0x3148a
leaq 0x18133(%rip), %rcx     # 0x31498
movl $0x20, %edx
callq 0x51b0
movl $0x30, %edi
callq 0x5140
movq %rax, %rbx
movl (%r15), %esi
movl 0x4(%r15), %edx
movq %rax, %rdi
callq 0x1a80e
jmp 0x193c7
movl $0x30, %edi
callq 0x5140
movq %rax, %rbx
movl (%r15), %esi
movl 0x4(%r15), %edx
movq %rax, %rdi
callq 0x1a80e
jmp 0x193c7
movl $0x30, %edi
callq 0x5140
movq %rax, %rbx
movl (%r14), %esi
movl 0x4(%r14), %edx
movq %rax, %rdi
callq 0x1a80e
leaq 0x22362(%rip), %rsi     # 0x3b730
leaq 0x145f(%rip), %rdx      # 0x1a834
movq %rbx, %rdi
callq 0x5520
jmp 0x193e1
jmp 0x193e1
movq %rax, %r14
movq %rbx, %rdi
callq 0x5230
movq %r14, %rdi
callq 0x5560
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/raytracer.cpp
// Function: parseTriple(YAML::Node const&)
Triple parseTriple(const YAML::Node& node)
{
	Triple t;
    node[0] >> t.x;
    node[1] >> t.y;
    node[2] >> t.z;	
	return t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rsi, %rdi
xorl %esi, %esi
callq 0x28b34
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x28c3c
testb %al, %al
je 0x19481
leaq 0x8(%rbx), %r12
movq %r14, %rdi
movl $0x1, %esi
callq 0x28b34
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x28c3c
testb %al, %al
je 0x1949f
leaq 0x10(%rbx), %r15
movq %r14, %rdi
movl $0x2, %esi
callq 0x28b34
movq %rax, %r14
movq %rax, %rdi
movq %r15, %rsi
callq 0x28c3c
testb %al, %al
je 0x194bd
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x30, %edi
callq 0x5140
movq %rax, %rbx
movl (%r15), %esi
movl 0x4(%r15), %edx
movq %rax, %rdi
callq 0x1a80e
jmp 0x194d9
movl $0x30, %edi
callq 0x5140
movq %rax, %rbx
movl (%r15), %esi
movl 0x4(%r15), %edx
movq %rax, %rdi
callq 0x1a80e
jmp 0x194d9
movl $0x30, %edi
callq 0x5140
movq %rax, %rbx
movl (%r14), %esi
movl 0x4(%r14), %edx
movq %rax, %rdi
callq 0x1a80e
leaq 0x22250(%rip), %rsi     # 0x3b730
leaq 0x134d(%rip), %rdx      # 0x1a834
movq %rbx, %rdi
callq 0x5520
jmp 0x194f3
jmp 0x194f3
movq %rax, %r14
movq %rbx, %rdi
callq 0x5230
movq %r14, %rdi
callq 0x5560
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/raytracer.cpp
// Function: Raytracer::parseLight(YAML::Node const&)
Light* Raytracer::parseLight(const YAML::Node& node)
{
	Point position;
	node["position"] >> position;
	Color color;
	node["color"] >> color;
	return new Light(position,color);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x17a21(%rip), %rsi     # 0x314e1
leaq 0x17a22(%rip), %rdx     # 0x314e9
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x1a774
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a420
movq %rax, %r14
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x19af6
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x52e0
leaq -0x50(%rbp), %rsi
movq %r14, %rdi
callq 0x192cc
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
leaq -0x38(%rbp), %r14
movq %r15, (%r14)
leaq 0x179a7(%rip), %rsi     # 0x314c6
leaq 0x179a5(%rip), %rdx     # 0x314cb
movq %r14, %rdi
callq 0x1a774
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1a420
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x19b51
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x52e0
leaq -0x70(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x192cc
movl $0x30, %edi
callq 0x52d0
movaps -0x50(%rbp), %xmm0
movups %xmm0, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x10(%rax)
movaps (%r14), %xmm0
movups %xmm0, 0x18(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x28(%rax)
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x19b96
movq %rax, %rbx
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x19bae
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x52e0
movq %rbx, %rdi
callq 0x5560
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/raytracer.cpp
// Function: Raytracer::renderToFile(char*)
void Raytracer::renderToFile(char* outputFilename)
{
	Image img(400,400);
	cout << "Tracing..." << endl;
	scene->render(img);
	cout << "Writing image to " << outputFilename << "..." << endl;
	img.write_png(outputFilename);
	cout << "Done." << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rdi
movaps %xmm0, (%rdi)
movl $0x190, %esi            # imm = 0x190
movl $0x190, %edx            # imm = 0x190
callq 0x1a99c
movq 0x21d27(%rip), %r15     # 0x3bfd0
leaq 0x17367(%rip), %rsi     # 0x31617
movl $0xa, %edx
movq %r15, %rdi
callq 0x5360
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq 0x21cf5(%rip), %rdi     # 0x3bfd0
callq 0x5050
movq %rax, %rdi
callq 0x51e0
movq (%r14), %rdi
leaq -0x30(%rbp), %rsi
callq 0x25bac
movq 0x21cd5(%rip), %r14     # 0x3bfd0
leaq 0x17320(%rip), %rsi     # 0x31622
movl $0x11, %edx
movq %r14, %rdi
callq 0x5360
testq %rbx, %rbx
je 0x1a330
movq %rbx, %rdi
callq 0x5120
movq 0x21cad(%rip), %rdi     # 0x3bfd0
movq %rbx, %rsi
movq %rax, %rdx
callq 0x5360
jmp 0x1a348
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x5510
movq 0x21c81(%rip), %r14     # 0x3bfd0
leaq 0x172c8(%rip), %rsi     # 0x3161e
movl $0x3, %edx
movq %r14, %rdi
callq 0x5360
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq 0x21c4f(%rip), %rdi     # 0x3bfd0
callq 0x5050
movq %rax, %rdi
callq 0x51e0
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x1aa22
movq 0x21c2f(%rip), %rbx     # 0x3bfd0
leaq 0x1728c(%rip), %rsi     # 0x31634
movl $0x5, %edx
movq %rbx, %rdi
callq 0x5360
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x52b0
movsbl %al, %esi
movq 0x21bfd(%rip), %rdi     # 0x3bfd0
callq 0x5050
movq %rax, %rdi
callq 0x51e0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x1a3ee
callq 0x53f0
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x1a40a
callq 0x53f0
movq %rbx, %rdi
callq 0x5560
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/./yaml/node.h
// Function: YAML::Node const& YAML::Node::GetValue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
inline const Node& Node::GetValue(const T& key) const
	{
		if(!m_pContent)
			throw BadDereference();

		for(Iterator it=begin();it!=end();++it) {
			T t;
			if(YAML::Read(it.first(), t)) {
				if(key == t)
					return it.second();
			}
		}

		throw KeyNotFound(m_line, m_column);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, -0x50(%rbp)
cmpq $0x0, 0x48(%rdi)
je 0x1a530
movq %rdi, %rbx
leaq -0x58(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x28944
leaq -0x48(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x289f4
movq %r12, %rdi
movq %r13, %rsi
callq 0x27117
movl %eax, %r15d
movq %r13, %rdi
callq 0x26eca
testb %r15b, %r15b
je 0x1a50f
leaq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
movq %r12, %rdi
callq 0x2702a
movq %rax, %rdi
movq %r13, %rsi
callq 0x28bac
movb $0x1, %r14b
testb %al, %al
je 0x1a4e4
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rdx
cmpq -0x40(%rbp), %rdx
jne 0x1a4e4
testq %rdx, %rdx
je 0x1a4d5
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rax
movq (%rax), %rdi
callq 0x5300
testl %eax, %eax
jne 0x1a4e4
movq %r12, %rdi
callq 0x27084
movq %rax, -0x60(%rbp)
xorl %r14d, %r14d
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1a4fd
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x52e0
testb %r14b, %r14b
je 0x1a50f
movq %r12, %rdi
callq 0x26ee4
jmp 0x1a456
leaq -0x58(%rbp), %rdi
callq 0x26eca
testb %r15b, %r15b
je 0x1a54e
movq -0x60(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x30, %edi
callq 0x5140
movq %rax, %r14
movq %rax, %rdi
callq 0x1a5d0
leaq 0x2113c(%rip), %rsi     # 0x3b688
jmp 0x1a56f
movl $0x30, %edi
callq 0x5140
movq %rax, %r14
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movq %rax, %rdi
callq 0x1a600
leaq 0x21131(%rip), %rsi     # 0x3b6a0
leaq 0x2be(%rip), %rdx       # 0x1a834
movq %r14, %rdi
callq 0x5520
jmp 0x1a580
movq %rax, %rbx
movq %r14, %rdi
callq 0x5230
jmp 0x1a5c7
jmp 0x1a59d
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x26eca
jmp 0x1a5be
movq %rax, %rbx
jmp 0x1a5be
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x1a5be
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x52e0
leaq -0x58(%rbp), %rdi
callq 0x26eca
movq %rbx, %rdi
callq 0x5560
nop
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/sphere.cpp
// Function: Sphere::intersect(Ray const&, double*)
bool Sphere::intersect(const Ray &ray, double *t)
{
	/****************************************************
	* RT1.1: INTERSECTION CALCULATION
	*
	* Given: ray, position, r
	* Sought: intersects? if true: *t
	* 
	* Insert calculation of ray/sphere intersection here. 
	*
	* You have the sphere's center (C) and radius (r) as well as
	* the ray's origin (ray.O) and direction (ray.D).
	*
	* If the ray does not intersect the sphere, return false.
	* Otherwise, return true and place the distance of the
	* intersection point from the ray origin in *t (see example).
	****************************************************/

	// place holder for actual intersection calculation

	Vector OC = (position - ray.O).normalized();
	if (OC.dot(ray.D) > 0.999) {
		*t = 1000;
		return true;
	}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movsd 0x10(%rdi), %xmm3
movsd 0x18(%rdi), %xmm4
subsd (%rsi), %xmm3
subsd 0x8(%rsi), %xmm4
movsd 0x20(%rdi), %xmm2
subsd 0x10(%rsi), %xmm2
movq %rdx, %r14
movapd %xmm4, %xmm0
mulsd %xmm4, %xmm0
movapd %xmm3, %xmm1
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
movapd %xmm2, %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1a8ee
sqrtsd %xmm0, %xmm0
jmp 0x1a911
movsd %xmm2, -0x28(%rbp)
movsd %xmm3, -0x20(%rbp)
movsd %xmm4, -0x18(%rbp)
callq 0x5260
movsd -0x18(%rbp), %xmm4
movsd -0x20(%rbp), %xmm3
movsd -0x28(%rbp), %xmm2
movsd 0x16ddf(%rip), %xmm1    # 0x316f8
divsd %xmm0, %xmm1
mulsd %xmm1, %xmm3
mulsd %xmm1, %xmm4
mulsd 0x20(%rbx), %xmm4
mulsd 0x18(%rbx), %xmm3
mulsd %xmm1, %xmm2
addsd %xmm4, %xmm3
mulsd 0x28(%rbx), %xmm2
addsd %xmm3, %xmm2
ucomisd 0x16db8(%rip), %xmm2    # 0x31700
jbe 0x1a957
movabsq $0x408f400000000000, %rax # imm = 0x408F400000000000
movq %rax, (%r14)
ucomisd 0x16da1(%rip), %xmm2    # 0x31700
seta %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/image.cpp
// Function: Image::set_extent(int, int)
bool Image::set_extent(int width, int height)
{
	_width = width;
	_height = height;
	if (_pixel) delete[] _pixel;
	_pixel = size() > 0 ? new Color[size()] : 0;
	return _pixel != 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, 0x8(%rdi)
movl %edx, 0xc(%rdi)
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x1a9bc
callq 0x53f0
movl 0xc(%rbx), %eax
imull 0x8(%rbx), %eax
testl %eax, %eax
jle 0x1aa0b
movl %eax, %r15d
shlq $0x3, %r15
leaq (%r15,%r15,2), %rdi
callq 0x5040
movq %rax, %r14
leaq (%r15,%r15,2), %rax
addq $-0x18, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
shrq $0x4, %rdx
leaq (%rdx,%rdx,2), %rax
leaq 0x18(,%rax,8), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x5170
jmp 0x1aa0e
xorl %r14d, %r14d
movq %r14, (%rbx)
testq %r14, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/image.cpp
// Function: Image::write_png(char*) const
void Image::write_png(char* filename) const
{
	std::vector<unsigned char> image;
	image.resize(_width * _height * 4);
	std::vector<unsigned char>::iterator imageIterator = image.begin();
	Color *currentPixel = _pixel;
	while (imageIterator != image.end()) {
		*imageIterator = (unsigned char)(currentPixel->r * 255.0);
		imageIterator++;
		*imageIterator = (unsigned char)(currentPixel->g * 255.0);
		imageIterator++;
		*imageIterator = (unsigned char)(currentPixel->b * 255.0);
		imageIterator++;
		*imageIterator = 255;
		imageIterator++;
		currentPixel++;
	}
	LodePNG::encode(filename, image, _width, _height);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorpd %xmm0, %xmm0
leaq -0x30(%rbp), %rdi
movapd %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl 0x8(%rbx), %eax
imull 0xc(%rbx), %eax
shll $0x2, %eax
movslq %eax, %rsi
callq 0x1ae26
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
je 0x1aaae
movq (%rbx), %rcx
movsd 0x16caa(%rip), %xmm0    # 0x31718
movsd (%rcx), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movb %dl, (%rax)
movsd 0x8(%rcx), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movb %dl, 0x1(%rax)
movsd 0x10(%rcx), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movb %dl, 0x2(%rax)
movb $-0x1, 0x3(%rax)
addq $0x4, %rax
addq $0x18, %rcx
cmpq -0x28(%rbp), %rax
jne 0x1aa6e
leaq -0x50(%rbp), %rdi
leaq -0x11(%rbp), %rdx
movq %r14, %rsi
callq 0x1ae58
movl 0x8(%rbx), %edx
movl 0xc(%rbx), %ecx
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0x6, %r8d
movl $0x8, %r9d
callq 0x234b7
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1aaf6
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x52e0
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x1ab0b
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x52e0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1ab37
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x52e0
jmp 0x1ab37
jmp 0x1ab34
movq %rax, %rbx
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x1ab4c
movq -0x20(%rbp), %rsi
subq %rdi, %rsi
callq 0x52e0
movq %rbx, %rdi
callq 0x5560
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: ucvector_resize(ucvector*, unsigned long)
static unsigned ucvector_resize(ucvector* p, size_t size) /*returns 1 if success, 0 if failure ==> nothing done*/
{
  if(size * sizeof(unsigned) > p->allocsize)
  {
    size_t newsize = size * sizeof(unsigned) * 2;
    void* data = realloc(p->data, newsize);
    if(data)
    {
      p->allocsize = newsize;
      p->data = (unsigned char*)data;
      p->size = size;
    }
    else return 0; /*error: not enough memory*/
  }
  else p->size = size;
  return 1;
}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movq 0x8(%rdi), %rsi
incq %rsi
callq 0x1bb2f
testl %eax, %eax
je 0x1cd2b
movl %r14d, %eax
shrl $0x18, %eax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
movb %al, -0x1(%rcx,%rdx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1bb2f
testl %eax, %eax
je 0x1cd4f
movl %r14d, %eax
shrl $0x10, %eax
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
movb %al, -0x1(%rcx,%rdx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1bb2f
testl %eax, %eax
je 0x1cd70
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movl %r14d, %edx
movb %dh, -0x1(%rax,%rcx)
movq 0x8(%rbx), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x1bb2f
testl %eax, %eax
je 0x1cd8f
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movb %r14b, -0x1(%rax,%rcx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodeZlib_decompress(unsigned char**, unsigned long*, unsigned char const*, unsigned long, LodeZlib_DecompressSettings const*)
unsigned LodeZlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodeZlib_DecompressSettings* settings)
{
  unsigned error = 0;
  unsigned CM, CINFO, FDICT;
  ucvector outv;
  
  if(insize < 2) { error = 53; return error; } /*error, size of zlib data too small*/
  /*read information from zlib header*/
  if((in[0] * 256 + in[1]) % 31 != 0) { error = 24; return error; } /*error: 256 * in[0] + in[1] must be a multiple of 31, the FCHECK value is supposed to be made that way*/

  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; //not really important, all it does it to give a compiler warning about unused variable, we don't care what encoding setting the encoder used*/
  
  if(CM != 8 || CINFO > 7) { error = 25; return error; } /*error: only compression method 8: inflate with sliding window of 32k is supported by the PNG spec*/
  if(FDICT != 0) { error = 26; return error; } /*error: the specification of PNG says about the zlib stream: "The additional flags shall not specify a preset dictionary."*/
  
  ucvector_init_buffer(&outv, *out, *outsize); /*ucvector-controlled version of the output buffer, for dynamic array*/
  error = LodeFlate_inflate(&outv, in, insize, 2);
  *out = outv.data;
  *outsize = outv.size;
  if(error) return error;
  
  if(!settings->ignoreAdler32)
  {
    unsigned ADLER32 = LodeZlib_read32bitInt(&in[insize - 4]);
    unsigned checksum = adler32(outv.data, (unsigned)outv.size);
    if(checksum != ADLER32) { error = 58; return error; }
  }
  
  return error;
}

// Assembly:
movl $0x35, %eax
cmpq $0x2, %rcx
jb 0x1ce81
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movzbl (%rdx), %edx
movl %edx, %eax
shll $0x8, %eax
movzbl 0x1(%r14), %ecx
orl %ecx, %eax
imull $0xbdef7bdf, %eax, %esi # imm = 0xBDEF7BDF
movl $0x18, %eax
cmpl $0x8421084, %esi        # imm = 0x8421084
ja 0x1ce73
movl %edx, %eax
andl $0xf, %eax
cmpl $0x8, %eax
setne %al
testb %dl, %dl
sets %dl
orb %al, %dl
movl $0x19, %eax
jne 0x1ce73
movl $0x1a, %eax
testb $0x20, %cl
jne 0x1ce73
movq %r8, %r15
movq %rdi, %r13
movq (%rdi), %rax
movq (%r12), %rcx
leaq -0x40(%rbp), %rdi
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movl $0x2, %ecx
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1b04c
leaq -0x40(%rbp), %rcx
movq (%rcx), %rdi
movq %rdi, (%r13)
movq 0x8(%rcx), %rsi
movq %rsi, (%r12)
testl %eax, %eax
jne 0x1ce73
xorl %eax, %eax
cmpl $0x0, (%r15)
jne 0x1ce73
movl -0x4(%r14,%rbx), %ebx
bswapl %ebx
callq 0x1ce82
xorl %ecx, %ecx
cmpl %ebx, %eax
movl $0x3a, %eax
cmovel %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_chunk_check_crc(unsigned char const*)
unsigned LodePNG_chunk_check_crc(const unsigned char* chunk) /*returns 0 if the crc is correct, error code if it's incorrect*/
{
  unsigned length = LodePNG_chunk_length(chunk);
  unsigned CRC = LodePNG_read32bitInt(&chunk[length + 8]);
  unsigned checksum = Crc32_crc(&chunk[4], length + 4); /*the CRC is taken of the data and the 4 chunk type letters, not the length*/
  if(CRC != checksum) return 1;
  else return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl (%rdi), %esi
bswapl %esi
leal 0x8(%rsi), %eax
movl (%rdi,%rax), %ebx
bswapl %ebx
addq $0x4, %rdi
addl $0x4, %esi
callq 0x1d2a5
xorl %ecx, %ecx
cmpl %eax, %ebx
setne %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_append_chunk(unsigned char**, unsigned long*, unsigned char const*)
unsigned LodePNG_append_chunk(unsigned char** out, size_t* outlength, const unsigned char* chunk) /*appends chunk that was already created, to the data. Returns error code.*/
{
  unsigned i;
  unsigned total_chunk_length = LodePNG_chunk_length(chunk) + 12;
  unsigned char *chunk_start, *new_buffer;
  size_t new_length = (*outlength) + total_chunk_length;
  if(new_length < total_chunk_length || new_length < (*outlength)) return 77; /*integer overflow happened*/
  
  new_buffer = (unsigned char*)realloc(*out, new_length);
  if(!new_buffer) return 9929;
  (*out) = new_buffer;
  (*outlength) = new_length;
  chunk_start = &(*out)[new_length - total_chunk_length];
  
  for(i = 0; i < total_chunk_length; i++) chunk_start[i] = chunk[i];
  
  return 0;
}

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
callq 0x5390
incq %r15
cmpq $0x3, %r15
jne 0x1d6f6
xorl %r15d, %r15d
movq 0x18(%rbx,%r15,8), %r12
movq %r12, 0x18(%r14,%r15,8)
movq 0x18(%rbx,%r15,8), %rdi
callq 0x5420
movq %rax, (%r14,%r15,8)
testq %rax, %rax
setne %al
testq %r12, %r12
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x1d765
cmpq $0x0, 0x18(%rbx,%r15,8)
je 0x1d758
xorl %eax, %eax
movq (%rbx,%r15,8), %rcx
movb (%rcx,%rax), %cl
movq (%r14,%r15,8), %rdx
movb %cl, (%rdx,%rax)
incq %rax
cmpq 0x18(%rbx,%r15,8), %rax
jb 0x1d740
incq %r15
cmpq $0x3, %r15
jne 0x1d70b
xorl %eax, %eax
jmp 0x1d76a
movl $0x26cc, %eax           # imm = 0x26CC
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_Text_clear(LodePNG_Text*)
void LodePNG_Text_clear(LodePNG_Text* text)
{
  size_t i;
  for(i = 0; i < text->num; i++)
    {
    string_cleanup(&text->keys[i]);
    string_cleanup(&text->strings[i]);
    }
  free(text->keys);
  free(text->strings);
}

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
cmpq $0x0, (%rsi)
je 0x1dac6
movq %rsi, %rbx
movq %rdi, %r14
xorl %r12d, %r12d
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq (%rax,%r12,8), %rsi
movq (%rcx,%r12,8), %rdx
movq 0x18(%rbx), %rax
movq (%rax,%r12,8), %rcx
movq 0x20(%rbx), %rax
movq (%rax,%r12,8), %r8
movq %r14, %rdi
callq 0x1dad5
testl %eax, %eax
cmovnel %eax, %r15d
jne 0x1dac9
incq %r12
cmpq (%rbx), %r12
jb 0x1da8e
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_InfoPng_init(LodePNG_InfoPng*)
void LodePNG_InfoPng_init(LodePNG_InfoPng* info)
{
  info->width = info->height = 0;
  LodePNG_InfoColor_init(&info->color);
  info->interlaceMethod = 0;
  info->compressionMethod = 0;
  info->filterMethod = 0;
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  info->background_defined = 0;
  info->background_r = info->background_g = info->background_b = 0;
  
  LodePNG_Text_init(&info->text);
  LodePNG_IText_init(&info->itext);
  
  info->time_defined = 0;
  info->phys_defined = 0;
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
#ifdef LODEPNG_COMPILE_UNKNOWN_CHUNKS
  LodePNG_UnknownChunks_init(&info->unknown_chunks);
#endif /*LODEPNG_COMPILE_UNKNOWN_CHUNKS*/
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rdi)
xorl %eax, %eax
movl %eax, (%rdi)
movups %xmm0, 0x30(%rdi)
movabsq $0x800000006, %rcx      # imm = 0x800000006
movq %rcx, 0x18(%rdi)
movups %xmm0, 0x20(%rdi)
movl %eax, 0xa0(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movb $0x0, 0x90(%rdi)
movups %xmm0, 0xb0(%rdi)
movups %xmm0, 0xc0(%rdi)
movups %xmm0, 0xd0(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_InfoPng_cleanup(LodePNG_InfoPng*)
void LodePNG_InfoPng_cleanup(LodePNG_InfoPng* info)
{
  LodePNG_InfoColor_cleanup(&info->color);
#ifdef LODEPNG_COMPILE_ANCILLARY_CHUNKS
  LodePNG_Text_cleanup(&info->text);
  LodePNG_IText_cleanup(&info->itext);
#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
#ifdef LODEPNG_COMPILE_UNKNOWN_CHUNKS
  LodePNG_UnknownChunks_cleanup(&info->unknown_chunks);
#endif /*LODEPNG_COMPILE_UNKNOWN_CHUNKS*/
}

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x1f, %eax
cmpl $0x6, %edi
ja 0x1eab3
movl %edi, %ecx
leaq 0x12dae(%rip), %rdx     # 0x31818
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $-0x8, %esi
andl $-0x9, %esi
movl $0x25, %eax
cmovel %esi, %eax
jmp 0x1eab3
movl $0x25, %eax
cmpl $0x10, %esi
ja 0x1eab3
movl $0x10116, %ecx          # imm = 0x10116
btl %esi, %ecx
jae 0x1eab3
xorl %eax, %eax
jmp 0x1eab3
decl %esi
movl $0x25, %eax
cmpl $0x8, %esi
jae 0x1eab3
movl %esi, %eax
leaq 0x13150(%rip), %rcx     # 0x31c00
movl (%rcx,%rax,4), %eax
popq %rbp
retq