// File: kmyk[P]topcoder-marathon-match-100-same-color-pairs/./SameColorPairs.cpp
// Function: std::vector<std::array<int, 4ul>, std::allocator<std::array<int, 4ul>>> solve_sa_greedy<xor_shift_128>(int, int, int, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&, double, xor_shift_128&)
vector<array<int, 4> > solve_sa_greedy(int H, int W, int C, vector<vector<int> > const & original_original_board, double clock_end, RandomEngine & gen) {
    array<int8_t, MAX_H * MAX_W> original_board = pack_board(H, W, original_original_board);
    update_compression(H, W, original_board);
    vector<array<int, 4> > result;
    vector<array<int, 4> > cur;
    vector<pair<int, int> > remaining;
    array<uint8_t, MAX_H * MAX_W> remaining_count = {};

    // values for partialy solved board
    int initial_removed = 0;
    REP (y, H) REP (x, W) {
        initial_removed += (original_board[y * W + x] < 0);
    }
    int optimal_size = 0; {  // since the numbers of cells sometimes are odd
        vector<bool> dangling(C);
        REP (y, H) REP (x, W) {
            int c = original_board[y * W + x];
            if (c >= 0) {
                optimal_size += dangling[c];
                dangling[c] = not dangling[c];
            }
        }
    }

    int iteration = 0;
    double clock_begin = rdtsc();
    double last_t = rdtsc();
    double max_delta = 0;
    array<int8_t, MAX_H * MAX_W> board;
    for (; ; ++ iteration) {
        double t = rdtsc();
        if (t + max(2 * max_delta, 0.2) > clock_end) break;
        double temperature = 1 - 0.8 * (t - clock_begin) / (clock_end - clock_begin);

        // prepare board and the prefix of nxt
        char type;
        vector<array<int, 4> > nxt;

        if (cur.empty() or bernoulli_distribution(0.01 * temperature)(gen)) {
            // forget everything and restart from zero
            type = 'A';
            memcpy(board.data(), original_board.data(), H * W);

        } else if (not remaining.empty() and remaining.size() < 100 and bernoulli_distribution(0.5)(gen)) {
            // make neighborhood removing last remaining cells
            type = 'B';
            memcpy(board.data(), original_board.data(), H * W);
            int k = cur.size();
            int i = uniform_int_distribution<int>(0, k - 1)(gen);
            vector<pair<int, int> > order(remaining.size());
            REP (j, remaining.size()) {
                int y, x; tie(y, x) = remaining[j];
                order[j] = make_pair(remaining_count[y * W + x] + uniform_int_distribution<int>(0, 10)(gen), j);
            }
            sort(order.rbegin(), order.rend());
            int l = uniform_int_distribution<int>(1, remaining.size())(gen);
            vector<pair<int, int> > preciding(l);
            REP (j, l) {
                preciding[j] = remaining[order[j].second];
            }
            apply_rects_with_preceding_cells(W, board, preciding, ALL(cur), i, back_inserter(nxt));

        } else {
            // make neighborhood only removing a pair
            type = 'C';
            int k = cur.size();
            int i = uniform_int_distribution<int>(0, k - 1)(gen);
            nxt = cur;
            swap(nxt[i], nxt.back());
            memcpy(board.data(), original_board.data(), H * W);
            apply_rects(W, board, nxt.begin(), nxt.begin() + i);
            nxt.erase(apply_unreliable_rects(W, board, nxt.begin() + i, nxt.end()), nxt.end());
        }

        // run greedy
        vector<array<int, 4> > delta = solve_greedy_once(H, W, C, board, gen);
        copy(ALL(delta), back_inserter(nxt));

        // update the weights of cells
        int remaining_size = H * W - initial_removed - 2 * int(cur.size());
        REP (y, H) REP (x, W) {
            uint8_t & it = remaining_count[y * W + x];
            if (board[y * W + x] >= 0) it += remaining_size == 4 ? 12 : 5;
            if (it == 0) continue;
            it = max(0, min(100, it - 3));
        }

        // update cur and result
        int size_delta = int(nxt.size()) - int(cur.size());
        double prob = exp(0.3 * size_delta / temperature);
        if (cur.size() <= nxt.size() or bernoulli_distribution(prob)(gen)) {
            cur = nxt;

            // collect remaining cells 
            remaining.clear();
            if (remaining_size <= 100) {
                REP (y, H) {
                    for (int x = 0; x < W; ) {
                        if (board[y * W + x] < 0) {
                            x -= board[y * W + x];
                        } else {
                            remaining.emplace_back(y, x);
                            ++ x;
                        }
                    }
                }
            }

            // update result
            if (result.size() < cur.size()) {
                result = nxt;
#ifdef LOCAL
                cerr << type << " : ";
                cerr << "score = " << H * W - initial_removed - 2 * int(result.size()) << " / " << H * W << endl;
#endif
                if (int(result.size()) == optimal_size) {
                    ++ iteration;
                    break;
                }
            }
        }

        chmax(max_delta, t - last_t);
        last_t = t;
    }
    cerr << "iteration = " << iteration << endl;
    cerr << "time = " << (rdtsc() - clock_begin) << endl;
    cerr << "max delta = " << max_delta << endl;
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x7a30, %rsp           # imm = 0x7A30
movq %rdi, -0x7840(%rbp)
movq %rdi, %rax
movq %rax, -0x7848(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq -0x2740(%rbp), %rdi
callq 0x3430
movl -0xc(%rbp), %edi
movl -0x10(%rbp), %esi
leaq -0x2740(%rbp), %rdx
callq 0x34d0
movq -0x7840(%rbp), %rdi
movb $0x0, -0x2741(%rbp)
callq 0x7810
leaq -0x2760(%rbp), %rdi
callq 0x7810
leaq -0x2778(%rbp), %rdi
callq 0x11340
leaq -0x4e88(%rbp), %rdi
xorl %esi, %esi
movl $0x2710, %edx           # imm = 0x2710
callq 0x20e0
movl $0x0, -0x4e8c(%rbp)
movl $0x0, -0x4e90(%rbp)
movl -0x4e90(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x100ed
movl $0x0, -0x4e94(%rbp)
movl -0x4e94(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x100da
movl -0x4e90(%rbp), %eax
imull -0x10(%rbp), %eax
addl -0x4e94(%rbp), %eax
movslq %eax, %rsi
leaq -0x2740(%rbp), %rdi
callq 0x72a0
movsbl (%rax), %eax
cmpl $0x0, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
addl -0x4e8c(%rbp), %eax
movl %eax, -0x4e8c(%rbp)
movl -0x4e94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4e94(%rbp)
jmp 0x10085
jmp 0x100dc
movl -0x4e90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4e90(%rbp)
jmp 0x10070
movl $0x0, -0x4e98(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x7858(%rbp)
leaq -0x4ec1(%rbp), %rdi
movq %rdi, -0x7850(%rbp)
callq 0x6aa0
movq -0x7858(%rbp), %rsi
movq -0x7850(%rbp), %rdx
leaq -0x4ec0(%rbp), %rdi
callq 0x7830
jmp 0x10131
leaq -0x4ec1(%rbp), %rdi
callq 0x6b40
movl $0x0, -0x4ed8(%rbp)
movl -0x4ed8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1031e
movl $0x0, -0x4edc(%rbp)
movl -0x4edc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x10308
movl -0x4ed8(%rbp), %eax
imull -0x10(%rbp), %eax
addl -0x4edc(%rbp), %eax
movslq %eax, %rsi
leaq -0x2740(%rbp), %rdi
callq 0x72a0
movsbl (%rax), %eax
movl %eax, -0x4ee0(%rbp)
cmpl $0x0, -0x4ee0(%rbp)
jl 0x102f2
movslq -0x4ee0(%rbp), %rsi
leaq -0x4ec0(%rbp), %rdi
callq 0x6ba0
movq %rdx, -0x7868(%rbp)
movq %rax, -0x7860(%rbp)
jmp 0x101c7
movq -0x7868(%rbp), %rax
movq -0x7860(%rbp), %rcx
movq %rcx, -0x4ef0(%rbp)
movq %rax, -0x4ee8(%rbp)
leaq -0x4ef0(%rbp), %rdi
callq 0x6c70
movzbl %al, %ecx
movl -0x4e98(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x4e98(%rbp)
movslq -0x4ee0(%rbp), %rsi
leaq -0x4ec0(%rbp), %rdi
callq 0x6ba0
movq %rdx, -0x7878(%rbp)
movq %rax, -0x7870(%rbp)
jmp 0x10223
movq -0x7878(%rbp), %rax
movq -0x7870(%rbp), %rcx
movq %rcx, -0x4f00(%rbp)
movq %rax, -0x4ef8(%rbp)
leaq -0x4f00(%rbp), %rdi
callq 0x6c70
xorb $0x1, %al
movb %al, -0x7889(%rbp)
movslq -0x4ee0(%rbp), %rsi
leaq -0x4ec0(%rbp), %rdi
callq 0x6ba0
movq %rdx, -0x7888(%rbp)
movq %rax, -0x7880(%rbp)
jmp 0x10276
movb -0x7889(%rbp), %al
movq -0x7888(%rbp), %rcx
movq -0x7880(%rbp), %rdx
movq %rdx, -0x4f10(%rbp)
movq %rcx, -0x4f08(%rbp)
movzbl %al, %esi
andl $0x1, %esi
leaq -0x4f10(%rbp), %rdi
callq 0x6c00
jmp 0x102f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4ed0(%rbp)
movl %eax, -0x4ed4(%rbp)
leaq -0x4ec1(%rbp), %rdi
callq 0x6b40
jmp 0x112f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4ed0(%rbp)
movl %eax, -0x4ed4(%rbp)
leaq -0x4ec0(%rbp), %rdi
callq 0x7180
jmp 0x112f1
jmp 0x102f4
movl -0x4edc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4edc(%rbp)
jmp 0x10160
jmp 0x1030a
movl -0x4ed8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4ed8(%rbp)
jmp 0x10147
leaq -0x4ec0(%rbp), %rdi
callq 0x7180
movl $0x0, -0x4f14(%rbp)
callq 0x7450
movsd %xmm0, -0x4f20(%rbp)
callq 0x7450
movsd %xmm0, -0x4f28(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x4f30(%rbp)
callq 0x7450
movsd %xmm0, -0x7648(%rbp)
movsd -0x7648(%rbp), %xmm0
movsd %xmm0, -0x78a0(%rbp)
movsd -0x4f30(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, -0x7650(%rbp)
movabsq $0x3fc999999999999a, %rax # imm = 0x3FC999999999999A
movq %rax, -0x7658(%rbp)
leaq -0x7650(%rbp), %rdi
leaq -0x7658(%rbp), %rsi
callq 0x11360
movq %rax, -0x7898(%rbp)
jmp 0x103b7
movq -0x7898(%rbp), %rax
movsd -0x78a0(%rbp), %xmm0
addsd (%rax), %xmm0
ucomisd -0x28(%rbp), %xmm0
jbe 0x103ed
jmp 0x111cc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4ed0(%rbp)
movl %eax, -0x4ed4(%rbp)
jmp 0x112f1
movsd -0x7648(%rbp), %xmm0
subsd -0x4f20(%rbp), %xmm0
movsd 0x8c23(%rip), %xmm1     # 0x19028
mulsd %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
subsd -0x4f20(%rbp), %xmm0
divsd %xmm0, %xmm1
movsd 0x8bfe(%rip), %xmm0     # 0x19020
subsd %xmm1, %xmm0
movsd %xmm0, -0x7660(%rbp)
leaq -0x7680(%rbp), %rdi
callq 0x7810
leaq -0x2760(%rbp), %rdi
callq 0x113a0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x78a1(%rbp)
jne 0x1049d
movsd -0x7660(%rbp), %xmm0
movsd 0x8bcb(%rip), %xmm1     # 0x19030
mulsd %xmm1, %xmm0
leaq -0x7688(%rbp), %rdi
callq 0x113e0
jmp 0x10477
movq -0x30(%rbp), %rsi
leaq -0x7688(%rbp), %rdi
callq 0x11410
movb %al, -0x78a2(%rbp)
jmp 0x1048f
movb -0x78a2(%rbp), %al
movb %al, -0x78a1(%rbp)
jmp 0x1049d
movb -0x78a1(%rbp), %al
testb $0x1, %al
jne 0x104a9
jmp 0x10504
movb $0x41, -0x7661(%rbp)
leaq -0x7640(%rbp), %rdi
callq 0x11440
movq %rax, -0x78b0(%rbp)
leaq -0x2740(%rbp), %rdi
callq 0x11440
movq -0x78b0(%rbp), %rdi
movq %rax, %rsi
movl -0xc(%rbp), %eax
imull -0x10(%rbp), %eax
movslq %eax, %rdx
callq 0x21a0
jmp 0x10ca9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4ed0(%rbp)
movl %eax, -0x4ed4(%rbp)
jmp 0x111bb
leaq -0x2778(%rbp), %rdi
callq 0x11460
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x78b1(%rbp)
jne 0x10578
leaq -0x2778(%rbp), %rdi
callq 0x114a0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x64, %rcx
movb %al, -0x78b1(%rbp)
jae 0x10578
leaq -0x7690(%rbp), %rdi
movsd 0x8aed(%rip), %xmm0     # 0x19038
callq 0x113e0
jmp 0x10552
movq -0x30(%rbp), %rsi
leaq -0x7690(%rbp), %rdi
callq 0x11410
movb %al, -0x78b2(%rbp)
jmp 0x1056a
movb -0x78b2(%rbp), %al
movb %al, -0x78b1(%rbp)
jmp 0x10578
movb -0x78b1(%rbp), %al
testb $0x1, %al
jne 0x10587
jmp 0x10a5d
movb $0x42, -0x7661(%rbp)
leaq -0x7640(%rbp), %rdi
callq 0x11440
movq %rax, -0x78c0(%rbp)
leaq -0x2740(%rbp), %rdi
callq 0x11440
movq -0x78c0(%rbp), %rdi
movq %rax, %rsi
movl -0xc(%rbp), %eax
movl -0x10(%rbp), %ecx
imull %ecx, %eax
movslq %eax, %rdx
callq 0x21a0
leaq -0x2760(%rbp), %rdi
callq 0x114c0
movl %eax, -0x7694(%rbp)
movl -0x7694(%rbp), %edx
decl %edx
leaq -0x76a0(%rbp), %rdi
xorl %esi, %esi
callq 0x114e0
jmp 0x105f2
movq -0x30(%rbp), %rsi
leaq -0x76a0(%rbp), %rdi
callq 0x11510
movl %eax, -0x78c4(%rbp)
jmp 0x1060a
movl -0x78c4(%rbp), %eax
movl %eax, -0x7698(%rbp)
leaq -0x2778(%rbp), %rdi
callq 0x114a0
movq %rax, -0x78d8(%rbp)
leaq -0x76b9(%rbp), %rdi
movq %rdi, -0x78d0(%rbp)
callq 0x11540
movq -0x78d8(%rbp), %rsi
movq -0x78d0(%rbp), %rdx
leaq -0x76b8(%rbp), %rdi
callq 0x11560
jmp 0x10658
leaq -0x76b9(%rbp), %rdi
callq 0x115d0
movl $0x0, -0x76c0(%rbp)
movl -0x76c0(%rbp), %eax
movl %eax, -0x78dc(%rbp)
leaq -0x2778(%rbp), %rdi
callq 0x114a0
movq %rax, %rcx
movl -0x78dc(%rbp), %eax
cmpl %ecx, %eax
jge 0x107ec
movslq -0x76c0(%rbp), %rsi
leaq -0x2778(%rbp), %rdi
callq 0x115f0
movq %rax, -0x78e8(%rbp)
leaq -0x76d8(%rbp), %rdi
movq %rdi, -0x78f0(%rbp)
leaq -0x76c4(%rbp), %rsi
leaq -0x76c8(%rbp), %rdx
callq 0x7380
movq -0x78f0(%rbp), %rdi
movq -0x78e8(%rbp), %rsi
callq 0x73c0
movl -0x76c4(%rbp), %eax
movl -0x10(%rbp), %ecx
imull %ecx, %eax
movl -0x76c8(%rbp), %ecx
addl %ecx, %eax
movslq %eax, %rsi
leaq -0x4e88(%rbp), %rdi
callq 0x11640
movzbl (%rax), %eax
movl %eax, -0x78e0(%rbp)
leaq -0x76ec(%rbp), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x114e0
jmp 0x10726
movq -0x30(%rbp), %rsi
leaq -0x76ec(%rbp), %rdi
callq 0x11510
movl %eax, -0x78f4(%rbp)
jmp 0x1073e
movl -0x78f4(%rbp), %ecx
movl -0x78e0(%rbp), %eax
addl %ecx, %eax
movl %eax, -0x76e4(%rbp)
leaq -0x76e4(%rbp), %rdi
leaq -0x76c0(%rbp), %rsi
callq 0x11610
movq %rax, -0x7900(%rbp)
jmp 0x1076e
movq -0x7900(%rbp), %rax
movq %rax, -0x76e0(%rbp)
movslq -0x76c0(%rbp), %rsi
leaq -0x76b8(%rbp), %rdi
callq 0x115f0
movq %rax, %rdi
leaq -0x76e0(%rbp), %rsi
callq 0x11670
movl -0x76c0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x76c0(%rbp)
jmp 0x1066e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4ed0(%rbp)
movl %eax, -0x4ed4(%rbp)
leaq -0x76b9(%rbp), %rdi
callq 0x115d0
jmp 0x111bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4ed0(%rbp)
movl %eax, -0x4ed4(%rbp)
jmp 0x10a4c
leaq -0x76f8(%rbp), %rdi
movq %rdi, -0x7910(%rbp)
leaq -0x76b8(%rbp), %rsi
movq %rsi, -0x7918(%rbp)
callq 0x116f0
movq -0x7918(%rbp), %rsi
leaq -0x7700(%rbp), %rdi
movq %rdi, -0x7908(%rbp)
callq 0x11740
movq -0x7910(%rbp), %rdi
movq -0x7908(%rbp), %rsi
callq 0x116a0
jmp 0x1083c
leaq -0x2778(%rbp), %rdi
callq 0x114a0
movl %eax, %edx
leaq -0x770c(%rbp), %rdi
movl $0x1, %esi
callq 0x114e0
jmp 0x1085d
movq -0x30(%rbp), %rsi
leaq -0x770c(%rbp), %rdi
callq 0x11510
movl %eax, -0x791c(%rbp)
jmp 0x10875
movl -0x791c(%rbp), %eax
movl %eax, -0x7704(%rbp)
movslq -0x7704(%rbp), %rax
movq %rax, -0x7930(%rbp)
leaq -0x7729(%rbp), %rdi
movq %rdi, -0x7928(%rbp)
callq 0x11540
movq -0x7930(%rbp), %rsi
movq -0x7928(%rbp), %rdx
leaq -0x7728(%rbp), %rdi
callq 0x11560
jmp 0x108be
leaq -0x7729(%rbp), %rdi
callq 0x115d0
movl $0x0, -0x7730(%rbp)
movl -0x7730(%rbp), %eax
cmpl -0x7704(%rbp), %eax
jge 0x1098d
movslq -0x7730(%rbp), %rsi
leaq -0x76b8(%rbp), %rdi
callq 0x115f0
movslq 0x4(%rax), %rsi
leaq -0x2778(%rbp), %rdi
callq 0x115f0
movq %rax, -0x7938(%rbp)
movslq -0x7730(%rbp), %rsi
leaq -0x7728(%rbp), %rdi
callq 0x115f0
movq -0x7938(%rbp), %rsi
movq %rax, %rdi
callq 0x11790
jmp 0x10934
jmp 0x10936
movl -0x7730(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7730(%rbp)
jmp 0x108d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4ed0(%rbp)
movl %eax, -0x4ed4(%rbp)
leaq -0x7729(%rbp), %rdi
callq 0x115d0
jmp 0x10a4c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4ed0(%rbp)
movl %eax, -0x4ed4(%rbp)
leaq -0x7728(%rbp), %rdi
callq 0x119b0
jmp 0x10a4c
movl -0x10(%rbp), %eax
movl %eax, -0x7954(%rbp)
leaq -0x2760(%rbp), %rdi
movq %rdi, -0x7950(%rbp)
callq 0x7ae0
movq -0x7950(%rbp), %rdi
movq %rax, -0x7738(%rbp)
callq 0x7b10
movq %rax, -0x7740(%rbp)
movl -0x7698(%rbp), %eax
movl %eax, -0x7944(%rbp)
leaq -0x7680(%rbp), %rdi
callq 0x7bb0
movq %rax, -0x7940(%rbp)
jmp 0x109e4
movl -0x7944(%rbp), %r9d
movl -0x7954(%rbp), %edi
movq -0x7940(%rbp), %rax
movq %rax, -0x7748(%rbp)
movq -0x7738(%rbp), %rcx
movq -0x7740(%rbp), %r8
movq -0x7748(%rbp), %rdx
movq %rsp, %rax
movq %rdx, (%rax)
leaq -0x7640(%rbp), %rsi
leaq -0x7728(%rbp), %rdx
callq 0x117c0
jmp 0x10a2f
leaq -0x7728(%rbp), %rdi
callq 0x119b0
leaq -0x76b8(%rbp), %rdi
callq 0x119b0
jmp 0x10ca7
leaq -0x76b8(%rbp), %rdi
callq 0x119b0
jmp 0x111bb
movb $0x43, -0x7661(%rbp)
leaq -0x2760(%rbp), %rdi
callq 0x114c0
movl %eax, -0x774c(%rbp)
movl -0x774c(%rbp), %edx
decl %edx
leaq -0x7758(%rbp), %rdi
xorl %esi, %esi
callq 0x114e0
jmp 0x10a8e
movq -0x30(%rbp), %rsi
leaq -0x7758(%rbp), %rdi
callq 0x11510
movl %eax, -0x7958(%rbp)
jmp 0x10aa6
movl -0x7958(%rbp), %eax
movl %eax, -0x7750(%rbp)
leaq -0x7680(%rbp), %rdi
leaq -0x2760(%rbp), %rsi
callq 0x11a10
jmp 0x10ac7
movslq -0x7750(%rbp), %rsi
leaq -0x7680(%rbp), %rdi
movq %rdi, -0x7970(%rbp)
callq 0x11c90
movq -0x7970(%rbp), %rdi
movq %rax, -0x7980(%rbp)
callq 0x11cb0
movq -0x7980(%rbp), %rdi
movq %rax, %rsi
callq 0x11c60
leaq -0x7640(%rbp), %rdi
movq %rdi, -0x7960(%rbp)
callq 0x11440
movq %rax, -0x7978(%rbp)
leaq -0x2740(%rbp), %rdi
callq 0x11440
movq -0x7978(%rbp), %rdi
movq %rax, %rsi
movl -0xc(%rbp), %eax
movl -0x10(%rbp), %ecx
imull %ecx, %eax
movslq %eax, %rdx
callq 0x21a0
movq -0x7970(%rbp), %rdi
movl -0x10(%rbp), %eax
movl %eax, -0x7964(%rbp)
callq 0x6fb0
movq -0x7970(%rbp), %rdi
movq %rax, -0x7760(%rbp)
callq 0x6fb0
movq %rax, -0x7770(%rbp)
movslq -0x7750(%rbp), %rsi
leaq -0x7770(%rbp), %rdi
callq 0x11dd0
movl -0x7964(%rbp), %edi
movq -0x7960(%rbp), %rsi
movq %rax, -0x7768(%rbp)
movq -0x7760(%rbp), %rdx
movq -0x7768(%rbp), %rcx
callq 0x11cf0
jmp 0x10baf
movl -0x10(%rbp), %eax
movl %eax, -0x798c(%rbp)
leaq -0x7680(%rbp), %rdi
movq %rdi, -0x7998(%rbp)
callq 0x6fb0
movq %rax, -0x7790(%rbp)
movslq -0x7750(%rbp), %rsi
leaq -0x7790(%rbp), %rdi
callq 0x11dd0
movq -0x7998(%rbp), %rdi
movq %rax, -0x7788(%rbp)
callq 0x6fe0
movl -0x798c(%rbp), %edi
movq %rax, -0x7798(%rbp)
movq -0x7788(%rbp), %rdx
movq -0x7798(%rbp), %rcx
leaq -0x7640(%rbp), %rsi
callq 0x11ea0
movq %rax, -0x7988(%rbp)
jmp 0x10c28
movq -0x7988(%rbp), %rax
movq %rax, -0x7780(%rbp)
leaq -0x7778(%rbp), %rdi
leaq -0x7780(%rbp), %rsi
callq 0x12010
leaq -0x7680(%rbp), %rdi
movq %rdi, -0x79a8(%rbp)
callq 0x6fe0
movq %rax, -0x77a8(%rbp)
leaq -0x77a0(%rbp), %rdi
leaq -0x77a8(%rbp), %rsi
callq 0x12010
movq -0x79a8(%rbp), %rdi
movq -0x7778(%rbp), %rsi
movq -0x77a0(%rbp), %rdx
callq 0x11e10
movq %rax, -0x79a0(%rbp)
jmp 0x10c99
movq -0x79a0(%rbp), %rax
movq %rax, -0x77b0(%rbp)
jmp 0x10ca9
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
movq -0x30(%rbp), %r9
leaq -0x77c8(%rbp), %rdi
leaq -0x7640(%rbp), %r8
callq 0x12050
jmp 0x10ccb
leaq -0x77c8(%rbp), %rdi
movq %rdi, -0x79b8(%rbp)
callq 0x7ae0
movq -0x79b8(%rbp), %rdi
movq %rax, -0x77d0(%rbp)
callq 0x7b10
movq %rax, -0x77d8(%rbp)
leaq -0x7680(%rbp), %rdi
callq 0x7bb0
movq %rax, -0x79b0(%rbp)
jmp 0x10d0d
movq -0x79b0(%rbp), %rax
movq %rax, -0x77e0(%rbp)
movq -0x77d0(%rbp), %rdi
movq -0x77d8(%rbp), %rsi
movq -0x77e0(%rbp), %rdx
callq 0x7b40
movq %rax, -0x79c0(%rbp)
jmp 0x10d3e
movq -0x79c0(%rbp), %rax
movq %rax, -0x77e8(%rbp)
movl -0xc(%rbp), %eax
imull -0x10(%rbp), %eax
subl -0x4e8c(%rbp), %eax
movl %eax, -0x79c4(%rbp)
leaq -0x2760(%rbp), %rdi
callq 0x114c0
movq %rax, %rcx
movl -0x79c4(%rbp), %eax
shll %ecx
subl %ecx, %eax
movl %eax, -0x77ec(%rbp)
movl $0x0, -0x77f0(%rbp)
movl -0x77f0(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x10ee4
movl $0x0, -0x77f4(%rbp)
movl -0x77f4(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x10ece
movl -0x77f0(%rbp), %eax
imull -0x10(%rbp), %eax
addl -0x77f4(%rbp), %eax
movslq %eax, %rsi
leaq -0x4e88(%rbp), %rdi
callq 0x11640
movq %rax, -0x7800(%rbp)
movl -0x77f0(%rbp), %eax
imull -0x10(%rbp), %eax
addl -0x77f4(%rbp), %eax
movslq %eax, %rsi
leaq -0x7640(%rbp), %rdi
callq 0x72a0
movsbl (%rax), %eax
cmpl $0x0, %eax
jl 0x10e46
movl -0x77ec(%rbp), %ecx
movl $0x5, %edx
movl $0xc, %eax
cmpl $0x4, %ecx
cmovel %eax, %edx
movq -0x7800(%rbp), %rax
movzbl (%rax), %ecx
addl %edx, %ecx
movb %cl, (%rax)
jmp 0x10e46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x4ed0(%rbp)
movl %eax, -0x4ed4(%rbp)
leaq -0x77c8(%rbp), %rdi
callq 0x70c0
jmp 0x111bb
movq -0x7800(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x10e57
jmp 0x10eba
movl $0x0, -0x7804(%rbp)
movl $0x64, -0x7808(%rbp)
movq -0x7800(%rbp), %rax
movzbl (%rax), %eax
addl $-0x3, %eax
movl %eax, -0x780c(%rbp)
leaq -0x7808(%rbp), %rdi
leaq -0x780c(%rbp), %rsi
callq 0x12610
movq %rax, -0x79d0(%rbp)
jmp 0x10e9a
movq -0x79d0(%rbp), %rsi
leaq -0x7804(%rbp), %rdi
callq 0x9170
movl (%rax), %eax
movb %al, %cl
movq -0x7800(%rbp), %rax
movb %cl, (%rax)
movl -0x77f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x77f4(%rbp)
jmp 0x10da1
jmp 0x10ed0
movl -0x77f0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x77f0(%rbp)
jmp 0x10d88
leaq -0x7680(%rbp), %rdi
callq 0x114c0
movl %eax, -0x79e4(%rbp)
leaq -0x2760(%rbp), %rdi
callq 0x114c0
movq %rax, %rcx
movl -0x79e4(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x7810(%rbp)
cvtsi2sdl -0x7810(%rbp), %xmm1
movsd 0x811d(%rip), %xmm0     # 0x19040
mulsd %xmm1, %xmm0
divsd -0x7660(%rbp), %xmm0
callq 0x2360
movsd %xmm0, -0x7818(%rbp)
leaq -0x2760(%rbp), %rdi
callq 0x114c0
movq %rax, -0x79e0(%rbp)
leaq -0x7680(%rbp), %rdi
callq 0x114c0
movq -0x79e0(%rbp), %rcx
movq %rax, %rdx
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x79d1(%rbp)
jbe 0x10fae
movsd -0x7818(%rbp), %xmm0
leaq -0x7820(%rbp), %rdi
callq 0x113e0
jmp 0x10f88
movq -0x30(%rbp), %rsi
leaq -0x7820(%rbp), %rdi
callq 0x11410
movb %al, -0x79e5(%rbp)
jmp 0x10fa0
movb -0x79e5(%rbp), %al
movb %al, -0x79d1(%rbp)
jmp 0x10fae
movb -0x79d1(%rbp), %al
testb $0x1, %al
jne 0x10fbd
jmp 0x11134
leaq -0x2760(%rbp), %rdi
leaq -0x7680(%rbp), %rsi
callq 0x11a10
jmp 0x10fd2
leaq -0x2778(%rbp), %rdi
callq 0x12650
cmpl $0x64, -0x77ec(%rbp)
jg 0x110be
movl $0x0, -0x7824(%rbp)
movl -0x7824(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x110bc
movl $0x0, -0x7828(%rbp)
movl -0x7828(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x110a6
movl -0x7824(%rbp), %eax
imull -0x10(%rbp), %eax
addl -0x7828(%rbp), %eax
movslq %eax, %rsi
leaq -0x7640(%rbp), %rdi
callq 0x72a0
movsbl (%rax), %eax
cmpl $0x0, %eax
jge 0x11076
movl -0x7824(%rbp), %eax
imull -0x10(%rbp), %eax
addl -0x7828(%rbp), %eax
movslq %eax, %rsi
leaq -0x7640(%rbp), %rdi
callq 0x72a0
movsbl (%rax), %ecx
movl -0x7828(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x7828(%rbp)
jmp 0x110a1
leaq -0x2778(%rbp), %rdi
leaq -0x7824(%rbp), %rsi
leaq -0x7828(%rbp), %rdx
callq 0x12670
jmp 0x11092
movl -0x7828(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7828(%rbp)
jmp 0x1100e
jmp 0x110a8
movl -0x7824(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7824(%rbp)
jmp 0x10ff5
jmp 0x110be
movq -0x7840(%rbp), %rdi
callq 0x114c0
movq %rax, -0x79f0(%rbp)
leaq -0x2760(%rbp), %rdi
callq 0x114c0
movq %rax, %rcx
movq -0x79f0(%rbp), %rax
cmpq %rcx, %rax
jae 0x11132
movq -0x7840(%rbp), %rdi
leaq -0x7680(%rbp), %rsi
callq 0x11a10
jmp 0x11101
movq -0x7840(%rbp), %rdi
callq 0x114c0
cmpl -0x4e98(%rbp), %eax
jne 0x11130
movl -0x4f14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4f14(%rbp)
movl $0xe, -0x782c(%rbp)
jmp 0x1117f
jmp 0x11132
jmp 0x11134
movsd -0x7648(%rbp), %xmm0
movsd -0x4f28(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x7838(%rbp)
leaq -0x4f30(%rbp), %rdi
leaq -0x7838(%rbp), %rsi
callq 0x126f0
jmp 0x11165
movsd -0x7648(%rbp), %xmm0
movsd %xmm0, -0x4f28(%rbp)
movl $0x0, -0x782c(%rbp)
leaq -0x77c8(%rbp), %rdi
callq 0x70c0
leaq -0x7680(%rbp), %rdi
callq 0x70c0
movl -0x782c(%rbp), %eax
testl %eax, %eax
je 0x111a5
jmp 0x111a3
jmp 0x111cc
jmp 0x111a7
movl -0x4f14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4f14(%rbp)
jmp 0x10359
leaq -0x7680(%rbp), %rdi
callq 0x70c0
jmp 0x112f1
movq 0x13e1d(%rip), %rdi     # 0x24ff0
leaq 0x81f9(%rip), %rsi      # 0x193d3
callq 0x21f0
movq %rax, -0x79f8(%rbp)
jmp 0x111e8
movq -0x79f8(%rbp), %rdi
movl -0x4f14(%rbp), %esi
callq 0x2330
movq %rax, -0x7a00(%rbp)
jmp 0x11203
movq -0x7a00(%rbp), %rdi
movq 0x13da7(%rip), %rsi     # 0x24fb8
callq 0x2230
jmp 0x11218
movq 0x13dd1(%rip), %rdi     # 0x24ff0
leaq 0x8157(%rip), %rsi      # 0x1937d
callq 0x21f0
movq %rax, -0x7a08(%rbp)
jmp 0x11234
callq 0x7450
movq -0x7a08(%rbp), %rdi
movsd -0x4f20(%rbp), %xmm1
subsd %xmm1, %xmm0
callq 0x2380
movq %rax, -0x7a10(%rbp)
jmp 0x1125a
movq -0x7a10(%rbp), %rdi
movq 0x13d50(%rip), %rsi     # 0x24fb8
callq 0x2230
jmp 0x1126f
movq 0x13d7a(%rip), %rdi     # 0x24ff0
leaq 0x8163(%rip), %rsi      # 0x193e0
callq 0x21f0
movq %rax, -0x7a18(%rbp)
jmp 0x1128b
movq -0x7a18(%rbp), %rdi
movsd -0x4f30(%rbp), %xmm0
callq 0x2380
movq %rax, -0x7a20(%rbp)
jmp 0x112a8
movq -0x7a20(%rbp), %rdi
movq 0x13d02(%rip), %rsi     # 0x24fb8
callq 0x2230
jmp 0x112bd
movb $0x1, -0x2741(%rbp)
movl $0x1, -0x782c(%rbp)
leaq -0x2778(%rbp), %rdi
callq 0x119b0
leaq -0x2760(%rbp), %rdi
callq 0x70c0
testb $0x1, -0x2741(%rbp)
jne 0x11323
jmp 0x11317
leaq -0x2778(%rbp), %rdi
callq 0x119b0
leaq -0x2760(%rbp), %rdi
callq 0x70c0
movq -0x7840(%rbp), %rdi
callq 0x70c0
jmp 0x11333
movq -0x7840(%rbp), %rdi
callq 0x70c0
movq -0x7848(%rbp), %rax
addq $0x7a30, %rsp           # imm = 0x7A30
popq %rbp
retq
movq -0x4ed0(%rbp), %rdi
callq 0x2340
nop