// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/util.cpp
// Function: two_perlin_sphere()
std::shared_ptr<hitable> two_perlin_sphere()
{
    std::shared_ptr<texture> _perlin_texture = std::make_shared<perlin_noise_texture>(4.0f);

    std::vector<std::shared_ptr<hitable>> list;
    list.reserve(50);

    list.push_back(std::make_shared<sphere>(vec3(0.0f, -1000.0f, 0.0f), 1000.0f, std::make_shared<lambertian>(_perlin_texture)));
    list.push_back(std::make_shared<sphere>(vec3(0.0f,  2.0f, 0.0f), 2.0f, std::make_shared<lambertian>(_perlin_texture)));

    return std::make_shared<bvh_node>(list, 0.0f, 1.0f);
}

// Assembly:
pushq %rbx
subq $0x80, %rsp
movq %rdi, %rbx
movl $0x20, %edi
callq 0x63f0
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x386a8(%rip), %rcx     # 0x4e728
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
leaq 0x380ba(%rip), %rdx     # 0x4e148
addq $0x10, %rdx
movq %rdx, 0x10(%rax)
movl $0x40800000, 0x18(%rax) # imm = 0x40800000
movq %rcx, 0x50(%rsp)
movq %rax, 0x58(%rsp)
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x32, %esi
callq 0x7616
movsd 0x26494(%rip), %xmm0    # 0x3c560
movsd %xmm0, 0x30(%rsp)
movl $0x0, 0x38(%rsp)
movl $0x447a0000, 0xc(%rsp)  # imm = 0x447A0000
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x50(%rsp), %rcx
callq 0x20b4e
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x30(%rsp), %rcx
leaq 0xc(%rsp), %r8
leaq 0x20(%rsp), %r9
callq 0x2172a
movaps 0x10(%rsp), %xmm0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x7c1c
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x1615c
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1616b
callq 0x7774
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1617a
callq 0x7774
movsd 0x2647e(%rip), %xmm0    # 0x3c600
movsd %xmm0, 0x30(%rsp)
movl $0x0, 0x38(%rsp)
movl $0x40000000, 0xc(%rsp)  # imm = 0x40000000
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x50(%rsp), %rcx
callq 0x20b4e
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0xb(%rsp), %rdx
leaq 0x30(%rsp), %rcx
leaq 0xc(%rsp), %r8
leaq 0x20(%rsp), %r9
callq 0x2172a
movaps 0x10(%rsp), %xmm0
leaq 0x40(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x7c1c
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x16212
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x16221
callq 0x7774
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x16230
callq 0x7774
leaq 0x10(%rsp), %r8
movl $0x0, (%r8)
leaq 0x20(%rsp), %r9
movl $0x3f800000, (%r9)      # imm = 0x3F800000
leaq 0x48(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x40(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x60(%rsp), %rcx
callq 0x2169c
movaps 0x40(%rsp), %xmm0
movups %xmm0, (%rbx)
leaq 0x60(%rsp), %rdi
callq 0x7726
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1628a
callq 0x7774
movq %rbx, %rax
addq $0x80, %rsp
popq %rbx
retq
jmp 0x162d7
jmp 0x1629e
jmp 0x162c1
jmp 0x162d7
movq %rax, %rbx
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x162b0
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x162c4
callq 0x7774
jmp 0x162c4
movq %rax, %rbx
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x162da
callq 0x7774
jmp 0x162da
jmp 0x162d7
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x7726
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x162f3
callq 0x7774
movq %rbx, %rdi
callq 0x66e0