// File: /workspace/github_cpp_makefile_star2_O2/alan0201tw[P]RayTracer/src/util.cpp
// Function: triangle_test()
std::shared_ptr<hitable> triangle_test()
{
    std::vector<std::shared_ptr<hitable>> list;
    list.reserve(3000);

    std::shared_ptr<texture> red_texture = std::make_shared<constant_texture>(vec3(0.65f, 0.05f, 0.05f));
    std::shared_ptr<texture> white_texture = std::make_shared<constant_texture>(vec3(0.73f, 0.73f, 0.73f));
    std::shared_ptr<texture> white1_texture = std::make_shared<constant_texture>(vec3(1.0f, 1.0f, 1.0f));
    std::shared_ptr<texture> green_texture = std::make_shared<constant_texture>(vec3(0.12f, 0.45f, 0.15f));
    std::shared_ptr<texture> light_texture = std::make_shared<constant_texture>(vec3(15.0f, 15.0f, 15.0f));

    auto red_material = std::make_shared<lambertian>(red_texture);
    auto white_material = std::make_shared<lambertian>(white_texture);
    //auto metal_material = std::make_shared<metal>(vec3(1,1,1), 0.0f);
    // auto bunny_material = std::make_shared<lambertian>(white1_texture);
    auto bunny_material = std::make_shared<metal>(vec3(1,1,1), 0.0f);
    auto green_material = std::make_shared<lambertian>(green_texture);
    auto light = std::make_shared<diffuse_light>(light_texture);

    list.push_back(std::make_shared<flip_normals>(std::make_shared<yz_rect>(0, 555, 0, 555, 555, green_material)));
    list.push_back(std::make_shared<yz_rect>(0, 555, 0, 555, 0, red_material));
    list.push_back(std::make_shared<xz_rect>(213, 343, 227, 332, 554, light));
    list.push_back(std::make_shared<flip_normals>(std::make_shared<xz_rect>(0, 555, 0, 555, 555, white_material)));
    list.push_back(std::make_shared<xz_rect>(0, 555, 0, 555, 0, white_material));
    list.push_back(std::make_shared<flip_normals>(std::make_shared<xy_rect>(0, 555, 0, 555, 555, white_material)));

    tinyobj::attrib_t attrib;
    std::vector<tinyobj::shape_t> shapes;
    std::vector<tinyobj::material_t> materials;
    std::string warn;
    std::string err;

    tinyobj::LoadObj(&attrib, &shapes, &materials, &warn, &err, "./resources/bunny_full.obj");
    if (!warn.empty())
    {
        std::cout << warn << std::endl;
    }
    if (!err.empty())
    {
        std::cerr << err << std::endl;
    }

    std::vector<std::shared_ptr<hitable>> bunny_list;
    // Loop over shapes
    for (size_t s = 0; s < shapes.size(); s++)
    {
        // Loop over faces(polygon)
        size_t index_offset = 0;
        for (size_t f = 0; f < shapes[s].mesh.num_face_vertices.size(); f++)
        {
            size_t fv = shapes[s].mesh.num_face_vertices[f];

            vec3 vertices[3];
            // Loop over vertices in the face.
            for (size_t v = 0; v < fv; v++)
            {
                // access to vertex
                tinyobj::index_t idx = shapes[s].mesh.indices[index_offset + v];
                tinyobj::real_t vx = attrib.vertices[3 * idx.vertex_index+0];
                tinyobj::real_t vy = attrib.vertices[3 * idx.vertex_index+1];
                tinyobj::real_t vz = attrib.vertices[3 * idx.vertex_index+2];
                // tinyobj::real_t nx = attrib.normals[3*idx.normal_index+0];
                // tinyobj::real_t ny = attrib.normals[3*idx.normal_index+1];
                // tinyobj::real_t nz = attrib.normals[3*idx.normal_index+2];
                // tinyobj::real_t tx = attrib.texcoords[2*idx.texcoord_index+0];
                // tinyobj::real_t ty = attrib.texcoords[2*idx.texcoord_index+1];
                vertices[v] = vec3(vx, vy, vz) * 150.0f;
            }
            
            bunny_list.push_back(std::make_shared<triangle>(
                vertices[0], vertices[1], vertices[2], bunny_material));

            index_offset += fv;

            // per-face material
            shapes[s].mesh.material_ids[f];
        }
    }

    //list.push_back(std::make_shared<bvh_node>(bunny_list, 0, 1));
    list.push_back( std::make_shared<translate>(
        std::make_shared<rotate_y>( 
            std::make_shared<bvh_node>(bunny_list, 0, 1),     
        180.0f ), vec3(235, 10, 278)
        ));

    // list.push_back(std::make_shared<xz_rect>(213, 343, 227, 332, 554, light));
    //list.push_back(std::make_shared<xy_rect>(253, 303, 10, 60, 50, light));
    //list.push_back(std::make_shared<sphere>(vec3(275, 150, 0), 50, light));
    //list.push_back(std::make_shared<sphere>(vec3(275, 50, 0), 30, light));

    // int ns = 100;
    // for(int j = 0; j < ns; j++)
    // {
    //     float tmp_x = 400.0f * drand48() - 100;
    //     float tmp_y = 400.0f * drand48() + 270;
    //     float tmp_z = 400.0f * drand48() + 395;
    //     vec3 random_pos = vec3(tmp_x, tmp_y, tmp_z);
    //     vec3 random_v0v1 = random_in_unit_sphere() * 35.0f;
    //     vec3 random_v0v2 = random_in_unit_sphere() * 35.0f;

    //     list.push_back(std::make_shared<triangle>(
    //         random_pos, random_pos + random_v0v1, random_pos + random_v0v2, white_material));
    // }

    return std::make_shared<bvh_node>(list, 0.0f, 1.0f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movl $0xbb8, %esi            # imm = 0xBB8
callq 0x71e8
movsd 0x1b1db(%rip), %xmm0    # 0x30630
leaq 0x20(%rsp), %rsi
movsd %xmm0, (%rsi)
movl $0x3d4ccccd, 0x8(%rsi)  # imm = 0x3D4CCCCD
leaq 0x1b0(%rsp), %rdi
callq 0x16b90
leaq 0x168(%rsp), %rax
leaq 0x1b8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
movaps %xmm0, -0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rdi)
callq 0x7426
movsd 0x1b1a2(%rip), %xmm0    # 0x30640
leaq 0x20(%rsp), %rsi
movsd %xmm0, (%rsi)
movl $0x3f3ae148, 0x8(%rsi)  # imm = 0x3F3AE148
leaq 0x1b0(%rsp), %rdi
callq 0x16b90
leaq 0x158(%rsp), %rax
leaq 0x1b8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
movaps %xmm0, -0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rdi)
callq 0x7426
movsd 0x1b049(%rip), %xmm0    # 0x30530
leaq 0x20(%rsp), %rsi
movsd %xmm0, (%rsi)
movl $0x3f800000, 0x8(%rsi)  # imm = 0x3F800000
leaq 0x1b0(%rsp), %rdi
callq 0x16b90
leaq 0x248(%rsp), %rax
leaq 0x1b8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
movaps %xmm0, -0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rdi)
callq 0x7426
movsd 0x1b120(%rip), %xmm0    # 0x30650
leaq 0x20(%rsp), %rsi
movsd %xmm0, (%rsi)
movl $0x3e19999a, 0x8(%rsi)  # imm = 0x3E19999A
leaq 0x1b0(%rsp), %rdi
callq 0x16b90
movq %rbx, 0x170(%rsp)
leaq 0x148(%rsp), %rax
leaq 0x1b8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
movaps %xmm0, -0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rdi)
callq 0x7426
movsd 0x1b0df(%rip), %xmm0    # 0x30660
leaq 0x20(%rsp), %rsi
movsd %xmm0, (%rsi)
movl $0x41700000, 0x8(%rsi)  # imm = 0x41700000
leaq 0x1b0(%rsp), %rdi
callq 0x16b90
leaq 0x138(%rsp), %rax
leaq 0x1b8(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
movaps %xmm0, -0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rdi)
callq 0x7426
leaq 0x288(%rsp), %r15
leaq 0x160(%rsp), %rsi
movq %r15, %rdi
callq 0x16bf0
leaq 0x278(%rsp), %rbx
leaq 0x150(%rsp), %rsi
movq %rbx, %rdi
callq 0x16bf0
leaq 0x1b0(%rsp), %rsi
movsd 0x1af2e(%rip), %xmm0    # 0x30530
movsd %xmm0, (%rsi)
movl $0x3f800000, 0x8(%rsi)  # imm = 0x3F800000
leaq 0x20(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x190(%rsp), %rdi
callq 0x1700e
leaq 0x268(%rsp), %r12
leaq 0x140(%rsp), %rsi
movq %r12, %rdi
callq 0x16bf0
leaq 0x258(%rsp), %r14
leaq 0x130(%rsp), %rsi
movq %r14, %rdi
callq 0x16d0e
leaq 0x110(%rsp), %rsi
andl $0x0, (%rsi)
movl $0x22b, %eax            # imm = 0x22B
leaq 0x90(%rsp), %rdx
movl %eax, (%rdx)
leaq 0xf0(%rsp), %rcx
andl $0x0, (%rcx)
leaq 0xb0(%rsp), %r8
movl %eax, (%r8)
leaq 0x80(%rsp), %r9
movl %eax, (%r9)
movq %r12, (%rsp)
leaq 0x50(%rsp), %rdi
callq 0x16e0b
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x734b
leaq 0x1b8(%rsp), %r13
leaq 0x28(%rsp), %r12
movaps -0x8(%r12), %xmm0
movaps %xmm0, -0x8(%r13)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r12)
leaq 0xd0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x7b8a
movq %r13, %rdi
callq 0x7426
movq %r12, %rdi
callq 0x7426
leaq 0x58(%rsp), %r12
movq %r12, %rdi
callq 0x7426
andl $0x0, -0x8(%r12)
movl $0x22b, %eax            # imm = 0x22B
leaq 0x90(%rsp), %rcx
andl $0x0, (%rcx)
leaq 0x110(%rsp), %rdx
movl %eax, (%rdx)
leaq 0xf0(%rsp), %r8
movl %eax, (%r8)
leaq 0xb0(%rsp), %r9
andl $0x0, (%r9)
movq %r15, (%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x16e0b
leaq 0x1b8(%rsp), %r12
leaq 0x28(%rsp), %r15
movaps -0x8(%r15), %xmm0
movaps %xmm0, -0x8(%r12)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r15)
leaq 0xd0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x7b8a
movq %r12, %rdi
callq 0x7426
movq %r15, %rdi
callq 0x7426
leaq 0x50(%rsp), %rsi
movl $0xd5, (%rsi)
leaq 0x110(%rsp), %rdx
movl $0x157, (%rdx)          # imm = 0x157
leaq 0x90(%rsp), %rcx
movl $0xe3, (%rcx)
leaq 0xf0(%rsp), %r8
movl $0x14c, (%r8)           # imm = 0x14C
leaq 0xb0(%rsp), %r9
movl $0x22a, (%r9)           # imm = 0x22A
movq %r14, (%rsp)
leaq 0x20(%rsp), %rdi
callq 0x16e3c
leaq 0x1b8(%rsp), %r15
leaq 0x28(%rsp), %r14
movaps -0x8(%r14), %xmm0
movaps %xmm0, -0x8(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r14)
leaq 0xd0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x7b8a
movq %r15, %rdi
callq 0x7426
movq %r14, %rdi
callq 0x7426
leaq 0x110(%rsp), %rsi
andl $0x0, (%rsi)
movl $0x22b, %eax            # imm = 0x22B
leaq 0x90(%rsp), %rdx
movl %eax, (%rdx)
leaq 0xf0(%rsp), %rcx
andl $0x0, (%rcx)
leaq 0xb0(%rsp), %r8
movl %eax, (%r8)
leaq 0x80(%rsp), %r9
movl %eax, (%r9)
movq %rbx, (%rsp)
leaq 0x50(%rsp), %rdi
callq 0x16e6d
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x72fc
leaq 0x1b8(%rsp), %r15
leaq 0x28(%rsp), %r14
movaps -0x8(%r14), %xmm0
movaps %xmm0, -0x8(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r14)
leaq 0xd0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x7b8a
movq %r15, %rdi
callq 0x7426
movq %r14, %rdi
callq 0x7426
leaq 0x58(%rsp), %r14
movq %r14, %rdi
callq 0x7426
andl $0x0, -0x8(%r14)
movl $0x22b, %eax            # imm = 0x22B
leaq 0x90(%rsp), %rcx
andl $0x0, (%rcx)
leaq 0x110(%rsp), %rdx
movl %eax, (%rdx)
leaq 0xf0(%rsp), %r8
movl %eax, (%r8)
leaq 0xb0(%rsp), %r9
andl $0x0, (%r9)
movq %rbx, (%rsp)
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x16e6d
leaq 0x1b8(%rsp), %r15
leaq 0x28(%rsp), %r14
movaps -0x8(%r14), %xmm0
movaps %xmm0, -0x8(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%r14)
leaq 0xd0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x7b8a
movq %r15, %rdi
callq 0x7426
movq %r14, %rdi
callq 0x7426
leaq 0x110(%rsp), %rsi
andl $0x0, (%rsi)
movl $0x22b, %eax            # imm = 0x22B
leaq 0x90(%rsp), %rdx
movl %eax, (%rdx)
leaq 0xf0(%rsp), %rcx
andl $0x0, (%rcx)
leaq 0xb0(%rsp), %r8
movl %eax, (%r8)
leaq 0x80(%rsp), %r9
movl %eax, (%r9)
movq %rbx, (%rsp)
leaq 0x50(%rsp), %rdi
callq 0x16e9e
leaq 0x20(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x72ad
leaq 0x1b8(%rsp), %r14
leaq 0x28(%rsp), %rbx
movaps -0x8(%rbx), %xmm0
movaps %xmm0, -0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rbx)
leaq 0xd0(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x7b8a
movq %r14, %rdi
callq 0x7426
movq %rbx, %rdi
callq 0x7426
leaq 0x58(%rsp), %rdi
callq 0x7426
leaq 0x1b0(%rsp), %rbx
xorl %ebp, %ebp
movl $0x90, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6230
leaq 0x90(%rsp), %rsi
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
leaq 0xf0(%rsp), %rdx
andq $0x0, 0x10(%rdx)
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movaps %xmm0, (%rdx)
movb %bpl, (%rax)
leaq 0x120(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %bpl, (%rax)
pushq $0x1
popq %rax
movl %eax, 0x10(%rsp)
movl %eax, 0x8(%rsp)
andq $0x0, (%rsp)
leaq 0x1b2a4(%rip), %r9      # 0x30d19
leaq 0x50(%rsp), %rcx
leaq 0x110(%rsp), %r8
movq %rbx, %rdi
callq 0xe5b9
cmpq $0x0, 0x58(%rsp)
je 0x15aab
movq 0x32517(%rip), %rdi     # 0x47fb0
leaq 0x50(%rsp), %rsi
callq 0x63b0
movq %rax, %rdi
callq 0x61d0
cmpq $0x0, 0x118(%rsp)
je 0x15ad2
movq 0x32523(%rip), %rdi     # 0x47fe0
leaq 0x110(%rsp), %rsi
callq 0x63b0
movq %rax, %rdi
callq 0x61d0
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rax
movaps %xmm0, (%rax)
andq $0x0, 0x10(%rax)
movq 0x90(%rsp), %rcx
xorl %esi, %esi
leaq 0x190(%rsp), %r14
leaq 0x80(%rsp), %r15
movq 0x98(%rsp), %rax
subq %rcx, %rax
cqto
movl $0xe0, %edi
idivq %rdi
cmpq %rax, %rsi
jae 0x15c1d
movq %rsi, 0x178(%rsp)
imulq $0xe0, %rsi, %r12
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x38(%rcx,%r12), %rax
movq 0x40(%rcx,%r12), %rdx
subq %rax, %rdx
cmpq %rdx, %r13
jae 0x15c0d
addq %r12, %rcx
movzbl (%rax,%r13), %ebx
movq 0x1b0(%rsp), %rax
imulq $0xc, %rbx, %rdx
imulq $0xc, %rbp, %rsi
xorl %edi, %edi
cmpq %rdi, %rdx
je 0x15ba2
movq 0x20(%rcx), %r8
addq %rsi, %r8
movslq (%rdi,%r8), %r8
imulq $0xc, %r8, %r8
movsd (%rax,%r8), %xmm0
mulps 0x1abee(%rip), %xmm0    # 0x30770
movss 0x8(%rax,%r8), %xmm1
mulss 0x1a99b(%rip), %xmm1    # 0x3052c
movlps %xmm0, 0x20(%rsp,%rdi)
movss %xmm1, 0x28(%rsp,%rdi)
addq $0xc, %rdi
jmp 0x15b61
leaq 0x70(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x2c(%rsp), %rdx
leaq 0x38(%rsp), %rcx
movq %r14, %r8
callq 0x17101
movaps 0x70(%rsp), %xmm0
movaps %xmm0, 0x80(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
leaq 0xb0(%rsp), %rdi
movq %r15, %rsi
callq 0x7b8a
leaq 0x88(%rsp), %rdi
callq 0x7426
leaq 0x78(%rsp), %rdi
callq 0x7426
addq %rbx, %rbp
incq %r13
movq 0x90(%rsp), %rcx
jmp 0x15b31
movq 0x178(%rsp), %rsi
incq %rsi
jmp 0x15aff
leaq 0x1ac(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x1a8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x180(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x17128
leaq 0x1a4(%rsp), %rdx
movl $0x43340000, (%rdx)     # imm = 0x43340000
leaq 0x70(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x170e0
movq 0x170(%rsp), %r15
movsd 0x1aae5(%rip), %xmm0    # 0x30760
leaq 0x298(%rsp), %rdx
movsd %xmm0, (%rdx)
movl $0x438b0000, 0x8(%rdx)  # imm = 0x438B0000
leaq 0x80(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x16ecf
leaq 0x28(%rsp), %r14
leaq 0x88(%rsp), %rbx
movaps -0x8(%rbx), %xmm0
movaps %xmm0, -0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, -0x8(%rbx)
leaq 0xd0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x7b8a
movq %r14, %rdi
callq 0x7426
movq %rbx, %rdi
callq 0x7426
leaq 0x78(%rsp), %rbx
movq %rbx, %rdi
callq 0x7426
leaq 0x188(%rsp), %rdi
callq 0x7426
leaq 0x80(%rsp), %rdx
andl $0x0, (%rdx)
movl $0x3f800000, -0x8(%rbx) # imm = 0x3F800000
leaq 0x20(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0x70(%rsp), %rcx
callq 0x16d50
leaq 0x28(%rsp), %rdi
movaps -0x8(%rdi), %xmm0
andq $0x0, (%rdi)
movups %xmm0, (%r15)
andq $0x0, -0x8(%rdi)
callq 0x7426
leaq 0xb0(%rsp), %rdi
callq 0x7404
leaq 0x110(%rsp), %rdi
callq 0x61a0
leaq 0x50(%rsp), %rdi
callq 0x61a0
leaq 0xf0(%rsp), %rdi
callq 0x16b04
leaq 0x90(%rsp), %rdi
callq 0x1714c
leaq 0x1b0(%rsp), %rdi
callq 0x1716e
leaq 0x260(%rsp), %rdi
callq 0x7426
leaq 0x270(%rsp), %rdi
callq 0x7426
leaq 0x198(%rsp), %rdi
callq 0x7426
leaq 0x280(%rsp), %rdi
callq 0x7426
leaq 0x290(%rsp), %rdi
callq 0x7426
leaq 0x138(%rsp), %rdi
callq 0x7426
leaq 0x148(%rsp), %rdi
callq 0x7426
leaq 0x248(%rsp), %rdi
callq 0x7426
leaq 0x158(%rsp), %rdi
callq 0x7426
leaq 0x168(%rsp), %rdi
callq 0x7426
leaq 0xd0(%rsp), %rdi
callq 0x7404
movq %r15, %rax
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15f5c
movq %rax, %rbp
movq %r14, %rdi
callq 0x7426
movq %rbx, %rdi
callq 0x7426
jmp 0x15e49
movq %rax, %rbp
leaq 0x78(%rsp), %rdi
callq 0x7426
jmp 0x15e58
movq %rax, %rbp
leaq 0x188(%rsp), %rdi
jmp 0x15f55
jmp 0x15f5c
movq %rax, %rbp
movq %r14, %rdi
callq 0x7426
movq %rbx, %rdi
jmp 0x15ec8
jmp 0x15ecf
jmp 0x15ee1
jmp 0x15e96
jmp 0x15ee1
movq %rax, %rbp
movq %r15, %rdi
callq 0x7426
movq %r14, %rdi
jmp 0x15ec8
jmp 0x15ecf
jmp 0x15ee1
movq %rax, %rbp
movq %r15, %rdi
callq 0x7426
movq %r14, %rdi
jmp 0x15ed7
jmp 0x15ee1
movq %rax, %rbp
movq %r12, %rdi
callq 0x7426
movq %r15, %rdi
jmp 0x15ed7
jmp 0x15ee1
movq %rax, %rbp
movq %r13, %rdi
callq 0x7426
movq %r12, %rdi
callq 0x7426
jmp 0x15ed2
movq %rax, %rbp
leaq 0x58(%rsp), %rdi
callq 0x7426
jmp 0x15faa
movq %rax, %rbp
jmp 0x15faa
movq %rax, %rbp
jmp 0x15fb7
movq %rax, %rbp
jmp 0x15fc4
movq %rax, %rbp
jmp 0x15fd1
movq %rax, %rbp
jmp 0x15fde
movq %rax, %rbp
jmp 0x15feb
movq %rax, %rbp
jmp 0x15ff8
movq %rax, %rbp
jmp 0x16005
movq %rax, %rbp
jmp 0x16012
movq %rax, %rbp
jmp 0x1601f
jmp 0x15f33
movq %rax, %rbp
jmp 0x1602c
movq %rax, %rbp
jmp 0x15f6c
movq %rax, %rbp
leaq 0x88(%rsp), %rdi
callq 0x7426
leaq 0x78(%rsp), %rdi
callq 0x7426
jmp 0x15f5f
movq %rax, %rbp
leaq 0xb0(%rsp), %rdi
callq 0x7404
leaq 0x110(%rsp), %rdi
callq 0x61a0
leaq 0x50(%rsp), %rdi
callq 0x61a0
leaq 0xf0(%rsp), %rdi
callq 0x16b04
leaq 0x90(%rsp), %rdi
callq 0x1714c
leaq 0x1b0(%rsp), %rdi
callq 0x1716e
leaq 0x260(%rsp), %rdi
callq 0x7426
leaq 0x270(%rsp), %rdi
callq 0x7426
leaq 0x198(%rsp), %rdi
callq 0x7426
leaq 0x280(%rsp), %rdi
callq 0x7426
leaq 0x290(%rsp), %rdi
callq 0x7426
leaq 0x138(%rsp), %rdi
callq 0x7426
leaq 0x148(%rsp), %rdi
callq 0x7426
leaq 0x248(%rsp), %rdi
callq 0x7426
leaq 0x158(%rsp), %rdi
callq 0x7426
leaq 0x168(%rsp), %rdi
callq 0x7426
leaq 0xd0(%rsp), %rdi
callq 0x7404
movq %rbp, %rdi
callq 0x6710