// File: estan[P]tsp/tsp.cpp
// Function: threeOpt(std::vector<unsigned short, std::allocator<unsigned short>>&, Matrix<unsigned int> const&, Matrix<unsigned short> const&, std::vector<unsigned short, std::allocator<unsigned short>>&, unsigned int&, unsigned int, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&)
inline void threeOpt(vector<uint16_t>& tour, const Matrix<uint32_t>& d,
        const Matrix<uint16_t>& neighbor, vector<uint16_t>& position,
        uint32_t& max, uint32_t min,
        const chrono::time_point<chrono::high_resolution_clock>& deadline) {
    const size_t N = d.rows(); // Number of cities.

    // Candidate edges PQ, RS, TU and their positions in tour.
    uint16_t P, Q, R, S, T, U;
    size_t P_i, Q_i, R_i, S_i, T_i, U_i;

    // AB, CD, EF is PQ, RS, TU, but in tour order.
    uint16_t A, B, C, D, E, F;
    size_t A_i, B_i, C_i, D_i, E_i, F_i;

    bool locallyOptimal = false;
    while (!locallyOptimal) {
        locallyOptimal = true;

        // For each edge PQ.
        for (size_t i = 0; i < N; ++i) {
            P_i = i;
            Q_i = (P_i + 1) % N;
            P = tour[P_i];
            Q = tour[Q_i];

            if (chrono::high_resolution_clock::now() > deadline)
                return; // Deadline has passed, return early.

            // For each edge RS (S j:th nearest neighbor of P).
            for (size_t j = 0; j < neighbor.cols(); ++j) {
                S_i = position[neighbor[P][j]];
                R_i = (S_i + N - 1) % N;
                R = tour[R_i];
                S = tour[S_i];

                if (P == R || R == Q) // RS same as, or follows, PQ.
                    continue; // Go to next edge RS.

                if (d[P][S] + 2 * min > d[P][Q] + 2 * max)
                    break; // Go to next edge PQ.

                if (d[P][S] + 2 * min > d[P][Q] + d[R][S] + max)
                    continue; // Go to next edge RS.

                // For each edge TU (U k:th nearest neighbor of P).
                for (size_t k = 0; k < neighbor.cols(); ++k) {
                    U_i = position[neighbor[P][k]];
                    T_i = (U_i + N - 1) % N;
                    T = tour[T_i];
                    U = tour[U_i];

                    if (U == S || // TU same as RS.
                        T == S || // TU follows RS.
                        U == R || // TU preceeds RS.
                        T == P || // TU same as PQ.
                        T == Q)   // TU follows PQ.
                        continue; // Go to next edge TU.

                    if (d[P][S] + d[Q][U] + min > d[P][Q] + d[R][S] + max)
                        break; // Go to next edge RS.

                    // Let AB, CD, EF be the edges PQ, RS, TU in tour order.
                    ordered(A, A_i, B, B_i, C, C_i, D, D_i, E, E_i, F, F_i,
                            P, P_i, Q, Q_i, R, R_i, S, S_i, T, T_i, U, U_i);

                    // Try exchanging AB, CD and EF for another edge triple.
                    // See 3opt_cases.png for an illustration.
                    bool changed = false;
                    uint32_t d_AB_CD_EF = d[A][B] + d[C][D] + d[E][F];
                    if (d[D][A] + d[F][B] + d[C][E] < d_AB_CD_EF) {
                        // Change AB, CD, EF to DA, FB, CE.
                        reverse(tour, F_i, A_i, position);
                        reverse(tour, D_i, E_i, position);
                        max = maximum(max, d[D][A], d[F][B], d[C][E]);
                        changed = true;
                    } else if (d[B][D] + d[E][A] + d[F][C] < d_AB_CD_EF) {
                        // Change AB, CD, EF to BD, EA, FC.
                        reverse(tour, F_i, A_i, position);
                        reverse(tour, B_i, C_i, position);
                        max = maximum(max, d[B][D], d[E][A], d[F][C]);
                        changed = true;
                    } else if (d[A][C] + d[B][E] + d[D][F] < d_AB_CD_EF) {
                        // Change AB, CD, EF to AC, BE, DF.
                        reverse(tour, B_i, C_i, position);
                        reverse(tour, D_i, E_i, position);
                        max = maximum(max, d[A][C], d[B][E], d[D][F]);
                        changed = true;
                    } else if (d[B][E] + d[D][A] + d[F][C] < d_AB_CD_EF) {
                        // Change AB, CD, EF to BE, DA, FC.
                        reverse(tour, A_i, F_i, position);
                        reverse(tour, B_i, C_i, position);
                        reverse(tour, D_i, E_i, position);
                        max = maximum(max, d[B][E], d[D][A], d[F][C]);
                        changed = true;
                    }

                    if (changed) {
                        locallyOptimal = false;
                        goto next_PQ; // Go to next edge PQ.
                    }
                }
            }
            next_PQ: continue;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq 0x10(%rbp), %rax
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq %rdx, -0x40(%rbp)
movq %rcx, -0x48(%rbp)
movq %r8, -0x50(%rbp)
movl %r9d, -0x54(%rbp)
movq -0x38(%rbp), %rdi
callq 0x3630
movq %rax, -0x60(%rbp)
movb $0x0, -0xe1(%rbp)
movb -0xe1(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6bd5
jmp 0x776a
movb $0x1, -0xe1(%rbp)
movq $0x0, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x7765
movq -0xf0(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
addq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x60(%rbp)
movq %rdx, -0x80(%rbp)
movq -0x30(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x3ad0
movw (%rax), %ax
movw %ax, -0x62(%rbp)
movq -0x30(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x3ad0
movw (%rax), %ax
movw %ax, -0x64(%rbp)
callq 0x2030
movq %rax, -0xf8(%rbp)
movq 0x10(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x9230
testb $0x1, %al
jne 0x6c61
jmp 0x6c66
jmp 0x776a
movq $0x0, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x40(%rbp), %rdi
callq 0x9030
movq %rax, %rcx
movq -0x118(%rbp), %rax
cmpq %rcx, %rax
jae 0x774a
movq -0x48(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x40(%rbp), %rdi
movzwl -0x62(%rbp), %esi
callq 0x9050
movq -0x120(%rbp), %rdi
movq -0x100(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, %esi
callq 0x3ad0
movzwl (%rax), %eax
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
addq -0x60(%rbp), %rax
subq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x60(%rbp)
movq %rdx, -0x88(%rbp)
movq -0x30(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x3ad0
movw (%rax), %ax
movw %ax, -0x66(%rbp)
movq -0x30(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0x3ad0
movw (%rax), %ax
movw %ax, -0x68(%rbp)
movzwl -0x62(%rbp), %eax
movzwl -0x66(%rbp), %ecx
cmpl %ecx, %eax
je 0x6d3a
movzwl -0x66(%rbp), %eax
movzwl -0x64(%rbp), %ecx
cmpl %ecx, %eax
jne 0x6d3f
jmp 0x7733
movq -0x38(%rbp), %rdi
movzwl -0x62(%rbp), %esi
callq 0x36a0
movzwl -0x68(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl -0x54(%rbp), %ecx
shll %ecx
addl %ecx, %eax
movl %eax, -0x124(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0x62(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x124(%rbp), %eax
movzwl -0x64(%rbp), %edx
movl (%rcx,%rdx,4), %ecx
movq -0x50(%rbp), %rdx
movl (%rdx), %edx
shll %edx
addl %edx, %ecx
cmpl %ecx, %eax
jbe 0x6d90
jmp 0x774a
movq -0x38(%rbp), %rdi
movzwl -0x62(%rbp), %esi
callq 0x36a0
movzwl -0x68(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl -0x54(%rbp), %ecx
shll %ecx
addl %ecx, %eax
movl %eax, -0x128(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0x62(%rbp), %esi
callq 0x36a0
movzwl -0x64(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x12c(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0x66(%rbp), %esi
callq 0x36a0
movl -0x12c(%rbp), %ecx
movq %rax, %rdx
movl -0x128(%rbp), %eax
movzwl -0x68(%rbp), %esi
addl (%rdx,%rsi,4), %ecx
movq -0x50(%rbp), %rdx
addl (%rdx), %ecx
cmpl %ecx, %eax
jbe 0x6dfd
jmp 0x7733
movq $0x0, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x138(%rbp)
movq -0x40(%rbp), %rdi
callq 0x9030
movq %rax, %rcx
movq -0x138(%rbp), %rax
cmpq %rcx, %rax
jae 0x7731
movq -0x48(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x40(%rbp), %rdi
movzwl -0x62(%rbp), %esi
callq 0x9050
movq -0x140(%rbp), %rdi
movq -0x108(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
movl %eax, %esi
callq 0x3ad0
movzwl (%rax), %eax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
addq -0x60(%rbp), %rax
subq $0x1, %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x60(%rbp)
movq %rdx, -0x98(%rbp)
movq -0x30(%rbp), %rdi
movq -0x98(%rbp), %rsi
callq 0x3ad0
movw (%rax), %ax
movw %ax, -0x6a(%rbp)
movq -0x30(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0x3ad0
movw (%rax), %ax
movw %ax, -0x6c(%rbp)
movzwl -0x6c(%rbp), %eax
movzwl -0x68(%rbp), %ecx
cmpl %ecx, %eax
je 0x6ef5
movzwl -0x6a(%rbp), %eax
movzwl -0x68(%rbp), %ecx
cmpl %ecx, %eax
je 0x6ef5
movzwl -0x6c(%rbp), %eax
movzwl -0x66(%rbp), %ecx
cmpl %ecx, %eax
je 0x6ef5
movzwl -0x6a(%rbp), %eax
movzwl -0x62(%rbp), %ecx
cmpl %ecx, %eax
je 0x6ef5
movzwl -0x6a(%rbp), %eax
movzwl -0x64(%rbp), %ecx
cmpl %ecx, %eax
jne 0x6efa
jmp 0x771a
movq -0x38(%rbp), %rdi
movzwl -0x62(%rbp), %esi
callq 0x36a0
movzwl -0x68(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x14c(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0x64(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x14c(%rbp), %eax
movzwl -0x6c(%rbp), %edx
addl (%rcx,%rdx,4), %eax
addl -0x54(%rbp), %eax
movl %eax, -0x144(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0x62(%rbp), %esi
callq 0x36a0
movzwl -0x64(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x148(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0x66(%rbp), %esi
callq 0x36a0
movl -0x148(%rbp), %ecx
movq %rax, %rdx
movl -0x144(%rbp), %eax
movzwl -0x68(%rbp), %esi
addl (%rdx,%rsi,4), %ecx
movq -0x50(%rbp), %rdx
addl (%rdx), %ecx
cmpl %ecx, %eax
jbe 0x6f86
jmp 0x7731
movw -0x62(%rbp), %ax
movw %ax, -0x182(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x180(%rbp)
movw -0x64(%rbp), %ax
movw %ax, -0x172(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x170(%rbp)
movw -0x66(%rbp), %r13w
movq -0x88(%rbp), %r12
movw -0x68(%rbp), %r15w
movq -0x90(%rbp), %r14
movw -0x6a(%rbp), %bx
movq -0x98(%rbp), %r11
movw -0x6c(%rbp), %r10w
movq -0xa0(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0xa2(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0xa4(%rbp), %rdx
leaq -0xc0(%rbp), %rcx
leaq -0xa6(%rbp), %r8
leaq -0xc8(%rbp), %r9
leaq -0xa8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq -0xaa(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0xd8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0xac(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq -0xe0(%rbp), %rax
movq %rax, -0x190(%rbp)
movq -0x1b8(%rbp), %rax
movq %rax, (%rsp)
movq -0x1b0(%rbp), %rax
movq %rax, 0x8(%rsp)
movq -0x1a8(%rbp), %rax
movq %rax, 0x10(%rsp)
movq -0x1a0(%rbp), %rax
movq %rax, 0x18(%rsp)
movq -0x198(%rbp), %rax
movq %rax, 0x20(%rsp)
movq -0x190(%rbp), %rax
movq %rax, 0x28(%rsp)
movw -0x182(%rbp), %ax
movzwl %ax, %eax
movl %eax, 0x30(%rsp)
movq -0x180(%rbp), %rax
movq %rax, 0x38(%rsp)
movw -0x172(%rbp), %ax
movzwl %ax, %eax
movl %eax, 0x40(%rsp)
movq -0x170(%rbp), %rax
movq %rax, 0x48(%rsp)
movq -0x168(%rbp), %rax
movzwl %r13w, %r13d
movl %r13d, 0x50(%rsp)
movq %r12, 0x58(%rsp)
movzwl %r15w, %r15d
movl %r15d, 0x60(%rsp)
movq %r14, 0x68(%rsp)
movzwl %bx, %ebx
movl %ebx, 0x70(%rsp)
movq %r11, 0x78(%rsp)
movzwl %r10w, %r10d
movl %r10d, 0x80(%rsp)
movq %rax, 0x88(%rsp)
callq 0x9260
movb $0x0, -0x109(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa2(%rbp), %esi
callq 0x36a0
movzwl -0xa4(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x15c(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa6(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x15c(%rbp), %eax
movzwl -0xa8(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x158(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xaa(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x158(%rbp), %eax
movzwl -0xac(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x110(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa8(%rbp), %esi
callq 0x36a0
movzwl -0xa2(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x154(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xac(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x154(%rbp), %eax
movzwl -0xa4(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x150(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa6(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x150(%rbp), %eax
movzwl -0xaa(%rbp), %edx
addl (%rcx,%rdx,4), %eax
cmpl -0x110(%rbp), %eax
jae 0x72f4
movq -0x30(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x9080
movq -0x30(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x9080
movq -0x50(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa8(%rbp), %esi
callq 0x36a0
movzwl -0xa2(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x1c8(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xac(%rbp), %esi
callq 0x36a0
movzwl -0xa4(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x1c0(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa6(%rbp), %esi
callq 0x36a0
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
movq -0x1c0(%rbp), %rdx
movq %rax, %rcx
movzwl -0xaa(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rcx
callq 0x34b0
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x109(%rbp)
jmp 0x7706
movq -0x38(%rbp), %rdi
movzwl -0xa4(%rbp), %esi
callq 0x36a0
movzwl -0xa8(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1d8(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xaa(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x1d8(%rbp), %eax
movzwl -0xa2(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x1d4(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xac(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x1d4(%rbp), %eax
movzwl -0xa6(%rbp), %edx
addl (%rcx,%rdx,4), %eax
cmpl -0x110(%rbp), %eax
jae 0x7446
movq -0x30(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x9080
movq -0x30(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x9080
movq -0x50(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa4(%rbp), %esi
callq 0x36a0
movzwl -0xa8(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x1e8(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xaa(%rbp), %esi
callq 0x36a0
movzwl -0xa2(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x1e0(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xac(%rbp), %esi
callq 0x36a0
movq -0x1f0(%rbp), %rdi
movq -0x1e8(%rbp), %rsi
movq -0x1e0(%rbp), %rdx
movq %rax, %rcx
movzwl -0xa6(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rcx
callq 0x34b0
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x109(%rbp)
jmp 0x7704
movq -0x38(%rbp), %rdi
movzwl -0xa2(%rbp), %esi
callq 0x36a0
movzwl -0xa6(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1f8(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa4(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x1f8(%rbp), %eax
movzwl -0xaa(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x1f4(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa8(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x1f4(%rbp), %eax
movzwl -0xac(%rbp), %edx
addl (%rcx,%rdx,4), %eax
cmpl -0x110(%rbp), %eax
jae 0x7598
movq -0x30(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x9080
movq -0x30(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x9080
movq -0x50(%rbp), %rax
movq %rax, -0x210(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa2(%rbp), %esi
callq 0x36a0
movzwl -0xa6(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x208(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa4(%rbp), %esi
callq 0x36a0
movzwl -0xaa(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x200(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa8(%rbp), %esi
callq 0x36a0
movq -0x210(%rbp), %rdi
movq -0x208(%rbp), %rsi
movq -0x200(%rbp), %rdx
movq %rax, %rcx
movzwl -0xac(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rcx
callq 0x34b0
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x109(%rbp)
jmp 0x7702
movq -0x38(%rbp), %rdi
movzwl -0xa4(%rbp), %esi
callq 0x36a0
movzwl -0xaa(%rbp), %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x218(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa8(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x218(%rbp), %eax
movzwl -0xa2(%rbp), %edx
addl (%rcx,%rdx,4), %eax
movl %eax, -0x214(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xac(%rbp), %esi
callq 0x36a0
movq %rax, %rcx
movl -0x214(%rbp), %eax
movzwl -0xa6(%rbp), %edx
addl (%rcx,%rdx,4), %eax
cmpl -0x110(%rbp), %eax
jae 0x7700
movq -0x30(%rbp), %rdi
movq -0xb8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x9080
movq -0x30(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x9080
movq -0x30(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq -0xd8(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x9080
movq -0x50(%rbp), %rax
movq %rax, -0x230(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa4(%rbp), %esi
callq 0x36a0
movzwl -0xaa(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x228(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xa8(%rbp), %esi
callq 0x36a0
movzwl -0xa2(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x220(%rbp)
movq -0x38(%rbp), %rdi
movzwl -0xac(%rbp), %esi
callq 0x36a0
movq -0x230(%rbp), %rdi
movq -0x228(%rbp), %rsi
movq -0x220(%rbp), %rdx
movq %rax, %rcx
movzwl -0xa6(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rcx
callq 0x34b0
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x109(%rbp)
jmp 0x7702
jmp 0x7704
jmp 0x7706
testb $0x1, -0x109(%rbp)
je 0x7718
movb $0x0, -0xe1(%rbp)
jmp 0x774c
jmp 0x771a
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x6e08
jmp 0x7733
movq -0x100(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x100(%rbp)
jmp 0x6c71
jmp 0x774c
jmp 0x774e
movq -0xf0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xf0(%rbp)
jmp 0x6be7
jmp 0x6bc4
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)