// File: /workspace/github_cpp_makefile_star2_O2/JenTus[P]TCEM/src_TCEM/allocator.cc
// Function: Cide::allocator::compareGivenNodes(long long)
double allocator::compareGivenNodes(int64 rcSampleSize) {


        clock_t begin = clock();

        float totalscore = 0;
        int bestNodeID;
        seedSet.clear();
        seedScores.clear();


        int redbluecount = 0;

        sort(comparered.begin(), comparered.end());
        sort(compareblue.begin(), compareblue.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(comparered, RedList) >= 1){
                if(intersection_size(compareblue, BlueList) >= 1){
                    redbluecount +=1;
                }
            }
        }

        //cout << " redBluecount is " << redbluecount << endl;
        totalscore = (float) redbluecount / (float) rcSampleSize;
        // end of extra results
        clock_t end = clock();
        totalDuration = double(end - begin) / CLOCKS_PER_SEC + duration_common; // in seconds
        totalMemory = getCurrentMemoryUsage(); // in MB


        cout << "Total score of BalanceExposure is " << totalscore*n << endl;
        std::ostringstream streamObj1;
        streamObj1 << std::fixed << std::setprecision(2)<<totalscore*n;

        set<int> setcomparered(comparered.begin(), comparered.end());
        set<int> setcompareblue(compareblue.begin(), compareblue.end());

        writeInMasterOutputFile("BalanceExposure", totalDuration,  totalMemory, streamObj1.str(), setcomparered, setcompareblue);
        return totalscore;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rsi, %r15
movq %rdi, %rbx
callq 0x31c0
movq %rax, 0x18(%rsp)
movq 0xa8(%rbx), %rax
cmpq %rax, 0xb0(%rbx)
je 0x6ad0
movq %rax, 0xb0(%rbx)
movq 0xc0(%rbx), %rax
cmpq %rax, 0xc8(%rbx)
je 0x6ae7
movq %rax, 0xc8(%rbx)
leaq 0xf0(%rbx), %rax
movq %rax, 0x8(%rsp)
movq 0xf0(%rbx), %rdi
movq 0xf8(%rbx), %rsi
callq 0x9b85
leaq 0x108(%rbx), %rax
movq %rax, 0x20(%rsp)
movq 0x108(%rbx), %rdi
movq 0x110(%rbx), %rsi
callq 0x9b85
xorl %r14d, %r14d
testq %r15, %r15
movl $0x0, %r13d
movq %r15, 0x28(%rsp)
cmovgq %r15, %r13
leaq 0x130(%rsp), %rbp
leaq 0x30(%rsp), %r15
xorl %r12d, %r12d
subq $0x1, %r13
jb 0x6bf9
movq 0xae8(%rbx), %rdi
xorl %esi, %esi
callq 0x856c
movq (%rax), %rax
movq 0x18(%rax), %rsi
addq %r14, %rsi
movq %rbp, %rdi
callq 0x86d4
movq 0xae8(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x856c
movq (%rax), %rax
movq 0x18(%rax), %rsi
addq %r14, %rsi
movq %r15, %rdi
callq 0x86d4
movq 0x130(%rsp), %rdi
movq 0x138(%rsp), %rsi
callq 0x9b85
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x9b85
movq 0x8(%rsp), %rdi
movq %rbp, %rsi
callq 0x8721
testq %rax, %rax
je 0x6be0
movq 0x20(%rsp), %rdi
movq %r15, %rsi
callq 0x8721
cmpq $0x1, %rax
sbbl $-0x1, %r12d
movq %r15, %rdi
callq 0x8e40
movq %rbp, %rdi
callq 0x8e40
addq $0x18, %r14
jmp 0x6b4a
cvtsi2ss %r12d, %xmm1
cvtsi2ssq 0x28(%rsp), %xmm0
divss %xmm0, %xmm1
movss %xmm1, 0x8(%rsp)
callq 0x31c0
subq 0x18(%rsp), %rax
cvtsi2sd %rax, %xmm0
divsd 0x751a(%rip), %xmm0     # 0xe140
addsd 0x8(%rbx), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xb70(%rbx)
callq 0xadf0
movss %xmm0, 0xb74(%rbx)
movq 0xe38d(%rip), %rdi      # 0x14fd8
leaq 0x76b6(%rip), %rsi      # 0xe308
callq 0x32c0
cvtsi2ssl 0x68(%rbx), %xmm0
mulss 0x8(%rsp), %xmm0
movq %rax, %rdi
callq 0x31f0
movq %rax, %rdi
callq 0x3150
leaq 0x130(%rsp), %r14
movq %r14, %rdi
callq 0x33f0
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x148(%rsp,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x148(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x138(%rsp,%rax)
cvtsi2ssl 0x68(%rbx), %xmm0
mulss 0x8(%rsp), %xmm0
movq %r14, %rdi
callq 0x31f0
movq 0xf0(%rbx), %rsi
movq 0xf8(%rbx), %rdx
leaq 0x30(%rsp), %rdi
callq 0x8792
movq 0x108(%rbx), %rsi
movq 0x110(%rbx), %rdx
leaq 0x100(%rsp), %rdi
callq 0x8792
leaq 0x762f(%rip), %rsi      # 0xe32b
leaq 0x80(%rsp), %rdi
leaq 0x17(%rsp), %rdx
callq 0x3100
movss 0xb70(%rbx), %xmm0
movss %xmm0, 0x20(%rsp)
movss 0xb74(%rbx), %xmm0
movss %xmm0, 0x18(%rsp)
leaq 0x138(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x34b0
leaq 0xd0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x8b5e
leaq 0xa0(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x8b5e
leaq 0x80(%rsp), %rsi
leaq 0x60(%rsp), %rdx
leaq 0xd0(%rsp), %rcx
leaq 0xa0(%rsp), %r8
movq %rbx, %rdi
movss 0x20(%rsp), %xmm0
movss 0x18(%rsp), %xmm1
callq 0x7ec8
leaq 0xa0(%rsp), %rdi
callq 0x8d86
leaq 0xd0(%rsp), %rdi
callq 0x8d86
leaq 0x60(%rsp), %rdi
callq 0x3130
leaq 0x80(%rsp), %rdi
callq 0x3130
cvtss2sd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x8d86
leaq 0x30(%rsp), %rdi
callq 0x8d86
leaq 0x130(%rsp), %rdi
callq 0x30b0
movsd 0x8(%rsp), %xmm0
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x8d86
jmp 0x6e22
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x8d86
jmp 0x6e34
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3130
jmp 0x6e43
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x3130
jmp 0x6e55
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x8d86
leaq 0x30(%rsp), %rdi
callq 0x8d86
jmp 0x6e78
movq %rax, %rbx
jmp 0x6e62
jmp 0x6e75
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0x30b0
jmp 0x6ea6
movq %rax, %rbx
jmp 0x6e99
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x8e40
leaq 0x130(%rsp), %rdi
callq 0x8e40
movq %rbx, %rdi
callq 0x3560