// File: /workspace/github_cpp_makefile_star2_O1/alan0201tw[P]RayTracer/src/box.cpp
// Function: box::box(vec3 const&, vec3 const&, std::shared_ptr<material>)
box::box(const vec3& _min, const vec3& _max, std::shared_ptr<material> _material)
    : min_point(_min), max_point(_max)
{
    std::vector<std::shared_ptr<hitable>> list;
    list.reserve(6);

    //std::cout << min_point << " , " << max_point << std::endl;

    list.push_back(std::make_shared<xy_rect>(
            min_point.x(), max_point.x(), min_point.y(), max_point.y(), max_point.z(), _material));
    list.push_back(std::make_shared<flip_normals>(std::make_shared<xy_rect>(
            min_point.x(), max_point.x(), min_point.y(), max_point.y(), min_point.z(), _material)));

    list.push_back(std::make_shared<xz_rect>(
            min_point.x(), max_point.x(), min_point.z(), max_point.z(), max_point.y(), _material));
    list.push_back(std::make_shared<flip_normals>(std::make_shared<xz_rect>(
            min_point.x(), max_point.x(), min_point.z(), max_point.z(), min_point.y(), _material)));

    list.push_back(std::make_shared<yz_rect>(
            min_point.y(), max_point.y(), min_point.z(), max_point.z(), max_point.x(), _material));
    list.push_back(std::make_shared<flip_normals>(std::make_shared<yz_rect>(
            min_point.y(), max_point.y(), min_point.z(), max_point.z(), min_point.x(), _material)));

    rect_list = hitable_list(list);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, %r14
movq %rdi, %rbx
leaq 0x46f8e(%rip), %rax     # 0x4de68
movq %rax, (%rdi)
movq (%rsi), %rax
movq %rax, 0x8(%rdi)
movl 0x8(%rsi), %eax
movl %eax, 0x10(%rdi)
movq (%rdx), %rax
movq %rax, 0x14(%rdi)
movl 0x8(%rdx), %eax
movl %eax, 0x1c(%rdi)
leaq 0x472ba(%rip), %r13     # 0x4e1b8
addq $0x10, %r13
movq %r13, 0x20(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
xorl %eax, %eax
movq %rax, 0x38(%rdi)
leaq 0x80(%rsp), %rdi
movq %rax, 0x10(%rdi)
movaps %xmm0, (%rdi)
movl $0x6, %esi
callq 0x7602
movss 0x8(%rbx), %xmm0
leaq 0x48(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x14(%rbx), %xmm0
leaq 0x44(%rsp), %r8
movss %xmm0, (%r8)
movss 0xc(%rbx), %xmm0
leaq 0x40(%rsp), %r9
movss %xmm0, (%r9)
movss 0x18(%rbx), %xmm0
leaq 0x3c(%rsp), %rax
movss %xmm0, (%rax)
movss 0x1c(%rbx), %xmm0
leaq 0x38(%rsp), %rbp
movss %xmm0, (%rbp)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x18(%rsp), %rsi
leaq 0x3c(%rsp), %r12
movq %r12, %rdx
pushq %r14
pushq %rbp
pushq %rax
callq 0x7a4a
addq $0x20, %rsp
movups 0x10(%rsp), %xmm0
leaq 0x58(%rsp), %rsi
movups %xmm0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c02
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x6fd1
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6fe0
callq 0x7768
movss 0x8(%rbx), %xmm0
leaq 0x44(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x14(%rbx), %xmm0
leaq 0x40(%rsp), %r8
movss %xmm0, (%r8)
movss 0xc(%rbx), %xmm0
leaq 0x3c(%rsp), %r15
movss %xmm0, (%r15)
movss 0x18(%rbx), %xmm0
movss %xmm0, 0x38(%rsp)
movss 0x10(%rbx), %xmm0
movss %xmm0, 0x34(%rsp)
leaq 0x50(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x50(%rsp), %rsi
leaq 0x17(%rsp), %rdx
movq %r15, %r9
pushq %r14
pushq %r12
pushq %rbp
callq 0x7a4a
addq $0x20, %rsp
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0x7db0
movups 0x10(%rsp), %xmm0
leaq 0x58(%rsp), %rsi
movups %xmm0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c02
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x70a0
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x70af
callq 0x7768
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x70be
callq 0x7768
movss 0x8(%rbx), %xmm0
leaq 0x48(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x14(%rbx), %xmm0
leaq 0x44(%rsp), %r8
movss %xmm0, (%r8)
movss 0x10(%rbx), %xmm0
leaq 0x40(%rsp), %r9
movss %xmm0, (%r9)
movss 0x1c(%rbx), %xmm0
movss %xmm0, 0x3c(%rsp)
movss 0x18(%rbx), %xmm0
movss %xmm0, 0x38(%rsp)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x18(%rsp), %rsi
leaq 0x3c(%rsp), %r12
movq %r12, %rdx
pushq %r14
pushq %rbp
pushq %r15
callq 0x7ef0
addq $0x20, %rsp
movups 0x10(%rsp), %xmm0
leaq 0x58(%rsp), %rsi
movups %xmm0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c02
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x715d
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x716c
callq 0x7768
movss 0x8(%rbx), %xmm0
leaq 0x44(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x14(%rbx), %xmm0
leaq 0x40(%rsp), %r8
movss %xmm0, (%r8)
movss 0x10(%rbx), %xmm0
leaq 0x3c(%rsp), %r15
movss %xmm0, (%r15)
movss 0x1c(%rbx), %xmm0
movss %xmm0, 0x38(%rsp)
movss 0xc(%rbx), %xmm0
movss %xmm0, 0x34(%rsp)
leaq 0x50(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x50(%rsp), %rsi
leaq 0x17(%rsp), %rdx
movq %r15, %r9
pushq %r14
pushq %r12
pushq %rbp
callq 0x7ef0
addq $0x20, %rsp
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0x80a0
movups 0x10(%rsp), %xmm0
leaq 0x58(%rsp), %rsi
movups %xmm0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c02
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x722c
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x723b
callq 0x7768
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x724a
callq 0x7768
movss 0xc(%rbx), %xmm0
leaq 0x48(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x18(%rbx), %xmm0
leaq 0x44(%rsp), %r8
movss %xmm0, (%r8)
movss 0x10(%rbx), %xmm0
leaq 0x40(%rsp), %r9
movss %xmm0, (%r9)
movss 0x1c(%rbx), %xmm0
movss %xmm0, 0x3c(%rsp)
movss 0x14(%rbx), %xmm0
movss %xmm0, 0x38(%rsp)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x18(%rsp), %rsi
leaq 0x3c(%rsp), %r12
movq %r12, %rdx
pushq %r14
pushq %rbp
pushq %r15
callq 0x8166
addq $0x20, %rsp
movups 0x10(%rsp), %xmm0
leaq 0x58(%rsp), %rsi
movups %xmm0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c02
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x72e9
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x72f8
callq 0x7768
movss 0xc(%rbx), %xmm0
leaq 0x44(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x18(%rbx), %xmm0
leaq 0x40(%rsp), %r8
movss %xmm0, (%r8)
movss 0x10(%rbx), %xmm0
leaq 0x3c(%rsp), %r9
movss %xmm0, (%r9)
movss 0x1c(%rbx), %xmm0
movss %xmm0, 0x38(%rsp)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x34(%rsp)
leaq 0x50(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x50(%rsp), %rsi
leaq 0x17(%rsp), %rdx
pushq %r14
pushq %r12
pushq %rbp
callq 0x8166
addq $0x20, %rsp
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x48(%rsp), %rcx
callq 0x8316
movups 0x10(%rsp), %xmm0
leaq 0x58(%rsp), %rsi
movups %xmm0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c02
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x73b5
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x73c4
callq 0x7768
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x73d3
callq 0x7768
leaq 0x58(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x76c4
leaq 0x60(%rsp), %r14
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x28(%rbx), %rax
movups 0x30(%rbx), %xmm0
movq (%r14), %rcx
movq %rcx, 0x28(%rbx)
movq 0x8(%r14), %rcx
movq %rcx, 0x30(%rbx)
movq 0x10(%r14), %rcx
movq %rcx, 0x38(%rbx)
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
movq %rax, (%rdi)
movups %xmm0, 0x8(%rdi)
movq %rcx, (%r14)
movq %rdx, 0x8(%r14)
movq %rsi, 0x10(%r14)
callq 0x7720
movl 0x18(%r14), %eax
movl %eax, 0x40(%rbx)
movq %r13, -0x8(%r14)
movq %r14, %rdi
callq 0x7720
leaq 0x80(%rsp), %rdi
callq 0x7720
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x758e
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x7487
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x749b
callq 0x7768
jmp 0x749b
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x7591
jmp 0x7585
jmp 0x758e
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x74c5
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7591
jmp 0x7585
jmp 0x758e
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x74ef
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7503
callq 0x7768
jmp 0x7503
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x7591
jmp 0x7585
jmp 0x758e
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x7527
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7591
jmp 0x7585
jmp 0x758e
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x7547
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x755b
callq 0x7768
jmp 0x755b
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x7591
jmp 0x7585
jmp 0x758e
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x757b
callq 0x7768
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7591
callq 0x7768
jmp 0x7591
jmp 0x758e
movq %rax, %r14
leaq 0x28(%rbx), %r15
leaq 0x80(%rsp), %rdi
callq 0x7720
movq %r13, 0x20(%rbx)
movq %r15, %rdi
callq 0x7720
movq %r14, %rdi
callq 0x66e0