// File: 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 %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
leaq 0x40(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq 0x28(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x18(%rbp)
movsd %xmm2, -0x20(%rbp)
movsd %xmm3, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
addq $0x8, %rdi
callq 0x4d20
movq -0xf0(%rbp), %rdi
addq $0x20, %rdi
callq 0x4d20
movq -0xf0(%rbp), %rdi
addq $0x38, %rdi
callq 0x4d20
movq -0xf0(%rbp), %rdi
addq $0x50, %rdi
callq 0x4d20
movq -0xf0(%rbp), %rdi
addq $0x68, %rdi
callq 0x4d20
movq -0xf0(%rbp), %rdi
addq $0x80, %rdi
callq 0x4d20
movq -0xf0(%rbp), %rdi
addq $0x98, %rdi
callq 0x4d20
movq -0xf0(%rbp), %rax
movsd -0x20(%rbp), %xmm0
movsd 0xd986(%rip), %xmm1     # 0x17068
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd 0xda9e(%rip), %xmm0     # 0x17190
mulsd -0x10(%rbp), %xmm0
movsd 0xda89(%rip), %xmm1     # 0x17188
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
movsd 0xd953(%rip), %xmm1     # 0x17068
divsd %xmm1, %xmm0
callq 0x30c0
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
movq -0xf0(%rbp), %rax
movsd %xmm0, -0x38(%rbp)
movsd -0x18(%rbp), %xmm0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movq (%rsi), %rcx
movq %rcx, 0x20(%rax)
movq 0x8(%rsi), %rcx
movq %rcx, 0x28(%rax)
movq 0x10(%rsi), %rcx
movq %rcx, 0x30(%rax)
leaq -0x70(%rbp), %rdi
callq 0x3ba0
leaq -0x58(%rbp), %rdi
leaq -0x70(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x8fd0
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
movq -0x58(%rbp), %rax
movq %rax, 0x98(%rdx)
movq -0x50(%rbp), %rax
movq %rax, 0xa0(%rdx)
movq -0x48(%rbp), %rax
movq %rax, 0xa8(%rdx)
addq $0x98, %rdx
leaq -0xa0(%rbp), %rdi
callq 0x9f40
leaq -0x88(%rbp), %rdi
leaq -0xa0(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x8fd0
movq -0xf0(%rbp), %rdx
movq -0x88(%rbp), %rax
movq %rax, 0x68(%rdx)
movq -0x80(%rbp), %rax
movq %rax, 0x70(%rdx)
movq -0x78(%rbp), %rax
movq %rax, 0x78(%rdx)
movq %rdx, %rsi
addq $0x98, %rsi
addq $0x68, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x9f40
movq -0xf0(%rbp), %rsi
movq -0xb8(%rbp), %rax
movq %rax, 0x80(%rsi)
movq -0xb0(%rbp), %rax
movq %rax, 0x88(%rsi)
movq -0xa8(%rbp), %rax
movq %rax, 0x90(%rsi)
movsd 0xd7f8(%rip), %xmm0     # 0x17068
mulsd -0x40(%rbp), %xmm0
mulsd -0x28(%rbp), %xmm0
addq $0x68, %rsi
leaq -0xd0(%rbp), %rdi
callq 0x3fb0
movq -0xf0(%rbp), %rsi
movq -0xd0(%rbp), %rax
movq %rax, 0x38(%rsi)
movq -0xc8(%rbp), %rax
movq %rax, 0x40(%rsi)
movq -0xc0(%rbp), %rax
movq %rax, 0x48(%rsi)
movsd 0xd7ae(%rip), %xmm0     # 0x17068
mulsd -0x38(%rbp), %xmm0
mulsd -0x28(%rbp), %xmm0
addq $0x80, %rsi
leaq -0xe8(%rbp), %rdi
callq 0x3fb0
movq -0xf0(%rbp), %rax
movq -0xe8(%rbp), %rcx
movq %rcx, 0x50(%rax)
movq -0xe0(%rbp), %rcx
movq %rcx, 0x58(%rax)
movq -0xd8(%rbp), %rcx
movq %rcx, 0x60(%rax)
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopl (%rax,%rax)