// File: /workspace/github_cpp_makefile_star2_O1/graphitemaster[P]smbf/smbf.cpp
// Function: obj::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int&, int&)
bool obj::load(const u::string &file, int &before, int &after) {
    u::file fp = u::fopen(file, "r");
    if (!fp)
        return false;

    // Processed vertices, normals and coordinates from the OBJ file
    u::vector<m::vec3> vertices;
    u::vector<m::vec3> normals;
    u::vector<m::vec3> coordinates;
    u::vector<m::vec3> tangents;
    u::vector<float> bitangents;

    // Unique vertices are stored in a map keyed by face.
    u::map<face, size_t> uniques;

    size_t count = 0;
    size_t group = 0;
    while (auto get = u::getline(fp)) {
        auto &line = *get;
        // Skip whitespace
        while (line.size() && strchr(" \t", line[0]))
            line.erase(line.begin());
        // Skip comments
        if (strchr("#$", line[0]))
            continue;
        // Skip empty lines
        if (line.empty())
            continue;

        // Process the individual lines
        float x = 0.0f;
        float y = 0.0f;
        float z = 0.0f;
        if (u::sscanf(line, "v %f %f %f", &x, &y, &z) == 3) {
            // v float float float
            vertices.push_back({x, y, z * -1.0f});
        } else if (u::sscanf(line, "vn %f %f %f", &x, &y, &z) == 3) {
            // vn float float float
            normals.push_back({x * -1.0f, y * -1.0f, z});
        } else if (u::sscanf(line, "vt %f %f", &x, &y) == 2) {
            // vt float float
            coordinates.push_back({x, 1.0f - y, 0.0f});
        } else if (line[0] == 'g') {
            group++;
        } else if (line[0] == 'f' && group == 0) { // Only process the first group faces
            u::vector<size_t> v;
            u::vector<size_t> n;
            u::vector<size_t> t;

            // Note: 1 to skip "f"
            auto contents = u::split(line);
            for (size_t i = 1; i < contents.size(); i++) {
                int vi = 0;
                int ni = 0;
                int ti = 0;
                if (u::sscanf(contents[i], "%i/%i/%i", &vi, &ti, &ni) == 3) {
                    v.push_back(vi < 0 ? v.size() + vi : vi - 1);
                    t.push_back(ti < 0 ? t.size() + ti : ti - 1);
                    n.push_back(ni < 0 ? n.size() + ni : ni - 1);
                } else if (u::sscanf(contents[i], "%i//%i", &vi, &ni) == 2) {
                    v.push_back(vi < 0 ? v.size() + vi : vi - 1);
                    n.push_back(ni < 0 ? n.size() + ni : ni - 1);
                } else if (u::sscanf(contents[i], "%i/%i", &vi, &ti) == 2) {
                    v.push_back(vi < 0 ? v.size() + vi : vi - 1);
                    t.push_back(ti < 0 ? t.size() + ti : ti - 1);
                } else if (u::sscanf(contents[i], "%i", &vi) == 1) {
                    v.push_back(vi < 0 ? v.size() + vi : vi - 1);
                }
            }

            // Triangulate the mesh
            for (size_t i = 1; i < v.size() - 1; ++i) {
                auto index = m_indices.size();
                m_indices.resize(index + 3);
                auto triangulate = [&v, &n, &t, &uniques, &count](size_t index, size_t &out) {
                    face triangle;
                    triangle.vertex = v[index];
                    if (n.size()) triangle.normal = n[index];
                    if (t.size()) triangle.coordinate = t[index];
                    // Only insert in the map if it doesn't exist
                    if (uniques.find(triangle) == uniques.end())
                        uniques[triangle] = count++;
                    out = uniques[triangle];
                };
                triangulate(0,     m_indices[index + 0]);
                triangulate(i + 0, m_indices[index + 1]);
                triangulate(i + 1, m_indices[index + 2]);
            }
        }
    }

    // Construct the model, indices are already generated
    m_positions.resize(count);
    m_normals.resize(count);
    m_coordinates.resize(count);
    for (auto &it : uniques) {
        const auto &first = it.first;
        const auto &second = it.second;
        m_positions[second] = vertices[first.vertex];
        if (normals.size())
            m_normals[second] = normals[first.normal];
        if (coordinates.size())
            m_coordinates[second] = coordinates[first.coordinate];
    }

    // Optimize the indices
    vertexCache cache;
    vertexCacheOptimizer vco;
    vco.optimize(m_indices);

    // Change winding order
    for (size_t i = 0; i < m_indices.size(); i += 3)
        u::swap(m_indices[i], m_indices[i + 2]);

    // Calculate tangents
    m_tangents.resize(count);
    m_bitangents.resize(count);
    createTangents(m_positions, m_coordinates, m_normals, m_indices, m_tangents, m_bitangents);

    before = cache.getCacheMissCount(m_indices);
    after = vco.getCacheMissCount();

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4a8, %rsp            # imm = 0x4A8
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %r12
leaq 0x3ef9(%rip), %rdx      # 0x7130
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
callq 0x247e
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x4749
movq %r12, 0x90(%rsp)
movq %r15, 0x118(%rsp)
movq %r14, 0x120(%rsp)
movq %rbx, 0x128(%rsp)
pxor %xmm0, %xmm0
leaq 0x100(%rsp), %rax
movdqa %xmm0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x10(%rax)
leaq 0xe0(%rsp), %rax
movq %rcx, 0x10(%rax)
movdqa %xmm0, (%rax)
leaq 0xc0(%rsp), %rax
movq %rcx, 0x10(%rax)
movdqa %xmm0, (%rax)
leaq 0x168(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
movdqu %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movdqu %xmm0, -0x8(%rax)
leaq 0x2f8(%rsp), %r14
leaq 0x6c(%rsp), %r13
leaq 0x4(%rsp), %r15
leaq 0x3e4b(%rip), %rbx      # 0x7132
movq $0x0, 0x30(%rsp)
movq $0x0, 0x8(%rsp)
movq %r13, %r12
leaq 0x2f0(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
callq 0x24e5
movb 0x2f0(%rsp), %bpl
cmpb $0x1, %bpl
jne 0x3441
movq 0x300(%rsp), %r13
testq %r13, %r13
je 0x335e
movq 0x2f8(%rsp), %rax
movsbl (%rax), %esi
movl $0x3, %edx
movq %rbx, %rdi
callq 0x2140
testq %rax, %rax
je 0x335e
movl $0x1, %edx
movq %r14, %rdi
xorl %esi, %esi
callq 0x2160
jmp 0x3323
movq 0x2f8(%rsp), %rax
movsbl (%rax), %esi
movl $0x3, %edx
leaq 0x3dc0(%rip), %rdi      # 0x7135
callq 0x2140
testq %r13, %r13
je 0x3441
testq %rax, %rax
movq %r12, %r13
jne 0x3444
movb %bpl, 0x38(%rsp)
xorl %eax, %eax
movl %eax, 0x6c(%rsp)
movl %eax, 0x68(%rsp)
movl %eax, 0x4(%rsp)
movq %r14, %rdi
leaq 0x3d8c(%rip), %rsi      # 0x7138
movq %r13, %rdx
movq %r15, %rbp
leaq 0x68(%rsp), %r15
movq %r15, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x5246
cmpl $0x3, %eax
jne 0x3481
movd 0x6c(%rsp), %xmm0
movss 0x68(%rsp), %xmm1
movss 0x4(%rsp), %xmm2
xorps 0x3c3a(%rip), %xmm2     # 0x7020
movd %xmm0, 0x170(%rsp)
movss %xmm1, 0x174(%rsp)
movss %xmm2, 0x178(%rsp)
movq 0x108(%rsp), %rsi
cmpq 0x110(%rsp), %rsi
je 0x35b8
movl 0x178(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x170(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0x108(%rsp)
leaq 0x4(%rsp), %r15
movb 0x38(%rsp), %bpl
jmp 0x3444
movq %r12, %r13
cmpb $0x1, 0x2f0(%rsp)
jne 0x3473
movq 0x2f8(%rsp), %rdi
leaq 0x308(%rsp), %rax
cmpq %rax, %rdi
je 0x3473
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x2120
testb %bpl, %bpl
jne 0x32f9
jmp 0x3dfc
movq %r14, %rdi
leaq 0x3cb8(%rip), %rsi      # 0x7143
movq %r13, %rdx
movq %r15, %rcx
movq %rbp, %r8
xorl %eax, %eax
callq 0x5246
cmpl $0x3, %eax
jne 0x3524
movd 0x6c(%rsp), %xmm0
movdqa 0x3b6e(%rip), %xmm2     # 0x7020
pxor %xmm2, %xmm0
movd 0x68(%rsp), %xmm1
pxor %xmm2, %xmm1
movss 0x4(%rsp), %xmm2
movd %xmm0, 0x170(%rsp)
movd %xmm1, 0x174(%rsp)
movss %xmm2, 0x178(%rsp)
movq 0xe8(%rsp), %rsi
cmpq 0xf0(%rsp), %rsi
movb 0x38(%rsp), %bpl
je 0x35fa
movl 0x178(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x170(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0xe8(%rsp)
leaq 0x4(%rsp), %r15
jmp 0x3444
movq %r14, %rdi
leaq 0x3c21(%rip), %rsi      # 0x714f
movq %r13, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x5246
cmpl $0x2, %eax
jne 0x35dc
movd 0x6c(%rsp), %xmm0
movss 0x3b0a(%rip), %xmm1     # 0x705c
subss 0x68(%rsp), %xmm1
movd %xmm0, 0x170(%rsp)
movss %xmm1, 0x174(%rsp)
movl $0x0, 0x178(%rsp)
movq 0xc8(%rsp), %rsi
cmpq 0xd0(%rsp), %rsi
leaq 0x4(%rsp), %r15
movb 0x38(%rsp), %bpl
je 0x3ad4
movl 0x178(%rsp), %eax
movl %eax, 0x8(%rsi)
movq 0x170(%rsp), %rax
movq %rax, (%rsi)
addq $0xc, 0xc8(%rsp)
jmp 0x3444
leaq 0x100(%rsp), %rdi
leaq 0x170(%rsp), %rdx
callq 0x63fc
leaq 0x4(%rsp), %r15
movb 0x38(%rsp), %bpl
jmp 0x3444
movq 0x2f8(%rsp), %rbp
movb (%rbp), %al
cmpb $0x67, %al
leaq 0x4(%rsp), %r15
jne 0x3619
incq 0x8(%rsp)
jmp 0x343a
leaq 0xe0(%rsp), %rdi
leaq 0x170(%rsp), %rdx
callq 0x63fc
leaq 0x4(%rsp), %r15
jmp 0x3444
cmpb $0x66, %al
sete %al
cmpq $0x0, 0x8(%rsp)
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x343a
pxor %xmm0, %xmm0
movdqa %xmm0, 0x10(%rsp)
xorl %eax, %eax
movq %rax, 0x20(%rsp)
movq %rax, 0x50(%rsp)
movdqa %xmm0, 0x40(%rsp)
movq %rax, 0x80(%rsp)
movdqa %xmm0, 0x70(%rsp)
movq %rax, 0xb0(%rsp)
movdqa %xmm0, 0xa0(%rsp)
leaq 0x170(%rsp), %r13
movq %rbp, %rsi
movzbl (%rbp), %eax
incq %rbp
testb $-0x21, %al
jne 0x3678
leaq 0x180(%rsp), %rax
movq %rax, 0x170(%rsp)
leaq -0x1(%rbp), %r15
movq %r13, %rdi
movq %r15, %rdx
callq 0x5b7e
leaq 0xa0(%rsp), %rdi
movq %r13, %rsi
callq 0x5536
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x36d7
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x2120
cmpb $0x0, (%r15)
jne 0x3675
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rax
subq %rdi, %rax
cmpq $0x21, %rax
jb 0x3aee
movl $0x1, %r13d
movl $0x20, %ebp
movq %r13, 0x8(%rsp)
xorl %eax, %eax
movl %eax, 0x60(%rsp)
movl %eax, 0x9c(%rsp)
movl %eax, 0x64(%rsp)
addq %rbp, %rdi
leaq 0x3a33(%rip), %rsi      # 0x7158
leaq 0x60(%rsp), %r13
movq %r13, %rdx
leaq 0x64(%rsp), %rcx
leaq 0x9c(%rsp), %r15
movq %r15, %r8
xorl %eax, %eax
callq 0x5246
cmpl $0x3, %eax
jne 0x3761
movslq 0x60(%rsp), %rcx
testq %rcx, %rcx
js 0x37df
decl %ecx
movslq %ecx, %rax
jmp 0x37f0
movq 0xa0(%rsp), %rdi
addq %rbp, %rdi
leaq 0x39ee(%rip), %rsi      # 0x7161
movq %r13, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x5246
cmpl $0x2, %eax
jne 0x379d
movslq 0x60(%rsp), %rcx
testq %rcx, %rcx
js 0x3919
decl %ecx
movslq %ecx, %rax
jmp 0x392a
movq 0xa0(%rsp), %rdi
addq %rbp, %rdi
leaq 0x39ac(%rip), %rsi      # 0x715b
movq %r13, %rdx
leaq 0x64(%rsp), %rcx
xorl %eax, %eax
callq 0x5246
cmpl $0x2, %eax
jne 0x38cf
movslq 0x60(%rsp), %rcx
testq %rcx, %rcx
js 0x39e6
decl %ecx
movslq %ecx, %rax
jmp 0x39f7
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
addq %rcx, %rax
leaq 0x170(%rsp), %r15
movq 0x8(%rsp), %r13
movq %rax, 0x170(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x381f
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x382c
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x5ee4
movslq 0x64(%rsp), %rcx
testq %rcx, %rcx
js 0x383d
decl %ecx
movslq %ecx, %rax
jmp 0x384e
movq 0x78(%rsp), %rax
subq 0x70(%rsp), %rax
sarq $0x3, %rax
addq %rcx, %rax
movq %rax, 0x170(%rsp)
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0x3873
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x78(%rsp)
jmp 0x3880
leaq 0x70(%rsp), %rdi
movq %r15, %rdx
callq 0x5ee4
movslq 0x9c(%rsp), %rcx
testq %rcx, %rcx
js 0x3894
decl %ecx
movslq %ecx, %rax
jmp 0x38a5
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
sarq $0x3, %rax
addq %rcx, %rax
movq %rax, 0x170(%rsp)
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
jne 0x399f
leaq 0x40(%rsp), %rdi
movq %r15, %rdx
callq 0x5ee4
jmp 0x39ab
movq 0xa0(%rsp), %rdi
addq %rbp, %rdi
leaq 0x3884(%rip), %rsi      # 0x7165
movq %r13, %rdx
xorl %eax, %eax
callq 0x5246
cmpl $0x1, %eax
leaq 0x170(%rsp), %rdx
movq 0x8(%rsp), %r13
jne 0x39ab
movslq 0x60(%rsp), %rcx
testq %rcx, %rcx
js 0x3a8f
decl %ecx
movslq %ecx, %rax
jmp 0x3aa0
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
addq %rcx, %rax
leaq 0x170(%rsp), %r15
movq 0x8(%rsp), %r13
movq %rax, 0x170(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x3959
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x3966
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x5ee4
movslq 0x9c(%rsp), %rcx
testq %rcx, %rcx
js 0x397a
decl %ecx
movslq %ecx, %rax
jmp 0x398b
movq 0x48(%rsp), %rax
subq 0x40(%rsp), %rax
sarq $0x3, %rax
addq %rcx, %rax
movq %rax, 0x170(%rsp)
movq 0x48(%rsp), %rsi
cmpq 0x50(%rsp), %rsi
je 0x39d7
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x48(%rsp)
incq %r13
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rax
subq %rdi, %rax
sarq $0x5, %rax
addq $0x20, %rbp
cmpq %rax, %r13
jb 0x3705
jmp 0x3aee
leaq 0x40(%rsp), %rdi
movq %r15, %rdx
callq 0x5ee4
jmp 0x39ab
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
addq %rcx, %rax
leaq 0x170(%rsp), %r15
movq 0x8(%rsp), %r13
movq %rax, 0x170(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x3a26
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x3a33
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x5ee4
movslq 0x64(%rsp), %rcx
testq %rcx, %rcx
js 0x3a44
decl %ecx
movslq %ecx, %rax
jmp 0x3a55
movq 0x78(%rsp), %rax
subq 0x70(%rsp), %rax
sarq $0x3, %rax
addq %rcx, %rax
movq %rax, 0x170(%rsp)
movq 0x78(%rsp), %rsi
cmpq 0x80(%rsp), %rsi
je 0x3a7d
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x78(%rsp)
jmp 0x39ab
leaq 0x70(%rsp), %rdi
movq %r15, %rdx
callq 0x5ee4
jmp 0x39ab
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
addq %rcx, %rax
movq %rax, 0x170(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x3ac5
movq %rax, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x39ab
leaq 0x10(%rsp), %rdi
callq 0x5ee4
jmp 0x39ab
leaq 0xc0(%rsp), %rdi
leaq 0x170(%rsp), %rdx
callq 0x63fc
jmp 0x3444
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
sarq $0x3, %rax
addq $-0x3, %rax
cmpq $-0x3, %rax
ja 0x3d8c
movl $0x1, %r15d
movq 0x90(%rsp), %r13
movq 0x8(%r13), %rbp
subq (%r13), %rbp
movq %rbp, %rsi
sarq $0x3, %rsi
addq $0x3, %rsi
movq %r13, %rdi
callq 0x52ce
movq (%r13), %r13
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x170(%rsp)
movq $-0x1, 0x180(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x170(%rsp)
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x3b77
movq (%rax), %rax
movq %rax, 0x178(%rsp)
movq 0x70(%rsp), %rax
cmpq %rax, 0x78(%rsp)
je 0x3b8e
movq (%rax), %rax
movq %rax, 0x180(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x579e
testq %rax, %rax
jne 0x3bcd
leaq 0x138(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x584c
movq 0x30(%rsp), %rcx
movq %rcx, (%rax)
incq %rcx
movq %rcx, 0x30(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x584c
movq (%rax), %rax
movq %rax, (%r13,%rbp)
movq 0x90(%rsp), %rax
movq (%rax), %r13
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x170(%rsp)
movq $-0x1, 0x180(%rsp)
movq 0x10(%rsp), %rax
movq (%rax,%r15,8), %rax
movq %rax, 0x170(%rsp)
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x3c37
movq (%rax,%r15,8), %rax
movq %rax, 0x178(%rsp)
movq 0x70(%rsp), %rax
cmpq %rax, 0x78(%rsp)
je 0x3c4f
movq (%rax,%r15,8), %rax
movq %rax, 0x180(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x579e
testq %rax, %rax
jne 0x3c8e
leaq 0x138(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x584c
movq 0x30(%rsp), %rcx
movq %rcx, (%rax)
incq %rcx
movq %rcx, 0x30(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x584c
movq (%rax), %rax
movq %rax, 0x8(%r13,%rbp)
movq 0x90(%rsp), %rax
movq (%rax), %r13
pcmpeqd %xmm0, %xmm0
movdqa %xmm0, 0x170(%rsp)
movq $-0x1, 0x180(%rsp)
movq 0x10(%rsp), %rax
movq 0x8(%rax,%r15,8), %rax
movq %rax, 0x170(%rsp)
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x3cfa
movq 0x8(%rax,%r15,8), %rax
movq %rax, 0x178(%rsp)
movq 0x70(%rsp), %rax
cmpq %rax, 0x78(%rsp)
je 0x3d13
movq 0x8(%rax,%r15,8), %rax
movq %rax, 0x180(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x579e
testq %rax, %rax
jne 0x3d52
leaq 0x138(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x584c
movq 0x30(%rsp), %rcx
movq %rcx, (%rax)
incq %rcx
movq %rcx, 0x30(%rsp)
leaq 0x138(%rsp), %rdi
leaq 0x170(%rsp), %rsi
callq 0x584c
movq (%rax), %rax
movq %rax, 0x10(%r13,%rbp)
movq 0x18(%rsp), %rax
subq 0x10(%rsp), %rax
incq %r15
sarq $0x3, %rax
decq %rax
cmpq %rax, %r15
jb 0x3b10
leaq 0xa0(%rsp), %rdi
callq 0x5300
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x3db3
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
movq %r12, %r13
leaq 0x4(%rsp), %r15
je 0x3dd2
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movb 0x38(%rsp), %bpl
je 0x3dee
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq $0x0, 0x8(%rsp)
jmp 0x3444
movq 0x90(%rsp), %r12
leaq 0x18(%r12), %rbp
movq %rbp, %rdi
movq 0x30(%rsp), %r14
movq %r14, %rsi
callq 0x535c
leaq 0x30(%r12), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x535c
leaq 0x48(%r12), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x535c
movq 0x148(%rsp), %rax
testq %rax, %rax
je 0x3eee
movq 0x100(%rsp), %rcx
movq 0x8(%rax), %rdx
movq 0x20(%rax), %rsi
leaq (%rdx,%rdx,2), %rdx
movq (%rbp), %rdi
leaq (%rsi,%rsi,2), %rsi
movl 0x8(%rcx,%rdx,4), %r8d
movl %r8d, 0x8(%rdi,%rsi,4)
movq (%rcx,%rdx,4), %rcx
movq %rcx, (%rdi,%rsi,4)
movq 0xe0(%rsp), %rcx
cmpq %rcx, 0xe8(%rsp)
je 0x3eaf
movq 0x10(%rax), %rdx
movq 0x20(%rax), %rsi
leaq (%rdx,%rdx,2), %rdx
movq (%rbx), %rdi
leaq (%rsi,%rsi,2), %rsi
movl 0x8(%rcx,%rdx,4), %r8d
movl %r8d, 0x8(%rdi,%rsi,4)
movq (%rcx,%rdx,4), %rcx
movq %rcx, (%rdi,%rsi,4)
movq 0xc0(%rsp), %rcx
cmpq %rcx, 0xc8(%rsp)
je 0x3ee6
movq 0x18(%rax), %rdx
movq 0x20(%rax), %rsi
leaq (%rdx,%rdx,2), %rdx
movq (%r15), %rdi
leaq (%rsi,%rsi,2), %rsi
movl 0x8(%rcx,%rdx,4), %r8d
movl %r8d, 0x8(%rdi,%rsi,4)
movq (%rcx,%rdx,4), %rcx
movq %rcx, (%rdi,%rsi,4)
movq (%rax), %rax
jmp 0x3e41
leaq 0x170(%rsp), %r14
movl $0x140, %edx            # imm = 0x140
movq %r14, %rdi
movl $0xff, %esi
callq 0x20a0
movq $0x0, 0x140(%r14)
leaq 0x350(%rsp), %r14
pxor %xmm0, %xmm0
movdqa %xmm0, -0x10(%r14)
movdqa %xmm0, -0x20(%r14)
movdqa %xmm0, -0x30(%r14)
movdqa %xmm0, -0x40(%r14)
movdqa %xmm0, -0x50(%r14)
movdqa %xmm0, -0x60(%r14)
movl $0x140, %edx            # imm = 0x140
movq %r14, %rdi
movl $0xff, %esi
callq 0x20a0
pxor %xmm0, %xmm0
movdqa %xmm0, 0x140(%r14)
leaq 0x2f0(%rsp), %rdi
movq %r12, %rsi
callq 0x28fa
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
je 0x3fa1
sarq $0x3, %rcx
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
movq 0x10(%rax,%rdx,8), %rdi
movq %rsi, 0x10(%rax,%rdx,8)
movq %rdi, (%rax,%rdx,8)
addq $0x3, %rdx
cmpq %rcx, %rdx
jb 0x3f86
leaq 0x60(%r12), %r14
movq %r14, %rdi
movq 0x30(%rsp), %rsi
callq 0x535c
leaq 0x78(%r12), %rdi
movq %rdi, 0x130(%rsp)
movq 0x30(%rsp), %rsi
callq 0x53a0
movq 0x18(%r12), %r13
movq 0x20(%r12), %rax
movq %rax, 0x38(%rsp)
subq %r13, %rax
sarq $0x2, %rax
movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
xorl %eax, %eax
leaq 0x10(%rsp), %rdi
movq %rax, 0x10(%rdi)
pxor %xmm0, %xmm0
movdqa %xmm0, (%rdi)
movq %rax, 0x50(%rsp)
movdqa %xmm0, 0x40(%rsp)
movq %r12, %rsi
callq 0x535c
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x535c
movq 0x90(%rsp), %rax
movq (%rax), %rcx
cmpq %rcx, 0x8(%rax)
je 0x4335
xorl %eax, %eax
movaps 0x2ff1(%rip), %xmm0     # 0x7030
movss 0x3021(%rip), %xmm1     # 0x7068
movq (%rcx,%rax,8), %rsi
movq 0x8(%rcx,%rax,8), %rdx
movq 0x10(%rcx,%rax,8), %rcx
movq (%r15), %r10
leaq (%rdx,%rdx,2), %rdi
leaq (%rsi,%rsi,2), %r8
movss (%r10,%rdi,4), %xmm6
movss 0x4(%r10,%rdi,4), %xmm10
movss (%r10,%r8,4), %xmm2
movss 0x4(%r10,%r8,4), %xmm3
subss %xmm2, %xmm6
leaq (%rcx,%rcx,2), %r9
movss (%r10,%r9,4), %xmm8
movss 0x4(%r10,%r9,4), %xmm5
subss %xmm2, %xmm8
subss %xmm3, %xmm10
subss %xmm3, %xmm5
movaps %xmm10, %xmm2
mulss %xmm8, %xmm2
movaps %xmm6, %xmm15
mulss %xmm5, %xmm15
subss %xmm2, %xmm15
movaps %xmm15, %xmm2
andps %xmm0, %xmm2
xorps %xmm3, %xmm3
ucomiss %xmm2, %xmm1
movss 0x2f93(%rip), %xmm7     # 0x705c
movaps %xmm7, %xmm4
xorps %xmm2, %xmm2
xorps %xmm9, %xmm9
xorps %xmm11, %xmm11
jae 0x41d8
xorps 0x2f3b(%rip), %xmm8     # 0x7020
movq (%rbp), %r10
movss 0x8(%r10,%r9,4), %xmm11
movss 0x8(%r10,%r8,4), %xmm3
subss %xmm3, %xmm11
movss (%r10,%r9,4), %xmm14
movss 0x4(%r10,%r9,4), %xmm12
movss (%r10,%r8,4), %xmm7
movss 0x4(%r10,%r8,4), %xmm9
subss %xmm9, %xmm12
subss %xmm7, %xmm14
movss 0x8(%r10,%rdi,4), %xmm2
subss %xmm3, %xmm2
movss (%r10,%rdi,4), %xmm3
movss 0x4(%r10,%rdi,4), %xmm4
subss %xmm9, %xmm4
subss %xmm7, %xmm3
movss 0x2f12(%rip), %xmm13    # 0x705c
divss %xmm15, %xmm13
movaps %xmm14, %xmm9
mulss %xmm10, %xmm9
movaps %xmm5, %xmm7
mulss %xmm3, %xmm7
subss %xmm9, %xmm7
mulss %xmm13, %xmm7
movaps %xmm12, %xmm15
mulss %xmm10, %xmm15
movaps %xmm5, %xmm9
mulss %xmm4, %xmm9
subss %xmm15, %xmm9
mulss %xmm13, %xmm9
mulss %xmm11, %xmm10
mulss %xmm2, %xmm5
subss %xmm10, %xmm5
mulss %xmm13, %xmm5
mulss %xmm6, %xmm14
mulss %xmm8, %xmm3
addss %xmm14, %xmm3
mulss %xmm13, %xmm3
mulss %xmm6, %xmm12
mulss %xmm8, %xmm4
addss %xmm12, %xmm4
mulss %xmm13, %xmm4
mulss %xmm6, %xmm11
mulss %xmm8, %xmm2
addss %xmm11, %xmm2
mulss %xmm13, %xmm2
movaps %xmm5, %xmm11
movq 0x10(%rsp), %rdi
shlq $0x2, %rsi
leaq (%rsi,%rsi,2), %rsi
movss (%rdi,%rsi), %xmm5
addss %xmm7, %xmm5
movss %xmm5, (%rdi,%rsi)
movss 0x4(%rdi,%rsi), %xmm5
addss %xmm9, %xmm5
movss %xmm5, 0x4(%rdi,%rsi)
movss 0x8(%rdi,%rsi), %xmm5
addss %xmm11, %xmm5
movss %xmm5, 0x8(%rdi,%rsi)
movq 0x10(%rsp), %rdi
shlq $0x2, %rdx
leaq (%rdx,%rdx,2), %rdx
movss (%rdi,%rdx), %xmm5
addss %xmm7, %xmm5
movss %xmm5, (%rdi,%rdx)
movss 0x4(%rdi,%rdx), %xmm5
addss %xmm9, %xmm5
movss %xmm5, 0x4(%rdi,%rdx)
movss 0x8(%rdi,%rdx), %xmm5
addss %xmm11, %xmm5
movss %xmm5, 0x8(%rdi,%rdx)
movq 0x10(%rsp), %rdi
shlq $0x2, %rcx
leaq (%rcx,%rcx,2), %rcx
addss (%rdi,%rcx), %xmm7
movss %xmm7, (%rdi,%rcx)
addss 0x4(%rdi,%rcx), %xmm9
movss %xmm9, 0x4(%rdi,%rcx)
addss 0x8(%rdi,%rcx), %xmm11
movss %xmm11, 0x8(%rdi,%rcx)
movq 0x40(%rsp), %rdi
movss (%rdi,%rsi), %xmm5
addss %xmm3, %xmm5
movss %xmm5, (%rdi,%rsi)
movss 0x4(%rdi,%rsi), %xmm5
addss %xmm4, %xmm5
movss %xmm5, 0x4(%rdi,%rsi)
movss 0x8(%rdi,%rsi), %xmm5
addss %xmm2, %xmm5
movss %xmm5, 0x8(%rdi,%rsi)
movq 0x40(%rsp), %rsi
movss (%rsi,%rdx), %xmm5
addss %xmm3, %xmm5
movss %xmm5, (%rsi,%rdx)
movss 0x4(%rsi,%rdx), %xmm5
addss %xmm4, %xmm5
movss %xmm5, 0x4(%rsi,%rdx)
movss 0x8(%rsi,%rdx), %xmm5
addss %xmm2, %xmm5
movss %xmm5, 0x8(%rsi,%rdx)
movq 0x40(%rsp), %rdx
addss (%rdx,%rcx), %xmm3
movss %xmm3, (%rdx,%rcx)
addss 0x4(%rdx,%rcx), %xmm4
movss %xmm4, 0x4(%rdx,%rcx)
addss 0x8(%rdx,%rcx), %xmm2
movss %xmm2, 0x8(%rdx,%rcx)
addq $0x3, %rax
movq 0x90(%rsp), %rdx
movq (%rdx), %rcx
movq 0x8(%rdx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rdx, %rax
jb 0x4047
cmpq %r13, 0x38(%rsp)
je 0x4616
cmpq $0x1, %r12
adcq $0x0, %r12
xorl %r15d, %r15d
movaps 0x2cde(%rip), %xmm5     # 0x7030
movss 0x2d0e(%rip), %xmm6     # 0x7068
xorps %xmm7, %xmm7
xorl %r13d, %r13d
movq (%rbx), %rbp
movq 0x10(%rsp), %rax
movss (%rax,%r15), %xmm8
movss 0x4(%rax,%r15), %xmm9
movss 0x8(%rax,%r15), %xmm10
movss (%rbp,%r15), %xmm0
movss 0x4(%rbp,%r15), %xmm1
movaps %xmm9, %xmm2
mulss %xmm1, %xmm2
movaps %xmm0, %xmm3
mulss %xmm8, %xmm3
addss %xmm2, %xmm3
movss 0x8(%rbp,%r15), %xmm2
movaps %xmm2, %xmm4
mulss %xmm10, %xmm4
addss %xmm3, %xmm4
mulss %xmm4, %xmm0
mulss %xmm4, %xmm1
mulss %xmm2, %xmm4
movaps %xmm8, %xmm2
subss %xmm0, %xmm2
movaps %xmm9, %xmm11
subss %xmm1, %xmm11
movaps %xmm10, %xmm3
subss %xmm4, %xmm3
movaps %xmm2, %xmm0
andps %xmm5, %xmm0
ucomiss %xmm0, %xmm6
jbe 0x4401
movaps %xmm11, %xmm0
andps %xmm5, %xmm0
ucomiss %xmm0, %xmm6
jbe 0x4401
movaps %xmm3, %xmm0
andps %xmm5, %xmm0
ucomiss %xmm0, %xmm6
jbe 0x4401
unpcklps %xmm11, %xmm2           # xmm2 = xmm2[0],xmm11[0],xmm2[1],xmm11[1]
jmp 0x44bb
movaps %xmm11, %xmm0
mulss %xmm11, %xmm0
movaps %xmm2, %xmm1
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
movaps %xmm3, %xmm0
mulss %xmm3, %xmm0
addss %xmm1, %xmm0
ucomiss %xmm7, %xmm0
jb 0x442b
sqrtss %xmm0, %xmm0
jmp 0x449e
movss %xmm8, 0x38(%rsp)
movss %xmm9, 0x30(%rsp)
movss %xmm10, 0x8(%rsp)
movaps %xmm2, 0x2e0(%rsp)
movaps %xmm3, 0x2d0(%rsp)
movaps %xmm11, 0x2c0(%rsp)
callq 0x2240
movaps 0x2c0(%rsp), %xmm11
movaps 0x2d0(%rsp), %xmm3
movaps 0x2e0(%rsp), %xmm2
movss 0x8(%rsp), %xmm10
movss 0x30(%rsp), %xmm9
movss 0x38(%rsp), %xmm8
xorps %xmm7, %xmm7
movss 0x2bd1(%rip), %xmm6     # 0x7068
movaps 0x2b92(%rip), %xmm5     # 0x7030
movss 0x2bb6(%rip), %xmm1     # 0x705c
divss %xmm0, %xmm1
mulss %xmm1, %xmm2
mulss %xmm1, %xmm11
unpcklps %xmm11, %xmm2           # xmm2 = xmm2[0],xmm11[0],xmm2[1],xmm11[1]
mulss %xmm1, %xmm3
movq (%r14), %rax
movlps %xmm2, (%rax,%r15)
movss %xmm3, 0x8(%rax,%r15)
movq (%r14), %rax
movss (%rax,%r15), %xmm1
movss 0x4(%rax,%r15), %xmm0
mulss %xmm0, %xmm0
mulss %xmm1, %xmm1
addss %xmm0, %xmm1
movss 0x8(%rax,%r15), %xmm0
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
ucomiss %xmm7, %xmm0
jb 0x4500
sqrtss %xmm0, %xmm0
jmp 0x4541
movss %xmm8, 0x38(%rsp)
movss %xmm9, 0x30(%rsp)
movss %xmm10, 0x8(%rsp)
callq 0x2240
movss 0x8(%rsp), %xmm10
movss 0x30(%rsp), %xmm9
movss 0x38(%rsp), %xmm8
xorps %xmm7, %xmm7
movss 0x2b2e(%rip), %xmm6     # 0x7068
movaps 0x2aef(%rip), %xmm5     # 0x7030
addss 0x2b07(%rip), %xmm0     # 0x7050
andps %xmm5, %xmm0
ucomiss %xmm0, %xmm6
ja 0x457c
movq (%r14), %rax
movl $0x0, 0x8(%rax,%r15)
movq $0x3f800000, (%rax,%r15) # imm = 0x3F800000
movq (%r14), %rax
movss (%rax,%r15), %xmm8
movss 0x4(%rax,%r15), %xmm9
movss 0x8(%rax,%r15), %xmm10
movss (%rbp,%r15), %xmm0
movss 0x4(%rbp,%r15), %xmm1
movss 0x8(%rbp,%r15), %xmm2
movaps %xmm9, %xmm3
mulss %xmm2, %xmm3
mulss %xmm8, %xmm2
mulss %xmm1, %xmm8
mulss %xmm10, %xmm1
subss %xmm3, %xmm1
mulss %xmm0, %xmm10
subss %xmm10, %xmm2
mulss %xmm9, %xmm0
movq 0x40(%rsp), %rax
mulss 0x4(%rax,%r15), %xmm2
mulss (%rax,%r15), %xmm1
subss %xmm8, %xmm0
addss %xmm2, %xmm1
mulss 0x8(%rax,%r15), %xmm0
addss %xmm1, %xmm0
xorl %eax, %eax
ucomiss %xmm0, %xmm7
seta %al
leaq 0x2a7c(%rip), %rcx      # 0x706c
movd (%rcx,%rax,4), %xmm0
movq 0x130(%rsp), %rax
movq (%rax), %rax
movd %xmm0, (%rax,%r13,4)
incq %r13
addq $0xc, %r15
cmpq %r13, %r12
jne 0x4360
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x462d
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
movq 0x128(%rsp), %rbx
movq 0x120(%rsp), %r14
movq 0x118(%rsp), %r15
movq 0x90(%rsp), %r12
je 0x4664
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
leaq 0x170(%rsp), %rdi
movq %r12, %rsi
callq 0x2846
movl %eax, (%r15)
movl 0x490(%rsp), %eax
movl %eax, (%r14)
movq 0x338(%rsp), %rdi
testq %rdi, %rdi
je 0x469e
movq 0x348(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0x320(%rsp), %rdi
testq %rdi, %rdi
je 0x46bb
movq 0x330(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0x308(%rsp), %rdi
testq %rdi, %rdi
je 0x46d8
movq 0x318(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
leaq 0x2f0(%rsp), %rdi
callq 0x4fa8
leaq 0x138(%rsp), %rdi
callq 0x5b0e
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x470f
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x472c
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x4749
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x475b
callq 0x2100
testq %rbx, %rbx
setne %al
addq $0x4a8, %rsp            # imm = 0x4A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4814
jmp 0x4814
jmp 0x4814
jmp 0x4873
jmp 0x4814
jmp 0x4814
jmp 0x4873
jmp 0x4814
jmp 0x4814
jmp 0x4814
jmp 0x4873
movq %rax, %rbx
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x47bb
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x2280
jmp 0x47cf
movq %rax, %rbx
leaq 0x2f0(%rsp), %rdi
callq 0x53d2
jmp 0x48ad
jmp 0x486e
jmp 0x4814
movq %rax, %rbx
movq 0x170(%rsp), %rdi
leaq 0x180(%rsp), %rax
cmpq %rax, %rdi
je 0x4817
movq 0x180(%rsp), %rsi
incq %rsi
callq 0x2120
jmp 0x4817
jmp 0x4814
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x5300
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x483e
movq 0x80(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x4855
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4876
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
jmp 0x4876
movq %rax, %rbx
jmp 0x48ad
movq %rax, %rbx
cmpb $0x1, 0x2f0(%rsp)
jne 0x48a5
movq 0x2f8(%rsp), %rdi
leaq 0x308(%rsp), %rax
cmpq %rax, %rdi
je 0x48a5
movq 0x308(%rsp), %rsi
incq %rsi
callq 0x2120
movb $0x0, 0x2f0(%rsp)
leaq 0x138(%rsp), %rdi
callq 0x5b0e
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x48d7
movq 0xd0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0xe0(%rsp), %rdi
testq %rdi, %rdi
je 0x48f4
movq 0xf0(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0x100(%rsp), %rdi
testq %rdi, %rdi
je 0x4911
movq 0x110(%rsp), %rsi
subq %rdi, %rsi
callq 0x2120
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x4923
callq 0x2100
movq %rbx, %rdi
callq 0x2220