// File: 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
movq %rsp, %rbp
subq $0x6b0, %rsp            # imm = 0x6B0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x5a8(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x30(%rbp), %rdi
leaq 0xc5d7(%rip), %rdx      # 0x100bc
callq 0x2560
leaq -0x30(%rbp), %rdi
callq 0x2520
cmpq $0x0, %rax
jne 0x3b09
movb $0x0, -0x1(%rbp)
movl $0x1, -0x34(%rbp)
jmp 0x4a35
leaq -0x50(%rbp), %rdi
callq 0x78b0
leaq -0x68(%rbp), %rdi
callq 0x78b0
leaq -0x80(%rbp), %rdi
callq 0x78b0
leaq -0x98(%rbp), %rdi
callq 0x78b0
leaq -0xb0(%rbp), %rdi
callq 0x78d0
leaq -0xe8(%rbp), %rdi
callq 0x78f0
movq $0x0, -0xf0(%rbp)
movq $0x0, -0xf8(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x2620
jmp 0x3b70
leaq -0x120(%rbp), %rdi
callq 0x7910
movb %al, -0x5a9(%rbp)
jmp 0x3b84
movb -0x5a9(%rbp), %al
testb $0x1, %al
jne 0x3bca
jmp 0x3b90
movl $0x3, -0x34(%rbp)
jmp 0x4604
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x49eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x4637
leaq -0x120(%rbp), %rdi
callq 0x7930
movq %rax, -0x5b8(%rbp)
jmp 0x3bdf
movq -0x5b8(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x138(%rbp), %rdi
callq 0x2140
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, -0x5b9(%rbp)
je 0x3c46
movq -0x138(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2390
movq %rax, -0x5c8(%rbp)
jmp 0x3c23
movq -0x5c8(%rbp), %rax
movsbl (%rax), %esi
leaq 0xc48a(%rip), %rdi      # 0x100be
callq 0x2080
cmpq $0x0, %rax
setne %al
movb %al, -0x5b9(%rbp)
movb -0x5b9(%rbp), %al
testb $0x1, %al
jne 0x3c52
jmp 0x3cae
movq -0x138(%rbp), %rdi
movq %rdi, -0x5d8(%rbp)
callq 0x21a0
movq %rax, -0x148(%rbp)
leaq -0x140(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x7950
movq -0x5d8(%rbp), %rdi
movq -0x140(%rbp), %rsi
callq 0x2250
movq %rax, -0x5d0(%rbp)
jmp 0x3c9b
movq -0x5d0(%rbp), %rax
movq %rax, -0x150(%rbp)
jmp 0x3bed
movq -0x138(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2390
movq %rax, -0x5e0(%rbp)
jmp 0x3cc7
movq -0x5e0(%rbp), %rax
movsbl (%rax), %esi
leaq 0xc3e9(%rip), %rdi      # 0x100c1
callq 0x2080
cmpq $0x0, %rax
je 0x3cef
movl $0x2, -0x34(%rbp)
jmp 0x4604
movq -0x138(%rbp), %rdi
callq 0x2320
testb $0x1, %al
jne 0x3d01
jmp 0x3d0d
movl $0x2, -0x34(%rbp)
jmp 0x4604
movl $0x0, -0x154(%rbp)
movl $0x0, -0x158(%rbp)
movl $0x0, -0x15c(%rbp)
movq -0x138(%rbp), %rdi
leaq 0xc38b(%rip), %rsi      # 0x100c4
xorl %eax, %eax
leaq -0x154(%rbp), %rdx
leaq -0x158(%rbp), %rcx
leaq -0x15c(%rbp), %r8
callq 0x7990
movl %eax, -0x5e4(%rbp)
jmp 0x3d5d
movl -0x5e4(%rbp), %eax
cmpl $0x3, %eax
jne 0x3db0
movss -0x154(%rbp), %xmm0
movss -0x158(%rbp), %xmm1
movaps 0xc2a1(%rip), %xmm3     # 0x10020
movss -0x15c(%rbp), %xmm2
pxor %xmm3, %xmm2
leaq -0x168(%rbp), %rdi
callq 0x7a70
jmp 0x3d99
leaq -0x50(%rbp), %rdi
leaq -0x168(%rbp), %rsi
callq 0x7a40
jmp 0x3dab
jmp 0x45fd
movq -0x138(%rbp), %rdi
leaq 0xc311(%rip), %rsi      # 0x100cf
xorl %eax, %eax
leaq -0x154(%rbp), %rdx
leaq -0x158(%rbp), %rcx
leaq -0x15c(%rbp), %r8
callq 0x7990
movl %eax, -0x5e8(%rbp)
jmp 0x3de2
movl -0x5e8(%rbp), %eax
cmpl $0x3, %eax
jne 0x3e39
movss -0x154(%rbp), %xmm0
movaps 0xc224(%rip), %xmm2     # 0x10020
pxor %xmm2, %xmm0
movss -0x158(%rbp), %xmm1
pxor %xmm2, %xmm1
movss -0x15c(%rbp), %xmm2
leaq -0x174(%rbp), %rdi
callq 0x7a70
jmp 0x3e22
leaq -0x68(%rbp), %rdi
leaq -0x174(%rbp), %rsi
callq 0x7a40
jmp 0x3e34
jmp 0x45fb
movq -0x138(%rbp), %rdi
leaq 0xc294(%rip), %rsi      # 0x100db
xorl %eax, %eax
leaq -0x154(%rbp), %rdx
leaq -0x158(%rbp), %rcx
callq 0x7990
movl %eax, -0x5ec(%rbp)
jmp 0x3e64
movl -0x5ec(%rbp), %eax
cmpl $0x2, %eax
jne 0x3eb3
movss -0x154(%rbp), %xmm0
movss -0x158(%rbp), %xmm2
movss 0xc185(%rip), %xmm1     # 0x1000c
subss %xmm2, %xmm1
leaq -0x180(%rbp), %rdi
xorps %xmm2, %xmm2
callq 0x7a70
jmp 0x3e9c
leaq -0x80(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x7a40
jmp 0x3eae
jmp 0x45f9
movq -0x138(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2390
movq %rax, -0x5f8(%rbp)
jmp 0x3ecc
movq -0x5f8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x67, %eax
jne 0x3ef2
movq -0xf8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf8(%rbp)
jmp 0x45f7
movq -0x138(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2390
movq %rax, -0x600(%rbp)
jmp 0x3f0b
movq -0x600(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
jne 0x45f5
cmpq $0x0, -0xf8(%rbp)
jne 0x45f5
leaq -0x198(%rbp), %rdi
callq 0x7020
leaq -0x1b0(%rbp), %rdi
callq 0x7020
leaq -0x1c8(%rbp), %rdi
callq 0x7020
movq -0x138(%rbp), %rsi
leaq -0x1e0(%rbp), %rdi
movl $0x20, %edx
callq 0x7ab0
jmp 0x3f6a
movq $0x1, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
movq %rax, -0x608(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x7b00
movq %rax, %rcx
movq -0x608(%rbp), %rax
cmpq %rcx, %rax
jae 0x4432
movl $0x0, -0x1ec(%rbp)
movl $0x0, -0x1f0(%rbp)
movl $0x0, -0x1f4(%rbp)
movq -0x1e8(%rbp), %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x7b20
movq %rax, %rdi
leaq 0xc107(%rip), %rsi      # 0x100e4
xorl %eax, %eax
leaq -0x1ec(%rbp), %rdx
leaq -0x1f4(%rbp), %rcx
leaq -0x1f0(%rbp), %r8
callq 0x7990
movl %eax, -0x60c(%rbp)
jmp 0x4001
movl -0x60c(%rbp), %eax
cmpl $0x3, %eax
jne 0x4166
cmpl $0x0, -0x1ec(%rbp)
jge 0x4038
leaq -0x198(%rbp), %rdi
callq 0x6e30
movslq -0x1ec(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x618(%rbp)
jmp 0x404a
movl -0x1ec(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x618(%rbp)
movq -0x618(%rbp), %rax
movq %rax, -0x200(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0x73b0
jmp 0x406d
cmpl $0x0, -0x1f4(%rbp)
jge 0x4095
leaq -0x1c8(%rbp), %rdi
callq 0x6e30
movslq -0x1f4(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x620(%rbp)
jmp 0x40a7
movl -0x1f4(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x620(%rbp)
movq -0x620(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x208(%rbp), %rsi
callq 0x73b0
jmp 0x40ca
cmpl $0x0, -0x1f0(%rbp)
jge 0x40f2
leaq -0x1b0(%rbp), %rdi
callq 0x6e30
movslq -0x1f0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x628(%rbp)
jmp 0x4104
movl -0x1f0(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x628(%rbp)
movq -0x628(%rbp), %rax
movq %rax, -0x210(%rbp)
leaq -0x1b0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x73b0
jmp 0x4127
jmp 0x4419
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
jmp 0x45cf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x1e0(%rbp), %rdi
callq 0x7bd0
jmp 0x45cf
movq -0x1e8(%rbp), %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x7b20
movq %rax, %rdi
leaq 0xbf6a(%rip), %rsi      # 0x100ed
xorl %eax, %eax
leaq -0x1ec(%rbp), %rdx
leaq -0x1f0(%rbp), %rcx
callq 0x7990
movl %eax, -0x62c(%rbp)
jmp 0x41a0
movl -0x62c(%rbp), %eax
cmpl $0x2, %eax
jne 0x426e
cmpl $0x0, -0x1ec(%rbp)
jge 0x41d7
leaq -0x198(%rbp), %rdi
callq 0x6e30
movslq -0x1ec(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x638(%rbp)
jmp 0x41e9
movl -0x1ec(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x638(%rbp)
movq -0x638(%rbp), %rax
movq %rax, -0x218(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0x73b0
jmp 0x420c
cmpl $0x0, -0x1f0(%rbp)
jge 0x4234
leaq -0x1b0(%rbp), %rdi
callq 0x6e30
movslq -0x1f0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x640(%rbp)
jmp 0x4246
movl -0x1f0(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x640(%rbp)
movq -0x640(%rbp), %rax
movq %rax, -0x220(%rbp)
leaq -0x1b0(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x73b0
jmp 0x4269
jmp 0x4417
movq -0x1e8(%rbp), %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x7b20
movq %rax, %rdi
leaq 0xbe5c(%rip), %rsi      # 0x100e7
xorl %eax, %eax
leaq -0x1ec(%rbp), %rdx
leaq -0x1f4(%rbp), %rcx
callq 0x7990
movl %eax, -0x644(%rbp)
jmp 0x42a8
movl -0x644(%rbp), %eax
cmpl $0x2, %eax
jne 0x4376
cmpl $0x0, -0x1ec(%rbp)
jge 0x42df
leaq -0x198(%rbp), %rdi
callq 0x6e30
movslq -0x1ec(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x650(%rbp)
jmp 0x42f1
movl -0x1ec(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x650(%rbp)
movq -0x650(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x228(%rbp), %rsi
callq 0x73b0
jmp 0x4314
cmpl $0x0, -0x1f4(%rbp)
jge 0x433c
leaq -0x1c8(%rbp), %rdi
callq 0x6e30
movslq -0x1f4(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x658(%rbp)
jmp 0x434e
movl -0x1f4(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x658(%rbp)
movq -0x658(%rbp), %rax
movq %rax, -0x230(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x73b0
jmp 0x4371
jmp 0x4415
movq -0x1e8(%rbp), %rsi
leaq -0x1e0(%rbp), %rdi
callq 0x7b20
movq %rax, %rdi
leaq 0xbd5e(%rip), %rsi      # 0x100f1
xorl %eax, %eax
leaq -0x1ec(%rbp), %rdx
callq 0x7990
movl %eax, -0x65c(%rbp)
jmp 0x43a9
movl -0x65c(%rbp), %eax
cmpl $0x1, %eax
jne 0x4413
cmpl $0x0, -0x1ec(%rbp)
jge 0x43dc
leaq -0x198(%rbp), %rdi
callq 0x6e30
movslq -0x1ec(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x668(%rbp)
jmp 0x43ee
movl -0x1ec(%rbp), %eax
subl $0x1, %eax
cltq
movq %rax, -0x668(%rbp)
movq -0x668(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x73b0
jmp 0x4411
jmp 0x4413
jmp 0x4415
jmp 0x4417
jmp 0x4419
jmp 0x441b
movq -0x1e8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1e8(%rbp)
jmp 0x3f75
movq $0x1, -0x240(%rbp)
movq -0x240(%rbp), %rax
movq %rax, -0x670(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x6e30
movq %rax, %rcx
movq -0x670(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x459d
movq -0x5a8(%rbp), %rdi
callq 0x6e30
movq -0x5a8(%rbp), %rdi
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rsi
addq $0x3, %rsi
callq 0x7b40
jmp 0x449a
movq -0x5a8(%rbp), %rdi
leaq -0x198(%rbp), %rax
movq %rax, -0x270(%rbp)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x268(%rbp)
leaq -0x1c8(%rbp), %rax
movq %rax, -0x260(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0x258(%rbp)
leaq -0xf0(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x248(%rbp), %rsi
callq 0x6e50
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
leaq -0x270(%rbp), %rdi
callq 0x4a60
jmp 0x4508
movq -0x5a8(%rbp), %rdi
movq -0x240(%rbp), %rax
movq %rax, -0x678(%rbp)
movq -0x248(%rbp), %rsi
incq %rsi
callq 0x6e50
movq -0x678(%rbp), %rsi
movq %rax, %rdx
leaq -0x270(%rbp), %rdi
callq 0x4a60
jmp 0x4544
movq -0x5a8(%rbp), %rdi
movq -0x240(%rbp), %rax
incq %rax
movq %rax, -0x680(%rbp)
movq -0x248(%rbp), %rsi
addq $0x2, %rsi
callq 0x6e50
movq -0x680(%rbp), %rsi
movq %rax, %rdx
leaq -0x270(%rbp), %rdi
callq 0x4a60
jmp 0x4584
jmp 0x4586
movq -0x240(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x240(%rbp)
jmp 0x443d
leaq -0x1e0(%rbp), %rdi
callq 0x7bd0
leaq -0x1c8(%rbp), %rdi
callq 0x7160
leaq -0x1b0(%rbp), %rdi
callq 0x7160
leaq -0x198(%rbp), %rdi
callq 0x7160
jmp 0x45f5
leaq -0x1c8(%rbp), %rdi
callq 0x7160
leaq -0x1b0(%rbp), %rdi
callq 0x7160
leaq -0x198(%rbp), %rdi
callq 0x7160
jmp 0x4637
jmp 0x45f7
jmp 0x45f9
jmp 0x45fb
jmp 0x45fd
movl $0x0, -0x34(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x7c30
movl -0x34(%rbp), %eax
movl %eax, -0x684(%rbp)
testl %eax, %eax
je 0x4632
jmp 0x461f
movl -0x684(%rbp), %eax
subl $0x2, %eax
je 0x3b5e
jmp 0x4630
jmp 0x4648
jmp 0x3b5e
leaq -0x120(%rbp), %rdi
callq 0x7c30
jmp 0x49eb
movq -0x5a8(%rbp), %rdi
addq $0x18, %rdi
movq -0xf0(%rbp), %rsi
callq 0x7c60
jmp 0x4661
movq -0x5a8(%rbp), %rdi
addq $0x30, %rdi
movq -0xf0(%rbp), %rsi
callq 0x7c60
jmp 0x467a
movq -0x5a8(%rbp), %rdi
addq $0x48, %rdi
movq -0xf0(%rbp), %rsi
callq 0x7c60
jmp 0x4693
leaq -0xe8(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rdi
callq 0x7cf0
movq %rax, -0x280(%rbp)
movq -0x278(%rbp), %rdi
callq 0x7d20
movq %rax, -0x288(%rbp)
leaq -0x280(%rbp), %rdi
leaq -0x288(%rbp), %rsi
callq 0x7d50
testb $0x1, %al
jne 0x46e3
jmp 0x481e
leaq -0x280(%rbp), %rdi
callq 0x7d80
movq %rax, -0x290(%rbp)
movq -0x290(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x290(%rbp), %rax
addq $0x18, %rax
movq %rax, -0x2a0(%rbp)
movq -0x298(%rbp), %rax
movq (%rax), %rsi
leaq -0x50(%rbp), %rdi
callq 0x7db0
movq -0x5a8(%rbp), %rdi
movq %rax, -0x690(%rbp)
addq $0x18, %rdi
movq -0x2a0(%rbp), %rax
movq (%rax), %rsi
callq 0x7db0
movq -0x690(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
leaq -0x68(%rbp), %rdi
callq 0x7dd0
cmpq $0x0, %rax
je 0x47b4
movq -0x298(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x68(%rbp), %rdi
callq 0x7db0
movq -0x5a8(%rbp), %rdi
movq %rax, -0x698(%rbp)
addq $0x30, %rdi
movq -0x2a0(%rbp), %rax
movq (%rax), %rsi
callq 0x7db0
movq -0x698(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
leaq -0x80(%rbp), %rdi
callq 0x7dd0
cmpq $0x0, %rax
je 0x480b
movq -0x298(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x80(%rbp), %rdi
callq 0x7db0
movq -0x5a8(%rbp), %rdi
movq %rax, -0x6a0(%rbp)
addq $0x48, %rdi
movq -0x2a0(%rbp), %rax
movq (%rax), %rsi
callq 0x7db0
movq -0x6a0(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rax)
jmp 0x480d
leaq -0x280(%rbp), %rdi
callq 0x7e00
jmp 0x46c7
leaq -0x3e8(%rbp), %rdi
callq 0x2ca0
jmp 0x482c
leaq -0x598(%rbp), %rdi
callq 0x2cc0
jmp 0x483a
movq -0x5a8(%rbp), %rsi
leaq -0x598(%rbp), %rdi
callq 0x2d70
jmp 0x484f
movq $0x0, -0x5a0(%rbp)
movq -0x5a8(%rbp), %rdi
movq -0x5a0(%rbp), %rax
movq %rax, -0x6a8(%rbp)
callq 0x6e30
movq %rax, %rcx
movq -0x6a8(%rbp), %rax
cmpq %rcx, %rax
jae 0x4901
movq -0x5a8(%rbp), %rdi
movq -0x5a0(%rbp), %rsi
callq 0x6e50
movq -0x5a8(%rbp), %rdi
movq %rax, -0x6b0(%rbp)
movq -0x5a0(%rbp), %rsi
addq $0x2, %rsi
callq 0x6e50
movq -0x6b0(%rbp), %rdi
movq %rax, %rsi
callq 0x7e30
jmp 0x48c5
jmp 0x48c7
movq -0x5a0(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x5a0(%rbp)
jmp 0x485a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x128(%rbp)
movl %eax, -0x12c(%rbp)
leaq -0x598(%rbp), %rdi
callq 0x7f10
jmp 0x49eb
movq -0x5a8(%rbp), %rdi
addq $0x60, %rdi
movq -0xf0(%rbp), %rsi
callq 0x7c60
jmp 0x491a
movq -0x5a8(%rbp), %rdi
addq $0x78, %rdi
movq -0xf0(%rbp), %rsi
callq 0x7e80
jmp 0x4933
movq -0x5a8(%rbp), %rcx
movq %rcx, %rdi
addq $0x18, %rdi
movq %rcx, %rsi
addq $0x48, %rsi
movq %rcx, %rdx
addq $0x30, %rdx
movq %rcx, %r8
addq $0x60, %r8
movq %rcx, %r9
addq $0x78, %r9
callq 0x4b80
jmp 0x4964
movq -0x5a8(%rbp), %rsi
leaq -0x3e8(%rbp), %rdi
callq 0x2bf0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
leaq -0x598(%rbp), %rdi
callq 0x3a90
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
movl $0x1, -0x34(%rbp)
leaq -0x598(%rbp), %rdi
callq 0x7f10
leaq -0xe8(%rbp), %rdi
callq 0x7f60
leaq -0xb0(%rbp), %rdi
callq 0x7f80
leaq -0x98(%rbp), %rdi
callq 0x7fe0
leaq -0x80(%rbp), %rdi
callq 0x7fe0
leaq -0x68(%rbp), %rdi
callq 0x7fe0
leaq -0x50(%rbp), %rdi
callq 0x7fe0
jmp 0x4a35
leaq -0xe8(%rbp), %rdi
callq 0x7f60
leaq -0xb0(%rbp), %rdi
callq 0x7f80
leaq -0x98(%rbp), %rdi
callq 0x7fe0
leaq -0x80(%rbp), %rdi
callq 0x7fe0
leaq -0x68(%rbp), %rdi
callq 0x7fe0
leaq -0x50(%rbp), %rdi
callq 0x7fe0
leaq -0x30(%rbp), %rdi
callq 0x24e0
jmp 0x4a4c
leaq -0x30(%rbp), %rdi
callq 0x24e0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x6b0, %rsp            # imm = 0x6B0
popq %rbp
retq
movq -0x128(%rbp), %rdi
callq 0x2330
nopl (%rax,%rax)