// File: 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
movq %rsp, %rbp
subq $0x9d0, %rsp            # imm = 0x9D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq -0x210(%rbp), %rdi
movl $0x8, %edx
callq 0x33c0
leaq -0x230(%rbp), %rdi
callq 0x3360
leaq -0x250(%rbp), %rdi
callq 0x3360
leaq -0x270(%rbp), %rdi
callq 0x3360
leaq -0x290(%rbp), %rdi
callq 0x3360
leaq -0x2b0(%rbp), %rdi
callq 0x3360
leaq -0x2d0(%rbp), %rdi
callq 0x3360
leaq -0x2f0(%rbp), %rdi
callq 0x3360
leaq -0x310(%rbp), %rdi
callq 0x3360
leaq -0x330(%rbp), %rdi
callq 0x3360
movl $0x0, -0x334(%rbp)
leaq -0x350(%rbp), %rdi
callq 0x53e0
leaq -0x368(%rbp), %rdi
callq 0x53e0
leaq -0x210(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3090
movq %rax, -0x880(%rbp)
jmp 0x3d8e
movq -0x880(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3340
movb %al, -0x881(%rbp)
jmp 0x3dac
movb -0x881(%rbp), %al
testb $0x1, %al
jne 0x3dbb
jmp 0x5294
movl $0x10, %edi
movl $0x8, %esi
callq 0x54d0
movl %eax, -0x888(%rbp)
jmp 0x3dd2
movl -0x888(%rbp), %edx
leaq -0x500(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x33b0
jmp 0x3ded
leaq -0x500(%rbp), %rdi
leaq -0x250(%rbp), %rsi
movl $0x20, %edx
callq 0x3440
movq %rax, -0x890(%rbp)
jmp 0x3e0e
movq -0x890(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x3150
movb %al, -0x891(%rbp)
jmp 0x3e2c
movb -0x891(%rbp), %al
testb $0x1, %al
jne 0x3e38
jmp 0x3e75
movl $0x2, -0x504(%rbp)
jmp 0x5261
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x532d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x5283
leaq 0x121c6(%rip), %rsi     # 0x16042
leaq -0x250(%rbp), %rdi
callq 0x54f0
movb %al, -0x892(%rbp)
jmp 0x3e90
movb -0x892(%rbp), %al
testb $0x1, %al
jne 0x3e9f
jmp 0x419a
leaq -0x540(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3120
jmp 0x3eb4
leaq -0x561(%rbp), %rdi
movq %rdi, -0x8a0(%rbp)
callq 0x3420
movq -0x8a0(%rbp), %rdx
leaq 0x12170(%rip), %rsi     # 0x16045
leaq -0x560(%rbp), %rdi
callq 0x3810
jmp 0x3ee3
leaq -0x520(%rbp), %rdi
leaq -0x540(%rbp), %rsi
leaq -0x560(%rbp), %rdx
callq 0x3b60
jmp 0x3eff
leaq -0x350(%rbp), %rdi
leaq -0x520(%rbp), %rsi
callq 0x5520
leaq -0x520(%rbp), %rdi
callq 0x5470
leaq -0x560(%rbp), %rdi
callq 0x3190
leaq -0x561(%rbp), %rdi
callq 0x32f0
leaq -0x540(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x4, %rax
je 0x402d
movq 0x1c069(%rip), %rdi     # 0x1ffc8
leaq 0x120e2(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x8a8(%rbp)
jmp 0x3f74
movq -0x8a8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x8b0(%rbp)
jmp 0x3f90
movq -0x8b0(%rbp), %rdi
movq 0x1c01a(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x3fa5
movq 0x1c01c(%rip), %rdi     # 0x1ffc8
leaq 0x120ae(%rip), %rsi     # 0x16061
callq 0x3280
jmp 0x3fba
movq 0x1c007(%rip), %rdi     # 0x1ffc8
leaq 0x120c6(%rip), %rsi     # 0x1608e
callq 0x3280
jmp 0x3fcf
movl $0x2, -0x504(%rbp)
jmp 0x5261
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x4010
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
leaq -0x560(%rbp), %rdi
callq 0x3190
leaq -0x561(%rbp), %rdi
callq 0x32f0
leaq -0x540(%rbp), %rdi
callq 0x3190
jmp 0x5283
leaq -0x350(%rbp), %rdi
movl $0x3, %esi
callq 0x55b0
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x5570
movl %eax, -0x8b4(%rbp)
jmp 0x4057
movl -0x8b4(%rbp), %eax
movl %eax, -0x334(%rbp)
jmp 0x4136
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
movl -0x374(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x5283
movq -0x370(%rbp), %rdi
callq 0x3100
movq %rax, -0x570(%rbp)
movq 0x1bf21(%rip), %rdi     # 0x1ffc8
leaq 0x11f9a(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x8c0(%rbp)
jmp 0x40bc
movq -0x8c0(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x8c8(%rbp)
jmp 0x40d8
movq -0x8c8(%rbp), %rdi
movq 0x1bed2(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x40ed
movq 0x1bed4(%rip), %rdi     # 0x1ffc8
leaq 0x11fc1(%rip), %rsi     # 0x160bc
callq 0x3280
jmp 0x4102
movl $0x2, -0x504(%rbp)
callq 0x33e0
jmp 0x412c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
callq 0x33e0
jmp 0x4131
jmp 0x5261
jmp 0x5283
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
callq 0x3050
jmp 0x4158
leaq -0x350(%rbp), %rdi
movl $0x2, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x290(%rbp), %rdi
callq 0x3050
jmp 0x417a
movl -0x334(%rbp), %edx
leaq -0x270(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x6550
jmp 0x4195
jmp 0x5257
leaq 0x11f43(%rip), %rsi     # 0x160e4
leaq -0x250(%rbp), %rdi
callq 0x54f0
movb %al, -0x8c9(%rbp)
jmp 0x41b5
movb -0x8c9(%rbp), %al
testb $0x1, %al
jne 0x41c4
jmp 0x4777
leaq -0x5a8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3120
jmp 0x41d9
leaq -0x5c9(%rbp), %rdi
movq %rdi, -0x8d8(%rbp)
callq 0x3420
movq -0x8d8(%rbp), %rdx
leaq 0x11eed(%rip), %rsi     # 0x160e7
leaq -0x5c8(%rbp), %rdi
callq 0x3810
jmp 0x4208
leaq -0x588(%rbp), %rdi
leaq -0x5a8(%rbp), %rsi
leaq -0x5c8(%rbp), %rdx
callq 0x3b60
jmp 0x4224
leaq -0x368(%rbp), %rdi
leaq -0x588(%rbp), %rsi
callq 0x5520
leaq -0x588(%rbp), %rdi
callq 0x5470
leaq -0x5c8(%rbp), %rdi
callq 0x3190
leaq -0x5c9(%rbp), %rdi
callq 0x32f0
leaq -0x5a8(%rbp), %rdi
callq 0x3190
leaq -0x368(%rbp), %rdi
callq 0x5550
cmpq $0x0, %rax
jne 0x433d
movq 0x1bd44(%rip), %rdi     # 0x1ffc8
leaq 0x11dbd(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x8e0(%rbp)
jmp 0x4299
movq -0x8e0(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x8e8(%rbp)
jmp 0x42b5
movq -0x8e8(%rbp), %rdi
movq 0x1bcf5(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x42ca
movq 0x1bcf7(%rip), %rdi     # 0x1ffc8
leaq 0x11e12(%rip), %rsi     # 0x160ea
callq 0x3280
jmp 0x42df
movl $0x2, -0x504(%rbp)
jmp 0x5261
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x4320
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
leaq -0x5c8(%rbp), %rdi
callq 0x3190
leaq -0x5c9(%rbp), %rdi
callq 0x32f0
leaq -0x5a8(%rbp), %rdi
callq 0x3190
jmp 0x5283
xorl %eax, %eax
movl %eax, %esi
leaq -0x368(%rbp), %rdi
callq 0x55b0
movq %rax, %rsi
leaq -0x608(%rbp), %rdi
callq 0x3120
jmp 0x435e
leaq -0x629(%rbp), %rdi
movq %rdi, -0x8f0(%rbp)
callq 0x3420
movq -0x8f0(%rbp), %rdx
leaq 0x11cc6(%rip), %rsi     # 0x16045
leaq -0x628(%rbp), %rdi
callq 0x3810
jmp 0x438d
leaq -0x5e8(%rbp), %rdi
leaq -0x608(%rbp), %rsi
leaq -0x628(%rbp), %rdx
callq 0x3b60
jmp 0x43a9
leaq -0x350(%rbp), %rdi
leaq -0x5e8(%rbp), %rsi
callq 0x5520
leaq -0x5e8(%rbp), %rdi
callq 0x5470
leaq -0x628(%rbp), %rdi
callq 0x3190
leaq -0x629(%rbp), %rdi
callq 0x32f0
leaq -0x608(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x4, %rax
je 0x44c2
movq 0x1bbbf(%rip), %rdi     # 0x1ffc8
leaq 0x11c38(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x8f8(%rbp)
jmp 0x441e
movq -0x8f8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x900(%rbp)
jmp 0x443a
movq -0x900(%rbp), %rdi
movq 0x1bb70(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x444f
movq 0x1bb72(%rip), %rdi     # 0x1ffc8
leaq 0x11ccf(%rip), %rsi     # 0x1612c
callq 0x3280
jmp 0x4464
movl $0x2, -0x504(%rbp)
jmp 0x5261
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x44a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
leaq -0x628(%rbp), %rdi
callq 0x3190
leaq -0x629(%rbp), %rdi
callq 0x32f0
leaq -0x608(%rbp), %rdi
callq 0x3190
jmp 0x5283
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
callq 0x3050
jmp 0x44e4
leaq -0x350(%rbp), %rdi
movl $0x2, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x2b0(%rbp), %rdi
callq 0x3050
jmp 0x4506
leaq -0x350(%rbp), %rdi
movl $0x3, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x2d0(%rbp), %rdi
callq 0x3050
jmp 0x4528
leaq -0x270(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
leaq -0x2d0(%rbp), %rdx
callq 0x6980
jmp 0x4544
movq $0x1, -0x638(%rbp)
movq -0x638(%rbp), %rax
movq %rax, -0x908(%rbp)
leaq -0x368(%rbp), %rdi
callq 0x5550
movq %rax, %rcx
movq -0x908(%rbp), %rax
cmpq %rcx, %rax
jae 0x4772
movq -0x638(%rbp), %rsi
leaq -0x368(%rbp), %rdi
callq 0x55b0
movq %rax, %rsi
leaq -0x670(%rbp), %rdi
callq 0x3120
jmp 0x45a0
leaq -0x691(%rbp), %rdi
movq %rdi, -0x910(%rbp)
callq 0x3420
movq -0x910(%rbp), %rdx
leaq 0x11a84(%rip), %rsi     # 0x16045
leaq -0x690(%rbp), %rdi
callq 0x3810
jmp 0x45cf
leaq -0x650(%rbp), %rdi
leaq -0x670(%rbp), %rsi
leaq -0x690(%rbp), %rdx
callq 0x3b60
jmp 0x45eb
leaq -0x350(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0x5520
leaq -0x650(%rbp), %rdi
callq 0x5470
leaq -0x690(%rbp), %rdi
callq 0x3190
leaq -0x691(%rbp), %rdi
callq 0x32f0
leaq -0x670(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x2, %rax
je 0x46fa
movq 0x1b97d(%rip), %rdi     # 0x1ffc8
leaq 0x119f6(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x918(%rbp)
jmp 0x4660
movq -0x918(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x920(%rbp)
jmp 0x467c
movq -0x920(%rbp), %rdi
movq 0x1b92e(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x4691
movq 0x1b930(%rip), %rdi     # 0x1ffc8
leaq 0x11acd(%rip), %rsi     # 0x1616c
callq 0x3280
jmp 0x46a6
jmp 0x475b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x46dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
leaq -0x690(%rbp), %rdi
callq 0x3190
leaq -0x691(%rbp), %rdi
callq 0x32f0
leaq -0x670(%rbp), %rdi
callq 0x3190
jmp 0x5283
xorl %eax, %eax
movl %eax, %esi
leaq -0x350(%rbp), %rdi
callq 0x55b0
movq %rax, %rsi
leaq -0x2b0(%rbp), %rdi
callq 0x3050
jmp 0x471b
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x2d0(%rbp), %rdi
callq 0x3050
jmp 0x473d
leaq -0x270(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
leaq -0x2d0(%rbp), %rdx
callq 0x6980
jmp 0x4759
jmp 0x475b
movq -0x638(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x638(%rbp)
jmp 0x454f
jmp 0x5255
leaq 0x11a51(%rip), %rsi     # 0x161cf
leaq -0x250(%rbp), %rdi
callq 0x54f0
movb %al, -0x921(%rbp)
jmp 0x4792
movb -0x921(%rbp), %al
testb $0x1, %al
jne 0x47a1
jmp 0x4978
leaq -0x6d0(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3120
jmp 0x47b6
leaq -0x6f1(%rbp), %rdi
movq %rdi, -0x930(%rbp)
callq 0x3420
movq -0x930(%rbp), %rdx
leaq 0x1186e(%rip), %rsi     # 0x16045
leaq -0x6f0(%rbp), %rdi
callq 0x3810
jmp 0x47e5
leaq -0x6b0(%rbp), %rdi
leaq -0x6d0(%rbp), %rsi
leaq -0x6f0(%rbp), %rdx
callq 0x3b60
jmp 0x4801
leaq -0x350(%rbp), %rdi
leaq -0x6b0(%rbp), %rsi
callq 0x5520
leaq -0x6b0(%rbp), %rdi
callq 0x5470
leaq -0x6f0(%rbp), %rdi
callq 0x3190
leaq -0x6f1(%rbp), %rdi
callq 0x32f0
leaq -0x6d0(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x3, %rax
je 0x491a
movq 0x1b767(%rip), %rdi     # 0x1ffc8
leaq 0x117e0(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x938(%rbp)
jmp 0x4876
movq -0x938(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x940(%rbp)
jmp 0x4892
movq -0x940(%rbp), %rdi
movq 0x1b718(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x48a7
movq 0x1b71a(%rip), %rdi     # 0x1ffc8
leaq 0x1191d(%rip), %rsi     # 0x161d2
callq 0x3280
jmp 0x48bc
movl $0x2, -0x504(%rbp)
jmp 0x5261
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x48fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
leaq -0x6f0(%rbp), %rdi
callq 0x3190
leaq -0x6f1(%rbp), %rdi
callq 0x32f0
leaq -0x6d0(%rbp), %rdi
callq 0x3190
jmp 0x5283
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
callq 0x3050
jmp 0x493c
leaq -0x350(%rbp), %rdi
movl $0x2, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x2b0(%rbp), %rdi
callq 0x3050
jmp 0x495e
leaq -0x270(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x6ca0
jmp 0x4973
jmp 0x5253
leaq 0x11878(%rip), %rsi     # 0x161f7
leaq -0x250(%rbp), %rdi
callq 0x54f0
movb %al, -0x941(%rbp)
jmp 0x4993
movb -0x941(%rbp), %al
testb $0x1, %al
jne 0x49a2
jmp 0x4b50
leaq -0x730(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3120
jmp 0x49b7
leaq -0x751(%rbp), %rdi
movq %rdi, -0x950(%rbp)
callq 0x3420
movq -0x950(%rbp), %rdx
leaq 0x11b75(%rip), %rsi     # 0x1654d
leaq -0x750(%rbp), %rdi
callq 0x3810
jmp 0x49e6
leaq -0x710(%rbp), %rdi
leaq -0x730(%rbp), %rsi
leaq -0x750(%rbp), %rdx
callq 0x3b60
jmp 0x4a02
leaq -0x350(%rbp), %rdi
leaq -0x710(%rbp), %rsi
callq 0x5520
leaq -0x710(%rbp), %rdi
callq 0x5470
leaq -0x750(%rbp), %rdi
callq 0x3190
leaq -0x751(%rbp), %rdi
callq 0x32f0
leaq -0x730(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x2, %rax
je 0x4b1b
movq 0x1b566(%rip), %rdi     # 0x1ffc8
leaq 0x115df(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x958(%rbp)
jmp 0x4a77
movq -0x958(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x960(%rbp)
jmp 0x4a93
movq -0x960(%rbp), %rdi
movq 0x1b517(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x4aa8
movq 0x1b519(%rip), %rdi     # 0x1ffc8
leaq 0x11746(%rip), %rsi     # 0x161fc
callq 0x3280
jmp 0x4abd
movl $0x2, -0x504(%rbp)
jmp 0x5261
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x4afe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
leaq -0x750(%rbp), %rdi
callq 0x3190
leaq -0x751(%rbp), %rdi
callq 0x32f0
leaq -0x730(%rbp), %rdi
callq 0x3190
jmp 0x5283
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
callq 0x3050
jmp 0x4b3d
leaq -0x270(%rbp), %rdi
callq 0x6e00
jmp 0x4b4b
jmp 0x5251
leaq 0x116ca(%rip), %rsi     # 0x16221
leaq -0x250(%rbp), %rdi
callq 0x54f0
movb %al, -0x961(%rbp)
jmp 0x4b6b
movb -0x961(%rbp), %al
testb $0x1, %al
jne 0x4b7a
jmp 0x4e26
leaq -0x790(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3120
jmp 0x4b8f
leaq -0x7b1(%rbp), %rdi
movq %rdi, -0x970(%rbp)
callq 0x3420
movq -0x970(%rbp), %rdx
leaq 0x1199d(%rip), %rsi     # 0x1654d
leaq -0x7b0(%rbp), %rdi
callq 0x3810
jmp 0x4bbe
leaq -0x770(%rbp), %rdi
leaq -0x790(%rbp), %rsi
leaq -0x7b0(%rbp), %rdx
callq 0x3b60
jmp 0x4bda
leaq -0x350(%rbp), %rdi
leaq -0x770(%rbp), %rsi
callq 0x5520
leaq -0x770(%rbp), %rdi
callq 0x5470
leaq -0x7b0(%rbp), %rdi
callq 0x3190
leaq -0x7b1(%rbp), %rdi
callq 0x32f0
leaq -0x790(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x3, %rax
jb 0x4c45
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x4, %rax
jbe 0x4d1a
movq 0x1b37c(%rip), %rdi     # 0x1ffc8
leaq 0x113f5(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x978(%rbp)
jmp 0x4c61
movq -0x978(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x980(%rbp)
jmp 0x4c7d
movq -0x980(%rbp), %rdi
movq 0x1b32d(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x4c92
movq 0x1b32f(%rip), %rdi     # 0x1ffc8
leaq 0x11583(%rip), %rsi     # 0x16223
callq 0x3280
jmp 0x4ca7
movq 0x1b31a(%rip), %rdi     # 0x1ffc8
leaq 0x11590(%rip), %rsi     # 0x16245
callq 0x3280
jmp 0x4cbc
movl $0x2, -0x504(%rbp)
jmp 0x5261
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x4cfd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
leaq -0x7b0(%rbp), %rdi
callq 0x3190
leaq -0x7b1(%rbp), %rdi
callq 0x32f0
leaq -0x790(%rbp), %rdi
callq 0x3190
jmp 0x5283
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x3, %rax
jne 0x4d87
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
callq 0x3050
jmp 0x4d4e
leaq -0x350(%rbp), %rdi
movl $0x2, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x2b0(%rbp), %rdi
callq 0x3050
jmp 0x4d70
leaq -0x270(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x6eb0
jmp 0x4d85
jmp 0x4d87
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x4, %rax
jne 0x4e21
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
callq 0x3050
jmp 0x4dbf
leaq -0x350(%rbp), %rdi
movl $0x2, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x2f0(%rbp), %rdi
callq 0x3050
jmp 0x4de1
leaq -0x350(%rbp), %rdi
movl $0x3, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x310(%rbp), %rdi
callq 0x3050
jmp 0x4e03
leaq -0x270(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
leaq -0x310(%rbp), %rdx
callq 0x7010
jmp 0x4e1f
jmp 0x4e21
jmp 0x524f
leaq 0x1143e(%rip), %rsi     # 0x1626b
leaq -0x250(%rbp), %rdi
callq 0x54f0
movb %al, -0x981(%rbp)
jmp 0x4e41
movb -0x981(%rbp), %al
testb $0x1, %al
jne 0x4e50
jmp 0x5027
leaq -0x7f0(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3120
jmp 0x4e65
leaq -0x811(%rbp), %rdi
movq %rdi, -0x990(%rbp)
callq 0x3420
movq -0x990(%rbp), %rdx
leaq 0x116c7(%rip), %rsi     # 0x1654d
leaq -0x810(%rbp), %rdi
callq 0x3810
jmp 0x4e94
leaq -0x7d0(%rbp), %rdi
leaq -0x7f0(%rbp), %rsi
leaq -0x810(%rbp), %rdx
callq 0x3b60
jmp 0x4eb0
leaq -0x350(%rbp), %rdi
leaq -0x7d0(%rbp), %rsi
callq 0x5520
leaq -0x7d0(%rbp), %rdi
callq 0x5470
leaq -0x810(%rbp), %rdi
callq 0x3190
leaq -0x811(%rbp), %rdi
callq 0x32f0
leaq -0x7f0(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x3, %rax
je 0x4fc9
movq 0x1b0b8(%rip), %rdi     # 0x1ffc8
leaq 0x11131(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x998(%rbp)
jmp 0x4f25
movq -0x998(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x9a0(%rbp)
jmp 0x4f41
movq -0x9a0(%rbp), %rdi
movq 0x1b069(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x4f56
movq 0x1b06b(%rip), %rdi     # 0x1ffc8
leaq 0x11309(%rip), %rsi     # 0x1626d
callq 0x3280
jmp 0x4f6b
movl $0x2, -0x504(%rbp)
jmp 0x5261
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x4fac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
leaq -0x810(%rbp), %rdi
callq 0x3190
leaq -0x811(%rbp), %rdi
callq 0x32f0
leaq -0x7f0(%rbp), %rdi
callq 0x3190
jmp 0x5283
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
callq 0x3050
jmp 0x4feb
leaq -0x350(%rbp), %rdi
movl $0x2, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x330(%rbp), %rdi
callq 0x3050
jmp 0x500d
leaq -0x270(%rbp), %rdi
leaq -0x330(%rbp), %rsi
callq 0x7220
jmp 0x5022
jmp 0x524d
leaq 0x11260(%rip), %rsi     # 0x1628e
leaq -0x250(%rbp), %rdi
callq 0x54f0
movb %al, -0x9a1(%rbp)
jmp 0x5042
movb -0x9a1(%rbp), %al
testb $0x1, %al
jne 0x5051
jmp 0x51fc
leaq -0x850(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3120
jmp 0x5066
leaq -0x871(%rbp), %rdi
movq %rdi, -0x9b0(%rbp)
callq 0x3420
movq -0x9b0(%rbp), %rdx
leaq 0x114c6(%rip), %rsi     # 0x1654d
leaq -0x870(%rbp), %rdi
callq 0x3810
jmp 0x5095
leaq -0x830(%rbp), %rdi
leaq -0x850(%rbp), %rsi
leaq -0x870(%rbp), %rdx
callq 0x3b60
jmp 0x50b1
leaq -0x350(%rbp), %rdi
leaq -0x830(%rbp), %rsi
callq 0x5520
leaq -0x830(%rbp), %rdi
callq 0x5470
leaq -0x870(%rbp), %rdi
callq 0x3190
leaq -0x871(%rbp), %rdi
callq 0x32f0
leaq -0x850(%rbp), %rdi
callq 0x3190
leaq -0x350(%rbp), %rdi
callq 0x5550
cmpq $0x2, %rax
je 0x51ca
movq 0x1aeb7(%rip), %rdi     # 0x1ffc8
leaq 0x10f30(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x9b8(%rbp)
jmp 0x5126
movq -0x9b8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x9c0(%rbp)
jmp 0x5142
movq -0x9c0(%rbp), %rdi
movq 0x1ae68(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x5157
movq 0x1ae6a(%rip), %rdi     # 0x1ffc8
leaq 0x1112b(%rip), %rsi     # 0x16290
callq 0x3280
jmp 0x516c
movl $0x2, -0x504(%rbp)
jmp 0x5261
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
jmp 0x51ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x370(%rbp)
movl %eax, -0x374(%rbp)
leaq -0x870(%rbp), %rdi
callq 0x3190
leaq -0x871(%rbp), %rdi
callq 0x32f0
leaq -0x850(%rbp), %rdi
callq 0x3190
jmp 0x5283
leaq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x55b0
movq %rax, %rsi
leaq -0x270(%rbp), %rdi
callq 0x3050
jmp 0x51ec
leaq -0x270(%rbp), %rdi
callq 0x7330
jmp 0x51fa
jmp 0x524b
movq 0x1adc5(%rip), %rdi     # 0x1ffc8
leaq 0x10e3e(%rip), %rsi     # 0x16048
callq 0x3280
movq %rax, -0x9c8(%rbp)
jmp 0x5218
movq -0x9c8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x3250
movq %rax, -0x9d0(%rbp)
jmp 0x5234
movq -0x9d0(%rbp), %rdi
movq 0x1ad76(%rip), %rsi     # 0x1ffb8
callq 0x32d0
jmp 0x5249
jmp 0x524b
jmp 0x524d
jmp 0x524f
jmp 0x5251
jmp 0x5253
jmp 0x5255
jmp 0x5257
movl $0x0, -0x504(%rbp)
leaq -0x500(%rbp), %rdi
callq 0x31e0
movl -0x504(%rbp), %eax
testl %eax, %eax
je 0x527e
jmp 0x5279
jmp 0x3d72
jmp 0x3d72
leaq -0x500(%rbp), %rdi
callq 0x31e0
jmp 0x532d
leaq -0x368(%rbp), %rdi
callq 0x5470
leaq -0x350(%rbp), %rdi
callq 0x5470
leaq -0x330(%rbp), %rdi
callq 0x3190
leaq -0x310(%rbp), %rdi
callq 0x3190
leaq -0x2f0(%rbp), %rdi
callq 0x3190
leaq -0x2d0(%rbp), %rdi
callq 0x3190
leaq -0x2b0(%rbp), %rdi
callq 0x3190
leaq -0x290(%rbp), %rdi
callq 0x3190
leaq -0x270(%rbp), %rdi
callq 0x3190
leaq -0x250(%rbp), %rdi
callq 0x3190
leaq -0x230(%rbp), %rdi
callq 0x3190
leaq -0x210(%rbp), %rdi
callq 0x30c0
addq $0x9d0, %rsp            # imm = 0x9D0
popq %rbp
retq
leaq -0x368(%rbp), %rdi
callq 0x5470
leaq -0x350(%rbp), %rdi
callq 0x5470
leaq -0x330(%rbp), %rdi
callq 0x3190
leaq -0x310(%rbp), %rdi
callq 0x3190
leaq -0x2f0(%rbp), %rdi
callq 0x3190
leaq -0x2d0(%rbp), %rdi
callq 0x3190
leaq -0x2b0(%rbp), %rdi
callq 0x3190
leaq -0x290(%rbp), %rdi
callq 0x3190
leaq -0x270(%rbp), %rdi
callq 0x3190
leaq -0x250(%rbp), %rdi
callq 0x3190
leaq -0x230(%rbp), %rdi
callq 0x3190
leaq -0x210(%rbp), %rdi
callq 0x30c0
movq -0x370(%rbp), %rdi
callq 0x3410
movq %rax, %rdi
callq 0x3b20
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)