// File: /workspace/github_cpp_makefile_star2_O3/JenTus[P]TCEM/src_TCEM/allocator.cc
// Function: Cide::allocator::mni(long long)
double allocator::mni(int64 rcSampleSize){
        clock_t begin = clock();

        std::vector<std::vector<int>> graph; // the graph is created from graphT
        std::vector<std::vector<int>> graphPairs; // for each pair, store common nodes
        std::vector<int> graphPairsDegree(n*n, 0); //
        std::vector<std::vector<int>> graphTPairs; // transpose of the graph, for node i, store the pairs that cover i
        graphPairs.reserve(n*n);
        graphTPairs.reserve(n);
        graph.reserve(n);
        for (int i = 0; i < n; ++i) {
           graph.emplace_back(vector<int>());
           graphTPairs.emplace_back(vector<int>());
        }

        for (int k1 = 0; k1 < n*n; ++k1) {
            graphPairs.emplace_back(vector<int>());
        }

        //create graph
        for (int j = 0; j < n; ++j) {
            for (int i = 0; i < graphT[j].size(); ++i) {
               graph[graphT[j][i]].push_back(j);
            }
        }
        //for test

        for (int i1 = 0; i1 < n; ++i1) {
           graph[i1].push_back(i1);
        }

        //create graphPairs
        for (int k = 0; k < n; ++k) {
            for (int i = 0; i < n; ++i) {
                if(i == k)
                    continue;
                std::vector<int> tmpv;
                tmpv = intersection(graph[k], graph[i]);
                graphPairs[k*n + i].insert(graphPairs[k*n +i].begin(), tmpv.begin(), tmpv.end());
                graphPairsDegree[k*n + i] = graphPairs[k*n + i].size(); //degree

                for (int j = 0; j < graphPairs[k*n + i].size(); ++j) {
                    graphTPairs[graphPairs[k*n + i][j]].push_back(k*n + i);
                }
            }
        }

        int bestPairID, bestRedNodeID, bestBlueNodeID;
        std::vector<int> isValidRed = std::vector<int>(n,tao);
        std::vector<int> isValidBlue = std::vector<int>(n,1);
        std::vector<bool> isCovered = std::vector<bool>(n, false);
        seedSet.clear();
        seedScores.clear();
        double totalExpScore = 0;
        std::set<int> rednodes;
        std::set<int> bluenodes;
        int flag_red = 0;

        while ((int)seedSet.size() < k_b) {
            double tempsum = accumulate(graphPairsDegree.begin(), graphPairsDegree.end(), 0.01);
            if(tempsum < 1){
                break;
            }

            bestPairID = std::distance(graphPairsDegree.begin(), std::max_element(graphPairsDegree.begin(), graphPairsDegree.end()));
            //cout << "bestPairID is " << bestPairID   <<endl;
            bestRedNodeID = (int) bestPairID / n;
            rednodes.insert(bestRedNodeID);
            bestBlueNodeID = (int) bestPairID % n;
            bluenodes.insert(bestBlueNodeID);

            //cout << "sum of pairwise common neighbors is " << accumulate(graphPairsDegree.begin(), graphPairsDegree.end(), 0) << endl;

            if (isValidRed[bestRedNodeID] == 0 || isValidBlue[bestBlueNodeID] == 0) {
                graphPairsDegree[bestPairID] = 0;
                continue;
            }

            seedSet.push_back(bestPairID); // store
            seedScores.push_back(graphPairsDegree[bestPairID]); // store score, dividing later

            // make update
            isValidRed[bestRedNodeID] -= 1;
            isValidRed[bestBlueNodeID] = 0;
            isValidBlue[bestBlueNodeID] = 0;
            isValidBlue[bestRedNodeID] = 0;

            if(isValidRed[bestRedNodeID] <= 0){
                for (int i = 0; i < n; ++i) {
                    graphPairsDegree[bestRedNodeID*n + i] = 0;
                }
            }

            for (int i = 0; i < n; ++i) {
                graphPairsDegree[i*n + bestBlueNodeID]  = 0;
                graphPairsDegree[i*n + bestRedNodeID]  = 0;
                graphPairsDegree[bestBlueNodeID*n + i] = 0;
            }

            // if red nodes reaches k_r
            if(rednodes.size() == k_r && flag_red == 0){
                for (int i = 0; i < n; ++i) {
                    if(rednodes.count(i) == 0){
                        isValidRed[i] = 0;
                        for (int j = 0; j < n; ++j) {
                            graphPairsDegree[i*n + j] = 0;
                        }
                    }
                }
                flag_red = 1;
            }

            // update the ExpScore of the pairs whose marginal gain change due to the best pair selection
            int tmpsize = graphPairs[bestPairID].size();
            for (int j = 0; j < tmpsize; j++) {
                int nodeid = graphPairs[bestPairID][j];
                if(isCovered[nodeid] == false){ // ensure not to repeatedly --
                    int ttmpsize = graphTPairs[nodeid].size();
                    for (int z = 0; z < ttmpsize; z++) {
                        int pairID = graphTPairs[nodeid][z];
                        if (graphPairsDegree[pairID] != 0) {
                            graphPairsDegree[pairID]--;
                        }
                    }
                    isCovered[nodeid] = true;
                }
            }
        } // end of while k loop

        for (int i1 = 0; i1 < seedScores.size(); ++i1) {
            totalExpScore += seedScores[i1];
        }

        int covercount = 0;
        for (int l = 0; l < isCovered.size(); ++l) {
            if(isCovered[l])
                covercount ++;
        }

        cout << "number of common covered neighbor is: " << totalExpScore << " cover is " << covercount << endl;

        // get the score on rr sets
        clock_t end = clock();
        totalDuration = double(end - begin) / CLOCKS_PER_SEC + duration_common; // in seconds
        totalMemory = getCurrentMemoryUsage(); // in MB


        int redbluecount = 0;

        vector<int> s1(rednodes.begin(), rednodes.end());
        vector<int> s2(bluenodes.begin(), bluenodes.end());
        sort(s1.begin(), s1.end());
        sort(s2.begin(), s2.end());


        for (int i = 0; i < rcSampleSize; ++i) {
            vector<int> RedList = rcList->at(0)->hyperGT[i];
            vector<int> BlueList = rcList->at(1)->hyperGT[i];

            sort(RedList.begin(), RedList.end());
            sort(BlueList.begin(), BlueList.end());

            if(intersection_size(s1, RedList) >= 1){
                if(intersection_size(s2, BlueList) >= 1){
                    redbluecount +=1;
                }
            }
        }

        float totalscore = (float) redbluecount / (float) rcSampleSize;

//
        cout << "Total score of mni is " << totalscore*n << endl;

        std::ostringstream streamObj1;
        streamObj1 << std::fixed << std::setprecision(2)<<totalscore*n << "(" << totalExpScore << ")";

        writeInMasterOutputFile("MNI", totalDuration,  totalMemory, streamObj1.str(), rednodes, bluenodes);

        return totalscore*n;

    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3c8, %rsp            # imm = 0x3C8
movq %rsi, 0x28(%rsp)
movq %rdi, %rbx
callq 0x31d0
movq %rax, 0x110(%rsp)
xorl %eax, %eax
movq %rax, 0x80(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x70(%rsp)
movq %rax, 0x60(%rsp)
movapd %xmm0, 0x50(%rsp)
movl 0x68(%rbx), %esi
imull %esi, %esi
leaq 0x1d0(%rsp), %rdx
movl $0x0, (%rdx)
leaq 0x38(%rsp), %rdi
leaq 0x118(%rsp), %rcx
callq 0xacd0
xorpd %xmm0, %xmm0
movapd %xmm0, 0xb0(%rsp)
movq $0x0, 0xc0(%rsp)
movl 0x68(%rbx), %esi
imull %esi, %esi
leaq 0x50(%rsp), %rdi
callq 0xb0d2
movslq 0x68(%rbx), %rsi
leaq 0xb0(%rsp), %rdi
callq 0xb0d2
movslq 0x68(%rbx), %rsi
leaq 0x70(%rsp), %rdi
callq 0xb0d2
movl 0x68(%rbx), %eax
testl %eax, %eax
jle 0x76dc
xorl %ebp, %ebp
leaq 0x70(%rsp), %r15
leaq 0x1d0(%rsp), %r12
leaq 0xb0(%rsp), %r13
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1d0(%rsp)
movq $0x0, 0x1e0(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xaae4
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x769d
callq 0x32c0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1d0(%rsp)
movq $0x0, 0x1e0(%rsp)
movq %r13, %rdi
movq %r12, %rsi
callq 0xaae4
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x76d3
callq 0x32c0
incl %ebp
movl 0x68(%rbx), %eax
cmpl %eax, %ebp
jl 0x7667
testl %eax, %eax
je 0x79a3
xorl %ebp, %ebp
leaq 0x50(%rsp), %r15
leaq 0x1d0(%rsp), %r12
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1d0(%rsp)
movq $0x0, 0x1e0(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xaae4
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x7729
callq 0x32c0
incl %ebp
movl 0x68(%rbx), %eax
movl %eax, %ecx
imull %eax, %ecx
cmpl %ecx, %ebp
jb 0x76f3
movl $0x0, 0x1d0(%rsp)
testl %eax, %eax
jle 0x79a5
leaq 0x10bf7(%rip), %r14     # 0x18348
movq (%r14), %rcx
xorl %edx, %edx
leaq 0x1d0(%rsp), %r15
movslq %edx, %rsi
leaq (%rsi,%rsi,2), %rdi
movq (%rcx,%rdi,8), %rsi
cmpq %rsi, 0x8(%rcx,%rdi,8)
je 0x77cc
xorl %r12d, %r12d
movslq (%rsi,%r12,4), %rax
movq 0x70(%rsp), %rsi
leaq (%rax,%rax,2), %rax
leaq (%rsi,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x779a
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x77a5
movq %r15, %rdx
callq 0xbd60
movq (%r14), %rcx
incq %r12
movslq 0x1d0(%rsp), %rdx
leaq (%rdx,%rdx,2), %rax
movq (%rcx,%rax,8), %rsi
movq 0x8(%rcx,%rax,8), %rax
subq %rsi, %rax
sarq $0x2, %rax
cmpq %r12, %rax
ja 0x7773
movl 0x68(%rbx), %eax
incl %edx
movl %edx, 0x1d0(%rsp)
cmpl %eax, %edx
jl 0x775e
movl $0x0, 0x1d0(%rsp)
testl %eax, %eax
jle 0x79a5
xorl %ecx, %ecx
leaq 0x1d0(%rsp), %r15
movslq %ecx, %rax
movq 0x70(%rsp), %rdx
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x781c
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x7824
movq %r15, %rdx
callq 0xbd60
movl 0x1d0(%rsp), %ecx
incl %ecx
movl %ecx, 0x1d0(%rsp)
movl 0x68(%rbx), %eax
cmpl %eax, %ecx
jl 0x77f6
testl %eax, %eax
jle 0x79a5
xorl %r14d, %r14d
leaq 0x1d0(%rsp), %r15
testl %eax, %eax
jle 0x7992
leaq (%r14,%r14,2), %rcx
movq %rcx, 0x10(%rsp)
xorl %ebp, %ebp
cmpq %r14, %rbp
je 0x7983
movq 0x70(%rsp), %rax
movq 0x10(%rsp), %rcx
leaq (%rax,%rcx,8), %rsi
leaq (,%rbp,2), %rcx
addq %rbp, %rcx
leaq (%rax,%rcx,8), %rdx
movq %r15, %rdi
callq 0xdbd3
movq 0x1d0(%rsp), %r12
movq 0x1d8(%rsp), %rcx
movl 0x68(%rbx), %eax
imull %r14d, %eax
addl %ebp, %eax
cltq
movq 0x50(%rsp), %rdx
leaq (%rax,%rax,2), %rax
leaq (%rdx,%rax,8), %rdi
movq (%rdi), %rsi
movq %r12, %rdx
callq 0xc8b6
movl 0x68(%rbx), %eax
imull %r14d, %eax
addl %ebp, %eax
cltq
movq 0x50(%rsp), %rcx
leaq (%rax,%rax,2), %rdx
movq 0x8(%rcx,%rdx,8), %rsi
subq (%rcx,%rdx,8), %rsi
shrq $0x2, %rsi
movq 0x38(%rsp), %rdx
movl %esi, (%rdx,%rax,4)
movl 0x68(%rbx), %eax
movl %eax, %edx
imull %r14d, %edx
addl %ebp, %edx
movslq %edx, %rsi
leaq (%rsi,%rsi,2), %rdi
movq (%rcx,%rdi,8), %rsi
cmpq %rsi, 0x8(%rcx,%rdi,8)
je 0x7973
xorl %r13d, %r13d
movslq (%rsi,%r13,4), %rax
movq 0xb0(%rsp), %rsi
leaq (%rax,%rax,2), %rax
leaq (%rsi,%rax,8), %rdi
movl %edx, 0x1d0(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x793c
movl %edx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x7949
movq %r15, %rdx
callq 0xca6a
movq 0x50(%rsp), %rcx
incq %r13
movl 0x68(%rbx), %eax
movl %eax, %edx
imull %r14d, %edx
addl %ebp, %edx
movslq %edx, %rsi
leaq (%rsi,%rsi,2), %rdi
movq (%rcx,%rdi,8), %rsi
movq 0x8(%rcx,%rdi,8), %rdi
subq %rsi, %rdi
sarq $0x2, %rdi
cmpq %r13, %rdi
ja 0x790b
testq %r12, %r12
je 0x7983
movq %r12, %rdi
callq 0x32c0
movl 0x68(%rbx), %eax
incq %rbp
movslq %eax, %rcx
cmpq %rcx, %rbp
jl 0x7861
incq %r14
movslq %eax, %rsi
cmpq %rsi, %r14
jl 0x784e
jmp 0x79a8
xorl %eax, %eax
movslq %eax, %rsi
leaq 0x80(%rbx), %rdx
leaq 0x160(%rsp), %rdi
leaq 0x1d0(%rsp), %rcx
callq 0xacd0
movslq 0x68(%rbx), %rsi
leaq 0x1d0(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x148(%rsp), %rdi
leaq 0x118(%rsp), %rcx
callq 0xacd0
movslq 0x68(%rbx), %rsi
leaq 0x1d0(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x178(%rsp), %rdi
leaq 0x118(%rsp), %rcx
callq 0xae4c
movq 0xa8(%rbx), %rax
cmpq %rax, 0xb0(%rbx)
je 0x7a26
movq %rax, 0xb0(%rbx)
movq 0xc0(%rbx), %rax
cmpq %rax, 0xc8(%rbx)
je 0x7a3d
movq %rax, 0xc8(%rbx)
leaq 0x120(%rsp), %r12
xorl %r13d, %r13d
movl %r13d, (%r12)
movq %r13, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
movq %r13, 0x20(%r12)
leaq 0x1a8(%rsp), %rax
movl %r13d, (%rax)
movq %r13, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %r13, 0x20(%rax)
cmpl %r13d, 0x7c(%rbx)
jle 0x7f17
leaq 0xa8(%rbx), %rax
movq %rax, 0x108(%rsp)
leaq 0xc0(%rbx), %rax
movq %rax, 0x100(%rsp)
xorl %r14d, %r14d
movabsq $-0x8000000000000000, %r15 # imm = 0x8000000000000000
movl $0x0, 0x34(%rsp)
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rdx
cmpq %rdx, %rcx
je 0x7ee3
movsd 0xa6a5(%rip), %xmm0     # 0x12178
movq %rcx, %rax
xorps %xmm1, %xmm1
cvtsi2sdl (%rax), %xmm1
addsd %xmm1, %xmm0
addq $0x4, %rax
cmpq %rdx, %rax
jne 0x7ad6
movsd 0xa65e(%rip), %xmm1     # 0x12150
ucomisd %xmm0, %xmm1
ja 0x7ee3
leaq 0x4(%rcx), %rsi
movq %rcx, %rax
cmpq %rdx, %rsi
je 0x7b24
movl (%rcx), %edi
movq %rcx, %rax
movl (%rsi), %r8d
cmpl %r8d, %edi
cmovlel %r8d, %edi
cmovlq %rsi, %rax
addq $0x4, %rsi
cmpq %rdx, %rsi
jne 0x7b0d
subq %rcx, %rax
shrq $0x2, %rax
movl %eax, 0xc(%rsp)
cltd
idivl 0x68(%rbx)
movl %eax, 0x8(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xbf5a
movl 0xc(%rsp), %eax
cltd
idivl 0x68(%rbx)
movl %edx, 0x1c(%rsp)
leaq 0x1a0(%rsp), %rdi
leaq 0x1c(%rsp), %rsi
callq 0xbf5a
movslq 0x8(%rsp), %rax
movq 0x160(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
je 0x7bb0
movslq 0x1c(%rsp), %rax
movq 0x148(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
je 0x7bb0
movq 0xb0(%rbx), %rsi
cmpq 0xb8(%rbx), %rsi
je 0x7bc6
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0xb0(%rbx)
jmp 0x7bdc
movslq 0xc(%rsp), %rax
movq 0x38(%rsp), %rcx
movl $0x0, (%rcx,%rax,4)
jmp 0x7ec8
movq 0x108(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0xbd60
movl 0xc(%rsp), %eax
cltq
movq 0x38(%rsp), %rcx
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx,%rax,4), %xmm0
movsd %xmm0, 0x1d0(%rsp)
movq 0xc8(%rbx), %rsi
cmpq 0xd0(%rbx), %rsi
je 0x7c15
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0xc8(%rbx)
jmp 0x7c2a
movq 0x100(%rsp), %rdi
leaq 0x1d0(%rsp), %rdx
callq 0xcb3e
movslq 0x8(%rsp), %rcx
movq 0x160(%rsp), %rax
decl (%rax,%rcx,4)
movslq 0x1c(%rsp), %rcx
movl %r14d, (%rax,%rcx,4)
movslq 0x1c(%rsp), %rcx
movq 0x148(%rsp), %rdx
movl %r14d, (%rdx,%rcx,4)
movslq 0x8(%rsp), %rcx
movl %r14d, (%rdx,%rcx,4)
movslq 0x8(%rsp), %rdx
movl 0x68(%rbx), %ecx
cmpl %r14d, (%rax,%rdx,4)
jg 0x7c96
testl %ecx, %ecx
jle 0x7ce8
movq 0x38(%rsp), %rdx
xorl %esi, %esi
movslq 0x8(%rsp), %rdi
movslq %ecx, %rcx
imulq %rdi, %rcx
addq %rsi, %rcx
movl $0x0, (%rdx,%rcx,4)
movl 0x68(%rbx), %ecx
incq %rsi
cmpl %ecx, %esi
jl 0x7c76
testl %ecx, %ecx
jle 0x7ce8
movq 0x38(%rsp), %rdx
xorl %esi, %esi
imull %esi, %ecx
movslq 0x1c(%rsp), %rdi
movslq %ecx, %rcx
addq %rdi, %rcx
movl %r14d, (%rdx,%rcx,4)
movslq 0x68(%rbx), %rcx
movslq %esi, %rdi
imulq %rcx, %rdi
movslq 0x8(%rsp), %rcx
addq %rdi, %rcx
movl %r14d, (%rdx,%rcx,4)
movslq 0x1c(%rsp), %rcx
movslq 0x68(%rbx), %rdi
imulq %rcx, %rdi
addq %rsi, %rdi
movl %r14d, (%rdx,%rdi,4)
movl 0x68(%rbx), %ecx
incq %rsi
cmpl %ecx, %esi
jl 0x7ca1
movslq 0x78(%rbx), %rdx
cmpq %rdx, 0x140(%rsp)
sete %dl
cmpl $0x0, 0x34(%rsp)
sete %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x7db2
movl $0x1, 0x34(%rsp)
testl %ecx, %ecx
jle 0x7db2
movq 0x128(%rsp), %rdx
movq 0x38(%rsp), %rsi
xorl %edi, %edi
testq %rdx, %rdx
je 0x7d77
movq %rdx, %r14
movq %r12, %r11
movq %r11, %r8
movq %r14, %r9
movslq 0x20(%r14), %r10
xorl %r14d, %r14d
cmpq %r10, %rdi
setg %r14b
movq %r9, %r11
cmovgq %r8, %r11
movq 0x10(%r9,%r14,8), %r14
testq %r14, %r14
jne 0x7d37
cmpq %r12, %r11
movl $0x0, %r14d
je 0x7d77
cmpq %r10, %rdi
cmovgq %r8, %r9
movslq 0x20(%r9), %r8
cmpq %r8, %rdi
jge 0x7da3
movl $0x0, (%rax,%rdi,4)
movl 0x68(%rbx), %ecx
testl %ecx, %ecx
jle 0x7da3
xorl %r8d, %r8d
imull %edi, %ecx
movslq %ecx, %rcx
addq %r8, %rcx
movl $0x0, (%rsi,%rcx,4)
movl 0x68(%rbx), %ecx
incq %r8
cmpl %ecx, %r8d
jl 0x7d88
incq %rdi
movslq %ecx, %r8
cmpq %r8, %rdi
jl 0x7d2c
movslq 0xc(%rsp), %rcx
movq 0x50(%rsp), %rax
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %rdx
subq (%rax,%rcx,8), %rdx
shrq $0x2, %rdx
testl %edx, %edx
jle 0x7ec8
movq 0x178(%rsp), %rsi
movq 0xb0(%rsp), %rcx
movq %rcx, 0x20(%rsp)
movq 0x38(%rsp), %r8
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %r9d, %r9d
movq %rdx, 0x10(%rsp)
movslq 0xc(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rcx
movslq (%rcx,%r9,4), %rcx
leal 0x3f(%rcx), %edi
testq %rcx, %rcx
cmovnsl %ecx, %edi
sarl $0x6, %edi
leaq 0x3f(%r15), %r11
andq %rcx, %r11
xorl %r10d, %r10d
cmpq %r15, %r11
setbe %r10b
movl $0x1, %r11d
shlq %cl, %r11
movslq %edi, %rdi
leaq (%rsi,%rdi,8), %r14
movq -0x8(%r14,%r10,8), %r13
btq %rcx, %r13
jb 0x7eae
movq %rax, %rdx
movq %rsi, %rax
movq %r15, %rsi
leaq (%rcx,%rcx,2), %rdi
movq 0x20(%rsp), %r15
movq (%r15,%rdi,8), %rcx
movq 0x8(%r15,%rdi,8), %r12
subq %rcx, %r12
shrq $0x2, %r12
testl %r12d, %r12d
jle 0x7e91
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movslq (%rcx,%r15,4), %rbp
movl (%r8,%rbp,4), %edi
testl %edi, %edi
je 0x7e89
decl %edi
movl %edi, (%r8,%rbp,4)
incq %r15
cmpq %r15, %r12
jne 0x7e77
leaq -0x8(,%r10,8), %rcx
orq %r13, %r11
movq %r11, (%r14,%rcx)
movq %rsi, %r15
movq %rax, %rsi
movq %rdx, %rax
movq 0x10(%rsp), %rdx
incq %r9
cmpq %rdx, %r9
jne 0x7dfd
leaq 0x120(%rsp), %r12
xorl %r13d, %r13d
xorl %r14d, %r14d
movq 0xb0(%rbx), %rax
subq 0xa8(%rbx), %rax
shrq $0x2, %rax
cmpl %eax, 0x7c(%rbx)
jg 0x7ab8
movq 0xc0(%rbx), %rax
movq 0xc8(%rbx), %rcx
subq %rax, %rcx
xorpd %xmm0, %xmm0
je 0x7f1b
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
addsd (%rax,%rdx,8), %xmm0
incq %rdx
cmpq %rdx, %rcx
jne 0x7f08
jmp 0x7f1b
xorpd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x178(%rsp), %rax
movq 0x188(%rsp), %rcx
movl 0x190(%rsp), %edx
subq %rax, %rcx
shlq $0x3, %rcx
addq %rdx, %rcx
je 0x7f62
xorl %edx, %edx
xorl %r13d, %r13d
movl %edx, %esi
shrl $0x6, %esi
movq (%rax,%rsi,8), %rsi
btq %rdx, %rsi
adcl $0x0, %r13d
incq %rdx
cmpq %rdx, %rcx
ja 0x7f49
movq 0x1006f(%rip), %rdi     # 0x17fd8
leaq 0xa3f3(%rip), %rsi      # 0x12363
movl $0x26, %edx
callq 0x3340
movq 0x10057(%rip), %rdi     # 0x17fd8
movsd 0x20(%rsp), %xmm0
callq 0x3500
movq %rax, %r15
leaq 0xa2ee(%rip), %rsi      # 0x12284
movl $0xa, %edx
movq %rax, %rdi
callq 0x3340
movq %r15, %rdi
movl %r13d, %esi
callq 0x3580
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x32d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31e0
callq 0x31d0
subq 0x110(%rsp), %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0xa17b(%rip), %xmm0     # 0x12170
addsd 0x8(%rbx), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xb70(%rbx)
callq 0xd418
movss %xmm0, 0xb74(%rbx)
movq 0x130(%rsp), %rsi
leaq 0xe8(%rsp), %rdi
leaq 0x1d0(%rsp), %rcx
movq %r12, %rdx
callq 0xaeb4
movq 0x1b8(%rsp), %rsi
leaq 0xd0(%rsp), %rdi
leaq 0x1d0(%rsp), %rcx
leaq 0x1a8(%rsp), %rdx
callq 0xaeb4
movq 0xe8(%rsp), %r15
movq 0xf0(%rsp), %r12
cmpq %r12, %r15
je 0x809a
movq %r12, %rax
subq %r15, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xc1e6
movq %r15, %rdi
movq %r12, %rsi
callq 0xc2c9
movq 0xd0(%rsp), %r15
movq 0xd8(%rsp), %r12
cmpq %r12, %r15
je 0x80dc
movq %r12, %rax
subq %r15, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0xc1e6
movq %r15, %rdi
movq %r12, %rsi
callq 0xc2c9
cmpq $0x0, 0x28(%rsp)
jle 0x8301
xorl %r14d, %r14d
leaq 0x1d0(%rsp), %r15
leaq 0x90(%rsp), %r12
movl $0x0, 0x10(%rsp)
movq 0xae8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x860a
movq (%rax), %rax
leaq (%r14,%r14,2), %r13
shlq $0x3, %r13
movq 0x18(%rax), %rsi
addq %r13, %rsi
movq %r15, %rdi
callq 0xaeee
movq 0xae8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0x861c
movq 0x8(%rax), %rax
addq 0x18(%rax), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0xaeee
movq 0x1d0(%rsp), %r13
movq 0x1d8(%rsp), %rbp
cmpq %rbp, %r13
je 0x81a5
movq %rbp, %rax
subq %r13, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %rbp, %rsi
callq 0xc1e6
movq %r13, %rdi
movq %rbp, %rsi
callq 0xc2c9
movq 0x90(%rsp), %r13
movq 0x98(%rsp), %rbp
cmpq %rbp, %r13
je 0x81e7
movq %rbp, %rax
subq %r13, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r13, %rdi
movq %rbp, %rsi
callq 0xc1e6
movq %r13, %rdi
movq %rbp, %rsi
callq 0xc2c9
movq 0xe8(%rsp), %rax
movq 0xf0(%rsp), %rcx
movq 0x1d0(%rsp), %rdi
movq 0x1d8(%rsp), %rdx
cmpq %rcx, %rax
setne %sil
cmpq %rdx, %rdi
setne %r8b
andb %sil, %r8b
cmpb $0x1, %r8b
jne 0x82c4
xorl %esi, %esi
movq %rdi, %r8
movl (%rax), %r9d
movl (%r8), %r10d
cmpl %r10d, %r9d
jge 0x8238
addq $0x4, %rax
jmp 0x8245
jg 0x8241
incq %rsi
addq $0x4, %rax
addq $0x4, %r8
cmpq %rcx, %rax
je 0x824f
cmpq %rdx, %r8
jne 0x8227
movq 0x90(%rsp), %rax
testq %rsi, %rsi
je 0x82cc
movq 0xd0(%rsp), %rcx
movq 0xd8(%rsp), %rdx
movq 0x98(%rsp), %rsi
cmpq %rdx, %rcx
setne %r8b
cmpq %rsi, %rax
setne %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x82cc
xorl %r8d, %r8d
movq %rax, %r9
movl (%rcx), %r10d
movl (%r9), %r11d
cmpl %r11d, %r10d
jge 0x82a2
addq $0x4, %rcx
jmp 0x82af
jg 0x82ab
incq %r8
addq $0x4, %rcx
addq $0x4, %r9
cmpq %rdx, %rcx
je 0x82b9
cmpq %rsi, %r9
jne 0x8291
testq %r8, %r8
je 0x82cc
incl 0x10(%rsp)
jmp 0x82cc
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x82e1
movq %rax, %rdi
callq 0x32c0
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x82eb
callq 0x32c0
incq %r14
cmpq 0x28(%rsp), %r14
jne 0x8103
cvtsi2ssl 0x10(%rsp), %xmm0
jmp 0x8304
xorps %xmm0, %xmm0
movss %xmm0, 0x10(%rsp)
movq 0xfcc7(%rip), %rdi      # 0x17fd8
leaq 0xa072(%rip), %rsi      # 0x1238a
movl $0x16, %edx
callq 0x3340
xorps %xmm0, %xmm0
cvtsi2ssq 0x28(%rsp), %xmm0
cvtsi2ssl 0x68(%rbx), %xmm1
movss 0x10(%rsp), %xmm2
divss %xmm0, %xmm2
movss %xmm2, 0x10(%rsp)
mulss %xmm2, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movq 0xfc85(%rip), %rdi      # 0x17fd8
callq 0x3500
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x32d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x31e0
leaq 0x1d0(%rsp), %rdi
callq 0x3410
leaq 0x1d0(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x1e8(%rsp,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x1e8(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x1d8(%rsp,%rax)
xorps %xmm0, %xmm0
cvtsi2ssl 0x68(%rbx), %xmm0
mulss 0x10(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x3500
movq %rax, %r14
leaq 0x9ee4(%rip), %rsi      # 0x122c9
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
movq %r14, %rdi
movsd 0x20(%rsp), %xmm0
callq 0x3500
leaq 0xa3fa(%rip), %rsi      # 0x12801
movl $0x1, %edx
movq %rax, %rdi
callq 0x3340
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x9f7a(%rip), %rsi      # 0x123a1
leaq 0x9f76(%rip), %rdx      # 0x123a4
leaq 0x90(%rsp), %rdi
callq 0xb3fa
movss 0xb70(%rbx), %xmm0
movss %xmm0, 0x28(%rsp)
movss 0xb74(%rbx), %xmm0
movss %xmm0, 0x20(%rsp)
leaq 0x1d8(%rsp), %rsi
leaq 0x348(%rsp), %rdi
callq 0x34f0
leaq 0x398(%rsp), %rdi
leaq 0x118(%rsp), %rsi
callq 0xb490
leaq 0x368(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0xb490
leaq 0x90(%rsp), %rsi
leaq 0x348(%rsp), %rdx
leaq 0x398(%rsp), %rcx
leaq 0x368(%rsp), %r8
movq %rbx, %rdi
movss 0x28(%rsp), %xmm0
movss 0x20(%rsp), %xmm1
callq 0xa4c4
leaq 0x368(%rsp), %rdi
callq 0xb65e
leaq 0x398(%rsp), %rdi
callq 0xb65e
leaq 0x358(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x84fa
callq 0x32c0
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x850c
callq 0x32c0
movl 0x68(%rbx), %ebx
movq 0xfaba(%rip), %rsi      # 0x17fd0
leaq 0x1d0(%rsp), %rdi
callq 0x3170
leaq 0x240(%rsp), %rdi
callq 0x30e0
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x8542
callq 0x32c0
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x8554
callq 0x32c0
leaq 0x1a0(%rsp), %rdi
callq 0xb65e
leaq 0x118(%rsp), %rdi
callq 0xb65e
movq 0x178(%rsp), %rdi
testq %rdi, %rdi
je 0x8580
callq 0x32c0
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x8592
callq 0x32c0
movq 0x160(%rsp), %rdi
testq %rdi, %rdi
je 0x85a4
callq 0x32c0
leaq 0xb0(%rsp), %rdi
callq 0xac8a
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x85c0
callq 0x32c0
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
movss 0x10(%rsp), %xmm1
mulss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xac8a
leaq 0x70(%rsp), %rdi
callq 0xac8a
movsd 0x10(%rsp), %xmm0
addq $0x3c8, %rsp            # imm = 0x3C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9f7e(%rip), %rdi      # 0x1258f
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3490
leaq 0x9f6c(%rip), %rdi      # 0x1258f
movl $0x1, %esi
xorl %eax, %eax
callq 0x3490
jmp 0x86ed
movq %rax, %rbx
leaq 0x368(%rsp), %rdi
callq 0xb65e
jmp 0x8649
movq %rax, %rbx
leaq 0x398(%rsp), %rdi
callq 0xb65e
jmp 0x865b
movq %rax, %rbx
leaq 0x358(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8676
callq 0x32c0
jmp 0x8676
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x86c6
callq 0x32c0
jmp 0x86c6
jmp 0x86c3
jmp 0x86fb
movq %rax, %rbx
jmp 0x8757
jmp 0x86ed
jmp 0x86ed
movq %rax, %rbx
jmp 0x8795
movq %rax, %rbx
jmp 0x87a7
jmp 0x87b6
movq %rax, %rbx
jmp 0x87e7
jmp 0x86fb
jmp 0x87b6
jmp 0x87b6
movq %rax, %rbx
movq 0xf903(%rip), %rsi      # 0x17fd0
leaq 0x1d0(%rsp), %rdi
callq 0x3170
leaq 0x240(%rsp), %rdi
callq 0x30e0
jmp 0x8745
jmp 0x86fb
jmp 0x86ed
movq %rax, %rbx
jmp 0x8769
jmp 0x86fb
jmp 0x86f6
movq %rax, %rbx
jmp 0x8733
movq %rax, %rbx
jmp 0x8745
jmp 0x8704
jmp 0x8704
movq %rax, %rbx
movq 0x1d0(%rsp), %rdi
jmp 0x87af
jmp 0x87b6
jmp 0x87bb
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x8733
callq 0x32c0
movq 0x1d0(%rsp), %rdi
testq %rdi, %rdi
je 0x8745
callq 0x32c0
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0x8757
callq 0x32c0
movq 0xe8(%rsp), %rdi
testq %rdi, %rdi
je 0x8769
callq 0x32c0
leaq 0x1a0(%rsp), %rdi
callq 0xb65e
leaq 0x118(%rsp), %rdi
callq 0xb65e
movq 0x178(%rsp), %rdi
testq %rdi, %rdi
je 0x8795
callq 0x32c0
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x87a7
callq 0x32c0
movq 0x160(%rsp), %rdi
testq %rdi, %rdi
jne 0x87c6
jmp 0x87cb
movq %rax, %rbx
jmp 0x87cb
movq %rax, %rbx
testq %r12, %r12
je 0x87cb
movq %r12, %rdi
callq 0x32c0
leaq 0xb0(%rsp), %rdi
callq 0xac8a
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x87e7
callq 0x32c0
leaq 0x50(%rsp), %rdi
callq 0xac8a
leaq 0x70(%rsp), %rdi
callq 0xac8a
movq %rbx, %rdi
callq 0x35c0
nop