// File: /workspace/github_cpp_makefile_star2_O1/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 $0x558, %rsp            # imm = 0x558
movl $0x20, %edi
callq 0x2210
testl %eax, %eax
js 0x2820
leaq 0x2c03(%rip), %rdi      # 0x50fc
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 0x29f9
movq %rax, %r15
movq %rax, %rdi
callq 0x2290
testq %rax, %rax
je 0x2a44
movq %rax, %rbx
leaq -0x1c0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2bc3(%rip), %rsi      # 0x510e
leaq 0x2bc9(%rip), %rdx      # 0x511b
leaq -0x1d0(%rbp), %rdi
callq 0x4722
leaq -0x580(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
movl $0x8, %edx
callq 0x22e0
movq %rbx, -0x1d8(%rbp)
movq %r15, -0x30(%rbp)
movq -0x580(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x560(%rbp,%rax)
jne 0x3206
xorps %xmm0, %xmm0
leaq -0x130(%rbp), %rcx
movaps %xmm0, (%rcx)
xorl %eax, %eax
movq %rax, 0x10(%rcx)
leaq -0x190(%rbp), %rcx
movq %rax, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq -0xd0(%rbp), %rcx
movq %rax, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq -0xf0(%rbp), %rcx
movq %rax, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq -0x90(%rbp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb $0x0, (%rcx)
leaq -0x370(%rbp), %rbx
leaq -0x170(%rbp), %r12
leaq -0x1e8(%rbp), %r13
leaq -0x1e0(%rbp), %r15
movq -0x580(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x580(%rbp), %r14
addq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %edx
movq %r14, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2350
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x286b
movq %rbx, %rdi
leaq -0xa0(%rbp), %rsi
movl $0x18, %edx
callq 0x22d0
leaq -0x160(%rbp), %rax
movq %rax, -0x170(%rbp)
movq $0x0, -0x168(%rbp)
movb $0x0, -0x160(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2280
movq %r12, %rdi
leaq 0x2af1(%rip), %rsi      # 0x5182
callq 0x20b0
testl %eax, %eax
je 0x276c
movq %r12, %rdi
leaq 0x2adc(%rip), %rsi      # 0x5184
callq 0x20b0
testl %eax, %eax
je 0x27a6
movq %r12, %rdi
leaq 0x2ac8(%rip), %rsi      # 0x5187
callq 0x20b0
testl %eax, %eax
jne 0x27de
movl $0x3, %r14d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2150
movl $0x2, %esi
movq %rbx, %rdi
callq 0x2060
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2150
movq -0xc8(%rbp), %rsi
cmpq -0xc0(%rbp), %rsi
je 0x271c
movq -0x1e8(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, -0xc8(%rbp)
jmp 0x272b
leaq -0xd0(%rbp), %rdi
movq %r13, %rdx
callq 0x47bc
movq -0xe8(%rbp), %rsi
cmpq -0xe0(%rbp), %rsi
je 0x2752
movq -0x1e0(%rbp), %rax
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, -0xe8(%rbp)
jmp 0x2761
leaq -0xf0(%rbp), %rdi
movq %r15, %rdx
callq 0x47bc
decl %r14d
jne 0x26d2
jmp 0x27de
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2360
movq %rax, %rdi
movq %r15, %rsi
callq 0x2360
movq %rax, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x2360
leaq -0x130(%rbp), %rdi
movq %r13, %rsi
movq %r15, %rdx
leaq -0x3c(%rbp), %rcx
callq 0x451e
jmp 0x27de
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2360
movq %rax, %rdi
movq %r15, %rsi
callq 0x2360
movq %rax, %rdi
leaq -0x3c(%rbp), %rsi
callq 0x2360
leaq -0x190(%rbp), %rdi
movq %r13, %rsi
movq %r15, %rdx
leaq -0x3c(%rbp), %rcx
callq 0x451e
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x2800
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x2250
movq %rbx, %rdi
movq 0x47a6(%rip), %rsi      # 0x6fb0
callq 0x21c0
leaq -0x2f0(%rbp), %rdi
callq 0x20c0
jmp 0x2605
movq 0x47c1(%rip), %rbx      # 0x6fe8
leaq 0x2926(%rip), %rsi      # 0x5154
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2270
callq 0x21d0
testq %rax, %rax
je 0x2a8f
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq 0x478d(%rip), %rdi      # 0x6fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x2270
jmp 0x2aa6
movq -0xd0(%rbp), %r14
movq -0xc8(%rbp), %rdi
cmpq %rdi, %r14
je 0x2ad2
movq -0x130(%rbp), %r8
leaq -0x360(%rbp), %r9
movq -0x190(%rbp), %r10
xorl %r15d, %r15d
xorl %edx, %edx
xorl %esi, %esi
movq %rdi, -0x38(%rbp)
movq %r8, -0xa8(%rbp)
movq %r10, -0x50(%rbp)
movq (%r14), %rax
leaq -0x1(%rax), %rcx
shlq $0x4, %rcx
movups (%r8,%rcx), %xmm0
movaps %xmm0, -0x370(%rbp)
movq -0xf0(%rbp), %rcx
movq -0x8(%rcx,%rax,8), %rax
shlq $0x4, %rax
movups (%r10,%rax), %xmm0
movups %xmm0, (%r9)
cmpq %rdx, %r15
je 0x2904
movaps -0x370(%rbp), %xmm0
movaps -0x360(%rbp), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
movq %r15, %rbx
movq %rsi, %rax
jmp 0x29e0
movq %rdx, -0x48(%rbp)
movq %r15, %rbx
subq %rsi, %rbx
movabsq $0x7fffffffffffffe0, %rax # imm = 0x7FFFFFFFFFFFFFE0
cmpq %rax, %rbx
je 0x31f7
movq %rbx, %rax
sarq $0x5, %rax
cmpq %rsi, %r15
movq %rax, %rcx
movl $0x1, %edx
cmoveq %rdx, %rcx
movq %rsi, -0x58(%rbp)
leaq (%rcx,%rax), %r13
movabsq $0x3ffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFF
cmpq %rdx, %r13
cmovaeq %rdx, %r13
addq %rax, %rcx
cmovbq %rdx, %r13
movq %r13, %rdi
callq 0x4682
movaps -0x370(%rbp), %xmm0
movaps -0x360(%rbp), %xmm1
movups %xmm1, 0x10(%rax,%rbx)
movups %xmm0, (%rax,%rbx)
movq %rax, %rbx
movq -0x58(%rbp), %rcx
movq %rcx, %rdi
cmpq %rcx, %r15
je 0x29a6
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 0x298b
testq %rdi, %rdi
je 0x29bd
movq -0x48(%rbp), %rsi
subq %rdi, %rsi
movq %rax, %r15
callq 0x2250
movq %r15, %rax
shlq $0x5, %r13
movq %rax, %rdx
addq %r13, %rdx
movq %rax, %rsi
movq -0x38(%rbp), %rdi
movq -0xa8(%rbp), %r8
leaq -0x360(%rbp), %r9
movq -0x50(%rbp), %r10
addq $0x20, %rbx
addq $0x8, %r14
movq %rbx, %r15
cmpq %rdi, %r14
jne 0x28ad
jmp 0x2ad8
movq 0x45e8(%rip), %rbx      # 0x6fe8
leaq 0x2731(%rip), %rsi      # 0x5138
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2270
callq 0x21d0
testq %rax, %rax
je 0x3158
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq 0x45b4(%rip), %rdi      # 0x6fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x2270
jmp 0x316f
movq 0x459d(%rip), %rbx      # 0x6fe8
leaq 0x26ca(%rip), %rsi      # 0x511c
movl $0x1b, %edx
movq %rbx, %rdi
callq 0x2270
callq 0x21d0
testq %rax, %rax
je 0x3198
movq %rax, %r14
movq %rax, %rdi
callq 0x2100
movq 0x4569(%rip), %rdi      # 0x6fe8
movq %r14, %rsi
movq %rax, %rdx
callq 0x2270
jmp 0x31af
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 0x31e3
xorl %ebx, %ebx
xorl %edx, %edx
xorl %eax, %eax
movq %rdx, -0x48(%rbp)
movq %rbx, %rdi
subq %rax, %rdi
movq %rdi, -0x50(%rbp)
sarq $0x5, %rdi
movq %rax, %r14
callq 0x4682
movq %rax, -0x38(%rbp)
movq %rax, %r13
cmpq %rbx, %r14
movq -0x30(%rbp), %r15
je 0x2b27
movq -0x38(%rbp), %r13
movq %r14, %rax
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%r13)
movups %xmm0, (%r13)
addq $0x20, %rax
addq $0x20, %r13
cmpq %rbx, %rax
jne 0x2b09
testq %r14, %r14
je 0x2b3b
movq -0x48(%rbp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x2250
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x2b5d
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2250
movq -0xf0(%rbp), %rdi
testq %rdi, %rdi
je 0x2b78
movq -0xe0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x2b93
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0x190(%rbp), %rdi
testq %rdi, %rdi
je 0x2bae
movq -0x180(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0x130(%rbp), %rdi
testq %rdi, %rdi
je 0x2bc9
movq -0x120(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq -0x580(%rbp), %rbx
movq %rbx, %rdi
callq 0x2090
movq -0x1d0(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
cmpq %rax, %rdi
je 0x2bfa
movq -0x1c0(%rbp), %rsi
incq %rsi
callq 0x2250
xorps %xmm1, %xmm1
movaps %xmm1, -0x580(%rbp)
movaps %xmm1, -0x570(%rbp)
movaps %xmm1, -0x560(%rbp)
movl $0x3fa646e2, -0x580(%rbp) # imm = 0x3FA646E2
movups %xmm1, -0x57c(%rbp)
movl $0x3fddb3d8, -0x56c(%rbp) # imm = 0x3FDDB3D8
movups %xmm1, -0x568(%rbp)
movabsq $-0x41b32df4407ff973, %rax # imm = 0xBE4CD20BBF80068D
movq %rax, -0x558(%rbp)
movaps 0x23c4(%rip), %xmm0     # 0x5010
movaps %xmm0, -0x550(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movl $0x3f800000, -0xa0(%rbp) # imm = 0x3F800000
movups %xmm1, -0x9c(%rbp)
movq $0x3f800000, -0x8c(%rbp) # imm = 0x3F800000
movl $0xbdf5c28f, -0x84(%rbp) # imm = 0xBDF5C28F
movaps 0x2392(%rip), %xmm0     # 0x5020
movaps %xmm0, -0x80(%rbp)
movaps 0x2397(%rip), %xmm0     # 0x5030
movaps %xmm0, -0x70(%rbp)
movaps %xmm1, -0x370(%rbp)
movaps %xmm1, -0x360(%rbp)
movaps %xmm1, -0x350(%rbp)
movaps %xmm1, -0x340(%rbp)
xorl %eax, %eax
leaq -0x130(%rbp), %r9
leaq -0x1d0(%rbp), %r10
movq %rax, %rcx
shlq $0x4, %rcx
addq %rbp, %rcx
addq $-0x370, %rcx           # imm = 0xFC90
leaq -0xa0(%rbp), %rdx
xorl %esi, %esi
movss (%rcx,%rsi,4), %xmm1
xorl %edi, %edi
movss (%rbx,%rdi), %xmm2
mulss (%rdx,%rdi,4), %xmm2
addss %xmm2, %xmm1
addq $0x4, %rdi
cmpq $0x10, %rdi
jne 0x2cea
movss %xmm1, (%rcx,%rsi,4)
incq %rsi
addq $0x4, %rdx
cmpq $0x4, %rsi
jne 0x2ce3
incq %rax
addq $0x10, %rbx
cmpq $0x4, %rax
jne 0x2cc9
xorps %xmm1, %xmm1
movaps 0x2315(%rip), %xmm2     # 0x5040
movaps %xmm2, -0x1d0(%rbp)
movaps 0x2317(%rip), %xmm2     # 0x5050
movaps %xmm2, -0x1c0(%rbp)
movaps 0x2319(%rip), %xmm2     # 0x5060
movaps %xmm2, -0x1b0(%rbp)
movaps %xmm0, -0x1a0(%rbp)
movaps %xmm1, -0x170(%rbp)
movaps %xmm1, -0x160(%rbp)
movaps %xmm1, -0x150(%rbp)
movaps %xmm1, -0x140(%rbp)
leaq -0x580(%rbp), %rax
xorl %ecx, %ecx
movq %rcx, %rdx
shlq $0x4, %rdx
addq %rbp, %rdx
addq $-0x170, %rdx           # imm = 0xFE90
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 0x2d98
movss %xmm0, (%rdx,%rdi,4)
incq %rdi
addq $0x4, %rsi
cmpq $0x4, %rdi
jne 0x2d90
incq %rcx
addq $0x10, %rax
cmpq $0x4, %rcx
jne 0x2d7a
xorps %xmm0, %xmm0
movaps %xmm0, -0x130(%rbp)
movaps %xmm0, -0x120(%rbp)
movaps %xmm0, -0x110(%rbp)
movaps %xmm0, -0x100(%rbp)
movl $0x3ecccccd, %eax       # imm = 0x3ECCCCCD
movl %eax, -0x130(%rbp)
movups %xmm0, -0x12c(%rbp)
movl %eax, -0x11c(%rbp)
movups %xmm0, -0x118(%rbp)
movl %eax, -0x108(%rbp)
movups %xmm0, -0x104(%rbp)
movl $0x3f800000, -0xf4(%rbp) # imm = 0x3F800000
movaps %xmm0, -0xa0(%rbp)
movaps %xmm0, -0x90(%rbp)
movaps %xmm0, -0x80(%rbp)
movaps %xmm0, -0x70(%rbp)
xorl %eax, %eax
movq %rax, %rcx
shlq $0x4, %rcx
addq %rbp, %rcx
addq $-0xa0, %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 0x2e5b
movss %xmm0, (%rcx,%rsi,4)
incq %rsi
addq $0x4, %rdx
cmpq $0x4, %rsi
jne 0x2e54
incq %rax
addq $0x10, %r12
cmpq $0x4, %rax
jne 0x2e3e
xorps %xmm0, %xmm0
leaq -0x1d0(%rbp), %rax
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x30(%rax)
movaps 0x21c4(%rip), %xmm1     # 0x5070
movaps %xmm1, (%rax)
movsd 0x21c9(%rip), %xmm1     # 0x5080
movaps %xmm1, 0x10(%rax)
movl $0xbd4cb6f5, %ecx       # imm = 0xBD4CB6F5
movq %rcx, 0x20(%rax)
movl $0x3f7fae19, 0x28(%rax) # imm = 0x3F7FAE19
movups %xmm0, 0x2c(%rax)
movl $0x3f800000, %edx       # imm = 0x3F800000
movl %edx, 0x3c(%rax)
leaq -0x130(%rbp), %rcx
movaps %xmm0, (%rcx)
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, 0x20(%rcx)
movaps %xmm0, 0x30(%rcx)
movl %edx, (%rcx)
movups %xmm0, 0x4(%rcx)
movabsq $0x3c23d6573f7ffcb9, %rsi # imm = 0x3C23D6573F7FFCB9
movq %rsi, 0x14(%rcx)
movl $0x0, 0x1c(%rcx)
movabsq $-0x43dc29a900000000, %rsi # imm = 0xBC23D65700000000
movq %rsi, 0x20(%rcx)
movl $0x3f7ffcb9, 0x28(%rcx) # imm = 0x3F7FFCB9
movups %xmm0, 0x2c(%rcx)
movl %edx, 0x3c(%rcx)
movaps %xmm0, -0x140(%rbp)
movaps %xmm0, -0x150(%rbp)
movaps %xmm0, -0x160(%rbp)
movaps %xmm0, -0x170(%rbp)
xorl %edx, %edx
movq -0x1d8(%rbp), %r12
movq %rdx, %rsi
shlq $0x4, %rsi
addq %rbp, %rsi
addq $-0x170, %rsi           # imm = 0xFE90
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 0x2f69
movss %xmm0, (%rsi,%r8,4)
incq %r8
addq $0x4, %rdi
cmpq $0x4, %r8
jne 0x2f60
incq %rdx
addq $0x10, %rax
cmpq $0x4, %rdx
jne 0x2f49
movq %r13, %rax
subq -0x38(%rbp), %rax
sarq $0x5, %rax
movq %rax, -0x48(%rbp)
movb $0x1, %r14b
movq %r13, -0xa8(%rbp)
testb $0x1, %r14b
je 0x3140
leaq -0x1d0(%rbp), %rdi
callq 0x2170
testl %eax, %eax
je 0x2fef
cmpl $0x100, -0x1d0(%rbp)    # imm = 0x100
movzbl %r14b, %r14d
movl $0x0, %eax
cmovel %eax, %r14d
jmp 0x2fc6
xorl %eax, %eax
leaq 0x4208(%rip), %rcx      # 0x7200
movl $0x7f7fffff, (%rax,%rcx) # imm = 0x7F7FFFFF
addq $0x4, %rax
cmpq $0x12c000, %rax         # imm = 0x12C000
jne 0x2ff8
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2070
movq %r12, %rdi
callq 0x22a0
movl %r14d, -0x58(%rbp)
cmpq -0x38(%rbp), %r13
movq %r12, %r14
movq -0x48(%rbp), %rax
leaq -0x370(%rbp), %r13
je 0x3069
movq -0x38(%rbp), %r12
xorl %r15d, %r15d
leaq 0x20(%r12), %rdx
leaq 0x40(%r12), %rcx
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %r8
movq %rax, %rbx
callq 0x341f
movq %rbx, %rax
addq $0x3, %r15
addq $0x60, %r12
cmpq %rbx, %r15
jb 0x303e
movaps 0x2020(%rip), %xmm0     # 0x5090
movups %xmm0, -0x130(%rbp)
movaps 0x2022(%rip), %xmm0     # 0x50a0
movups %xmm0, -0x120(%rbp)
movaps 0x2024(%rip), %xmm0     # 0x50b0
movups %xmm0, -0x190(%rbp)
movaps 0x1fb6(%rip), %xmm0     # 0x5050
movups %xmm0, -0x180(%rbp)
movaps 0x2018(%rip), %xmm0     # 0x50c0
movups %xmm0, -0xd0(%rbp)
movaps 0x201a(%rip), %xmm0     # 0x50d0
movups %xmm0, -0xc0(%rbp)
movq %r14, %rdi
leaq -0x130(%rbp), %rsi
leaq -0x190(%rbp), %rdx
leaq -0xd0(%rbp), %rcx
leaq -0xa0(%rbp), %r8
callq 0x341f
movq %r14, %rdi
movq -0x30(%rbp), %r15
callq 0x22b0
movq %r14, %r12
movq -0xa8(%rbp), %rbx
movl -0x58(%rbp), %r14d
leaq -0x370(%rbp), %rdi
movq %r15, %r13
leaq -0x170(%rbp), %r15
movq %r15, %rsi
callq 0x4486
leaq -0xa0(%rbp), %rdi
movq %r15, %rsi
movq %r13, %r15
movq %rbx, %r13
callq 0x4486
movq %r15, %rdi
callq 0x2260
movl $0x14, %edi
callq 0x21b0
jmp 0x2fbc
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x31d6
movq -0x50(%rbp), %rsi
callq 0x2250
jmp 0x31d6
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 0x31de
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 %r15, %rdi
callq 0x2030
callq 0x2080
xorl %eax, %eax
addq $0x558, %rsp            # imm = 0x558
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
leaq 0x1fb2(%rip), %rdi      # 0x51b3
callq 0x2140
movl $0x10, %edi
callq 0x2130
movq %rax, %rbx
leaq 0x1f56(%rip), %rsi      # 0x5170
movq %rax, %rdi
callq 0x20e0
movq 0x3dc7(%rip), %rsi      # 0x6ff0
movq 0x3d98(%rip), %rdx      # 0x6fc8
movq %rbx, %rdi
callq 0x2320
movq %rdx, %r12
movq %rax, %r13
jmp 0x324e
movq %rdx, %r12
movq %rax, %r13
movq %rbx, %rdi
callq 0x21a0
movq -0x30(%rbp), %r15
jmp 0x338c
jmp 0x3275
movq %rdx, %r12
movq %rax, %r13
jmp 0x3398
movq %rdx, %r12
movq %rax, %r13
jmp 0x33cf
movq -0x58(%rbp), %r14
jmp 0x3275
movq %rdx, %r12
movq %rax, %r13
testq %r14, %r14
je 0x329f
movq -0x48(%rbp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x2250
jmp 0x329f
jmp 0x32b3
jmp 0x32b3
jmp 0x3299
jmp 0x32b3
movq %rdx, %r12
movq %rax, %r13
movq -0x30(%rbp), %r15
leaq -0x90(%rbp), %rbx
jmp 0x3305
jmp 0x33b7
jmp 0x32b3
movq %rdx, %r12
movq %rax, %r13
movq -0x30(%rbp), %r15
leaq -0x90(%rbp), %rbx
movq -0x170(%rbp), %rdi
leaq -0x160(%rbp), %rax
cmpq %rax, %rdi
je 0x32e6
movq -0x160(%rbp), %rsi
incq %rsi
callq 0x2250
movq 0x3cc3(%rip), %rsi      # 0x6fb0
leaq -0x370(%rbp), %rdi
callq 0x21c0
leaq -0x2f0(%rbp), %rdi
callq 0x20c0
movq -0xa0(%rbp), %rdi
cmpq %rbx, %rdi
je 0x3320
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2250
movq -0xf0(%rbp), %rdi
testq %rdi, %rdi
je 0x333b
movq -0xe0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x3356
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0x190(%rbp), %rdi
testq %rdi, %rdi
je 0x3371
movq -0x180(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
movq -0x130(%rbp), %rdi
testq %rdi, %rdi
je 0x338c
movq -0x120(%rbp), %rsi
subq %rdi, %rsi
callq 0x2250
leaq -0x580(%rbp), %rdi
callq 0x2090
movq -0x1d0(%rbp), %rdi
leaq -0x1c0(%rbp), %rax
cmpq %rax, %rdi
je 0x33cf
movq -0x1c0(%rbp), %rsi
incq %rsi
jmp 0x33ca
movq %rdx, %r12
movq %rax, %r13
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x33cf
movq -0x50(%rbp), %rsi
callq 0x2250
cmpl $0x1, %r12d
jne 0x340f
movq %r13, %rdi
callq 0x20f0
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x3bfb(%rip), %rdi      # 0x6fe8
movq %rax, %rsi
callq 0x2230
movq %rax, %rdi
callq 0x2120
callq 0x2300
jmp 0x31d6
movq %rax, %r13
callq 0x2300
movq %r13, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x4714