// File: /workspace/github_cpp_makefile_star2_O1/ChaohuiYu[P]BPlusTree/parser.cpp
// Function: parseCommands(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void parseCommands(const std::string& filename) {
    ifstream infile(filename);
    string line, command, relationName, keyType, index, record, index1, index2, pageId;
    int recordLength = 0;
    std::vector<std::string> commandVector, commandVectorSections;

    while(getline(infile, line)) {
        stringstream lineStream(line);

        // parse the first token as action
        if (!getline(lineStream, command, ' ')) {
            // D(cerr << "invalid command: empty\n");
            continue;
        }

        // call different functions depending on command
        if (command == "R,") {
            commandVector = splitStr(line, ", ");
            if (commandVector.size() != 4) {
                cout << "Error: invalid command: " << line << endl;
                cout << "    R command example: R, Chat, integer, 90\n";
                cout << "    R command example: R, Movie, String, 100\n";
                continue;
            }

            try {
                recordLength = std::stoi(commandVector[3]);
            }
            catch (const std::exception& e) {
                cout << "Error: invalid command: " << line << endl;
                cout << "    record length should be an integer\n";
                continue;
            }
            relationName = commandVector[1];
            keyType = commandVector[2];

            createRelation(relationName, keyType, recordLength);
        }
        else if (command == "I,") {
            commandVectorSections = splitStr(line, "; ");

            if (commandVectorSections.size() == 0) {
                cout << "Error: invalid command: " << line << endl;
                cout << "    I command example: I, Movie, \"nkpgrtxphreddb\", \"xnrmnw osiy\"\n";
                continue;
            }

            // handle the first command
            commandVector = splitStr(commandVectorSections[0], ", ");
            if (commandVector.size() != 4) {
                cout << "Error: invalid command: " << line << endl;
                cout << "    I command example: I, Movie, \"nkpgrtxphred\", \"xnrmnw osiy\"\n";
                continue;
            }
            relationName = commandVector[1];
            index = commandVector[2];
            record = commandVector[3];

            insertRecord(relationName, index, record);

            // handle the commands after ;
            for (size_t i = 1; i < commandVectorSections.size(); i++) {
                commandVector = splitStr(commandVectorSections[i], ", ");
                if (commandVector.size() != 2) {
                    cout << "Error: invalid command: " << line << endl;
                    cout << "    I command example: I, Movie, \"nkpgrtxphred\", \"xnrmnw osiy\"; \"nsildfwefoi\", \"dsdisf sdif3fwe9\"\n";
                    // cout << "Error: invalid command: commandVector.size() != 2 in: " << line << endl;
                    continue;
                }
                index = commandVector[0];
                record = commandVector[1];
                insertRecord(relationName, index, record);
            }
        }
        else if (command == "D,") {
            commandVector = splitStr(line, ", ");
            if (commandVector.size() != 3) {
                cout << "Error: invalid command: " << line << endl;
                cout << "    D command example: D, Chat, 282\n";
                continue;
            }

            relationName = commandVector[1];
            index = commandVector[2];
            deleteRecord(relationName, index);
        }
        else if (command == "Scan") {
            commandVector = splitStr(line, " ");
            if (commandVector.size() != 2) {
                cout << "Error: invalid command: " << line << endl;
                cout << "    Scan command example: Scan Chat\n";
                continue;
            }

            relationName = commandVector[1];
            scanRelation(relationName);
        }
        else if (command == "q") {
            commandVector = splitStr(line, " ");
            if (commandVector.size() < 3 or commandVector.size() > 4) {
                cout << "Error: invalid command: " << line << endl;
                cout << "    q command example: q Chat 81\n";
                cout << "    q command example: q Chat 81 123\n";
                continue;
            }

            if (commandVector.size() == 3) {
                relationName = commandVector[1];
                index = commandVector[2];
                queryRecord(relationName, index);
            }
            if (commandVector.size() == 4) {
                relationName = commandVector[1];
                index1 = commandVector[2];
                index2 = commandVector[3];
                rangeQueryRecords(relationName, index1, index2);
            }
        }
        else if (command == "p") {
            commandVector = splitStr(line, " ");
            if (commandVector.size() != 3) {
                cout << "Error: invalid command: " << line << endl;
                cout << "    p command example: p Chat 1\n";
                continue;
            }
            relationName = commandVector[1];
            pageId = commandVector[2];
            displayPage(relationName, pageId);
        }
        else if (command == "c") {
            commandVector = splitStr(line, " ");
            if (commandVector.size() != 2) {
                cout << "Error: invalid command: " << line << endl;
                cout << "    c command example: c Chat\n";
                continue;
            }

            relationName = commandVector[1];
            statisticsRelation(relationName);
        }
        else {
            cout << "Error: invalid command: " << line << endl;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x658, %rsp            # imm = 0x658
movq %rdi, %rsi
leaq 0x450(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x2290
leaq 0x80(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x2b8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xa0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x298(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xd8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0xf8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x278(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x258(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x238(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq %rax, 0xc0(%rsp)
movaps %xmm0, 0xb0(%rsp)
leaq 0x70(%rsp), %r14
leaq 0x2c8(%rsp), %r13
movq 0x450(%rsp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2300
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3c12
movq %r13, %rdi
movq %r14, %rsi
movl $0x18, %edx
callq 0x2280
movq %r13, %r12
movq %r13, %rdi
leaq 0x2a8(%rsp), %rsi
movl $0x20, %edx
callq 0x2300
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3b52
leaq 0x2a8(%rsp), %r14
movq %r14, %rdi
leaq 0x86a9(%rip), %rsi      # 0xb060
callq 0x20b0
testl %eax, %eax
je 0x2aab
movq %r14, %rdi
leaq 0x8734(%rip), %rsi      # 0xb102
callq 0x20b0
testl %eax, %eax
je 0x2c57
movq %r14, %rdi
leaq 0x8808(%rip), %rsi      # 0xb1ed
callq 0x20b0
testl %eax, %eax
je 0x3171
movq %r14, %rdi
leaq 0x8819(%rip), %rsi      # 0xb215
callq 0x20b0
testl %eax, %eax
je 0x32c2
movq %r14, %rdi
leaq 0x882c(%rip), %rsi      # 0xb23f
callq 0x20b0
testl %eax, %eax
je 0x3534
movq %r14, %rdi
leaq 0x885f(%rip), %rsi      # 0xb289
callq 0x20b0
testl %eax, %eax
je 0x373c
movq %r14, %rdi
leaq 0x886b(%rip), %rsi      # 0xb2ac
callq 0x20b0
testl %eax, %eax
je 0x3943
movl $0x18, %edx
movq 0xd576(%rip), %rdi      # 0xffd0
leaq 0x8605(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xd559(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
jmp 0x3b52
leaq 0x218(%rsp), %rax
movq %rax, 0x208(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x208(%rsp), %r14
movq %r14, %rdi
callq 0x42ae
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %r13
movq %r13, %rdi
leaq 0x8572(%rip), %rsi      # 0xb063
leaq 0x856d(%rip), %rdx      # 0xb065
callq 0x2692
leaq 0x58(%rsp), %rbp
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x2724
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movups 0x58(%rsp), %xmm1
movaps %xmm1, (%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movups %xmm1, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4248
movq %rbp, %rdi
callq 0x4248
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2b7f
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x208(%rsp), %rdi
leaq 0x218(%rsp), %rax
cmpq %rax, %rdi
je 0x2ba4
movq 0x218(%rsp), %rsi
incq %rsi
callq 0x21e0
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
cmpq $0x80, %rcx
jne 0x30ef
movq 0x60(%rax), %r13
callq 0x2060
movq %rax, %r14
movl (%rax), %r15d
movl $0x0, (%rax)
movq %r13, %rdi
leaq 0x20(%rsp), %rsi
movl $0xa, %edx
callq 0x2240
cmpq %r13, 0x20(%rsp)
je 0x3b7b
movq %rax, %rbp
movslq %ebp, %rax
cmpq %rbp, %rax
jne 0x3b8c
movl (%r14), %eax
cmpl $0x22, %eax
je 0x3b8c
testl %eax, %eax
jne 0x2c11
movl %r15d, (%r14)
movq (%rsp), %rsi
addq $0x20, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2110
movq (%rsp), %rsi
addq $0x40, %rsi
leaq 0x288(%rsp), %rdi
callq 0x2110
leaq 0x90(%rsp), %rdi
leaq 0x288(%rsp), %rsi
movl %ebp, %edx
callq 0x4584
jmp 0x3b52
leaq 0x1f8(%rsp), %rax
movq %rax, 0x1e8(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x1e8(%rsp), %rdi
callq 0x42ae
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x846b(%rip), %rsi      # 0xb105
leaq 0x8466(%rip), %rdx      # 0xb107
callq 0x2692
leaq 0x58(%rsp), %r13
movq %r13, %rdi
leaq 0x1e8(%rsp), %rsi
movq %r14, %rdx
callq 0x2724
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps 0xb0(%rsp), %xmm0
movq 0xc0(%rsp), %rax
movups 0x58(%rsp), %xmm1
movaps %xmm1, 0xb0(%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0xc0(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movups %xmm1, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4248
movq %r13, %rdi
callq 0x4248
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2d3b
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
cmpq %rax, %rdi
je 0x2d60
movq 0x1f8(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0xb0(%rsp), %rax
cmpq %rax, 0xb8(%rsp)
je 0x33f6
leaq 0x1d8(%rsp), %rcx
movq %rcx, 0x1c8(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x1c8(%rsp), %rdi
callq 0x42ae
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x82ad(%rip), %rsi      # 0xb063
leaq 0x82a8(%rip), %rdx      # 0xb065
callq 0x2692
leaq 0x58(%rsp), %r13
movq %r13, %rdi
leaq 0x1c8(%rsp), %rsi
movq %r14, %rdx
callq 0x2724
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movups 0x58(%rsp), %xmm1
movaps %xmm1, (%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movups %xmm1, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4248
movq %r13, %rdi
callq 0x4248
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2e49
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
je 0x2e6e
movq 0x1d8(%rsp), %rsi
incq %rsi
callq 0x21e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x80, %rax
jne 0x34ca
addq $0x20, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2110
movq (%rsp), %rsi
addq $0x40, %rsi
leaq 0xc8(%rsp), %rdi
callq 0x2110
movq (%rsp), %rsi
addq $0x60, %rsi
leaq 0xe8(%rsp), %rdi
callq 0x2110
leaq 0x90(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x48d5
movq 0xb0(%rsp), %rax
movq 0xb8(%rsp), %rcx
subq %rax, %rcx
cmpq $0x21, %rcx
jb 0x3b52
movl $0x1, %r13d
movl $0x28, %ebp
leaq 0x1b8(%rsp), %rcx
movq %rcx, 0x1a8(%rsp)
movq -0x8(%rax,%rbp), %rsi
movq (%rax,%rbp), %rdx
addq %rsi, %rdx
leaq 0x1a8(%rsp), %rdi
callq 0x42ae
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x811b(%rip), %rsi      # 0xb063
leaq 0x8116(%rip), %rdx      # 0xb065
callq 0x2692
leaq 0x58(%rsp), %r15
movq %r15, %rdi
leaq 0x1a8(%rsp), %rsi
movq %r14, %rdx
callq 0x2724
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movups 0x58(%rsp), %xmm1
movaps %xmm1, (%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movups %xmm1, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4248
movq %r15, %rdi
callq 0x4248
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2fdb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x1a8(%rsp), %rdi
leaq 0x1b8(%rsp), %rax
cmpq %rax, %rdi
je 0x3000
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x21e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jne 0x3053
leaq 0xc8(%rsp), %rdi
callq 0x2110
movq (%rsp), %rsi
addq $0x20, %rsi
leaq 0xe8(%rsp), %rdi
callq 0x2110
leaq 0x90(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x48d5
jmp 0x30c3
movl $0x18, %edx
movq 0xcf71(%rip), %rdi      # 0xffd0
leaq 0x8000(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xcf54(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movl $0x62, %edx
movq 0xcf19(%rip), %rdi      # 0xffd0
leaq 0x80cc(%rip), %rsi      # 0xb18a
callq 0x2220
incq %r13
movq 0xb0(%rsp), %rax
movq 0xb8(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %rbp
cmpq %rcx, %r13
jb 0x2f06
jmp 0x3b52
movl $0x18, %edx
movq 0xced5(%rip), %rdi      # 0xffd0
leaq 0x7f64(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xceb8(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movl $0x2d, %r14d
movl $0x2c, %edx
movq 0xce77(%rip), %rdi      # 0xffd0
leaq 0x7f1f(%rip), %rsi      # 0xb07f
callq 0x2220
leaq 0x7f40(%rip), %rsi      # 0xb0ac
jmp 0x3b43
leaq 0x198(%rsp), %rax
movq %rax, 0x188(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x188(%rsp), %rdi
callq 0x42ae
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x7eaf(%rip), %rsi      # 0xb063
leaq 0x7eaa(%rip), %rdx      # 0xb065
callq 0x2692
leaq 0x58(%rsp), %r15
movq %r15, %rdi
leaq 0x188(%rsp), %rsi
movq %r14, %rdx
callq 0x2724
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movups 0x58(%rsp), %xmm1
movaps %xmm1, (%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movups %xmm1, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4248
movq %r15, %rdi
callq 0x4248
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3247
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x188(%rsp), %rdi
leaq 0x198(%rsp), %rax
cmpq %rax, %rdi
je 0x326c
movq 0x198(%rsp), %rsi
incq %rsi
callq 0x21e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x60, %rax
jne 0x3460
addq $0x20, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2110
movq (%rsp), %rsi
addq $0x40, %rsi
leaq 0xc8(%rsp), %rdi
callq 0x2110
leaq 0x90(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x4cac
jmp 0x3b52
leaq 0x178(%rsp), %rax
movq %rax, 0x168(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x168(%rsp), %rdi
callq 0x42ae
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x8254(%rip), %rsi      # 0xb559
leaq 0x824e(%rip), %rdx      # 0xb55a
callq 0x2692
leaq 0x58(%rsp), %r15
movq %r15, %rdi
leaq 0x168(%rsp), %rsi
movq %r14, %rdx
callq 0x2724
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movups 0x58(%rsp), %xmm1
movaps %xmm1, (%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movups %xmm1, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4248
movq %r15, %rdi
callq 0x4248
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3398
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x168(%rsp), %rdi
leaq 0x178(%rsp), %rax
cmpq %rax, %rdi
je 0x33bd
movq 0x178(%rsp), %rsi
incq %rsi
callq 0x21e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jne 0x36d2
addq $0x20, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2110
leaq 0x90(%rsp), %rdi
callq 0x4eba
jmp 0x3b52
movl $0x18, %edx
movq 0xcbce(%rip), %rdi      # 0xffd0
leaq 0x7c5d(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xcbb1(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movl $0x41, %r14d
movq %rax, %rdi
callq 0x2140
leaq 0x7cad(%rip), %rsi      # 0xb108
jmp 0x3b43
movl $0x18, %edx
movq 0xcb64(%rip), %rdi      # 0xffd0
leaq 0x7bf3(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xcb47(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movl $0x24, %r14d
movq %rax, %rdi
callq 0x2140
leaq 0x7d2b(%rip), %rsi      # 0xb1f0
jmp 0x3b43
movl $0x18, %edx
movq 0xcafa(%rip), %rdi      # 0xffd0
leaq 0x7b89(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xcadd(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movl $0x3f, %r14d
movq %rax, %rdi
callq 0x2140
leaq 0x7c1b(%rip), %rsi      # 0xb14a
jmp 0x3b43
leaq 0x158(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x148(%rsp), %rdi
callq 0x42ae
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x7fe2(%rip), %rsi      # 0xb559
leaq 0x7fdc(%rip), %rdx      # 0xb55a
callq 0x2692
leaq 0x58(%rsp), %r15
movq %r15, %rdi
leaq 0x148(%rsp), %rsi
movq %r14, %rdx
callq 0x2724
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movups 0x58(%rsp), %xmm1
movaps %xmm1, (%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movups %xmm1, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4248
movq %r15, %rdi
callq 0x4248
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x360a
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x362f
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x21e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
movq %rax, %rcx
sarq $0x5, %rcx
addq $-0x5, %rcx
cmpq $-0x3, %rcx
ja 0x388d
movl $0x18, %edx
movq 0xc974(%rip), %rdi      # 0xffd0
leaq 0x7a03(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xc957(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movl $0x25, %r14d
movl $0x21, %edx
movq 0xc916(%rip), %rdi      # 0xffd0
leaq 0x7b80(%rip), %rsi      # 0xb241
callq 0x2220
leaq 0x7b96(%rip), %rsi      # 0xb263
jmp 0x3b43
movl $0x18, %edx
movq 0xc8f2(%rip), %rdi      # 0xffd0
leaq 0x7981(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xc8d5(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movl $0x24, %r14d
movq %rax, %rdi
callq 0x2140
leaq 0x7ae3(%rip), %rsi      # 0xb21a
jmp 0x3b43
leaq 0x138(%rsp), %rax
movq %rax, 0x128(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x128(%rsp), %rdi
callq 0x42ae
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x7dda(%rip), %rsi      # 0xb559
leaq 0x7dd4(%rip), %rdx      # 0xb55a
callq 0x2692
leaq 0x58(%rsp), %r15
movq %r15, %rdi
leaq 0x128(%rsp), %rsi
movq %r14, %rdx
callq 0x2724
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movups 0x58(%rsp), %xmm1
movaps %xmm1, (%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movups %xmm1, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4248
movq %r15, %rdi
callq 0x4248
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3812
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x3837
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x21e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x60, %rax
jne 0x3a77
addq $0x20, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2110
movq (%rsp), %rsi
addq $0x40, %rsi
leaq 0x228(%rsp), %rdi
callq 0x2110
leaq 0x90(%rsp), %rdi
leaq 0x228(%rsp), %rsi
callq 0x54d7
jmp 0x3b52
cmpq $0x60, %rax
jne 0x38ce
addq $0x20, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2110
movq (%rsp), %rsi
addq $0x40, %rsi
leaq 0xc8(%rsp), %rdi
callq 0x2110
leaq 0x90(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
callq 0x4f89
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x80, %rax
jne 0x3b52
addq $0x20, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2110
movq (%rsp), %rsi
addq $0x40, %rsi
leaq 0x268(%rsp), %rdi
callq 0x2110
movq (%rsp), %rsi
addq $0x60, %rsi
leaq 0x248(%rsp), %rdi
callq 0x2110
leaq 0x90(%rsp), %rdi
leaq 0x268(%rsp), %rsi
leaq 0x248(%rsp), %rdx
callq 0x5197
jmp 0x3b52
leaq 0x118(%rsp), %rax
movq %rax, 0x108(%rsp)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x108(%rsp), %rdi
callq 0x42ae
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %r14
movq %r14, %rdi
leaq 0x7bd3(%rip), %rsi      # 0xb559
leaq 0x7bcd(%rip), %rdx      # 0xb55a
callq 0x2692
leaq 0x58(%rsp), %r15
movq %r15, %rdi
leaq 0x108(%rsp), %rsi
movq %r14, %rdx
callq 0x2724
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movaps (%rsp), %xmm0
movq 0x10(%rsp), %rax
movups 0x58(%rsp), %xmm1
movaps %xmm1, (%rsp)
movq 0x68(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movaps 0x40(%rsp), %xmm1
movaps %xmm0, 0x40(%rsp)
movq %rax, 0x50(%rsp)
movups %xmm1, 0x58(%rsp)
movq $0x0, 0x68(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x4248
movq %r15, %rdi
callq 0x4248
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3a19
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x3a3e
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x21e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
cmpq $0x40, %rax
jne 0x3ade
addq $0x20, %rsi
leaq 0x90(%rsp), %rdi
callq 0x2110
leaq 0x90(%rsp), %rdi
callq 0x5683
jmp 0x3b52
movl $0x18, %edx
movq 0xc54d(%rip), %rdi      # 0xffd0
leaq 0x75dc(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xc530(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movl $0x20, %r14d
movq %rax, %rdi
callq 0x2140
leaq 0x77af(%rip), %rsi      # 0xb28b
jmp 0x3b43
movl $0x18, %edx
movq 0xc4e6(%rip), %rdi      # 0xffd0
leaq 0x7575(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xc4c9(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movl $0x1e, %r14d
movq %rax, %rdi
callq 0x2140
leaq 0x776b(%rip), %rsi      # 0xb2ae
movq 0xc486(%rip), %rdi      # 0xffd0
movq %r14, %rdx
callq 0x2220
movq %r12, %r13
movq %r12, %rdi
movq 0xc459(%rip), %rsi      # 0xffb8
callq 0x2170
leaq 0x348(%rsp), %rdi
callq 0x20c0
leaq 0x70(%rsp), %r14
jmp 0x2932
leaq 0x774b(%rip), %rdi      # 0xb2cd
callq 0x2120
jmp 0x3d90
leaq 0x773a(%rip), %rdi      # 0xb2cd
callq 0x2250
jmp 0x3d90
movq %rax, %r13
cmpl $0x0, (%r14)
jne 0x3ba9
movl %r15d, (%r14)
cmpl $0x1, %edx
jne 0x4074
movq %r13, %rdi
callq 0x20e0
movl $0x18, %edx
movq 0xc40a(%rip), %rdi      # 0xffd0
leaq 0x7499(%rip), %rsi      # 0xb066
callq 0x2220
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
movq 0xc3ed(%rip), %rdi      # 0xffd0
callq 0x2220
movq %rax, %rdi
callq 0x20f0
movl $0x27, %edx
movq 0xc3d4(%rip), %rdi      # 0xffd0
leaq 0x74d7(%rip), %rsi      # 0xb0da
callq 0x2220
callq 0x22b0
jmp 0x3b52
leaq 0xb0(%rsp), %rdi
callq 0x4248
movq %rsp, %rdi
callq 0x4248
movq 0x228(%rsp), %rdi
leaq 0x238(%rsp), %rax
cmpq %rax, %rdi
je 0x3c4c
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x248(%rsp), %rdi
leaq 0x258(%rsp), %rax
cmpq %rax, %rdi
je 0x3c71
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x268(%rsp), %rdi
leaq 0x278(%rsp), %rax
cmpq %rax, %rdi
je 0x3c96
movq 0x278(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x3cbb
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x3ce0
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x288(%rsp), %rdi
leaq 0x298(%rsp), %rax
cmpq %rax, %rdi
je 0x3d05
movq 0x298(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x3d2a
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x2a8(%rsp), %rdi
leaq 0x2b8(%rsp), %rax
cmpq %rax, %rdi
je 0x3d4f
movq 0x2b8(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3d71
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0x450(%rsp), %rdi
callq 0x2090
addq $0x658, %rsp            # imm = 0x658
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4071
movq %rax, %r13
callq 0x22b0
jmp 0x4074
movq %rax, %rdi
callq 0x42a3
jmp 0x4071
movq %rax, %r13
jmp 0x3dd3
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3dd3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x4074
movq 0x118(%rsp), %rsi
jmp 0x405e
movq %rax, %r13
jmp 0x3e22
jmp 0x4071
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3e22
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x128(%rsp), %rdi
leaq 0x138(%rsp), %rax
cmpq %rax, %rdi
je 0x4074
movq 0x138(%rsp), %rsi
jmp 0x405e
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3e6c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x3e6c
movq %rax, %r13
movq 0x148(%rsp), %rdi
leaq 0x158(%rsp), %rax
cmpq %rax, %rdi
je 0x4074
movq 0x158(%rsp), %rsi
jmp 0x405e
jmp 0x4071
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3ebb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x3ebb
movq %rax, %r13
movq 0x168(%rsp), %rdi
leaq 0x178(%rsp), %rax
cmpq %rax, %rdi
je 0x4074
movq 0x178(%rsp), %rsi
jmp 0x405e
jmp 0x4071
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3f59
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x3f59
movq %rax, %r13
jmp 0x3f30
jmp 0x4071
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3f30
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x188(%rsp), %rdi
leaq 0x198(%rsp), %rax
cmpq %rax, %rdi
je 0x4074
movq 0x198(%rsp), %rsi
jmp 0x405e
movq %rax, %r13
movq 0x1c8(%rsp), %rdi
leaq 0x1d8(%rsp), %rax
cmpq %rax, %rdi
je 0x4074
movq 0x1d8(%rsp), %rsi
jmp 0x405e
jmp 0x4071
jmp 0x4071
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3fad
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x3fad
movq %rax, %r13
movq 0x1e8(%rsp), %rdi
leaq 0x1f8(%rsp), %rax
cmpq %rax, %rdi
je 0x4074
movq 0x1f8(%rsp), %rsi
jmp 0x405e
jmp 0x4071
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3ffc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x3ffc
movq %rax, %r13
movq 0x208(%rsp), %rdi
leaq 0x218(%rsp), %rax
cmpq %rax, %rdi
je 0x4074
movq 0x218(%rsp), %rsi
jmp 0x405e
jmp 0x4071
movq %rax, %r13
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x4041
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x4041
movq %rax, %r13
movq 0x1a8(%rsp), %rdi
leaq 0x1b8(%rsp), %rax
cmpq %rax, %rdi
je 0x4074
movq 0x1b8(%rsp), %rsi
incq %rsi
callq 0x21e0
jmp 0x4074
jmp 0x406c
jmp 0x4071
movq %rax, %r13
jmp 0x4095
movq %rax, %r13
movq 0xbf3d(%rip), %rsi      # 0xffb8
leaq 0x2c8(%rsp), %rdi
callq 0x2170
leaq 0x348(%rsp), %rdi
callq 0x20c0
leaq 0xb0(%rsp), %rdi
callq 0x4248
movq %rsp, %rdi
callq 0x4248
movq 0x228(%rsp), %rdi
leaq 0x238(%rsp), %rax
cmpq %rax, %rdi
je 0x40cf
movq 0x238(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x248(%rsp), %rdi
leaq 0x258(%rsp), %rax
cmpq %rax, %rdi
je 0x40f4
movq 0x258(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x268(%rsp), %rdi
leaq 0x278(%rsp), %rax
cmpq %rax, %rdi
je 0x4119
movq 0x278(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x413e
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x4163
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x288(%rsp), %rdi
leaq 0x298(%rsp), %rax
cmpq %rax, %rdi
je 0x4188
movq 0x298(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x41ad
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x2a8(%rsp), %rdi
leaq 0x2b8(%rsp), %rax
cmpq %rax, %rdi
je 0x41d2
movq 0x2b8(%rsp), %rsi
incq %rsi
callq 0x21e0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x41f4
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x21e0
leaq 0x450(%rsp), %rdi
callq 0x2090
movq %r13, %rdi
callq 0x22e0
nop