// File: /workspace/github_cpp_makefile_star2_O1/alan0201tw[P]RayTracer/src/util.cpp
// Function: two_sphere()
std::shared_ptr<hitable> two_sphere()
{
    std::shared_ptr<texture> _checker_texture = std::make_shared<checker_texture>(
        std::make_shared<constant_texture>(vec3(0.1f, 0.2f, 0.3f)),
        std::make_shared<constant_texture>(vec3(0.9f, 0.9f, 0.9f))
    );

    std::shared_ptr<texture> _image_texture = std::make_shared<image_texture>("./resources/texture.jpg");

    std::vector<std::shared_ptr<hitable>> list;
    list.reserve(50);

    list.push_back(std::make_shared<sphere>(vec3(0.0f, -10.0f, 0.0f), 10.0f, std::make_shared<lambertian>(_image_texture)));
    list.push_back(std::make_shared<sphere>(vec3(0.0f,  10.0f, 0.0f), 10.0f, std::make_shared<lambertian>(_checker_texture)));

    return std::make_shared<bvh_node>(list, 0.0f, 1.0f);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
xorl %r13d, %r13d
movq %r13, 0x40(%rsp)
movl $0x28, %edi
callq 0x63f0
movabsq $0x100000001, %r14      # imm = 0x100000001
movq %r14, 0x8(%rax)
leaq 0x37f5d(%rip), %r15     # 0x4e470
movq %r15, (%rax)
leaq 0x10(%rax), %rcx
leaq 0x37bdf(%rip), %r12     # 0x4e100
addq $0x10, %r12
movq %r12, 0x10(%rax)
movsd 0x25fef(%rip), %xmm0    # 0x3c520
movsd %xmm0, 0x18(%rax)
movl $0x3e99999a, 0x20(%rax) # imm = 0x3E99999A
movq %rax, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq %r13, 0x8(%rsp)
movl $0x28, %edi
callq 0x63f0
movq %r14, 0x8(%rax)
movq %r15, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %r12, 0x10(%rax)
movsd 0x25f80(%rip), %xmm0    # 0x3c4f0
movsd %xmm0, 0x18(%rax)
movl $0x3f666666, 0x20(%rax) # imm = 0x3F666666
leaq 0x8(%rsp), %r8
movq %rax, 0x8(%r8)
movq %rcx, (%r8)
leaq 0x68(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x60(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x21250
movups 0x60(%rsp), %xmm0
movups %xmm0, 0x80(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rsp)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x165cd
callq 0x7768
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x165dc
callq 0x7768
leaq 0x68(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x265be(%rip), %rcx     # 0x3cbae
leaq 0x60(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0x2143e
leaq 0x60(%rsp), %rdi
movups (%rdi), %xmm0
movups %xmm0, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x32, %esi
callq 0x7602
movabsq $-0x3ee0000000000000, %rax # imm = 0xC120000000000000
movq %rax, 0x54(%rsp)
movl $0x0, 0x5c(%rsp)
movl $0x41200000, 0x1c(%rsp) # imm = 0x41200000
leaq 0x38(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x30(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x215a2
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0x54(%rsp), %rcx
leaq 0x1c(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x2217e
movups 0x20(%rsp), %xmm0
leaq 0x8(%rsp), %rsi
movups %xmm0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x7c02
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x166bd
callq 0x7768
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x166cc
callq 0x7768
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x166db
callq 0x7768
movabsq $0x4120000000000000, %rax # imm = 0x4120000000000000
movq %rax, 0x54(%rsp)
movl $0x0, 0x5c(%rsp)
movl $0x41200000, 0x1c(%rsp) # imm = 0x41200000
leaq 0x38(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x30(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0x80(%rsp), %rcx
callq 0x215a2
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
leaq 0x7(%rsp), %rdx
leaq 0x54(%rsp), %rcx
leaq 0x1c(%rsp), %r8
leaq 0x30(%rsp), %r9
callq 0x2217e
movups 0x20(%rsp), %xmm0
leaq 0x8(%rsp), %rsi
movups %xmm0, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x7c02
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x16777
callq 0x7768
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x16786
callq 0x7768
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x16795
callq 0x7768
leaq 0x20(%rsp), %r8
movl $0x0, (%r8)
leaq 0x30(%rsp), %r9
movl $0x3f800000, (%r9)      # imm = 0x3F800000
leaq 0x10(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x8(%rsp), %rsi
leaq 0x54(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x220f0
movq 0x8(%rsp), %rax
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x10(%rsp), %rcx
movq %rax, 0x10(%rsp)
movq %rcx, 0x8(%rbx)
leaq 0x60(%rsp), %rdi
callq 0x7720
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x16803
callq 0x7768
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x16815
callq 0x7768
movq %rbx, %rax
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x1686a
jmp 0x16831
jmp 0x16854
jmp 0x1686a
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x16843
callq 0x7768
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x16857
callq 0x7768
jmp 0x16857
movq %rax, %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1686d
callq 0x7768
jmp 0x1686d
jmp 0x1686a
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x7720
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1688b
callq 0x7768
jmp 0x1688b
movq %rax, %rbx
movq 0x88(%rsp), %rdi
testq %rdi, %rdi
je 0x1689d
callq 0x7768
movq %rbx, %rdi
callq 0x66e0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x168bc
callq 0x7768
jmp 0x168bc
movq %rax, %rbx
movq 0x48(%rsp), %rdi
jmp 0x16893