LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::find_surf_norm(Ray&, double)
Eigen::Vector3d WaveObject::find_surf_norm(Ray &ray, double t_value){
    double epsilon = .5;
    Eigen::Vector3d loc = ray.get_ray_loc(t_value);
    double offset_one = 0;
    double offset_two = 0;
    find_offsets(loc, offset_one, offset_two);

    Eigen::Vector3d intersect_point = wave_function(offset_one, offset_two);
    Eigen::Vector3d point_one = wave_function(offset_one + epsilon, offset_two);
    Eigen::Vector3d point_two = wave_function(offset_one, offset_two + epsilon);

    Eigen::Vector3d dir_one = point_one - intersect_point;
    Eigen::Vector3d dir_two = point_two - intersect_point;

    return -1 * (dir_one.cross(dir_two)).normalized();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x118(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0x17db0
leaq 0x20(%rsp), %r12
andq $0x0, (%r12)
leaq 0x18(%rsp), %r13
andq $0x0, (%r13)
movups (%r15), %xmm0
leaq 0x70(%rsp), %rsi
movaps %xmm0, (%rsi)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rsi)
movq %r14, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x14a9c
movsd (%r12), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%r13), %xmm1
movsd %xmm1, (%rsp)
leaq 0x100(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x14b0a
movsd 0x8(%rsp), %xmm0
addsd 0x75b5(%rip), %xmm0     # 0x1be58
leaq 0xe8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movsd (%rsp), %xmm1
callq 0x14b0a
movsd (%rsp), %xmm1
addsd 0x7590(%rip), %xmm1     # 0x1be58
leaq 0xd0(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x14b0a
leaq 0x28(%rsp), %r14
movq %r12, (%r14)
movq %r15, 0x8(%r14)
leaq 0xb8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x5a62
movq %r13, (%r14)
movq %r15, 0x8(%r14)
leaq 0xa0(%rsp), %r15
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x5a62
leaq 0x14(%rsp), %r14
orl $-0x1, (%r14)
movsd (%r15), %xmm0
movsd (%r12), %xmm1
movupd 0x8(%r12), %xmm2
movupd 0x8(%r15), %xmm3
movapd %xmm2, %xmm4
shufpd $0x1, %xmm1, %xmm4      # xmm4 = xmm4[1],xmm1[0]
mulpd %xmm3, %xmm4
mulsd %xmm3, %xmm1
shufpd $0x1, %xmm0, %xmm3      # xmm3 = xmm3[1],xmm0[0]
mulpd %xmm2, %xmm3
subpd %xmm4, %xmm3
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm1
leaq 0x50(%rsp), %rsi
movapd %xmm3, (%rsi)
movsd %xmm1, 0x10(%rsi)
leaq 0x88(%rsp), %r15
movq %r15, %rdi
callq 0x5304
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x62ea
movq %rbx, %rdi
movq %r12, %rsi
callq 0xcf88
movq %rbx, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::is_above_wave(Eigen::Matrix<double, 3, 1, 0, 3, 1>)
bool WaveObject::is_above_wave(Eigen::Vector3d loc){
    // Return true if loc is in the positive direction along the surface normal from the corresponding place on the wave
    double offset_one = 0;
    double offset_two = 0;
    find_offsets(loc, offset_one, offset_two);

    Eigen::Vector3d wave_location = wave_function(offset_one, offset_two);
    Eigen::Vector3d wave_p_norm = wave_location + surface_normal;
    Eigen::Vector3d wave_n_norm = wave_location - surface_normal;
    // norm() returns the magnitude of the vector
    double p_diff = (loc - wave_p_norm).norm();
    double n_diff = (loc - wave_n_norm).norm();
    return p_diff < n_diff;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsp), %r15
andq $0x0, (%r15)
leaq 0x20(%rsp), %r12
andq $0x0, (%r12)
movups (%rsi), %xmm0
leaq 0x30(%rsp), %rsi
movaps %xmm0, (%rsi)
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rsi)
movq %r15, %rdx
movq %r12, %rcx
callq 0x14a9c
movsd (%r15), %xmm0
movsd (%r12), %xmm1
leaq 0x80(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x14b0a
addq $0x240, %r14            # imm = 0x240
leaq 0x50(%rsp), %r12
movq %r15, (%r12)
movq %r14, 0x8(%r12)
leaq 0x68(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x1551a
leaq 0x8(%rsp), %rbp
movq %r15, (%rbp)
movq %r14, 0x8(%rbp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x5a62
movq %rbx, (%rbp)
movq %r13, 0x8(%rbp)
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0xe05a
movsd %xmm0, (%rsp)
movq %rbx, (%r14)
movq %r12, 0x8(%r14)
leaq 0x8(%rsp), %rdi
callq 0xe05a
ucomisd (%rsp), %xmm0
seta %al
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::wave_function(double, double)
Eigen::Vector3d WaveObject::wave_function(double offset_one, double offset_two){
    double current_time = time / 60;
    double total = 0;
    Eigen::Vector3d point = first_corner + offset_one * direction_one + offset_two * direction_two;
    // direction one waves
    for (auto wave:component_waves){
        //double sine = sin(offset_one * offset_two + time);
        double sine = (sin(wave.direction.dot(point)*wave.frequency + current_time*wave.phase_constant)+1)/2;
        total += wave_height * wave.amplitude * pow(sine, 2);
    }
    total = total / component_waves.size();
    Eigen::Vector3d result = point + total * surface_normal;
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x20(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x18(%rsp), %r15
movsd %xmm1, (%r15)
movsd 0x190(%r14), %xmm0
divsd 0x7319(%rip), %xmm0     # 0x1be60
movsd %xmm0, 0x10(%rsp)
leaq 0x1e0(%r14), %rbp
leaq 0x210(%r14), %rdx
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
callq 0x5423
movsd 0x10(%r12), %xmm0
movsd %xmm0, (%rsp)
movq 0x18(%r12), %rbx
leaq 0x228(%r14), %rdx
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x5423
leaq 0x50(%rsp), %r12
movq %rbp, 0x8(%r12)
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%r12)
movq %rbx, 0x28(%r12)
movsd 0x10(%r13), %xmm0
movsd %xmm0, 0x50(%r12)
movq 0x18(%r13), %rax
movq %rax, 0x58(%r12)
leaq 0xf0(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x15642
movq 0x1a0(%r14), %r13
movq 0x1a8(%r14), %rbp
xorpd %xmm2, %xmm2
cmpq %rbp, %r13
je 0x14c85
movq 0x10(%r13), %rax
movq %rax, 0x60(%rsp)
movups (%r13), %xmm0
movaps %xmm0, 0x50(%rsp)
movq 0x28(%r13), %rax
movq %rax, 0x28(%r12)
movupd 0x18(%r13), %xmm0
movupd %xmm0, 0x18(%r12)
movq %r12, %rdi
movq %r15, %rsi
movsd %xmm2, (%rsp)
callq 0xc836
movsd 0x78(%rsp), %xmm1
mulsd 0x10(%rsp), %xmm1
mulsd 0x70(%rsp), %xmm0
addsd %xmm1, %xmm0
callq 0x3090
movsd (%rsp), %xmm2
addsd 0x33dd(%rip), %xmm0     # 0x18030
mulsd 0x71fd(%rip), %xmm0     # 0x1be58
movsd 0x1c0(%r14), %xmm1
mulsd 0x68(%rsp), %xmm1
mulsd %xmm0, %xmm0
mulsd %xmm1, %xmm0
addsd %xmm0, %xmm2
movsd %xmm2, 0x28(%rsp)
addq $0x30, %r13
jmp 0x14be9
movq 0x1a8(%r14), %rax
subq 0x1a0(%r14), %rax
pushq $0x30
popq %rcx
cqto
idivq %rcx
movq %rax, %xmm0
punpckldq 0x7188(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x7190(%rip), %xmm0     # 0x1be40
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm2
leaq 0x28(%rsp), %rsi
movsd %xmm2, (%rsi)
addq $0x240, %r14            # imm = 0x240
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rdx
callq 0x5423
leaq 0x50(%rsp), %rsi
movq %r15, (%rsi)
movsd 0x10(%r12), %xmm0
movsd %xmm0, 0x18(%rsi)
movq 0x18(%r12), %rax
movq %rax, 0x20(%rsi)
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x15d68
movq %rbx, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::extract_vector_extremes(Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&)
void WaveObject::extract_vector_extremes(Eigen::Vector3d original, Eigen::Vector3d &min, Eigen::Vector3d &max){
    // Iterate original and elementwise update min and max if a smaller or larger value is found
    for (int i=0; i<=2; i++){
        if (original(i) < min(i))
            min(i) = original(i);
        if (original(i) > max(i))
            max(i) = original(i);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
xorl %r12d, %r12d
cmpq $0x3, %r12
je 0x150a6
movq %r15, %rdi
movq %r12, %rsi
callq 0xa8e8
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0xa8e8
movsd (%rax), %xmm0
ucomisd (%rsp), %xmm0
jbe 0x1504c
movq %r15, %rdi
movq %r12, %rsi
callq 0xa8e8
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0xa8e8
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0xa8e8
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa8e8
movsd (%rsp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x1509e
movq %r15, %rdi
movq %r12, %rsi
callq 0xa8e8
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa8e8
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
incq %r12
jmp 0x14ff0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::get_wave_direction(double)
Eigen::Vector3d WaveObject::get_wave_direction(double angle){
    /*
    Use Rodrigue's rotation formula to rotate an orthognal unit vector around
    the normal of the wave surface.  The result is a unit vector that aims in a
    direction defined by angle on the wave plane.
    */
    Eigen::Vector3d v = direction_one;
    Eigen::Vector3d k = surface_normal;
    k = k.normalized();
    Eigen::Vector3d rotated_vector = v * cos(angle) + (k.cross(v)) * sin(angle)
                                     + k * (k.dot(v)) * (1 - cos(angle));
    return rotated_vector;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
movq 0x220(%rsi), %rax
leaq 0x70(%rsp), %r15
movq %rax, 0x10(%r15)
movups 0x210(%rsi), %xmm0
movaps %xmm0, (%r15)
movq 0x250(%rsi), %rax
leaq 0x50(%rsp), %r14
movq %rax, 0x10(%r14)
movups 0x240(%rsi), %xmm0
movaps %xmm0, (%r14)
leaq 0x178(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x5304
movq %r14, %rdi
movq %r12, %rsi
callq 0x5806
movsd 0x8(%rsp), %xmm0
callq 0x34c0
leaq 0x28(%rsp), %rdx
movsd %xmm0, (%rdx)
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0xaa26
movsd (%r15), %xmm0
movsd (%r14), %xmm1
movupd 0x8(%r14), %xmm2
movupd 0x8(%r15), %xmm3
movapd %xmm2, %xmm4
shufpd $0x1, %xmm1, %xmm4      # xmm4 = xmm4[1],xmm1[0]
mulpd %xmm3, %xmm4
mulsd %xmm3, %xmm1
shufpd $0x1, %xmm0, %xmm3      # xmm3 = xmm3[1],xmm0[0]
mulpd %xmm2, %xmm3
subpd %xmm4, %xmm3
mulsd %xmm2, %xmm0
subsd %xmm0, %xmm1
leaq 0x30(%rsp), %r13
movapd %xmm3, (%r13)
movsd %xmm1, 0x10(%r13)
movsd 0x8(%rsp), %xmm0
callq 0x3090
leaq 0x20(%rsp), %rdx
movsd %xmm0, (%rdx)
leaq 0xa8(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0xaa26
movq (%r12), %rax
leaq 0x128(%rsp), %r13
movq %rax, 0x8(%r13)
movsd 0x10(%r12), %xmm0
movsd %xmm0, 0x18(%r13)
movq (%rbp), %rax
movq %rax, 0x28(%r13)
movsd 0x10(%rbp), %xmm0
movsd %xmm0, 0x38(%r13)
movq %r14, %rdi
movq %r15, %rsi
callq 0xc836
leaq 0x18(%rsp), %rdx
movsd %xmm0, (%rdx)
leaq 0x88(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xaa26
movsd 0x8(%rsp), %xmm0
callq 0x34c0
movsd 0x2e0b(%rip), %xmm1     # 0x18030
subsd %xmm0, %xmm1
leaq 0x10(%rsp), %rdx
movsd %xmm1, (%rdx)
leaq 0xe8(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x1542a
leaq 0x178(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1540e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x15b76
movq %rbx, %rax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/AnimatedSphere.cpp
// Function: AnimatedSphere::add_animation_section(int, int, std::vector<double, std::allocator<double>>)
void AnimatedSphere::add_animation_section(int section_start, int section_end,  std::vector<double> transform_floats){
    int number_frames = section_end - section_start;
    if (number_frames == 0){
        return;
    }
    std::vector<double> single_frame_transform = fraction_of_transform(number_frames, transform_floats);
    for (int i=1; i<number_frames+1; i++){
        sp_frame_setting current;
        current.frame_number = section_start + i - 1;
        current.center_change = Eigen::Vector3d(single_frame_transform[0], single_frame_transform[1], single_frame_transform[2]);
        current.radius_change = single_frame_transform[3];
        frame_steps.push_back(current);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %edx, %ebp
subl %esi, %ebp
je 0x160bc
movl %esi, %ebx
movq %rdi, %r14
cvtsi2sd %ebp, %xmm0
movsd %xmm0, (%rsp)
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %rcx, %rsi
callq 0x7dcc
leaq 0x8(%rsp), %rdi
movsd (%rsp), %xmm0
movq %r12, %rdx
callq 0x160e8
leaq 0x60(%rsp), %rdi
callq 0x5f3a
leaq 0x40(%rsp), %r12
addq $0x58, %r14
xorl %r15d, %r15d
testl %ebp, %ebp
cmovgl %ebp, %r15d
leaq 0x20(%rsp), %r13
leaq 0x38(%rsp), %rbp
subl $0x1, %r15d
jb 0x160b2
movl %ebx, 0x38(%rsp)
movq 0x8(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x20(%rsp)
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x52e8
movq 0x8(%rsp), %rax
movsd 0x18(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x16224
incl %ebx
jmp 0x16066
leaq 0x8(%rsp), %rdi
callq 0x5f3a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x160d8
movq %rax, %rbx
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x5f3a
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/AnimatedSphere.cpp
// Function: AnimatedSphere::fraction_of_transform(double, std::vector<double, std::allocator<double>>)
std::vector<double> AnimatedSphere::fraction_of_transform(double divide_by, std::vector<double> transform_floats){
    // transform_floats should be 8 long
    std::vector<double> result;
    for (auto i:transform_floats)
        std::cout << i << std::endl;
    for (int i=0; i<4; i++){
        double temp = transform_floats[i];
        temp = temp / divide_by;
        result.push_back(temp);
    }
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movsd %xmm0, (%rsp)
movq %rdi, %rbx
xorpd %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movupd %xmm0, (%rdi)
movq (%rdx), %r12
movq 0x8(%rdx), %r13
movq 0x13ea5(%rip), %r15     # 0x29fc0
cmpq %r13, %r12
je 0x1613c
movsd (%r12), %xmm0
movq %r15, %rdi
callq 0x33f0
movq %rax, %rdi
callq 0x3120
addq $0x8, %r12
jmp 0x1611b
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
cmpq $0x4, %r12
je 0x1616e
movq (%r14), %rax
movsd (%rax,%r12,8), %xmm0
divsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7daa
incq %r12
jmp 0x16144
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x16181
movq %rax, %r14
movq %rbx, %rdi
callq 0x5f3a
movq %r14, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/AnimatedSphere.cpp
// Function: AnimatedSphere::advance_frame()
void AnimatedSphere::advance_frame(){
    if (has_next_frame()){
        sp_frame_setting this_transform = frame_steps[current_frame];
        sphere->add_to_center(this_transform.center_change);
        sphere->add_to_radius(this_transform.radius_change);
        current_frame++;
    }
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl 0x8(%rdi), %esi
movq 0x60(%rdi), %rax
movq 0x58(%rdi), %rcx
subq %rcx, %rax
pushq $0x28
popq %rdi
cqto
idivq %rdi
cmpq %rsi, %rax
jbe 0x16204
imulq $0x28, %rsi, %rax
movsd 0x20(%rcx,%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x70(%rbx), %rdi
movups 0x8(%rcx,%rax), %xmm0
movq 0x18(%rcx,%rax), %rax
leaq 0x10(%rsp), %rsi
movq %rax, 0x10(%rsi)
movaps %xmm0, (%rsi)
callq 0xf70c
movq 0x70(%rbx), %rdi
movsd 0x8(%rsp), %xmm0
callq 0xf72e
incl 0x8(%rbx)
addq $0x30, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/OctTree.cpp
// Function: OctTree::OctTree(Eigen::Matrix<double, -1, -1, 0, -1, -1>&, Eigen::Matrix<int, -1, -1, 0, -1, -1>&, int)
OctTree::OctTree(Eigen::MatrixXd& verts, Eigen::MatrixXi& faces, int recursionLimit)
    : Vertices(verts), Faces(faces)
{
    // Constructor called directly by the Model object
    recursion_limit = recursionLimit;
    find_corners();
    center = (max_corner-min_corner) / 2 + min_corner;
    // The first box should surround the entire model, so all faces are passed.
    for(int i=0;i<Faces.cols();i++){
        contained_faces.insert(i);
    }
    subdivide_box();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
callq 0x7446
movq %r15, 0x30(%rbx)
movq %r14, 0x38(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
andl $0x0, 0x60(%rbx)
andq $0x0, 0x68(%rbx)
leaq 0x58(%rbx), %r14
leaq 0x60(%rbx), %rax
movq %rax, 0x70(%rbx)
movq %rax, 0x78(%rbx)
andq $0x0, 0x80(%rbx)
movl %ebp, 0xa0(%rbx)
movq %rbx, %rdi
callq 0x16578
leaq 0x18(%rbx), %rax
leaq 0x90(%rsp), %rsi
movq %rax, (%rsi)
movq %rbx, 0x8(%rsi)
leaq 0x4(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x8(%rsp), %rdi
callq 0x1721e
leaq 0x88(%rbx), %rdi
movups 0x10(%rsp), %xmm0
leaq 0x40(%rsp), %rsi
movups %xmm0, 0x10(%rsi)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x30(%rsi)
movq %rbx, 0x40(%rsi)
callq 0x1762f
xorl %eax, %eax
leaq 0x40(%rsp), %r15
movl %eax, 0x40(%rsp)
movq 0x38(%rbx), %rcx
cltq
cmpq %rax, 0x10(%rcx)
jle 0x1653f
movq %r14, %rdi
movq %r15, %rsi
callq 0x17756
movl 0x40(%rsp), %eax
incl %eax
jmp 0x1651c
movq %rbx, %rdi
callq 0x1664c
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16559
jmp 0x16559
movq %rax, %r15
addq $0x40, %rbx
movq %r14, %rdi
callq 0xadca
movq %rbx, %rdi
callq 0xad4e
movq %r15, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/OctTree.cpp
// Function: OctTree::find_corners()
void  OctTree::find_corners(){
    double min_val = std::numeric_limits<double>::lowest();
    double max_val = std::numeric_limits<double>::max();
    max_corner << min_val, min_val, min_val;
    min_corner << max_val, max_val, max_val;
    calculate_bounding();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movabsq $-0x10000000000001, %rax # imm = 0xFFEFFFFFFFFFFFFF
leaq 0x10(%rsp), %rsi
movq %rax, (%rsi)
movabsq $0x7fefffffffffffff, %r15 # imm = 0x7FEFFFFFFFFFFFFF
movq %r15, 0x8(%rsp)
leaq 0x18(%rdi), %rcx
leaq 0x18(%rsp), %rdi
movq %rcx, (%rdi)
andq $0x0, 0x8(%rdi)
pushq $0x1
popq %r12
movq %r12, 0x10(%rdi)
movq %r12, 0x18(%rdi)
movq %rax, 0x18(%rbx)
callq 0x6232
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x6232
leaq 0x18(%rsp), %r14
movq %r14, %rdi
callq 0x62da
movq %rbx, (%r14)
andq $0x0, 0x8(%r14)
movq %r12, 0x10(%r14)
movq %r12, 0x18(%r14)
movq %r15, (%rbx)
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6232
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x6232
leaq 0x18(%rsp), %rdi
callq 0x62da
movq %rbx, %rdi
callq 0x170ae
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x16636
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x62da
movq %rbx, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/OctTree.cpp
// Function: OctTree::OctTree(OctTree*, int, Eigen::Matrix<double, 3, 1, 0, 3, 1>, Eigen::Matrix<double, 3, 1, 0, 3, 1>)
OctTree::OctTree(OctTree* parent_bb, int recursionLimit, Eigen::Vector3d min, Eigen::Vector3d max)
    : Vertices(parent_bb->Vertices), Faces(parent_bb->Faces)
{
    // Constructor of sub boxes in the recursive tree
    recursion_limit = recursionLimit - 1;
    min_corner = min;
    max_corner = max;
    center = (max-min) / 2 + min;
    find_contained_faces(parent_bb->contained_faces);
    subdivide_box();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %r8, %r12
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x7446
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
movq 0x38(%r14), %rax
movq %rax, 0x38(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
andq $0x0, 0x50(%rbx)
leaq 0x60(%rbx), %rax
andl $0x0, 0x60(%rbx)
andq $0x0, 0x68(%rbx)
movq %rax, 0x70(%rbx)
movq %rax, 0x78(%rbx)
andq $0x0, 0x80(%rbx)
decl %ebp
movl %ebp, 0xa0(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5806
leaq 0x18(%rbx), %rdi
movq %r12, %rsi
callq 0x5806
leaq 0x48(%rsp), %rsi
movq %r12, (%rsi)
movq %r15, 0x8(%rsi)
leaq 0xc(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x10(%rsp), %rdi
callq 0x1721e
leaq 0x88(%rbx), %rdi
movups 0x18(%rsp), %xmm0
leaq 0x60(%rsp), %rsi
movups %xmm0, 0x10(%rsi)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x30(%rsi)
movq %r15, 0x40(%rsi)
callq 0x1762f
addq $0x58, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x169c6
movq %rbx, %rdi
callq 0x1664c
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x169a3
movq %rax, %r14
leaq 0x40(%rbx), %r15
addq $0x58, %rbx
movq %rbx, %rdi
callq 0xadca
movq %r15, %rdi
callq 0xad4e
movq %r14, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/OctTree.cpp
// Function: OctTree::find_contained_faces(std::set<int, std::less<int>, std::allocator<int>>&)
void OctTree::find_contained_faces(std::set<int> &parent_faces){
    Eigen::Vector3d point_a, point_b, point_c;
    for(auto face_num: parent_faces){
        point_a = get_vertex( Faces(0, face_num) - 1 );
        point_b = get_vertex( Faces(1, face_num) - 1 );
        point_c = get_vertex( Faces(2, face_num) - 1 );
        if (triangle_intersects(point_a, point_b, point_c)){
            contained_faces.insert(face_num);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %r14
movq 0x18(%rsi), %r12
addq $0x8, %rsi
movq %rsi, 0x10(%rsp)
leaq 0x58(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x18(%rsp), %r13
cmpq 0x10(%rsp), %r12
je 0x16ac4
movslq 0x20(%r12), %rdx
movl %edx, 0x4(%rsp)
movq 0x38(%r14), %rdi
xorl %esi, %esi
callq 0xa554
movl (%rax), %edx
decl %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x16ad4
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x52e8
movq 0x38(%r14), %rdi
movslq 0x4(%rsp), %rdx
pushq $0x1
popq %rsi
callq 0xa554
movl (%rax), %edx
decl %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x16ad4
leaq 0x48(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x52e8
movq 0x38(%r14), %rdi
movslq 0x4(%rsp), %rdx
pushq $0x2
popq %rsi
callq 0xa554
movl (%rax), %edx
decl %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x16ad4
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x52e8
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x16b44
testb %al, %al
je 0x16ab4
movq 0x8(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x17756
movq %r12, %rdi
callq 0x32e0
movq %rax, %r12
jmp 0x169f2
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/OctTree.cpp
// Function: OctTree::axis_test(Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&)
bool OctTree::axis_test(const Eigen::Vector3d& axis, const Eigen::Vector3d& e, const Eigen::Vector3d& v0, const Eigen::Vector3d& v1, const Eigen::Vector3d& v2, const Eigen::Vector3d& u0, const Eigen::Vector3d& u1, const Eigen::Vector3d& u2) {
    double p0 = v0.dot(axis);
    double p1 = v1.dot(axis);
    double p2 = v2.dot(axis);
    double r = e[0] * std::abs(u0.dot(axis)) +
               e[1] * std::abs(u1.dot(axis)) +
               e[2] * std::abs(u2.dot(axis));
    if (std::max(-max(p0, p1, p2), min(p0, p1, p2)) > r) return false;
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r13
movq %r8, %rbp
movq %rdx, %r14
movq %rsi, %rbx
movq 0x88(%rsp), %r12
movq 0x80(%rsp), %r15
movq %rcx, %rdi
callq 0xc836
movsd %xmm0, 0x40(%rsp)
movq %rbp, %rdi
movq %rbx, %rsi
callq 0xc836
movsd %xmm0, 0x38(%rsp)
movq %r13, %rdi
movq %rbx, %rsi
callq 0xc836
movsd %xmm0, 0x30(%rsp)
movsd (%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0xc836
andps 0x102b(%rip), %xmm0     # 0x18020
movaps %xmm0, 0x10(%rsp)
movsd 0x8(%r14), %xmm0
movsd %xmm0, 0x28(%rsp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0xc836
andpd 0x1007(%rip), %xmm0     # 0x18020
mulsd 0x28(%rsp), %xmm0
movapd 0x10(%rsp), %xmm1
mulsd 0x8(%rsp), %xmm1
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
movsd 0x10(%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x90(%rsp), %rdi
movq %rbx, %rsi
callq 0xc836
andpd 0xfc7(%rip), %xmm0      # 0x18020
mulsd 0x8(%rsp), %xmm0
addsd 0x10(%rsp), %xmm0
movsd 0x30(%rsp), %xmm4
movapd %xmm4, %xmm1
movsd 0x38(%rsp), %xmm3
maxsd %xmm3, %xmm1
movsd 0x40(%rsp), %xmm2
maxsd %xmm2, %xmm1
xorpd 0x19b5(%rip), %xmm1     # 0x18a40
minsd %xmm3, %xmm4
minsd %xmm2, %xmm4
maxsd %xmm1, %xmm4
ucomisd %xmm0, %xmm4
setbe %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/OctTree.cpp
// Function: OctTree::calculate_bounding()
void OctTree::calculate_bounding(){
    for(int i=0; i<Vertices.cols(); i++){
        Eigen::Vector3d vertex = get_vertex(i);
        if (vertex(0) < min_corner(0)){
            min_corner(0) = vertex(0);
        }
        if (vertex(1) < min_corner(1)){
            min_corner(1) = vertex(1);
        }
        if (vertex(2) < min_corner(2)){
            min_corner(2) = vertex(2);
        }
        if (vertex(0) > max_corner(0)){
            max_corner(0) = vertex(0);
        }
        if (vertex(1) > max_corner(1)){
            max_corner(1) = vertex(1);
        }
        if (vertex(2) > max_corner(2)){
            max_corner(2) = vertex(2);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x8(%rsp), %r15
movq 0x30(%rbx), %rax
cmpq %r14, 0x10(%rax)
jle 0x17146
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x16ad4
movsd 0x8(%rsp), %xmm0
movsd (%rbx), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x170ee
movsd %xmm0, (%rbx)
movsd 0x10(%rsp), %xmm1
movsd 0x8(%rbx), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x17104
movsd %xmm1, 0x8(%rbx)
movsd 0x18(%rsp), %xmm2
movsd 0x10(%rbx), %xmm3
ucomisd %xmm2, %xmm3
jbe 0x1711a
movsd %xmm2, 0x10(%rbx)
ucomisd 0x18(%rbx), %xmm0
jbe 0x17126
movsd %xmm0, 0x18(%rbx)
ucomisd 0x20(%rbx), %xmm1
jbe 0x17132
movsd %xmm1, 0x20(%rbx)
ucomisd 0x28(%rbx), %xmm2
jbe 0x1713e
movsd %xmm2, 0x28(%rbx)
incq %r14
jmp 0x170c2
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/OctTree.cpp
// Function: OctTree::intersected_faces(Ray&)
std::set<int> OctTree::intersected_faces(Ray& ray){
    std::set<int> intersected_faces;
    if (!ray_intersects(ray)){
        return intersected_faces;
    }
    if (contained_boxes.size() > 0){
        for (std::unique_ptr<OctTree>& sub_bb: contained_boxes){
            std::set<int> hit_faces = sub_bb->intersected_faces(ray);
            intersected_faces.insert(hit_faces.begin(), hit_faces.end());
        }
    } else{
        intersected_faces = contained_faces;
    }
    return intersected_faces;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
andl $0x0, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
andq $0x0, 0x28(%rdi)
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x746e
testb %al, %al
je 0x171e8
movq 0x40(%r15), %r13
movq 0x48(%r15), %rbp
cmpq %r13, %rbp
je 0x171d9
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
cmpq %rbp, %r13
je 0x171e8
movq (%r13), %rsi
movq %r12, %rdi
movq %r14, %rdx
callq 0x17150
movq 0x20(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x17b88
movq %r12, %rdi
callq 0xadca
addq $0x8, %r13
jmp 0x171a7
addq $0x58, %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1734e
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x171fc
movq %rax, %r14
jmp 0x1720e
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xadca
movq %rbx, %rdi
callq 0xadca
movq %r14, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/oknenavin[P]cxon/examples/std-types-ex02.cxx
// Function: main
int main() {
    std::vector<sequence> sqs;
        cxon::from_bytes(sqs, std::begin(in), std::end(in));
    assert(sqs == (std::vector<sequence>{
        sequence {"Fibonacci", 5, std::vector<unsigned> {0, 1, 1, 2, 3}},
        sequence {"Pascal", 5, std::vector<unsigned> {1, 8, 24, 32, 16}}
    }));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x130, %rsp            # imm = 0x130
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0x5e1e(%rip), %rdx      # 0x80f0
leaq 0x5e5e(%rip), %rcx      # 0x8137
leaq 0x70(%rsp), %rdi
callq 0x2677
movl $0x5, 0xc(%rsp)
movups 0x248e(%rip), %xmm0     # 0x4780
leaq 0x110(%rsp), %rsi
movaps %xmm0, (%rsi)
movl $0x3, 0x10(%rsi)
leaq 0x40(%rsp), %rdi
pushq $0x5
popq %rdx
leaq 0x7(%rsp), %rcx
callq 0x24e2
leaq 0x1d2b(%rip), %rsi      # 0x4048
leaq 0x70(%rsp), %r14
leaq 0xc(%rsp), %rdx
leaq 0x40(%rsp), %rcx
movq %r14, %rdi
callq 0x258a
leaq 0xb0(%rsp), %rbx
movl $0x5, 0x8(%rsp)
movups 0x2449(%rip), %xmm0     # 0x4794
leaq 0xf0(%rsp), %rsi
movaps %xmm0, (%rsi)
movl $0x10, 0x10(%rsi)
leaq 0x28(%rsp), %rdi
pushq $0x5
popq %rdx
leaq 0x6(%rsp), %rcx
callq 0x24e2
leaq 0x1cdc(%rip), %rsi      # 0x4052
leaq 0x8(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %rbx, %rdi
callq 0x25ec
leaq 0x58(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0x5(%rsp), %rcx
callq 0x2518
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x24b9
testb %al, %al
je 0x2406
leaq 0x58(%rsp), %rdi
callq 0x2552
pushq $0x40
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0x70, %rdi
callq 0x2574
addq $-0x40, %rbx
cmpq $-0x40, %rbx
jne 0x23bf
leaq 0x28(%rsp), %rdi
callq 0x39fe
leaq 0x40(%rsp), %rdi
callq 0x39fe
leaq 0x10(%rsp), %rdi
callq 0x2552
xorl %eax, %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1c4c(%rip), %rdi      # 0x4059
leaq 0x1cea(%rip), %rsi      # 0x40fe
leaq 0x1cf6(%rip), %rcx      # 0x4111
pushq $0x16
popq %rdx
callq 0x20e0
movq %rax, %r15
leaq 0x58(%rsp), %rdi
callq 0x2552
jmp 0x2435
movq %rax, %r15
pushq $0x40
popq %r12
leaq (%rsp,%r12), %rdi
addq $0x70, %rdi
callq 0x2574
addq $-0x40, %r12
cmpq $-0x40, %r12
jne 0x2439
movb $0x1, %bpl
jmp 0x245a
movq %rax, %r15
xorl %ebp, %ebp
leaq 0x28(%rsp), %rdi
callq 0x39fe
jmp 0x2475
movq %rax, %r15
xorl %ebp, %ebp
jmp 0x2475
movq %rax, %r15
xorl %ebp, %ebp
movq %r14, %rbx
leaq 0x40(%rsp), %rdi
callq 0x39fe
cmpq %rbx, %r14
sete %al
orb %bpl, %al
jne 0x24a7
leaq 0x70(%rsp), %r14
addq $-0x40, %rbx
movq %rbx, %rdi
callq 0x2574
cmpq %r14, %rbx
jne 0x248f
jmp 0x24a7
jmp 0x24a4
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x2552
movq %r15, %rdi
callq 0x2190
// File: /workspace/github_cpp_makefile_star2_O2/calebstewart[P]md5/./examples/basic-string.cpp
// Function: main
int main(int argc, char** argv)
{
  char digest[33];
  unsigned char hash[16];

  // Write the calculated hash to `hash`
  MD5::hash("hello world\n", hash);
  // Retrieve the hex-encoded digest
  MD5::digest(hash, digest);

  std::cout << "md5(\"hello world\\n\") => \"" << digest << "\"\n";

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
leaq 0xe47(%rip), %rdi       # 0x3021
leaq -0x20(%rbp), %rbx
movq %rbx, %rsi
callq 0x206a
leaq -0x50(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x218e
movq 0x2ddc(%rip), %rdi      # 0x4fd8
leaq 0xe2b(%rip), %rsi       # 0x302e
callq 0x1060
movq %rax, %rdi
movq %r14, %rsi
callq 0x1060
leaq 0xe2e(%rip), %rsi       # 0x3048
movq %rax, %rdi
callq 0x1060
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/base64.cpp
// Function: base64Encode(unsigned char const*, unsigned long)
char* base64Encode(const unsigned char *message, const size_t length) {
  int encodedSize = 4 * ceil((double)length / 3);
  char *encodedMessage = (char*)malloc(encodedSize + 1);

  if(encodedMessage == NULL) {
    fprintf(stderr, "Failed to allocate memory\n");
    exit(1);
  }

  BIO *b64 = BIO_new(BIO_f_base64());
  BIO *bio = BIO_new(BIO_s_mem());
  bio = BIO_push(b64, bio);
  BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL);

  BIO_write(bio, message, length);
  BIO_flush(bio);

  BUF_MEM *bufferPtr;
  BIO_get_mem_ptr(bio, &bufferPtr);
  BIO_set_close(bio, BIO_CLOSE);

  // Add a NUL terminator
  memcpy(encodedMessage, (*bufferPtr).data, (*bufferPtr).length + 1);
  encodedMessage[(*bufferPtr).length] = '\0';

  BIO_free_all(bio);
  return encodedMessage;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rsi, %xmm1
punpckldq 0x1afc(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
movq %rdi, %r15
subpd 0x1b01(%rip), %xmm1     # 0x4020
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
divsd 0x1afd(%rip), %xmm0     # 0x4030
callq 0x2070
mulsd 0x1af8(%rip), %xmm0     # 0x4038
cvttsd2si %xmm0, %eax
incl %eax
movslq %eax, %rdi
callq 0x22b0
testq %rax, %rax
je 0x2604
movq %rax, %rbx
callq 0x21f0
movq %rax, %rdi
callq 0x2340
movq %rax, %r12
callq 0x21a0
movq %rax, %rdi
callq 0x2340
movq %r12, %rdi
movq %rax, %rsi
callq 0x2210
movq %rax, %r12
movq %rax, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2060
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x2230
pushq $0xb
popq %rsi
movq %r12, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x20b0
pushq $0x73
popq %rsi
movq %rsp, %r14
movq %r12, %rdi
xorl %edx, %edx
movq %r14, %rcx
callq 0x20b0
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x20b0
movq (%r14), %rax
movq (%rax), %r14
movq 0x8(%rax), %rsi
leaq 0x1(%r14), %rdx
movq %rbx, %rdi
callq 0x2180
movb $0x0, (%rbx,%r14)
movq %r12, %rdi
callq 0x20e0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x39c5(%rip), %rax      # 0x5fd0
movq (%rax), %rcx
leaq 0x1a43(%rip), %rdi      # 0x4058
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x2390
pushq $0x1
popq %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/base64.cpp
// Function: base64Decode(char const*, unsigned long, unsigned char**)
int base64Decode(const char *encodedMessage, const size_t encodedMessageLength, unsigned char **decodedMessage) {
  int decodedLength = calculateDecodedLength(encodedMessage, encodedMessageLength);
  *decodedMessage = (unsigned char*)malloc(decodedLength + 1);

  if(*decodedMessage == NULL) {
    fprintf(stderr, "Failed to allocate memory\n");
    exit(1);
  }

  BIO *bio = BIO_new_mem_buf(encodedMessage, encodedMessageLength);
  BIO *b64 = BIO_new(BIO_f_base64());
  bio = BIO_push(b64, bio);
  BIO_set_flags(bio, BIO_FLAGS_BASE64_NO_NL);

  // Add a NUL terminator
  decodedLength = BIO_read(bio, *decodedMessage, encodedMessageLength);
  (*decodedMessage)[decodedLength] = '\0';

  BIO_free_all(bio);

  return decodedLength;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x26cf
incl %eax
movslq %eax, %rdi
callq 0x22b0
movq %rax, (%rbx)
testq %rax, %rax
je 0x26ab
movq %r15, %rdi
movl %r14d, %esi
callq 0x2090
movq %rax, %r15
callq 0x21f0
movq %rax, %rdi
callq 0x2340
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
movq %rax, %r15
movq %rax, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2060
movq (%rbx), %rsi
movq %r15, %rdi
movl %r14d, %edx
callq 0x2260
movq (%rbx), %rcx
movslq %eax, %rbx
movb $0x0, (%rcx,%rbx)
movq %r15, %rdi
callq 0x20e0
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
movq 0x391e(%rip), %rax      # 0x5fd0
movq (%rax), %rcx
leaq 0x199c(%rip), %rdi      # 0x4058
pushq $0x1a
popq %rsi
pushq $0x1
popq %rdx
callq 0x2390
pushq $0x1
popq %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/base64.cpp
// Function: calculateDecodedLength(char const*, unsigned long)
int calculateDecodedLength(const char *encodedMessage, const size_t encodedMessageLength) {
  unsigned int padding = 0;

  // Check for trailing '=''s as padding
  if(encodedMessage[encodedMessageLength - 1] == '=' && encodedMessage[encodedMessageLength - 2] == '=') {
    padding = 2;
  } else if (encodedMessage[encodedMessageLength - 1] == '=') {
    padding = 1;
  }

  return (int)encodedMessageLength * 0.75 - padding;
}

// Assembly:
xorpd %xmm0, %xmm0
cmpb $0x3d, -0x1(%rdi,%rsi)
jne 0x26f3
cmpb $0x3d, -0x2(%rdi,%rsi)
jne 0x26eb
movsd 0x1957(%rip), %xmm0     # 0x4040
jmp 0x26f3
movsd 0x1955(%rip), %xmm0     # 0x4048
cvtsi2sd %esi, %xmm1
mulsd 0x1951(%rip), %xmm1     # 0x4050
subsd %xmm0, %xmm1
cvttsd2si %xmm1, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/Crypto.cpp
// Function: Crypto::Crypto()
Crypto::Crypto() {
  localKeypair = NULL;
  remotePublicKey = NULL;

  #ifdef PSEUDO_CLIENT
    generateRsaKeypair(&remotePublicKey);
  #endif

  init();
}

// Assembly:
pushq %rbx
andq $0x0, 0x3aef(%rip)      # 0x6200
movq %rdi, %rbx
andq $0x0, (%rdi)
movq %rdi, %rsi
callq 0x272a
movq %rbx, %rdi
popq %rbx
jmp 0x2780
nop
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/Crypto.cpp
// Function: Crypto::generateRsaKeypair(evp_pkey_st**)
int Crypto::generateRsaKeypair(EVP_PKEY **keypair) {
  EVP_PKEY_CTX *context = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL);

  if(EVP_PKEY_keygen_init(context) <= 0) {
    return FAILURE;
  }

  if(EVP_PKEY_CTX_set_rsa_keygen_bits(context, RSA_KEYLEN) <= 0) {
    return FAILURE;
  }

  if(EVP_PKEY_keygen(context, keypair) <= 0) {
    return FAILURE;
  }

  EVP_PKEY_CTX_free(context);

  return SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
pushq $0x6
popq %rdi
xorl %esi, %esi
callq 0x23a0
movq %rax, %r14
movq %rax, %rdi
callq 0x22c0
pushq $-0x1
popq %rbx
testl %eax, %eax
jle 0x2778
movq %r14, %rdi
movl $0x800, %esi            # imm = 0x800
callq 0x2190
testl %eax, %eax
jle 0x2778
movq %r14, %rdi
movq %r15, %rsi
callq 0x22a0
testl %eax, %eax
jle 0x2778
movq %r14, %rdi
callq 0x2330
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/Crypto.cpp
// Function: Crypto::init()
int Crypto::init() {
  // Initalize contexts
  rsaEncryptContext = EVP_CIPHER_CTX_new();
  aesEncryptContext = EVP_CIPHER_CTX_new();

  rsaDecryptContext = EVP_CIPHER_CTX_new();
  aesDecryptContext = EVP_CIPHER_CTX_new();

  // Check if any of the contexts initializations failed
  if(rsaEncryptContext == NULL || aesEncryptContext == NULL || rsaDecryptContext == NULL || aesDecryptContext == NULL) {
    return FAILURE;
  }

  /* Don't set key or IV right away; we want to set lengths */
  EVP_CIPHER_CTX_init(aesEncryptContext);
  EVP_CIPHER_CTX_init(aesDecryptContext);

  EVP_CipherInit_ex(aesEncryptContext, EVP_aes_256_cbc(), NULL, NULL, NULL, 1);

  /* Now we can set key and IV lengths */
  aesKeyLength = EVP_CIPHER_CTX_key_length(aesEncryptContext);
  aesIvLength = EVP_CIPHER_CTX_iv_length(aesEncryptContext);

  // Generate RSA and AES keys
  generateRsaKeypair(&localKeypair);
  generateAesKey(&aesKey, &aesIv);

  return SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x2170
movq %rax, 0x8(%rbx)
callq 0x2170
movq %rax, 0x10(%rbx)
callq 0x2170
movq %rax, 0x18(%rbx)
callq 0x2170
movq %rax, 0x20(%rbx)
pushq $-0x1
popq %r14
cmpq $0x0, 0x8(%rbx)
je 0x2843
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
sete %cl
cmpq $0x0, 0x18(%rbx)
sete %dl
orb %cl, %dl
testq %rax, %rax
sete %al
orb %dl, %al
jne 0x2843
callq 0x2310
movq 0x20(%rbx), %rdi
callq 0x2310
movq 0x10(%rbx), %r15
callq 0x2150
xorl %r14d, %r14d
pushq $0x1
popq %r9
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2200
movq 0x10(%rbx), %rdi
callq 0x21c0
cltq
movq %rax, 0x38(%rbx)
movq 0x10(%rbx), %rdi
callq 0x2100
cltq
movq %rax, 0x40(%rbx)
leaq 0x39d2(%rip), %rsi      # 0x6200
callq 0x272a
leaq 0x28(%rbx), %rsi
leaq 0x30(%rbx), %rdx
movq %rbx, %rdi
callq 0x2926
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/Crypto.cpp
// Function: Crypto::Crypto(unsigned char*, unsigned long)
Crypto::Crypto(unsigned char *remotePublicKey, size_t remotePublicKeyLength) {
  localKeypair = NULL;
  this->remotePublicKey = NULL;

  setRemotePublicKey(remotePublicKey, remotePublicKeyLength);
  init();
}

// Assembly:
pushq %rbx
andq $0x0, 0x39ab(%rip)      # 0x6200
movq %rdi, %rbx
andq $0x0, (%rdi)
callq 0x286a
movq %rbx, %rdi
popq %rbx
jmp 0x2780
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/Crypto.cpp
// Function: Crypto::setRemotePublicKey(unsigned char*, unsigned long)
int Crypto::setRemotePublicKey(unsigned char *publicKey, size_t publicKeyLength) {
  BIO *bio = BIO_new(BIO_s_mem());

  if(BIO_write(bio, publicKey, publicKeyLength) != (int)publicKeyLength) {
    return FAILURE;
  }

  PEM_read_bio_PUBKEY(bio, &remotePublicKey, NULL, NULL);
  BIO_free_all(bio);

  return SUCCESS;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0x21a0
movq %rax, %rdi
callq 0x2340
movq %rax, %r14
movq %rax, %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x2230
cmpl %r15d, %eax
jne 0x28ba
xorl %r15d, %r15d
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2040
movq %r14, %rdi
callq 0x20e0
jmp 0x28be
pushq $-0x1
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/Crypto.cpp
// Function: Crypto::~Crypto()
Crypto::~Crypto() {
  EVP_PKEY_free(localKeypair);
  EVP_PKEY_free(remotePublicKey);

  EVP_CIPHER_CTX_free(rsaEncryptContext);
  EVP_CIPHER_CTX_free(aesEncryptContext);

  EVP_CIPHER_CTX_free(rsaDecryptContext);
  EVP_CIPHER_CTX_free(aesDecryptContext);

  free(aesKey);
  free(aesIv);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x3927(%rip), %rdi      # 0x6200
callq 0x2160
movq (%rbx), %rdi
callq 0x2160
movq 0x8(%rbx), %rdi
callq 0x2220
movq 0x10(%rbx), %rdi
callq 0x2220
movq 0x18(%rbx), %rdi
callq 0x2220
movq 0x20(%rbx), %rdi
callq 0x2220
movq 0x28(%rbx), %rdi
callq 0x2280
movq 0x30(%rbx), %rdi
popq %rbx
jmp 0x2280
movq %rax, %rdi
callq 0x2e70
nop
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/Crypto.cpp
// Function: Crypto::rsaEncrypt(unsigned char const*, unsigned long, unsigned char**, unsigned char**, unsigned long*, unsigned char**, unsigned long*)
int Crypto::rsaEncrypt(const unsigned char *message, size_t messageLength, unsigned char **encryptedMessage, unsigned char **encryptedKey,
  size_t *encryptedKeyLength, unsigned char **iv, size_t *ivLength) {

  // Allocate memory for everything
  size_t encryptedMessageLength = 0;
  size_t blockLength = 0;

  *encryptedKey = (unsigned char*)malloc(EVP_PKEY_size(remotePublicKey));
  *iv = (unsigned char*)malloc(EVP_MAX_IV_LENGTH);
  *ivLength = EVP_MAX_IV_LENGTH;

  if(*encryptedKey == NULL || *iv == NULL) {
    return FAILURE;
  }

  *encryptedMessage = (unsigned char*)malloc(messageLength + EVP_MAX_IV_LENGTH);
  if(encryptedMessage == NULL) {
    return FAILURE;
  }

  // Encrypt it!
  if(!EVP_SealInit(rsaEncryptContext, EVP_aes_256_cbc(), encryptedKey, (int*)encryptedKeyLength, *iv, &remotePublicKey, 1)) {
    return FAILURE;
  }

  if(!EVP_SealUpdate(rsaEncryptContext, *encryptedMessage + encryptedMessageLength, (int*)&blockLength, (const unsigned char*)message, (int)messageLength)) {
    return FAILURE;
  }
  encryptedMessageLength += blockLength;

  if(!EVP_SealFinal(rsaEncryptContext, *encryptedMessage + encryptedMessageLength, (int*)&blockLength)) {
    return FAILURE;
  }
  encryptedMessageLength += blockLength;

  return (int)encryptedMessageLength;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movq %r8, %r12
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, 0x18(%rsp)
movq %rdi, %r14
movq 0x60(%rsp), %rbp
movq 0x68(%rsp), %r13
andq $0x0, 0x10(%rsp)
movq (%rdi), %rdi
callq 0x2350
movslq %eax, %rdi
callq 0x22b0
movq %rax, (%r12)
pushq $0x10
popq %rdi
callq 0x22b0
movq %rax, (%rbp)
movq $0x10, (%r13)
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x2a81
cmpq $0x0, (%r12)
je 0x2a81
leaq 0x10(%r15), %rdi
callq 0x22b0
movq %rax, (%rbx)
movq 0x8(%r14), %r13
callq 0x2150
movq 0x60(%rsp), %rcx
movq (%rcx), %r8
movl $0x1, (%rsp)
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq 0x20(%rsp), %rcx
movq %r14, %r9
callq 0x2380
testl %eax, %eax
je 0x2a81
movq 0x8(%r14), %rdi
movq (%rbx), %rsi
leaq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movl %r15d, %r8d
callq 0x2050
testl %eax, %eax
je 0x2a81
leaq 0x10(%rsp), %rdx
movq (%rdx), %r15
movq 0x8(%r14), %rdi
movq (%rbx), %rsi
addq %r15, %rsi
callq 0x2240
testl %eax, %eax
je 0x2a81
addl 0x10(%rsp), %r15d
movl %r15d, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/shanet[P]Crypto-Example/Crypto.cpp
// Function: Crypto::rsaDecrypt(unsigned char*, unsigned long, unsigned char*, unsigned long, unsigned char*, unsigned long, unsigned char**)
int Crypto::rsaDecrypt(unsigned char *encryptedMessage, size_t encryptedMessageLength, unsigned char *encryptedKey,
  size_t encryptedKeyLength, unsigned char *iv, size_t ivLength, unsigned char **decryptedMessage) {

  // Allocate memory for everything
  size_t decryptedMessageLength = 0;
  size_t blockLength = 0;

  *decryptedMessage = (unsigned char*)malloc(encryptedMessageLength + ivLength);
  if(*decryptedMessage == NULL) {
    return FAILURE;
  }

  #ifdef PSEUDO_CLIENT
    EVP_PKEY *key = remotePublicKey;
  #else
    EVP_PKEY *key = localKeypair;
  #endif

  // Decrypt it!
  if(!EVP_OpenInit(rsaDecryptContext, EVP_aes_256_cbc(), encryptedKey, encryptedKeyLength, iv, key)) {
    return FAILURE;
  }

  if(!EVP_OpenUpdate(rsaDecryptContext, (unsigned char*)*decryptedMessage + decryptedMessageLength, (int*)&blockLength, encryptedMessage, (int)encryptedMessageLength)) {
    return FAILURE;
  }
  decryptedMessageLength += blockLength;

  if(!EVP_OpenFinal(rsaDecryptContext, (unsigned char*)*decryptedMessage + decryptedMessageLength, (int*)&blockLength)) {
    return FAILURE;
  }
  decryptedMessageLength += blockLength;

  return (int)decryptedMessageLength;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, 0x10(%rsp)
movq %r8, %rbp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, %r13
andq $0x0, (%rsp)
movq %rdi, %r14
movq 0x58(%rsp), %rbx
movq 0x50(%rsp), %rdi
addq %rdx, %rdi
callq 0x22b0
movq %rax, (%rbx)
pushq $-0x1
popq %rcx
testq %rax, %rax
je 0x2b4b
movq %r13, 0x8(%rsp)
movq (%r14), %rbx
movq 0x18(%r14), %r13
callq 0x2150
movq %r13, %rdi
movq %rax, %rsi
movq %r12, %rdx
movl %ebp, %ecx
movq 0x10(%rsp), %r8
movq %rbx, %r9
callq 0x21d0
testl %eax, %eax
je 0x2b48
movq 0x18(%r14), %rdi
movq 0x58(%rsp), %r12
movq (%r12), %rsi
movq %rsp, %rdx
movq 0x8(%rsp), %rcx
movl %r15d, %r8d
callq 0x2140
testl %eax, %eax
je 0x2b48
movq %rsp, %rdx
movq (%rdx), %rbx
movq 0x18(%r14), %rdi
movq (%r12), %rsi
addq %rbx, %rsi
callq 0x2250
testl %eax, %eax
pushq $-0x1
popq %rcx
je 0x2b4b
addl (%rsp), %ebx
movl %ebx, %ecx
jmp 0x2b4b
pushq $-0x1
popq %rcx
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq