LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x38, %rsp
movq %rsi, %r14
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rbx
movaps %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
leaq 0x13350(%rip), %rsi     # 0x22526
movq %r14, %rdi
callq 0xf7ee
movq %rax, %rdi
movq %rbx, %rsi
callq 0xeefc
leaq -0x30(%rbp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
andq $0x0, 0x10(%r15)
leaq 0x1330b(%rip), %rsi     # 0x2250b
movq %r14, %rdi
callq 0xf7ee
movq %rax, %rdi
movq %r15, %rsi
callq 0xeefc
pushq $0x30
popq %rdi
callq 0x42a0
movaps (%rbx), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rbx), %rcx
movq %rcx, 0x10(%rax)
movaps (%r15), %xmm0
movups %xmm0, 0x18(%rax)
movq 0x10(%r15), %rcx
movq %rcx, 0x28(%rax)
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x20(%rbp), %rdi
movl $0x190, %esi            # imm = 0x190
movl $0x190, %edx            # imm = 0x190
callq 0xf8ac
movq 0x1e8df(%rip), %rdi     # 0x2dfd0
leaq 0x12f64(%rip), %rsi     # 0x2265c
callq 0x4280
movq %rax, %rdi
callq 0x4120
movq (%r14), %rdi
leaq -0x20(%rbp), %rsi
callq 0x181a2
movq 0x1e8b8(%rip), %rdi     # 0x2dfd0
leaq 0x12f48(%rip), %rsi     # 0x22667
callq 0x4280
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4280
leaq 0x12f2d(%rip), %rsi     # 0x22663
movq %rax, %rdi
callq 0x4280
movq %rax, %rdi
callq 0x4120
leaq -0x20(%rbp), %rdi
movq %rbx, %rsi
callq 0xfde4
movq 0x1e877(%rip), %rdi     # 0x2dfd0
leaq 0x12f19(%rip), %rsi     # 0x22679
callq 0x4280
movq %rax, %rdi
callq 0x4120
leaq -0x20(%rbp), %rdi
callq 0xf8bc
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rdi
callq 0xf8bc
movq %rbx, %rdi
callq 0x4530
// File: /workspace/github_cpp_makefile_star2_O2/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, -0x40(%rbp)
cmpq $0x0, 0x48(%rdi)
je 0xf9b1
movq %rdi, %rbx
leaq -0x30(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1a5ce
leaq -0x60(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1a66a
movq %r12, %rdi
movq %r13, %rsi
callq 0x18fd3
movl %eax, %r14d
movq %r13, %rdi
callq 0x18dac
testb %r14b, %r14b
je 0xf990
leaq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
andq $0x0, -0x58(%rbp)
movb $0x0, -0x50(%rbp)
movq %r12, %rdi
callq 0x18ee0
movq %rax, %rdi
movq %r13, %rsi
callq 0x1a80a
movb $0x1, %r15b
testb %al, %al
je 0xf976
movq -0x40(%rbp), %rdi
movq %r13, %rsi
callq 0xfa67
testb %al, %al
je 0xf976
movq %r12, %rdi
callq 0x18f38
movq %rax, -0x38(%rbp)
xorl %r15d, %r15d
movq %r13, %rdi
callq 0x45d8
testb %r15b, %r15b
je 0xf990
movq %r12, %rdi
callq 0x18dc4
jmp 0xf906
leaq -0x30(%rbp), %rdi
callq 0x18dac
testb %r14b, %r14b
je 0xf9cd
movq -0x38(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x30
popq %rdi
callq 0x4130
movq %rax, %r14
movq %rax, %rdi
callq 0xfa3c
leaq 0x1dca5(%rip), %rsi     # 0x2d670
jmp 0xf9ec
pushq $0x30
popq %rdi
callq 0x4130
movq %rax, %r14
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movq %rax, %rdi
callq 0xfa94
leaq 0x1dc9c(%rip), %rsi     # 0x2d688
leaq 0x1df(%rip), %rdx       # 0xfbd2
movq %r14, %rdi
callq 0x44f0
jmp 0xf9fd
movq %rax, %rbx
movq %r14, %rdi
callq 0x4210
jmp 0xfa34
jmp 0xfa1a
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x18dac
jmp 0xfa2b
movq %rax, %rbx
jmp 0xfa2b
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x45d8
leaq -0x30(%rbp), %rdi
callq 0x18dac
movq %rbx, %rdi
callq 0x4530
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movsd 0x10(%rdi), %xmm0
movsd 0x18(%rdi), %xmm1
subsd (%rsi), %xmm0
subsd 0x8(%rsi), %xmm1
movq %rdx, %r14
movsd 0x20(%rdi), %xmm2
subsd 0x10(%rsi), %xmm2
leaq -0x30(%rbp), %rsi
movsd %xmm0, (%rsi)
movsd %xmm1, 0x8(%rsi)
movsd %xmm2, 0x10(%rsi)
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0xfcd4
movsd (%r15), %xmm1
movsd 0x8(%r15), %xmm0
mulsd 0x20(%rbx), %xmm0
mulsd 0x18(%rbx), %xmm1
addsd %xmm0, %xmm1
movsd 0x10(%r15), %xmm0
mulsd 0x28(%rbx), %xmm0
addsd %xmm1, %xmm0
ucomisd 0x12a76(%rip), %xmm0    # 0x22710
jbe 0xfca9
movabsq $0x408f400000000000, %rax # imm = 0x408F400000000000
movq %rax, (%r14)
ucomisd 0x12a5f(%rip), %xmm0    # 0x22710
seta %al
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xfd8e
callq 0x43b0
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %edx
imull %esi, %edx
testl %edx, %edx
jle 0xfdcc
movl %edx, %eax
imulq $0x18, %rax, %r15
movq %r15, %rdi
callq 0x4040
movq %rax, %r14
leaq -0x18(%r15), %rax
pushq $0x18
popq %rcx
xorl %edx, %edx
divq %rcx
negq %rdx
addq %r15, %rdx
addq $-0x18, %rdx
addq $0x18, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x4160
jmp 0xfdcf
xorl %r14d, %r14d
movq %r14, (%rbx)
testq %r14, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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)
andq $0x0, 0x10(%rdi)
movl 0x8(%rbx), %eax
imull 0xc(%rbx), %eax
shll $0x2, %eax
movslq %eax, %rsi
callq 0x100e8
movq -0x30(%rbp), %rax
movq (%rbx), %rcx
movsd 0x12909(%rip), %xmm0    # 0x22730
cmpq -0x28(%rbp), %rax
je 0xfe69
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
jmp 0xfe27
leaq -0x50(%rbp), %rdi
leaq -0x11(%rbp), %rdx
movq %r14, %rsi
callq 0xee22
movl 0x8(%rbx), %edx
movl 0xc(%rbx), %ecx
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
pushq $0x6
popq %r8
pushq $0x8
popq %r9
callq 0x16347
leaq -0x50(%rbp), %rdi
callq 0x45d8
leaq -0x30(%rbp), %rdi
callq 0x1011a
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x45d8
jmp 0xfec2
jmp 0xfebf
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x1011a
movq %rbx, %rdi
callq 0x4530
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x10c18
leaq (,%rbx,8), %r15
movq (%r14), %rdi
movq %r15, %rsi
callq 0x44d0
testq %rax, %rax
je 0x10c2a
movq %r15, 0x10(%r14)
movq %rax, (%r14)
movq %rbx, 0x8(%r14)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x10c1f
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
shrl $0x18, %esi
callq 0x11607
movl %ebx, %esi
shrl $0x10, %esi
movl $0xff, %r15d
andl %r15d, %esi
movq %r14, %rdi
callq 0x11607
movl %ebx, %esi
shrl $0x8, %esi
andl %r15d, %esi
movq %r14, %rdi
callq 0x11607
andl %r15d, %ebx
movq %r14, %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11607
// File: /workspace/github_cpp_makefile_star2_O2/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:
cmpq $0x2, %rcx
jae 0x11647
pushq $0x35
popq %rax
retq
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
movq %rdi, %r13
movzbl (%rdx), %esi
movl %esi, %eax
shll $0x8, %eax
movzbl 0x1(%rdx), %ecx
orl %ecx, %eax
movw $0x1f, %di
xorl %edx, %edx
divw %di
testw %dx, %dx
je 0x11687
pushq $0x18
jmp 0x11717
movl %esi, %eax
andl $0xf, %eax
cmpl $0x8, %eax
setne %al
testb %sil, %sil
sets %dl
orb %al, %dl
je 0x116a0
pushq $0x19
jmp 0x11717
testb $0x20, %cl
jne 0x11715
movq %r8, %r15
movq (%r13), %rax
movq (%r12), %rcx
leaq -0x40(%rbp), %rdi
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
pushq $0x2
popq %rcx
movq %r14, %rsi
movq %rbx, %rdx
callq 0x10310
leaq -0x40(%rbp), %rdx
movq (%rdx), %rcx
movq %rcx, (%r13)
movq 0x8(%rdx), %r13
movq %r13, (%r12)
testl %eax, %eax
jne 0x11718
xorl %eax, %eax
cmpl $0x0, (%r15)
jne 0x11718
movq %rcx, %r15
leaq (%r14,%rbx), %rdi
addq $-0x4, %rdi
callq 0x11633
movl %eax, %ebx
movq %r15, %rdi
movl %r13d, %esi
callq 0x11727
xorl %ecx, %ecx
cmpl %ebx, %eax
pushq $0x3a
popq %rax
cmovel %ecx, %eax
jmp 0x11718
pushq $0x1a
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodeZlib_compress(unsigned char**, unsigned long*, unsigned char const*, unsigned long, LodeZlib_DeflateSettings const*)
unsigned LodeZlib_compress(unsigned char** out, size_t* outsize, const unsigned char* in, size_t insize, const LodeZlib_DeflateSettings* 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 deflatedata, outv;
  size_t i;
  unsigned error;
  
  unsigned ADLER32;
  /*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_init_buffer(&outv, *out, *outsize); /*ucvector-controlled version of the output buffer, for dynamic array*/
  
  ucvector_push_back(&outv, (unsigned char)(CMFFLG / 256));
  ucvector_push_back(&outv, (unsigned char)(CMFFLG % 256));
  
  ucvector_init(&deflatedata);
  error = LodeFlate_deflate(&deflatedata, in, insize, settings);
  
  if(!error)
  {
    ADLER32 = adler32(in, (unsigned)insize);
    for(i = 0; i < deflatedata.size; i++) ucvector_push_back(&outv, deflatedata.data[i]);
    ucvector_cleanup(&deflatedata);
    LodeZlib_add32bitInt(&outv, ADLER32);
  }
  
  *out = outv.data;
  *outsize = outv.size;
  
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, -0x30(%rbp)
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r12
movq (%rdi), %rax
movq (%rsi), %rcx
leaq -0x58(%rbp), %rbx
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movq %rcx, 0x10(%rbx)
pushq $0x78
popq %rsi
movq %rbx, %rdi
callq 0x11607
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %r15, %rbx
callq 0x11607
xorps %xmm0, %xmm0
leaq -0x70(%rbp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %r13, %rsi
movq %r15, %rdx
movq -0x30(%rbp), %rcx
callq 0x10c2e
movl %eax, %r15d
testl %eax, %eax
jne 0x11852
movq %r12, -0x40(%rbp)
movq %r14, -0x30(%rbp)
movq %r13, %rdi
movl %ebx, %esi
callq 0x11727
movl %eax, -0x34(%rbp)
movq -0x70(%rbp), %rbx
movq -0x68(%rbp), %r12
xorl %r14d, %r14d
leaq -0x58(%rbp), %r13
cmpq %r12, %r14
jae 0x11835
movzbl (%rbx,%r14), %esi
movq %r13, %rdi
callq 0x11607
incq %r14
jmp 0x1181e
leaq -0x70(%rbp), %rdi
callq 0x11873
leaq -0x58(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x115b6
movq -0x30(%rbp), %r14
movq -0x40(%rbp), %r12
movq -0x58(%rbp), %rax
movq %rax, (%r12)
movq -0x50(%rbp), %rax
movq %rax, (%r14)
movl %r15d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x118c0
movl %eax, %r14d
leal 0x8(%r14), %edi
addq %rbx, %rdi
callq 0x118c0
movl %eax, %r15d
addq $0x4, %rbx
addl $0x4, %r14d
movq %rbx, %rdi
movq %r14, %rsi
callq 0x119c9
xorl %ecx, %ecx
cmpl %eax, %r15d
setne %cl
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, -0x30(%rbp)
movq %rdx, %rdi
callq 0x118c0
movl %eax, %r14d
addl $0xc, %r14d
movq (%r15), %r13
movq %r13, %r12
addq %r14, %r12
jae 0x11aed
pushq $0x4d
popq %rax
jmp 0x11b29
movq -0x30(%rbp), %rax
movq (%rax), %rdi
movq %r12, %rsi
callq 0x44d0
testq %rax, %rax
je 0x11b24
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
movq %r12, (%r15)
addq %rax, %r13
xorl %eax, %eax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x11b29
movb (%rbx,%rcx), %dl
movb %dl, (%r13,%rcx)
incq %rcx
jmp 0x11b12
movl $0x26c9, %eax           # imm = 0x26C9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movl %edx, %r14d
leaq 0xc(%r14), %rbx
addq (%rsi), %rbx
setb %al
movq %rdx, -0x38(%rbp)
addl $0xc, %edx
cmpq %rdx, %rbx
setb %dl
orb %al, %dl
je 0x11b6f
pushq $0x4d
popq %rax
jmp 0x11c09
movq %r8, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %rcx, -0x30(%rbp)
movq (%rdi), %rdi
movq %rbx, %rsi
callq 0x44d0
testq %rax, %rax
je 0x11c04
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), %rdx
movb (%rdx), %cl
movb %cl, -0x8(%rax,%rbx)
movb 0x1(%rdx), %cl
movb %cl, -0x7(%rax,%rbx)
movb 0x2(%rdx), %cl
movb %cl, -0x6(%rax,%rbx)
movb 0x3(%rdx), %cl
movb %cl, -0x5(%rax,%rbx)
negq %r14
pushq $0x8
popq %rax
leaq (%r14,%rax), %rcx
cmpq $0x8, %rcx
je 0x11bfb
movb -0x8(%r15,%rax), %cl
movl %eax, %edx
movb %cl, (%rdi,%rdx)
incq %rax
jmp 0x11be2
callq 0x11a53
xorl %eax, %eax
jmp 0x11c09
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_O2/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_InfoColor_addPalette(LodePNG_InfoColor*, unsigned char, unsigned char, unsigned char, unsigned char)
unsigned LodePNG_InfoColor_addPalette(LodePNG_InfoColor* info, unsigned char r, unsigned char g, unsigned char b, unsigned char a)
{
  unsigned char* data;
  /*the same resize technique as C++ std::vectors is used, and here it's made so that for a palette with the max of 256 colors, it'll have the exact alloc size*/
  if(!(info->palettesize & (info->palettesize - 1))) /*if palettesize is 0 or a power of two*/
  {
    /*allocated data must be at least 4* palettesize (for 4 color bytes)*/
    size_t alloc_size = info->palettesize == 0 ? 4 : info->palettesize * 4 * 2;
    data = (unsigned char*)realloc(info->palette, alloc_size);
    if(!data) return 9931;
    else info->palette = data;
  }
  info->palette[4 * info->palettesize + 0] = r;
  info->palette[4 * info->palettesize + 1] = g;
  info->palette[4 * info->palettesize + 2] = b;
  info->palette[4 * info->palettesize + 3] = a;
  info->palettesize++;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %r14
movq 0x10(%rdi), %rcx
leaq -0x1(%rcx), %rax
testq %rax, %rcx
jne 0x11cb2
leaq (,%rcx,8), %rax
testq %rcx, %rcx
pushq $0x4
popq %rsi
cmovneq %rax, %rsi
movq 0x8(%r14), %rdi
callq 0x44d0
testq %rax, %rax
je 0x11cf5
movq %rax, 0x8(%r14)
movq 0x10(%r14), %rcx
jmp 0x11cb6
movq 0x8(%r14), %rax
movb %r13b, (%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %r12b, 0x1(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %r15b, 0x2(%rax,%rcx,4)
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
movb %bl, 0x3(%rax,%rcx,4)
incq 0x10(%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x26cb, %eax           # imm = 0x26CB
jmp 0x11ce6
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x11d9d
xorl %ebx, %ebx
xorl %r13d, %r13d
cmpq $0x3, %r13
je 0x11e36
movq 0x18(%r14,%r13,8), %r12
movq %r12, 0x18(%r15,%r13,8)
movq %r12, %rdi
callq 0x43f0
movq %rax, (%r15,%r13,8)
testq %rax, %rax
sete %al
testq %r12, %r12
setne %cl
testb %cl, %al
jne 0x11e31
xorl %eax, %eax
cmpq %r12, %rax
jae 0x11e2c
movq (%r14,%r13,8), %rcx
movb (%rcx,%rax), %cl
movq (%r15,%r13,8), %rdx
movb %cl, (%rdx,%rax)
incq %rax
movq 0x18(%r14,%r13,8), %r12
jmp 0x11e0f
incq %r13
jmp 0x11de1
movl $0x26cc, %ebx           # imm = 0x26CC
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
cmpq (%rbx), %r15
jae 0x11e9b
addq %r14, %rdi
callq 0x11fe2
movq 0x10(%rbx), %rdi
addq %r14, %rdi
callq 0x11fe2
incq %r15
addq $0x8, %r14
jmp 0x11e75
callq 0x4350
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4350
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rsi, %rbx
movq %rdi, %r14
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq (%rbx), %r12
jae 0x11efc
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
movq (%rax,%r12,8), %rsi
movq (%rcx,%r12,8), %rdx
movq %r14, %rdi
callq 0x11f08
incq %r12
testl %eax, %eax
je 0x11ed5
movl %eax, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdi), %rax
movq 0x8(%rdi), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x44d0
movq %rax, %r12
movq (%r14), %rax
movq 0x10(%r14), %rdi
leaq 0x8(,%rax,8), %rsi
callq 0x44d0
movq %rax, %r13
testq %r12, %r12
setne %al
testq %r13, %r13
setne %cl
testb %cl, %al
je 0x11fbe
movq (%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%r14)
movq %r12, 0x8(%r14)
movq %r13, 0x10(%r14)
leaq (%r12,%rax,8), %rdi
callq 0x11ffe
movq (%r14), %rax
movq 0x8(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq %r15, %rsi
callq 0x1200e
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
callq 0x11ffe
movq (%r14), %rax
movq 0x10(%r14), %rcx
leaq (%rcx,%rax,8), %rdi
addq $-0x8, %rdi
movq %rbx, %rsi
callq 0x1200e
xorl %eax, %eax
jmp 0x11fd3
movq %r12, %rdi
callq 0x4350
movq %r13, %rdi
callq 0x4350
movl $0x26cd, %eax           # imm = 0x26CD
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x8(%rbx), %rdi
cmpq (%rbx), %r15
jae 0x120c8
addq %r14, %rdi
callq 0x11fe2
movq 0x10(%rbx), %rdi
addq %r14, %rdi
callq 0x11fe2
movq 0x18(%rbx), %rdi
addq %r14, %rdi
callq 0x11fe2
movq 0x20(%rbx), %rdi
addq %r14, %rdi
callq 0x11fe2
incq %r15
addq $0x8, %r14
jmp 0x1208a
callq 0x4350
movq 0x10(%rbx), %rdi
callq 0x4350
movq 0x18(%rbx), %rdi
callq 0x4350
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4350
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
andq $0x0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
xorl %r15d, %r15d
xorl %r12d, %r12d
cmpq (%rbx), %r12
jae 0x1214f
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 0x1215b
incq %r12
testl %eax, %eax
je 0x12118
movl %eax, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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)
andl $0x0, (%rdi)
movups %xmm0, 0x30(%rdi)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x18(%rdi)
movups %xmm0, 0x20(%rdi)
andl $0x0, 0xa0(%rdi)
leaq 0xb0(%rdi), %rax
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x60(%rdi)
movups %xmm0, 0x70(%rdi)
movups %xmm0, 0x80(%rdi)
movb $0x0, 0x90(%rdi)
movq %rax, %rdi
popq %rbp
jmp 0x11d72
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movq %rdi, %rbx
addq $0x18, %rdi
callq 0x11c40
leaq 0x50(%rbx), %rdi
callq 0x11e62
leaq 0x68(%rbx), %rdi
callq 0x12077
addq $0xb0, %rbx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x11d9d
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1234f
movl $0xe0, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4240
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 0x1242f
testl %eax, %eax
jne 0x123fb
leaq 0x50(%r14), %rdi
leaq 0x50(%rbx), %rsi
callq 0x11eb3
testl %eax, %eax
jne 0x123fb
leaq 0x68(%r14), %rdi
leaq 0x68(%rbx), %rsi
callq 0x120f2
testl %eax, %eax
je 0x12406
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0xb0, %r15d
addq %r15, %r14
movq %r14, %rdi
callq 0x11d72
addq %r15, %rbx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11dc3
// File: /workspace/github_cpp_makefile_star2_O2/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
callq 0x11c40
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movq 0x10(%rbx), %r15
leaq (,%r15,4), %rdi
callq 0x43f0
movq %rax, 0x8(%r14)
testq %rax, %rax
sete %cl
testq %r15, %r15
setne %dl
movl $0x26cf, %eax           # imm = 0x26CF
testb %cl, %dl
jne 0x124aa
xorl %eax, %eax
xorl %ecx, %ecx
shlq $0x2, %r15
cmpq %r15, %rcx
jae 0x124aa
movq 0x8(%rbx), %rdx
movb (%rdx,%rcx), %dl
movq 0x8(%r14), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
movq 0x10(%rbx), %r15
jmp 0x1248a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x11c40
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, (%r14)
movups %xmm0, 0x8(%r14)
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x1242f
// File: /workspace/github_cpp_makefile_star2_O2/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 0x12f5e
movl %edi, %ecx
leaq 0xf905(%rip), %rdx      # 0x22818
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
addl $-0x8, %esi
andl $-0x9, %esi
movl $0x25, %eax
cmovel %esi, %eax
jmp 0x12f5e
movl $0x25, %eax
cmpl $0x10, %esi
ja 0x12f5e
movl $0x10116, %ecx          # imm = 0x10116
btl %esi, %ecx
jae 0x12f5e
xorl %eax, %eax
jmp 0x12f5e
decl %esi
cmpl $0x8, %esi
jae 0x12f59
movl %esi, %eax
leaq 0xfcc8(%rip), %rcx      # 0x22c1c
movl (%rcx,%rax,4), %eax
jmp 0x12f5e
movl $0x25, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_decode32(unsigned char**, unsigned int*, unsigned int*, unsigned char const*, unsigned long)
unsigned LodePNG_decode32(unsigned char** out, unsigned* w, unsigned* h, const unsigned char* in, size_t insize)
{
  unsigned error;
  size_t dummy_size;
  LodePNG_Decoder decoder;
  LodePNG_Decoder_init(&decoder);
  LodePNG_decode(&decoder, out, &dummy_size, in, insize);
  error = decoder.error;
  *w = decoder.infoPng.width;
  *h = decoder.infoPng.height;
  LodePNG_Decoder_cleanup(&decoder);
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, -0x30(%rbp)
movq %rsi, %r12
movq %rdi, %r13
leaq -0x160(%rbp), %r15
movq %r15, %rdi
callq 0x1428a
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rcx
movq %rbx, %r8
callq 0x12f60
movl 0x40(%r15), %eax
movl 0x120(%r15), %ebx
movl %eax, (%r12)
movl 0x44(%r15), %eax
movq -0x30(%rbp), %rcx
movl %eax, (%rcx)
movq %r15, %rdi
callq 0x142dc
movl %ebx, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_Decoder_init(LodePNG_Decoder*)
void LodePNG_Decoder_init(LodePNG_Decoder* decoder)
{
  LodePNG_DecodeSettings_init(&decoder->settings);
  LodePNG_InfoRaw_init(&decoder->infoRaw);
  LodePNG_InfoPng_init(&decoder->infoPng);
  decoder->error = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x8(%rdi)
andl $0x0, 0x10(%rdi)
andq $0x0, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x18(%rdi)
movups %xmm0, 0x20(%rdi)
addq $0x40, %rdi
callq 0x122f6
movl $0x1, 0x120(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_decode32f(unsigned char**, unsigned int*, unsigned int*, char const*)
unsigned LodePNG_decode32f(unsigned char** out, unsigned* w, unsigned* h, const char* filename)
{
  unsigned char* buffer;
  size_t buffersize;
  unsigned error;
  error = LodePNG_loadFile(&buffer, &buffersize, filename);
  if(!error) error = LodePNG_decode32(out, w, h, buffer, buffersize);
  free(buffer);
  return error;
}

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

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

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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
andq $0x0, (%rdi)
movq %rsi, %r14
andq $0x0, (%rsi)
leaq 0xe839(%rip), %rsi      # 0x22bc5
movq %rdx, %rdi
callq 0x4340
testq %rax, %rax
je 0x1440e
movq %rax, %r15
xorl %r13d, %r13d
pushq $0x2
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x4310
movq %r15, %rdi
callq 0x4030
movq %rax, %r12
movq %r15, %rdi
callq 0x4070
andq $0x0, (%r14)
movq %r12, %rdi
callq 0x43f0
movq %rax, (%rbx)
testq %r12, %r12
sete %cl
testq %rax, %rax
sete %dl
orb %cl, %dl
jne 0x143f2
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r12, %rdx
movq %r15, %rcx
callq 0x4450
movq %rax, (%r14)
movq %r15, %rdi
callq 0x4290
cmpq $0x0, (%rbx)
pushq $0x50
popq %rax
cmovnel %r13d, %eax
testq %r12, %r12
cmovel %r13d, %eax
jmp 0x14411
pushq $0x4e
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/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: LodePNG_Decoder_copy(LodePNG_Decoder*, LodePNG_Decoder const*)
void LodePNG_Decoder_copy(LodePNG_Decoder* dest, const LodePNG_Decoder* source)
{
  LodePNG_Decoder_cleanup(dest);
  *dest = *source;
  LodePNG_InfoRaw_init(&dest->infoRaw);
  LodePNG_InfoPng_init(&dest->infoPng);
  dest->error = LodePNG_InfoRaw_copy(&dest->infoRaw, &source->infoRaw); if(dest->error) return;
  dest->error = LodePNG_InfoPng_copy(&dest->infoPng, &source->infoPng); if(dest->error) return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0x142dc
movl $0x128, %edx            # imm = 0x128
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4240
leaq 0x18(%rbx), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
movabsq $0x800000006, %rax      # imm = 0x800000006
movq %rax, 0x18(%rbx)
movups %xmm0, 0x20(%rbx)
leaq 0x40(%rbx), %r15
movq %r15, %rdi
callq 0x122f6
leaq 0x18(%r14), %rsi
movq %r12, %rdi
callq 0x12538
movl %eax, 0x120(%rbx)
testl %eax, %eax
jne 0x144b6
addq $0x40, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x12388
movl %eax, 0x120(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: addUnknownChunks(ucvector*, unsigned char*, unsigned long)
static unsigned addUnknownChunks(ucvector* out, unsigned char* data, size_t datasize)
{
  unsigned char* inchunk = data;
  while((size_t)(inchunk - data) < datasize)
  {
    unsigned error = LodePNG_append_chunk(&out->data, &out->size, inchunk);
    if(error) return error; /*error: not enough memory*/
    out->allocsize = out->size; /*fix the allocsize again*/
    inchunk = LodePNG_chunk_next(inchunk);
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rdi), %r12
movq %rsi, %r13
movq %r13, %rax
subq %r14, %rax
cmpq %rbx, %rax
jae 0x15555
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x11ab6
testl %eax, %eax
jne 0x15557
movq 0x8(%r15), %rax
movq %rax, 0x10(%r15)
movq %r13, %rdi
callq 0x11a80
movq %rax, %r13
jmp 0x15523
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/mhe[P]raytracerframework_cpp/lodepng.cpp
// Function: isPaletteFullyOpaque(unsigned char const*, unsigned long)
static unsigned isPaletteFullyOpaque(const unsigned char* palette, size_t palettesize) /*palette given in format RGBARGBARGBARGBA...*/
{
  size_t i;
  for(i = 0; i < palettesize; i++)
  {
    if(palette[4 * i + 3] != 255) return 0;
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %ecx, %ecx
movl $0x1, %eax
cmpq %rcx, %rsi
je 0x15606
cmpb $-0x1, 0x3(%rdi,%rcx,4)
leaq 0x1(%rcx), %rcx
je 0x155f4
xorl %eax, %eax
popq %rbp
retq