// File: 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
movq %rsp, %rbp
subq $0x6b0, %rsp            # imm = 0x6B0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jne 0xbc5a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0xbbaf
movb $0x1, 0x14b86(%rip)     # 0x20730
jmp 0xbc55
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x240(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x238(%rbp)
callq 0x2360
movq -0x240(%rbp), %rsi
movq -0x238(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0xdf00
jmp 0xbbe7
xorl %eax, %eax
movl %eax, %esi
leaq -0x30(%rbp), %rdi
movl $0xa, %edx
callq 0xdfb0
movl %eax, -0x244(%rbp)
jmp 0xbc01
movl -0x244(%rbp), %ecx
leaq 0x85f6(%rip), %rax      # 0x14204
movl %ecx, (%rax)
leaq -0x30(%rbp), %rdi
callq 0x23c8
leaq -0x31(%rbp), %rdi
callq 0x2250
jmp 0xbc55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbc47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x23c8
leaq -0x31(%rbp), %rdi
callq 0x2250
jmp 0xdcc6
jmp 0xbde7
cmpl $0x3, -0x8(%rbp)
jne 0xbde5
movb $0x1, 0x14ac5(%rip)     # 0x20730
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
je 0xbd28
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x258(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x2360
movq -0x258(%rbp), %rsi
movq -0x250(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0xdf00
jmp 0xbcb7
xorl %eax, %eax
movl %eax, %esi
leaq -0x68(%rbp), %rdi
movl $0xa, %edx
callq 0xdfb0
movl %eax, -0x25c(%rbp)
jmp 0xbcd1
movl -0x25c(%rbp), %ecx
leaq 0x8526(%rip), %rax      # 0x14204
movl %ecx, (%rax)
leaq -0x68(%rbp), %rdi
callq 0x23c8
leaq -0x69(%rbp), %rdi
callq 0x2250
jmp 0xbde3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd1a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x23c8
leaq -0x69(%rbp), %rdi
callq 0x2250
jmp 0xdcc6
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x270(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x2360
movq -0x270(%rbp), %rsi
movq -0x268(%rbp), %rdx
leaq -0x90(%rbp), %rdi
callq 0xdf00
jmp 0xbd66
xorl %eax, %eax
movl %eax, %esi
leaq -0x90(%rbp), %rdi
movl $0xa, %edx
callq 0xdfb0
movl %eax, -0x274(%rbp)
jmp 0xbd83
movl -0x274(%rbp), %ecx
leaq 0x8474(%rip), %rax      # 0x14204
movl %ecx, (%rax)
leaq -0x90(%rbp), %rdi
callq 0x23c8
leaq -0x91(%rbp), %rdi
callq 0x2250
jmp 0xbde3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbdd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x23c8
leaq -0x91(%rbp), %rdi
callq 0x2250
jmp 0xdcc6
jmp 0xbde5
jmp 0xbde7
callq 0x3790
leaq -0xb8(%rbp), %rdi
callq 0x22c0
jmp 0xbdfa
movq 0x81d7(%rip), %rdi      # 0x13fd8
leaq -0xb8(%rbp), %rsi
callq 0x2070
jmp 0xbe0f
leaq -0xd0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
movl $0x20, %edx
callq 0xdcd0
jmp 0xbe29
movq 0x81a8(%rip), %rdi      # 0x13fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x2330
jmp 0xbe43
xorl %eax, %eax
movl %eax, %esi
leaq -0xd0(%rbp), %rdi
callq 0xdff0
movq %rax, -0x280(%rbp)
jmp 0xbe5c
movq -0x280(%rbp), %rsi
leaq -0xf0(%rbp), %rdi
callq 0x20d0
jmp 0xbe71
leaq 0x4250(%rip), %rsi      # 0x100c8
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x281(%rbp)
jmp 0xbe8c
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0xbe9b
jmp 0xc3c8
leaq -0xd0(%rbp), %rdi
movl $0x1, %esi
callq 0xdff0
movq %rax, -0x290(%rbp)
jmp 0xbeb5
movq -0x290(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0x20d0
jmp 0xbeca
leaq -0x118(%rbp), %rdi
callq 0xde50
movl %eax, -0x294(%rbp)
jmp 0xbede
leaq -0x118(%rbp), %rdi
callq 0x23c8
movl -0x294(%rbp), %eax
movl %eax, -0xf4(%rbp)
cmpl $0x0, -0xf4(%rbp)
je 0xc374
leaq -0xd0(%rbp), %rdi
movl $0x2, %esi
callq 0xdff0
movq %rax, -0x2a0(%rbp)
jmp 0xbf1d
movq -0x2a0(%rbp), %rsi
leaq -0x138(%rbp), %rdi
callq 0x20d0
jmp 0xbf32
leaq 0x41fb(%rip), %rsi      # 0x10134
leaq -0x138(%rbp), %rdi
callq 0xe060
movb %al, -0x2a1(%rbp)
jmp 0xbf4d
movb -0x2a1(%rbp), %al
testb $0x1, %al
jne 0xbf5c
jmp 0xc2ff
leaq 0x419f(%rip), %rsi      # 0x10102
leaq -0x138(%rbp), %rdi
callq 0xe060
movb %al, -0x2a2(%rbp)
jmp 0xbf77
movb -0x2a2(%rbp), %al
testb $0x1, %al
jne 0xbf86
jmp 0xc2ff
xorl %eax, %eax
movl %eax, %esi
leaq -0x138(%rbp), %rdi
callq 0x23b0
movq %rax, -0x2b0(%rbp)
jmp 0xbf9f
movq -0x2b0(%rbp), %rax
movb (%rax), %al
movb %al, -0x139(%rbp)
movl $0x0, -0x140(%rbp)
movsbl -0x139(%rbp), %eax
cmpl $0x41, %eax
jl 0xc06b
movsbl -0x139(%rbp), %eax
cmpl $0x5a, %eax
jg 0xc06b
movsbl -0x139(%rbp), %eax
subl $0x41, %eax
addl $0x1, %eax
movl %eax, -0x140(%rbp)
movsbl -0x139(%rbp), %eax
cmpl $0x49, %eax
jle 0xc069
movl -0x140(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x140(%rbp)
jmp 0xc069
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xdcba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xdc83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xdc77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x23c8
jmp 0xdc77
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xc363
jmp 0xc09b
movsbl -0x139(%rbp), %eax
subl $0x61, %eax
addl $0x1, %eax
movl %eax, -0x140(%rbp)
movsbl -0x139(%rbp), %eax
cmpl $0x69, %eax
jle 0xc099
movl -0x140(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x140(%rbp)
jmp 0xc09b
leaq -0x168(%rbp), %rdi
leaq -0x138(%rbp), %rsi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0x2220
jmp 0xc0bc
xorl %eax, %eax
movl %eax, %esi
leaq -0x168(%rbp), %rdi
movl $0xa, %edx
callq 0xdfb0
movl %eax, -0x2b4(%rbp)
jmp 0xc0d9
leaq -0x168(%rbp), %rdi
callq 0x23c8
movl -0x2b4(%rbp), %eax
movl %eax, -0x144(%rbp)
movl -0x140(%rbp), %edi
movl -0x144(%rbp), %esi
callq 0x8c30
movw %ax, -0x2b6(%rbp)
jmp 0xc10b
movw -0x2b6(%rbp), %ax
movw %ax, -0x16a(%rbp)
movw -0x16a(%rbp), %ax
movw %ax, 0x80e1(%rip)       # 0x14208
leaq 0xa82a(%rip), %rdi      # 0x16958
callq 0x8630
movq %rax, -0x2c0(%rbp)
jmp 0xc13c
movq -0x2c0(%rbp), %rsi
leaq 0x13846(%rip), %rax     # 0x1f990
movslq (%rax), %rdx
leaq 0xb83c(%rip), %rcx      # 0x17990
movq %rsi, (%rcx,%rdx,8)
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movl -0xf4(%rbp), %esi
movzwl -0x16a(%rbp), %edx
leaq 0xa7e6(%rip), %rdi      # 0x16958
callq 0x3d50
jmp 0xc179
testb $0x1, 0x145b0(%rip)     # 0x20730
je 0xc2fd
movq 0x7e63(%rip), %rdi      # 0x13ff0
movq 0x7e0c(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x2c8(%rbp)
jmp 0xc1a2
movq -0x2c8(%rbp), %rdi
leaq 0x3f57(%rip), %rsi      # 0x10107
callq 0x21f0
jmp 0xc1b7
movl $0x1, -0x170(%rbp)
movl -0x170(%rbp), %eax
leaq 0x8022(%rip), %rcx      # 0x141f0
cmpl (%rcx), %eax
jg 0xc241
movslq -0x170(%rbp), %rax
shlq $0x5, %rax
leaq 0x1420c(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x7e02(%rip), %rdi      # 0x13ff0
callq 0x21d0
movq %rax, -0x2d0(%rbp)
jmp 0xc1fc
movq -0x2d0(%rbp), %rdi
leaq 0x3eff(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xc211
jmp 0xc213
movl -0x170(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x170(%rbp)
jmp 0xc1c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x23c8
jmp 0xc363
movq 0x7da8(%rip), %rdi      # 0x13ff0
movq 0x7d51(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc256
leaq 0xa6fb(%rip), %rdi      # 0x16958
callq 0x8830
jmp 0xc264
movq 0x7d85(%rip), %rdi      # 0x13ff0
leaq 0x3e95(%rip), %rsi      # 0x10107
callq 0x21f0
jmp 0xc279
movl $0x1, -0x174(%rbp)
movl -0x174(%rbp), %eax
leaq 0x7f60(%rip), %rcx      # 0x141f0
cmpl (%rcx), %eax
jg 0xc2e6
movslq -0x174(%rbp), %rax
shlq $0x5, %rax
leaq 0x1414a(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x7d40(%rip), %rdi      # 0x13ff0
callq 0x21d0
movq %rax, -0x2d8(%rbp)
jmp 0xc2be
movq -0x2d8(%rbp), %rdi
leaq 0x3e3d(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xc2d3
jmp 0xc2d5
movl -0x174(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x174(%rbp)
jmp 0xc283
movq 0x7d03(%rip), %rdi      # 0x13ff0
movq 0x7cac(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc2fb
jmp 0xc2fd
jmp 0xc308
movw $0x8000, 0x7f00(%rip)   # imm = 0x8000
movq 0x7ca9(%rip), %rdi      # 0x13fb8
leaq 0x3df5(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x2e0(%rbp)
jmp 0xc324
movq -0x2e0(%rbp), %rdi
movq 0x7c6e(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x2e8(%rbp)
jmp 0xc340
movq -0x2e8(%rbp), %rdi
movq 0x7c52(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc355
leaq -0x138(%rbp), %rdi
callq 0x23c8
jmp 0xc3c3
leaq -0x138(%rbp), %rdi
callq 0x23c8
jmp 0xdc77
movq 0x7c3d(%rip), %rdi      # 0x13fb8
leaq 0x3d8c(%rip), %rsi      # 0x1010e
callq 0x21f0
movq %rax, -0x2f0(%rbp)
jmp 0xc390
movq -0x2f0(%rbp), %rdi
movq 0x7c02(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x2f8(%rbp)
jmp 0xc3ac
movq -0x2f8(%rbp), %rdi
movq 0x7be6(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc3c1
jmp 0xc3c3
jmp 0xdc42
leaq 0x3c87(%rip), %rsi      # 0x10056
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x2f9(%rbp)
jmp 0xc3e3
movb -0x2f9(%rbp), %al
testb $0x1, %al
jne 0xc3f2
jmp 0xc8d1
leaq -0xd0(%rbp), %rdi
movl $0x1, %esi
callq 0xdff0
movq %rax, -0x308(%rbp)
jmp 0xc40c
movq -0x308(%rbp), %rsi
leaq -0x198(%rbp), %rdi
callq 0x20d0
jmp 0xc421
leaq -0x198(%rbp), %rdi
callq 0xde50
movl %eax, -0x30c(%rbp)
jmp 0xc435
leaq -0x198(%rbp), %rdi
callq 0x23c8
movl -0x30c(%rbp), %eax
movl %eax, -0x178(%rbp)
cmpl $0x0, -0x178(%rbp)
je 0xc87d
callq 0x2050
movq %rax, -0x1a0(%rbp)
movl -0x178(%rbp), %edi
movzwl 0x7d95(%rip), %esi      # 0x14208
callq 0x9c00
movw %ax, -0x30e(%rbp)
jmp 0xc481
movw -0x30e(%rbp), %ax
movw %ax, -0x1a2(%rbp)
testb $0x1, 0x1429a(%rip)     # 0x20730
je 0xc597
callq 0x2050
movq %rax, -0x1b0(%rbp)
leaq -0x1b0(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xe0c0
movq %rax, -0x318(%rbp)
jmp 0xc4c4
movq -0x318(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0xe090
movsd %xmm0, -0x320(%rbp)
jmp 0xc4e8
movsd -0x320(%rbp), %xmm0
movsd %xmm0, -0x1b8(%rbp)
movq 0x7af1(%rip), %rdi      # 0x13ff0
leaq 0x3c18(%rip), %rsi      # 0x1011e
callq 0x21f0
movq %rax, -0x328(%rbp)
jmp 0xc514
leaq -0x1b8(%rbp), %rdi
callq 0xe110
movsd %xmm0, -0x330(%rbp)
jmp 0xc52a
movsd -0x330(%rbp), %xmm0
movq -0x328(%rbp), %rdi
callq 0x2390
movq %rax, -0x338(%rbp)
jmp 0xc547
movq -0x338(%rbp), %rdi
leaq 0x3bd8(%rip), %rsi      # 0x1012d
callq 0x21f0
movq %rax, -0x340(%rbp)
jmp 0xc563
movq -0x340(%rbp), %rdi
movq 0x7a2f(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc578
jmp 0xc597
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x23c8
jmp 0xdc77
movw -0x1a2(%rbp), %ax
movw %ax, 0x7c63(%rip)       # 0x14208
movzwl -0x1a2(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0xc605
movq 0x79fe(%rip), %rdi      # 0x13fb8
leaq 0x3b71(%rip), %rsi      # 0x10132
callq 0x21f0
movq %rax, -0x348(%rbp)
jmp 0xc5cf
movq -0x348(%rbp), %rdi
movq 0x79c3(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x350(%rbp)
jmp 0xc5eb
movq -0x350(%rbp), %rdi
movq 0x79a7(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc600
jmp 0xc87b
leaq 0xa34c(%rip), %rdi      # 0x16958
callq 0x8630
movq %rax, -0x358(%rbp)
jmp 0xc61a
movq -0x358(%rbp), %rsi
leaq 0x13368(%rip), %rax     # 0x1f990
movslq (%rax), %rdx
leaq 0xb35e(%rip), %rcx      # 0x17990
movq %rsi, (%rcx,%rdx,8)
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movl -0x178(%rbp), %esi
movzwl -0x1a2(%rbp), %edx
leaq 0xa308(%rip), %rdi      # 0x16958
callq 0x3d50
jmp 0xc657
testb $0x1, 0x140d2(%rip)     # 0x20730
je 0xc7be
movq 0x7985(%rip), %rdi      # 0x13ff0
movq 0x792e(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x360(%rbp)
jmp 0xc680
movq -0x360(%rbp), %rdi
leaq 0x3a79(%rip), %rsi      # 0x10107
callq 0x21f0
jmp 0xc695
movl $0x1, -0x1c4(%rbp)
movl -0x1c4(%rbp), %eax
leaq 0x7b44(%rip), %rcx      # 0x141f0
cmpl (%rcx), %eax
jg 0xc702
movslq -0x1c4(%rbp), %rax
shlq $0x5, %rax
leaq 0x13d2e(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x7924(%rip), %rdi      # 0x13ff0
callq 0x21d0
movq %rax, -0x368(%rbp)
jmp 0xc6da
movq -0x368(%rbp), %rdi
leaq 0x3a21(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xc6ef
jmp 0xc6f1
movl -0x1c4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c4(%rbp)
jmp 0xc69f
movq 0x78e7(%rip), %rdi      # 0x13ff0
movq 0x7890(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc717
leaq 0xa23a(%rip), %rdi      # 0x16958
callq 0x8830
jmp 0xc725
movq 0x78c4(%rip), %rdi      # 0x13ff0
leaq 0x39d4(%rip), %rsi      # 0x10107
callq 0x21f0
jmp 0xc73a
movl $0x1, -0x1c8(%rbp)
movl -0x1c8(%rbp), %eax
leaq 0x7a9f(%rip), %rcx      # 0x141f0
cmpl (%rcx), %eax
jg 0xc7a7
movslq -0x1c8(%rbp), %rax
shlq $0x5, %rax
leaq 0x13c89(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x787f(%rip), %rdi      # 0x13ff0
callq 0x21d0
movq %rax, -0x370(%rbp)
jmp 0xc77f
movq -0x370(%rbp), %rdi
leaq 0x397c(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xc794
jmp 0xc796
movl -0x1c8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c8(%rbp)
jmp 0xc744
movq 0x7842(%rip), %rdi      # 0x13ff0
movq 0x77eb(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc7bc
jmp 0xc7be
movq 0x77f3(%rip), %rdi      # 0x13fb8
leaq 0x393f(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x378(%rbp)
jmp 0xc7da
movzwl -0x1a2(%rbp), %edi
callq 0x8b80
movl %eax, -0x37c(%rbp)
jmp 0xc7ee
movq -0x378(%rbp), %rdi
movl -0x37c(%rbp), %eax
cltq
shlq $0x5, %rax
leaq 0x13be8(%rip), %rsi     # 0x203f0
addq %rax, %rsi
callq 0x21d0
movq %rax, -0x388(%rbp)
jmp 0xc819
movzwl -0x1a2(%rbp), %edi
callq 0x8ba0
movl %eax, -0x38c(%rbp)
jmp 0xc82d
movl -0x38c(%rbp), %esi
movq -0x388(%rbp), %rdi
callq 0x2340
movq %rax, -0x398(%rbp)
jmp 0xc848
movq -0x398(%rbp), %rdi
movq 0x774a(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x3a0(%rbp)
jmp 0xc864
movq -0x3a0(%rbp), %rdi
movq 0x772e(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc879
jmp 0xc87b
jmp 0xc8cc
movq 0x7734(%rip), %rdi      # 0x13fb8
leaq 0x3883(%rip), %rsi      # 0x1010e
callq 0x21f0
movq %rax, -0x3a8(%rbp)
jmp 0xc899
movq -0x3a8(%rbp), %rdi
movq 0x76f9(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x3b0(%rbp)
jmp 0xc8b5
movq -0x3b0(%rbp), %rdi
movq 0x76dd(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc8ca
jmp 0xc8cc
jmp 0xdc40
leaq 0x37a1(%rip), %rsi      # 0x10079
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x3b1(%rbp)
jmp 0xc8ec
movb -0x3b1(%rbp), %al
testb $0x1, %al
jne 0xc8fb
jmp 0xd07d
leaq -0xd0(%rbp), %rdi
movl $0x1, %esi
callq 0xdff0
movq %rax, -0x3c0(%rbp)
jmp 0xc915
movq -0x3c0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xdfb0
movl %eax, -0x3c4(%rbp)
jmp 0xc932
movl -0x3c4(%rbp), %eax
movl %eax, -0x1cc(%rbp)
leaq 0x78ab(%rip), %rax      # 0x141f0
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl $0x4, %eax
movl $0x9, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
movl %eax, -0x1d0(%rbp)
cmpl $0x2, -0x1cc(%rbp)
jl 0xc97c
movl -0x1cc(%rbp), %eax
cmpl -0x1d0(%rbp), %eax
jle 0xc9ce
movq 0x7635(%rip), %rdi      # 0x13fb8
leaq 0x37af(%rip), %rsi      # 0x10139
callq 0x21f0
movq %rax, -0x3d0(%rbp)
jmp 0xc998
movq -0x3d0(%rbp), %rdi
movq 0x75fa(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x3d8(%rbp)
jmp 0xc9b4
movq -0x3d8(%rbp), %rdi
movq 0x75de(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xc9c9
jmp 0xd078
leaq 0x9f83(%rip), %rdi      # 0x16958
callq 0x8600
movb %al, -0x3d9(%rbp)
jmp 0xc9e2
movb -0x3d9(%rbp), %al
testb $0x1, %al
jne 0xca40
jmp 0xc9ee
movq 0x75c3(%rip), %rdi      # 0x13fb8
leaq 0x3758(%rip), %rsi      # 0x10154
callq 0x21f0
movq %rax, -0x3e8(%rbp)
jmp 0xca0a
movq -0x3e8(%rbp), %rdi
movq 0x7588(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x3f0(%rbp)
jmp 0xca26
movq -0x3f0(%rbp), %rdi
movq 0x756c(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xca3b
jmp 0xd076
leaq 0x77a9(%rip), %rax      # 0x141f0
cmpl $0x7, (%rax)
jge 0xca9e
movq 0x7565(%rip), %rdi      # 0x13fb8
leaq 0x370f(%rip), %rsi      # 0x10169
callq 0x21f0
movq %rax, -0x3f8(%rbp)
jmp 0xca68
movq -0x3f8(%rbp), %rdi
movq 0x752a(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x400(%rbp)
jmp 0xca84
movq -0x400(%rbp), %rdi
movq 0x750e(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xca99
jmp 0xd074
leaq 0x774b(%rip), %rax      # 0x141f0
movl (%rax), %ecx
subl $0xd, %ecx
setge %cl
movzbl %cl, %ecx
addl $0x3, %ecx
movl %ecx, -0x1d4(%rbp)
movl -0x1d4(%rbp), %ecx
movl %ecx, -0x1d8(%rbp)
movl (%rax), %edx
movl %edx, %esi
incl %esi
movl %edx, %ecx
shrl $0x1f, %esi
movl %esi, %edx
leal 0x1(%rcx,%rdx), %ecx
sarl %ecx
movl %ecx, -0x1dc(%rbp)
movl (%rax), %eax
movl -0x1d4(%rbp), %ecx
subl %ecx, %eax
incl %eax
movl %eax, -0x1e0(%rbp)
movq 0x74c1(%rip), %rdi      # 0x13fb8
leaq 0x3682(%rip), %rsi      # 0x10180
callq 0x21f0
jmp 0xcb05
movl -0x1cc(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x408(%rbp)
subl $0x7, %eax
ja 0xd03f
movq -0x408(%rbp), %rax
leaq 0x34ee(%rip), %rcx      # 0x1001c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x1dc(%rbp), %esi
movl %esi, %edi
callq 0x8c30
movw %ax, -0x40a(%rbp)
jmp 0xcb4d
movw -0x40a(%rbp), %ax
movzwl %ax, %edx
leaq 0x9dfa(%rip), %rdi      # 0x16958
movl $0x1, %esi
callq 0x3d50
jmp 0xcb6a
movslq -0x1dc(%rbp), %rax
shlq $0x5, %rax
leaq 0x13874(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x7432(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x418(%rbp)
jmp 0xcb94
movq -0x418(%rbp), %rdi
movl -0x1dc(%rbp), %esi
callq 0x2340
movq %rax, -0x420(%rbp)
jmp 0xcbaf
movq -0x420(%rbp), %rdi
leaq 0x354c(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xcbc4
jmp 0xcbc6
movl -0x1dc(%rbp), %edi
movl -0x1e0(%rbp), %esi
callq 0x8c30
movw %ax, -0x422(%rbp)
jmp 0xcbe0
movw -0x422(%rbp), %ax
movzwl %ax, %edx
leaq 0x9d67(%rip), %rdi      # 0x16958
movl $0x1, %esi
callq 0x3d50
jmp 0xcbfd
movslq -0x1dc(%rbp), %rax
shlq $0x5, %rax
leaq 0x137e1(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x739f(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x430(%rbp)
jmp 0xcc27
movq -0x430(%rbp), %rdi
movl -0x1e0(%rbp), %esi
callq 0x2340
movq %rax, -0x438(%rbp)
jmp 0xcc42
movq -0x438(%rbp), %rdi
leaq 0x34b9(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xcc57
jmp 0xcc59
movl -0x1dc(%rbp), %edi
movl -0x1d8(%rbp), %esi
callq 0x8c30
movw %ax, -0x43a(%rbp)
jmp 0xcc73
movw -0x43a(%rbp), %ax
movzwl %ax, %edx
leaq 0x9cd4(%rip), %rdi      # 0x16958
movl $0x1, %esi
callq 0x3d50
jmp 0xcc90
movslq -0x1dc(%rbp), %rax
shlq $0x5, %rax
leaq 0x1374e(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x730c(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x448(%rbp)
jmp 0xccba
movq -0x448(%rbp), %rdi
movl -0x1d8(%rbp), %esi
callq 0x2340
movq %rax, -0x450(%rbp)
jmp 0xccd5
movq -0x450(%rbp), %rdi
leaq 0x3426(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xccea
jmp 0xccec
movl -0x1e0(%rbp), %edi
movl -0x1dc(%rbp), %esi
callq 0x8c30
movw %ax, -0x452(%rbp)
jmp 0xcd06
movw -0x452(%rbp), %ax
movzwl %ax, %edx
leaq 0x9c41(%rip), %rdi      # 0x16958
movl $0x1, %esi
callq 0x3d50
jmp 0xcd23
movslq -0x1e0(%rbp), %rax
shlq $0x5, %rax
leaq 0x136bb(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x7279(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x460(%rbp)
jmp 0xcd4d
movq -0x460(%rbp), %rdi
movl -0x1dc(%rbp), %esi
callq 0x2340
movq %rax, -0x468(%rbp)
jmp 0xcd68
movq -0x468(%rbp), %rdi
leaq 0x3393(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xcd7d
jmp 0xcd7f
movl -0x1d8(%rbp), %edi
movl -0x1dc(%rbp), %esi
callq 0x8c30
movw %ax, -0x46a(%rbp)
jmp 0xcd99
movw -0x46a(%rbp), %ax
movzwl %ax, %edx
leaq 0x9bae(%rip), %rdi      # 0x16958
movl $0x1, %esi
callq 0x3d50
jmp 0xcdb6
movslq -0x1d8(%rbp), %rax
shlq $0x5, %rax
leaq 0x13628(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x71e6(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x478(%rbp)
jmp 0xcde0
movq -0x478(%rbp), %rdi
movl -0x1dc(%rbp), %esi
callq 0x2340
movq %rax, -0x480(%rbp)
jmp 0xcdfb
movq -0x480(%rbp), %rdi
leaq 0x3300(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xce10
jmp 0xce12
movl -0x1e0(%rbp), %edi
movl -0x1d8(%rbp), %esi
callq 0x8c30
movw %ax, -0x482(%rbp)
jmp 0xce2c
movw -0x482(%rbp), %ax
movzwl %ax, %edx
leaq 0x9b1b(%rip), %rdi      # 0x16958
movl $0x1, %esi
callq 0x3d50
jmp 0xce49
movslq -0x1e0(%rbp), %rax
shlq $0x5, %rax
leaq 0x13595(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x7153(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x490(%rbp)
jmp 0xce73
movq -0x490(%rbp), %rdi
movl -0x1d8(%rbp), %esi
callq 0x2340
movq %rax, -0x498(%rbp)
jmp 0xce8e
movq -0x498(%rbp), %rdi
leaq 0x326d(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xcea3
jmp 0xcea5
movl -0x1d8(%rbp), %edi
movl -0x1e0(%rbp), %esi
callq 0x8c30
movw %ax, -0x49a(%rbp)
jmp 0xcebf
movw -0x49a(%rbp), %ax
movzwl %ax, %edx
leaq 0x9a88(%rip), %rdi      # 0x16958
movl $0x1, %esi
callq 0x3d50
jmp 0xcedc
movslq -0x1d8(%rbp), %rax
shlq $0x5, %rax
leaq 0x13502(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x70c0(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x4a8(%rbp)
jmp 0xcf06
movq -0x4a8(%rbp), %rdi
movl -0x1e0(%rbp), %esi
callq 0x2340
movq %rax, -0x4b0(%rbp)
jmp 0xcf21
movq -0x4b0(%rbp), %rdi
leaq 0x31da(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xcf36
jmp 0xcf38
movl -0x1d8(%rbp), %esi
movl %esi, %edi
callq 0x8c30
movw %ax, -0x4b2(%rbp)
jmp 0xcf4e
movw -0x4b2(%rbp), %ax
movzwl %ax, %edx
leaq 0x99f9(%rip), %rdi      # 0x16958
movl $0x1, %esi
callq 0x3d50
jmp 0xcf6b
movl -0x1e0(%rbp), %esi
movl %esi, %edi
callq 0x8c30
movw %ax, -0x4b4(%rbp)
jmp 0xcf81
movw -0x4b4(%rbp), %ax
movzwl %ax, %edx
leaq 0x99c6(%rip), %rdi      # 0x16958
movl $0x1, %esi
callq 0x3d50
jmp 0xcf9e
movslq -0x1d8(%rbp), %rax
shlq $0x5, %rax
leaq 0x13440(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x6ffe(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x4c0(%rbp)
jmp 0xcfc8
movq -0x4c0(%rbp), %rdi
movl -0x1d8(%rbp), %esi
callq 0x2340
movq %rax, -0x4c8(%rbp)
jmp 0xcfe3
movq -0x4c8(%rbp), %rdi
leaq 0x3118(%rip), %rsi      # 0x10109
callq 0x21f0
movq %rax, -0x4d0(%rbp)
jmp 0xcfff
movq -0x4d0(%rbp), %rdi
movslq -0x1e0(%rbp), %rax
shlq $0x5, %rax
leaq 0x133d8(%rip), %rsi     # 0x203f0
addq %rax, %rsi
callq 0x21d0
movq %rax, -0x4d8(%rbp)
jmp 0xd029
movq -0x4d8(%rbp), %rdi
movl -0x1e0(%rbp), %esi
callq 0x2340
jmp 0xd03d
jmp 0xd03f
jmp 0xd041
movq 0x6f70(%rip), %rdi      # 0x13fb8
movq 0x6f51(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x4e0(%rbp)
jmp 0xd05d
movq -0x4e0(%rbp), %rdi
movq 0x6f35(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd072
jmp 0xd074
jmp 0xd076
jmp 0xd078
jmp 0xdc3e
leaq 0x2fda(%rip), %rsi      # 0x1005e
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x4e1(%rbp)
jmp 0xd098
movb -0x4e1(%rbp), %al
testb $0x1, %al
jne 0xd0a7
jmp 0xd1d8
leaq -0xd0(%rbp), %rdi
movl $0x1, %esi
callq 0xdff0
movq %rax, -0x4f0(%rbp)
jmp 0xd0c1
movq -0x4f0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0xdfb0
movl %eax, -0x4f4(%rbp)
jmp 0xd0de
movl -0x4f4(%rbp), %eax
movl %eax, -0x1e4(%rbp)
cmpl $0x3, -0x1e4(%rbp)
jl 0xd0fc
cmpl $0x15, -0x1e4(%rbp)
jle 0xd14e
movq 0x6eb5(%rip), %rdi      # 0x13fb8
leaq 0x3079(%rip), %rsi      # 0x10183
callq 0x21f0
movq %rax, -0x500(%rbp)
jmp 0xd118
movq -0x500(%rbp), %rdi
movq 0x6e7a(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x508(%rbp)
jmp 0xd134
movq -0x508(%rbp), %rdi
movq 0x6e5e(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd149
jmp 0xd1d3
movl -0x1e4(%rbp), %ecx
leaq 0x7095(%rip), %rax      # 0x141f0
movl %ecx, (%rax)
movl -0x1e4(%rbp), %ecx
addl $0x2, %ecx
leaq 0x7087(%rip), %rax      # 0x141f4
movl %ecx, (%rax)
leaq 0x97e2(%rip), %rdi      # 0x16958
callq 0x8650
jmp 0xd17d
callq 0xb560
jmp 0xd184
movq 0x6e2d(%rip), %rdi      # 0x13fb8
leaq 0x2f79(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x510(%rbp)
jmp 0xd1a0
movq -0x510(%rbp), %rdi
movq 0x6df2(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x518(%rbp)
jmp 0xd1bc
movq -0x518(%rbp), %rdi
movq 0x6dd6(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd1d1
jmp 0xd1d3
jmp 0xdc3c
leaq 0x2e89(%rip), %rsi      # 0x10068
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x519(%rbp)
jmp 0xd1f3
movb -0x519(%rbp), %al
testb $0x1, %al
jne 0xd1ff
jmp 0xd26f
movw $0x8000, 0x7000(%rip)   # imm = 0x8000
leaq 0x9749(%rip), %rdi      # 0x16958
callq 0x8650
jmp 0xd216
callq 0xb560
jmp 0xd21d
movq 0x6d94(%rip), %rdi      # 0x13fb8
leaq 0x2ee0(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x528(%rbp)
jmp 0xd239
movq -0x528(%rbp), %rdi
movq 0x6d59(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x530(%rbp)
jmp 0xd255
movq -0x530(%rbp), %rdi
movq 0x6d3d(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd26a
jmp 0xdc3a
leaq 0x2dfe(%rip), %rsi      # 0x10074
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x531(%rbp)
jmp 0xd28a
movb -0x531(%rbp), %al
testb $0x1, %al
jne 0xd299
jmp 0xd342
leaq -0xd0(%rbp), %rdi
movl $0x1, %esi
callq 0xdff0
movq %rax, -0x540(%rbp)
jmp 0xd2b3
movq -0x540(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xe130
movss %xmm0, -0x544(%rbp)
jmp 0xd2cd
movss -0x544(%rbp), %xmm0
movss %xmm0, -0x1e8(%rbp)
movss -0x1e8(%rbp), %xmm0
leaq 0x6f14(%rip), %rax      # 0x14200
movss %xmm0, (%rax)
movq 0x6cc1(%rip), %rdi      # 0x13fb8
leaq 0x2e0d(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x550(%rbp)
jmp 0xd30c
movq -0x550(%rbp), %rdi
movq 0x6c86(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x558(%rbp)
jmp 0xd328
movq -0x558(%rbp), %rdi
movq 0x6c6a(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd33d
jmp 0xdc38
leaq 0x2d3f(%rip), %rsi      # 0x10088
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x559(%rbp)
jmp 0xd35d
movb -0x559(%rbp), %al
testb $0x1, %al
jne 0xd369
jmp 0xd3bb
movq 0x6c48(%rip), %rdi      # 0x13fb8
leaq 0x2e20(%rip), %rsi      # 0x10197
callq 0x21f0
movq %rax, -0x568(%rbp)
jmp 0xd385
movq -0x568(%rbp), %rdi
movq 0x6c0d(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x570(%rbp)
jmp 0xd3a1
movq -0x570(%rbp), %rdi
movq 0x6bf1(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd3b6
jmp 0xdc36
leaq 0x2cd7(%rip), %rsi      # 0x10099
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x571(%rbp)
jmp 0xd3d6
movb -0x571(%rbp), %al
testb $0x1, %al
jne 0xd3e2
jmp 0xd450
movq 0x6bcf(%rip), %rdi      # 0x13fb8
leaq 0x2d1b(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x580(%rbp)
jmp 0xd3fe
movq -0x580(%rbp), %rdi
leaq 0x12ddc(%rip), %rsi     # 0x201e8
callq 0x21d0
movq %rax, -0x588(%rbp)
jmp 0xd41a
movq -0x588(%rbp), %rdi
movq 0x6b78(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x590(%rbp)
jmp 0xd436
movq -0x590(%rbp), %rdi
movq 0x6b5c(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd44b
jmp 0xdc34
leaq 0x2c3a(%rip), %rsi      # 0x10091
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x591(%rbp)
jmp 0xd46b
movb -0x591(%rbp), %al
testb $0x1, %al
jne 0xd477
jmp 0xd4e5
movq 0x6b3a(%rip), %rdi      # 0x13fb8
leaq 0x2c86(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x5a0(%rbp)
jmp 0xd493
movq -0x5a0(%rbp), %rdi
leaq 0x12d67(%rip), %rsi     # 0x20208
callq 0x21d0
movq %rax, -0x5a8(%rbp)
jmp 0xd4af
movq -0x5a8(%rbp), %rdi
movq 0x6ae3(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x5b0(%rbp)
jmp 0xd4cb
movq -0x5b0(%rbp), %rdi
movq 0x6ac7(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd4e0
jmp 0xdc32
leaq 0x2bb2(%rip), %rsi      # 0x1009e
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x5b1(%rbp)
jmp 0xd500
movb -0x5b1(%rbp), %al
testb $0x1, %al
jne 0xd50f
jmp 0xd640
movb $0x0, -0x1e9(%rbp)
movl $0x0, -0x1f0(%rbp)
cmpl $0xe, -0x1f0(%rbp)
jge 0xd594
movslq -0x1f0(%rbp), %rcx
shlq $0x5, %rcx
leaq 0x12cf5(%rip), %rax     # 0x20230
addq %rcx, %rax
movq %rax, -0x5c8(%rbp)
leaq -0xd0(%rbp), %rdi
movl $0x1, %esi
callq 0xdff0
movq %rax, -0x5c0(%rbp)
jmp 0xd55f
movq -0x5c0(%rbp), %rsi
movq -0x5c8(%rbp), %rdi
callq 0xe170
testb $0x1, %al
jne 0xd578
jmp 0xd581
movb $0x1, -0x1e9(%rbp)
jmp 0xd594
jmp 0xd583
movl -0x1f0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f0(%rbp)
jmp 0xd520
testb $0x1, -0x1e9(%rbp)
je 0xd5ec
movq 0x6a14(%rip), %rdi      # 0x13fb8
leaq 0x2bf0(%rip), %rsi      # 0x1019b
callq 0x21f0
movq %rax, -0x5d0(%rbp)
jmp 0xd5b9
movq -0x5d0(%rbp), %rdi
movq 0x69d9(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x5d8(%rbp)
jmp 0xd5d5
movq -0x5d8(%rbp), %rdi
movq 0x69bd(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd5ea
jmp 0xd63b
movq 0x69c5(%rip), %rdi      # 0x13fb8
leaq 0x2ba8(%rip), %rsi      # 0x101a2
callq 0x21f0
movq %rax, -0x5e0(%rbp)
jmp 0xd608
movq -0x5e0(%rbp), %rdi
movq 0x698a(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x5e8(%rbp)
jmp 0xd624
movq -0x5e8(%rbp), %rdi
movq 0x696e(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd639
jmp 0xd63b
jmp 0xdc30
leaq 0x2a65(%rip), %rsi      # 0x100ac
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x5e9(%rbp)
jmp 0xd65b
movb -0x5e9(%rbp), %al
testb $0x1, %al
jne 0xd66a
jmp 0xd71a
movq 0x6947(%rip), %rdi      # 0x13fb8
leaq 0x2a93(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x5f8(%rbp)
jmp 0xd686
movq -0x5f8(%rbp), %rdi
movq 0x690c(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd69b
movl $0x0, -0x1f4(%rbp)
cmpl $0xe, -0x1f4(%rbp)
jge 0xd700
movslq -0x1f4(%rbp), %rax
shlq $0x5, %rax
leaq 0x12b70(%rip), %rsi     # 0x20230
addq %rax, %rsi
movq 0x68ee(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x600(%rbp)
jmp 0xd6d8
movq -0x600(%rbp), %rdi
movq 0x68ba(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd6ed
jmp 0xd6ef
movl -0x1f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f4(%rbp)
jmp 0xd6a5
movq 0x68b1(%rip), %rdi      # 0x13fb8
movq 0x6892(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd715
jmp 0xdc2e
leaq 0x2999(%rip), %rsi      # 0x100ba
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x601(%rbp)
jmp 0xd735
movb -0x601(%rbp), %al
testb $0x1, %al
jne 0xd744
jmp 0xd8d2
movq 0x686d(%rip), %rdi      # 0x13fb8
leaq 0x29b9(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x610(%rbp)
jmp 0xd760
movq -0x610(%rbp), %rdi
movq 0x6832(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd775
movq 0x683c(%rip), %rdi      # 0x13fb8
leaq 0x2984(%rip), %rsi      # 0x10107
callq 0x21f0
jmp 0xd78a
movl $0x1, -0x1f8(%rbp)
movl -0x1f8(%rbp), %eax
leaq 0x6a4f(%rip), %rcx      # 0x141f0
cmpl (%rcx), %eax
jg 0xd7f7
movslq -0x1f8(%rbp), %rax
shlq $0x5, %rax
leaq 0x12c39(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x67f7(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x618(%rbp)
jmp 0xd7cf
movq -0x618(%rbp), %rdi
leaq 0x292c(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xd7e4
jmp 0xd7e6
movl -0x1f8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f8(%rbp)
jmp 0xd794
movq 0x67ba(%rip), %rdi      # 0x13fb8
movq 0x679b(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd80c
leaq 0x9145(%rip), %rdi      # 0x16958
callq 0x8680
jmp 0xd81a
movq 0x6797(%rip), %rdi      # 0x13fb8
leaq 0x28df(%rip), %rsi      # 0x10107
callq 0x21f0
jmp 0xd82f
movl $0x1, -0x1fc(%rbp)
movl -0x1fc(%rbp), %eax
leaq 0x69aa(%rip), %rcx      # 0x141f0
cmpl (%rcx), %eax
jg 0xd89c
movslq -0x1fc(%rbp), %rax
shlq $0x5, %rax
leaq 0x12b94(%rip), %rsi     # 0x203f0
addq %rax, %rsi
movq 0x6752(%rip), %rdi      # 0x13fb8
callq 0x21d0
movq %rax, -0x620(%rbp)
jmp 0xd874
movq -0x620(%rbp), %rdi
leaq 0x2887(%rip), %rsi      # 0x10109
callq 0x21f0
jmp 0xd889
jmp 0xd88b
movl -0x1fc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1fc(%rbp)
jmp 0xd839
movq 0x6715(%rip), %rdi      # 0x13fb8
movq 0x66f6(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x628(%rbp)
jmp 0xd8b8
movq -0x628(%rbp), %rdi
movq 0x66da(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xd8cd
jmp 0xdc2c
leaq 0x27eb(%rip), %rsi      # 0x100c4
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x629(%rbp)
jmp 0xd8ed
movb -0x629(%rbp), %al
testb $0x1, %al
jne 0xd8fc
jmp 0xdb59
movl $0x1, -0x200(%rbp)
movw $0x0, -0x202(%rbp)
movw $0x8000, -0x204(%rbp)   # imm = 0x8000
movzwl -0x202(%rbp), %ecx
movb $0x1, %al
cmpl $0x8000, %ecx           # imm = 0x8000
movb %al, -0x62a(%rbp)
jne 0xd944
movzwl -0x204(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
setne %al
movb %al, -0x62a(%rbp)
movb -0x62a(%rbp), %al
testb $0x1, %al
jne 0xd953
jmp 0xdb07
movw -0x204(%rbp), %ax
movw %ax, -0x202(%rbp)
callq 0x2050
movq %rax, -0x210(%rbp)
movl -0x200(%rbp), %edi
movzwl -0x202(%rbp), %esi
callq 0x9c00
movw %ax, -0x62c(%rbp)
jmp 0xd988
movw -0x62c(%rbp), %ax
movw %ax, -0x204(%rbp)
testb $0x1, 0x12d93(%rip)     # 0x20730
je 0xda81
callq 0x2050
movq %rax, -0x218(%rbp)
leaq -0x218(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0xe0c0
movq %rax, -0x638(%rbp)
jmp 0xd9cb
movq -0x638(%rbp), %rax
movq %rax, -0x228(%rbp)
leaq -0x228(%rbp), %rdi
callq 0xe090
movsd %xmm0, -0x640(%rbp)
jmp 0xd9ef
movsd -0x640(%rbp), %xmm0
movsd %xmm0, -0x220(%rbp)
movq 0x65ea(%rip), %rdi      # 0x13ff0
leaq 0x2711(%rip), %rsi      # 0x1011e
callq 0x21f0
movq %rax, -0x648(%rbp)
jmp 0xda1b
leaq -0x220(%rbp), %rdi
callq 0xe110
movsd %xmm0, -0x650(%rbp)
jmp 0xda31
movsd -0x650(%rbp), %xmm0
movq -0x648(%rbp), %rdi
callq 0x2390
movq %rax, -0x658(%rbp)
jmp 0xda4e
movq -0x658(%rbp), %rdi
leaq 0x26d1(%rip), %rsi      # 0x1012d
callq 0x21f0
movq %rax, -0x660(%rbp)
jmp 0xda6a
movq -0x660(%rbp), %rdi
movq 0x6528(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xda7f
jmp 0xda81
movzwl -0x204(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
je 0xdae3
leaq 0x8ec2(%rip), %rdi      # 0x16958
callq 0x8630
movq %rax, -0x668(%rbp)
jmp 0xdaa4
movq -0x668(%rbp), %rsi
leaq 0x11ede(%rip), %rax     # 0x1f990
movslq (%rax), %rdx
leaq 0x9ed4(%rip), %rcx      # 0x17990
movq %rsi, (%rcx,%rdx,8)
movl (%rax), %ecx
incl %ecx
movl %ecx, (%rax)
movl -0x200(%rbp), %esi
movzwl -0x204(%rbp), %edx
leaq 0x8e7e(%rip), %rdi      # 0x16958
callq 0x3d50
jmp 0xdae1
jmp 0xdae3
movl -0x200(%rbp), %edi
callq 0x8c10
movl %eax, -0x66c(%rbp)
jmp 0xdaf6
movl -0x66c(%rbp), %eax
movl %eax, -0x200(%rbp)
jmp 0xd918
movq 0x64aa(%rip), %rdi      # 0x13fb8
leaq 0x25f6(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x678(%rbp)
jmp 0xdb23
movq -0x678(%rbp), %rdi
movq 0x646f(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x680(%rbp)
jmp 0xdb3f
movq -0x680(%rbp), %rdi
movq 0x6453(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xdb54
jmp 0xdc2a
leaq 0x256d(%rip), %rsi      # 0x100cd
leaq -0xf0(%rbp), %rdi
callq 0xe030
movb %al, -0x681(%rbp)
jmp 0xdb74
movb -0x681(%rbp), %al
testb $0x1, %al
jne 0xdb80
jmp 0xdbd9
movq 0x6431(%rip), %rdi      # 0x13fb8
leaq 0x257d(%rip), %rsi      # 0x1010b
callq 0x21f0
movq %rax, -0x690(%rbp)
jmp 0xdb9c
movq -0x690(%rbp), %rdi
movq 0x63f6(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x698(%rbp)
jmp 0xdbb8
movq -0x698(%rbp), %rdi
movq 0x63da(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xdbcd
movl $0x3, -0x22c(%rbp)
jmp 0xdc4c
movq 0x63d8(%rip), %rdi      # 0x13fb8
leaq 0x25c3(%rip), %rsi      # 0x101aa
callq 0x21f0
movq %rax, -0x6a0(%rbp)
jmp 0xdbf5
movq -0x6a0(%rbp), %rdi
movq 0x639d(%rip), %rsi      # 0x13fa0
callq 0x2230
movq %rax, -0x6a8(%rbp)
jmp 0xdc11
movq -0x6a8(%rbp), %rdi
movq 0x6381(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xdc26
jmp 0xdc28
jmp 0xdc2a
jmp 0xdc2c
jmp 0xdc2e
jmp 0xdc30
jmp 0xdc32
jmp 0xdc34
jmp 0xdc36
jmp 0xdc38
jmp 0xdc3a
jmp 0xdc3c
jmp 0xdc3e
jmp 0xdc40
jmp 0xdc42
movl $0x0, -0x22c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x23c8
leaq -0xd0(%rbp), %rdi
callq 0xe200
movl -0x22c(%rbp), %eax
testl %eax, %eax
je 0xdc72
jmp 0xdc70
jmp 0xdc91
jmp 0xbdf8
leaq -0xf0(%rbp), %rdi
callq 0x23c8
leaq -0xd0(%rbp), %rdi
callq 0xe200
jmp 0xdcba
movl $0x0, -0x4(%rbp)
movl $0x1, -0x22c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x23c8
movl -0x4(%rbp), %eax
addq $0x6b0, %rsp            # imm = 0x6B0
popq %rbp
retq
leaq -0xb8(%rbp), %rdi
callq 0x23c8
movq -0x40(%rbp), %rdi
callq 0x2350
nop