// File: /workspace/github_cpp_makefile_star2_O3/2TallTim[P]modern-raytracing/./camera.hpp
// Function: camera::camera(vec3, vec3, vec3, double, double, double, double)
camera(vec3 origin_, vec3 aim_, vec3 up_,
           double vfov, double aspect, double aperture, double focus_dist) {
        lens_radius = aperture / 2;
        double theta = vfov*M_PI/180;
        double half_height = tan(theta/2);
        double half_width = aspect*half_height;
        origin = origin_;
        w = unit_vector(origin_ - aim_);
        u = unit_vector(cross(up_, w));
        v = cross(w,u);
        horizontal = 2*half_width*focus_dist*u;
        vertical = 2*half_height*focus_dist*v;
    }

// Assembly:
pushq %rbx
subq $0x20, %rsp
movaps %xmm3, 0x10(%rsp)
movaps %xmm1, (%rsp)
movq %rdi, %rbx
movsd 0x4523(%rip), %xmm1     # 0xa120
mulsd %xmm1, %xmm2
xorps %xmm3, %xmm3
movups %xmm3, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
mulsd 0x4568(%rip), %xmm0     # 0xa180
movsd %xmm2, (%rdi)
divsd 0x4564(%rip), %xmm0     # 0xa188
mulsd %xmm1, %xmm0
callq 0x30b0
movapd (%rsp), %xmm10
mulsd %xmm0, %xmm10
movaps 0x30(%rsp), %xmm1
movups %xmm1, 0x20(%rbx)
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rbx)
movsd 0x40(%rsp), %xmm1
subsd 0x58(%rsp), %xmm1
movapd 0x30(%rsp), %xmm2
movupd 0x48(%rsp), %xmm3
subpd %xmm3, %xmm2
movapd %xmm2, %xmm3
mulpd %xmm2, %xmm3
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
movapd %xmm2, %xmm4
mulsd %xmm2, %xmm4
addsd %xmm3, %xmm4
movapd %xmm1, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm4, %xmm3
sqrtsd %xmm3, %xmm3
divsd %xmm3, %xmm1
unpcklpd %xmm3, %xmm3            # xmm3 = xmm3[0,0]
divpd %xmm3, %xmm2
movupd %xmm2, 0x98(%rbx)
movsd %xmm1, 0xa8(%rbx)
movsd 0x60(%rsp), %xmm3
movsd 0x68(%rsp), %xmm5
movsd 0x70(%rsp), %xmm6
movapd %xmm2, %xmm4
unpckhpd %xmm2, %xmm4            # xmm4 = xmm4[1],xmm2[1]
movapd %xmm4, %xmm7
mulsd %xmm6, %xmm7
movapd %xmm2, %xmm8
mulsd %xmm5, %xmm8
mulsd %xmm1, %xmm5
subsd %xmm7, %xmm5
mulsd %xmm2, %xmm6
movapd %xmm3, %xmm7
mulsd %xmm1, %xmm7
subsd %xmm6, %xmm7
movapd 0x431a(%rip), %xmm6     # 0xa010
movapd %xmm7, %xmm9
xorpd %xmm6, %xmm9
mulsd %xmm4, %xmm3
subsd %xmm8, %xmm3
mulsd %xmm7, %xmm7
movapd %xmm5, %xmm8
mulsd %xmm5, %xmm8
addsd %xmm7, %xmm8
movapd %xmm3, %xmm7
mulsd %xmm3, %xmm7
addsd %xmm8, %xmm7
sqrtsd %xmm7, %xmm7
divsd %xmm7, %xmm3
movsd %xmm3, 0x78(%rbx)
unpcklpd %xmm9, %xmm5            # xmm5 = xmm5[0],xmm9[0]
unpcklpd %xmm7, %xmm7            # xmm7 = xmm7[0,0]
divpd %xmm7, %xmm5
movupd %xmm5, 0x68(%rbx)
movapd %xmm5, %xmm7
unpckhpd %xmm5, %xmm7            # xmm7 = xmm7[1],xmm5[1]
movapd %xmm7, %xmm8
mulsd %xmm1, %xmm8
mulsd %xmm5, %xmm1
movapd %xmm10, %xmm9
unpcklpd %xmm0, %xmm9            # xmm9 = xmm9[0],xmm0[0]
addpd %xmm9, %xmm9
movapd %xmm9, %xmm0
movapd 0x10(%rsp), %xmm9
unpcklpd %xmm9, %xmm9            # xmm9 = xmm9[0,0]
mulpd %xmm0, %xmm9
movapd %xmm9, %xmm0
unpcklpd %xmm9, %xmm0            # xmm0 = xmm0[0],xmm9[0]
mulpd %xmm5, %xmm0
mulsd %xmm4, %xmm5
mulsd %xmm3, %xmm4
subsd %xmm8, %xmm4
mulsd %xmm2, %xmm7
mulsd %xmm3, %xmm2
subsd %xmm1, %xmm2
xorpd %xmm6, %xmm2
subsd %xmm5, %xmm7
movsd %xmm4, 0x80(%rbx)
movlpd %xmm2, 0x88(%rbx)
movsd %xmm7, 0x90(%rbx)
movupd %xmm0, 0x38(%rbx)
unpcklpd %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
mulpd %xmm9, %xmm3
movupd %xmm3, 0x48(%rbx)
unpckhpd %xmm9, %xmm9            # xmm9 = xmm9[1,1]
unpcklpd %xmm7, %xmm2            # xmm2 = xmm2[0],xmm7[0]
mulpd %xmm9, %xmm2
movupd %xmm2, 0x58(%rbx)
addq $0x20, %rsp
popq %rbx
retq