// File: /workspace/github_cpp_makefile_star2_O2/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 $0x3b8, %rsp            # imm = 0x3B8
movq %rsi, 0x88(%rsp)
movq %rdi, %rbx
callq 0x31c0
movq %rax, 0xe0(%rsp)
andq $0x0, 0x80(%rsp)
xorpd %xmm0, %xmm0
andq $0x0, 0x60(%rsp)
movapd %xmm0, 0x70(%rsp)
movapd %xmm0, 0x50(%rsp)
movl 0x68(%rbx), %esi
imull %esi, %esi
leaq 0x1c0(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x30(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
callq 0x858e
andq $0x0, 0xa0(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x90(%rsp)
movl 0x68(%rbx), %esi
imull %esi, %esi
leaq 0x50(%rsp), %rdi
callq 0x87d6
movslq 0x68(%rbx), %rsi
leaq 0x90(%rsp), %rdi
callq 0x87d6
movslq 0x68(%rbx), %rsi
leaq 0x70(%rsp), %rdi
callq 0x87d6
xorl %ebp, %ebp
xorpd %xmm0, %xmm0
leaq 0x70(%rsp), %r14
leaq 0x1c0(%rsp), %r15
leaq 0x90(%rsp), %r12
movl 0x68(%rbx), %eax
cmpl %eax, %ebp
jge 0x5e06
movapd %xmm0, 0x1c0(%rsp)
andq $0x0, 0x1d0(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x8358
movq %r15, %rdi
callq 0x8e40
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1c0(%rsp)
andq $0x0, 0x1d0(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x8358
movq %r15, %rdi
callq 0x8e40
incl %ebp
xorpd %xmm0, %xmm0
jmp 0x5da9
xorl %ebp, %ebp
leaq 0x50(%rsp), %r14
leaq 0x1c0(%rsp), %r15
movl %eax, %ecx
imull %eax, %ecx
cmpl %ecx, %ebp
jae 0x5e4e
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1c0(%rsp)
andq $0x0, 0x1d0(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x8358
movq %r15, %rdi
callq 0x8e40
incl %ebp
movl 0x68(%rbx), %eax
jmp 0x5e15
xorl %ecx, %ecx
leaq 0xf4c1(%rip), %r15      # 0x15318
leaq 0x1c0(%rsp), %r14
movl %ecx, 0x1c0(%rsp)
cmpl %eax, %ecx
jge 0x5eb4
xorl %r12d, %r12d
movslq %ecx, %rax
movq (%r15), %rdx
imulq $0x18, %rax, %rsi
movq (%rdx,%rsi), %rax
movq 0x8(%rdx,%rsi), %rdx
subq %rax, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0x5ead
movslq (%rax,%r12,4), %rax
imulq $0x18, %rax, %rdi
addq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x854e
incq %r12
movl 0x1c0(%rsp), %ecx
jmp 0x5e6d
incl %ecx
movl 0x68(%rbx), %eax
jmp 0x5e5f
xorl %ecx, %ecx
leaq 0x1c0(%rsp), %r14
movl %ecx, 0x1c0(%rsp)
cmpl %eax, %ecx
jge 0x5eeb
movslq %ecx, %rax
imulq $0x18, %rax, %rdi
addq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x854e
movl 0x1c0(%rsp), %ecx
incl %ecx
movl 0x68(%rbx), %eax
jmp 0x5ebe
xorl %r12d, %r12d
leaq 0xb0(%rsp), %r14
leaq 0x1c0(%rsp), %r13
movslq %eax, %rsi
cmpq %rsi, %r12
jge 0x6037
imulq $0x18, %r12, %rcx
movq %rcx, 0x10(%rsp)
xorl %ebp, %ebp
movslq %eax, %rcx
cmpq %rcx, %rbp
jge 0x602f
cmpq %r12, %rbp
je 0x6027
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1c0(%rsp)
andq $0x0, 0x1d0(%rsp)
movq 0x70(%rsp), %rax
movq 0x10(%rsp), %rcx
leaq (%rax,%rcx), %rsi
imulq $0x18, %rbp, %rdx
addq %rax, %rdx
movq %r14, %rdi
callq 0xb2fa
movq %r13, %rdi
movq %r14, %rsi
callq 0xa43a
movq %r14, %rdi
callq 0x8e40
movl 0x68(%rbx), %eax
imull %r12d, %eax
addl %ebp, %eax
cltq
movq 0x50(%rsp), %rcx
imulq $0x18, %rax, %rax
leaq (%rcx,%rax), %rdi
movq (%rcx,%rax), %rsi
movq 0x1c0(%rsp), %rdx
movq 0x1c8(%rsp), %rcx
callq 0x886c
movl 0x68(%rbx), %eax
imull %r12d, %eax
addl %ebp, %eax
movslq %eax, %rcx
movq 0x50(%rsp), %rax
imulq $0x18, %rcx, %rdx
movq 0x8(%rax,%rdx), %rsi
subq (%rax,%rdx), %rsi
shrq $0x2, %rsi
movq 0x30(%rsp), %rdx
movl %esi, (%rdx,%rcx,4)
xorl %r15d, %r15d
movl 0x68(%rbx), %ecx
imull %r12d, %ecx
addl %ebp, %ecx
movslq %ecx, %rdx
imulq $0x18, %rdx, %rsi
movq (%rax,%rsi), %rdx
movq 0x8(%rax,%rsi), %rax
subq %rdx, %rax
sarq $0x2, %rax
cmpq %r15, %rax
jbe 0x601c
movslq (%rdx,%r15,4), %rax
imulq $0x18, %rax, %rdi
addq 0x90(%rsp), %rdi
movl %ecx, 0xb0(%rsp)
movq %r14, %rsi
callq 0xa632
incq %r15
movq 0x50(%rsp), %rax
jmp 0x5fce
movq %r13, %rdi
callq 0x8e40
movl 0x68(%rbx), %eax
incq %rbp
jmp 0x5f15
incq %r12
jmp 0x5efe
leaq 0x80(%rbx), %rdx
leaq 0x138(%rsp), %rdi
leaq 0x1c0(%rsp), %rcx
callq 0x858e
movslq 0x68(%rbx), %rsi
leaq 0x1c0(%rsp), %rdx
movl $0x1, (%rdx)
leaq 0x150(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
callq 0x858e
movslq 0x68(%rbx), %rsi
leaq 0x1c0(%rsp), %rdx
movb $0x0, (%rdx)
leaq 0x168(%rsp), %rdi
leaq 0xb0(%rsp), %rcx
callq 0x85e4
movq 0xa8(%rbx), %rax
cmpq %rax, 0xb0(%rbx)
je 0x60b5
movq %rax, 0xb0(%rbx)
movq 0xc0(%rbx), %rcx
cmpq %rcx, 0xc8(%rbx)
je 0x60cc
movq %rcx, 0xc8(%rbx)
leaq 0xb8(%rsp), %rcx
andl $0x0, (%rcx)
andq $0x0, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
andq $0x0, 0x20(%rcx)
leaq 0x198(%rsp), %rcx
andl $0x0, (%rcx)
andq $0x0, 0x8(%rcx)
leaq 0xa8(%rbx), %rdx
movq %rdx, 0x28(%rsp)
leaq 0xc0(%rbx), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
andq $0x0, 0x20(%rcx)
leaq 0xb0(%rsp), %r14
leaq 0xc(%rsp), %r15
leaq 0x190(%rsp), %rbp
leaq 0x168(%rsp), %r12
movq %rax, %rcx
movl $0x0, 0x10(%rsp)
subq %rax, %rcx
shrq $0x2, %rcx
cmpl %ecx, 0x7c(%rbx)
jle 0x645a
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movsd 0x7fe0(%rip), %xmm0     # 0xe148
callq 0x888c
movsd 0x7fab(%rip), %xmm1     # 0xe120
ucomisd %xmm0, %xmm1
ja 0x645a
movq 0x30(%rsp), %r13
movq 0x38(%rsp), %rsi
movq %r13, %rdi
callq 0xa711
subq %r13, %rax
shrq $0x2, %rax
movl %eax, 0x20(%rsp)
cltd
idivl 0x68(%rbx)
movl %eax, 0xc(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x98b4
movl 0x20(%rsp), %eax
cltd
idivl 0x68(%rbx)
movl %edx, 0x1c(%rsp)
movq %rbp, %rdi
leaq 0x1c(%rsp), %rsi
callq 0x98b4
movslq 0xc(%rsp), %rax
movq 0x138(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
je 0x6295
movslq 0x1c(%rsp), %rax
movq 0x150(%rsp), %rcx
cmpl $0x0, (%rcx,%rax,4)
je 0x6295
movq 0x28(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x854e
movslq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
cvtsi2sdl (%rcx,%rax,4), %xmm0
movsd %xmm0, 0x1c0(%rsp)
movq 0x48(%rsp), %rdi
leaq 0x1c0(%rsp), %r15
movq %r15, %rsi
callq 0xa738
movslq 0xc(%rsp), %rax
movq 0x138(%rsp), %rcx
decl (%rcx,%rax,4)
movslq 0x1c(%rsp), %rax
andl $0x0, (%rcx,%rax,4)
movslq 0x1c(%rsp), %rax
movq 0x150(%rsp), %rdx
andl $0x0, (%rdx,%rax,4)
movslq 0xc(%rsp), %rax
andl $0x0, (%rdx,%rax,4)
movslq 0xc(%rsp), %rdx
movq 0x30(%rsp), %rax
xorl %esi, %esi
cmpl %esi, (%rcx,%rdx,4)
jg 0x62ad
xorl %ecx, %ecx
movslq 0x68(%rbx), %rdx
cmpl %edx, %ecx
jge 0x62a8
movslq 0xc(%rsp), %rsi
imulq %rdx, %rsi
addq %rcx, %rsi
andl $0x0, (%rax,%rsi,4)
incq %rcx
jmp 0x6278
movslq 0x20(%rsp), %rax
movq 0x30(%rsp), %rcx
andl $0x0, (%rcx,%rax,4)
jmp 0x6447
movq 0x30(%rsp), %rax
xorl %edx, %edx
movl 0x68(%rbx), %ecx
cmpl %ecx, %edx
jge 0x62f8
imull %edx, %ecx
movslq 0x1c(%rsp), %rsi
movslq %ecx, %rcx
addq %rsi, %rcx
andl $0x0, (%rax,%rcx,4)
movslq 0x68(%rbx), %rcx
movslq %edx, %rsi
imulq %rcx, %rsi
movslq 0xc(%rsp), %rcx
addq %rsi, %rcx
andl $0x0, (%rax,%rcx,4)
movslq 0x1c(%rsp), %rcx
movslq 0x68(%rbx), %rsi
imulq %rcx, %rsi
addq %rdx, %rsi
andl $0x0, (%rax,%rsi,4)
incq %rdx
jmp 0x62af
movslq 0x78(%rbx), %rax
cmpq %rax, 0xd8(%rsp)
sete %al
cmpl $0x0, 0x10(%rsp)
sete %dl
testb %dl, %al
je 0x6382
xorl %eax, %eax
movl %eax, 0x1c0(%rsp)
cmpl %ecx, %eax
jge 0x637b
movq %r14, %rdi
movq %r15, %rsi
callq 0x866a
testq %rax, %rax
je 0x633e
movl 0x68(%rbx), %ecx
movl 0x1c0(%rsp), %eax
incl %eax
jmp 0x6315
movslq 0x1c0(%rsp), %rax
movq 0x138(%rsp), %rcx
andl $0x0, (%rcx,%rax,4)
movq 0x30(%rsp), %rax
xorl %edx, %edx
movl 0x68(%rbx), %ecx
cmpl %ecx, %edx
jge 0x6333
movslq %ecx, %rcx
movslq 0x1c0(%rsp), %rsi
imulq %rcx, %rsi
addq %rdx, %rsi
andl $0x0, (%rax,%rsi,4)
incq %rdx
jmp 0x6359
pushq $0x1
popq %rax
movl %eax, 0x10(%rsp)
movslq 0x20(%rsp), %rax
movq 0x50(%rsp), %rcx
imulq $0x18, %rax, %rax
movq 0x8(%rcx,%rax), %rbp
subq (%rcx,%rax), %rbp
shrq $0x2, %rbp
testl %ebp, %ebp
movl $0x0, %eax
cmovlel %eax, %ebp
xorl %r15d, %r15d
cmpq %rbp, %r15
je 0x643a
movslq 0x20(%rsp), %rax
movq 0x50(%rsp), %rcx
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %rax
movslq (%rax,%r15,4), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x8684
testq %rdx, (%rax)
jne 0x6432
movq 0x90(%rsp), %rcx
imulq $0x18, %r13, %rdx
movq (%rcx,%rdx), %rax
movq 0x8(%rcx,%rdx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movq 0x30(%rsp), %rdx
testl %ecx, %ecx
movl $0x0, %esi
cmovlel %esi, %ecx
xorl %esi, %esi
cmpq %rsi, %rcx
je 0x6424
movslq (%rax,%rsi,4), %rdi
movl (%rdx,%rdi,4), %r8d
testl %r8d, %r8d
je 0x641f
decl %r8d
movl %r8d, (%rdx,%rdi,4)
incq %rsi
jmp 0x6406
movq %r12, %rdi
movq %r13, %rsi
callq 0x8684
orq %rdx, (%rax)
incq %r15
jmp 0x63aa
leaq 0xc(%rsp), %r15
leaq 0x190(%rsp), %rbp
movq 0xa8(%rbx), %rax
movq 0xb0(%rbx), %rcx
jmp 0x6146
movq 0xc0(%rbx), %rax
movq 0xc8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
xorpd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x6496
movsd 0x10(%rsp), %xmm0
addsd (%rax,%rdx,8), %xmm0
movsd %xmm0, 0x10(%rsp)
incq %rdx
jmp 0x647b
xorl %r14d, %r14d
leaq 0x168(%rsp), %r15
xorl %ebp, %ebp
movq 0x178(%rsp), %rax
movl 0x180(%rsp), %ecx
subq 0x168(%rsp), %rax
leaq (%rcx,%rax,8), %rax
cmpq %r14, %rax
jbe 0x64dd
movq %r15, %rdi
movq %r14, %rsi
callq 0x8684
andq (%rax), %rdx
cmpq $0x1, %rdx
sbbl $-0x1, %ebp
incq %r14
jmp 0x64a3
movq 0xeaf4(%rip), %rdi      # 0x14fd8
leaq 0x7e50(%rip), %rsi      # 0xe33b
callq 0x32c0
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x34d0
leaq 0x7d57(%rip), %rsi      # 0xe25c
movq %rax, %rdi
callq 0x32c0
movq %rax, %rdi
movl %ebp, %esi
callq 0x3530
movq %rax, %rdi
callq 0x3150
callq 0x31c0
subq 0xe0(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x7c07(%rip), %xmm0     # 0xe140
addsd 0x8(%rbx), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xb70(%rbx)
callq 0xadf0
movss %xmm0, 0xb74(%rbx)
movq 0xc8(%rsp), %rsi
leaq 0x120(%rsp), %rdi
leaq 0x1c0(%rsp), %rcx
leaq 0xb8(%rsp), %rdx
callq 0x86a2
movq 0x1a8(%rsp), %rsi
leaq 0x108(%rsp), %rdi
leaq 0x1c0(%rsp), %rcx
leaq 0x198(%rsp), %rdx
callq 0x86a2
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0x9b85
movq 0x108(%rsp), %rdi
movq 0x110(%rsp), %rsi
callq 0x9b85
xorl %r15d, %r15d
movq 0x88(%rsp), %rax
testq %rax, %rax
movl $0x0, %r13d
cmovgq %rax, %r13
leaq 0x1c0(%rsp), %r14
leaq 0xe8(%rsp), %r12
xorl %ebp, %ebp
subq $0x1, %r13
jb 0x66af
movq 0xae8(%rbx), %rdi
xorl %esi, %esi
callq 0x856c
movq (%rax), %rax
movq 0x18(%rax), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x86d4
movq 0xae8(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x856c
movq (%rax), %rax
movq 0x18(%rax), %rsi
addq %r15, %rsi
movq %r12, %rdi
callq 0x86d4
movq 0x1c0(%rsp), %rdi
movq 0x1c8(%rsp), %rsi
callq 0x9b85
movq 0xe8(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0x9b85
leaq 0x120(%rsp), %rdi
movq %r14, %rsi
callq 0x8721
testq %rax, %rax
je 0x6696
leaq 0x108(%rsp), %rdi
movq %r12, %rsi
callq 0x8721
cmpq $0x1, %rax
sbbl $-0x1, %ebp
movq %r12, %rdi
callq 0x8e40
movq %r14, %rdi
callq 0x8e40
addq $0x18, %r15
jmp 0x65f5
movq 0xe922(%rip), %rdi      # 0x14fd8
leaq 0x7ca5(%rip), %rsi      # 0xe362
callq 0x32c0
cvtsi2ss %ebp, %xmm1
cvtsi2ssq 0x88(%rsp), %xmm0
divss %xmm0, %xmm1
cvtsi2ssl 0x68(%rbx), %xmm0
movss %xmm1, 0x28(%rsp)
mulss %xmm1, %xmm0
movq %rax, %rdi
callq 0x31f0
movq %rax, %rdi
callq 0x3150
leaq 0x1c0(%rsp), %rdi
callq 0x33f0
leaq 0x1c0(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x1d8(%rsp,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x1d8(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x1c8(%rsp,%rax)
cvtsi2ssl 0x68(%rbx), %xmm0
mulss 0x28(%rsp), %xmm0
callq 0x31f0
leaq 0x7b55(%rip), %rsi      # 0xe2a1
movq %rax, %rdi
callq 0x32c0
movq %rax, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x34d0
leaq 0x8038(%rip), %rsi      # 0xe7a1
movq %rax, %rdi
callq 0x32c0
leaq 0x7c01(%rip), %rsi      # 0xe379
leaq 0xe8(%rsp), %rdi
leaq 0x27(%rsp), %rdx
callq 0x3100
movss 0xb70(%rbx), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0xb74(%rbx), %xmm0
movss %xmm0, 0x48(%rsp)
leaq 0x1c8(%rsp), %rsi
leaq 0x338(%rsp), %rdi
callq 0x34b0
leaq 0x388(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x8b5e
leaq 0x358(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x8b5e
leaq 0xe8(%rsp), %rsi
leaq 0x338(%rsp), %rdx
leaq 0x388(%rsp), %rcx
leaq 0x358(%rsp), %r8
movq %rbx, %rdi
movss 0x10(%rsp), %xmm0
movss 0x48(%rsp), %xmm1
callq 0x7ec8
leaq 0x358(%rsp), %rdi
callq 0x8d86
leaq 0x388(%rsp), %rdi
callq 0x8d86
leaq 0x338(%rsp), %rdi
callq 0x3130
leaq 0xe8(%rsp), %rdi
callq 0x3130
cvtsi2ssl 0x68(%rbx), %xmm0
movss 0x28(%rsp), %xmm1
mulss %xmm0, %xmm1
cvtss2sd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x30b0
leaq 0x108(%rsp), %rdi
callq 0x8e40
leaq 0x120(%rsp), %rdi
callq 0x8e40
leaq 0x190(%rsp), %rdi
callq 0x8d86
leaq 0xb0(%rsp), %rdi
callq 0x8d86
leaq 0x168(%rsp), %rdi
callq 0x8754
leaq 0x150(%rsp), %rdi
callq 0x8e40
leaq 0x138(%rsp), %rdi
callq 0x8e40
leaq 0x90(%rsp), %rdi
callq 0x8438
leaq 0x30(%rsp), %rdi
callq 0x8e40
leaq 0x50(%rsp), %rdi
callq 0x8438
leaq 0x70(%rsp), %rdi
callq 0x8438
movsd 0x10(%rsp), %xmm0
addq $0x3b8, %rsp            # imm = 0x3B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x358(%rsp), %rdi
callq 0x8d86
jmp 0x6926
movq %rax, %rbx
leaq 0x388(%rsp), %rdi
callq 0x8d86
jmp 0x6938
movq %rax, %rbx
leaq 0x338(%rsp), %rdi
callq 0x3130
jmp 0x694a
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x3130
jmp 0x6998
jmp 0x6995
jmp 0x69c3
movq %rax, %rbx
jmp 0x69fb
jmp 0x6a0a
jmp 0x6a0a
movq %rax, %rbx
jmp 0x6a34
movq %rax, %rbx
jmp 0x6a41
jmp 0x6a4f
movq %rax, %rbx
jmp 0x6a7b
jmp 0x69c3
jmp 0x69c3
jmp 0x6a4f
movq %rax, %rbx
leaq 0x1c0(%rsp), %rdi
callq 0x30b0
jmp 0x69ee
jmp 0x6a0a
jmp 0x6a0a
jmp 0x6a0a
jmp 0x6a4f
jmp 0x6a54
jmp 0x6a54
jmp 0x6a54
jmp 0x6a0a
movq %rax, %rbx
jmp 0x69ee
movq %rax, %rbx
jmp 0x69e1
jmp 0x6a0a
jmp 0x6a0a
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x8e40
leaq 0x1c0(%rsp), %rdi
callq 0x8e40
leaq 0x108(%rsp), %rdi
callq 0x8e40
leaq 0x120(%rsp), %rdi
callq 0x8e40
jmp 0x6a0d
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x8d86
leaq 0xb0(%rsp), %rdi
callq 0x8d86
leaq 0x168(%rsp), %rdi
callq 0x8754
leaq 0x150(%rsp), %rdi
callq 0x8e40
leaq 0x138(%rsp), %rdi
jmp 0x6a5f
jmp 0x6a54
jmp 0x6a54
movq %rax, %rbx
jmp 0x6a64
movq %rax, %rbx
leaq 0x1c0(%rsp), %rdi
callq 0x8e40
leaq 0x90(%rsp), %rdi
callq 0x8438
leaq 0x30(%rsp), %rdi
callq 0x8e40
leaq 0x50(%rsp), %rdi
callq 0x8438
leaq 0x70(%rsp), %rdi
callq 0x8438
movq %rbx, %rdi
callq 0x3560
nop