// File: jeffreyan11[P]go-engine/search.cpp
// Function: generateMove(int, unsigned short)
Move generateMove(Player p, Move lastMove) {
    MoveList legalMoves = game.getLegalMoves(p);
    MoveList localMoves = game.getLocalMoves(lastMove);

    // Pass if every move is either into your own eye, a suicide, or places
    // a chain into atari
    bool playPass = true;
    for (unsigned int n = 0; n < legalMoves.size(); n++) {
        Board copy = Board(game);
        Move m = legalMoves.get(n);

        if (!copy.isMoveValid(otherPlayer(p), m) && copy.isEye(p, m))
            continue;

        if (!copy.isMoveValid(p, m))
            continue;

        copy.doMove(p, m);
        if (copy.isInAtari(m))
            continue;

        playPass = false;
        break;
    }

    if (playPass)
        return MOVE_PASS;


    MCTree searchTree;
    float komiAdjustment = 0.0;
    Move captureLastStone = game.getPotentialCapture(lastMove);
    Move potentialEscape = game.getPotentialEscape(p, lastMove);

    // Add all first-level moves
    for (unsigned int n = 0; n < legalMoves.size(); n++) {
        Board copy = Board(game);
        Player genPlayer = p;

        Move next = legalMoves.get(n);
        // Check legality of moves (suicide)
        if (!copy.isMoveValid(genPlayer, next))
            continue;

        copy.doMove(genPlayer, next);
        // Never place own chain in atari
        if (copy.isInAtari(next))
            continue;

        // Check for ko rule violation
        bool koViolation = false;
        if (next != MOVE_PASS) {
            uint64_t newKey = copy.getZobristKey();
            for (int i = keyStackSize-1; i >= 0; i--) {
                if (newKey == keyStack[i]) {
                    koViolation = true;
                    break;
                }
            }
        }
        if (koViolation)
            continue;

        // First level moves are added to the root
        MCNode *leaf = searchTree.root;
        MCNode *addition = new MCNode();
        addition->parent = leaf;
        addition->m = next;

        // Play out a random game. The final board state will be stored in copy.
        playRandomGame(otherPlayer(genPlayer), copy);

        // Score the game
        float myScore = 0.0, oppScore = 0.0;
        scoreGame(genPlayer, copy, myScore, oppScore);
        if (myScore > oppScore)
            addition->numerator++;
        addition->scoreDiff = ((int) myScore) - ((int) oppScore);
        komiAdjustment += myScore - oppScore;

        // Add the new node to the tree
        leaf->children[leaf->size] = addition;
        leaf->size++;

        // Backpropagate the results
        searchTree.backPropagate(addition);

        // Do priors, if any
        // Own eye and opening priors inspired by Pachi,
        // written by Petr Baudis and Jean-loup Gailly
        int basePrior = boardSize * boardSize / 8;
        // Discourage playing into own eyes
        if (game.isEye(genPlayer, next)) {
            addition->denominator += basePrior;
            // If this eye is not ko-related we almost certainly should not play
            // in it
            if (!game.isMoveValid(otherPlayer(genPlayer), next)) {
                addition->denominator += 10 * basePrior;
                addition->scoreDiff -= 10 * 360;
            }
        }

        // Discourage playing onto edges and encourage playing onto the 4th line
        // in 13x13 and 19x19 openings
        unsigned int openingMoves = boardSize * boardSize - boardSize;
        if ((boardSize == 13 || boardSize == 19) && legalMoves.size() > openingMoves) {
            int x = getX(next);
            int y = getY(next);
            if (x == 1 || x == 19 || y == 1 || y == 19) {
                addition->denominator += 2 * basePrior;
            }
            else {
                int taperedPrior = basePrior * (legalMoves.size() - openingMoves) / boardSize;
                if (x == 4 || x == boardSize-3) {
                    addition->numerator += 2 * taperedPrior;
                    addition->denominator += 2 * taperedPrior;
                }
                if (y == 4 || y == boardSize-3) {
                    addition->numerator += 2 * taperedPrior;
                    addition->denominator += 2 * taperedPrior;
                }
                if (x == 3 || x == boardSize-2 || y == 3 || y == boardSize-2) {
                    addition->numerator += taperedPrior;
                    addition->denominator += taperedPrior;
                }
            }
        }
        // And the same for 9x9
        else if (boardSize == 9 && legalMoves.size() > openingMoves) {
            int x = getX(next);
            int y = getY(next);
            if (x == 1 || x == boardSize || y == 1 || y == boardSize) {
                addition->denominator += 2 * basePrior;
            }
            else {
                int taperedPrior = basePrior * (legalMoves.size() - openingMoves) / boardSize;
                if (x == 3 || x == boardSize-2) {
                    addition->numerator += 2 * taperedPrior;
                    addition->denominator += 2 * taperedPrior;
                }
                if (y == 3 || y == boardSize-2) {
                    addition->numerator += 2 * taperedPrior;
                    addition->denominator += 2 * taperedPrior;
                }
            }
        }

        // Add a bonus for capturing a chain that the opponent placed
        // into atari on the previous move
        if (next == captureLastStone) {
            addition->numerator += 5 * basePrior;
            addition->denominator += 5 * basePrior;
        }

        // Add a bonus for escaping when the opponent's last move
        // placed our chain into atari
        if (next == potentialEscape) {
            addition->numerator += 5 * basePrior;
            addition->denominator += 5 * basePrior;
        }

        // Add a bonus to local moves
        if (legalMoves.size() < openingMoves) {
            int li = localMoves.find(next);
            if (li != -1) {
                localMoves.removeFast(li);
            }
            else {
                addition->numerator += basePrior;
                addition->denominator += 2 * basePrior;
            }
        }
    }

    // If we have no moves that are ko-legal, pass.
    if (searchTree.root->size == 0)
        return MOVE_PASS;

    // Calculate an estimate of a komi adjustment
    komiAdjustment /= legalMoves.size();


    // Expand the MC tree iteratively
    for (int n = 0; n < playouts; n++) {
        Board copy = Board(game);
        Player genPlayer = p;

        // Find a node in the tree to add a child to
        int depth = -1;
        MCNode *leaf = searchTree.findLeaf(genPlayer, copy, depth);

        MCNode *addition = new MCNode();
        addition->parent = leaf;
        MoveList candidates = copy.getLegalMoves(genPlayer);
        candidates.add(MOVE_PASS);

        // Set up a permutation matrix
        int *permutation = new int[candidates.size()];
        // Fisher-Yates shuffle
        for (unsigned int i = 0; i < candidates.size(); i++) {
            std::uniform_int_distribution<int> distribution(0, i);
            int j = distribution(rng);
            permutation[i] = permutation[j];
            permutation[j] = i;
        }

        // Find a random move that has not been explored yet
        Move next = 0;
        for (unsigned int i = 0; i < candidates.size(); i++) {
            next = candidates.get(permutation[i]);

            bool used = false;
            for (int j = 0; j < leaf->size; j++) {
                if (next == leaf->children[j]->m) {
                    used = true;
                    break;
                }
            }

            if (!used && copy.isMoveValid(genPlayer, next))
                break;
        }

        delete[] permutation;

        addition->m = next;
        copy.doMove(genPlayer, next);

        // Play out a random game. The final board state will be stored in copy.
        playRandomGame(otherPlayer(genPlayer), copy);

        // Score the game... somehow...
        float myScore = 0.0, oppScore = 0.0;
        scoreGame(genPlayer, copy, myScore, oppScore);
        myScore += (genPlayer == p) ? -komiAdjustment : komiAdjustment;

        if (myScore > oppScore) {
            addition->numerator++;
            // If the node is not a child of root
            if (depth)
                raveTable.inc(next, depth);
        }
        else {
            if (depth)
                raveTable.dec(next, depth);
        }
        addition->scoreDiff = ((int) myScore) - ((int) oppScore);

        // Add the new node to the tree
        leaf->children[leaf->size] = addition;
        leaf->size++;

        // Backpropagate the results
        searchTree.backPropagate(addition);
    }


    // Find the highest scoring move
    Move bestMove = searchTree.root->children[0]->m;
    double bestScore = 0.0;
    int64_t diff = -(1 << 30);
    int maxRAVE = raveTable.max();
    for (int i = 0; i < searchTree.root->size; i++) {
        double candidateScore = (double) searchTree.root->children[i]->numerator
                              / (double) searchTree.root->children[i]->denominator;
                            // +   (double) raveTable.score(searchTree.root->children[i]->m)
                            //   / ((double) maxRAVE)
                            //   / (16 + std::sqrt(searchTree.root->children[i]->denominator))
                            // +   (double) searchTree.root->children[i]->scoreDiff
                            //   / (double) (360 * 32);

        // if (candidateScore > bestScore) {
        //     bestScore = candidateScore;
        //     bestMove = searchTree.root->children[i]->m;
        // }

        if (debugOutput) {
            std::cerr << "(" << getX(searchTree.root->children[i]->m) << ", "
                      << getY(searchTree.root->children[i]->m) << "): "
                      << searchTree.root->children[i]->numerator << " / "
                      << searchTree.root->children[i]->denominator << std::endl;
        }

        if (candidateScore > bestScore
         || (candidateScore == bestScore && searchTree.root->children[i]->scoreDiff > diff)) {
            bestScore = candidateScore;
            bestMove = searchTree.root->children[i]->m;
            diff = searchTree.root->children[i]->scoreDiff;
        }
    }

    raveTable.age();

    return bestMove;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3ee0, %rsp           # imm = 0x3EE0
movw %si, %ax
movl %edi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl -0x8(%rbp), %edx
leaq 0xcd39(%rip), %rsi      # 0x16958
movq %rsi, -0x3db8(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x5a50
movq -0x3db8(%rbp), %rsi
movzwl -0xa(%rbp), %edx
leaq -0x814(%rbp), %rdi
callq 0x7c60
jmp 0x9c4b
movb $0x1, -0x825(%rbp)
movl $0x0, -0x82c(%rbp)
movl -0x82c(%rbp), %eax
movl %eax, -0x3dc0(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3dbc(%rbp)
jmp 0x9c7c
movl -0x3dc0(%rbp), %eax
movl -0x3dbc(%rbp), %ecx
cmpl %ecx, %eax
jae 0x9e58
leaq 0xccc1(%rip), %rsi      # 0x16958
leaq -0x1860(%rbp), %rdi
callq 0x3a50
jmp 0x9ca5
movl -0x82c(%rbp), %esi
leaq -0x410(%rbp), %rdi
callq 0xb5e0
movw %ax, -0x3dc2(%rbp)
jmp 0x9cc0
movw -0x3dc2(%rbp), %ax
movw %ax, -0x1862(%rbp)
movl -0x8(%rbp), %edi
callq 0x8c10
movl %eax, -0x3dc8(%rbp)
jmp 0x9cde
movl -0x3dc8(%rbp), %esi
movzwl -0x1862(%rbp), %edx
leaq -0x1860(%rbp), %rdi
callq 0x53f0
movb %al, -0x3dc9(%rbp)
jmp 0x9cff
movb -0x3dc9(%rbp), %al
testb $0x1, %al
jne 0x9d99
jmp 0x9d0f
movl -0x8(%rbp), %esi
movzwl -0x1862(%rbp), %edx
leaq -0x1860(%rbp), %rdi
callq 0x5890
movb %al, -0x3dca(%rbp)
jmp 0x9d2d
movb -0x3dca(%rbp), %al
testb $0x1, %al
jne 0x9d39
jmp 0x9d99
movl $0x4, -0x1868(%rbp)
jmp 0x9e2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0xb14e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0xb142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0x1860(%rbp), %rdi
callq 0x3c50
jmp 0xb142
movl -0x8(%rbp), %esi
movzwl -0x1862(%rbp), %edx
leaq -0x1860(%rbp), %rdi
callq 0x53f0
movb %al, -0x3dcb(%rbp)
jmp 0x9db7
movb -0x3dcb(%rbp), %al
testb $0x1, %al
jne 0x9dcf
jmp 0x9dc3
movl $0x4, -0x1868(%rbp)
jmp 0x9e2b
movl -0x8(%rbp), %esi
movzwl -0x1862(%rbp), %edx
leaq -0x1860(%rbp), %rdi
callq 0x3d50
jmp 0x9de7
movzwl -0x1862(%rbp), %esi
leaq -0x1860(%rbp), %rdi
callq 0x6990
movb %al, -0x3dcc(%rbp)
jmp 0x9e02
movb -0x3dcc(%rbp), %al
testb $0x1, %al
jne 0x9e0e
jmp 0x9e1a
movl $0x4, -0x1868(%rbp)
jmp 0x9e2b
movb $0x0, -0x825(%rbp)
movl $0x2, -0x1868(%rbp)
leaq -0x1860(%rbp), %rdi
callq 0x3c50
movl -0x1868(%rbp), %eax
subl $0x2, %eax
je 0x9e58
jmp 0x9e44
movl -0x82c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x82c(%rbp)
jmp 0x9c5c
testb $0x1, -0x825(%rbp)
je 0x9e76
movw $0x8000, -0x2(%rbp)     # imm = 0x8000
movl $0x1, -0x1868(%rbp)
jmp 0xb11d
leaq -0x1870(%rbp), %rdi
callq 0xb600
jmp 0x9e84
movl $0x0, -0x1874(%rbp)
movzwl -0xa(%rbp), %esi
leaq 0xcabf(%rip), %rdi      # 0x16958
callq 0x6a30
movw %ax, -0x3dce(%rbp)
jmp 0x9ea7
movw -0x3dce(%rbp), %ax
movw %ax, -0x1876(%rbp)
movl -0x8(%rbp), %esi
movzwl -0xa(%rbp), %edx
leaq 0xca95(%rip), %rdi      # 0x16958
callq 0x6ae0
movw %ax, -0x3dd0(%rbp)
jmp 0x9ed1
movw -0x3dd0(%rbp), %ax
movw %ax, -0x1878(%rbp)
movl $0x0, -0x187c(%rbp)
movl -0x187c(%rbp), %eax
movl %eax, -0x3dd8(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3dd4(%rbp)
jmp 0x9f09
movl -0x3dd8(%rbp), %eax
movl -0x3dd4(%rbp), %ecx
cmpl %ecx, %eax
jae 0xa81f
leaq 0xca34(%rip), %rsi      # 0x16958
leaq -0x28b0(%rbp), %rdi
callq 0x3a50
jmp 0x9f32
movl -0x8(%rbp), %eax
movl %eax, -0x28b4(%rbp)
movl -0x187c(%rbp), %esi
leaq -0x410(%rbp), %rdi
callq 0xb5e0
movw %ax, -0x3dda(%rbp)
jmp 0x9f56
movw -0x3dda(%rbp), %ax
movw %ax, -0x28b6(%rbp)
movl -0x28b4(%rbp), %esi
movzwl -0x28b6(%rbp), %edx
leaq -0x28b0(%rbp), %rdi
callq 0x53f0
movb %al, -0x3ddb(%rbp)
jmp 0x9f85
movb -0x3ddb(%rbp), %al
testb $0x1, %al
jne 0x9fce
jmp 0x9f91
movl $0x7, -0x1868(%rbp)
jmp 0xa7de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0xb10f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0xa80e
movl -0x28b4(%rbp), %esi
movzwl -0x28b6(%rbp), %edx
leaq -0x28b0(%rbp), %rdi
callq 0x3d50
jmp 0x9fe9
movzwl -0x28b6(%rbp), %esi
leaq -0x28b0(%rbp), %rdi
callq 0x6990
movb %al, -0x3ddc(%rbp)
jmp 0xa004
movb -0x3ddc(%rbp), %al
testb $0x1, %al
jne 0xa010
jmp 0xa01f
movl $0x7, -0x1868(%rbp)
jmp 0xa7de
movb $0x0, -0x28b7(%rbp)
movzwl -0x28b6(%rbp), %eax
cmpl $0x8000, %eax           # imm = 0x8000
je 0xa0a8
leaq -0x28b0(%rbp), %rdi
callq 0x8630
movq %rax, -0x3de8(%rbp)
jmp 0xa049
movq -0x3de8(%rbp), %rax
movq %rax, -0x28c0(%rbp)
movl 0x15933(%rip), %eax     # 0x1f990
subl $0x1, %eax
movl %eax, -0x28c4(%rbp)
cmpl $0x0, -0x28c4(%rbp)
jl 0xa0a6
movq -0x28c0(%rbp), %rax
movslq -0x28c4(%rbp), %rdx
leaq 0xd90c(%rip), %rcx      # 0x17990
cmpq (%rcx,%rdx,8), %rax
jne 0xa093
movb $0x1, -0x28b7(%rbp)
jmp 0xa0a6
jmp 0xa095
movl -0x28c4(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28c4(%rbp)
jmp 0xa066
jmp 0xa0a8
testb $0x1, -0x28b7(%rbp)
je 0xa0c0
movl $0x7, -0x1868(%rbp)
jmp 0xa7de
movq -0x1870(%rbp), %rax
movq %rax, -0x28d0(%rbp)
movl $0x28, %edi
callq 0x2200
movq %rax, -0x3df0(%rbp)
jmp 0xa0e1
movq -0x3df0(%rbp), %rdi
callq 0xb670
jmp 0xa0ef
movq -0x3df0(%rbp), %rax
movq %rax, -0x28d8(%rbp)
movq -0x28d0(%rbp), %rcx
movq -0x28d8(%rbp), %rax
movq %rcx, 0x18(%rax)
movw -0x28b6(%rbp), %cx
movq -0x28d8(%rbp), %rax
movw %cx, 0x10(%rax)
movl -0x28b4(%rbp), %edi
callq 0x8c10
movl %eax, -0x3df4(%rbp)
jmp 0xa134
movl -0x3df4(%rbp), %edi
leaq -0x28b0(%rbp), %rsi
callq 0xb170
jmp 0xa148
movl $0x0, -0x28dc(%rbp)
movl $0x0, -0x28e0(%rbp)
movl -0x28b4(%rbp), %edi
leaq -0x28b0(%rbp), %rsi
leaq -0x28dc(%rbp), %rdx
leaq -0x28e0(%rbp), %rcx
callq 0xb470
jmp 0xa17e
movss -0x28dc(%rbp), %xmm0
ucomiss -0x28e0(%rbp), %xmm0
jbe 0xa1c7
movq -0x28d8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0xa1c7
movq -0x3df0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
movl $0x28, %esi
callq 0x2210
jmp 0xa80e
cvttss2si -0x28dc(%rbp), %eax
cvttss2si -0x28e0(%rbp), %ecx
subl %ecx, %eax
movslq %eax, %rcx
movq -0x28d8(%rbp), %rax
movq %rcx, 0x8(%rax)
movss -0x28dc(%rbp), %xmm1
movss -0x28e0(%rbp), %xmm0
subss %xmm0, %xmm1
movss -0x1874(%rbp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x1874(%rbp)
movq -0x28d8(%rbp), %rdx
movq -0x28d0(%rbp), %rcx
movq 0x20(%rcx), %rax
movswq 0x12(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28d0(%rbp), %rax
movw 0x12(%rax), %cx
incw %cx
movw %cx, 0x12(%rax)
movq -0x28d8(%rbp), %rsi
leaq -0x1870(%rbp), %rdi
callq 0x9740
jmp 0xa251
leaq 0x9f98(%rip), %rax      # 0x141f0
movl (%rax), %eax
imull %eax, %eax
shrl $0x3, %eax
movl %eax, -0x28e4(%rbp)
movl -0x28b4(%rbp), %esi
movzwl -0x28b6(%rbp), %edx
leaq 0xc6de(%rip), %rdi      # 0x16958
callq 0x5890
movb %al, -0x3df5(%rbp)
jmp 0xa287
movb -0x3df5(%rbp), %al
testb $0x1, %al
jne 0xa296
jmp 0xa317
movl -0x28e4(%rbp), %edx
movq -0x28d8(%rbp), %rax
movl 0x4(%rax), %ecx
addl %edx, %ecx
movl %ecx, 0x4(%rax)
movl -0x28b4(%rbp), %edi
callq 0x8c10
movl %eax, -0x3dfc(%rbp)
jmp 0xa2be
movl -0x3dfc(%rbp), %esi
movzwl -0x28b6(%rbp), %edx
leaq 0xc686(%rip), %rdi      # 0x16958
callq 0x53f0
movb %al, -0x3dfd(%rbp)
jmp 0xa2df
movb -0x3dfd(%rbp), %al
testb $0x1, %al
jne 0xa315
jmp 0xa2eb
imull $0xa, -0x28e4(%rbp), %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movq -0x28d8(%rbp), %rax
movq 0x8(%rax), %rcx
subq $0xe10, %rcx            # imm = 0xE10
movq %rcx, 0x8(%rax)
jmp 0xa317
leaq 0x9ed2(%rip), %rax      # 0x141f0
movl (%rax), %eax
leaq 0x9ec9(%rip), %rcx      # 0x141f0
imull (%rcx), %eax
leaq 0x9ebf(%rip), %rcx      # 0x141f0
subl (%rcx), %eax
movl %eax, -0x28e8(%rbp)
leaq 0x9eb0(%rip), %rax      # 0x141f0
cmpl $0xd, (%rax)
je 0xa355
leaq 0x9ea4(%rip), %rax      # 0x141f0
cmpl $0x13, (%rax)
jne 0xa536
leaq -0x410(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3e04(%rbp)
jmp 0xa369
movl -0x3e04(%rbp), %eax
cmpl -0x28e8(%rbp), %eax
jbe 0xa536
movzwl -0x28b6(%rbp), %edi
callq 0x8b80
movl %eax, -0x3e08(%rbp)
jmp 0xa38f
movl -0x3e08(%rbp), %eax
movl %eax, -0x28ec(%rbp)
movzwl -0x28b6(%rbp), %edi
callq 0x8ba0
movl %eax, -0x3e0c(%rbp)
jmp 0xa3af
movl -0x3e0c(%rbp), %eax
movl %eax, -0x28f0(%rbp)
cmpl $0x1, -0x28ec(%rbp)
je 0xa3df
cmpl $0x13, -0x28ec(%rbp)
je 0xa3df
cmpl $0x1, -0x28f0(%rbp)
je 0xa3df
cmpl $0x13, -0x28f0(%rbp)
jne 0xa3f9
movl -0x28e4(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0xa531
movl -0x28e4(%rbp), %eax
movl %eax, -0x3e14(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3e10(%rbp)
jmp 0xa419
movl -0x3e14(%rbp), %eax
movl -0x3e10(%rbp), %ecx
subl -0x28e8(%rbp), %ecx
imull %ecx, %eax
leaq 0x9dbb(%rip), %rcx      # 0x141f0
xorl %edx, %edx
divl (%rcx)
movl %eax, -0x28f4(%rbp)
cmpl $0x4, -0x28ec(%rbp)
je 0xa45e
movl -0x28ec(%rbp), %eax
leaq 0x9d9b(%rip), %rcx      # 0x141f0
movl (%rcx), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jne 0xa486
movl -0x28f4(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x28f4(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
cmpl $0x4, -0x28f0(%rbp)
je 0xa4a5
movl -0x28f0(%rbp), %eax
leaq 0x9d54(%rip), %rcx      # 0x141f0
movl (%rcx), %ecx
subl $0x3, %ecx
cmpl %ecx, %eax
jne 0xa4cd
movl -0x28f4(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x28f4(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
cmpl $0x3, -0x28ec(%rbp)
je 0xa50b
movl -0x28ec(%rbp), %eax
leaq 0x9d0d(%rip), %rcx      # 0x141f0
movl (%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
je 0xa50b
cmpl $0x3, -0x28f0(%rbp)
je 0xa50b
movl -0x28f0(%rbp), %eax
leaq 0x9cee(%rip), %rcx      # 0x141f0
movl (%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0xa52f
movl -0x28f4(%rbp), %ecx
movq -0x28d8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x28f4(%rbp), %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0xa531
jmp 0xa6d4
leaq 0x9cb3(%rip), %rax      # 0x141f0
cmpl $0x9, (%rax)
jne 0xa6d2
leaq -0x410(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3e18(%rbp)
jmp 0xa55a
movl -0x3e18(%rbp), %eax
cmpl -0x28e8(%rbp), %eax
jbe 0xa6d2
movzwl -0x28b6(%rbp), %edi
callq 0x8b80
movl %eax, -0x3e1c(%rbp)
jmp 0xa580
movl -0x3e1c(%rbp), %eax
movl %eax, -0x28f8(%rbp)
movzwl -0x28b6(%rbp), %edi
callq 0x8ba0
movl %eax, -0x3e20(%rbp)
jmp 0xa5a0
movl -0x3e20(%rbp), %eax
movl %eax, -0x28fc(%rbp)
cmpl $0x1, -0x28f8(%rbp)
je 0xa5e0
movl -0x28f8(%rbp), %eax
leaq 0x9c2e(%rip), %rcx      # 0x141f0
cmpl (%rcx), %eax
je 0xa5e0
cmpl $0x1, -0x28fc(%rbp)
je 0xa5e0
movl -0x28fc(%rbp), %eax
leaq 0x9c14(%rip), %rcx      # 0x141f0
cmpl (%rcx), %eax
jne 0xa5fa
movl -0x28e4(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0xa6d0
movl -0x28e4(%rbp), %eax
movl %eax, -0x3e28(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3e24(%rbp)
jmp 0xa61a
movl -0x3e28(%rbp), %eax
movl -0x3e24(%rbp), %ecx
subl -0x28e8(%rbp), %ecx
imull %ecx, %eax
leaq 0x9bba(%rip), %rcx      # 0x141f0
xorl %edx, %edx
divl (%rcx)
movl %eax, -0x2900(%rbp)
cmpl $0x3, -0x28f8(%rbp)
je 0xa65f
movl -0x28f8(%rbp), %eax
leaq 0x9b9a(%rip), %rcx      # 0x141f0
movl (%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0xa687
movl -0x2900(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x2900(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
cmpl $0x3, -0x28fc(%rbp)
je 0xa6a6
movl -0x28fc(%rbp), %eax
leaq 0x9b53(%rip), %rcx      # 0x141f0
movl (%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0xa6ce
movl -0x2900(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x2900(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0xa6d0
jmp 0xa6d2
jmp 0xa6d4
movzwl -0x28b6(%rbp), %eax
movzwl -0x1876(%rbp), %ecx
cmpl %ecx, %eax
jne 0xa70c
imull $0x5, -0x28e4(%rbp), %ecx
movq -0x28d8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
imull $0x5, -0x28e4(%rbp), %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movzwl -0x28b6(%rbp), %eax
movzwl -0x1878(%rbp), %ecx
cmpl %ecx, %eax
jne 0xa744
imull $0x5, -0x28e4(%rbp), %ecx
movq -0x28d8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
imull $0x5, -0x28e4(%rbp), %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
leaq -0x410(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3e2c(%rbp)
jmp 0xa758
movl -0x3e2c(%rbp), %eax
cmpl -0x28e8(%rbp), %eax
jae 0xa7d4
movzwl -0x28b6(%rbp), %esi
leaq -0x814(%rbp), %rdi
callq 0xb6d0
movl %eax, -0x3e30(%rbp)
jmp 0xa781
movl -0x3e30(%rbp), %eax
movl %eax, -0x2904(%rbp)
cmpl $-0x1, -0x2904(%rbp)
je 0xa7ac
movl -0x2904(%rbp), %esi
leaq -0x814(%rbp), %rdi
callq 0xb740
jmp 0xa7aa
jmp 0xa7d2
movl -0x28e4(%rbp), %ecx
movq -0x28d8(%rbp), %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x28e4(%rbp), %ecx
shll %ecx
movq -0x28d8(%rbp), %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
jmp 0xa7d4
movl $0x0, -0x1868(%rbp)
leaq -0x28b0(%rbp), %rdi
callq 0x3c50
movl -0x1868(%rbp), %eax
testl %eax, %eax
je 0xa7f8
jmp 0xa7f6
jmp 0xa7fa
jmp 0xa7fa
movl -0x187c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x187c(%rbp)
jmp 0x9ee9
leaq -0x28b0(%rbp), %rdi
callq 0x3c50
jmp 0xb10f
movq -0x1870(%rbp), %rax
movswl 0x12(%rax), %eax
cmpl $0x0, %eax
jne 0xa844
movw $0x8000, -0x2(%rbp)     # imm = 0x8000
movl $0x1, -0x1868(%rbp)
jmp 0xb101
leaq -0x410(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3e34(%rbp)
jmp 0xa858
movl -0x3e34(%rbp), %eax
movl %eax, %eax
cvtsi2ss %rax, %xmm1
movss -0x1874(%rbp), %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x1874(%rbp)
movl $0x0, -0x2908(%rbp)
movl -0x2908(%rbp), %eax
cmpl 0x9975(%rip), %eax      # 0x14204
jge 0xae04
leaq 0xc0bc(%rip), %rsi      # 0x16958
leaq -0x3938(%rbp), %rdi
callq 0x3a50
jmp 0xa8aa
movl -0x8(%rbp), %eax
movl %eax, -0x393c(%rbp)
movl $0xffffffff, -0x3940(%rbp) # imm = 0xFFFFFFFF
leaq -0x1870(%rbp), %rdi
leaq -0x393c(%rbp), %rsi
leaq -0x3938(%rbp), %rdx
leaq -0x3940(%rbp), %rcx
callq 0x94e0
movq %rax, -0x3e40(%rbp)
jmp 0xa8e7
movq -0x3e40(%rbp), %rax
movq %rax, -0x3948(%rbp)
movl $0x28, %edi
callq 0x2200
movq %rax, -0x3e48(%rbp)
jmp 0xa908
movq -0x3e48(%rbp), %rdi
callq 0xb670
jmp 0xa916
movq -0x3e48(%rbp), %rax
movq %rax, -0x3950(%rbp)
movq -0x3948(%rbp), %rcx
movq -0x3950(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x393c(%rbp), %edx
leaq -0x3d54(%rbp), %rdi
leaq -0x3938(%rbp), %rsi
callq 0x5a50
jmp 0xa951
leaq -0x3d54(%rbp), %rdi
movl $0x8000, %esi           # imm = 0x8000
callq 0x8ef0
jmp 0xa964
leaq -0x3d54(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3e4c(%rbp)
jmp 0xa978
movl -0x3e4c(%rbp), %eax
movl %eax, %eax
movl %eax, %edi
shlq $0x2, %rdi
callq 0x2030
movq %rax, -0x3e58(%rbp)
jmp 0xa994
movq -0x3e58(%rbp), %rax
movq %rax, -0x3d60(%rbp)
movl $0x0, -0x3d64(%rbp)
movl -0x3d64(%rbp), %eax
movl %eax, -0x3e60(%rbp)
leaq -0x3d54(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3e5c(%rbp)
jmp 0xa9cc
movl -0x3e60(%rbp), %eax
movl -0x3e5c(%rbp), %ecx
cmpl %ecx, %eax
jae 0xaacb
movl -0x3d64(%rbp), %edx
leaq -0x3d6c(%rbp), %rdi
xorl %esi, %esi
callq 0x9810
jmp 0xa9f6
leaq 0x157db(%rip), %rsi     # 0x201d8
leaq -0x3d6c(%rbp), %rdi
callq 0x9840
movl %eax, -0x3e64(%rbp)
jmp 0xaa11
movl -0x3e64(%rbp), %eax
movl %eax, -0x3d70(%rbp)
movq -0x3d60(%rbp), %rax
movslq -0x3d70(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x3d60(%rbp), %rax
movl -0x3d64(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movl -0x3d64(%rbp), %edx
movq -0x3d60(%rbp), %rax
movslq -0x3d70(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x3d64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d64(%rbp)
jmp 0xa9ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
jmp 0xadf3
movq -0x3e48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
movl $0x28, %esi
callq 0x2210
jmp 0xadf3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x820(%rbp)
movl %eax, -0x824(%rbp)
leaq -0x3d54(%rbp), %rdi
callq 0x8f30
jmp 0xadf3
movw $0x0, -0x3d72(%rbp)
movl $0x0, -0x3d78(%rbp)
movl -0x3d78(%rbp), %eax
movl %eax, -0x3e6c(%rbp)
leaq -0x3d54(%rbp), %rdi
callq 0x92b0
movl %eax, -0x3e68(%rbp)
jmp 0xaafe
movl -0x3e6c(%rbp), %eax
movl -0x3e68(%rbp), %ecx
cmpl %ecx, %eax
jae 0xabfa
movq -0x3d60(%rbp), %rax
movl -0x3d78(%rbp), %ecx
movl (%rax,%rcx,4), %esi
leaq -0x3d54(%rbp), %rdi
callq 0xb5e0
movw %ax, -0x3e6e(%rbp)
jmp 0xab37
movw -0x3e6e(%rbp), %ax
movw %ax, -0x3d72(%rbp)
movb $0x0, -0x3d79(%rbp)
movl $0x0, -0x3d80(%rbp)
movl -0x3d80(%rbp), %eax
movq -0x3948(%rbp), %rcx
movswl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jge 0xabac
movzwl -0x3d72(%rbp), %eax
movq -0x3948(%rbp), %rcx
movq 0x20(%rcx), %rcx
movslq -0x3d80(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movzwl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jne 0xab99
movb $0x1, -0x3d79(%rbp)
jmp 0xabac
jmp 0xab9b
movl -0x3d80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d80(%rbp)
jmp 0xab56
testb $0x1, -0x3d79(%rbp)
jne 0xabe4
movl -0x393c(%rbp), %esi
movzwl -0x3d72(%rbp), %edx
leaq -0x3938(%rbp), %rdi
callq 0x53f0
movb %al, -0x3e6f(%rbp)
jmp 0xabd6
movb -0x3e6f(%rbp), %al
testb $0x1, %al
jne 0xabe2
jmp 0xabe4
jmp 0xabfa
jmp 0xabe6
movl -0x3d78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3d78(%rbp)
jmp 0xaade
movq -0x3d60(%rbp), %rax
movq %rax, -0x3e78(%rbp)
cmpq $0x0, %rax
je 0xac1a
movq -0x3e78(%rbp), %rdi
callq 0x22a0
movw -0x3d72(%rbp), %cx
movq -0x3950(%rbp), %rax
movw %cx, 0x10(%rax)
movl -0x393c(%rbp), %esi
movzwl -0x3d72(%rbp), %edx
leaq -0x3938(%rbp), %rdi
callq 0x3d50
jmp 0xac47
movl -0x393c(%rbp), %edi
callq 0x8c10
movl %eax, -0x3e7c(%rbp)
jmp 0xac5a
movl -0x3e7c(%rbp), %edi
leaq -0x3938(%rbp), %rsi
callq 0xb170
jmp 0xac6e
movl $0x0, -0x3d84(%rbp)
movl $0x0, -0x3d88(%rbp)
movl -0x393c(%rbp), %edi
leaq -0x3938(%rbp), %rsi
leaq -0x3d84(%rbp), %rdx
leaq -0x3d88(%rbp), %rcx
callq 0xb470
jmp 0xaca4
movl -0x393c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0xacce
movss -0x1874(%rbp), %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
movss %xmm0, -0x3e80(%rbp)
jmp 0xacde
movss -0x1874(%rbp), %xmm0
movss %xmm0, -0x3e80(%rbp)
movss -0x3e80(%rbp), %xmm0
addss -0x3d84(%rbp), %xmm0
movss %xmm0, -0x3d84(%rbp)
movss -0x3d84(%rbp), %xmm0
ucomiss -0x3d88(%rbp), %xmm0
jbe 0xad3d
movq -0x3950(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
cmpl $0x0, -0x3940(%rbp)
je 0xad3b
movzwl -0x3d72(%rbp), %esi
movl -0x3940(%rbp), %edx
leaq 0x14c62(%rip), %rdi     # 0x1f994
callq 0xb780
jmp 0xad39
jmp 0xad3b
jmp 0xad65
cmpl $0x0, -0x3940(%rbp)
je 0xad63
movzwl -0x3d72(%rbp), %esi
movl -0x3940(%rbp), %edx
leaq 0x14c3a(%rip), %rdi     # 0x1f994
callq 0xb820
jmp 0xad61
jmp 0xad63
jmp 0xad65
cvttss2si -0x3d84(%rbp), %eax
cvttss2si -0x3d88(%rbp), %ecx
subl %ecx, %eax
movslq %eax, %rcx
movq -0x3950(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x3950(%rbp), %rdx
movq -0x3948(%rbp), %rcx
movq 0x20(%rcx), %rax
movswq 0x12(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x3948(%rbp), %rax
movw 0x12(%rax), %cx
incw %cx
movw %cx, 0x12(%rax)
movq -0x3950(%rbp), %rsi
leaq -0x1870(%rbp), %rdi
callq 0x9740
jmp 0xadc7
leaq -0x3d54(%rbp), %rdi
callq 0x8f30
leaq -0x3938(%rbp), %rdi
callq 0x3c50
movl -0x2908(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2908(%rbp)
jmp 0xa883
leaq -0x3938(%rbp), %rdi
callq 0x3c50
jmp 0xb10f
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rax
movw 0x10(%rax), %ax
movw %ax, -0x3d8a(%rbp)
movq $0x0, -0x3d98(%rbp)
movq $-0x40000000, -0x3da0(%rbp) # imm = 0xC0000000
leaq 0x14b5a(%rip), %rdi     # 0x1f994
callq 0xb8c0
movl %eax, -0x3e84(%rbp)
jmp 0xae47
movl -0x3e84(%rbp), %eax
movl %eax, -0x3da4(%rbp)
movl $0x0, -0x3da8(%rbp)
movl -0x3da8(%rbp), %eax
movq -0x1870(%rbp), %rcx
movswl 0x12(%rcx), %ecx
cmpl %ecx, %eax
jge 0xb0de
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3da8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cvtsi2sdl (%rax), %xmm0
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3da8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cvtsi2sdl 0x4(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x3db0(%rbp)
leaq 0x15872(%rip), %rax     # 0x20730
testb $0x1, (%rax)
je 0xb02d
movq 0x9122(%rip), %rdi      # 0x13ff0
leaq 0x5138(%rip), %rsi      # 0x1000d
callq 0x21f0
movq %rax, -0x3e90(%rbp)
jmp 0xaee3
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3da8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movzwl 0x10(%rax), %edi
callq 0x8b80
movl %eax, -0x3e94(%rbp)
jmp 0xaf0a
movl -0x3e94(%rbp), %esi
movq -0x3e90(%rbp), %rdi
callq 0x2340
movq %rax, -0x3ea0(%rbp)
jmp 0xaf25
movq -0x3ea0(%rbp), %rdi
leaq 0x50dc(%rip), %rsi      # 0x1000f
callq 0x21f0
movq %rax, -0x3ea8(%rbp)
jmp 0xaf41
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3da8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movzwl 0x10(%rax), %edi
callq 0x8ba0
movl %eax, -0x3eac(%rbp)
jmp 0xaf68
movl -0x3eac(%rbp), %esi
movq -0x3ea8(%rbp), %rdi
callq 0x2340
movq %rax, -0x3eb8(%rbp)
jmp 0xaf83
movq -0x3eb8(%rbp), %rdi
leaq 0x5081(%rip), %rsi      # 0x10012
callq 0x21f0
movq %rax, -0x3ec0(%rbp)
jmp 0xaf9f
movq -0x3ec0(%rbp), %rdi
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3da8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax), %esi
callq 0x2340
movq %rax, -0x3ec8(%rbp)
jmp 0xafcc
movq -0x3ec8(%rbp), %rdi
leaq 0x503c(%rip), %rsi      # 0x10016
callq 0x21f0
movq %rax, -0x3ed0(%rbp)
jmp 0xafe8
movq -0x3ed0(%rbp), %rdi
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3da8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x4(%rax), %esi
callq 0x2340
movq %rax, -0x3ed8(%rbp)
jmp 0xb016
movq -0x3ed8(%rbp), %rdi
movq 0x8f7c(%rip), %rsi      # 0x13fa0
callq 0x2230
jmp 0xb02b
jmp 0xb02d
movsd -0x3db0(%rbp), %xmm0
ucomisd -0x3d98(%rbp), %xmm0
ja 0xb076
movsd -0x3db0(%rbp), %xmm0
ucomisd -0x3d98(%rbp), %xmm0
jne 0xb0c8
jp 0xb0c8
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3da8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
cmpq -0x3da0(%rbp), %rax
jle 0xb0c8
movsd -0x3db0(%rbp), %xmm0
movsd %xmm0, -0x3d98(%rbp)
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3da8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movw 0x10(%rax), %ax
movw %ax, -0x3d8a(%rbp)
movq -0x1870(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3da8(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x8(%rax), %rax
movq %rax, -0x3da0(%rbp)
jmp 0xb0ca
movl -0x3da8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3da8(%rbp)
jmp 0xae5d
leaq 0x148af(%rip), %rdi     # 0x1f994
callq 0xb950
jmp 0xb0ec
movw -0x3d8a(%rbp), %ax
movw %ax, -0x2(%rbp)
movl $0x1, -0x1868(%rbp)
leaq -0x1870(%rbp), %rdi
callq 0xb9c0
jmp 0xb11d
leaq -0x1870(%rbp), %rdi
callq 0xb9c0
jmp 0xb142
leaq -0x814(%rbp), %rdi
callq 0x8f30
leaq -0x410(%rbp), %rdi
callq 0x8f30
movw -0x2(%rbp), %ax
addq $0x3ee0, %rsp           # imm = 0x3EE0
popq %rbp
retq
leaq -0x814(%rbp), %rdi
callq 0x8f30
leaq -0x410(%rbp), %rdi
callq 0x8f30
movq -0x820(%rbp), %rdi
callq 0x2350
nopw %cs:(%rax,%rax)