LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::generate_waves(int, int)
void WaveObject::generate_waves(int num_waves, int random_seed){
    /*
    Populate component_waves with waves with random amplitude, frequency, and angle
    */
    std::default_random_engine angle_generator(random_seed);
    std::uniform_real_distribution<double> random_angle(0, 2*M_PI);

    std::default_random_engine freq_generator(random_seed * 2);
    std::uniform_real_distribution<double> random_freq(2, 6);

    std::default_random_engine ampl_generator(random_seed * 3);
    std::uniform_real_distribution<double> random_ampl(.5, 1);

    std::default_random_engine pc_generator(random_seed *4);
    std::uniform_real_distribution<double> random_pc(.5, 4);

    for(int i=0; i<num_waves; i++){
        wave_parameters current;
        current.amplitude = random_ampl(ampl_generator);
        current.frequency = random_freq(freq_generator);
        current.direction = get_wave_direction(random_angle(angle_generator));
        current.phase_constant = random_pc(pc_generator);
        component_waves.push_back(current);
    }
}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xc0(%rsp)
movl %esi, 0xbc(%rsp)
movl %edx, 0xb8(%rsp)
movq 0xc0(%rsp), %rax
movq %rax, (%rsp)
movslq 0xb8(%rsp), %rsi
leaq 0xb0(%rsp), %rdi
callq 0x50e00
leaq 0xa0(%rsp), %rdi
xorps %xmm0, %xmm0
movsd 0x1f61f(%rip), %xmm1    # 0x6ed40
callq 0x50e30
movl 0xb8(%rsp), %eax
shll %eax
movslq %eax, %rsi
leaq 0x98(%rsp), %rdi
callq 0x50e00
leaq 0x88(%rsp), %rdi
movsd 0x17511(%rip), %xmm0    # 0x66c60
movsd 0x1f5e1(%rip), %xmm1    # 0x6ed38
callq 0x50e30
imull $0x3, 0xb8(%rsp), %eax
movslq %eax, %rsi
leaq 0x80(%rsp), %rdi
callq 0x50e00
leaq 0x70(%rsp), %rdi
movsd 0x1f5a7(%rip), %xmm0    # 0x6ed28
movsd 0xd87f(%rip), %xmm1     # 0x5d008
callq 0x50e30
movl 0xb8(%rsp), %eax
shll $0x2, %eax
movslq %eax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x50e00
leaq 0x58(%rsp), %rdi
movsd 0x1f576(%rip), %xmm0    # 0x6ed28
movsd 0x1f576(%rip), %xmm1    # 0x6ed30
callq 0x50e30
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
cmpl 0xbc(%rsp), %eax
jge 0x4f881
leaq 0x20(%rsp), %rdi
callq 0x50e60
leaq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x50e70
movsd %xmm0, 0x38(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x50e70
movsd %xmm0, 0x40(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x50e70
movq (%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x506f0
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x9d10
leaq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x50e70
movq (%rsp), %rdi
movsd %xmm0, 0x48(%rsp)
addq $0x1a0, %rdi            # imm = 0x1A0
leaq 0x20(%rsp), %rsi
callq 0x50ea0
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x4f7c7
addq $0xc8, %rsp
retq
nopl (%rax)
// File: IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::intersect_ray(Ray&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&)
double WaveObject::intersect_ray(Ray& ray, Eigen::Vector3d &hit_normal){
    // Find max and min of search
    double near_edge = 0;
    double far_edge = 1;
    if (!bounding_box->ray_intersects(ray, near_edge, far_edge))
        return MISSED_T_VALUE;

    // Step along ray between max and min
    double t_value = step_search(ray, near_edge, far_edge);
    // //std::cout << "near&far: " << near_edge << ", " << far_edge << "\n" << "ray: \n" << ray.get_dir() << "\n\n\n";
    if (t_value >= near_edge && t_value <= far_edge){
        //std::cout << "Here\n";
        t_value = refine_search(ray, t_value);
        hit_normal = find_surf_norm(ray, t_value);
    } else{
        t_value = MISSED_T_VALUE;
    }
    //std::cout << t_value << "\n";
    return t_value;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq 0x48(%rsp), %rdi
movq %rdi, (%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0xd70b(%rip), %xmm0     # 0x5d008
movsd %xmm0, 0x28(%rsp)
addq $0x198, %rdi            # imm = 0x198
callq 0x50a30
movq %rax, %rdi
movq 0x40(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
callq 0x16640
testb $0x1, %al
jne 0x4f941
movq (%rsp), %rax
movsd 0x188(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0x4f9e3
movq (%rsp), %rdi
movq 0x40(%rsp), %rsi
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0x4f9f0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
ucomisd 0x30(%rsp), %xmm0
jb 0x4f9c5
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x4f9c5
movq (%rsp), %rdi
movq 0x40(%rsp), %rsi
movsd 0x20(%rsp), %xmm0
callq 0x4fb40
movq (%rsp), %rsi
movsd %xmm0, 0x20(%rsp)
movq 0x40(%rsp), %rdx
movsd 0x20(%rsp), %xmm0
leaq 0x8(%rsp), %rdi
callq 0x4fc50
movq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x9d10
jmp 0x4f9d7
movq (%rsp), %rax
movsd 0x188(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
addq $0x58, %rsp
retq
nop
// File: IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::step_search(Ray&, double, double)
double WaveObject::step_search(Ray& ray, double start, double end){
    double current_pos = start;
    Eigen::Vector3d ray_pos = ray.get_ray_loc(start);
    bool start_side = is_above_wave(ray_pos);
    do {
        current_pos += search_step;
        ray_pos = ray.get_ray_loc(current_pos);
    } while (current_pos < end && is_above_wave(ray_pos) == start_side);

    return current_pos;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movsd %xmm0, 0x90(%rsp)
movsd %xmm1, 0x88(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movsd 0x90(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movq 0x98(%rsp), %rsi
movsd 0x90(%rsp), %xmm0
leaq 0x68(%rsp), %rdi
callq 0x5cbb0
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xa4f0
movq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x4fe50
andb $0x1, %al
movb %al, 0x67(%rsp)
movq 0x10(%rsp), %rax
movsd 0x1b8(%rax), %xmm0
addsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movq 0x98(%rsp), %rsi
movsd 0x80(%rsp), %xmm0
leaq 0x30(%rsp), %rdi
callq 0x5cbb0
leaq 0x68(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9d10
movsd 0x80(%rsp), %xmm1
movsd 0x88(%rsp), %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, 0xf(%rsp)
jbe 0x4fb14
leaq 0x18(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0xa4f0
movq 0x10(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x4fe50
andb $0x1, %al
movzbl %al, %eax
movb 0x67(%rsp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
sete %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x4fa77
movsd 0x80(%rsp), %xmm0
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)
// File: IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::refine_search(Ray&, double)
double WaveObject::refine_search(Ray &ray, double search_end){
    // Use Binary search to find a precise t_value that is close to where the intersection occurs
    double search_start = search_end - search_step;
    bool start_side = is_above_wave(ray.get_ray_loc(search_start));
    double step_middle;

    for (int i=0; i<48; i++){
        step_middle = (search_end - search_start) / 2 + search_start;
        bool middle_side = is_above_wave(ray.get_ray_loc(step_middle));
        if (middle_side == start_side){
            search_start = step_middle;
        } else{
            search_end = step_middle;
        }
    }
    return step_middle;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movsd %xmm0, 0x60(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x8(%rsp)
movsd 0x60(%rsp), %xmm0
subsd 0x1b8(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x68(%rsp), %rsi
movsd 0x58(%rsp), %xmm0
leaq 0x38(%rsp), %rdi
callq 0x5cbb0
movq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x4fe50
andb $0x1, %al
movb %al, 0x57(%rsp)
movl $0x0, 0x2c(%rsp)
cmpl $0x30, 0x2c(%rsp)
jge 0x4fc40
movsd 0x60(%rsp), %xmm0
subsd 0x58(%rsp), %xmm0
movsd 0x1709d(%rip), %xmm1    # 0x66c60
divsd %xmm1, %xmm0
addsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x68(%rsp), %rsi
movsd 0x30(%rsp), %xmm0
leaq 0x10(%rsp), %rdi
callq 0x5cbb0
movq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x4fe50
andb $0x1, %al
movb %al, 0x2b(%rsp)
movb 0x2b(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movb 0x57(%rsp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x4fc22
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
jmp 0x4fc2e
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
jmp 0x4fc30
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x4fba4
movsd 0x30(%rsp), %xmm0
addq $0x78, %rsp
retq
nopl (%rax,%rax)
// File: 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:
subq $0x188, %rsp            # imm = 0x188
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x180(%rsp)
movq %rsi, 0x178(%rsp)
movq %rdx, 0x170(%rsp)
movsd %xmm0, 0x168(%rsp)
movq 0x178(%rsp), %rax
movq %rax, (%rsp)
movsd 0x1f08f(%rip), %xmm0    # 0x6ed28
movsd %xmm0, 0x160(%rsp)
movq 0x170(%rsp), %rsi
movsd 0x168(%rsp), %xmm0
leaq 0x148(%rsp), %rdi
callq 0x5cbb0
xorps %xmm0, %xmm0
movsd %xmm0, 0x140(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x138(%rsp)
leaq 0x120(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0xa4f0
movq (%rsp), %rdi
leaq 0x120(%rsp), %rsi
leaq 0x140(%rsp), %rdx
leaq 0x138(%rsp), %rcx
callq 0x4ffb0
movq (%rsp), %rsi
movsd 0x140(%rsp), %xmm0
movsd 0x138(%rsp), %xmm1
leaq 0x108(%rsp), %rdi
callq 0x50040
movq (%rsp), %rsi
movsd 0x140(%rsp), %xmm0
addsd 0x160(%rsp), %xmm0
movsd 0x138(%rsp), %xmm1
leaq 0xf0(%rsp), %rdi
callq 0x50040
movq (%rsp), %rsi
movsd 0x140(%rsp), %xmm0
movsd 0x138(%rsp), %xmm1
addsd 0x160(%rsp), %xmm1
leaq 0xd8(%rsp), %rdi
callq 0x50040
leaq 0xa8(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
leaq 0x108(%rsp), %rdx
callq 0x9e80
leaq 0xc0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xdcc0
leaq 0x78(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0x108(%rsp), %rdx
callq 0x9e80
leaq 0x90(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xdcc0
movl $0xffffffff, 0x4c(%rsp) # imm = 0xFFFFFFFF
leaq 0x18(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0xa000
leaq 0x30(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x9d50
leaq 0x50(%rsp), %rdi
leaq 0x4c(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x12100
movq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x1ec70
movq 0x10(%rsp), %rax
addq $0x188, %rsp            # imm = 0x188
retq
nopl (%rax,%rax)
// File: 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:
subq $0x108, %rsp            # imm = 0x108
movq %rsi, 0x10(%rsp)
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xf0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xe8(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0xa4f0
movq 0x8(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
leaq 0xe8(%rsp), %rcx
callq 0x4ffb0
movq 0x8(%rsp), %rsi
movsd 0xf0(%rsp), %xmm0
movsd 0xe8(%rsp), %xmm1
leaq 0xb8(%rsp), %rdi
callq 0x50040
movq 0x8(%rsp), %rdx
addq $0x240, %rdx            # imm = 0x240
leaq 0x88(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x1e4b0
leaq 0xa0(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x50a40
movq 0x8(%rsp), %rdx
addq $0x240, %rdx            # imm = 0x240
leaq 0x58(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x9e80
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xdcc0
movq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x9e80
leaq 0x38(%rsp), %rdi
callq 0x32400
movq 0x10(%rsp), %rsi
movsd %xmm0, 0x50(%rsp)
leaq 0x18(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x9e80
leaq 0x18(%rsp), %rdi
callq 0x32400
movsd %xmm0, 0x30(%rsp)
movsd 0x50(%rsp), %xmm1
movsd 0x30(%rsp), %xmm0
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
addq $0x108, %rsp            # imm = 0x108
retq
nop
// File: IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::find_min_max(Eigen::Matrix<double, 3, 1, 0, 3, 1>&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&)
void WaveObject::find_min_max(Eigen::Vector3d &min, Eigen::Vector3d &max){
    // On the bounded 2d wave space find the min and max x,y,z values
    double safety_margin = 2;
    for (int dir_one=0; dir_one<=1; dir_one++){
        for (int dir_two=0; dir_two<=1; dir_two++){
            Eigen::Vector3d current = first_corner + dir_one*side_len_one*direction_one
                                                   + dir_two*side_len_two*direction_two;
            for (int i=1; i<=2; i++){
                int sign = 3 - i * 2;  // Extract 1 or -1
                Eigen::Vector3d with_wave = current + sign * surface_normal * wave_height * safety_margin;
                extract_vector_extremes(with_wave, min, max);
            }

        }
    }
}

// Assembly:
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rdi, 0x2e0(%rsp)
movq %rsi, 0x2d8(%rsp)
movq %rdx, 0x2d0(%rsp)
movq 0x2e0(%rsp), %rax
movq %rax, 0x10(%rsp)
movsd 0x168dc(%rip), %xmm0    # 0x66c60
movsd %xmm0, 0x2c8(%rsp)
movl $0x0, 0x2c4(%rsp)
cmpl $0x1, 0x2c4(%rsp)
jg 0x505bb
movl $0x0, 0x2c0(%rsp)
cmpl $0x1, 0x2c0(%rsp)
jg 0x505a3
movq 0x10(%rsp), %rdx
movq %rdx, %rax
addq $0x1e0, %rax            # imm = 0x1E0
movq %rax, 0x8(%rsp)
cvtsi2sdl 0x2c4(%rsp), %xmm0
mulsd 0x1d0(%rdx), %xmm0
movsd %xmm0, 0x1d0(%rsp)
addq $0x210, %rdx            # imm = 0x210
leaq 0x1d8(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0xa310
movq 0x8(%rsp), %rsi
leaq 0x200(%rsp), %rdi
leaq 0x1d8(%rsp), %rdx
callq 0xa2a0
movq 0x10(%rsp), %rdx
cvtsi2sdl 0x2c0(%rsp), %xmm0
mulsd 0x1d8(%rdx), %xmm0
movsd %xmm0, 0x1a0(%rsp)
addq $0x228, %rdx            # imm = 0x228
leaq 0x1a8(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0xa310
leaq 0x238(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x1a8(%rsp), %rdx
callq 0xa3d0
leaq 0x2a8(%rsp), %rdi
leaq 0x238(%rsp), %rsi
callq 0x50b90
movl $0x1, 0x19c(%rsp)
cmpl $0x2, 0x19c(%rsp)
jg 0x5058b
movq 0x10(%rsp), %rdx
movl 0x19c(%rsp), %ecx
shll %ecx
movl $0x3, %eax
subl %ecx, %eax
movl %eax, 0x198(%rsp)
addq $0x240, %rdx            # imm = 0x240
leaq 0x30(%rsp), %rdi
leaq 0x198(%rsp), %rsi
callq 0x12100
movq 0x10(%rsp), %rdx
addq $0x1c0, %rdx            # imm = 0x1C0
leaq 0x58(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x50c40
leaq 0xa0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x2c8(%rsp), %rdx
callq 0x50d00
leaq 0x108(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
callq 0x50bd0
leaq 0x180(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x50dc0
leaq 0x18(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0xa4f0
movq 0x10(%rsp), %rdi
movq 0x2d8(%rsp), %rdx
movq 0x2d0(%rsp), %rcx
leaq 0x18(%rsp), %rsi
callq 0x505d0
movl 0x19c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x19c(%rsp)
jmp 0x5049a
jmp 0x5058d
movl 0x2c0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c0(%rsp)
jmp 0x503b1
jmp 0x505a5
movl 0x2c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c4(%rsp)
jmp 0x50398
addq $0x2e8, %rsp            # imm = 0x2E8
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x58, %rsp
movq %rsi, 0x28(%rsp)
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movl $0x0, 0x34(%rsp)
cmpl $0x2, 0x34(%rsp)
jg 0x506e2
movq 0x28(%rsp), %rdi
movslq 0x34(%rsp), %rsi
callq 0x6130
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x40(%rsp), %rdi
movslq 0x34(%rsp), %rsi
callq 0x6130
movsd 0x20(%rsp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5066a
movq 0x28(%rsp), %rdi
movslq 0x34(%rsp), %rsi
callq 0x6130
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x40(%rsp), %rdi
movslq 0x34(%rsp), %rsi
callq 0x6130
movsd 0x18(%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x28(%rsp), %rdi
movslq 0x34(%rsp), %rsi
callq 0x6130
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x34(%rsp), %rsi
callq 0x6130
movsd 0x10(%rsp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x506d0
movq 0x28(%rsp), %rdi
movslq 0x34(%rsp), %rsi
callq 0x6130
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movslq 0x34(%rsp), %rsi
callq 0x6130
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
jmp 0x506d2
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x505f5
addq $0x58, %rsp
retq
nopw (%rax,%rax)
// File: 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:
subq $0x248, %rsp            # imm = 0x248
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x240(%rsp)
movq %rsi, 0x238(%rsp)
movsd %xmm0, 0x230(%rsp)
movq 0x238(%rsp), %rsi
movq %rsi, 0x8(%rsp)
addq $0x210, %rsi            # imm = 0x210
leaq 0x218(%rsp), %rdi
callq 0xa4f0
movq 0x8(%rsp), %rsi
addq $0x240, %rsi            # imm = 0x240
leaq 0x200(%rsp), %rdi
callq 0xa4f0
leaq 0x1e8(%rsp), %rdi
leaq 0x200(%rsp), %rsi
callq 0x9d50
leaq 0x200(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x9e50
movsd 0x230(%rsp), %xmm0
callq 0x4620
movsd %xmm0, 0xd0(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0x218(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x1ed20
leaq 0x98(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x218(%rsp), %rdx
callq 0xa000
movsd 0x230(%rsp), %xmm0
callq 0x40b0
movsd %xmm0, 0x90(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x1ed20
leaq 0xf8(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
leaq 0xb0(%rsp), %rdx
callq 0x50f10
leaq 0x200(%rsp), %rdi
leaq 0x218(%rsp), %rsi
callq 0x1e440
movsd %xmm0, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x200(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x1ed20
movsd 0x230(%rsp), %xmm0
callq 0x4620
movaps %xmm0, %xmm1
movsd 0xc79a(%rip), %xmm0     # 0x5d008
subsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x50ff0
leaq 0x148(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x50f80
movq 0x10(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x510b0
movq 0x18(%rsp), %rax
addq $0x248, %rsp            # imm = 0x248
retq
nopw %cs:(%rax,%rax)
nop
// File: 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:
subq $0xd8, %rsp
movq %rcx, 0x28(%rsp)
movq %rdi, 0xd0(%rsp)
movl %esi, 0xcc(%rsp)
movl %edx, 0xc8(%rsp)
movq %rcx, 0xc0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x30(%rsp)
movl 0xc8(%rsp), %eax
subl 0xcc(%rsp), %eax
movl %eax, 0xbc(%rsp)
cmpl $0x0, 0xbc(%rsp)
jne 0x55efb
jmp 0x56081
movq 0x28(%rsp), %rsi
cvtsi2sdl 0xbc(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
leaq 0x88(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x17a50
movq 0x30(%rsp), %rsi
movsd 0x18(%rsp), %xmm0
movq 0x20(%rsp), %rdx
leaq 0xa0(%rsp), %rdi
callq 0x560a0
jmp 0x55f40
leaq 0x88(%rsp), %rdi
callq 0x116d0
movl $0x1, 0x78(%rsp)
movl 0x78(%rsp), %eax
movl 0xbc(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x56074
leaq 0x50(%rsp), %rdi
callq 0x56390
jmp 0x55f77
movl 0xcc(%rsp), %edx
movl 0x78(%rsp), %eax
movl %eax, %ecx
movl %edx, %eax
leal -0x1(%rax,%rcx), %eax
movl %eax, 0x50(%rsp)
xorl %eax, %eax
movl %eax, %esi
leaq 0xa0(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x17ca0
movq (%rsp), %rdi
movq %rax, 0x8(%rsp)
movl $0x1, %esi
callq 0x17ca0
movq (%rsp), %rdi
movq %rax, 0x10(%rsp)
movl $0x2, %esi
callq 0x17ca0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
leaq 0x38(%rsp), %rdi
callq 0x9c70
jmp 0x55fe2
leaq 0x58(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x9d10
leaq 0xa0(%rsp), %rdi
movl $0x3, %esi
callq 0x17ca0
movq 0x30(%rsp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x70(%rsp)
addq $0x58, %rdi
leaq 0x50(%rsp), %rsi
callq 0x563b0
jmp 0x56022
jmp 0x56024
movl 0x78(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x78(%rsp)
jmp 0x55f55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x116d0
jmp 0x56089
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x116d0
jmp 0x56089
leaq 0xa0(%rsp), %rdi
callq 0x116d0
addq $0xd8, %rsp
retq
movq 0x80(%rsp), %rdi
callq 0x45e0
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x88, %rsp
movq %rdx, 0x20(%rsp)
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movsd %xmm0, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movb $0x0, 0x67(%rsp)
callq 0x179d0
movq 0x20(%rsp), %rdx
movq %rdx, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0x18510
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0x18380
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x56420
testb $0x1, %al
jne 0x56118
jmp 0x56183
leaq 0x50(%rsp), %rdi
callq 0x56460
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x40(%rsp), %xmm0
movq 0x44e87(%rip), %rdi     # 0x9afc0
callq 0x4630
movq %rax, 0x8(%rsp)
jmp 0x56145
movq 0x8(%rsp), %rdi
movq 0x44e3f(%rip), %rsi     # 0x9af90
callq 0x43a0
jmp 0x56158
jmp 0x5615a
leaq 0x50(%rsp), %rdi
callq 0x56470
jmp 0x56103
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x38(%rsp)
movl %eax, 0x34(%rsp)
callq 0x116d0
jmp 0x56204
movl $0x0, 0x30(%rsp)
cmpl $0x4, 0x30(%rsp)
jge 0x561e1
movq 0x20(%rsp), %rdi
movslq 0x30(%rsp), %rsi
callq 0x17ca0
movq 0x10(%rsp), %rdi
movsd (%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
leaq 0x28(%rsp), %rsi
callq 0x179e0
jmp 0x561d2
jmp 0x561d4
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x5618b
movb $0x1, 0x67(%rsp)
testb $0x1, 0x67(%rsp)
jne 0x561f7
movq 0x10(%rsp), %rdi
callq 0x116d0
movq 0x18(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x38(%rsp), %rdi
callq 0x45e0
nop
// File: 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:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x562e0
testb $0x1, %al
jne 0x5625e
jmp 0x562d1
movq 0x8(%rsp), %rax
movq %rax, %rdi
addq $0x58, %rdi
movl 0x8(%rax), %eax
movl %eax, %esi
callq 0x56490
movq %rax, %rsi
leaq 0x28(%rsp), %rdi
callq 0x564b0
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rax
movq %rax, (%rsp)
leaq 0x28(%rsp), %rsi
addq $0x8, %rsi
leaq 0x10(%rsp), %rdi
callq 0xa4f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x3c5c0
movq 0x8(%rsp), %rax
movq 0x70(%rax), %rdi
movsd 0x48(%rsp), %xmm0
callq 0x3c610
movq 0x8(%rsp), %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x128, %rsp            # imm = 0x128
movq %rdi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movq %rdx, 0x110(%rsp)
movl %ecx, 0x10c(%rsp)
movq 0x120(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x16580
movq 0x38(%rsp), %rdi
movq 0x118(%rsp), %rax
movq %rax, 0x30(%rdi)
movq 0x110(%rsp), %rax
movq %rax, 0x38(%rdi)
addq $0x40, %rdi
movq %rdi, 0x28(%rsp)
callq 0x589e0
movq 0x38(%rsp), %rdi
addq $0x58, %rdi
movq %rdi, 0x30(%rsp)
callq 0x589f0
movq 0x38(%rsp), %rdi
addq $0x88, %rdi
callq 0x11e20
jmp 0x570b9
movq 0x38(%rsp), %rdi
movl 0x10c(%rsp), %eax
movl %eax, 0xa0(%rdi)
callq 0x57200
jmp 0x570d2
movq 0x38(%rsp), %rdx
movq %rdx, %rsi
addq $0x18, %rsi
leaq 0x58(%rsp), %rdi
callq 0x9e80
jmp 0x570ea
movl $0x2, 0x54(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0x54(%rsp), %rdx
callq 0x58a00
jmp 0x57108
movq 0x38(%rsp), %rdx
leaq 0xa8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x58ad0
jmp 0x57121
movq 0x38(%rsp), %rdi
addq $0x88, %rdi
leaq 0xa8(%rsp), %rsi
callq 0x58b40
jmp 0x5713c
movl $0x0, 0x50(%rsp)
movq 0x38(%rsp), %rax
movslq 0x50(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq 0x38(%rax), %rdi
callq 0x1da50
movq %rax, 0x20(%rsp)
jmp 0x57163
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq %rcx, %rax
jge 0x571d9
movq 0x38(%rsp), %rdi
addq $0x58, %rdi
leaq 0x50(%rsp), %rsi
callq 0x58b70
movb %dl, 0xf(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x57190
movb 0xf(%rsp), %al
movq 0x10(%rsp), %rcx
movq %rcx, 0x40(%rsp)
movb %al, 0x48(%rsp)
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x57144
movq 0x30(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x100(%rsp)
movl %eax, 0xfc(%rsp)
callq 0x1ec60
movq 0x28(%rsp), %rdi
callq 0x20c00
jmp 0x571ed
movq 0x38(%rsp), %rdi
callq 0x57340
jmp 0x571e5
addq $0x128, %rsp            # imm = 0x128
retq
movq 0x100(%rsp), %rdi
callq 0x45e0
nopw (%rax,%rax)
// File: 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:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x58f80
movsd %xmm0, 0x98(%rsp)
callq 0x58f90
movq 0x20(%rsp), %rsi
movsd %xmm0, 0x90(%rsp)
addq $0x18, %rsi
leaq 0x70(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0x98(%rsp), %rdx
movq %rdx, 0x30(%rsp)
callq 0x11f20
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x11f60
movq %rax, 0x38(%rsp)
jmp 0x57273
movq 0x38(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x11f60
jmp 0x57287
leaq 0x70(%rsp), %rdi
callq 0x120e0
movq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0x90(%rsp), %rdx
movq %rdx, 0x10(%rsp)
callq 0x11f20
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x11f60
movq %rax, 0x18(%rsp)
jmp 0x572c8
movq 0x18(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x11f60
jmp 0x572dc
leaq 0x40(%rsp), %rdi
callq 0x120e0
movq 0x20(%rsp), %rdi
callq 0x584c0
addq $0xa8, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x120e0
jmp 0x5732a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x68(%rsp)
movl %eax, 0x64(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x120e0
movq 0x68(%rsp), %rdi
callq 0x45e0
nopw %cs:(%rax,%rax)
// File: 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:
subq $0x108, %rsp            # imm = 0x108
movq %rcx, (%rsp)
movq %r8, 0x8(%rsp)
movq %rdi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
movl %edx, 0xf4(%rsp)
movq %rcx, 0xe8(%rsp)
movq %r8, 0xe0(%rsp)
movq 0x100(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x16580
movq 0x20(%rsp), %rdi
movq 0xf8(%rsp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x30(%rdi)
movq 0xf8(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x38(%rdi)
addq $0x40, %rdi
movq %rdi, 0x10(%rsp)
callq 0x589e0
movq 0x20(%rsp), %rdi
addq $0x58, %rdi
movq %rdi, 0x18(%rsp)
callq 0x589f0
movq 0x20(%rsp), %rdi
addq $0x88, %rdi
callq 0x11e20
jmp 0x57812
movq (%rsp), %rsi
movq 0x20(%rsp), %rdi
movl 0xf4(%rsp), %eax
decl %eax
movl %eax, 0xa0(%rdi)
callq 0x9e50
jmp 0x57831
movq 0x8(%rsp), %rsi
movq 0x20(%rsp), %rdi
addq $0x18, %rdi
callq 0x9e50
jmp 0x57846
movq (%rsp), %rdx
movq 0x8(%rsp), %rsi
leaq 0x30(%rsp), %rdi
callq 0x9e80
jmp 0x5785b
movl $0x2, 0x2c(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x2c(%rsp), %rdx
callq 0x58a00
jmp 0x57879
movq (%rsp), %rdx
leaq 0x80(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x58ad0
jmp 0x57891
movq 0x20(%rsp), %rdi
addq $0x88, %rdi
leaq 0x80(%rsp), %rsi
callq 0x58b40
jmp 0x578ac
movq 0x20(%rsp), %rdi
movq 0xf8(%rsp), %rsi
addq $0x58, %rsi
callq 0x57910
jmp 0x578c4
movq 0x20(%rsp), %rdi
callq 0x57340
jmp 0x578d0
addq $0x108, %rsp            # imm = 0x108
retq
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd8(%rsp)
movl %eax, 0xd4(%rsp)
callq 0x1ec60
movq 0x10(%rsp), %rdi
callq 0x20c00
movq 0xd8(%rsp), %rdi
callq 0x45e0
nopl (%rax)
// File: 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:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, (%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x11e20
leaq 0x98(%rsp), %rdi
callq 0x11e20
leaq 0x80(%rsp), %rdi
callq 0x11e20
movq 0xc8(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x78(%rsp), %rdi
callq 0x1e7f0
movq %rax, 0x70(%rsp)
movq 0x78(%rsp), %rdi
callq 0x1e820
movq %rax, 0x68(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1e850
testb $0x1, %al
jne 0x5799d
jmp 0x57ab6
leaq 0x70(%rsp), %rdi
callq 0x1e870
movq %rax, %rcx
movq (%rsp), %rax
movl (%rcx), %ecx
movl %ecx, 0x64(%rsp)
movq 0x38(%rax), %rdi
movslq 0x64(%rsp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x1da60
movq (%rsp), %rsi
movl (%rax), %edx
subl $0x1, %edx
leaq 0x48(%rsp), %rdi
callq 0x57ac0
leaq 0xb0(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x9d10
movq (%rsp), %rax
movq 0x38(%rax), %rdi
movslq 0x64(%rsp), %rdx
movl $0x1, %esi
callq 0x1da60
movq (%rsp), %rsi
movl (%rax), %edx
subl $0x1, %edx
leaq 0x30(%rsp), %rdi
callq 0x57ac0
leaq 0x98(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9d10
movq (%rsp), %rax
movq 0x38(%rax), %rdi
movslq 0x64(%rsp), %rdx
movl $0x2, %esi
callq 0x1da60
movq (%rsp), %rsi
movl (%rax), %edx
subl $0x1, %edx
leaq 0x18(%rsp), %rdi
callq 0x57ac0
leaq 0x80(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x9d10
movq (%rsp), %rdi
leaq 0xb0(%rsp), %rsi
leaq 0x98(%rsp), %rdx
leaq 0x80(%rsp), %rcx
callq 0x57b60
testb $0x1, %al
jne 0x57a8a
jmp 0x57aa5
movq (%rsp), %rdi
addq $0x58, %rdi
leaq 0x64(%rsp), %rsi
callq 0x58b70
movq %rax, 0x8(%rsp)
movb %dl, 0x10(%rsp)
jmp 0x57aa7
leaq 0x70(%rsp), %rdi
callq 0x1ec30
jmp 0x57985
addq $0xd8, %rsp
retq
nop
// File: 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:
subq $0x98, %rsp
movq 0xb0(%rsp), %rax
movq 0xa8(%rsp), %rax
movq 0xa0(%rsp), %rax
movq %rdi, 0x88(%rsp)
movq %rsi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movq %rcx, 0x70(%rsp)
movq %r8, 0x68(%rsp)
movq %r9, 0x60(%rsp)
movq 0x88(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x70(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x1e440
movsd %xmm0, 0x58(%rsp)
movq 0x68(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x1e440
movsd %xmm0, 0x50(%rsp)
movq 0x60(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x1e440
movsd %xmm0, 0x48(%rsp)
movq 0x78(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x58c50
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0xa0(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x1e440
callq 0x6540
movsd %xmm0, 0x8(%rsp)
movq 0x78(%rsp), %rdi
movl $0x1, %esi
callq 0x58c50
movsd (%rax), %xmm0
movsd %xmm0, (%rsp)
movq 0xa8(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x1e440
callq 0x6540
movsd (%rsp), %xmm1
movsd 0x8(%rsp), %xmm2
movaps %xmm0, %xmm3
movsd 0x10(%rsp), %xmm0
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x78(%rsp), %rdi
movl $0x2, %esi
callq 0x58c50
movsd (%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0xb0(%rsp), %rdi
movq 0x80(%rsp), %rsi
callq 0x1e440
callq 0x6540
movsd 0x18(%rsp), %xmm1
movq 0x28(%rsp), %rdi
movaps %xmm0, %xmm2
movsd 0x20(%rsp), %xmm0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x58(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
movsd 0x48(%rsp), %xmm2
callq 0x58220
movq 0x28(%rsp), %rdi
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x58(%rsp), %xmm0
movsd 0x50(%rsp), %xmm1
movsd 0x48(%rsp), %xmm2
callq 0x58260
movsd %xmm0, 0x30(%rsp)
leaq 0x38(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x58bd0
movsd (%rax), %xmm0
ucomisd 0x40(%rsp), %xmm0
jbe 0x58498
movb $0x0, 0x97(%rsp)
jmp 0x584a0
movb $0x1, 0x97(%rsp)
movb 0x97(%rsp), %al
andb $0x1, %al
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)
// File: 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:
subq $0xb8, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x18(%rsp)
movb $0x0, 0x9f(%rsp)
callq 0x589f0
movq 0x18(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x16610
movb %al, 0x27(%rsp)
jmp 0x5882e
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x58869
jmp 0x58838
movb $0x1, 0x9f(%rsp)
movl $0x1, 0x88(%rsp)
jmp 0x5899a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x589bb
movq 0x18(%rsp), %rdi
addq $0x40, %rdi
callq 0x58fa0
cmpq $0x0, %rax
jbe 0x58970
movq 0x18(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rdi
callq 0x58fc0
movq %rax, 0x78(%rsp)
movq 0x80(%rsp), %rdi
callq 0x58ff0
movq %rax, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x59020
testb $0x1, %al
jne 0x588ce
jmp 0x5896e
leaq 0x78(%rsp), %rdi
callq 0x59060
movq %rax, 0x68(%rsp)
movq 0x68(%rsp), %rdi
callq 0x1e7e0
movq %rax, %rsi
movq 0xa0(%rsp), %rdx
leaq 0x38(%rsp), %rdi
callq 0x587d0
jmp 0x588fe
leaq 0x38(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x1e7f0
movq (%rsp), %rdi
movq %rax, 0x30(%rsp)
callq 0x1e820
movq 0x8(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x59070
jmp 0x58935
leaq 0x38(%rsp), %rdi
callq 0x1ec60
leaq 0x78(%rsp), %rdi
callq 0x590b0
jmp 0x588b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x1ec60
jmp 0x589bb
jmp 0x58987
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x58, %rsi
callq 0x590d0
jmp 0x58985
jmp 0x58987
movb $0x1, 0x9f(%rsp)
movl $0x1, 0x88(%rsp)
testb $0x1, 0x9f(%rsp)
jne 0x589ae
movq 0x8(%rsp), %rdi
callq 0x1ec60
movq 0x10(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x8(%rsp), %rdi
callq 0x1ec60
movq 0x90(%rsp), %rdi
callq 0x45e0
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: IsaacLaw12[P]RayTracer/./Eigen/Eigen/src/Core/DenseCoeffsBase.h
// Function: Eigen::DenseCoeffsBase<Eigen::Matrix<double, 3, 1, 0, 3, 1>, 0>::operator[](long) const
CoeffReturnType
    operator[](Index index) const
    {
      EIGEN_STATIC_ASSERT(Derived::IsVectorAtCompileTime,
                          THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD)
      eigen_assert(index >= 0 && index < size());
      return coeff(index);
    }

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
xorl %eax, %eax
cmpq $0x0, 0x18(%rsp)
movb %al, 0x17(%rsp)
jl 0x58c9a
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movq %rax, (%rsp)
callq 0x8660
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
setl %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x58ca4
jmp 0x58ca6
jmp 0x58cc5
leaq 0x4c99(%rip), %rdi      # 0x5d946
leaq 0x4bd9(%rip), %rsi      # 0x5d88d
movl $0xa2, %edx
leaq 0x19c0d(%rip), %rcx     # 0x728cd
callq 0x4220
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x16b20
addq $0x28, %rsp
retq
nopl (%rax)
// File: 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
subq $0x50, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x50(%rbp), %rsi
leaq 0x150(%rip), %rdi       # 0x3021
callq 0x2d60
leaq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x2e20
movq 0x20ee(%rip), %rdi      # 0x4fd8
leaq 0x13d(%rip), %rsi       # 0x302e
callq 0x1060
movq %rax, %rdi
leaq -0x40(%rbp), %rsi
callq 0x1060
movq %rax, %rdi
leaq 0x13c(%rip), %rsi       # 0x3048
callq 0x1060
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movaps 0x1a89(%rip), %xmm1     # 0x4020
movq -0x10(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1a88(%rip), %xmm1     # 0x4030
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x1a51(%rip), %xmm1     # 0x4010
divsd %xmm1, %xmm0
callq 0x2070
movaps %xmm0, %xmm1
movsd 0x1a35(%rip), %xmm0     # 0x4008
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x22d0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x2619
movq 0x39d2(%rip), %rax      # 0x5fd0
movq (%rax), %rdi
leaq 0x1a38(%rip), %rsi      # 0x4040
movb $0x0, %al
callq 0x2300
movl $0x1, %edi
callq 0x22b0
callq 0x2210
movq %rax, %rdi
callq 0x2380
movq %rax, -0x28(%rbp)
callq 0x21c0
movq %rax, %rdi
callq 0x2380
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x2230
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2060
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rax
movl %eax, %edx
callq 0x2250
movq -0x30(%rbp), %rdi
movl $0xb, %esi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x20b0
movq -0x30(%rbp), %rdi
movl $0x73, %esi
xorl %eax, %eax
movl %eax, %edx
leaq -0x38(%rbp), %rcx
callq 0x20b0
movq -0x30(%rbp), %rdi
movl $0x9, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
callq 0x20b0
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x38(%rbp), %rax
movq (%rax), %rdx
addq $0x1, %rdx
callq 0x21a0
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
callq 0x20e0
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x27e0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x22d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2758
movq 0x3893(%rip), %rax      # 0x5fd0
movq (%rax), %rdi
leaq 0x18f9(%rip), %rsi      # 0x4040
movb $0x0, %al
callq 0x2300
movl $0x1, %edi
callq 0x22b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl %eax, %esi
callq 0x2090
movq %rax, -0x28(%rbp)
callq 0x2210
movq %rax, %rdi
callq 0x2380
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x2230
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2060
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl %eax, %edx
callq 0x2280
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x28(%rbp), %rdi
callq 0x20e0
movl -0x1c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x2826
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x2, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x2826
movl $0x2, -0x14(%rbp)
jmp 0x2844
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x2842
movl $0x1, -0x14(%rbp)
jmp 0x2844
cvtsi2sdl -0x10(%rbp), %xmm0
movl -0x14(%rbp), %eax
cvtsi2sd %rax, %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
movsd 0x17a8(%rip), %xmm2     # 0x4018
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
popq %rbp
retq
nop
// File: shanet[P]Crypto-Example/Crypto.cpp
// Function: Crypto::Crypto()
Crypto::Crypto() {
  localKeypair = NULL;
  remotePublicKey = NULL;

  #ifdef PSEUDO_CLIENT
    generateRsaKeypair(&remotePublicKey);
  #endif

  init();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x10(%rbp)
movq $0x0, 0x3989(%rip) # 0x6228
movq $0x0, (%rsi)
movq %rsi, %rdi
callq 0x28c0
movq -0x10(%rbp), %rdi
callq 0x2950
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)