LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/pstuifzand[P]magento-tools/src/magento-helpers.cpp
// Function: find_code_pool(char const*)
CodePool find_code_pool(const char* filename) {
    int n         = strlen(filename);
    const char* p = filename;

    while (1) {
        if (strncmp("app/code/", p, 9) == 0) {
            p += 9;
            n -= 9;
            break;
        }
        while (n && *p != '/') { ++p; --n; }
        if (!n) break;
        ++p; --n;
    }
    if (strncmp("cor", p, 3) == 0) return CodePool::CORE;
    if (strncmp("com", p, 3) == 0) return CodePool::COMMUNITY;
    if (strncmp("loc", p, 3) == 0) return CodePool::LOCAL;
    return CodePool::ERROR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r12
callq 0x1090
leaq 0xce1(%rip), %r15       # 0x2004
pushq $0x9
popq %rbx
movq %r12, %r14
movl %eax, %ebp
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x10b0
testl %eax, %eax
je 0x1357
movl %ebp, %eax
movq %r14, %rcx
subl $0x1, %eax
jb 0x1355
leaq 0x1(%rcx), %r12
cmpb $0x2f, (%rcx)
movq %r12, %rcx
jne 0x1342
jmp 0x1326
movl %ebp, %ebx
movzbl (%r14,%rbx), %eax
leal -0x63(%rax), %ecx
negl %ecx
cmpl $0x63, %eax
jne 0x13a7
movzbl 0x1(%r14,%rbx), %edx
subl $0x6f, %edx
jne 0x137e
movzbl 0x2(%r14,%rbx), %esi
pushq $0x72
popq %rdx
subl %esi, %edx
jmp 0x1380
negl %edx
testl %edx, %edx
je 0x13a1
cmpl $0x63, %eax
jne 0x13a7
movzbl 0x1(%r14,%rbx), %ecx
subl $0x6f, %ecx
jne 0x13a5
movzbl 0x2(%r14,%rbx), %edx
pushq $0x6d
popq %rcx
subl %edx, %ecx
jmp 0x13a7
xorl %eax, %eax
jmp 0x13d8
negl %ecx
testl %ecx, %ecx
je 0x13d5
subl $0x6c, %eax
jne 0x13c8
movzbl 0x1(%r14,%rbx), %eax
subl $0x6f, %eax
jne 0x13c8
movzbl 0x2(%r14,%rbx), %ecx
pushq $0x63
popq %rax
subl %ecx, %eax
jmp 0x13ca
negl %eax
cmpl $0x1, %eax
pushq $0x3
popq %rax
sbbl $0x0, %eax
jmp 0x13d8
pushq $0x1
popq %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pstuifzand[P]magento-tools/src/magento-helpers.cpp
// Function: root_start_element_handler(void*, char const*, char const**)
void root_start_element_handler(void* udata, const XML_Char* name, const XML_Char** atts) {
    user_data* data = (user_data*)udata;

    switch (data->state) {
        case State::WAIT_FOR_SECTION: {
            if (strcmp("helpers", name) == 0) data->state = State::IN_HELPERS;
            if (strcmp("models", name) == 0) data->state = State::IN_MODELS;
            if (strcmp("blocks", name) == 0) data->state = State::IN_BLOCKS;
        } break;

        case State::IN_HELPERS:
        case State::IN_MODELS:
        case State::IN_BLOCKS: {
            // here is a tag with a variable name
            data->name.assign(name);
            data->state = start_element_next_state[int(data->state)];
        } break;

        case State::IN_HELPER:
        case State::IN_BLOCK:
        case State::IN_MODEL: {
            if (strcmp("class", name) == 0) data->state = start_element_next_state[int(data->state)];
        } break;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl (%rdi), %r15d
cmpq $0x9, %r15
ja 0x143c
movq %rsi, %r14
movq %rdi, %rbx
movl $0x124, %eax            # imm = 0x124
btl %r15d, %eax
jb 0x1420
movl $0x248, %eax            # imm = 0x248
btl %r15d, %eax
jae 0x1442
leaq 0xc12(%rip), %rdi       # 0x2024
movq %r14, %rsi
callq 0x1160
testl %eax, %eax
jne 0x143c
jmp 0x142f
leaq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x11d0
movslq (%rbx), %r15
leaq 0xc5a(%rip), %rax       # 0x2090
movl (%rax,%r15,4), %eax
movl %eax, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
cmpl $0x1, %r15d
jne 0x143c
leaq 0xbbf(%rip), %rdi       # 0x200e
movq %r14, %rsi
callq 0x1160
testl %eax, %eax
jne 0x1461
movl $0x2, (%rbx)
leaq 0xbae(%rip), %rdi       # 0x2016
movq %r14, %rsi
callq 0x1160
testl %eax, %eax
jne 0x147a
movl $0x5, (%rbx)
leaq 0xb9c(%rip), %rdi       # 0x201d
movq %r14, %rsi
callq 0x1160
testl %eax, %eax
jne 0x143c
pushq $0x8
popq %rax
jmp 0x143a
// File: /workspace/github_cpp_makefile_star2_O2/pstuifzand[P]magento-tools/src/magento-helpers.cpp
// Function: main
int main(int argc, char** argv)
{
    // remove program name
    argc--;
    argv++;

    // no arguments
    if (!argc) return 0;

    // create parser
    xml_parser parser;

    while (argc) {
        user_data data = { State::WAIT_FOR_SECTION };
        data.filename = *argv;

        XML_SetUserData(parser.handle(), &data);
        XML_SetElementHandler(parser.handle(), root_start_element_handler, root_end_element_handler);
        XML_SetCharacterDataHandler(parser.handle(), character_data_handler);

        data.pool = find_code_pool(data.filename);
        if (data.pool != CodePool::ERROR) {
            std::ifstream in{data.filename};
            if (in) parse_xml(parser, in, &data);
            parser.reset();
        } else {
            std::cout << "File skipped: " << data.filename << "\n";
        }

        argc--;
        argv++;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
cmpl $0x1, %edi
je 0x1849
movq %rsi, %rbx
movl %edi, %ebp
xorl %r13d, %r13d
xorl %edi, %edi
callq 0x1190
movq %rsp, %rcx
movq %rax, (%rcx)
movl %ebp, %ebp
pushq $0x1
popq %r14
leaq 0x8(%rsp), %r15
cmpl %r14d, %ebp
je 0x1841
movl $0x1, 0x8(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
andq $0x0, 0x18(%rsp)
movb %r13b, 0x20(%rsp)
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
andq $0x0, 0x38(%rsp)
movb %r13b, 0x40(%rsp)
andl $0x0, 0x58(%rsp)
movq (%rbx,%r14,8), %rax
movq %rax, 0x50(%rsp)
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x1050
movq (%rsp), %rdi
leaq -0x3a8(%rip), %rsi      # 0x13e1
leaq -0x2fe(%rip), %rdx      # 0x1492
callq 0x1100
movq (%rsp), %rdi
leaq -0x1b4(%rip), %rsi      # 0x15ec
callq 0x1130
movq 0x50(%rsp), %r12
movq %r12, %rdi
callq 0x130c
movl %eax, 0x58(%rsp)
cmpl $0x3, %eax
jne 0x17ec
movq 0x280e(%rip), %rdi      # 0x3fd0
leaq 0x878(%rip), %rsi       # 0x2041
callq 0x1110
movq 0x50(%rsp), %rsi
movq %rax, %rdi
callq 0x1110
movq %rax, %rdi
leaq 0x84e(%rip), %rsi       # 0x2033
callq 0x1110
jmp 0x1831
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
pushq $0x8
popq %rdx
callq 0x11c0
movq 0x60(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x80(%rsp,%rax)
jne 0x181f
movq %rsp, %rdi
leaq 0x60(%rsp), %rsi
movq %r15, %rdx
callq 0x160a
movq %rsp, %rdi
callq 0x188c
leaq 0x60(%rsp), %rdi
callq 0x1060
movq %r15, %rdi
callq 0x1896
incq %r14
jmp 0x1729
movq %rsp, %rdi
callq 0x18b0
xorl %eax, %eax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x186e
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x1060
jmp 0x1871
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1896
movq %rsp, %rdi
callq 0x18b0
movq %rbx, %rdi
callq 0x11a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./colour.hpp
// Function: angle_to_rgb(double)
png::rgb_pixel angle_to_rgb(double angle)
{
	// We convert the angle such that it becomes a number between 0 and 1.
	// Here, 0 means an angle of 0 radians, and 1 means an angle of 2 PI radians.

	double angle_ratio = (angle / M_PI) / 2; // [-0.5, 0.5]
	if (angle_ratio < 0) angle_ratio += 1; // [0, 1]

	// Now we multiply this `angle_ratio` by 6 and cast it to an int.
	// This will initialise `int angle_sector` to an integer between [0, 6].
	// The edge case `angle_sector == 6` will be handled by the switch below.

	int angle_sector = angle_ratio * 6; // [0, 6] (int)

	// We calculate how far the angle is from the `angle_sector` base.
	// We store this value into `int remaining_value` and multiply it by 255
	// to make it a pixel value.

	int remaining_value = ((angle_ratio * 6) - (double) angle_sector) * 255.0;

	// The switch will return the correct png::rgb_pixel

	switch (angle_sector) {
		case 0:
		default: // If the `angle_sector` is 6 (equivalent to 6 mod 6 == 0)
			return png::rgb_pixel(255, remaining_value, 0);
		case 1:
			return png::rgb_pixel(255 - remaining_value, 255, 0);
		case 2:
			return png::rgb_pixel(0, 255, remaining_value);
		case 3:
			return png::rgb_pixel(0, 255 - remaining_value, 255);
		case 4:
			return png::rgb_pixel(remaining_value, 0, 255);
		case 5:
			return png::rgb_pixel(255, 0, 255 - remaining_value);
	}
}

// Assembly:
divsd 0x3994(%rip), %xmm0     # 0x7008
mulsd 0x3994(%rip), %xmm0     # 0x7010
movsd 0x3994(%rip), %xmm1     # 0x7018
addsd %xmm0, %xmm1
xorpd %xmm2, %xmm2
movapd %xmm0, %xmm3
cmpltsd %xmm2, %xmm3
andpd %xmm3, %xmm1
andnpd %xmm0, %xmm3
orpd %xmm1, %xmm3
mulsd 0x3977(%rip), %xmm3     # 0x7020
cvttsd2si %xmm3, %edx
cvttpd2dq %xmm3, %xmm0
cvtdq2pd %xmm0, %xmm0
subsd %xmm0, %xmm3
mulsd 0x3967(%rip), %xmm3     # 0x7028
cvttsd2si %xmm3, %ecx
movb $-0x1, %al
decl %edx
cmpl $0x4, %edx
ja 0x3706
leaq 0x3983(%rip), %rsi      # 0x7058
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
notb %cl
movb $-0x1, %dl
xorl %esi, %esi
jmp 0x36fa
notb %cl
xorl %edx, %edx
jmp 0x3702
notb %cl
movb $-0x1, %sil
xorl %eax, %eax
jmp 0x3708
movb $-0x1, %sil
xorl %edx, %edx
movl %ecx, %eax
jmp 0x370a
movb $-0x1, %dl
xorl %eax, %eax
movl %ecx, %esi
jmp 0x370a
xorl %esi, %esi
movl %ecx, %edx
movzbl %sil, %ecx
shll $0x10, %ecx
movzbl %dl, %edx
shll $0x8, %edx
orl %ecx, %edx
movzbl %al, %eax
orl %edx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./colour.hpp
// Function: force_to_rgb(Vector<2, double>)
png::rgb_pixel force_to_rgb(Vector<2> force)
{
	// Get the angle and the length of the vector

	double angle = force.angle();

	// Calculate the corresponding hue

	png::rgb_pixel pixel = angle_to_rgb(angle);

	// Calculate the normalised force

	double normalised_force = tanh(force.length() * 20.0);

	// Set the lightness

	int inverse_red = 255 - pixel.red;
	int inverse_green = 255 - pixel.green;
	int inverse_blue = 255 - pixel.blue;

	pixel.red += inverse_red * normalised_force * 0.85;
	pixel.green += inverse_green * normalised_force * 0.85;
	pixel.blue += inverse_blue * normalised_force * 0.85;

	return pixel;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsp, %r14
movsd %xmm0, (%r14)
movsd %xmm1, 0x8(%r14)
movq %r14, %rdi
callq 0x4718
callq 0x366c
movl %eax, %ebx
movl %eax, %r13d
notl %r13d
movl %eax, %ebp
andl $0xffffff, %ebp         # imm = 0xFFFFFF
movl %ebp, %r15d
shrl $0x8, %r15d
movl %r15d, %r12d
notl %r12d
shrl $0x10, %ebp
movapd (%r14), %xmm0
mulpd %xmm0, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
sqrtsd %xmm1, %xmm0
mulsd 0x38a7(%rip), %xmm0     # 0x7030
callq 0x3090
movl $0xff, %ecx
andl %ecx, %r13d
andl %ecx, %r12d
movl %ebp, %edx
xorl %ecx, %edx
cvtsi2sd %r13d, %xmm1
mulsd %xmm0, %xmm1
andl %ecx, %ebx
cvtsi2sd %ebx, %xmm2
movsd 0x3884(%rip), %xmm3     # 0x7038
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %eax
cvtsi2sd %r12d, %xmm1
mulsd %xmm0, %xmm1
andl %ecx, %r15d
cvtsi2sd %r15d, %xmm2
mulsd %xmm3, %xmm1
addsd %xmm2, %xmm1
cvttsd2si %xmm1, %esi
cvtsi2sd %edx, %xmm1
mulsd %xmm0, %xmm1
cvtsi2sd %ebp, %xmm0
mulsd %xmm3, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
shll $0x10, %edx
andl %ecx, %esi
shll $0x8, %esi
orl %edx, %esi
andl %ecx, %eax
orl %esi, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./mass.hpp
// Function: get_masses_from_user_input()
void get_masses_from_user_input()
{
	int number_of_masses;
	cin >> number_of_masses;

	for (int i = 0; i < number_of_masses; i++) {
		int x, y, weight;
		cin >> x >> y >> weight;

		Mass mass(x, y, weight);
		masses.push_back(mass);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x77b9(%rip), %rdi      # 0xafe0
leaq 0xc(%rsp), %rsi
callq 0x3190
xorl %ebx, %ebx
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %r15
movq %rsp, %r12
leaq 0x10(%rsp), %r13
leaq 0x7a44(%rip), %rbp      # 0xb290
cmpl 0xc(%rsp), %ebx
jge 0x3899
movq 0x7787(%rip), %rdi      # 0xafe0
movq %r14, %rsi
callq 0x3190
movq %rax, %rdi
movq %r15, %rsi
callq 0x3190
movq %rax, %rdi
movq %r12, %rsi
callq 0x3190
movl 0x8(%rsp), %esi
movl 0x4(%rsp), %edx
movl (%rsp), %ecx
movq %r13, %rdi
callq 0x472c
movq %rbp, %rdi
movq %r13, %rsi
callq 0x476a
incl %ebx
jmp 0x384c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./forces.hpp
// Function: calculate_resulting_force(Vector<2, double>)
Vector<2> calculate_resulting_force(Vector<2> pixel_position)
{
	Vector<2> resulting_force;

	// For each mass ...

	for (int i = 0; i < masses.size(); i++) {
		// ... we calculate the vector from the pixel to the mass ...

		Vector<2> pixel_to_mass = masses[i].position - pixel_position;

		// ... and we calculate the angle and the inverse distance of this vector ...

		double angle = pixel_to_mass.angle();
		double inverse_distance = masses[i].weight / pixel_to_mass.length();

		// ... with these we construct a normalised `Vector<2> force_vector`,
		// which we multiply by the scalar `double inverse_distance` ...

		Vector<2> force_vector = Vector<2>::from_angle(angle) * inverse_distance;

		// ... and add the current `force_vector` to the `resulting_force`.

		resulting_force += force_vector;
	}

	return resulting_force;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movsd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x10(%rsp)
xorl %r12d, %r12d
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4790
pushq $0x18
popq %r13
movq %rsp, %r14
leaq 0x38(%rsp), %r15
xorl %ebp, %ebp
movq 0x79ad(%rip), %rax      # 0xb298
movq 0x799e(%rip), %rdi      # 0xb290
subq %rdi, %rax
cqto
idivq %r13
cmpq %rbp, %rax
jbe 0x39ab
addq %r12, %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x47c4
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
movq %r14, %rdi
callq 0x4718
movq 0x795f(%rip), %rax      # 0xb290
cvtsi2sdl 0x10(%rax,%r12), %xmm2
movsd %xmm0, 0x20(%rsp)
movapd (%rsp), %xmm3
mulpd %xmm3, %xmm3
movapd %xmm3, %xmm1
unpckhpd %xmm3, %xmm1            # xmm1 = xmm1[1],xmm3[1]
addsd %xmm3, %xmm1
sqrtsd %xmm1, %xmm1
divsd %xmm1, %xmm2
movsd %xmm2, 0x30(%rsp)
callq 0x3460
movsd %xmm0, 0x28(%rsp)
movsd 0x20(%rsp), %xmm0
callq 0x3070
movsd 0x28(%rsp), %xmm1
movsd %xmm1, 0x38(%rsp)
movsd %xmm0, 0x40(%rsp)
movq %r15, %rdi
movsd 0x30(%rsp), %xmm0
callq 0x481e
movq %rbx, %rdi
callq 0x4874
incq %rbp
addq $0x18, %r12
jmp 0x38e4
movsd 0x48(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./rendering.hpp
// Function: render_pixel(Vector<2, double>)
void render_pixel(Vector<2> pixel_position)
{
	// Calculate the angle of the resulting force at this position ...

	Vector<2> resulting_force = calculate_resulting_force(pixel_position);
	double angle = resulting_force.angle();

	// ... and set the pixel in the image to the corresponding hue

	image[pixel_position[1]][pixel_position[0]] = angle_to_rgb(angle);
}

// Assembly:
subq $0x38, %rsp
movaps %xmm1, (%rsp)
movaps %xmm0, 0x10(%rsp)
callq 0x38a8
leaq 0x28(%rsp), %rdi
movsd %xmm0, (%rdi)
movsd %xmm1, 0x8(%rdi)
callq 0x4718
callq 0x366c
movsd 0x3648(%rip), %xmm0     # 0x7040
movapd (%rsp), %xmm1
cvttsd2si %xmm1, %rcx
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %rdx
movq %rcx, %rsi
sarq $0x3f, %rsi
andq %rdx, %rsi
orq %rcx, %rsi
movq 0x78f1(%rip), %rcx      # 0xb310
imulq $0x18, %rsi, %rdx
movapd 0x10(%rsp), %xmm1
cvttsd2si %xmm1, %rsi
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %rdi
movq %rsi, %r8
sarq $0x3f, %r8
andq %rdi, %r8
orq %rsi, %r8
movq (%rcx,%rdx), %rcx
leaq (%r8,%r8,2), %rdx
movw %ax, (%rcx,%rdx)
shrl $0x10, %eax
movb %al, 0x2(%rcx,%rdx)
addq $0x38, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./rendering.hpp
// Function: render_rows(int, int)
void render_rows(int start_row, int increment)
{
	// Render each pixel of the given rows

	Vector<2> current_position;

	// Start `int y` at the `start_row` and increment it by `increment` each time

	for (int y = start_row; y < HEIGHT; y += increment) {
		current_position[1] = y;

		for (int x = 0; x < WIDTH; x++) {
			current_position[0] = x;

			// Render the current pixel

			render_pixel(current_position);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %esi, %ebx
movl %edi, %ebp
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4790
cmpl $0x438, %ebp            # imm = 0x438
jge 0x3ac9
cvtsi2sd %ebp, %xmm0
movsd %xmm0, 0x18(%rsp)
xorpd %xmm0, %xmm0
movl $0x780, %r14d           # imm = 0x780
subl $0x1, %r14d
jb 0x3ac5
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm1
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
callq 0x39c6
movsd 0x8(%rsp), %xmm0
addsd 0x3555(%rip), %xmm0     # 0x7018
jmp 0x3a92
addl %ebx, %ebp
jmp 0x3a76
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./rendering.hpp
// Function: render_image(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, RenderingMode)
void render_image(string file_name, RenderingMode rendering_mode)
{
	// If we're doing multithreading ...

	if (rendering_mode == MULTI_THREADED) {
		// ... store the threads in an array, ...

		thread thread_pool[number_of_threads];

		// ... start each thread ...

		for (int i = 0; i < number_of_threads; i++) {
			thread_pool[i] = thread(render_rows, i, number_of_threads);
		}

		// ... and wait until all threads finished.

		for (int i = 0; i < number_of_threads; i++) {
			thread_pool[i].join();
		}
	} else {
		// Else, let the main thread render the whole image

		render_rows(0, 1);
	}

	// Write the image

	image.write(file_name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
cmpl $0x1, %esi
jne 0x3b7c
movq %rbx, -0x40(%rbp)
movq %rsp, -0x38(%rbp)
movl 0x77aa(%rip), %r15d     # 0xb2a8
movq %rsp, %rbx
leaq 0xf(,%r15,8), %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
testq %r15, %r15
je 0x3b2a
leaq (,%r15,8), %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3170
xorl %ecx, %ecx
leaq 0x7775(%rip), %r12      # 0xb2a8
leaq -0x48(%rbp), %r13
leaq -0x2c(%rbp), %r14
movl %ecx, -0x2c(%rbp)
movl 0x7764(%rip), %eax      # 0xb2a8
cmpl %eax, %ecx
jge 0x3b88
movq %r13, %rdi
leaq -0xf6(%rip), %rsi       # 0x3a5c
movq %r14, %rdx
movq %r12, %rcx
callq 0x4908
movslq -0x2c(%rbp), %rax
leaq (%rbx,%rax,8), %rdi
movq %r13, %rsi
callq 0x4986
movq %r13, %rdi
callq 0x49a0
movl -0x2c(%rbp), %ecx
incl %ecx
jmp 0x3b3b
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x3a5c
jmp 0x3bd0
xorl %r12d, %r12d
movq %rbx, %r14
cltq
cmpq %rax, %r12
jge 0x3bac
movq %r14, %rdi
callq 0x33e0
incq %r12
movl 0x7702(%rip), %eax      # 0xb2a8
addq $0x8, %r14
jmp 0x3b8e
testq %r15, %r15
je 0x3bc8
addq $-0x8, %rbx
shlq $0x3, %r15
leaq (%rbx,%r15), %rdi
callq 0x49a0
addq $-0x8, %r15
jne 0x3bb9
movq -0x38(%rbp), %rsp
movq -0x40(%rbp), %rbx
leaq 0x76d9(%rip), %rdi      # 0xb2b0
movq %rbx, %rsi
callq 0x49ae
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3bf0
movq %rax, %r14
testq %r15, %r15
je 0x3c0f
addq $-0x8, %rbx
shlq $0x3, %r15
leaq (%rbx,%r15), %rdi
callq 0x49a0
addq $-0x8, %r15
jne 0x3c00
movq %r14, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./motion.hpp
// Function: motion::render_image_from_user_input()
void render_image_from_user_input()
	{
		// Get the masses from stdin

		get_masses_from_user_input();

		// Render the image

		render_image("output/1.png", MULTI_THREADED);
	}

// Assembly:
pushq %rbx
subq $0x30, %rsp
callq 0x3812
leaq 0x2b06(%rip), %rsi      # 0x7188
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x4c08
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x3ad2
leaq 0x10(%rsp), %rdi
callq 0x3120
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3120
movq %rbx, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/index.cpp
// Function: main
int main()
{
	// Store the current timestamp to measure the execution time

	auto start = chrono::high_resolution_clock::now();

	// Replace this function with what you want to render
	// Some example functions are written in `motion.hpp`

	motion::four_body();

	// Print the execution time

	auto stop = chrono::high_resolution_clock::now();
	auto duration = chrono::duration_cast<chrono::milliseconds>(stop - start);

	cout << "Total execution time: " << duration.count() << " ms\n";
}

// Assembly:
pushq %rbx
callq 0x3040
movq %rax, %rbx
callq 0x4208
callq 0x3040
subq %rbx, %rax
movl $0xf4240, %ecx          # imm = 0xF4240
cqto
idivq %rcx
movq %rax, %rbx
movq 0x68e2(%rip), %rdi      # 0xafd0
leaq 0x2aa0(%rip), %rsi      # 0x7195
callq 0x3260
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3240
leaq 0x2aa0(%rip), %rsi      # 0x71ac
movq %rax, %rdi
callq 0x3260
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/linear_algebra.hpp
// Function: Vector<2, double>::Vector(std::initializer_list<double>)
Vector(initializer_list<number_type> initial_values = {})
		{
			if (initial_values.size() > 0) {
				if (initial_values.size() != size) throw WRONG_DIMENSION;
				copy(initial_values.begin(), initial_values.end(), values);
			} else {
				for (int i = 0; i < size; i++) {
					values[i] = 0;
				}
			}
		}

// Assembly:
testq %rdx, %rdx
je 0x47a0
cmpq $0x2, %rdx
jne 0x47a7
movups (%rsi), %xmm0
jmp 0x47a3
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
retq
pushq %rax
pushq $0x4
popq %rdi
callq 0x3140
andl $0x0, (%rax)
leaq 0x6506(%rip), %rsi      # 0xacc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/linear_algebra.hpp
// Function: Vector<2, double>::operator-(Vector<2, double>)
Vector<size, number_type> operator-(Vector<size, number_type> other_vector)
		{
			Vector<size, number_type> new_vector;

			for (int i = 0; i < size; i++) {
				new_vector.values[i] = values[i] - other_vector.values[i];
			}

			return new_vector;
		}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x20(%rsp)
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4790
cmpq $0x2, %r14
je 0x480a
movsd (%rbx,%r14,8), %xmm0
subsd 0x18(%rsp,%r14,8), %xmm0
movsd %xmm0, 0x8(%rsp,%r14,8)
incq %r14
jmp 0x47eb
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/linear_algebra.hpp
// Function: Vector<2, double>::operator*(double)
Vector<size, number_type> operator*(number_type scalar)
		{
			Vector<size, number_type> new_vector;

			for (int i = 0; i < size; i++) {
				new_vector.values[i] = values[i] * scalar;
			}

			return new_vector;
		}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movsd %xmm0, (%rsp)
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4790
movsd (%rsp), %xmm1
cmpq $0x2, %r14
je 0x485f
movsd (%rbx,%r14,8), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp,%r14,8)
incq %r14
jmp 0x4843
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/linear_algebra.hpp
// Function: Matrix<2, 2, double>::Matrix(std::initializer_list<std::initializer_list<double>>)
Matrix(initializer_list<initializer_list<number_type>> initial_rows = {})
		{
			if (initial_rows.size() > 0) {
				if (initial_rows.size() != rows) throw WRONG_DIMENSION;

				int row = 0;

				for (auto initial_columns : initial_rows) {
					if (initial_columns.size() != columns) {
						throw WRONG_DIMENSION;
					} else {
						copy(initial_columns.begin(), initial_columns.end(), values[row]);
					}

					row++;
				}
			} else {
				for (int y = 0; y < rows; y++) {
					for (int x = 0; x < columns; x++) {
						values[y][x] = 0;
					}
				}
			}
		}

// Assembly:
pushq %rax
testq %rdx, %rdx
je 0x49e3
cmpq $0x2, %rdx
jne 0x4a10
xorl %eax, %eax
cmpq $0x20, %rax
je 0x4a0e
cmpq $0x2, 0x8(%rsi,%rax)
jne 0x4a10
movq (%rsi,%rax), %rcx
movups (%rcx), %xmm0
movups %xmm0, (%rdi,%rax)
addq $0x10, %rax
jmp 0x49c4
movq %rdx, %rax
shlq $0x4, %rax
addq %rax, %rdi
cmpq $0x2, %rdx
je 0x4a0e
xorl %eax, %eax
cmpq $0x2, %rax
je 0x4a05
andq $0x0, (%rdi,%rax,8)
incq %rax
jmp 0x49f5
incq %rdx
addq $0x10, %rdi
jmp 0x49ed
popq %rax
retq
pushq $0x4
popq %rdi
callq 0x3140
andl $0x0, (%rax)
leaq 0x629e(%rip), %rsi      # 0xacc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/linear_algebra.hpp
// Function: Vector<2, double> Matrix<2, 2, double>::operator*<2>(Vector<2, double>)
Vector<dimension, number_type> operator*(Vector<dimension, number_type> vector)
		{
			if (dimension != columns) throw WRONG_DIMENSION;

			Vector<dimension> output_vector;

			for (int i = 0; i < rows; i++) {
				for (int j = 0; j < dimension; j++) {
					output_vector[i] += values[i][j] * vector[j];
				}
			}

			return output_vector;
		}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movsd %xmm0, 0x18(%rsp)
movsd %xmm1, 0x20(%rsp)
xorl %r14d, %r14d
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4790
cmpq $0x2, %r14
je 0x4b04
movsd 0x8(%rsp,%r14,8), %xmm0
xorl %eax, %eax
cmpq $0x2, %rax
je 0x4af4
movsd (%rbx,%rax,8), %xmm1
mulsd 0x18(%rsp,%rax,8), %xmm1
addsd %xmm1, %xmm0
incq %rax
jmp 0x4ada
movsd %xmm0, 0x8(%rsp,%r14,8)
incq %r14
addq $0x10, %rbx
jmp 0x4acb
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/png++-0.2.9/pixel_buffer.hpp
// Function: png::basic_pixel_buffer<png::basic_rgb_pixel<unsigned char>, std::vector<png::basic_rgb_pixel<unsigned char>, std::allocator<png::basic_rgb_pixel<unsigned char>>>, png::row_traits<std::vector<png::basic_rgb_pixel<unsigned char>, std::allocator<png::basic_rgb_pixel<unsigned char>>>>>::resize(unsigned int, unsigned int)
void resize(uint_32 width, uint_32 height)
        {
            m_width = width;
            m_height = height;
            m_rows.resize(height);
            for (typename row_vec::iterator r = m_rows.begin();
                 r != m_rows.end();
                 ++r)
            {
                r->resize(width);
            }
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
addq $0x8, %rdi
movl %edx, %esi
callq 0x5114
movq 0x8(%rbx), %r14
movl %ebp, %r15d
cmpq 0x10(%rbx), %r14
je 0x5108
movq %r14, %rdi
movq %r15, %rsi
callq 0x514a
addq $0x18, %r14
jmp 0x50f1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/png++-0.2.9/image.hpp
// Function: png::image<png::basic_rgb_pixel<unsigned char>, png::pixel_buffer<png::basic_rgb_pixel<unsigned char>>>::write(char const*)
void write(char const* filename)
        {
            std::ofstream stream(filename, std::ios::binary);
            if (!stream.is_open())
            {
                throw std_error(filename);
            }
            stream.exceptions(std::ios::badbit);
            write_stream(stream);
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %r15
pushq $0x4
popq %rdx
movq %r15, %rdi
callq 0x32a0
leaq 0x98(%rsp), %rdi
callq 0x3080
testb %al, %al
je 0x5615
movq 0x28(%rsp), %rax
addq -0x18(%rax), %r15
pushq $0x1
popq %rsi
movq %r15, %rdi
callq 0x30c0
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x5744
leaq 0x28(%rsp), %rdi
callq 0x3350
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x3140
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x4c08
callq 0x3030
movl (%rax), %edx
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5698
xorl %ebp, %ebp
leaq 0x56be(%rip), %rsi      # 0xad10
movq 0x596f(%rip), %rdx      # 0xafc8
movq %rbx, %rdi
callq 0x33f0
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x3120
testb %bpl, %bpl
jne 0x5678
jmp 0x5685
movq %rax, %r14
movq %rbx, %rdi
callq 0x31d0
jmp 0x5685
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x3350
movq %r14, %rdi
callq 0x3420
nop
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/png++-0.2.9/generator.hpp
// Function: void png::generator<png::basic_rgb_pixel<unsigned char>, png::image<png::basic_rgb_pixel<unsigned char>, png::pixel_buffer<png::basic_rgb_pixel<unsigned char>>>::pixel_generator, png::image_info_ref_holder, true>::write<std::basic_ofstream<char, std::char_traits<char>>>(std::basic_ofstream<char, std::char_traits<char>>&)
void write(ostream& stream)
        {
            writer< ostream > wr(stream);
            wr.set_image_info(this->get_info());
            wr.write_info();

#if __BYTE_ORDER == __LITTLE_ENDIAN
            if (pixel_traits< pixel >::get_bit_depth() == 16)
            {
#ifdef PNG_WRITE_SWAP_SUPPORTED
                wr.set_swap();
#else
                throw error("Cannot write 16-bit image: recompile with PNG_WRITE_SWAP_SUPPORTED.");
#endif
            }
#endif

            size_t pass_count;
            if (this->get_info().get_interlace_type() != interlace_none)
            {
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
                if (interlacing_supported)
                {
                    pass_count = wr.set_interlace_handling();
                }
                else
                {
                    throw std::logic_error("Cannot write interlaced image: generator does not support it.");
                }
#else
                throw error("Cannot write interlaced image: interlace handling disabled.");
#endif
            }
            else
            {
                pass_count = 1;
            }
            pixgen* pixel_gen = static_cast< pixgen* >(this);
            for (size_t pass = 0; pass < pass_count; ++pass)
            {
                pixel_gen->reset(pass);

                for (uint_32 pos = 0; pos < this->get_info().get_height(); ++pos)
                {
                    wr.write_row(pixel_gen->get_next_row(pos));
                }
            }

            wr.write_end_info();
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x592c
movq (%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x5ec0
movq %rsp, %rdi
callq 0x598e
movq (%rbx), %rax
cmpl $0x0, 0x10(%rax)
je 0x58b5
movq (%rsp), %rdi
callq 0x33d0
movslq %eax, %r12
jmp 0x58b9
pushq $0x1
popq %r12
xorl %r13d, %r13d
movq %rsp, %r14
cmpq %r12, %r13
je 0x58f2
xorl %r15d, %r15d
movq (%rbx), %rax
movl 0x4(%rax), %eax
cmpq %rax, %r15
jae 0x58ed
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5a94
movq %r14, %rdi
movq %rax, %rsi
callq 0x5a10
incq %r15
jmp 0x58c7
incq %r13
jmp 0x58bf
movq %rsp, %rdi
callq 0x5aac
movq %rsp, %rdi
callq 0x5b2e
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x5919
jmp 0x5919
jmp 0x5919
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5b2e
movq %rbx, %rdi
callq 0x3420
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/png++-0.2.9/writer.hpp
// Function: png::writer<std::basic_ofstream<char, std::char_traits<char>>>::write_data(png_struct_def*, unsigned char*, unsigned long)
static void write_data(png_struct* png, byte* data, png_size_t length)
        {
            io_base* io = static_cast< io_base* >(png_get_error_ptr(png));
            writer* wr = static_cast< writer* >(io);
            wr->reset_error();
            ostream* stream = reinterpret_cast< ostream* >(png_get_io_ptr(png));
            try
            {
                stream->write(reinterpret_cast< char* >(data), length);
                if (!stream->good())
                {
                    wr->set_error("ostream::write() failed");
                }
            }
            catch (std::exception const& error)
            {
                wr->set_error(error.what());
            }
            catch (...)
            {
                assert(!"caught something wrong");
                wr->set_error("write_data: caught something wrong");
            }
            if (wr->is_error())
            {
                wr->raise_error();
            }
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
callq 0x3470
movq %rax, %rbx
andq $0x0, 0x98(%rax)
movq 0x90(%rax), %rax
movb $0x0, (%rax)
movq %r14, %rdi
callq 0x3250
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3300
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
je 0x5c4f
movq %rbx, %rdi
addq $0x90, %rdi
leaq 0x161d(%rip), %rsi      # 0x7267
callq 0x3490
cmpq $0x0, 0x98(%rbx)
je 0x5c6c
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5e70
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rdx, %r14
movq %rax, %rdi
callq 0x3100
cmpl $0x2, %r14d
jne 0x5ca4
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5e3e
callq 0x33b0
jmp 0x5c4f
leaq 0x15d4(%rip), %rdi      # 0x727f
leaq 0x15e7(%rip), %rsi      # 0x7299
leaq 0x15fd(%rip), %rcx      # 0x72b6
movl $0x9e, %edx
callq 0x31a0
movq %rax, %rbx
callq 0x33b0
movq %rbx, %rdi
callq 0x3420
movq %rax, %rdi
callq 0x4c7f
nop
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/png++-0.2.9/writer.hpp
// Function: png::writer<std::basic_ofstream<char, std::char_traits<char>>>::flush_data(png_struct_def*)
static void flush_data(png_struct* png)
        {
            io_base* io = static_cast< io_base* >(png_get_error_ptr(png));
            writer* wr = static_cast< writer* >(io);
            wr->reset_error();
            ostream* stream = reinterpret_cast< ostream* >(png_get_io_ptr(png));
            try
            {
                stream->flush();
                if (!stream->good())
                {
                    wr->set_error("ostream::flush() failed");
                }
            }
            catch (std::exception const& error)
            {
                wr->set_error(error.what());
            }
            catch (...)
            {
                assert(!"caught something wrong");
                wr->set_error("flush_data: caught something wrong");
            }
            if (wr->is_error())
            {
                wr->raise_error();
            }
        }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x3470
movq %rax, %rbx
andq $0x0, 0x98(%rax)
movq 0x90(%rax), %rax
movb $0x0, (%rax)
movq %r14, %rdi
callq 0x3250
movq %rax, %r14
movq %rax, %rdi
callq 0x31b0
movq (%r14), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r14,%rax)
je 0x5d35
movq %rbx, %rdi
addq $0x90, %rdi
leaq 0x160d(%rip), %rsi      # 0x733d
callq 0x3490
cmpq $0x0, 0x98(%rbx)
je 0x5d4e
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5e70
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rdx, %r14
movq %rax, %rdi
callq 0x3100
cmpl $0x2, %r14d
jne 0x5d82
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5e3e
callq 0x33b0
jmp 0x5d35
leaq 0x14f6(%rip), %rdi      # 0x727f
leaq 0x1509(%rip), %rsi      # 0x7299
leaq 0x15be(%rip), %rcx      # 0x7355
movl $0xbb, %edx
callq 0x31a0
movq %rax, %rbx
callq 0x33b0
movq %rbx, %rdi
callq 0x3420
movq %rax, %rdi
callq 0x4c7f
nop
// File: /workspace/github_cpp_makefile_star2_O2/iannisdezwart[P]forcefield-visualiser/./lib/png++-0.2.9/info.hpp
// Function: png::info::write() const
void write() const
        {
            assert(m_png);
            assert(m_info);

            sync_ihdr();
            if (m_color_type == color_type_palette)
            {
                if (! m_palette.empty())
                {
                    png_set_PLTE(m_png, m_info,
                                 const_cast< color* >(& m_palette[0]),
                                 (int) m_palette.size());
                }
                if (! m_tRNS.empty())
                {
#ifdef PNG_tRNS_SUPPORTED
                    png_set_tRNS(m_png, m_info,
                                 const_cast< byte* >(& m_tRNS[0]),
                                 m_tRNS.size(),
                                 NULL);
#else
                    throw error("attempted to write tRNS chunk; recompile with PNG_tRNS_SUPPORTED");
#endif
                }
            }

            if (m_gamma > 0)
            {
#ifdef PNG_gAMA_SUPPORTED
#ifdef PNG_FLOATING_POINT_SUPPORTED
                png_set_gAMA(m_png, m_info, m_gamma);
#else
                png_set_gAMA_fixed(m_png, m_info,
                                   (png_fixed_point)(m_gamma * 100000));
#endif
#else
                throw error("attempted to write gAMA chunk; recompile with PNG_gAMA_SUPPORTED");
#endif
            }

            png_write_info(m_png, m_info);
        }

// Assembly:
pushq %rbx
cmpq $0x0, 0x8(%rdi)
je 0x6242
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
je 0x625b
movq %rbx, %rdi
callq 0x628e
cmpl $0x3, 0x24(%rbx)
jne 0x6218
movq 0x38(%rbx), %rcx
movq 0x40(%rbx), %rax
cmpq %rax, %rcx
je 0x61f9
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
subq %rcx, %rax
pushq $0x3
popq %r8
cqto
idivq %r8
movq %rcx, %rdx
movl %eax, %ecx
callq 0x30d0
movq 0x50(%rbx), %rdx
movq 0x58(%rbx), %rcx
cmpq %rcx, %rdx
je 0x6218
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
subl %edx, %ecx
xorl %r8d, %r8d
callq 0x3210
movsd 0x68(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x6234
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x3430
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
popq %rbx
jmp 0x3180
leaq 0x1181(%rip), %rdi      # 0x73ca
leaq 0x11cd(%rip), %rsi      # 0x741d
leaq 0x11e1(%rip), %rcx      # 0x7438
pushq $0x76
jmp 0x6272
leaq 0x11f4(%rip), %rdi      # 0x7456
leaq 0x11b4(%rip), %rsi      # 0x741d
leaq 0x11c8(%rip), %rcx      # 0x7438
pushq $0x77
popq %rdx
callq 0x31a0
// File: /workspace/github_cpp_makefile_star2_O2/rilutham[P]gotojakarta/go-to-jakarta.cpp
// Function: PathSearchNode::GetSuccessors(AStarSearch<PathSearchNode>*, PathSearchNode*)
bool PathSearchNode::GetSuccessors( AStarSearch<PathSearchNode> *astarsearch, PathSearchNode *parent_node )
{
  PathSearchNode NewNode;
  for(int c=0; c<MAX_CITIES; c++)
  {
    if(WestJavaMap[city][c] < 0) continue;
    NewNode = PathSearchNode((ENUM_CITIES)c);
    astarsearch->AddSuccessor( NewNode );
  }
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4d87(%rip), %r12      # 0x6120
xorl %r13d, %r13d
xorps %xmm0, %xmm0
leaq -0x2c(%rbp), %r15
cmpq $0x15, %r13
je 0x13d2
movl (%r14), %eax
imulq $0x54, %rax, %rax
ucomiss (%r12,%rax), %xmm0
ja 0x13c9
movl %r13d, -0x2c(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1a04
xorps %xmm0, %xmm0
incq %r13
addq $0x4, %r12
jmp 0x13a3
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/rilutham[P]gotojakarta/./stlastar.h
// Function: AStarSearch<PathSearchNode>::AddSuccessor(PathSearchNode&)
bool AddSuccessor( UserState &State )
	{
		Node *node = AllocateNode();

		if( node )
		{
			node->m_UserState = State;

			m_Successors.push_back( node );

			return true;
		}

		return false;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %r14
callq 0x2006
movq %rax, %rbx
movq %rax, -0x20(%rbp)
testq %rax, %rax
je 0x1a3b
movl (%r15), %eax
movl %eax, 0x1c(%rbx)
addq $0x30, %r14
leaq -0x20(%rbp), %rsi
movq %r14, %rdi
callq 0x2034
testq %rbx, %rbx
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rilutham[P]gotojakarta/./stlastar.h
// Function: AStarSearch<PathSearchNode>::SetStartAndGoalStates(PathSearchNode&, PathSearchNode&)
void SetStartAndGoalStates( UserState &Start, UserState &Goal )
	{
		m_CancelRequest = false;

		m_Start = AllocateNode();
		m_Goal = AllocateNode();

		assert((m_Start != NULL && m_Goal != NULL));
		
		m_Start->m_UserState = Start;
		m_Goal->m_UserState = Goal;

		m_State = SEARCH_STATE_SEARCHING;
		
		// Initialise the AStar specific parts of the Start Node
		// The user only needs fill out the state information

		m_Start->g = 0; 
		m_Start->h = m_Start->m_UserState.GoalDistanceEstimate( m_Goal->m_UserState );
		m_Start->f = m_Start->g + m_Start->h;
		m_Start->parent = 0;

		// Push the start node on the Open list

		m_OpenList.push_back( m_Start ); // heap now unsorted

		// Sort back element into heap
		push_heap( m_OpenList.begin(), m_OpenList.end(), HeapCompare_f() );

		// Initialise counter for search steps
		m_Steps = 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movb $0x0, 0x9c(%rdi)
callq 0x2006
movq %rax, 0x50(%rbx)
movq %rbx, %rdi
callq 0x2006
movq %rax, 0x58(%rbx)
testq %rax, %rax
je 0x1b65
movq 0x50(%rbx), %rcx
testq %rcx, %rcx
je 0x1b65
leaq 0x50(%rbx), %r12
leaq 0x1c(%rcx), %rdi
movl (%r15), %edx
movl %edx, 0x1c(%rcx)
movl (%r14), %edx
movl %edx, 0x1c(%rax)
movl $0x1, 0x48(%rbx)
andl $0x0, 0x10(%rcx)
callq 0x131a
movq 0x50(%rbx), %rax
movss %xmm0, 0x14(%rax)
addss 0x10(%rax), %xmm0
movss %xmm0, 0x18(%rax)
andq $0x0, (%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2034
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x2258
andl $0x0, 0x4c(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16ff(%rip), %rdi      # 0x326b
leaq 0x171c(%rip), %rsi      # 0x328f
leaq 0x1722(%rip), %rcx      # 0x329c
movl $0x9d, %edx
callq 0x10c0
// File: /workspace/github_cpp_makefile_star2_O2/rilutham[P]gotojakarta/./stlastar.h
// Function: AStarSearch<PathSearchNode>::AllocateNode()
Node *AllocateNode()
	{

#if !USE_FSA_MEMORY
		Node *p = new Node;
		return p;
#else
		Node *address = m_FixedSizeAllocator.alloc();

		if( !address )
		{
			return NULL;
		}
		m_AllocateNodeCount ++;
		Node *p = new (address) Node;
		return p;
#endif
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
addq $0x68, %rdi
callq 0x2058
testq %rax, %rax
je 0x202d
incl 0x98(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rilutham[P]gotojakarta/./fsa.h
// Function: FixedSizeAllocator<AStarSearch<PathSearchNode>::Node>::FixedSizeAllocator(unsigned int)
FixedSizeAllocator( unsigned int MaxElements = FSA_DEFAULT_SIZE ) :
	m_pFirstUsed( NULL ),
	m_MaxElements( MaxElements )
	{
		// Allocate enough memory for the maximum number of elements

		char *pMem = new char[ m_MaxElements * sizeof(FSA_ELEMENT) ];

		m_pMemory = (FSA_ELEMENT *) pMem; 

		// Set the free list first pointer
		m_pFirstFree = m_pMemory;

		// Clear the memory
		memset( m_pMemory, 0, sizeof( FSA_ELEMENT ) * m_MaxElements );

		// Point at first element
		FSA_ELEMENT *pElement = m_pFirstFree;

		// Set the double linked free list
		for( unsigned int i=0; i<m_MaxElements; i++ )
		{
			pElement->pPrev = pElement-1;
			pElement->pNext = pElement+1;

			pElement++;
		}

		// first element should have a null prev
		m_pFirstFree->pPrev = NULL;
		// last element should have a null next
		(pElement-1)->pNext = NULL;

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
andq $0x0, 0x8(%rdi)
movl %esi, %ebx
movl %esi, 0x10(%rdi)
movl %esi, %eax
imulq $0x30, %rax, %r12
movq %r12, %rdi
callq 0x1030
movq %rax, %r14
movq %rax, 0x18(%r15)
movq %rax, (%r15)
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x10b0
movq %r14, %rax
addq $0x30, %rax
subl $0x1, %ebx
jb 0x2245
leaq -0x60(%rax), %rcx
movq %rcx, -0x10(%rax)
movq %rax, -0x8(%rax)
jmp 0x222e
andq $0x0, 0x20(%r14)
andq $0x0, -0x38(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/rilutham[P]gotojakarta/./stlastar.h
// Function: AStarSearch<PathSearchNode>::FreeAllNodes()
void FreeAllNodes()
	{
		// iterate open list and delete all nodes
		typename vector< Node * >::iterator iterOpen = m_OpenList.begin();

		while( iterOpen != m_OpenList.end() )
		{
			Node *n = (*iterOpen);
			FreeNode( n );

			iterOpen ++;
		}

		m_OpenList.clear();

		// iterate closed list and delete unused nodes
		typename vector< Node * >::iterator iterClosed;

		for( iterClosed = m_ClosedList.begin(); iterClosed != m_ClosedList.end(); iterClosed ++ )
		{
			Node *n = (*iterClosed);
			FreeNode( n );
		}

		m_ClosedList.clear();

		// delete the goal

		FreeNode(m_Goal);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
cmpq 0x8(%rbx), %r14
je 0x22e0
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x234e
addq $0x8, %r14
jmp 0x22c9
movq (%rbx), %rax
cmpq %rax, %r14
je 0x22ec
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %r14
cmpq 0x20(%rbx), %r14
je 0x2307
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x234e
addq $0x8, %r14
jmp 0x22f0
movq 0x18(%rbx), %rax
cmpq %rax, %r14
je 0x2314
movq %rax, 0x20(%rbx)
movq 0x58(%rbx), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x234e
// File: /workspace/github_cpp_makefile_star2_O2/rilutham[P]gotojakarta/./stlastar.h
// Function: AStarSearch<PathSearchNode>::FreeUnusedNodes()
void FreeUnusedNodes()
	{
		// iterate open list and delete unused nodes
		typename vector< Node * >::iterator iterOpen = m_OpenList.begin();

		while( iterOpen != m_OpenList.end() )
		{
			Node *n = (*iterOpen);

			if( !n->child )
			{
				FreeNode( n );

				n = NULL;
			}

			iterOpen ++;
		}

		m_OpenList.clear();

		// iterate closed list and delete unused nodes
		typename vector< Node * >::iterator iterClosed;

		for( iterClosed = m_ClosedList.begin(); iterClosed != m_ClosedList.end(); iterClosed ++ )
		{
			Node *n = (*iterClosed);

			if( !n->child )
			{
				FreeNode( n );
				n = NULL;

			}
		}

		m_ClosedList.clear();

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %r14
cmpq 0x8(%rbx), %r14
je 0x238d
movq (%r14), %rsi
cmpq $0x0, 0x8(%rsi)
jne 0x2387
movq %rbx, %rdi
callq 0x234e
addq $0x8, %r14
jmp 0x236f
movq (%rbx), %rax
cmpq %rax, %r14
je 0x2399
movq %rax, 0x8(%rbx)
movq 0x18(%rbx), %r14
cmpq 0x20(%rbx), %r14
je 0x23bb
movq (%r14), %rsi
cmpq $0x0, 0x8(%rsi)
jne 0x23b5
movq %rbx, %rdi
callq 0x234e
addq $0x8, %r14
jmp 0x239d
movq 0x18(%rbx), %rax
cmpq %rax, %r14
je 0x23c8
movq %rax, 0x20(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/tsfn[P]doc2txt/src/main.cpp
// Function: main
int main(int argc, char **argv) {
  if (argc != 4) {
    printf("usage: %s <doc file> <text file> <image directory>\n", argv[0]);
    return 1;
  }

  if (!parse_doc(argv[1], argv[2], argv[3])) {
    printf("error\n");
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x4, %edi
jne 0x12ff
movq 0x8(%rsi), %rdi
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rdx
movq %rax, %rsi
callq 0x1c78
xorl %ebx, %ebx
testb %al, %al
jne 0x1313
leaq 0x1d40(%rip), %rdi      # 0x3038
callq 0x11a0
jmp 0x1313
movq (%rsi), %rsi
leaq 0x1cfb(%rip), %rdi      # 0x3004
xorl %eax, %eax
callq 0x1040
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq