// File: /workspace/github_cpp_makefile_star2_O3/donqustix[P]SoftwareRenderer/src/main.cpp
// Function: main
int main()
{
    if (::SDL_Init(SDL_INIT_VIDEO) >= 0)
    {
        SDL_Window* const window = ::SDL_CreateWindow("Software Renderer",
                SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WINDOW_WIDTH, WINDOW_HEIGHT, SDL_WINDOW_SHOWN);
        if (window)
        {
            SDL_Surface* const surface = ::SDL_GetWindowSurface(window);
            if (surface)
            {
                try
                {
                    const Mesh mesh{::load_obj("res/bunny.obj")};

                    const auto perspective_matrix = mat4f::create_perspective(M_PI / 3,
                            static_cast<float>(WINDOW_WIDTH) / WINDOW_HEIGHT, 1e-1F, 1e3F);
                    auto matrix1 = perspective_matrix * mat4f::create_translation(0.0F, -0.12F, -0.25F);
                    auto matrix2 = perspective_matrix * mat4f::create_translation(2.0F, 1.0F, -5.0F) *
                            mat4f::create_scaling(0.4F, 0.4F, 0.4F);
                    const auto rotation_matrix = mat4f::create_rotation_y(0.05F) * mat4f::create_rotation_x(-0.01F);

                    SDL_Event event;

                    bool running = true;
                    while (running)
                    {
                        while (::SDL_PollEvent(&event))
                        {
                            if (event.type == SDL_QUIT)
                                running = false;
                        }

                        ::clear_zbuffer();

                        ::SDL_FillRect(surface, nullptr, 0);
                        ::SDL_LockSurface(surface);
                        ::render_mesh(surface, mesh, matrix1);
                        ::render_triangle(surface, {{ 0.0F, -1.0F, 0.0F}, {1.0F, 0.0F, 0.0F}},
                                                   {{-1.0F,  1.0F, 0.0F}, {0.0F, 1.0F, 0.0F}},
                                                   {{ 1.0F,  1.0F, 0.0F}, {0.0F, 0.0F, 1.0F}}, matrix2);
                        ::SDL_UnlockSurface(surface);

                        matrix1 *= rotation_matrix;
                        matrix2 *= rotation_matrix;

                        ::SDL_UpdateWindowSurface(window);
                        ::SDL_Delay(20);
                    }
                }
                catch (const std::exception& ex)
                {
                    std::cerr << ex.what() << std::endl;
                }
            }
            else
                std::cerr << "SDL_Surface getting error: " << ::SDL_GetError() << std::endl;

            ::SDL_DestroyWindow(window);
        }
        else
            std::cerr << "SDL_Window creation error: " << ::SDL_GetError() << std::endl;

        ::SDL_Quit();
    }
    else
        std::cerr << "SDL2 initialization error: " << ::SDL_GetError() << std::endl;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x548, %rsp            # imm = 0x548
movl $0x20, %edi
callq 0x2210
testl %eax, %eax
js 0x2822
leaq 0x2c23(%rip), %rdi      # 0x511c
movl $0x1fff0000, %esi       # imm = 0x1FFF0000
movl $0x1fff0000, %edx       # imm = 0x1FFF0000
movl $0x280, %ecx            # imm = 0x280
movl $0x1e0, %r8d            # imm = 0x1E0
movl $0x4, %r9d
callq 0x2050
testq %rax, %rax
je 0x29de
movq %rax, -0xe0(%rbp)
movq %rax, %rdi
callq 0x2290
testq %rax, %rax
je 0x2a29
movq %rax, %rbx
leaq -0x1b0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2bdf(%rip), %rsi      # 0x512e
leaq 0x2be5(%rip), %rdx      # 0x513b
leaq -0x1c0(%rbp), %rdi
callq 0x4640
leaq -0x568(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
movl $0x8, %edx
callq 0x22e0
movq %rbx, -0x1c8(%rbp)
movq -0x568(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x548(%rbp,%rax)
jne 0x315b
xorps %xmm0, %xmm0
leaq -0x180(%rbp), %rdx
movaps %xmm0, (%rdx)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdx)
leaq -0x140(%rbp), %rdx
movq %rcx, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq -0xb0(%rbp), %rdx
movq %rcx, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq -0xd0(%rbp), %rdx
movq %rcx, 0x10(%rdx)
movaps %xmm0, (%rdx)
leaq -0x80(%rbp), %rdx
movq %rdx, -0x10(%rdx)
movq %rcx, -0x8(%rdx)
movb $0x0, (%rdx)
leaq -0x360(%rbp), %r13
leaq -0x120(%rbp), %r12
leaq -0x1d8(%rbp), %r15
leaq -0x1d0(%rbp), %rbx
leaq (%rax,%rbp), %rdi
addq $-0x568, %rdi           # imm = 0xFA98
movl $0xa, %esi
callq 0x2220
movsbl %al, %edx
leaq -0x568(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x2350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x286d
movq %r13, %rdi
leaq -0x90(%rbp), %rsi
movl $0x18, %edx
callq 0x22d0
leaq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
movq $0x0, -0x118(%rbp)
movb $0x0, -0x110(%rbp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x2280
movq %r12, %rdi
leaq 0x2b1a(%rip), %rsi      # 0x51a2
callq 0x20b0
testl %eax, %eax
je 0x2763
movq %r12, %rdi
leaq 0x2b05(%rip), %rsi      # 0x51a4
callq 0x20b0
testl %eax, %eax
je 0x279d
movq %r12, %rdi
leaq 0x2af1(%rip), %rsi      # 0x51a7
callq 0x20b0
testl %eax, %eax
jne 0x27d5
movl $0x3, %r14d
movq %r13, %rdi
movq %r15, %rsi
callq 0x2150
movl $0x2, %esi
movq %r13, %rdi
callq 0x2060
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2150
movq -0xa8(%rbp), %rsi
cmpq -0xa0(%rbp), %rsi
je 0x2713
movq -0x1d8(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, -0xa8(%rbp)
jmp 0x2722
leaq -0xb0(%rbp), %rdi
movq %r15, %rdx
callq 0x46de
movq -0xc8(%rbp), %rsi
cmpq -0xc0(%rbp), %rsi
je 0x2749
movq -0x1d0(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, -0xc8(%rbp)
jmp 0x2758
leaq -0xd0(%rbp), %rdi
movq %rbx, %rdx
callq 0x46de
decl %r14d
jne 0x26c9
jmp 0x27d5
movq %r13, %rdi
movq %r15, %rsi
callq 0x2360
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2360
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x2360
leaq -0x180(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
leaq -0x34(%rbp), %rcx
callq 0x444e
jmp 0x27d5
movq %r13, %rdi
movq %r15, %rsi
callq 0x2360
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2360
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x2360
leaq -0x140(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
leaq -0x34(%rbp), %rcx
callq 0x444e
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x27f7
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x2250
movq %r13, %rdi
movq 0x47af(%rip), %rsi      # 0x6fb0
callq 0x21c0
leaq -0x2e0(%rbp), %rdi
callq 0x20c0
movq -0x568(%rbp), %rax
movq -0x18(%rax), %rax
jmp 0x2602
movq 0x47bf(%rip), %rbx      # 0x6fe8
leaq 0x2944(%rip), %rsi      # 0x5174
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2270
callq 0x21d0
testq %rax, %rax
je 0x2a74
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq 0x478b(%rip), %rdi      # 0x6fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x2270
jmp 0x2a8b
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %r8
cmpq %r8, %rdi
je 0x2ab7
leaq -0x350(%rbp), %r9
xorl %r14d, %r14d
xorl %r15d, %r15d
xorl %ebx, %ebx
movq %r8, -0x48(%rbp)
movq (%rdi), %rax
leaq -0x1(%rax), %rcx
movq -0x180(%rbp), %rdx
shlq $0x4, %rcx
movups (%rdx,%rcx), %xmm0
movaps %xmm0, -0x360(%rbp)
movq -0xd0(%rbp), %rcx
movq -0x8(%rcx,%rax,8), %rax
movq -0x140(%rbp), %rcx
shlq $0x4, %rax
movups (%rcx,%rax), %xmm0
movups %xmm0, (%r9)
cmpq %r15, %rbx
je 0x28f5
movaps -0x360(%rbp), %xmm0
movaps -0x350(%rbp), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq %r14, %rax
jmp 0x29c8
movq %rdi, -0x40(%rbp)
movq %r15, %r13
subq %r14, %r13
movabsq $0x7fffffffffffffe0, %rax # imm = 0x7FFFFFFFFFFFFFE0
cmpq %rax, %r13
je 0x314f
movq %r13, %rax
sarq $0x5, %rax
cmpq %r14, %r15
movq %rax, %rcx
movl $0x1, %edx
cmoveq %rdx, %rcx
movq %r14, -0x30(%rbp)
leaq (%rcx,%rax), %r14
movabsq $0x3ffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFF
cmpq %rdx, %r14
cmovaeq %rdx, %r14
addq %rax, %rcx
cmovbq %rdx, %r14
movq %r14, %rdi
callq 0x45a0
movaps -0x360(%rbp), %xmm0
movaps -0x350(%rbp), %xmm1
movups %xmm1, 0x10(%rax,%r13)
movups %xmm0, (%rax,%r13)
movq %rax, %rbx
movq -0x30(%rbp), %rcx
movq %rcx, %rdi
cmpq %rcx, %r15
je 0x2999
movq %rax, %rbx
movq %rdi, %rcx
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x20, %rcx
addq $0x20, %rbx
cmpq %r15, %rcx
jne 0x297e
testq %rdi, %rdi
je 0x29ac
movq %r13, %rsi
movq %rax, %r15
callq 0x2250
movq %r15, %rax
shlq $0x5, %r14
movq %rax, %r15
addq %r14, %r15
movq %rax, %r14
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %r8
leaq -0x350(%rbp), %r9
addq $0x20, %rbx
addq $0x8, %rdi
cmpq %r8, %rdi
jne 0x2897
jmp 0x2abe
movq 0x4603(%rip), %rbx      # 0x6fe8
leaq 0x276c(%rip), %rsi      # 0x5158
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2270
callq 0x21d0
testq %rax, %rax
je 0x30ac
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq 0x45cf(%rip), %rdi      # 0x6fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x2270
jmp 0x30c3
movq 0x45b8(%rip), %rbx      # 0x6fe8
leaq 0x2705(%rip), %rsi      # 0x513c
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2270
callq 0x21d0
testq %rax, %rax
je 0x30ec
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq 0x4584(%rip), %rdi      # 0x6fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x2270
jmp 0x3103
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2310
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
jmp 0x313b
xorl %ebx, %ebx
xorl %r15d, %r15d
xorl %eax, %eax
movq %rbx, %rdi
subq %rax, %rdi
movq %rdi, -0xd8(%rbp)
sarq $0x5, %rdi
movq %rax, %r14
callq 0x45a0
movq %rax, %r13
cmpq %rbx, %r14
movq %r14, %rdi
je 0x2b06
movq %rax, %r13
movq %rdi, %rcx
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
addq $0x20, %rcx
addq $0x20, %r13
cmpq %rbx, %rcx
jne 0x2ae8
movq %rax, %r14
testq %rdi, %rdi
je 0x2b19
subq %rdi, %r15
movq %r15, %rsi
callq 0x2250
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x2b35
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2250
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x2b50
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x2b6b
movq -0xa0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0x140(%rbp), %rdi
testq %rdi, %rdi
je 0x2b86
movq -0x130(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0x180(%rbp), %rdi
testq %rdi, %rdi
je 0x2ba1
movq -0x170(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq -0x568(%rbp), %rbx
movq %rbx, %rdi
callq 0x2090
movq -0x1c0(%rbp), %rdi
leaq -0x1b0(%rbp), %rax
cmpq %rax, %rdi
je 0x2bd2
movq -0x1b0(%rbp), %rsi
incq %rsi
callq 0x2250
movl $0x3fa646e2, -0x568(%rbp) # imm = 0x3FA646E2
xorps %xmm0, %xmm0
movups %xmm0, -0x564(%rbp)
movl $0x3fddb3d8, -0x554(%rbp) # imm = 0x3FDDB3D8
movups %xmm0, -0x550(%rbp)
movsd 0x2411(%rip), %xmm1     # 0x5010
movups %xmm1, -0x540(%rbp)
movl $0xbf800000, %eax       # imm = 0xBF800000
movq %rax, -0x530(%rbp)
movl $0x3f800000, %eax       # imm = 0x3F800000
movl %eax, -0x90(%rbp)
movups %xmm0, -0x8c(%rbp)
movaps 0x23f5(%rip), %xmm1     # 0x5020
movups %xmm1, -0x7c(%rbp)
movaps 0x23fa(%rip), %xmm1     # 0x5030
movups %xmm1, -0x6c(%rbp)
movq $0x0, -0x5c(%rbp)
movl %eax, -0x54(%rbp)
movaps %xmm0, -0x360(%rbp)
movaps %xmm0, -0x350(%rbp)
movaps %xmm0, -0x340(%rbp)
movaps %xmm0, -0x330(%rbp)
xorl %eax, %eax
leaq -0x180(%rbp), %r9
leaq -0x1c0(%rbp), %r10
movq %rax, %rcx
shlq $0x4, %rcx
addq %rbp, %rcx
addq $-0x360, %rcx           # imm = 0xFCA0
leaq -0x90(%rbp), %rdx
xorl %esi, %esi
movss (%rcx,%rsi,4), %xmm0
xorl %edi, %edi
movss (%rbx,%rdi), %xmm1
mulss (%rdx,%rdi,4), %xmm1
addss %xmm1, %xmm0
addq $0x4, %rdi
cmpq $0x10, %rdi
jne 0x2c92
movss %xmm0, (%rcx,%rsi,4)
incq %rsi
addq $0x4, %rdx
cmpq $0x4, %rsi
jne 0x2c8b
incq %rax
addq $0x10, %rbx
cmpq $0x4, %rax
jne 0x2c71
movaps 0x2370(%rip), %xmm0     # 0x5040
movups %xmm0, -0x1c0(%rbp)
movaps 0x2372(%rip), %xmm0     # 0x5050
movups %xmm0, -0x1b0(%rbp)
movaps 0x2374(%rip), %xmm0     # 0x5060
movups %xmm0, -0x1a0(%rbp)
movaps 0x2376(%rip), %xmm0     # 0x5070
movups %xmm0, -0x190(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0x120(%rbp)
movaps %xmm0, -0x110(%rbp)
movaps %xmm0, -0x100(%rbp)
movaps %xmm0, -0xf0(%rbp)
leaq -0x568(%rbp), %rax
xorl %ecx, %ecx
movq -0x1c8(%rbp), %rbx
movq %rcx, %rdx
shlq $0x4, %rdx
addq %rbp, %rdx
addq $-0x120, %rdx           # imm = 0xFEE0
movq %r10, %rsi
xorl %edi, %edi
movss (%rdx,%rdi,4), %xmm0
xorl %r8d, %r8d
movss (%rax,%r8), %xmm1
mulss (%rsi,%r8,4), %xmm1
addss %xmm1, %xmm0
addq $0x4, %r8
cmpq $0x10, %r8
jne 0x2d4e
movss %xmm0, (%rdx,%rdi,4)
incq %rdi
addq $0x4, %rsi
cmpq $0x4, %rdi
jne 0x2d46
incq %rcx
addq $0x10, %rax
cmpq $0x4, %rcx
jne 0x2d30
movl $0x3ecccccd, %eax       # imm = 0x3ECCCCCD
movl %eax, -0x180(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, -0x17c(%rbp)
movl %eax, -0x16c(%rbp)
movups %xmm0, -0x168(%rbp)
movl %eax, -0x158(%rbp)
movups %xmm0, -0x154(%rbp)
movl $0x3f800000, -0x144(%rbp) # imm = 0x3F800000
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x70(%rbp)
movaps %xmm0, -0x60(%rbp)
xorl %eax, %eax
movq %rax, %rcx
shlq $0x4, %rcx
addq %rbp, %rcx
addq $-0x90, %rcx
movq %r9, %rdx
xorl %esi, %esi
movss (%rcx,%rsi,4), %xmm0
xorl %edi, %edi
movss (%r12,%rdi), %xmm1
mulss (%rdx,%rdi,4), %xmm1
addss %xmm1, %xmm0
addq $0x4, %rdi
cmpq $0x10, %rdi
jne 0x2df2
movss %xmm0, (%rcx,%rsi,4)
incq %rsi
addq $0x4, %rdx
cmpq $0x4, %rsi
jne 0x2deb
incq %rax
addq $0x10, %r12
cmpq $0x4, %rax
jne 0x2dd5
movaps 0x224f(%rip), %xmm0     # 0x5080
leaq -0x1c0(%rbp), %rax
movups %xmm0, (%rax)
movsd 0x224d(%rip), %xmm0     # 0x5090
movups %xmm0, 0x10(%rax)
movl $0xbd4cb6f5, %ecx       # imm = 0xBD4CB6F5
movq %rcx, 0x20(%rax)
movl $0x3f7fae19, 0x28(%rax) # imm = 0x3F7FAE19
xorps %xmm0, %xmm0
movups %xmm0, 0x2c(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, 0x3c(%rax)
leaq -0x180(%rbp), %rcx
movl %edx, (%rcx)
movups %xmm0, 0x4(%rcx)
movsd 0x2225(%rip), %xmm1     # 0x50a0
movups %xmm1, 0x14(%rcx)
movabsq $0x3f7ffcb9bc23d657, %rsi # imm = 0x3F7FFCB9BC23D657
movq %rsi, 0x24(%rcx)
movups %xmm0, 0x2c(%rcx)
movl %edx, 0x3c(%rcx)
movaps %xmm0, -0xf0(%rbp)
movaps %xmm0, -0x100(%rbp)
movaps %xmm0, -0x110(%rbp)
movaps %xmm0, -0x120(%rbp)
xorl %edx, %edx
movq %rdx, %rsi
shlq $0x4, %rsi
addq %rbp, %rsi
addq $-0x120, %rsi           # imm = 0xFEE0
movq %rcx, %rdi
xorl %r8d, %r8d
movss (%rsi,%r8,4), %xmm0
xorl %r9d, %r9d
movss (%rax,%r9), %xmm1
mulss (%rdi,%r9,4), %xmm1
addss %xmm1, %xmm0
addq $0x4, %r9
cmpq $0x10, %r9
jne 0x2ed2
movss %xmm0, (%rsi,%r8,4)
incq %r8
addq $0x4, %rdi
cmpq $0x4, %r8
jne 0x2ec9
incq %rdx
addq $0x10, %rax
cmpq $0x4, %rdx
jne 0x2eb2
movq %r13, %r15
movq %r14, -0x30(%rbp)
subq %r14, %r15
sarq $0x5, %r15
movb $0x1, -0x40(%rbp)
leaq -0x1c0(%rbp), %r12
leaq 0x42d4(%rip), %r14      # 0x7200
movq %r13, -0x48(%rbp)
movq %r12, %rdi
callq 0x2170
testl %eax, %eax
je 0x2f4e
cmpl $0x100, -0x1c0(%rbp)    # imm = 0x100
setne %al
andb %al, -0x40(%rbp)
jmp 0x2f30
xorl %eax, %eax
movl $0x7f7fffff, (%rax,%r14) # imm = 0x7F7FFFFF
addq $0x4, %rax
cmpq $0x12c000, %rax         # imm = 0x12C000
jne 0x2f50
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2070
movq %rbx, %rdi
callq 0x22a0
cmpq -0x30(%rbp), %r13
movq %rbx, %r13
leaq -0x360(%rbp), %r14
je 0x2fb3
movq -0x30(%rbp), %r12
xorl %ebx, %ebx
leaq 0x20(%r12), %rdx
leaq 0x40(%r12), %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %r8
callq 0x336a
addq $0x3, %rbx
addq $0x60, %r12
cmpq %r15, %rbx
jb 0x2f8e
movaps 0x20f6(%rip), %xmm0     # 0x50b0
movups %xmm0, -0x180(%rbp)
movaps 0x20f8(%rip), %xmm0     # 0x50c0
movups %xmm0, -0x170(%rbp)
movaps 0x20fa(%rip), %xmm0     # 0x50d0
movups %xmm0, -0x140(%rbp)
movaps 0x206c(%rip), %xmm0     # 0x5050
movups %xmm0, -0x130(%rbp)
movaps 0x20ee(%rip), %xmm0     # 0x50e0
movups %xmm0, -0xb0(%rbp)
movaps 0x20f0(%rip), %xmm0     # 0x50f0
movups %xmm0, -0xa0(%rbp)
movq %r13, %rdi
leaq -0x180(%rbp), %rsi
leaq -0x140(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
leaq -0x90(%rbp), %r8
callq 0x336a
movq %r13, %rdi
callq 0x22b0
movq %r13, %rbx
movq -0x48(%rbp), %r13
leaq -0x360(%rbp), %rdi
leaq -0x120(%rbp), %r14
movq %r14, %rsi
callq 0x43b6
leaq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x43b6
movq -0xe0(%rbp), %rdi
callq 0x2260
movl $0x14, %edi
callq 0x21b0
testb $0x1, -0x40(%rbp)
movb $0x1, -0x40(%rbp)
leaq -0x1c0(%rbp), %r12
leaq 0x4175(%rip), %r14      # 0x7200
jne 0x2f30
movq -0x30(%rbp), %rdi
testq %rdi, %rdi
je 0x312a
movq -0xd8(%rbp), %rsi
callq 0x2250
jmp 0x312a
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2310
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
jmp 0x3136
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x2310
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2180
movq -0xe0(%rbp), %rdi
callq 0x2030
callq 0x2080
xorl %eax, %eax
addq $0x548, %rsp            # imm = 0x548
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x207d(%rip), %rdi      # 0x51d3
callq 0x2140
movl $0x10, %edi
callq 0x2130
movq %rax, %rbx
leaq 0x2021(%rip), %rsi      # 0x5190
movq %rax, %rdi
callq 0x20e0
movq 0x3e72(%rip), %rsi      # 0x6ff0
movq 0x3e43(%rip), %rdx      # 0x6fc8
movq %rbx, %rdi
callq 0x2320
movq %rdx, %r12
movq %rax, %r13
jmp 0x32ec
movq %rdx, %r12
movq %rax, %r13
movq %rbx, %rdi
callq 0x21a0
jmp 0x32ec
jmp 0x31c9
movq %rdx, %r12
movq %rax, %r13
jmp 0x32f8
movq %rdx, %r12
movq %rax, %r13
jmp 0x331a
movq -0x30(%rbp), %r14
jmp 0x31c9
movq %rdx, %r12
movq %rax, %r13
testq %r14, %r14
je 0x31f2
subq %r14, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x2250
jmp 0x31f2
jmp 0x321d
jmp 0x321d
jmp 0x31ec
jmp 0x321d
movq %rdx, %r12
movq %rax, %r13
leaq -0x80(%rbp), %rbx
jmp 0x3268
jmp 0x31fa
movq %rdx, %r12
movq %rax, %r13
cmpq $0x0, -0x30(%rbp)
je 0x331a
movq -0x30(%rbp), %rdi
movq -0xd8(%rbp), %rsi
jmp 0x3315
jmp 0x321d
movq %rdx, %r12
movq %rax, %r13
leaq -0x80(%rbp), %rbx
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x3249
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x2250
movq 0x3d60(%rip), %rsi      # 0x6fb0
leaq -0x360(%rbp), %rdi
callq 0x21c0
leaq -0x2e0(%rbp), %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3280
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2250
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x329b
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0xb0(%rbp), %rdi
testq %rdi, %rdi
je 0x32b6
movq -0xa0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0x140(%rbp), %rdi
testq %rdi, %rdi
je 0x32d1
movq -0x130(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0x180(%rbp), %rdi
testq %rdi, %rdi
je 0x32ec
movq -0x170(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq -0x568(%rbp), %rdi
callq 0x2090
movq -0x1c0(%rbp), %rdi
leaq -0x1b0(%rbp), %rax
cmpq %rax, %rdi
je 0x331a
movq -0x1b0(%rbp), %rsi
incq %rsi
callq 0x2250
cmpl $0x1, %r12d
jne 0x335a
movq %r13, %rdi
callq 0x20f0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x3cb0(%rip), %rdi      # 0x6fe8
movq %rax, %rsi
callq 0x2230
movq %rax, %rdi
callq 0x2120
callq 0x2300
jmp 0x312a
movq %rax, %r13
callq 0x2300
movq %r13, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x4632