// File: alan0201tw[P]RayTracer/src/aabb.cpp
// Function: surrounding_box(aabb, aabb)
aabb surrounding_box(aabb box0, aabb box1)
{
    vec3 minimum( fmin(box0.get_min().x(), box1.get_min().x() ),
                  fmin(box0.get_min().y(), box1.get_min().y() ),
                  fmin(box0.get_min().z(), box1.get_min().z() ));
    vec3 maximum( fmax(box0.get_max().x(), box1.get_max().x() ),
                  fmax(box0.get_max().y(), box1.get_max().y() ),
                  fmax(box0.get_max().z(), box1.get_max().z() ));
    
    return aabb(minimum, maximum);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1e0, %rsp            # imm = 0x1E0
movq %rdi, -0x1a0(%rbp)
movq %rdi, -0x198(%rbp)
leaq 0x28(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq 0x10(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x13990
movss %xmm1, -0x20(%rbp)
movlpd %xmm0, -0x28(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x8d70
movq -0x1b8(%rbp), %rdi
movss %xmm0, -0x1dc(%rbp)
callq 0x13990
movss %xmm1, -0x40(%rbp)
movlpd %xmm0, -0x48(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x8d70
movaps %xmm0, %xmm1
movss -0x1dc(%rbp), %xmm0
callq 0x1b460
movq -0x1c0(%rbp), %rdi
movss %xmm0, -0x1cc(%rbp)
callq 0x13990
movss %xmm1, -0x60(%rbp)
movlpd %xmm0, -0x68(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x8d90
movq -0x1b8(%rbp), %rdi
movss %xmm0, -0x1d8(%rbp)
callq 0x13990
movss %xmm1, -0x80(%rbp)
movlpd %xmm0, -0x88(%rbp)
movl -0x80(%rbp), %eax
movl %eax, -0x70(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x8d90
movaps %xmm0, %xmm1
movss -0x1d8(%rbp), %xmm0
callq 0x1b460
movq -0x1c0(%rbp), %rdi
movss %xmm0, -0x1d0(%rbp)
callq 0x13990
movss %xmm1, -0xa0(%rbp)
movlpd %xmm0, -0xa8(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x90(%rbp)
movq -0xa8(%rbp), %rax
movq %rax, -0x98(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x8db0
movq -0x1b8(%rbp), %rdi
movss %xmm0, -0x1d4(%rbp)
callq 0x13990
movss %xmm1, -0xc0(%rbp)
movlpd %xmm0, -0xc8(%rbp)
movl -0xc0(%rbp), %eax
movl %eax, -0xb0(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x8db0
movaps %xmm0, %xmm1
movss -0x1d4(%rbp), %xmm0
callq 0x1b460
movss -0x1d0(%rbp), %xmm1
movaps %xmm0, %xmm2
movss -0x1cc(%rbp), %xmm0
leaq -0xc(%rbp), %rdi
callq 0xf9b0
movq -0x1c0(%rbp), %rdi
callq 0x1b4e0
movss %xmm1, -0xe8(%rbp)
movlpd %xmm0, -0xf0(%rbp)
movl -0xe8(%rbp), %eax
movl %eax, -0xd8(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x8d70
movq -0x1b8(%rbp), %rdi
movss %xmm0, -0x1c8(%rbp)
callq 0x1b4e0
movss %xmm1, -0x108(%rbp)
movlpd %xmm0, -0x110(%rbp)
movl -0x108(%rbp), %eax
movl %eax, -0xf8(%rbp)
movq -0x110(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x8d70
movaps %xmm0, %xmm1
movss -0x1c8(%rbp), %xmm0
callq 0x1b4a0
movq -0x1c0(%rbp), %rdi
movss %xmm0, -0x1a4(%rbp)
callq 0x1b4e0
movss %xmm1, -0x128(%rbp)
movlpd %xmm0, -0x130(%rbp)
movl -0x128(%rbp), %eax
movl %eax, -0x118(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x8d90
movq -0x1b8(%rbp), %rdi
movss %xmm0, -0x1c4(%rbp)
callq 0x1b4e0
movss %xmm1, -0x148(%rbp)
movlpd %xmm0, -0x150(%rbp)
movl -0x148(%rbp), %eax
movl %eax, -0x138(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x140(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x8d90
movaps %xmm0, %xmm1
movss -0x1c4(%rbp), %xmm0
callq 0x1b4a0
movq -0x1c0(%rbp), %rdi
movss %xmm0, -0x1a8(%rbp)
callq 0x1b4e0
movss %xmm1, -0x168(%rbp)
movlpd %xmm0, -0x170(%rbp)
movl -0x168(%rbp), %eax
movl %eax, -0x158(%rbp)
movq -0x170(%rbp), %rax
movq %rax, -0x160(%rbp)
leaq -0x160(%rbp), %rdi
callq 0x8db0
movq -0x1b8(%rbp), %rdi
movss %xmm0, -0x1ac(%rbp)
callq 0x1b4e0
movss %xmm1, -0x188(%rbp)
movlpd %xmm0, -0x190(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x17c(%rbp)
movl -0x188(%rbp), %eax
movl %eax, -0x174(%rbp)
leaq -0x17c(%rbp), %rdi
callq 0x8db0
movaps %xmm0, %xmm1
movss -0x1ac(%rbp), %xmm0
callq 0x1b4a0
movss -0x1a8(%rbp), %xmm1
movaps %xmm0, %xmm2
movss -0x1a4(%rbp), %xmm0
leaq -0xd4(%rbp), %rdi
callq 0xf9b0
movq -0x1a0(%rbp), %rdi
leaq -0xc(%rbp), %rsi
leaq -0xd4(%rbp), %rdx
callq 0x9330
movq -0x198(%rbp), %rax
addq $0x1e0, %rsp            # imm = 0x1E0
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop