// File: /workspace/github_cpp_makefile_star2_O3/alan0201tw[P]RayTracer/src/util.cpp
// Function: random_scene()
std::shared_ptr<hitable> random_scene()
{
    int n = 500;
    std::vector<std::shared_ptr<hitable>> list;
    list.reserve(n + 1);

    std::shared_ptr<texture> _checker_texture = std::make_shared<checker_texture>(
        std::make_shared<constant_texture>(vec3(0.2f, 0.3f, 0.1f)),
        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");

    list.push_back(std::make_shared<sphere>(vec3(0,-1000,0), 1000, std::make_shared<lambertian>(_checker_texture)));

    for (int a = -10; a < 10; a++) {
        for (int b = -10; b < 10; b++) {
            float choose_mat = drand48();
            vec3 center(a + 0.9 * drand48(), 0.2f, b + 0.9 * drand48()); 
            if ((center-vec3(4,0.2,0)).length() > 0.9) { 
                if (choose_mat < 0.8f) 
                {
                    // diffuse
                    //list.push_back(std::make_shared<sphere>(center, 0.2, std::make_shared<lambertian>(vec3(drand48()*drand48(), drand48()*drand48(), drand48()*drand48()))));
                    std::shared_ptr<texture> random_texture = std::make_shared<constant_texture>(
                        vec3(drand48()*drand48(), drand48()*drand48(), drand48()*drand48()));

                    list.push_back(std::make_shared<moving_sphere>(
                        center, center + vec3(0, 0.5f * drand48(), 0.0f), 
                        0.0f, 1.0f, // start and end time
                        0.2f, std::make_shared<lambertian>(random_texture)));
                }
                else if (choose_mat < 0.95f)
                {
                    // metal
                    list.push_back(std::make_shared<sphere>(center, 0.2,
                        std::make_shared<metal>(vec3(0.5*(1 + drand48()), 0.5*(1 + drand48()), 0.5*(1 + drand48())),  0.5*drand48())));
                }
                else
                {
                    // glass
                    list.push_back(std::make_shared<sphere>(center, 0.2, std::make_shared<dielectric>(1.5)));
                }
            }
        }
    }
    std::shared_ptr<texture> _color_texture = std::make_shared<constant_texture>(vec3(4.0f, 4.0f, 4.0f));

    list.push_back(std::make_shared<sphere>(vec3(-4, 1, 2.0f), 1.0, std::make_shared<dielectric>(1.5)));
    //list.push_back(std::make_shared<sphere>(vec3(-4, 1, 0), 1.0, std::make_shared<lambertian>(vec3(0.4, 0.2, 0.1))));
    // list.push_back(std::make_shared<sphere>(vec3(-4, 1, 2.0f), 1.0, std::make_shared<lambertian>(_image_texture)));
    list.push_back(std::make_shared<sphere>(vec3(0, 1, 0), 1.0, std::make_shared<diffuse_light>(_color_texture)));
    list.push_back(std::make_shared<sphere>(vec3(4, 1, 0), 1.0, std::make_shared<metal>(vec3(0.7, 0.6, 0.5), 0.0)));

    //return std::make_shared<hitable_list>(list, list.size());

    // change to bvh
    return std::make_shared<bvh_node>(list, 0.0f, 1.0f);

    // using O(N) search ( hitable_list )
    // real    4m49.214s
    // user    13m57.995s
    // sys     0m7.843s
    //
    // using BVH
    // real    1m21.986s
    // user    4m50.992s
    // sys     0m4.199s
    //
    // using BVH and functors
    // real    1m18.025s
    // user    4m20.477s
    // sys     0m3.869s
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movl $0x1f5, %esi            # imm = 0x1F5
callq 0x7616
movl $0x28, %edi
callq 0x63f0
movabsq $0x100000001, %r14      # imm = 0x100000001
movq %r14, 0x8(%rax)
leaq 0x3947c(%rip), %r15     # 0x4e458
movq %r15, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
leaq 0x390fb(%rip), %r12     # 0x4e0e8
addq $0x10, %r12
movq %r12, 0x10(%rax)
movsd 0x27543(%rip), %xmm0    # 0x3c540
movsd %xmm0, 0x18(%rax)
movl $0x3dcccccd, 0x20(%rax) # imm = 0x3DCCCCCD
movq %rax, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movl $0x28, %edi
callq 0x63f0
movq %r14, 0x8(%rax)
movq %r15, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq %r12, 0x10(%rax)
movsd 0x27519(%rip), %xmm0    # 0x3c550
movsd %xmm0, 0x18(%rax)
movl $0x3f666666, 0x20(%rax) # imm = 0x3F666666
movq %rsp, %r8
movq %rax, 0x8(%r8)
movq %rcx, (%r8)
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x20(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x20820
movaps 0x20(%rsp), %xmm0
movaps %xmm0, 0x100(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15092
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x150a1
callq 0x7774
leaq 0x28(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x27c84(%rip), %rcx     # 0x3cd39
leaq 0x20(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x209f0
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rsp)
movsd 0x2748a(%rip), %xmm0    # 0x3c560
movsd %xmm0, 0x50(%rsp)
movl $0x0, 0x58(%rsp)
movl $0x3e8, 0x40(%rsp)      # imm = 0x3E8
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %rsp, %rsi
leaq 0x68(%rsp), %rdx
leaq 0x100(%rsp), %rcx
callq 0x20b4e
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x68(%rsp), %rdx
leaq 0x50(%rsp), %r15
leaq 0x40(%rsp), %r8
movq %rsp, %r9
movq %r15, %rcx
callq 0x20cbe
movaps 0x10(%rsp), %xmm0
leaq 0x20(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x7c1c
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1516b
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1517a
callq 0x7774
movq %r12, 0xf8(%rsp)
movq %rbx, 0x118(%rsp)
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15199
callq 0x7774
movl $0xfffffff6, %ecx       # imm = 0xFFFFFFF6
leaq 0x40(%rsp), %rbp
leaq 0x68(%rsp), %rbx
leaq 0x39859(%rip), %rax     # 0x4ea08
addq $0x10, %rax
movq %rax, 0xe8(%rsp)
leaq 0x3987e(%rip), %rax     # 0x4ea40
addq $0x10, %rax
movq %rax, 0xf0(%rsp)
leaq 0x90(%rsp), %r14
leaq 0x10(%rsp), %r12
movl %ecx, 0x84(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
movsd %xmm0, 0x128(%rsp)
movl $0xfffffff6, %r13d      # imm = 0xFFFFFFF6
callq 0x63a0
movsd %xmm0, 0xb0(%rsp)
callq 0x63a0
movsd 0x275a5(%rip), %xmm1    # 0x3c7b8
mulsd %xmm1, %xmm0
addsd 0x128(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xd0(%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
movsd %xmm0, 0xc0(%rsp)
callq 0x63a0
movsd 0x2756d(%rip), %xmm1    # 0x3c7b8
mulsd %xmm1, %xmm0
addsd 0xc0(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movss 0xd0(%rsp), %xmm2
movss %xmm2, 0x40(%rsp)
movl $0x3e4ccccd, 0x44(%rsp) # imm = 0x3E4CCCCD
movss %xmm0, 0x48(%rsp)
addss 0x2724f(%rip), %xmm2    # 0x3c4d0
mulss %xmm2, %xmm2
addss 0x2723b(%rip), %xmm2    # 0x3c4c8
mulss %xmm0, %xmm0
addss %xmm2, %xmm0
sqrtss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x15708
xorps %xmm0, %xmm0
cvtsd2ss 0xb0(%rsp), %xmm0
movss 0x27219(%rip), %xmm1    # 0x3c4d4
ucomiss %xmm0, %xmm1
jbe 0x154ce
callq 0x63a0
movaps %xmm0, 0xd0(%rsp)
callq 0x63a0
movaps %xmm0, 0xc0(%rsp)
callq 0x63a0
movaps %xmm0, 0xb0(%rsp)
callq 0x63a0
movaps %xmm0, 0x130(%rsp)
callq 0x63a0
movsd %xmm0, 0x78(%rsp)
callq 0x63a0
movsd %xmm0, 0x120(%rsp)
movl $0x28, %edi
callq 0x63f0
movq %r15, %r12
movq %rbx, %r14
movq %rbp, %rbx
movapd 0xd0(%rsp), %xmm0
unpcklpd 0xb0(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
movapd 0xc0(%rsp), %xmm1
unpcklpd 0x130(%rsp), %xmm1      # xmm1 = xmm1[0],mem[0]
mulpd %xmm0, %xmm1
cvtpd2ps %xmm1, %xmm0
movsd 0x78(%rsp), %xmm1
mulsd 0x120(%rsp), %xmm1
cvtsd2ss %xmm1, %xmm1
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x390e0(%rip), %rcx     # 0x4e458
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq 0xf8(%rsp), %rdx
movq %rdx, 0x10(%rax)
movlpd %xmm0, 0x18(%rax)
movss %xmm1, 0x20(%rax)
movq %rcx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
callq 0x63a0
mulsd 0x27411(%rip), %xmm0    # 0x3c7c0
cvtsd2ss %xmm0, %xmm0
movsd 0x40(%rsp), %xmm1
xorps %xmm2, %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
addps %xmm1, %xmm2
movss 0x48(%rsp), %xmm0
addss 0x270f8(%rip), %xmm0    # 0x3c4c8
movlps %xmm2, 0x68(%rsp)
movss %xmm0, 0x70(%rsp)
movl $0x0, 0x4c(%rsp)
movl $0x3f800000, 0x8c(%rsp) # imm = 0x3F800000
movl $0x3e4ccccd, 0x88(%rsp) # imm = 0x3E4CCCCD
movq $0x0, 0x50(%rsp)
leaq 0x58(%rsp), %rdi
movq %r15, %rsi
leaq 0x67(%rsp), %rbp
movq %rbp, %rdx
leaq 0x20(%rsp), %rcx
callq 0x20b4e
movq $0x0, (%rsp)
subq $0x8, %rsp
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %rbp, %rdx
movq %rbx, %rbp
movq %rbx, %rcx
movq %r14, %rbx
movq %r14, %r8
leaq 0x54(%rsp), %r9
movq %r12, %r15
pushq %r12
leaq 0x98(%rsp), %rax
pushq %rax
leaq 0xa4(%rsp), %rax
pushq %rax
callq 0x20e24
addq $0x20, %rsp
movaps (%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x90(%rsp), %r14
movq %r14, %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x7c1c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1549d
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x154ac
callq 0x7774
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x154bb
callq 0x7774
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15708
jmp 0x15703
movss 0x27002(%rip), %xmm1    # 0x3c4d8
movabsq $0x3fc999999999999a, %rax # imm = 0x3FC999999999999A
ucomiss %xmm0, %xmm1
jbe 0x15650
movq %rax, 0x50(%rsp)
callq 0x63a0
movaps %xmm0, 0xd0(%rsp)
callq 0x63a0
movaps %xmm0, 0xc0(%rsp)
callq 0x63a0
movsd %xmm0, 0x78(%rsp)
callq 0x63a0
movsd %xmm0, 0xb0(%rsp)
movl $0x28, %edi
callq 0x63f0
movsd 0x2728d(%rip), %xmm0    # 0x3c7c0
movsd 0xb0(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd 0x78(%rsp), %xmm2
addsd 0x2725a(%rip), %xmm2    # 0x3c7a8
mulsd %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
movapd 0xd0(%rsp), %xmm2
unpcklpd 0xc0(%rsp), %xmm2       # xmm2 = xmm2[0],mem[0]
addpd 0x26ffd(%rip), %xmm2    # 0x3c570
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x390b0(%rip), %rcx     # 0x4e638
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
cvtsd2ss %xmm1, %xmm1
movq 0xe8(%rsp), %rdx
movq %rdx, 0x10(%rax)
mulpd 0x26fd6(%rip), %xmm2    # 0x3c580
cvtpd2ps %xmm2, %xmm2
movlpd %xmm2, 0x18(%rax)
movss %xmm0, 0x20(%rax)
movss 0x26c44(%rip), %xmm0    # 0x3c204
minss %xmm1, %xmm0
cmpltss 0x26efb(%rip), %xmm1    # 0x3c4c8
andnps %xmm0, %xmm1
movss %xmm1, 0x24(%rax)
movq %rax, 0x8(%rsp)
movq %rcx, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r15, %r8
movq %rsp, %r9
callq 0x2101a
movaps 0x10(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
callq 0x7c1c
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1562e
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1563d
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15708
jmp 0x15703
movq %rax, 0x50(%rsp)
movl $0x20, %edi
callq 0x63f0
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x39014(%rip), %rcx     # 0x4e688
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq 0xf0(%rsp), %rdx
movq %rdx, 0x10(%rax)
movl $0x3fc00000, 0x18(%rax) # imm = 0x3FC00000
movq %rax, 0x8(%rsp)
movq %rcx, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %rbp, %rcx
movq %r15, %r8
movq %rsp, %r9
callq 0x21164
movaps 0x10(%rsp), %xmm0
movaps %xmm0, 0x20(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq %r14, %rdi
leaq 0x20(%rsp), %rsi
callq 0x7c1c
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x156ea
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x156f9
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15708
callq 0x7774
incl %r13d
cmpl $0xa, %r13d
jne 0x151f8
movl 0x84(%rsp), %ecx
incl %ecx
cmpl $0xa, %ecx
jne 0x151db
movl $0x28, %edi
callq 0x63f0
movabsq $0x100000001, %r14      # imm = 0x100000001
movq %r14, 0x8(%rax)
leaq 0x38d12(%rip), %rcx     # 0x4e458
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq 0xf8(%rsp), %rdx
movq %rdx, 0x10(%rax)
movsd 0x26e2c(%rip), %xmm0    # 0x3c590
movsd %xmm0, 0x18(%rax)
movl $0x40800000, 0x20(%rax) # imm = 0x40800000
movq %rcx, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movsd 0x26e1e(%rip), %xmm0    # 0x3c5a0
movsd %xmm0, 0x40(%rsp)
movl $0x40000000, 0x48(%rsp) # imm = 0x40000000
movabsq $0x3ff0000000000000, %rbx # imm = 0x3FF0000000000000
movq %rbx, 0x68(%rsp)
movl $0x20, %edi
callq 0x63f0
movq %r14, 0x8(%rax)
leaq 0x38ed4(%rip), %rcx     # 0x4e688
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq 0xf0(%rsp), %rdx
movq %rdx, 0x10(%rax)
movl $0x3fc00000, 0x18(%rax) # imm = 0x3FC00000
leaq 0x50(%rsp), %r9
movq %rax, 0x8(%r9)
movq %rcx, (%r9)
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %rsp, %rsi
leaq 0x4c(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x68(%rsp), %r8
callq 0x21256
movaps (%rsp), %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x90(%rsp), %rdi
callq 0x7c1c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15830
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1583f
callq 0x7774
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x1584e
callq 0x7774
movsd 0x269ba(%rip), %xmm0    # 0x3c210
movsd %xmm0, 0x40(%rsp)
movl $0x0, 0x48(%rsp)
movq %rbx, 0x68(%rsp)
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x50(%rsp), %rsi
leaq 0x4c(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x21348
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %rsp, %rsi
leaq 0x4c(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x68(%rsp), %r8
leaq 0x50(%rsp), %r9
callq 0x214b8
movaps (%rsp), %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x90(%rsp), %rdi
callq 0x7c1c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x158e2
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x158f1
callq 0x7774
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x15900
callq 0x7774
movsd 0x26ca8(%rip), %xmm0    # 0x3c5b0
movsd %xmm0, 0x40(%rsp)
movl $0x0, 0x48(%rsp)
movq %rbx, 0x68(%rsp)
movl $0x28, %edi
callq 0x63f0
movq %r14, 0x8(%rax)
leaq 0x38d08(%rip), %rcx     # 0x4e638
movq %rcx, (%rax)
movq %rax, %rcx
addq $0x10, %rcx
movq 0xe8(%rsp), %rdx
movq %rdx, 0x10(%rax)
movaps 0x26c73(%rip), %xmm0    # 0x3c5c0
movups %xmm0, 0x18(%rax)
leaq 0x50(%rsp), %r9
movq %rax, 0x8(%r9)
movq %rcx, (%r9)
leaq 0x8(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %rsp, %rsi
leaq 0x4c(%rsp), %rdx
leaq 0x40(%rsp), %rcx
leaq 0x68(%rsp), %r8
callq 0x215aa
movq 0x118(%rsp), %rbx
movaps (%rsp), %xmm0
leaq 0x10(%rsp), %rsi
movaps %xmm0, (%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x90(%rsp), %rdi
callq 0x7c1c
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x159b8
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x159c7
callq 0x7774
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x159d6
callq 0x7774
movq %rsp, %r8
movl $0x0, (%r8)
leaq 0x50(%rsp), %r9
movl $0x3f800000, (%r9)      # imm = 0x3F800000
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x40(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0x2169c
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15a27
callq 0x7774
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x15a36
callq 0x7774
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0x15a48
callq 0x7774
leaq 0x90(%rsp), %rdi
callq 0x7726
movq %rbx, %rax
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15b0e
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15a81
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15a95
callq 0x7774
jmp 0x15a95
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x15b11
jmp 0x15b07
jmp 0x15b0e
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15ab5
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15ac9
callq 0x7774
jmp 0x15ac9
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x15b11
jmp 0x15b07
jmp 0x15b0e
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15ae9
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15afd
callq 0x7774
jmp 0x15afd
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x15b11
callq 0x7774
jmp 0x15b11
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15c5d
jmp 0x15c53
jmp 0x15c5a
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15b3b
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15b4f
callq 0x7774
jmp 0x15b4f
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15c5d
jmp 0x15c53
jmp 0x15c5a
movq %rax, %r14
jmp 0x15c6c
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15b86
callq 0x7774
jmp 0x15b86
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15c7e
jmp 0x15c79
jmp 0x15b9b
movq %rax, %r14
jmp 0x15c7e
movq %rax, %r14
jmp 0x15bc9
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15bba
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15bc9
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15c5d
jmp 0x15c53
jmp 0x15c5a
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15bed
callq 0x7774
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15c03
callq 0x7774
jmp 0x15c03
jmp 0x15c5a
movq %rax, %r14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15c5d
jmp 0x15c53
movq %rax, %r14
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x15c21
callq 0x7774
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15c35
callq 0x7774
jmp 0x15c35
movq %rax, %r14
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x15c49
callq 0x7774
jmp 0x15c49
movq %rax, %r14
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x15c5d
callq 0x7774
jmp 0x15c5d
movq %rax, %r14
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x15c6c
callq 0x7774
movq 0x108(%rsp), %rdi
testq %rdi, %rdi
je 0x15c7e
callq 0x7774
leaq 0x90(%rsp), %rdi
callq 0x7726
movq %r14, %rdi
callq 0x66e0