// File: /workspace/github_cpp_makefile_star2_O3/jeffreyan11[P]go-engine/gtp.cpp
// Function: main
int main(int argc, char **argv) {
    // Parse command line arguments and flags with little error checking...
    if (argc == 2) {
        if (argv[1][0] == '-') {
            debugOutput = true;
        }
        else {
            playouts = stoi(string(argv[1]));
        }
    }
    else if (argc == 3) {
        debugOutput = true;

        if (argv[1][0] != '-') {
            playouts = stoi(string(argv[1]));
        }
        else {
            playouts = stoi(string(argv[2]));
        }
    }

    // Do necessary initializations
    initZobristTable();

    string input;

    while (true) {
        getline(cin, input);
        // TODO tab can also be a delimiter
        vector<string> inputVector = split(input, ' ');
        cin.clear();

        // The command is the first word in the string
        string command = inputVector.at(0);


        // Gameplay commands
        if (command == "play") {
            Player p = stringToColor(inputVector.at(1));

            if (p != EMPTY) {
                string moveString = inputVector.at(2);

                // We don't do anything to the board for passes
                if (moveString != "pass" && moveString != "PASS") {
                    char fileChar = moveString[0];
                    int file = 0;
                    if (fileChar >= 'A' && fileChar <= 'Z') {
                        // Board coordinates are 1-indexed
                        file = fileChar - 'A' + 1;
                        // The I character is skipped
                        if (fileChar > 'I')
                            file--;
                    }
                    else {
                        file = fileChar - 'a' + 1;
                        if (fileChar > 'i')
                            file--;
                    }

                    int rank = stoi(moveString.substr(1));
                    Move inputMove = coordToMove(file, rank);
                    lastMove = inputMove;

                    keyStack[keyStackSize] = game.getZobristKey();
                    keyStackSize++;
                    game.doMove(p, inputMove);

                    if (debugOutput) {
                        cerr << endl << "   ";
                        for (int i = 1; i <= boardSize; i++)
                            cerr << COLUMNS[i] << " ";
                        cerr << endl;

                        game.errorPrint();

                        cerr << "   ";
                        for (int i = 1; i <= boardSize; i++)
                            cerr << COLUMNS[i] << " ";
                        cerr << endl;
                    }
                }
                else
                    lastMove = MOVE_PASS;

                cout << "= " << endl << endl;
            }
            else
                cout << "? invalid color" << endl << endl;
        }

        else if (command == "genmove") {
            Player p = stringToColor(inputVector.at(1));

            if (p != EMPTY) {
                auto startTime = std::chrono::high_resolution_clock::now();
                Move m = generateMove(p, lastMove);
                if (debugOutput) {
                    auto endTime = std::chrono::high_resolution_clock::now();
                    std::chrono::duration<double> timeSpan =
                            std::chrono::duration_cast<std::chrono::duration<double>>(
                            endTime-startTime);
                    cerr << "genmove took: " << timeSpan.count() << " sec" << endl;
                }

                lastMove = m;
                if (m == MOVE_PASS)
                    cout << "= pass" << endl << endl;
                else {
                    keyStack[keyStackSize] = game.getZobristKey();
                    keyStackSize++;
                    game.doMove(p, m);

                    if (debugOutput) {
                        cerr << endl << "   ";
                        for (int i = 1; i <= boardSize; i++)
                            cerr << COLUMNS[i] << " ";
                        cerr << endl;

                        game.errorPrint();

                        cerr << "   ";
                        for (int i = 1; i <= boardSize; i++)
                            cerr << COLUMNS[i] << " ";
                        cerr << endl;
                    }

                    cout << "= " << COLUMNS[getX(m)] << getY(m) << endl << endl;
                }
            }
            else
                cout << "? invalid color" << endl << endl;
        }

        else if (command == "fixed_handicap") {
            int numStones = stoi(inputVector.at(1));
            int maxHandicap = (boardSize % 2) == 1 ? 9 : 4;
            if (numStones < 2 || numStones > maxHandicap)
                cout << "? invalid number of stones" << endl << endl;
            else if (!game.isEmpty())
                cout << "? board is not empty" << endl << endl;
            else if (boardSize < 7)
                cout << "? board size too small" << endl << endl;
            else {
                int hLine = (boardSize < 13) ? 3 : 4;
                int low = hLine;
                int mid = (boardSize + 1) / 2;
                int high = boardSize - hLine + 1;
                cout << "? ";
                switch (numStones) {
                    case 9:
                        game.doMove(BLACK, coordToMove(mid, mid));
                        cout << COLUMNS[mid] << mid << " ";
                    case 8:
                        game.doMove(BLACK, coordToMove(mid, high));
                        cout << COLUMNS[mid] << high << " ";
                    case 7:
                        game.doMove(BLACK, coordToMove(mid, low));
                        cout << COLUMNS[mid] << low << " ";
                    case 6:
                        game.doMove(BLACK, coordToMove(high, mid));
                        cout << COLUMNS[high] << mid << " ";
                    case 5:
                        game.doMove(BLACK, coordToMove(low, mid));
                        cout << COLUMNS[low] << mid << " ";
                    case 4:
                        game.doMove(BLACK, coordToMove(high, low));
                        cout << COLUMNS[high] << low << " ";
                    case 3:
                        game.doMove(BLACK, coordToMove(low, high));
                        cout << COLUMNS[low] << high << " ";
                    case 2:
                        game.doMove(BLACK, coordToMove(low, low));
                        game.doMove(BLACK, coordToMove(high, high));
                        cout << COLUMNS[low] << low << " " << COLUMNS[high] << high;
                    default:
                        break;
                }
                cout << endl << endl;
            }
        }


        // Game setup commands
        else if (command == "boardsize") {
            int inputSize = stoi(inputVector.at(1));
            if (inputSize < 3 || inputSize > 21)
                cout << "? unacceptable size" << endl << endl;
            else {
                boardSize = inputSize;
                arraySize = inputSize + 2;
                game.reset();
                resetSearchState();
                cout << "= " << endl << endl;
            }
        }

        else if (command == "clear_board") {
            lastMove = MOVE_PASS;
            game.reset();
            resetSearchState();
            cout << "= " << endl << endl;
        }

        else if (command == "komi") {
            float inputKomi = stof(inputVector.at(1));
            komi = inputKomi;
            cout << "= " << endl << endl;
        }


        // Protocol / information commands
        else if (command == "protocol_version")
            cout << "= 2" << endl << endl;
        else if (command == "name")
            cout << "= " << ENGINE_NAME << endl << endl;
        else if (command == "version")
            cout << "= " << VERSION << endl << endl;
        else if (command == "known_command") {
            bool isKnown = false;
            for (int i = 0; i < NUM_KNOWN_COMMANDS; i++) {
                if (KNOWN_COMMANDS[i] == inputVector.at(1)) {
                    isKnown = true;
                    break;
                }
            }

            if (isKnown)
                cout << "= true" << endl << endl;
            else
                cout << "= false" << endl << endl;
        }
        else if (command == "list_commands") {
            cout << "= " << endl;
            for (int i = 0; i < NUM_KNOWN_COMMANDS; i++) {
                cout << KNOWN_COMMANDS[i] << endl;
            }
            cout << endl;
        }


        // Debugging commands
        else if (command == "showboard") {
            cout << "= " << endl;
            cout << "   ";
            for (int i = 1; i <= boardSize; i++)
                cout << COLUMNS[i] << " ";
            cout << endl;

            game.prettyPrint();

            cout << "   ";
            for (int i = 1; i <= boardSize; i++)
                cout << COLUMNS[i] << " ";
            cout << endl << endl;
        }

        else if (command == "selfplay") {
            Player p = BLACK;
            Move last = 0;
            Move m = MOVE_PASS;

            while (last != MOVE_PASS || m != MOVE_PASS) {
                last = m;
                auto startTime = std::chrono::high_resolution_clock::now();
                m = generateMove(p, last);
                if (debugOutput) {
                    auto endTime = std::chrono::high_resolution_clock::now();
                    std::chrono::duration<double> timeSpan =
                            std::chrono::duration_cast<std::chrono::duration<double>>(
                            endTime-startTime);
                    cerr << "genmove took: " << timeSpan.count() << " sec" << endl;
                }

                if (m != MOVE_PASS) {
                    keyStack[keyStackSize] = game.getZobristKey();
                    keyStackSize++;
                    game.doMove(p, m);
                }

                p = otherPlayer(p);
            }

            cout << "= " << endl << endl;
        }


        else if (command == "quit") {
            cout << "= " << endl << endl;
            break;
        }


        // Otherwise, give an error message indicating an unknown command
        else {
            cout << "? unknown command" << endl << endl;
        }
    }

    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
cmpl $0x3, %edi
je 0x6aa0
cmpl $0x2, %edi
jne 0x6c2a
movq 0x8(%rsi), %rsi
cmpb $0x2d, (%rsi)
jne 0x6b28
movb $0x1, 0x11c35(%rip)     # 0x186d0
jmp 0x6c2a
movb $0x1, 0x11c29(%rip)     # 0x186d0
movq 0x8(%rsi), %rax
cmpb $0x2d, (%rax)
jne 0x6b94
movq 0x10(%rsi), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x8aa0
movq 0x8(%rsp), %rbx
callq 0x2050
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x40(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x2220
cmpq %rbx, (%r15)
je 0x877b
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x6b1c
movl (%r14), %ecx
cmpl $0x22, %ecx
jne 0x6bff
leaq 0x26dd(%rip), %rdi      # 0x9200
callq 0x2230
leaq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x8aa0
movq 0x8(%rsp), %rbx
callq 0x2050
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x40(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x2220
cmpq %rbx, (%r15)
je 0x8787
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x6b88
movl (%r14), %ecx
cmpl $0x22, %ecx
jne 0x6bff
leaq 0x2671(%rip), %rdi      # 0x9200
callq 0x2230
leaq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movq %rax, %rsi
callq 0x8aa0
movq 0x8(%rsp), %rbx
callq 0x2050
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x40(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x2220
cmpq %rbx, (%r15)
je 0x8793
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x879f
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x879f
testl %ecx, %ecx
jne 0x6c06
movl %ebp, (%r14)
leaq 0x558f(%rip), %rcx      # 0xc19c
movl %eax, (%rcx)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x6c2a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
callq 0x2d3c
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x50(%rsp), %r13
movq 0x5389(%rip), %rbx      # 0xbfd8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
leaq 0x8(%rsp), %r14
movsbl %al, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22e0
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x20, %edx
callq 0x88fd
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x22a0
movq 0x28(%rsp), %rax
cmpq %rax, 0x30(%rsp)
leaq 0x40(%rsp), %rbx
je 0x8684
movq %r13, 0x40(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x8b7a
movq %rbx, %rdi
leaq 0x2459(%rip), %rsi      # 0x9128
callq 0x2080
testl %eax, %eax
je 0x6e24
movq %rbx, %rdi
leaq 0x23d0(%rip), %rsi      # 0x90b6
callq 0x2080
testl %eax, %eax
je 0x71c8
movq %rbx, %rdi
leaq 0x23dc(%rip), %rsi      # 0x90d9
callq 0x2080
testl %eax, %eax
je 0x7366
movq %rbx, %rdi
leaq 0x23aa(%rip), %rsi      # 0x90be
callq 0x2080
testl %eax, %eax
je 0x75a7
movq %rbx, %rdi
leaq 0x239d(%rip), %rsi      # 0x90c8
callq 0x2080
testl %eax, %eax
je 0x7974
movq %rbx, %rdi
leaq 0x2392(%rip), %rsi      # 0x90d4
callq 0x2080
testl %eax, %eax
je 0x7b22
movq %rbx, %rdi
leaq 0x238f(%rip), %rsi      # 0x90e8
callq 0x2080
testl %eax, %eax
je 0x7b82
movq %rbx, %rdi
leaq 0x2389(%rip), %rsi      # 0x90f9
callq 0x2080
testl %eax, %eax
je 0x7cd8
movq %rbx, %rdi
leaq 0x236a(%rip), %rsi      # 0x90f1
callq 0x2080
testl %eax, %eax
je 0x7dab
movq %rbx, %rdi
leaq 0x2360(%rip), %rsi      # 0x90fe
callq 0x2080
testl %eax, %eax
je 0x7e6a
movq %rbx, %rdi
leaq 0x2357(%rip), %rsi      # 0x910c
callq 0x2080
testl %eax, %eax
je 0x7f4e
movq %rbx, %rdi
leaq 0x234e(%rip), %rsi      # 0x911a
callq 0x2080
testl %eax, %eax
je 0x800a
movq %rbx, %rdi
leaq 0x2341(%rip), %rsi      # 0x9124
callq 0x2080
testl %eax, %eax
je 0x813b
movq %rbx, %rdi
leaq 0x2333(%rip), %rsi      # 0x912d
callq 0x2080
testl %eax, %eax
je 0x8621
movl $0x11, %edx
movq 0x51b5(%rip), %rdi      # 0xbfc8
leaq 0x23c4(%rip), %rsi      # 0x91de
callq 0x21f0
jmp 0x811f
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x1, %rdx
jbe 0x8696
leaq 0xd8(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0xc8(%rsp), %rdi
callq 0x8b7a
leaq 0xc8(%rsp), %rdi
callq 0x8a11
movl %eax, %r15d
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x6e9c
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x21c0
testl %r15d, %r15d
leaq 0x60(%rsp), %rbx
je 0x752b
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jbe 0x86bc
leaq 0x70(%rsp), %rcx
movq %rcx, 0x60(%rsp)
movq 0x40(%rax), %rsi
movq 0x48(%rax), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x8b7a
movq %rbx, %rdi
leaq 0x227c(%rip), %rsi      # 0x9168
callq 0x2080
testl %eax, %eax
je 0x748a
movq %rbx, %rdi
leaq 0x2233(%rip), %rsi      # 0x9136
callq 0x2080
testl %eax, %eax
je 0x748a
movq 0x60(%rsp), %rax
movq %rbx, %rsi
movzbl (%rax), %ebx
cmpb $0x4a, %bl
movl $0x0, %r13d
adcw $0xbf, %r13w
leal -0x41(%rbx), %eax
xorl %ecx, %ecx
cmpb $0x6a, %bl
setl %cl
addl $0x9f, %ecx
cmpb $0x1a, %al
cmovael %ecx, %r13d
movl $0x1, %edx
leaq 0x80(%rsp), %rdi
movq $-0x1, %rcx
callq 0x21e0
movq 0x80(%rsp), %rbp
callq 0x2050
movq %rax, %r12
movl (%rax), %eax
movl %eax, (%rsp)
movl $0x0, (%r12)
movq %rbp, %rdi
leaq 0xa0(%rsp), %rsi
movl $0xa, %edx
callq 0x2220
cmpq %rbp, 0xa0(%rsp)
je 0x8725
movq %rax, %r14
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x86fa
movl (%r12), %eax
cmpl $0x22, %eax
je 0x86fa
testl %eax, %eax
jne 0x6fce
movl (%rsp), %eax
movl %eax, (%r12)
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x6ff3
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21c0
addl %ebx, %r13d
shll $0x8, %r13d
orl %r13d, %r14d
movw %r14w, 0x519b(%rip)     # 0xc1a0
leaq 0x78ec(%rip), %rdi      # 0xe8f8
leaq 0x50(%rsp), %r13
callq 0x529c
leaq 0x2120(%rip), %r12      # 0x913d
leaq 0x1090c(%rip), %rdx     # 0x17930
movslq (%rdx), %rcx
leaq 0x8902(%rip), %rsi      # 0xf930
movq %rax, (%rsi,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, (%rdx)
movzwl %r14w, %edx
leaq 0x78b6(%rip), %rdi      # 0xe8f8
movl %r15d, %esi
callq 0x3030
cmpb $0x1, 0x1167f(%rip)     # 0x186d0
jne 0x7493
movq 0x4f92(%rip), %rcx      # 0xbff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4f74(%rip), %rdi      # 0xbff0
callq 0x2040
movq %rax, %rdi
callq 0x2110
movl $0x3, %edx
movq %rax, %rdi
leaq 0x20a3(%rip), %rsi      # 0x913b
callq 0x21f0
leaq 0x50e4(%rip), %rax      # 0xc188
cmpl $0x0, (%rax)
jle 0x70ec
leaq 0x11308(%rip), %rbx     # 0x183b8
xorl %r14d, %r14d
movq -0x8(%rbx), %rsi
movq (%rbx), %rdx
movq 0x4f2f(%rip), %rdi      # 0xbff0
callq 0x21f0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
leaq 0x50ab(%rip), %rax      # 0xc188
movslq (%rax), %rax
incq %r14
addq $0x20, %rbx
cmpq %rax, %r14
jl 0x70b3
movq 0x4efd(%rip), %rcx      # 0xbff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4edf(%rip), %rdi      # 0xbff0
callq 0x2040
movq %rax, %rdi
callq 0x2110
leaq 0x77d3(%rip), %rdi      # 0xe8f8
callq 0x53fa
movl $0x3, %edx
movq 0x4eba(%rip), %rdi      # 0xbff0
leaq 0x1ffe(%rip), %rsi      # 0x913b
callq 0x21f0
leaq 0x503f(%rip), %rax      # 0xc188
cmpl $0x0, (%rax)
jle 0x7191
leaq 0x11263(%rip), %rbx     # 0x183b8
xorl %r14d, %r14d
movq -0x8(%rbx), %rsi
movq (%rbx), %rdx
movq 0x4e8a(%rip), %rdi      # 0xbff0
callq 0x21f0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
leaq 0x5006(%rip), %rax      # 0xc188
movslq (%rax), %rax
incq %r14
addq $0x20, %rbx
cmpq %rax, %r14
jl 0x7158
movq 0x4e58(%rip), %rcx      # 0xbff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4e3a(%rip), %rdi      # 0xbff0
callq 0x2040
movq %rax, %rdi
callq 0x2110
jmp 0x7493
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x1, %rdx
jbe 0x86a9
leaq 0xb8(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %rdi
callq 0x8b7a
leaq 0xa8(%rsp), %rdi
callq 0x8a11
movl %eax, %r14d
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x7240
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x21c0
testl %r14d, %r14d
je 0x7692
callq 0x2060
movq %rax, %r12
movzwl 0x4f48(%rip), %esi      # 0xc1a0
movl %r14d, %edi
callq 0x5b9c
movl %eax, %r15d
cmpb $0x1, 0x11466(%rip)     # 0x186d0
jne 0x72e7
callq 0x2060
movq %rax, %rbp
movl $0xe, %edx
movq 0x4d70(%rip), %rdi      # 0xbff0
leaq 0x1ecb(%rip), %rsi      # 0x9152
callq 0x21f0
subq %r12, %rbp
cvtsi2sd %rbp, %xmm0
divsd 0x1de4(%rip), %xmm0     # 0x9080
movq 0x4d4d(%rip), %rdi      # 0xbff0
callq 0x2280
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0x1ea7(%rip), %rsi      # 0x9161
callq 0x21f0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movw %r15w, 0x4eb1(%rip)     # 0xc1a0
movzwl %r15w, %r12d
cmpl $0x8000, %r12d          # imm = 0x8000
jne 0x770e
movl $0x6, %edx
movq 0x4cbc(%rip), %rdi      # 0xbfc8
leaq 0x1e53(%rip), %rsi      # 0x9166
callq 0x21f0
movq 0x4ca9(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4c8b(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
jmp 0x7959
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x1, %rdx
jbe 0x86e7
movq 0x20(%rax), %r12
callq 0x2050
movq %rax, %r15
movl (%rax), %ebp
movl $0x0, (%rax)
movq %r12, %rdi
leaq 0x60(%rsp), %rsi
movl $0xa, %edx
callq 0x2220
cmpq %r12, 0x60(%rsp)
je 0x86db
movq %rax, %r14
addq $-0x80000000, %rax      # imm = 0x80000000
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
cmpq %rcx, %rax
jb 0x86cf
movl (%r15), %eax
cmpl $0x22, %eax
je 0x86cf
testl %eax, %eax
jne 0x73e1
movl %ebp, (%r15)
cmpl $0x2, %r14d
jl 0x740e
leaq 0x4d9a(%rip), %rax      # 0xc188
movl (%rax), %eax
movl $0x80000001, %ecx       # imm = 0x80000001
andl %ecx, %eax
xorl %ecx, %ecx
cmpl $0x1, %eax
sete %cl
leal (%rcx,%rcx,4), %eax
addl $0x4, %eax
cmpl %r14d, %eax
jae 0x7a96
movl $0x1a, %edx
movq 0x4bae(%rip), %rdi      # 0xbfc8
leaq 0x1d4c(%rip), %rsi      # 0x916d
callq 0x21f0
movq 0x4b9b(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4b7d(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x2110
jmp 0x7e34
movw $0x8000, 0x4d0d(%rip)   # imm = 0x8000
movl $0x2, %edx
movq 0x4b29(%rip), %rdi      # 0xbfc8
leaq 0x1c99(%rip), %rsi      # 0x913f
callq 0x21f0
movq 0x4b16(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4af8(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x7523
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21c0
movb $0x1, %bpl
jmp 0x7e34
movl $0xf, %edx
movq 0x4a91(%rip), %rdi      # 0xbfc8
leaq 0x1c04(%rip), %rsi      # 0x9142
callq 0x21f0
movq 0x4a7e(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4a60(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x2110
jmp 0x7e34
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x1, %rdx
jbe 0x8712
movq 0x20(%rax), %r15
callq 0x2050
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
movq %r15, %rdi
leaq 0x60(%rsp), %rsi
movl $0xa, %edx
callq 0x2220
cmpq %r15, 0x60(%rsp)
je 0x8706
leaq -0x80000000(%rax), %rcx
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
jb 0x8731
movl (%r14), %ecx
cmpl $0x22, %ecx
je 0x8731
testl %ecx, %ecx
jne 0x7620
movl %ebp, (%r14)
leal -0x16(%rax), %ecx
cmpl $-0x14, %ecx
ja 0x79f4
movl $0x13, %edx
movq 0x4990(%rip), %rdi      # 0xbfc8
leaq 0x1b78(%rip), %rsi      # 0x91b7
callq 0x21f0
movq 0x497d(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x495f(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
jmp 0x7a7b
movl $0xf, %edx
movq 0x492a(%rip), %rdi      # 0xbfc8
leaq 0x1a9d(%rip), %rsi      # 0x9142
callq 0x21f0
movq 0x4917(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x48f9(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x2110
jmp 0x7e34
leaq 0x71e3(%rip), %rdi      # 0xe8f8
callq 0x529c
leaq 0x1020f(%rip), %rdx     # 0x17930
movslq (%rdx), %rcx
leaq 0x8205(%rip), %rsi      # 0xf930
movq %rax, (%rsi,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, (%rdx)
leaq 0x71bd(%rip), %rdi      # 0xe8f8
movl %r14d, %esi
movl %r12d, %edx
callq 0x3030
cmpb $0x1, 0x10f83(%rip)     # 0x186d0
jne 0x78cd
movq 0x4896(%rip), %rcx      # 0xbff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4878(%rip), %rdi      # 0xbff0
callq 0x2040
movq %rax, %rdi
callq 0x2110
movl $0x3, %edx
movq %rax, %rdi
leaq 0x19a7(%rip), %rsi      # 0x913b
callq 0x21f0
leaq 0x49e8(%rip), %rax      # 0xc188
cmpl $0x0, (%rax)
leaq 0x1993(%rip), %r12      # 0x913d
jle 0x77ef
leaq 0x10c05(%rip), %rbx     # 0x183b8
xorl %r14d, %r14d
movq -0x8(%rbx), %rsi
movq (%rbx), %rdx
movq 0x482c(%rip), %rdi      # 0xbff0
callq 0x21f0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
leaq 0x49a8(%rip), %rax      # 0xc188
movslq (%rax), %rax
incq %r14
addq $0x20, %rbx
cmpq %rax, %r14
jl 0x77b6
movq 0x47fa(%rip), %rcx      # 0xbff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x47dc(%rip), %rdi      # 0xbff0
callq 0x2040
movq %rax, %rdi
callq 0x2110
leaq 0x70d0(%rip), %rdi      # 0xe8f8
callq 0x53fa
movl $0x3, %edx
movq 0x47b7(%rip), %rdi      # 0xbff0
leaq 0x18fb(%rip), %rsi      # 0x913b
callq 0x21f0
leaq 0x493c(%rip), %rax      # 0xc188
cmpl $0x0, (%rax)
leaq 0x18e7(%rip), %r12      # 0x913d
jle 0x789b
leaq 0x10b59(%rip), %rbx     # 0x183b8
xorl %r14d, %r14d
movq -0x8(%rbx), %rsi
movq (%rbx), %rdx
movq 0x4780(%rip), %rdi      # 0xbff0
callq 0x21f0
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x21f0
leaq 0x48fc(%rip), %rax      # 0xc188
movslq (%rax), %rax
incq %r14
addq $0x20, %rbx
cmpq %rax, %r14
jl 0x7862
movq 0x474e(%rip), %rcx      # 0xbff0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4730(%rip), %rdi      # 0xbff0
callq 0x2040
movq %rax, %rdi
callq 0x2110
movl $0x2, %edx
movq 0x46ef(%rip), %rdi      # 0xbfc8
leaq 0x185f(%rip), %rsi      # 0x913f
callq 0x21f0
movl %r15d, %eax
shrl $0x3, %eax
andl $0x1fe0, %eax           # imm = 0x1FE0
leaq 0x10a99(%rip), %rcx     # 0x18390
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x46c1(%rip), %rdi      # 0xbfc8
callq 0x21f0
movzbl %r15b, %esi
movq %rax, %rdi
callq 0x22b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x2110
jmp 0x7e34
movw $0x8000, 0x4823(%rip)   # imm = 0x8000
leaq 0x6f74(%rip), %rdi      # 0xe8f8
callq 0x52a2
callq 0x696d
movl $0x2, %edx
movq 0x462e(%rip), %rdi      # 0xbfc8
leaq 0x179e(%rip), %rsi      # 0x913f
callq 0x21f0
movq 0x461b(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x45fd(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
jmp 0x7e1e
leaq 0x478d(%rip), %rcx      # 0xc188
movl %eax, (%rcx)
addl $0x2, %eax
leaq 0x4785(%rip), %rcx      # 0xc18c
movl %eax, (%rcx)
leaq 0x6ee8(%rip), %rdi      # 0xe8f8
callq 0x52a2
callq 0x696d
movl $0x2, %edx
movq 0x45a2(%rip), %rdi      # 0xbfc8
leaq 0x1712(%rip), %rsi      # 0x913f
callq 0x21f0
movq 0x458f(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4571(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x2110
jmp 0x7e34
leaq 0x6e5b(%rip), %rdi      # 0xe8f8
callq 0x5290
testb %al, %al
je 0x7be8
leaq 0x46d7(%rip), %rax      # 0xc188
movl (%rax), %ebx
cmpl $0x6, %ebx
jg 0x7d50
movl $0x16, %edx
movq 0x4500(%rip), %rdi      # 0xbfc8
leaq 0x16ce(%rip), %rsi      # 0x919d
callq 0x21f0
movq 0x44ed(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x44cf(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
jmp 0x746f
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rdx
subq %rax, %rdx
sarq $0x5, %rdx
cmpq $0x1, %rdx
jbe 0x873d
movq 0x20(%rax), %r15
callq 0x2050
movq %rax, %r14
movl (%rax), %ebp
movl $0x0, (%rax)
movq %r15, %rdi
leaq 0x60(%rsp), %rsi
callq 0x2210
cmpq %r15, 0x60(%rsp)
je 0x8750
movl (%r14), %eax
testl %eax, %eax
je 0x7c4e
cmpl $0x22, %eax
jne 0x7c51
jmp 0x875c
movl $0x3, %edx
movq 0x443a(%rip), %rdi      # 0xbfc8
leaq 0x1636(%rip), %rsi      # 0x91cb
callq 0x21f0
movq 0x4427(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x4409(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
jmp 0x7e1e
movl $0x14, %edx
movq 0x43d4(%rip), %rdi      # 0xbfc8
leaq 0x158d(%rip), %rsi      # 0x9188
callq 0x21f0
movq 0x43c1(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x43a3(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
jmp 0x746f
movl %ebp, (%r14)
leaq 0x4540(%rip), %rax      # 0xc198
movss %xmm0, (%rax)
movl $0x2, %edx
movq 0x4360(%rip), %rdi      # 0xbfc8
leaq 0x14d0(%rip), %rsi      # 0x913f
callq 0x21f0
movq 0x434d(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x432f(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x2110
jmp 0x7e34
movl $0x2, %edx
movq 0x42e4(%rip), %rdi      # 0xbfc8
leaq 0x1454(%rip), %rsi      # 0x913f
callq 0x21f0
movq 0x10491(%rip), %rsi     # 0x18188
movq 0x10492(%rip), %rdx     # 0x18190
movq 0x42c3(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
jmp 0x7e1e
cmpl $0xd, %ebx
movl $0x4, %r15d
sbbl $0x0, %r15d
movl $0x2, %edx
movq 0x425f(%rip), %rdi      # 0xbfc8
leaq 0x1444(%rip), %rsi      # 0x91b4
callq 0x21f0
movq %rbx, %r12
incq %r12
shrq %r12
subl %r15d, %ebx
incl %ebx
addl $-0x2, %r14d
leaq 0x12fa(%rip), %rcx      # 0x9088
movslq (%rcx,%r14,4), %rax
addq %rcx, %rax
movl %ebx, %ecx
movq %rcx, (%rsp)
movl %r15d, %r14d
jmpq *%rax
movl %r12d, %ebp
shll $0x8, %ebp
jmp 0x8346
movl $0x2, %edx
movq 0x4211(%rip), %rdi      # 0xbfc8
leaq 0x1381(%rip), %rsi      # 0x913f
callq 0x21f0
movq 0x103de(%rip), %rsi     # 0x181a8
movq 0x103df(%rip), %rdx     # 0x181b0
movq 0x41f0(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x2110
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x7e4b
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21c0
leaq 0x28(%rsp), %rdi
callq 0x8ade
testb %bpl, %bpl
movq 0x4179(%rip), %rbx      # 0xbfd8
jne 0x6c4f
jmp 0x8654
movq 0x28(%rsp), %rbx
movq 0x30(%rsp), %rdx
subq %rbx, %rdx
sarq $0x5, %rdx
cmpq $0x2, %rdx
jb 0x8768
movq 0x28(%rbx), %r14
movl $0x8, %r15d
leaq 0x1033a(%rip), %rax     # 0x181d0
cmpq %r14, (%r15,%rax)
jne 0x7ec5
testq %r14, %r14
je 0x7fd6
movq 0x20(%rbx), %rsi
leaq 0x10320(%rip), %rax     # 0x181d0
movq -0x8(%r15,%rax), %rdi
movq %r14, %rdx
callq 0x21d0
testl %eax, %eax
je 0x7fd6
addq $0x20, %r15
cmpq $0x1c8, %r15            # imm = 0x1C8
jne 0x7e8f
movl $0x7, %edx
movq 0x40ea(%rip), %rdi      # 0xbfc8
leaq 0x12f1(%rip), %rsi      # 0x91d6
callq 0x21f0
movq 0x40d7(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x40b9(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x2110
jmp 0x7e34
movl $0x2, %edx
movq 0x406e(%rip), %rdi      # 0xbfc8
leaq 0x11de(%rip), %rsi      # 0x913f
callq 0x21f0
movq 0x405b(%rip), %rdi      # 0xbfc8
callq 0x20d0
movl $0x8, %ebx
leaq 0x10252(%rip), %rax     # 0x181d0
movq -0x8(%rbx,%rax), %rsi
movq (%rbx,%rax), %rdx
movq 0x403a(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
addq $0x20, %rbx
cmpq $0x1c8, %rbx            # imm = 0x1C8
jne 0x7f77
movq 0x3ff7(%rip), %rax      # 0xbfc8
jmp 0x812b
movl $0x6, %edx
movq 0x3fe6(%rip), %rdi      # 0xbfc8
leaq 0x11e6(%rip), %rsi      # 0x91cf
callq 0x21f0
movq 0x3fd3(%rip), %rdi      # 0xbfc8
callq 0x20d0
movb $0x1, %bpl
movq %rax, %rdi
callq 0x20d0
jmp 0x7e34
movl $0x2, %edx
movq 0x3fb2(%rip), %rdi      # 0xbfc8
leaq 0x1122(%rip), %rsi      # 0x913f
callq 0x21f0
movq 0x3f9f(%rip), %rdi      # 0xbfc8
callq 0x20d0
movl $0x3, %edx
movq 0x3f8e(%rip), %rdi      # 0xbfc8
leaq 0x10fa(%rip), %rsi      # 0x913b
callq 0x21f0
leaq 0x413b(%rip), %rax      # 0xc188
cmpl $0x0, (%rax)
leaq 0x10e6(%rip), %r15      # 0x913d
jle 0x809c
leaq 0x10358(%rip), %rbx     # 0x183b8
xorl %r14d, %r14d
movq -0x8(%rbx), %rsi
movq (%rbx), %rdx
movq 0x3f57(%rip), %rdi      # 0xbfc8
callq 0x21f0
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x21f0
leaq 0x40fb(%rip), %rax      # 0xc188
movslq (%rax), %rax
incq %r14
addq $0x20, %rbx
cmpq %rax, %r14
jl 0x8063
movq 0x3f25(%rip), %rdi      # 0xbfc8
callq 0x20d0
leaq 0x6849(%rip), %rdi      # 0xe8f8
callq 0x52b4
movl $0x3, %edx
movq 0x3f08(%rip), %rdi      # 0xbfc8
leaq 0x1074(%rip), %rsi      # 0x913b
callq 0x21f0
leaq 0x40b5(%rip), %rax      # 0xc188
cmpl $0x0, (%rax)
jle 0x811f
leaq 0x102d9(%rip), %rbx     # 0x183b8
xorl %r14d, %r14d
movq -0x8(%rbx), %rsi
movq (%rbx), %rdx
movq 0x3ed8(%rip), %rdi      # 0xbfc8
callq 0x21f0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1039(%rip), %rsi      # 0x913d
callq 0x21f0
leaq 0x4078(%rip), %rax      # 0xc188
movslq (%rax), %rax
incq %r14
addq $0x20, %rbx
cmpq %rax, %r14
jl 0x80e2
movq 0x3ea2(%rip), %rdi      # 0xbfc8
callq 0x20d0
movb $0x1, %bpl
movq %rax, %rdi
callq 0x20d0
jmp 0x7e34
movl $0x1, %r14d
movw $0x8000, %r15w          # imm = 0x8000
movl $0x8000, %ebx           # imm = 0x8000
callq 0x2060
movq %rax, %r12
movzwl %r15w, %esi
movl %r14d, %edi
callq 0x5b9c
movl %eax, %r13d
cmpb $0x1, 0x10567(%rip)     # 0x186d0
jne 0x81e9
callq 0x2060
movq %rax, %rbp
movl $0xe, %edx
movq 0x3e71(%rip), %rdi      # 0xbff0
leaq 0xfcc(%rip), %rsi       # 0x9152
callq 0x21f0
subq %r12, %rbp
xorps %xmm0, %xmm0
cvtsi2sd %rbp, %xmm0
divsd 0xee2(%rip), %xmm0      # 0x9080
movq 0x3e4b(%rip), %rdi      # 0xbff0
callq 0x2280
movq %rax, %r12
movl $0x4, %edx
movq %rax, %rdi
leaq 0xfa5(%rip), %rsi       # 0x9161
callq 0x21f0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2110
movl %r13d, %eax
negw %ax
jo 0x822a
leaq 0x6700(%rip), %rdi      # 0xe8f8
callq 0x529c
leaq 0xf72c(%rip), %rdx      # 0x17930
movslq (%rdx), %rcx
leaq 0x7722(%rip), %rsi      # 0xf930
movq %rax, (%rsi,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, (%rdx)
movzwl %r13w, %edx
leaq 0x66d6(%rip), %rdi      # 0xe8f8
movl %r14d, %esi
callq 0x3030
movl $0x3, %eax
subl %r14d, %eax
xorl %ebx, %r15d
movl %r13d, %ecx
xorl %ebx, %ecx
orw %r15w, %cx
movl %r13d, %r15d
movl %eax, %r14d
jne 0x814b
movl $0x2, %edx
movq 0x3d72(%rip), %rdi      # 0xbfc8
leaq 0xee2(%rip), %rsi       # 0x913f
leaq 0x50(%rsp), %r13
callq 0x21f0
movq 0x3d5a(%rip), %rdi      # 0xbfc8
callq 0x20d0
movb $0x1, %bpl
movq %rax, %rdi
callq 0x20d0
jmp 0x7e34
movq %r12, %rcx
movl %ecx, %ebp
shll $0x8, %ebp
movl %ebp, %eax
orl %ecx, %eax
movzwl %ax, %edx
leaq 0x665f(%rip), %rdi      # 0xe8f8
movl $0x1, %esi
callq 0x3030
movq %r12, %rax
shlq $0x5, %rax
leaq 0x100df(%rip), %rcx     # 0x18390
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x3d07(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %rdi
movl %r12d, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0xe5d(%rip), %rsi       # 0x913d
callq 0x21f0
jmp 0x82ed
movl %r12d, %ebp
shll $0x8, %ebp
movl %ebx, %eax
orl %ebp, %eax
movzwl %ax, %edx
leaq 0x65fd(%rip), %rdi      # 0xe8f8
movl $0x1, %esi
callq 0x3030
movl %r12d, %eax
shlq $0x5, %rax
leaq 0x1007d(%rip), %rcx     # 0x18390
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x3ca5(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %rdi
movl %ebx, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0xdfc(%rip), %rsi       # 0x913d
callq 0x21f0
orl %r15d, %ebp
movzwl %bp, %edx
leaq 0x65a5(%rip), %rdi      # 0xe8f8
movl $0x1, %esi
callq 0x3030
movl %r12d, %eax
shlq $0x5, %rax
leaq 0x10025(%rip), %rcx     # 0x18390
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x3c4d(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %rdi
movl %r15d, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0xda3(%rip), %rsi       # 0x913d
callq 0x21f0
movl %ebx, %eax
shll $0x8, %eax
orl %r12d, %eax
movzwl %ax, %edx
leaq 0x6547(%rip), %rdi      # 0xe8f8
movl $0x1, %esi
callq 0x3030
movq (%rsp), %rax
shlq $0x5, %rax
leaq 0xffc6(%rip), %rcx      # 0x18390
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x3bee(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %rdi
movl %r12d, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0xd44(%rip), %rsi       # 0x913d
callq 0x21f0
movl %r15d, %eax
shll $0x8, %eax
orl %r12d, %eax
movzwl %ax, %edx
leaq 0x64e7(%rip), %rdi      # 0xe8f8
movl $0x1, %esi
callq 0x3030
movq %r14, %rax
shlq $0x5, %rax
leaq 0xff67(%rip), %rcx      # 0x18390
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x3b8f(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %rdi
movl %r12d, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0xce5(%rip), %rsi       # 0x913d
callq 0x21f0
movl %ebx, %eax
shll $0x8, %eax
orl %r15d, %eax
movzwl %ax, %edx
leaq 0x6489(%rip), %rdi      # 0xe8f8
movl $0x1, %esi
callq 0x3030
movq (%rsp), %rax
shlq $0x5, %rax
leaq 0xff08(%rip), %rcx      # 0x18390
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x3b30(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %rdi
movl %r15d, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0xc86(%rip), %rsi       # 0x913d
callq 0x21f0
movl %r15d, %eax
shll $0x8, %eax
orl %ebx, %eax
movzwl %ax, %edx
leaq 0x642a(%rip), %rdi      # 0xe8f8
movl $0x1, %esi
callq 0x3030
movq %r14, %rax
shlq $0x5, %rax
leaq 0xfeaa(%rip), %rcx      # 0x18390
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq 0x3ad2(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %rdi
movl %ebx, %esi
callq 0x22b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0xc29(%rip), %rsi       # 0x913d
callq 0x21f0
movl %r15d, %eax
shll $0x8, %eax
addl %r15d, %eax
movzwl %ax, %edx
leaq 0x63cc(%rip), %rdi      # 0xe8f8
movl $0x1, %esi
callq 0x3030
movl %ebx, %eax
shll $0x8, %eax
orl %ebx, %eax
movzwl %ax, %edx
leaq 0x63b1(%rip), %rdi      # 0xe8f8
movl $0x1, %esi
callq 0x3030
shlq $0x5, %r14
leaq 0xfe34(%rip), %rax      # 0x18390
movq (%r14,%rax), %rsi
movq 0x8(%r14,%rax), %rdx
movq 0x3a5c(%rip), %rdi      # 0xbfc8
callq 0x21f0
movq %rax, %rdi
movl %r15d, %esi
callq 0x22b0
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
leaq 0xbaf(%rip), %rsi       # 0x913d
callq 0x21f0
movq (%rsp), %rcx
shlq $0x5, %rcx
leaq 0xfdee(%rip), %rax      # 0x18390
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
movq %r14, %rdi
callq 0x21f0
movq %rax, %rdi
movl %ebx, %esi
callq 0x22b0
movq 0x3a04(%rip), %rcx      # 0xbfc8
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x39e6(%rip), %rdi      # 0xbfc8
callq 0x2040
movq %rax, %rdi
callq 0x2110
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movb $0x1, %bpl
movq %rax, %rdi
callq 0x2110
jmp 0x7e34
movl $0x2, %edx
movq 0x399b(%rip), %rdi      # 0xbfc8
leaq 0xb0b(%rip), %rsi       # 0x913f
callq 0x21f0
movq 0x3988(%rip), %rdi      # 0xbfc8
callq 0x20d0
movq %rax, %rdi
callq 0x20d0
xorl %ebp, %ebp
jmp 0x7e34
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x8670
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xba9(%rip), %rdi       # 0x9234
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x2250
leaq 0xb97(%rip), %rdi       # 0x9234
movl $0x1, %esi
xorl %eax, %eax
callq 0x2250
leaq 0xb84(%rip), %rdi       # 0x9234
movl $0x1, %esi
xorl %eax, %eax
callq 0x2250
leaq 0xb71(%rip), %rdi       # 0x9234
movl $0x2, %esi
xorl %eax, %eax
callq 0x2250
leaq 0xb2a(%rip), %rdi       # 0x9200
callq 0x2230
leaq 0xb1e(%rip), %rdi       # 0x9200
callq 0x2100
leaq 0xb46(%rip), %rdi       # 0x9234
movl $0x1, %esi
xorl %eax, %eax
callq 0x2250
leaq 0xaff(%rip), %rdi       # 0x9200
callq 0x2230
leaq 0xaf3(%rip), %rdi       # 0x9200
callq 0x2100
leaq 0xb1b(%rip), %rdi       # 0x9234
movl $0x1, %esi
xorl %eax, %eax
callq 0x2250
leaq 0xad4(%rip), %rdi       # 0x9200
callq 0x2100
leaq 0xac8(%rip), %rdi       # 0x9200
callq 0x2230
leaq 0xaf0(%rip), %rdi       # 0x9234
movl $0x1, %esi
xorl %eax, %eax
callq 0x2250
leaq 0xaae(%rip), %rdi       # 0x9205
callq 0x2100
leaq 0xaa2(%rip), %rdi       # 0x9205
callq 0x2230
leaq 0xac5(%rip), %rdi       # 0x9234
movl $0x1, %esi
xorl %eax, %eax
callq 0x2250
leaq 0xa7e(%rip), %rdi       # 0x9200
callq 0x2100
leaq 0xa72(%rip), %rdi       # 0x9200
callq 0x2100
leaq 0xa66(%rip), %rdi       # 0x9200
callq 0x2100
leaq 0xa5a(%rip), %rdi       # 0x9200
callq 0x2230
jmp 0x88b0
jmp 0x87b4
jmp 0x87b4
movq %rax, %rbx
jmp 0x88f0
jmp 0x8862
jmp 0x87c5
jmp 0x87c5
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x87d1
movl %ebp, (%r14)
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x88de
jmp 0x88b0
jmp 0x8862
jmp 0x87ff
jmp 0x88b0
jmp 0x8862
jmp 0x88b0
movq %rax, %rbx
jmp 0x8843
jmp 0x8862
jmp 0x8862
jmp 0x8862
movq %rax, %rbx
cmpl $0x0, (%r14)
jne 0x8865
movl %ebp, (%r14)
jmp 0x8865
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x881e
movl (%rsp), %eax
movl %eax, (%r12)
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x8843
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21c0
leaq 0x50(%rsp), %r13
jmp 0x8892
jmp 0x8862
jmp 0x88b0
jmp 0x8862
jmp 0x88b0
jmp 0x88b0
movq %rax, %rbx
cmpl $0x0, (%r15)
jne 0x8865
movl %ebp, (%r15)
jmp 0x8865
movq %rax, %rbx
leaq 0x50(%rsp), %r13
jmp 0x88b3
jmp 0x88b0
jmp 0x88b0
jmp 0x888f
jmp 0x88b0
jmp 0x88b0
jmp 0x88b0
jmp 0x88b0
jmp 0x88f8
jmp 0x8880
jmp 0x8880
movq %rax, %rbx
jmp 0x88ca
jmp 0x88b0
jmp 0x88b0
jmp 0x88b0
jmp 0x888f
jmp 0x888f
movq %rax, %rbx
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x88b3
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21c0
jmp 0x88b3
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r13, %rdi
je 0x88ca
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21c0
leaq 0x28(%rsp), %rdi
callq 0x8ade
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x88f0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq %rbx, %rdi
callq 0x22c0
movq %rax, %rbx
jmp 0x88d4