LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Model.cpp
// Function: Model::Model(Model const&)
Model::Model(const Model&old_model){
    // AFTER COPYING on_model_load() NEEDS TO BE CALLED
    Vertices = Eigen::MatrixXd(old_model.Vertices);
    Faces = Eigen::MatrixXi(old_model.Faces);
    FaceNormals = Eigen::MatrixXd(old_model.FaceNormals);
    vertex_to_faces = old_model.vertex_to_faces;
    vertex_normals = old_model.vertex_normals;
    original_file = old_model.original_file;
    animation_file = old_model.animation_file;
    smoothing = old_model.smoothing;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbp
movq %rdi, %rbx
callq 0xa1fe
leaq 0x2114e(%rip), %rax     # 0x29c50
movq %rax, (%rbx)
movl $0x198, %edx            # imm = 0x198
leaq 0x1e0(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x1f8(%rbx), %r12
leaq 0x220(%rbx), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x190(%rbx)
movups %xmm0, 0x1a0(%rbx)
movups %xmm0, 0x1b0(%rbx)
movups %xmm0, 0x1c0(%rbx)
movups %xmm0, 0x1d0(%rbx)
movups %xmm0, 0x1e0(%rbx)
movups %xmm0, 0x1f0(%rbx)
movups %xmm0, 0x200(%rbx)
movq %rax, 0x210(%rbx)
andq $0x0, 0x218(%rbx)
leaq 0x210(%rbx), %r13
xorl %eax, %eax
movb %al, 0x220(%rbx)
leaq 0x240(%rbx), %rcx
movq %rcx, 0x230(%rbx)
andq $0x0, 0x238(%rbx)
leaq 0x230(%rbx), %r14
movb %al, 0x240(%rbx)
movw $0x1, 0x250(%rbx)
leaq (%rdx,%rbp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x4c18
leaq 0x18(%rsp), %r15
movq (%r15), %rax
movq 0x198(%rbx), %rdi
movq %rdi, (%r15)
movq %rax, 0x198(%rbx)
movups 0x1a0(%rbx), %xmm0
movups 0x8(%r15), %xmm1
movups %xmm0, 0x8(%r15)
movups %xmm1, 0x1a0(%rbx)
callq 0x3300
leaq 0x1b0(%rbp), %rsi
movq %r15, %rdi
callq 0xaef4
leaq 0x18(%rsp), %r15
movq (%r15), %rax
movq 0x1b0(%rbx), %rdi
movq %rdi, (%r15)
movq %rax, 0x1b0(%rbx)
movups 0x1b8(%rbx), %xmm0
movups 0x8(%r15), %xmm1
movups %xmm0, 0x8(%r15)
movups %xmm1, 0x1b8(%rbx)
callq 0x3300
leaq 0x1c8(%rbp), %rsi
movq %r15, %rdi
callq 0x4c18
movq 0x18(%rsp), %rax
movq 0x1c8(%rbx), %rdi
movq %rdi, 0x18(%rsp)
movq %rax, 0x1c8(%rbx)
movups 0x1d0(%rbx), %xmm0
movups 0x20(%rsp), %xmm1
movups %xmm0, 0x20(%rsp)
movups %xmm1, 0x1d0(%rbx)
callq 0x3300
leaq 0x1e0(%rbp), %rsi
movq 0x10(%rsp), %rdi
callq 0xa348
leaq 0x1f8(%rbp), %rsi
movq %r12, %rdi
callq 0xa426
leaq 0x210(%rbp), %rsi
movq %r13, %rdi
callq 0x3160
leaq 0x230(%rbp), %rsi
movq %r14, %rdi
callq 0x3160
movb 0x251(%rbp), %al
movb %al, 0x251(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8cd5
jmp 0x8cd5
jmp 0x8cd5
movq %rax, 0x8(%rsp)
leaq 0x190(%rbx), %rax
movq %rax, 0x30(%rsp)
movl $0x198, %ebp            # imm = 0x198
addq %rbx, %rbp
leaq 0x1b0(%rbx), %r15
addq $0x1c8, %rbx            # imm = 0x1C8
movq %r14, %rdi
callq 0x3100
movq %r13, %rdi
callq 0x3100
movq %r12, %rdi
callq 0xaeb8
movq 0x10(%rsp), %rdi
callq 0xa30c
movq %rbx, %rdi
callq 0x4606
movq %r15, %rdi
callq 0xacf8
movq %rbp, %rdi
callq 0x4606
movq 0x30(%rsp), %rdi
callq 0xa32e
movq 0x8(%rsp), %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Model.cpp
// Function: Model::map_vertices_faces()
void Model::map_vertices_faces(){
    int num_verts = Vertices.cols();
    std::vector<std::vector<int>> temp(num_verts);
    vertex_to_faces = temp;

    for (int face_num=0; face_num<Faces.cols(); face_num++){
        for (int j=0; j<3; j++){
            int vert = Faces(j, face_num);
            vertex_to_faces[vert-1].push_back(face_num);
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movslq 0x1a8(%rdi), %rsi
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %rdx
movq %r15, %rdi
callq 0xa502
leaq 0x1e0(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0xa348
leaq 0x1b0(%rbx), %r15
xorl %edx, %edx
leaq 0x4(%rsp), %r12
movl %edx, 0x4(%rsp)
movslq %edx, %rax
cmpq %rax, 0x1c0(%rbx)
jle 0x8fef
xorl %r13d, %r13d
movslq 0x4(%rsp), %rdx
cmpq $0x3, %r13
je 0x8feb
movq %r15, %rdi
movq %r13, %rsi
callq 0xa554
movslq (%rax), %rax
movq (%r14), %rcx
imulq $0x18, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x18, %rdi
movq %r12, %rsi
callq 0xa59e
incq %r13
jmp 0x8fb6
incl %edx
jmp 0x8fa3
leaq 0x8(%rsp), %rdi
callq 0xa30c
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x9009
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xa30c
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Model.cpp
// Function: Model::calculate_face_normals()
void Model::calculate_face_normals(){
    /*
      Calculate the normal for each face by taking the cross product of two of the triangle's sides
    */
    FaceNormals = Eigen::MatrixXd();
    Eigen::Vector3d first_vertex, second_vertex, third_vertex;
    Eigen::Vector3d first_vector, second_vector;
    for (int i=0; i<Faces.cols(); i++){
        first_vertex << get_vertex( Faces(0, i) - 1 );
        second_vertex << get_vertex( Faces(1, i) - 1 );
        third_vertex << get_vertex( Faces(2, i) - 1 );
        // Calculate normal in counter clockwise direction?
        first_vector = first_vertex - third_vertex;
        second_vector = first_vertex - second_vertex;

        add_face_normal((-1*first_vector.cross(second_vector)).normalized());
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x158, %rsp            # imm = 0x158
movq %rdi, %r12
movq 0x1c8(%rdi), %rdi
xorpd %xmm0, %xmm0
movupd %xmm0, 0x1c8(%r12)
andq $0x0, 0x1d8(%r12)
callq 0x3300
leaq 0x1b0(%r12), %rax
movq %rax, 0x18(%rsp)
xorl %eax, %eax
cmpq %rax, 0x1c0(%r12)
jle 0x9212
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdx
callq 0xa554
movl (%rax), %edx
decl %edx
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x93ee
leaq 0x138(%rsp), %r13
movq %r13, %rdi
leaq 0xe0(%rsp), %r14
movq %r14, %rsi
movq %r15, %rdx
callq 0xc244
movq %r13, %rdi
callq 0x62da
movq %rbx, %rdi
pushq $0x1
popq %rsi
movq 0x8(%rsp), %rdx
callq 0xa554
movl (%rax), %edx
decl %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x93ee
leaq 0x118(%rsp), %r13
movq %r13, %rdi
leaq 0xc8(%rsp), %rbp
movq %rbp, %rsi
movq %r15, %rdx
callq 0xc244
movq %r13, %rdi
callq 0x62da
movq %rbx, %rdi
pushq $0x2
popq %rsi
movq 0x8(%rsp), %rdx
callq 0xa554
movl (%rax), %edx
decl %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x93ee
leaq 0xf8(%rsp), %rbx
movq %rbx, %rdi
leaq 0xb0(%rsp), %r13
movq %r13, %rsi
movq %r15, %rdx
callq 0xc244
movq %rbx, %rdi
callq 0x62da
movq %r14, 0x40(%rsp)
movq %r13, 0x48(%rsp)
leaq 0x80(%rsp), %rdi
movq %r15, %rsi
callq 0xc5d7
movq %r14, 0x40(%rsp)
movq %rbp, 0x48(%rsp)
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0xc5d7
orl $-0x1, 0x14(%rsp)
movsd 0x68(%rsp), %xmm0
movsd 0x80(%rsp), %xmm1
movupd 0x88(%rsp), %xmm2
movupd 0x70(%rsp), %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
movapd %xmm3, 0x20(%rsp)
movsd %xmm1, 0x30(%rsp)
movq %r15, %rdi
leaq 0x14(%rsp), %rsi
leaq 0x20(%rsp), %rdx
callq 0x62ea
leaq 0x98(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa798
movq %r12, %rdi
movq %rbx, %rsi
callq 0x938a
movq 0x8(%rsp), %rax
incq %rax
jmp 0x9064
addq $0x158, %rsp            # imm = 0x158
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Model.cpp
// Function: Model::calculate_vertex_normals()
void Model::calculate_vertex_normals(){
    /* Assumes that calculate_face_normals was called first
      For every face calculate and store the vertex normal for its three vertices
    */
    int num_vert_norms = Faces.cols()*3;
    std::vector<Eigen::Vector3d> temp(num_vert_norms);
    vertex_normals = temp;
    Eigen::Vector3d original, average;
    for (int face_num=0; face_num<Faces.cols(); face_num++){
        original = get_face_normal(face_num);
        for (int f_vert=0; f_vert<3; f_vert++){
            int vertex_num = Faces(f_vert, face_num);
            average = get_face_normal(face_num);
            calc_vertex_normal(vertex_num, original, average);
            vertex_normals[3*face_num + f_vert] = average;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbp
movabsq $0x300000000, %rsi      # imm = 0x300000000
imulq 0x1c0(%rdi), %rsi
sarq $0x20, %rsi
leaq 0x40(%rsp), %r14
leaq 0x28(%rsp), %rdx
movq %r14, %rdi
callq 0xa80a
leaq 0x1f8(%rbp), %rdi
movq %rdi, 0x10(%rsp)
movq %r14, %rsi
callq 0xa426
leaq 0x1b0(%rbp), %rax
movq %rax, 0x18(%rsp)
movq $0x0, (%rsp)
leaq 0x70(%rsp), %rbx
xorl %r12d, %r12d
cmpq %r12, 0x1c0(%rbp)
jle 0x9352
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, 0x8(%rsp)
movl %r12d, %edx
callq 0x945e
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
callq 0x52e8
movq (%rsp), %r14
xorl %esi, %esi
movq 0x8(%rsp), %r12
cmpq $0x3, %rsi
je 0x9345
movq 0x18(%rsp), %rdi
movq %rsi, 0x20(%rsp)
movq %r12, %rdx
callq 0xa554
movl (%rax), %r15d
movq %rbp, %r13
movq %rbx, %rbp
movq %rbx, %rdi
movq %r13, %rsi
movl %r12d, %edx
callq 0x945e
leaq 0x58(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x52e8
movq %r13, %rdi
movl %r15d, %esi
leaq 0x28(%rsp), %rdx
movq %r12, %rcx
movq 0x8(%rsp), %r12
callq 0x94ce
movq %r13, %rbp
movq 0x10(%rsp), %rax
movq (%rax), %rdi
addq %r14, %rdi
leaq 0x58(%rsp), %rsi
callq 0x5806
movq 0x20(%rsp), %rsi
incq %rsi
addq $0x18, %r14
jmp 0x92c8
incq %r12
addq $0x48, (%rsp)
jmp 0x9290
leaq 0x40(%rsp), %rdi
callq 0xaeb8
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9374
jmp 0x9374
jmp 0x9374
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xaeb8
movq %rbx, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Model.cpp
// Function: Model::calc_vertex_normal(int, Eigen::Matrix<double, 3, 1, 0, 3, 1> const&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&)
void Model::calc_vertex_normal(int vertex_num, const Eigen::Vector3d& original_face, Eigen::Vector3d& average){
    int num_to_average = 1;
    Eigen::Vector3d conn_face_normal;
    for (auto connected_face:vertex_to_faces[vertex_num-1]){
        conn_face_normal = get_face_normal(connected_face);
        double angle = conn_face_normal.dot(original_face);
        // If angle between face normals is less than 22.5 degrees then smooth between them
        if (angle <= 1 && angle >=.9239){
            average = average + conn_face_normal;
            num_to_average++;
        }
    }
    average = average.normalized();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rdi, %r15
movq 0x1e0(%rdi), %rax
movslq %esi, %rcx
imulq $0x18, %rcx, %rcx
movq -0x18(%rax,%rcx), %rbp
movq -0x10(%rax,%rcx), %rbx
leaq 0x8(%rsp), %r12
leaq 0x20(%rsp), %r13
cmpq %rbx, %rbp
je 0x9565
movl (%rbp), %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x945e
movq %r13, %rdi
movq %r12, %rsi
callq 0x52e8
movq %r13, %rdi
movq %r14, %rsi
callq 0xc836
movsd 0xeaf7(%rip), %xmm1     # 0x18030
ucomisd %xmm0, %xmm1
jb 0x955f
ucomisd 0xfef9(%rip), %xmm0     # 0x19440
jb 0x955f
movq (%rsp), %rdi
movq %rdi, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq %r12, %rsi
callq 0xc8b9
addq $0x4, %rbp
jmp 0x9508
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq (%rsp), %rbx
movq %rbx, %rsi
callq 0x5304
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5806
addq $0x38, %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/Model.cpp
// Function: Model::get_smooth_face_normal(int, double, double)
Eigen::Vector3d Model::get_smooth_face_normal(int face_num, double beta, double gamma){
    Eigen::Vector3d normal_one, normal_two, normal_three;
    normal_one = get_vertex_normal(face_num, 0);
    normal_two = get_vertex_normal(face_num, 1);
    normal_three = get_vertex_normal(face_num, 2);
    return ((1-beta-gamma) * normal_one + beta*normal_two + gamma*normal_three).normalized();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movsd %xmm1, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movsd %xmm0, (%rax)
leaq 0x10(%rsp), %rax
movsd %xmm1, (%rax)
leal (%rdx,%rdx,2), %eax
cltq
movq 0x1f8(%rsi), %rcx
imulq $0x18, %rax, %r15
movq 0x10(%rcx,%r15), %rax
leaq 0x70(%rsp), %rbp
movq %rax, 0x10(%rbp)
movups (%rcx,%r15), %xmm0
movaps %xmm0, (%rbp)
leaq 0x58(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
callq 0x52e8
movq 0x1f8(%r13), %rax
movq 0x28(%rax,%r15), %rcx
movq %rcx, 0x10(%rbp)
movups 0x18(%rax,%r15), %xmm0
movaps %xmm0, (%rbp)
leaq 0x40(%rsp), %rbp
leaq 0x70(%rsp), %r14
movq %rbp, %rdi
movq %r14, %rsi
callq 0x52e8
movq 0x1f8(%r13), %rax
movq 0x40(%rax,%r15), %rcx
movq %rcx, 0x10(%r14)
movups 0x30(%rax,%r15), %xmm0
movaps %xmm0, (%r14)
leaq 0x28(%rsp), %r13
leaq 0x70(%rsp), %rsi
movq %r13, %rdi
callq 0x52e8
movsd 0xe9ce(%rip), %xmm0     # 0x18030
subsd (%rsp), %xmm0
subsd 0x8(%rsp), %xmm0
leaq 0x20(%rsp), %rsi
movsd %xmm0, (%rsi)
leaq 0x160(%rsp), %r14
movq %r14, %rdi
movq %r12, %rdx
callq 0x5423
leaq 0x138(%rsp), %r12
movq %r12, %rdi
leaq 0x18(%rsp), %rsi
movq %rbp, %rdx
callq 0x5423
movsd 0x10(%r14), %xmm0
leaq 0x188(%rsp), %r15
movsd %xmm0, 0x18(%r15)
movq 0x18(%r14), %rax
movq %rax, 0x20(%r15)
movsd 0x10(%r12), %xmm0
movsd %xmm0, 0x40(%r15)
movq 0x18(%r12), %rax
movq %rax, 0x48(%r15)
leaq 0x110(%rsp), %r14
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
movq %r13, %rdx
callq 0x5423
leaq 0x70(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xa84a
movq %rbx, %rdi
movq %r12, %rsi
callq 0xa866
movq %rbx, %rax
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Model.cpp
// Function: Model::get_refracted_ray(Ray&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&)
Ray Model::get_refracted_ray(Ray &orig_ray, Eigen::Vector3d &intersect_pos, Eigen::Vector3d &normal){
    Eigen::Vector3d T1, T2;
    double this_eta = get_eta();
    Eigen::Vector3d W = -1 * orig_ray.get_dir();
    T1 = refract_ray(W, normal, 1.0, this_eta);
    Eigen::Vector3d exit, Nin;
    get_refract_exit(intersect_pos, T1, exit, Nin);
    T1 = -1 * T1;
    T2 = refract_ray(T1, Nin, this_eta, 1.0);
    Ray exit_ray = Ray(exit, T2);
    return exit_ray;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, %r12
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, 0x10(%rsp)
movq %rsi, %rdi
callq 0x1191e
movsd %xmm0, 0x8(%rsp)
leaq 0x58(%rsp), %rbp
orl $-0x1, (%rbp)
movq %r13, %rdi
callq 0x17daa
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x62ea
leaq 0xe0(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0xcf88
leaq 0x18(%rsp), %rbx
movsd 0xe226(%rip), %xmm0     # 0x18030
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movsd 0x8(%rsp), %xmm1
callq 0x11808
leaq 0x58(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x52e8
leaq 0xc8(%rsp), %r12
leaq 0xb0(%rsp), %rbx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %rbx, %r8
callq 0x9efa
leaq 0x40(%rsp), %rsi
orl $-0x1, (%rsi)
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r13, %rdx
callq 0x62ea
movq %r13, %rdi
movq %r15, %rsi
callq 0x6403
leaq 0x40(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %rbx, %rcx
movsd 0x8(%rsp), %xmm0
movsd 0xe199(%rip), %xmm1     # 0x18030
callq 0x11808
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x52e8
movups (%r12), %xmm0
leaq 0x90(%rsp), %rsi
movaps %xmm0, (%rsi)
movq 0x10(%r12), %rax
movq %rax, 0x10(%rsi)
movups (%rbx), %xmm0
leaq 0x70(%rsp), %rdx
movaps %xmm0, (%rdx)
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rdx)
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x17d1e
movq %rbx, %rax
addq $0xf8, %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/RenderImage.cpp
// Function: RenderImage::tile_images(int)
std::queue<image_tile> RenderImage::tile_images(int tile_size){
  std::queue<image_tile> results;
  int width = scene->get_camera().pixel_width;
  int height = scene->get_camera().pixel_height;
  for (int i=0; i<width; i+=tile_size){
      for (int j=0; j<height; j+=tile_size){
          int x_len = std::min(width-i, tile_size);
          int y_len = std::min(height-j, tile_size);
          image_tile ir = build_image_tile(i, j, x_len, y_len);
          results.push(ir);
      }
  }
  return results;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
callq 0xdee6
movq (%r14), %rdi
callq 0x1041c
movl (%rax), %eax
movl %eax, 0x10(%rsp)
movq (%r14), %rdi
callq 0x1041c
movl 0x4(%rax), %r12d
xorl %ecx, %ecx
movl 0x10(%rsp), %eax
movl %eax, %r15d
subl %ecx, %r15d
jle 0xd1ee
cmpl %ebp, %r15d
cmovgel %ebp, %r15d
movl %ecx, 0x14(%rsp)
movl %ecx, %r13d
xorl %r14d, %r14d
movl %r12d, %eax
cmpl %r12d, %r14d
jge 0xd1e6
movl %eax, %ebx
subl %ebp, %ebx
cmovgel %ebp, %eax
movq %r14, %rcx
shlq $0x20, %rcx
orq %r13, %rcx
shlq $0x20, %rax
orq %r15, %rax
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xe33e
addl %ebp, %r14d
movl %ebx, %eax
jmp 0xd1a9
movl 0x14(%rsp), %ecx
addl %ebp, %ecx
jmp 0xd189
movq 0x8(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xd206
jmp 0xd206
movq %rax, %r14
movq 0x8(%rsp), %rdi
callq 0x7062
movq %r14, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/RenderImage.cpp
// Function: RenderImage::render_tiles()
void RenderImage::render_tiles(){
    // Might be called by multiple threads, so image_tiles needs to be populated
    //   before this function is used
    bool queue_empty = false;
    while (!queue_empty){
        image_tiles_mutex.lock();
        image_tile current_tile = build_image_tile(0,0,0,0);
        if (!image_tiles.empty()){
            current_tile = image_tiles.front();
            image_tiles.pop();
        } else{
            queue_empty = true;
        }
        image_tiles_mutex.unlock();
        // If the queue was empty, current_tile covers no area and will not cause any rendering
        render_tile(current_tile);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x60(%rdi), %r14
leaq 0x10(%rdi), %r15
movq %r14, %rdi
callq 0xdf02
movq 0x20(%rbx), %rax
cmpq %rax, 0x40(%rbx)
je 0xd2d3
movq (%rax), %r12
movq 0x8(%rax), %r13
movq %r15, %rdi
callq 0xe574
movq %r14, %rdi
callq 0x3210
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0xd2f0
jmp 0xd29a
movq %r14, %rdi
callq 0x3210
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0xd2f0
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/RenderImage.cpp
// Function: RenderImage::ray_trace(Ray&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&, int, double&)
void RenderImage::ray_trace(Ray& ray, Eigen::Vector3d& accum, Eigen::Vector3d& ampl, int level, double &t_value){
    if (scene->get_rendered_objects().size() == 0){
        return;
    }
    SceneObject* hit_obj = scene->get_rendered_objects()[0];
    Eigen::Vector3d hit_normal;
    t_value = find_intersection(ray, hit_obj, hit_normal);

    calculate_color(ray, t_value, hit_obj, hit_normal, accum, ampl, level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r13
movl %r8d, %ebp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %rdi
callq 0x10414
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0xd65e
movq (%r12), %rdi
callq 0x10414
movq (%rax), %rax
movq (%rax), %rax
movq %rbx, 0x10(%rsp)
leaq 0x18(%rsp), %rbx
movq %rax, (%rbx)
leaq 0x20(%rsp), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xd66e
movsd %xmm0, (%r13)
movq (%rbx), %rdx
movl %ebp, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
leaq 0x20(%rsp), %rcx
movq %r14, %r8
movq 0x10(%rsp), %r9
callq 0xd70a
addq $0x38, %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/RenderImage.cpp
// Function: RenderImage::find_intersection(Ray&, SceneObject*&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&)
double RenderImage::find_intersection(Ray& ray, SceneObject*& md, Eigen::Vector3d &hit_normal){
    double epsilon = .0000000001;
    double intersect_t = MISSED_T_VALUE;
    Eigen::Vector3d hit_s_normal;
    for (auto so : scene->get_rendered_objects()){
        double t_value = so->intersect_ray(ray, hit_s_normal);
        if (t_value <= epsilon){
            continue;
        }
        if ((t_value < intersect_t) ){
            intersect_t = t_value;
            md = so;
            hit_normal = hit_s_normal;
        }
    }
    return intersect_t;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x8(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movsd 0x8(%rdi), %xmm0
movsd %xmm0, (%rsp)
movq (%rdi), %rdi
callq 0x10414
movq (%rax), %rbp
movq 0x8(%rax), %rbx
leaq 0x10(%rsp), %r12
cmpq %rbx, %rbp
je 0xd6f6
movq (%rbp), %r13
movq (%r13), %rax
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x10(%rax)
movapd %xmm0, %xmm1
movsd 0xd48e(%rip), %xmm0     # 0x1ab58
ucomisd %xmm1, %xmm0
jae 0xd6f0
movsd (%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd6f0
movq %r13, (%r14)
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movsd %xmm1, (%rsp)
callq 0x5806
addq $0x8, %rbp
jmp 0xd6a5
movsd (%rsp), %xmm0
addq $0x28, %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/RenderImage.cpp
// Function: RenderImage::lightReachesObject(Light&, Eigen::Matrix<double, 3, 1, 0, 3, 1>)
bool RenderImage::lightReachesObject(Light& light, Eigen::Vector3d intersect_pos){
    SceneObject* unused_so;
    Eigen::Vector3d unused_norm;

    double distance_to_light = (light.get_pos() - intersect_pos).norm();
    Eigen::Vector3d vector_to_light = (light.get_pos() - intersect_pos).normalized();
    Ray ray_to_light = Ray(intersect_pos, vector_to_light);
    double t_value = find_intersection(ray_to_light, unused_so, unused_norm);
    if (t_value == MISSED_T_VALUE || (distance_to_light < t_value)){
        return true;
    }
    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
callq 0x61ca
leaq 0x38(%rsp), %r13
movq %r12, (%r13)
movq %r14, 0x8(%r13)
movq %r13, %rdi
callq 0xe05a
movaps %xmm0, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x61ca
movq %r12, (%r13)
movq %r14, 0x8(%r13)
leaq 0xa8(%rsp), %r15
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0x537a
movups (%r14), %xmm0
leaq 0x90(%rsp), %rsi
movaps %xmm0, (%rsi)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rsi)
movupd (%r15), %xmm0
leaq 0x70(%rsp), %rdx
movapd %xmm0, (%rdx)
movq 0x10(%r15), %rax
movq %rax, 0x10(%rdx)
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x17d1e
leaq 0x18(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xd66e
movsd 0x8(%rbx), %xmm1
cmpeqpd %xmm0, %xmm1
movapd (%rsp), %xmm2
cmpltpd %xmm0, %xmm2
orpd %xmm1, %xmm2
movd %xmm2, %eax
andb $0x1, %al
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Sphere.cpp
// Function: Sphere::intersect_ray(Ray&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&)
double Sphere::intersect_ray(Ray& ray, Eigen::Vector3d &hit_normal){
    const Eigen::Vector3d &ray_pt = ray.get_point();
    const Eigen::Vector3d &ray_dir = ray.get_dir();
    double t_value = -1;
    double v = (sphere_center - ray_pt).dot(ray_dir);
    double c = (sphere_center - ray_pt).norm();
    // Either the ray went the wrong way, or there was no intersection
    if (v < 0 || ((radius*radius) < (c*c - v*v))){
        return t_value;
    }
    double dr = (ray_pt + (v * ray_dir) - sphere_center).norm();
    double intersection_offset = sqrt( radius*radius - dr*dr);
    t_value = v - intersection_offset;

    Eigen::Vector3d intersection_point = ray_pt + ray_dir * t_value;
    hit_normal = (intersection_point - sphere_center).normalized();
    return t_value;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rsi, %rdi
callq 0x17da4
movq %rax, %r14
movq %r15, %rdi
callq 0x17daa
movq %rax, %r15
leaq 0x1b8(%r12), %rbp
leaq 0x40(%rsp), %r13
movq %rbp, (%r13)
movq %r14, 0x8(%r13)
movq %r13, %rdi
movq %rax, %rsi
callq 0xfc0e
movsd %xmm0, 0x8(%rsp)
movsd %xmm0, (%rsp)
movq %rbp, (%r13)
movq %r14, 0x8(%r13)
leaq 0x40(%rsp), %rdi
callq 0xe05a
movsd 0x8(%rsp), %xmm3
movapd %xmm0, %xmm1
movsd 0x9271(%rip), %xmm0     # 0x18a30
xorpd %xmm2, %xmm2
ucomisd %xmm3, %xmm2
ja 0xf8d5
movsd 0x190(%r12), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm3, %xmm3
mulsd %xmm1, %xmm1
subsd %xmm3, %xmm1
ucomisd %xmm2, %xmm1
ja 0xf8d5
leaq 0x18(%rsp), %r13
movq %rsp, %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x5423
movsd 0x10(%r13), %xmm0
movq 0x18(%r13), %rax
leaq 0x40(%rsp), %rdi
movq %r14, 0x8(%rdi)
movsd %xmm0, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movq %rbp, 0x40(%rdi)
callq 0xfbd4
movapd %xmm0, %xmm1
movsd 0x190(%r12), %xmm0
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xf853
sqrtsd %xmm0, %xmm0
jmp 0xf858
callq 0x3230
movsd (%rsp), %xmm1
subsd %xmm0, %xmm1
leaq 0x10(%rsp), %r12
movsd %xmm1, (%r12)
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xaa26
leaq 0x40(%rsp), %rsi
movq %r14, (%rsi)
movq (%r13), %rax
movq %rax, 0x8(%rsi)
movsd 0x10(%r13), %xmm0
movsd %xmm0, 0x18(%rsi)
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0xfdee
movq %r14, (%r13)
movq %rbp, 0x8(%r13)
leaq 0x40(%rsp), %r14
leaq 0x18(%rsp), %rsi
movq %r14, %rdi
callq 0x537a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5806
movsd (%r12), %xmm0
addq $0xa8, %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/Sphere.cpp
// Function: Sphere::ray_intersects(Ray&)
bool Sphere::ray_intersects(Ray& ray){
    double v = (sphere_center - ray.get_point()).dot(ray.get_dir());
    double c = (sphere_center - ray.get_point()).norm();
    if ((radius*radius) > (c*c - v*v)){
        return true;
    } else{
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1b8(%rdi), %r12
movq %rsi, %rdi
callq 0x17da4
leaq 0x10(%rsp), %r15
movq %r12, (%r15)
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0x17daa
movq %r15, %rdi
movq %rax, %rsi
callq 0xfc0e
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x17da4
movq %r12, (%r15)
movq %rax, 0x8(%r15)
leaq 0x10(%rsp), %rdi
callq 0xe05a
movsd 0x190(%rbx), %xmm1
mulsd %xmm1, %xmm1
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm0, %xmm0
subsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
seta %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./Eigen/Eigen/src/Core/Redux.h
// Function: Eigen::internal::redux_impl<Eigen::internal::scalar_sum_op<double, double>, Eigen::internal::redux_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs2_op<double>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double, double>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double, double>, Eigen::Matrix<double, 3, 1, 0, 3, 1> const, Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1, 0, 3, 1> const> const, Eigen::Matrix<double, 3, 1, 0, 3, 1> const> const> const, Eigen::Matrix<double, 3, 1, 0, 3, 1> const> const>>, 3, 2>::run(Eigen::internal::redux_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_abs2_op<double>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op<double, double>, Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double, double>, Eigen::Matrix<double, 3, 1, 0, 3, 1> const, Eigen::CwiseBinaryOp<Eigen::internal::scalar_product_op<double, double>, Eigen::CwiseNullaryOp<Eigen::internal::scalar_constant_op<double>, Eigen::Matrix<double, 3, 1, 0, 3, 1> const> const, Eigen::Matrix<double, 3, 1, 0, 3, 1> const> const> const, Eigen::Matrix<double, 3, 1, 0, 3, 1> const> const>> const&, Eigen::internal::scalar_sum_op<double, double> const&)
Scalar run(const Derived &mat, const Func& func)
  {
    eigen_assert(mat.rows()>0 && mat.cols()>0 && "you are using an empty matrix");
    if (VectorizedSize > 0) {
      Scalar res = func.predux(redux_vec_unroller<Func, Derived, 0, Size / PacketSize>::run(mat,func));
      if (VectorizedSize != Size)
        res = func(res,redux_novec_unroller<Func, Derived, VectorizedSize, Size-VectorizedSize>::run(mat,func));
      return res;
    }
    else {
      return redux_novec_unroller<Func, Derived, 0, Size>::run(mat,func);
    }
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0xfd66
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm1, %xmm0
movapd %xmm0, (%rsp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xfd70
addsd (%rsp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Scene.cpp
// Function: Scene::add_model(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Scene::add_model(std::string driver_line){
    Model* mo = new Model(driver_line);
    if (mo->is_animated()){
        AnimatedObject* ao = new AnimatedObject(mo);
        ao->set_start_frame(current_frame);
        animated_objects.push_back(ao);
    } else{
        SceneObject* so = (SceneObject*) mo;
        scene_objects.push_back(so);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x258, %edi            # imm = 0x258
callq 0x32b0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x3360
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x8500
leaq 0x10(%rsp), %rdi
callq 0x3100
movq %r14, %rdi
callq 0x975c
testb %al, %al
je 0x106c4
pushq $0x58
popq %rdi
callq 0x32b0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x75dc
leaq 0x8(%rsp), %r14
movq %r15, (%r14)
movl 0x234(%rbx), %esi
movq %r15, %rdi
callq 0x7c24
addq $0x1e8, %rbx            # imm = 0x1E8
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1113a
jmp 0x106db
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
addq $0x1b8, %rbx            # imm = 0x1B8
movq %rbx, %rdi
callq 0x1111c
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x58
popq %rsi
movq %r15, %rdi
jmp 0x1070a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3100
jmp 0x10702
movq %rax, %rbx
movl $0x258, %esi            # imm = 0x258
movq %r14, %rdi
callq 0x32c0
movq %rbx, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Scene.cpp
// Function: Scene::add_sphere(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Scene::add_sphere(std::string driver_line){
    Sphere* sp = new Sphere(driver_line);
    if (sp->is_animated()){
        AnimatedSphere* as = new AnimatedSphere(sp);
        as->set_start_frame(current_frame);
        animated_objects.push_back(as);
    } else{
        SceneObject* so = (SceneObject*) sp;
        scene_objects.push_back(so);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl $0x1d0, %edi            # imm = 0x1D0
callq 0x32b0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x3360
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xf374
leaq 0x10(%rsp), %rdi
callq 0x3100
movq %r14, %rdi
callq 0xfb8e
testb %al, %al
je 0x107a1
pushq $0x78
popq %rdi
callq 0x32b0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x15db4
movl 0x234(%rbx), %esi
movq %r15, %rdi
callq 0x7c24
addq $0x1e8, %rbx            # imm = 0x1E8
leaq 0x8(%rsp), %rsi
movq %r15, (%rsi)
movq %rbx, %rdi
callq 0x11520
jmp 0x107b8
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
addq $0x1b8, %rbx            # imm = 0x1B8
movq %rbx, %rdi
callq 0x1111c
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
pushq $0x78
popq %rsi
movq %r15, %rdi
jmp 0x107e7
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3100
jmp 0x107df
movq %rax, %rbx
movl $0x1d0, %esi            # imm = 0x1D0
movq %r14, %rdi
callq 0x32c0
movq %rbx, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Scene.cpp
// Function: Scene::edit_ambient(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Scene::edit_ambient(std::string driver_line){
    std::stringstream ambient_read(driver_line);
    std::string line_type;
    double red, green, blue;
    ambient_read >> line_type >> red >> green >> blue;
    ambient << red, green, blue;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %rdi, %rbx
leaq 0x60(%rsp), %r14
pushq $0x18
popq %rdx
movq %r14, %rdi
callq 0x33e0
leaq 0x30(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x3320
leaq 0x18(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x31b0
leaq 0x218(%rbx), %rax
leaq 0x40(%rsp), %rdi
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
pushq $0x1
popq %rax
movq %rax, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x218(%rbx)
leaq 0x10(%rsp), %rsi
callq 0x6232
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x6232
leaq 0x40(%rsp), %rdi
callq 0x62da
leaq 0x20(%rsp), %rdi
callq 0x3100
leaq 0x60(%rsp), %rdi
callq 0x3200
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r14
retq
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x62da
jmp 0x108d5
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x3100
leaq 0x60(%rsp), %rdi
callq 0x3200
movq %rbx, %rdi
callq 0x3490
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/Scene.cpp
// Function: Scene::valid_driver_line(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Scene::valid_driver_line(std::string driver_line){
    bool is_valid = true;
    if(driver_line.size() == 0){
        is_valid = false;
    } else if(isspace(driver_line[0])){
        is_valid = false;
    } else if(driver_line[0] == '#'){
        is_valid = false;
    }
    return is_valid;
}

// Assembly:
cmpq $0x0, 0x8(%rsi)
je 0x109a0
pushq %rbx
movq (%rsi), %rax
movsbl (%rax), %edi
cmpl $0x23, %edi
setne %bl
callq 0x3040
testl %eax, %eax
sete %al
andb %bl, %al
popq %rbx
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/SceneObject.cpp
// Function: SceneObject::refract_ray(Eigen::Matrix<double, 3, 1, 0, 3, 1>&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&, double, double)
Eigen::Vector3d SceneObject::refract_ray(Eigen::Vector3d &w, Eigen::Vector3d &normal, double first_eta, double second_eta){
    double etar = first_eta / second_eta;
    double a = - etar;
    double wn = w.dot(normal);
    double radsq = etar*etar * (wn*wn -1) + 1;
    double b = (etar * wn) - std::sqrt(radsq);
    Eigen::Vector3d T = a * w + b * normal;
    return T;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe0, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
divsd %xmm1, %xmm0
movapd %xmm0, 0x10(%rsp)
movapd 0x720d(%rip), %xmm1     # 0x18a40
xorpd %xmm0, %xmm1
movlpd %xmm1, 0x8(%rsp)
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xc836
movapd %xmm0, %xmm2
movapd 0x10(%rsp), %xmm1
mulsd %xmm0, %xmm0
addsd 0x71d2(%rip), %xmm0     # 0x18a30
mulsd %xmm1, %xmm1
mulsd %xmm1, %xmm0
addsd 0x67c2(%rip), %xmm0     # 0x18030
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1187e
sqrtsd %xmm0, %xmm0
jmp 0x1188d
movsd %xmm2, (%rsp)
callq 0x3230
movsd (%rsp), %xmm2
movapd 0x10(%rsp), %xmm1
mulsd %xmm2, %xmm1
subsd %xmm0, %xmm1
leaq 0x28(%rsp), %r12
movsd %xmm1, (%r12)
leaq 0x58(%rsp), %r13
leaq 0x8(%rsp), %rsi
movq %r13, %rdi
movq %r15, %rdx
callq 0x5423
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x5423
movsd 0x10(%r13), %xmm0
leaq 0x80(%rsp), %rsi
movsd %xmm0, 0x18(%rsi)
movq 0x18(%r13), %rax
movq %rax, 0x20(%rsi)
movsd 0x10(%r15), %xmm0
movsd %xmm0, 0x40(%rsi)
movq 0x18(%r15), %rax
movq %rax, 0x48(%rsi)
movq %rbx, %rdi
callq 0x11cdc
movq %rbx, %rax
addq $0xe0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./Eigen/Eigen/src/Core/TriangularMatrix.h
// Function: Eigen::internal::triangular_assignment_loop<Eigen::internal::triangular_dense_assignment_kernel<2, 8, 0, Eigen::internal::evaluator<Eigen::TriangularView<Eigen::Matrix<double, 4, 4, 0, 4, 4>, 10u>>, Eigen::internal::evaluator<Eigen::Transpose<Eigen::Matrix<double, 4, 4, 0, 4, 4>>>, Eigen::internal::swap_assign_op<double>, 0>, 10u, 15, false>::run(Eigen::internal::triangular_dense_assignment_kernel<2, 8, 0, Eigen::internal::evaluator<Eigen::TriangularView<Eigen::Matrix<double, 4, 4, 0, 4, 4>, 10u>>, Eigen::internal::evaluator<Eigen::Transpose<Eigen::Matrix<double, 4, 4, 0, 4, 4>>>, Eigen::internal::swap_assign_op<double>, 0>&)
EIGEN_DEVICE_FUNC
  static inline void run(Kernel &kernel)
  {
    triangular_assignment_loop<Kernel, Mode, UnrollCount-1, SetOpposite>::run(kernel);
    
    if(row==col)
      kernel.assignDiagonalCoeff(row);
    else if( ((Mode&Lower) && row>col) || ((Mode&Upper) && row<col) )
      kernel.assignCoeff(row,col);
    else if(SetOpposite)
      kernel.assignOppositeCoeff(row,col);
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x12d3c
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq (%rax), %rax
movq 0x8(%rcx), %rcx
movsd 0x70(%rax), %xmm0
movsd 0x58(%rcx), %xmm1
movsd %xmm1, 0x70(%rax)
movsd %xmm0, 0x58(%rcx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::WaveObject(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
WaveObject::WaveObject(std::string driver_line, int current_time){
    set_time(current_time);
    extract_wave_info(driver_line);
    set_bounding_box();
    generate_waves(num_waves, random_seed);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
callq 0xa1fe
leaq 0x15e34(%rip), %rax     # 0x29d20
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x198(%rbx)
movups %xmm0, 0x1a8(%rbx)
movaps 0x7ee9(%rip), %xmm1     # 0x1bdf0
movups %xmm1, 0x1b8(%rbx)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, 0x1c8(%rbx)
cvtsi2sd %ebp, %xmm1
movups %xmm0, 0x1d0(%rbx)
movsd %xmm1, 0x190(%rbx)
movq %rsp, %rdi
movq %r14, %rsi
callq 0x3360
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x13fb6
movq %rsp, %rdi
callq 0x3100
movq %rbx, %rdi
callq 0x143b6
movl 0x1c8(%rbx), %esi
movl 0x1cc(%rbx), %edx
movq %rbx, %rdi
callq 0x14444
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rsp, %rdi
callq 0x3100
jmp 0x13f85
movq %rax, %r14
leaq 0x1a0(%rbx), %rdi
addq $0x198, %rbx            # imm = 0x198
callq 0x154de
movq %rbx, %rdi
callq 0x1527c
movq %r14, %rdi
callq 0x3490
// File: /workspace/github_cpp_makefile_star2_O2/IsaacLaw12[P]RayTracer/./src/WaveObject.cpp
// Function: WaveObject::set_bounding_box()
void WaveObject::set_bounding_box(){
    // Find the coordinates bounding the the wave surface
    Eigen::Vector3d min = first_corner;
    Eigen::Vector3d max = first_corner;
    find_min_max(min, max);

    bounding_box = std::make_unique<BoundingBox>(min, max);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x1f0(%rdi), %rax
leaq 0x30(%rsp), %r14
movq %rax, 0x10(%r14)
movups 0x1e0(%rdi), %xmm0
movaps %xmm0, (%r14)
movq 0x1f0(%rdi), %rax
leaq 0x10(%rsp), %r15
movq %rax, 0x10(%r15)
movups 0x1e0(%rdi), %xmm0
movaps %xmm0, (%r15)
movq %r14, %rsi
movq %r15, %rdx
callq 0x14d2c
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x15296
addq $0x198, %rbx            # imm = 0x198
movq (%r12), %rsi
andq $0x0, (%r12)
movq %rbx, %rdi
callq 0x154c6
movq %r12, %rdi
callq 0x1527c
addq $0x48, %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::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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movslq %edx, %rcx
xorl %r14d, %r14d
movl $0x7fffffff, %r8d       # imm = 0x7FFFFFFF
movq %rcx, %rax
xorl %edx, %edx
divq %r8
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movhps 0x79d0(%rip), %xmm0     # xmm0 = xmm0[0,1],mem[0,1]
movq %rdx, (%rax)
leaq 0x40(%rsp), %rax
movaps %xmm0, (%rax)
leal (%rcx,%rcx), %eax
cltq
xorl %edx, %edx
divq %r8
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x10(%rsp), %rax
movq %rdx, (%rax)
movaps 0x7954(%rip), %xmm0     # 0x1be00
leaq 0x30(%rsp), %rax
movaps %xmm0, (%rax)
leal (%rcx,%rcx,2), %eax
cltq
xorl %edx, %edx
divq %r8
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x8(%rsp), %rax
movq %rdx, (%rax)
movaps 0x793b(%rip), %xmm0     # 0x1be10
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
shll $0x2, %ecx
movslq %ecx, %rax
xorl %edx, %edx
divq %r8
cmpq $0x1, %rdx
adcq $0x0, %rdx
movq %rdi, %rbx
movq %rsp, %rax
movq %rdx, (%rax)
movaps 0x7920(%rip), %xmm0     # 0x1be20
leaq 0x80(%rsp), %r15
movaps %xmm0, (%r15)
leaq 0x1a0(%rdi), %r12
testl %esi, %esi
cmovgl %esi, %r14d
leaq 0x90(%rsp), %r13
leaq 0x50(%rsp), %rbp
subl $0x1, %r14d
jb 0x14599
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x153d0
movsd %xmm0, 0x68(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x153d0
movsd %xmm0, 0x70(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x153d0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x150b2
movq %rbp, %rdi
movq %r13, %rsi
callq 0x52e8
movq %r15, %rdi
movq %rsp, %rsi
callq 0x153d0
movsd %xmm0, 0x78(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
callq 0x153d8
jmp 0x14526
addq $0xa8, %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/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:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x10(%rsp), %rdx
andq $0x0, (%rdx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movq 0x198(%rdi), %rdi
callq 0x7486
testb %al, %al
je 0x14679
movsd 0x10(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %r14, %rdi
movq %r15, %rsi
callq 0x1468e
ucomisd 0x10(%rsp), %xmm0
jb 0x14679
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x14679
movq %r14, %rdi
movq %r15, %rsi
callq 0x14750
movsd %xmm0, 0x18(%rsp)
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1480c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x52e8
movsd 0x18(%rsp), %xmm0
jmp 0x14682
movsd 0x188(%r14), %xmm0
addq $0x38, %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::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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movsd %xmm1, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movsd %xmm0, (%rsp)
callq 0x17db0
movq 0x10(%r15), %rax
leaq 0x40(%rsp), %rsi
movq %rax, 0x10(%rsi)
movups (%r15), %xmm0
movaps %xmm0, (%rsi)
movq %r14, %rdi
callq 0x149b4
movl %eax, %ebp
leaq 0x60(%rsp), %r12
leaq 0x10(%rsp), %r13
movsd (%rsp), %xmm0
addsd 0x1b8(%r14), %xmm0
movsd %xmm0, (%rsp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x17db0
movq %r15, %rdi
movq %r12, %rsi
callq 0x52e8
movsd 0x8(%rsp), %xmm0
ucomisd (%rsp), %xmm0
jbe 0x1473c
movq 0x38(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x28(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x149b4
cmpb %al, %bpl
je 0x146e2
movsd (%rsp), %xmm0
addq $0x78, %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::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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movsd %xmm0, 0x8(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
subsd 0x1b8(%rdi), %xmm0
leaq 0x38(%rsp), %r15
movq %r15, %rdi
movsd %xmm0, 0x10(%rsp)
callq 0x17db0
movq %r14, %rdi
movq %r15, %rsi
callq 0x149b4
movsd 0x8(%rsp), %xmm1
movl %eax, %ebp
pushq $0x30
popq %r12
leaq 0x20(%rsp), %r15
subl $0x1, %r12d
jb 0x147fe
movapd %xmm1, %xmm0
movsd %xmm1, 0x8(%rsp)
movsd 0x10(%rsp), %xmm1
subsd %xmm1, %xmm0
mulsd 0x7697(%rip), %xmm0     # 0x1be58
addsd %xmm1, %xmm0
movsd %xmm0, 0x18(%rsp)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x17db0
movq %r14, %rdi
movq %r15, %rsi
callq 0x149b4
movsd 0x18(%rsp), %xmm0
xorb %bpl, %al
movapd %xmm0, %xmm1
jne 0x1479f
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm1
jmp 0x1479f
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop