// File: /workspace/github_cpp_makefile_star2_O3/IsaacLaw12[P]RayTracer/./src/RenderImage.cpp
// Function: RenderImage::calculate_color(Ray&, double, SceneObject*, Eigen::Matrix<double, 3, 1, 0, 3, 1>&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&, Eigen::Matrix<double, 3, 1, 0, 3, 1>&, int)
void RenderImage::calculate_color(Ray& ray, double t_value, SceneObject* hit_obj, Eigen::Vector3d &hit_normal, Eigen::Vector3d &accum, Eigen::Vector3d &ampl, int level){
    Eigen::Vector3d vector_to_light, intersect_pos, dif_refl, color;
    Eigen::Vector3d obj_intsct_vector, light_reflect_point;
    if (t_value == MISSED_T_VALUE){
        accum << 0,0,0;
        return;
    }
    color = hit_obj->get_ambient_color() * scene->get_ambient();
    double light_concentration, proximity_reflection;
    intersect_pos = ray.get_ray_loc(t_value);

    for(Light light:scene->get_lights()){
        if (light.get_lighting_group() != hit_obj->get_lighting_group()){
            continue;
        }
        if (!lightReachesObject(light, intersect_pos)){
            continue;
        }
        // Diffuse reflection
        vector_to_light = (light.get_pos() - intersect_pos).normalized();
        light_concentration = hit_normal.dot(vector_to_light);
        if (light_concentration < 0){
                continue;
        }

        dif_refl =  hit_obj->get_diffuse_color() * light.get_color() * light_concentration;
        color += dif_refl;
        // Specular reflection

        // The vector from the intersect point to the camera
        obj_intsct_vector = (ray.get_point() - intersect_pos).normalized();
        // The point opposite the light flipped on the normal
        light_reflect_point = (2 * hit_normal.dot(vector_to_light) *  hit_normal) - vector_to_light;
        proximity_reflection = obj_intsct_vector.dot(light_reflect_point);
        if (proximity_reflection > 0.0){
            color += hit_obj->get_specular_color() * light.get_color() * std::pow(proximity_reflection, hit_obj->get_phong());
        }

    }
    accum = accum + ampl.cwiseProduct(color);

    Eigen::Vector3d kr_ampl = hit_obj->get_kr() * ampl;
    Eigen::Matrix3d ko = hit_obj->get_ko();
    double opacity = (ko * Eigen::Vector3d(1,1,1)).dot(Eigen::Vector3d(1,1,1));
    double dummy_t = 0;
    // Reflections
    if (level > 0){
        Eigen::Vector3d reflect_accum = Eigen::Vector3d::Zero();
        Eigen::Vector3d w = -1 * ray.get_dir();
        Eigen::Vector3d ray_dir = (2 * hit_normal.dot(w) * hit_normal - w).normalized();
        Ray reflect_ray = Ray(intersect_pos, ray_dir);
        ray_trace(reflect_ray, reflect_accum, kr_ampl, --level, dummy_t);
        Eigen::Vector3d reflect_ampl = ko * ampl;
        accum = accum + reflect_ampl.cwiseProduct(reflect_accum);
    }
    // Calculate refraction
    if (level > 0 && opacity < 3.0){
        Eigen::Vector3d refract_accum = Eigen::Vector3d::Zero();
        Ray refract_ray = hit_obj->get_refracted_ray(ray, intersect_pos, hit_normal);
        ray_trace(refract_ray, refract_accum, kr_ampl, --level, dummy_t);
        Eigen::Vector3d refract_ampl = (Eigen::Matrix3d::Identity() - ko) * ampl;
        accum = accum + refract_ampl.cwiseProduct(refract_accum);
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movsd 0x8(%rdi), %xmm1
ucomisd %xmm0, %xmm1
jne 0xc7a2
jp 0xc7a2
leaq 0x1c0(%rsp), %rdi
movq %r8, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movl $0x1, %ecx
movq %rcx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %rax, (%r8)
leaq 0x70(%rsp), %rsi
movq %rax, (%rsi)
callq 0x5b22
leaq 0x180(%rsp), %rsi
movq $0x0, (%rsi)
movq %rax, %rdi
callq 0x5b22
movq 0x1d8(%rsp), %rax
addq 0x1c8(%rsp), %rax
cmpq $0x3, %rax
jne 0xd2db
cmpq $0x1, 0x1d0(%rsp)
jne 0xd2db
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbp
movq %rsi, %r15
movq %rdi, %r14
movq %rcx, 0x48(%rsp)
movq %r9, 0x118(%rsp)
movq %r8, 0x120(%rsp)
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
movq %rdx, %rsi
movsd %xmm0, 0x8(%rsp)
callq 0x107b4
movq (%r14), %rdi
callq 0xed66
movupd (%rax), %xmm0
movupd 0x8(%rax), %xmm3
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd (%rbx), %xmm0
movupd 0x18(%rbx), %xmm1
movapd %xmm3, %xmm2
unpcklpd %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0]
mulpd %xmm1, %xmm2
addpd %xmm0, %xmm2
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
mulpd 0x30(%rbx), %xmm3
addpd %xmm2, %xmm3
movapd %xmm3, 0x20(%rsp)
leaq 0x80(%rsp), %rcx
leaq 0x1c0(%rsp), %rsi
movq %rcx, (%rsi)
movq %rbx, 0x10(%rsi)
movq $0x2, 0x18(%rsi)
xorl %ecx, %ecx
movq %rcx, 0x20(%rsi)
movq $0x1, 0x28(%rsi)
movq %rax, 0x30(%rsi)
movq %rax, 0x40(%rsi)
movq %rcx, 0x48(%rsi)
movq $0x3, 0x58(%rsi)
leaq 0x180(%rsp), %rbx
movq %rbx, %rdi
callq 0xd900
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
movupd (%rcx), %xmm0
movsd (%rax), %xmm1
movhpd 0x18(%rax), %xmm1       # xmm1 = xmm1[0],mem[0]
mulpd %xmm0, %xmm1
movsd 0x30(%rax), %xmm0
mulsd 0x10(%rcx), %xmm0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm0, %xmm2
addsd %xmm1, %xmm2
movapd %xmm2, 0x10(%rsp)
leaq 0x1c0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, 0x38(%rsp)
movq %r15, %rsi
movsd 0x8(%rsp), %xmm0
callq 0x15c8c
movaps (%rbx), %xmm0
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movsd 0x10(%rbx), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd %xmm0, 0xf0(%rsp)
movq %r14, 0x8(%rsp)
movq (%r14), %rdi
callq 0xed84
movq (%rax), %r12
movq 0x8(%rax), %r15
cmpq %r15, %r12
je 0xcd10
leaq 0x1d0(%rsp), %r13
leaq 0x1c0(%rsp), %r14
movq %rbp, 0x128(%rsp)
movups (%r12), %xmm0
movaps %xmm0, 0x1c0(%rsp)
movq 0x20(%r12), %rax
movq %rax, 0x10(%r13)
movups 0x10(%r12), %xmm0
movups %xmm0, (%r13)
movq 0x38(%r12), %rax
movq %rax, 0x28(%r13)
movupd 0x28(%r12), %xmm0
movupd %xmm0, 0x18(%r13)
movb 0x40(%r12), %al
movb %al, 0x200(%rsp)
movq %r14, %rdi
callq 0x5b1e
movl %eax, %ebx
movq %rbp, %rdi
callq 0x10814
cmpl %eax, %ebx
jne 0xcd03
movq 0xf0(%rsp), %rax
movq %rax, 0x270(%rsp)
movapd 0xe0(%rsp), %xmm0
movapd %xmm0, 0x260(%rsp)
movq 0x8(%rsp), %rdi
movq %r14, %rsi
leaq 0x260(%rsp), %rdx
callq 0xd2fa
testb %al, %al
je 0xcd03
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x5af6
movapd 0x70(%rsp), %xmm3
subpd 0xd0(%rsp), %xmm3
movapd %xmm3, %xmm0
mulpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm4
subsd 0xc0(%rsp), %xmm4
movapd %xmm4, %xmm0
mulsd %xmm4, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
movq 0x48(%rsp), %rbx
jbe 0xca2b
movq %xmm0, %xmm0            # xmm0 = xmm0[0],zero
sqrtpd %xmm0, %xmm0
divsd %xmm0, %xmm4
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
divpd %xmm0, %xmm3
movupd (%rbx), %xmm0
mulpd %xmm3, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd 0x10(%rbx), %xmm0
mulsd %xmm4, %xmm0
addsd %xmm1, %xmm0
ucomisd %xmm0, %xmm2
ja 0xcd03
movsd %xmm4, 0x40(%rsp)
movapd %xmm3, 0x60(%rsp)
movq %rbp, %rsi
leaq 0x70(%rsp), %rbp
movq %rbp, %rdi
movsd %xmm0, 0x50(%rsp)
callq 0x107a4
movq %r14, %rsi
leaq 0x100(%rsp), %r14
movq %r14, %rdi
callq 0x5b0a
movq %rbp, 0x140(%rsp)
movq %r14, 0x148(%rsp)
movsd 0x50(%rsp), %xmm0
movsd %xmm0, 0x158(%rsp)
leaq 0x188(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0xd956
movsd 0x158(%rsp), %xmm0
movsd %xmm0, 0x1b0(%rsp)
movq 0x188(%rsp), %rax
movups (%rax), %xmm0
movaps %xmm0, 0x50(%rsp)
movupd 0x1b0(%rsp), %xmm1
movsd 0x10(%rax), %xmm0
movapd %xmm1, 0x250(%rsp)
mulsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rsp)
movq 0x38(%rsp), %rdi
callq 0x15c80
xorpd %xmm6, %xmm6
movupd (%rax), %xmm0
subpd 0xd0(%rsp), %xmm0
movapd %xmm0, %xmm1
mulpd %xmm0, %xmm1
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
addsd %xmm1, %xmm3
movsd 0x10(%rax), %xmm1
subsd 0xc0(%rsp), %xmm1
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
ucomisd %xmm6, %xmm2
jbe 0xcb68
movq %xmm2, %xmm2            # xmm2 = xmm2[0],zero
sqrtpd %xmm2, %xmm2
divsd %xmm2, %xmm1
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
divpd %xmm2, %xmm0
movapd 0x20(%rsp), %xmm3
movapd 0x10(%rsp), %xmm4
movapd 0x250(%rsp), %xmm5
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
movapd 0x50(%rsp), %xmm2
mulpd %xmm5, %xmm2
addpd %xmm2, %xmm3
addsd 0x130(%rsp), %xmm4
movupd (%rbx), %xmm2
movapd %xmm3, %xmm10
movapd 0x60(%rsp), %xmm7
movapd %xmm7, %xmm3
mulpd %xmm2, %xmm3
movapd %xmm4, %xmm9
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
addsd %xmm3, %xmm4
movsd 0x10(%rbx), %xmm3
movsd 0x40(%rsp), %xmm8
movapd %xmm8, %xmm5
mulsd %xmm3, %xmm5
addsd %xmm4, %xmm5
addsd %xmm5, %xmm5
mulsd %xmm5, %xmm3
unpcklpd %xmm5, %xmm5            # xmm5 = xmm5[0,0]
mulpd %xmm2, %xmm5
subpd %xmm7, %xmm5
mulpd %xmm0, %xmm5
subsd %xmm8, %xmm3
mulsd %xmm1, %xmm3
movapd %xmm5, %xmm0
unpckhpd %xmm5, %xmm0            # xmm0 = xmm0[1],xmm5[1]
addsd %xmm5, %xmm0
addsd %xmm3, %xmm0
ucomisd %xmm6, %xmm0
movq 0x128(%rsp), %rbp
movapd %xmm10, 0x20(%rsp)
movapd %xmm9, 0x10(%rsp)
jbe 0xccfb
leaq 0x70(%rsp), %rdi
movq %rbp, %rsi
movapd %xmm0, 0x60(%rsp)
callq 0x107c4
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1c0(%rsp), %r14
movq %r14, %rsi
callq 0x5b0a
movq %rbp, %rdi
callq 0x10794
movapd %xmm0, %xmm1
movaps 0x60(%rsp), %xmm0
callq 0x34a0
leaq 0x70(%rsp), %rax
movq %rax, 0x140(%rsp)
movq %rbx, 0x148(%rsp)
movsd %xmm0, 0x158(%rsp)
leaq 0x188(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0xd956
movsd 0x158(%rsp), %xmm0
movsd %xmm0, 0x1b0(%rsp)
movq 0x188(%rsp), %rax
movupd (%rax), %xmm0
movupd 0x1b0(%rsp), %xmm1
movapd %xmm1, %xmm2
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
mulpd %xmm0, %xmm2
movapd 0x20(%rsp), %xmm0
addpd %xmm2, %xmm0
movapd %xmm0, 0x20(%rsp)
mulsd 0x10(%rax), %xmm1
movapd 0x10(%rsp), %xmm0
addsd %xmm1, %xmm0
movapd %xmm0, 0x10(%rsp)
jmp 0xcd03
leaq 0x1c0(%rsp), %r14
addq $0x48, %r12
cmpq %r15, %r12
jne 0xc91e
movq 0x120(%rsp), %r15
movupd (%r15), %xmm0
movq 0x118(%rsp), %r12
movupd (%r12), %xmm1
mulpd 0x20(%rsp), %xmm1
addpd %xmm0, %xmm1
movupd %xmm1, (%r15)
movapd 0x10(%rsp), %xmm0
mulsd 0x10(%r12), %xmm0
addsd 0x10(%r15), %xmm0
movsd %xmm0, 0x10(%r15)
leaq 0x70(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
callq 0x107ec
movupd (%r12), %xmm0
movupd 0x8(%r12), %xmm1
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd 0x70(%rsp), %xmm0
movupd 0x88(%rsp), %xmm2
movapd %xmm1, %xmm3
unpcklpd %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0]
mulpd %xmm2, %xmm3
addpd %xmm0, %xmm3
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
mulpd 0xa0(%rsp), %xmm1
addpd %xmm3, %xmm1
movapd %xmm1, 0x100(%rsp)
leaq 0x1c0(%rsp), %rsi
leaq 0x80(%rsp), %rax
movq %rax, (%rsi)
movq %r14, 0x10(%rsi)
movq $0x2, 0x18(%rsi)
xorl %eax, %eax
movq %rax, 0x20(%rsi)
movq $0x1, 0x28(%rsi)
movq %r12, 0x30(%rsi)
movq %r12, 0x40(%rsi)
movq %rax, 0x48(%rsi)
movq $0x3, 0x58(%rsi)
leaq 0x180(%rsp), %rbx
movq %rbx, %rdi
callq 0xd900
movq 0x10(%rbx), %rax
movq 0x20(%rbx), %rcx
movupd (%rcx), %xmm0
movsd (%rax), %xmm1
movhpd 0x18(%rax), %xmm1       # xmm1 = xmm1[0],mem[0]
mulpd %xmm0, %xmm1
movsd 0x30(%rax), %xmm0
mulsd 0x10(%rcx), %xmm0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm0, %xmm2
addsd %xmm1, %xmm2
movsd %xmm2, 0x110(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x10800
movapd 0xa0a3(%rip), %xmm0     # 0x16ef0
leaq 0x140(%rsp), %rax
movapd %xmm0, (%rax)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x10(%rax)
leaq 0x230(%rsp), %rdx
movapd %xmm0, (%rdx)
movq %rcx, 0x10(%rdx)
movq %r14, (%rbx)
movq %rax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
leaq 0x1c8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xd956
movq 0x10(%rbx), %rax
movq %rax, 0x28(%r14)
movq %rbx, 0x38(%r14)
movl 0x2f0(%rsp), %ecx
testl %ecx, %ecx
jle 0xc790
movq 0x1c8(%rsp), %rcx
movups (%rcx), %xmm0
movaps %xmm0, 0x60(%rsp)
movsd 0x10(%rcx), %xmm0
mulsd 0x10(%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x50(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x230(%rsp)
movq $0x0, 0x240(%rsp)
movq 0x38(%rsp), %rdi
callq 0x15c86
movupd (%rax), %xmm2
movapd 0xa00b(%rip), %xmm1     # 0x16f10
xorpd %xmm2, %xmm1
movsd 0x10(%rax), %xmm3
movq 0x48(%rsp), %rax
movupd (%rax), %xmm4
mulpd %xmm4, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movsd 0x10(%rax), %xmm1
movapd %xmm3, %xmm5
mulsd %xmm1, %xmm5
subsd %xmm5, %xmm0
addsd %xmm0, %xmm0
mulsd %xmm0, %xmm1
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd %xmm4, %xmm0
addpd %xmm2, %xmm0
addsd %xmm3, %xmm1
movapd %xmm0, %xmm2
mulpd %xmm0, %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
movapd %xmm1, %xmm2
mulsd %xmm1, %xmm2
addsd %xmm3, %xmm2
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm2
jbe 0xcf8e
movq %xmm2, %xmm2            # xmm2 = xmm2[0],zero
sqrtpd %xmm2, %xmm2
divsd %xmm2, %xmm1
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
divpd %xmm2, %xmm0
movaps 0xe0(%rsp), %xmm2
leaq 0x2a0(%rsp), %rsi
movaps %xmm2, (%rsi)
movq 0xf0(%rsp), %rax
movq %rax, 0x10(%rsi)
leaq 0x280(%rsp), %rdx
movapd %xmm0, (%rdx)
movsd %xmm1, 0x10(%rdx)
leaq 0x140(%rsp), %r14
movq %r14, %rdi
callq 0x15bf0
movl 0x2f0(%rsp), %r13d
leal -0x1(%r13), %r8d
leaq 0x230(%rsp), %rbx
leaq 0x100(%rsp), %rcx
leaq 0x138(%rsp), %r9
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc5c2
movupd (%r12), %xmm0
movupd 0x8(%r12), %xmm1
movapd %xmm1, 0xd0(%rsp)
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd 0x70(%rsp), %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
mulpd 0xa0(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
movups 0x88(%rsp), %xmm0
movaps %xmm0, 0xc0(%rsp)
leaq 0x1c0(%rsp), %rsi
leaq 0x80(%rsp), %rax
movq %rax, (%rsi)
leaq 0x70(%rsp), %rax
movq %rax, 0x10(%rsi)
movq $0x2, 0x18(%rsi)
xorl %eax, %eax
movq %rax, 0x20(%rsi)
movq $0x1, 0x28(%rsi)
movq %r12, 0x30(%rsi)
movq %r12, 0x40(%rsi)
movq %rax, 0x48(%rsi)
movq $0x3, 0x58(%rsi)
leaq 0x180(%rsp), %r14
movq %r14, %rdi
callq 0xd900
movapd 0xd0(%rsp), %xmm0
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
mulpd 0xc0(%rsp), %xmm0
movapd %xmm0, %xmm3
movq 0x10(%r14), %rax
movsd (%rax), %xmm0
movhpd 0x18(%rax), %xmm0       # xmm0 = xmm0[0],mem[0]
addpd 0x20(%rsp), %xmm3
movsd 0x30(%rax), %xmm1
movl %r13d, %eax
addpd 0x10(%rsp), %xmm3
movq 0x20(%r14), %rcx
movupd (%rcx), %xmm2
mulsd 0x10(%rcx), %xmm1
mulpd %xmm2, %xmm0
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm1, %xmm2
addsd %xmm0, %xmm2
movupd (%r15), %xmm0
mulpd (%rbx), %xmm3
addpd %xmm0, %xmm3
movupd %xmm3, (%r15)
mulsd 0x10(%rbx), %xmm2
addsd 0x10(%r15), %xmm2
movsd %xmm2, 0x10(%r15)
decl %eax
je 0xc790
movapd 0x60(%rsp), %xmm1
mulpd 0x50(%rsp), %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
addsd 0x40(%rsp), %xmm0
movsd 0xabbe(%rip), %xmm1     # 0x17d10
ucomisd %xmm0, %xmm1
jbe 0xc790
xorpd %xmm0, %xmm0
leaq 0x180(%rsp), %rbx
movapd %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq (%rbp), %rax
leaq 0x1c0(%rsp), %r14
leaq 0xe0(%rsp), %rcx
movq %r14, %rdi
movq %rbp, %rsi
movq 0x38(%rsp), %rdx
movq 0x48(%rsp), %r8
callq *0x18(%rax)
movl 0x2f0(%rsp), %r8d
addl $-0x2, %r8d
leaq 0x100(%rsp), %rcx
leaq 0x138(%rsp), %r9
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0xc5c2
movupd 0x88(%rsp), %xmm3
movapd 0xa0(%rsp), %xmm4
movupd (%r12), %xmm2
movupd 0x8(%r12), %xmm0
movapd %xmm0, %xmm5
shufpd $0x1, %xmm0, %xmm5      # xmm5 = xmm5[1],xmm0[0]
movsd 0x8e39(%rip), %xmm1     # 0x16030
movsd 0x8e31(%rip), %xmm6     # 0x16030
subpd 0x70(%rsp), %xmm6
movsd (%r12), %xmm7
unpcklpd %xmm7, %xmm7            # xmm7 = xmm7[0,0]
movhpd 0x90(%rsp), %xmm4       # xmm4 = xmm4[0],mem[0]
mulpd %xmm6, %xmm7
xorpd %xmm6, %xmm6
unpcklpd %xmm1, %xmm6            # xmm6 = xmm6[0],xmm1[0]
subpd %xmm4, %xmm6
mulpd %xmm5, %xmm6
movhpd 0xa8(%rsp), %xmm3       # xmm3 = xmm3[0],mem[0]
xorpd %xmm4, %xmm4
subpd %xmm3, %xmm4
mulpd %xmm0, %xmm4
addpd %xmm6, %xmm4
addpd %xmm7, %xmm4
movapd 0x80(%rsp), %xmm3
movhpd 0x98(%rsp), %xmm3       # xmm3 = xmm3[0],mem[0]
xorpd %xmm5, %xmm5
subpd %xmm3, %xmm5
mulpd %xmm2, %xmm5
subsd 0xb0(%rsp), %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
mulsd %xmm1, %xmm0
movapd %xmm5, %xmm1
unpckhpd %xmm5, %xmm1            # xmm1 = xmm1[1],xmm5[1]
addsd %xmm0, %xmm1
addsd %xmm5, %xmm1
movupd (%r15), %xmm0
mulpd (%rbx), %xmm4
addpd %xmm0, %xmm4
movupd %xmm4, (%r15)
mulsd 0x10(%rbx), %xmm1
addsd 0x10(%r15), %xmm1
movsd %xmm1, 0x10(%r15)
jmp 0xc790
jmp 0xd2b2
movq 0x1d8(%rsp), %rcx
addq 0x1c8(%rsp), %rcx
cmpq $0x3, %rcx
jne 0xd2db
cmpq $0x1, 0x1d0(%rsp)
jne 0xd2db
movq %rax, %rdi
callq 0x34b0
leaq 0x9666(%rip), %rdi      # 0x16948
leaq 0x96fd(%rip), %rsi      # 0x169e6
leaq 0x9720(%rip), %rcx      # 0x16a10
movl $0x78, %edx
callq 0x31a0