// File: /workspace/github_cpp_makefile_star2_O3/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 0x46f7e(%rip), %rax     # 0x4de88
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 0x47272(%rip), %r13     # 0x4e1a0
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 0x7616
movss 0x8(%rbx), %xmm0
leaq 0x40(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x14(%rbx), %xmm0
leaq 0x3c(%rsp), %r8
movss %xmm0, (%r8)
movss 0xc(%rbx), %xmm0
leaq 0x38(%rsp), %r9
movss %xmm0, (%r9)
movss 0x18(%rbx), %xmm0
leaq 0x34(%rsp), %rax
movss %xmm0, (%rax)
movss 0x1c(%rbx), %xmm0
leaq 0x30(%rsp), %rbp
movss %xmm0, (%rbp)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x18(%rsp), %rsi
leaq 0x34(%rsp), %r12
movq %r12, %rdx
pushq %r14
pushq %rbp
pushq %rax
callq 0x7a72
addq $0x20, %rsp
movaps 0x10(%rsp), %xmm0
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c1c
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x7001
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7010
callq 0x7774
movss 0x8(%rbx), %xmm0
leaq 0x3c(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x14(%rbx), %xmm0
leaq 0x38(%rsp), %r8
movss %xmm0, (%r8)
movss 0xc(%rbx), %xmm0
leaq 0x34(%rsp), %r15
movss %xmm0, (%r15)
movss 0x18(%rbx), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x10(%rbx), %xmm0
movss %xmm0, 0x2c(%rsp)
leaq 0x48(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x48(%rsp), %rsi
leaq 0x17(%rsp), %rdx
movq %r15, %r9
pushq %r14
pushq %r12
pushq %rbp
callq 0x7a72
addq $0x20, %rsp
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x7db6
movaps 0x10(%rsp), %xmm0
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c1c
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x70d0
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x70df
callq 0x7774
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x70ee
callq 0x7774
movss 0x8(%rbx), %xmm0
leaq 0x40(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x14(%rbx), %xmm0
leaq 0x3c(%rsp), %r8
movss %xmm0, (%r8)
movss 0x10(%rbx), %xmm0
leaq 0x38(%rsp), %r9
movss %xmm0, (%r9)
movss 0x1c(%rbx), %xmm0
movss %xmm0, 0x34(%rsp)
movss 0x18(%rbx), %xmm0
movss %xmm0, 0x30(%rsp)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x18(%rsp), %rsi
leaq 0x34(%rsp), %r12
movq %r12, %rdx
pushq %r14
pushq %rbp
pushq %r15
callq 0x7eee
addq $0x20, %rsp
movaps 0x10(%rsp), %xmm0
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c1c
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x718d
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x719c
callq 0x7774
movss 0x8(%rbx), %xmm0
leaq 0x3c(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x14(%rbx), %xmm0
leaq 0x38(%rsp), %r8
movss %xmm0, (%r8)
movss 0x10(%rbx), %xmm0
leaq 0x34(%rsp), %r15
movss %xmm0, (%r15)
movss 0x1c(%rbx), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0xc(%rbx), %xmm0
movss %xmm0, 0x2c(%rsp)
leaq 0x48(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x48(%rsp), %rsi
leaq 0x17(%rsp), %rdx
movq %r15, %r9
pushq %r14
pushq %r12
pushq %rbp
callq 0x7eee
addq $0x20, %rsp
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x8098
movaps 0x10(%rsp), %xmm0
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c1c
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x725c
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x726b
callq 0x7774
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x727a
callq 0x7774
movss 0xc(%rbx), %xmm0
leaq 0x40(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x18(%rbx), %xmm0
leaq 0x3c(%rsp), %r8
movss %xmm0, (%r8)
movss 0x10(%rbx), %xmm0
leaq 0x38(%rsp), %r9
movss %xmm0, (%r9)
movss 0x1c(%rbx), %xmm0
movss %xmm0, 0x34(%rsp)
movss 0x14(%rbx), %xmm0
movss %xmm0, 0x30(%rsp)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x18(%rsp), %rsi
leaq 0x34(%rsp), %r12
movq %r12, %rdx
pushq %r14
pushq %rbp
pushq %r15
callq 0x815c
addq $0x20, %rsp
movaps 0x10(%rsp), %xmm0
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c1c
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x7319
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7328
callq 0x7774
movss 0xc(%rbx), %xmm0
leaq 0x3c(%rsp), %rcx
movss %xmm0, (%rcx)
movss 0x18(%rbx), %xmm0
leaq 0x38(%rsp), %r8
movss %xmm0, (%r8)
movss 0x10(%rbx), %xmm0
leaq 0x34(%rsp), %r9
movss %xmm0, (%r9)
movss 0x1c(%rbx), %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x8(%rbx), %xmm0
movss %xmm0, 0x2c(%rsp)
leaq 0x48(%rsp), %rdi
movq $0x0, -0x8(%rdi)
subq $0x8, %rsp
leaq 0x48(%rsp), %rsi
leaq 0x17(%rsp), %rdx
pushq %r14
pushq %r12
pushq %rbp
callq 0x815c
addq $0x20, %rsp
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xf(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x8306
movaps 0x10(%rsp), %xmm0
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x7c1c
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x73e5
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x73f4
callq 0x7774
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x7403
callq 0x7774
leaq 0x50(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x76ca
leaq 0x58(%rsp), %r14
movq 0x38(%rbx), %rax
movups (%r14), %xmm0
movq 0x10(%r14), %rcx
movq %rcx, 0x38(%rbx)
movups 0x28(%rbx), %xmm1
movups %xmm0, 0x28(%rbx)
leaq 0x10(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
callq 0x7726
movl 0x18(%r14), %eax
movl %eax, 0x40(%rbx)
movq %r13, -0x8(%r14)
movq %r14, %rdi
callq 0x7726
leaq 0x80(%rsp), %rdi
callq 0x7726
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x75a2
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x749b
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x74af
callq 0x7774
jmp 0x74af
movq %rax, %r14
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x75a5
jmp 0x7599
jmp 0x75a2
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x74d9
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x75a5
jmp 0x7599
jmp 0x75a2
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x7503
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7517
callq 0x7774
jmp 0x7517
movq %rax, %r14
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x75a5
jmp 0x7599
jmp 0x75a2
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x753b
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x75a5
jmp 0x7599
jmp 0x75a2
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x755b
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x756f
callq 0x7774
jmp 0x756f
movq %rax, %r14
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x75a5
jmp 0x7599
jmp 0x75a2
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x758f
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x75a5
callq 0x7774
jmp 0x75a5
jmp 0x75a2
movq %rax, %r14
leaq 0x28(%rbx), %r15
leaq 0x80(%rsp), %rdi
callq 0x7726
movq %r13, 0x20(%rbx)
movq %r15, %rdi
callq 0x7726
movq %r14, %rdi
callq 0x66e0