// File: /workspace/github_cpp_makefile_star2_O3/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 $0x298, %rsp            # imm = 0x298
movq %rsi, %r15
movq %rdi, %rbx
callq 0x31d0
movq %rax, %r13
movq 0xa8(%rbx), %rax
cmpq %rax, 0xb0(%rbx)
je 0x883a
movq %rax, 0xb0(%rbx)
movq 0xc0(%rbx), %rax
cmpq %rax, 0xc8(%rbx)
je 0x8851
movq %rax, 0xc8(%rbx)
movq 0xf0(%rbx), %r14
movq 0xf8(%rbx), %r12
cmpq %r12, %r14
je 0x8891
movq %r12, %rax
subq %r14, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0xc1e6
movq %r14, %rdi
movq %r12, %rsi
callq 0xc2c9
movq 0x108(%rbx), %r14
movq 0x110(%rbx), %r12
cmpq %r12, %r14
je 0x88d1
movq %r12, %rax
subq %r14, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0xc1e6
movq %r14, %rdi
movq %r12, %rsi
callq 0xc2c9
testq %r15, %r15
jle 0x8ae2
movq %r13, 0x10(%rsp)
xorl %r12d, %r12d
leaq 0x20(%rsp), %r13
movl $0x0, 0x8(%rsp)
movq 0xae8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x8d55
movq (%rax), %rax
leaq (%r12,%r12,2), %r14
shlq $0x3, %r14
movq 0x18(%rax), %rsi
addq %r14, %rsi
leaq 0x120(%rsp), %rdi
callq 0xaeee
movq 0xae8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0x8d67
movq 0x8(%rax), %rax
addq 0x18(%rax), %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0xaeee
movq 0x120(%rsp), %rbp
movq 0x128(%rsp), %r14
cmpq %r14, %rbp
je 0x8996
movq %r14, %rax
subq %rbp, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %rbp, %rdi
movq %r14, %rsi
callq 0xc1e6
movq %rbp, %rdi
movq %r14, %rsi
callq 0xc2c9
movq 0x20(%rsp), %r14
movq 0x28(%rsp), %rbp
cmpq %rbp, %r14
je 0x89d2
movq %rbp, %rax
subq %r14, %rax
sarq $0x2, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %rbp, %rsi
callq 0xc1e6
movq %r14, %rdi
movq %rbp, %rsi
callq 0xc2c9
movq 0xf0(%rbx), %rax
movq 0xf8(%rbx), %rcx
movq 0x120(%rsp), %rdi
movq 0x128(%rsp), %rdx
cmpq %rcx, %rax
setne %sil
cmpq %rdx, %rdi
setne %r8b
andb %sil, %r8b
cmpb $0x1, %r8b
jne 0x8aa5
xorl %esi, %esi
movq %rdi, %r8
movl (%rax), %r9d
movl (%r8), %r10d
cmpl %r10d, %r9d
jge 0x8a21
addq $0x4, %rax
jmp 0x8a2e
jg 0x8a2a
incq %rsi
addq $0x4, %rax
addq $0x4, %r8
cmpq %rcx, %rax
je 0x8a38
cmpq %rdx, %r8
jne 0x8a10
movq 0x20(%rsp), %rax
testq %rsi, %rsi
je 0x8aaa
movq 0x108(%rbx), %rcx
movq 0x110(%rbx), %rdx
movq 0x28(%rsp), %rsi
cmpq %rdx, %rcx
setne %r8b
cmpq %rsi, %rax
setne %r9b
andb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x8aaa
xorl %r8d, %r8d
movq %rax, %r9
movl (%rcx), %r10d
movl (%r9), %r11d
cmpl %r11d, %r10d
jge 0x8a83
addq $0x4, %rcx
jmp 0x8a90
jg 0x8a8c
incq %r8
addq $0x4, %rcx
addq $0x4, %r9
cmpq %rdx, %rcx
je 0x8a9a
cmpq %rsi, %r9
jne 0x8a72
testq %r8, %r8
je 0x8aaa
incl 0x8(%rsp)
jmp 0x8aaa
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x8abf
movq %rax, %rdi
callq 0x32c0
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x8ac9
callq 0x32c0
incq %r12
cmpq %r15, %r12
jne 0x88ef
cvtsi2ssl 0x8(%rsp), %xmm1
movq 0x10(%rsp), %r13
jmp 0x8ae5
xorps %xmm1, %xmm1
cvtsi2ss %r15, %xmm0
divss %xmm0, %xmm1
movss %xmm1, 0x8(%rsp)
callq 0x31d0
subq %r13, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x9664(%rip), %xmm0     # 0x12170
addsd 0x8(%rbx), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xb70(%rbx)
callq 0xd418
movss %xmm0, 0xb74(%rbx)
movq 0xf4a7(%rip), %r14      # 0x17fd8
leaq 0x97f8(%rip), %rsi      # 0x12330
movl $0x22, %edx
movq %r14, %rdi
callq 0x3340
xorps %xmm0, %xmm0
cvtsi2ssl 0x68(%rbx), %xmm0
mulss 0x8(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
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 0x120(%rsp), %r14
movq %r14, %rdi
callq 0x3410
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x138(%rsp,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x138(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x128(%rsp,%rax)
xorps %xmm0, %xmm0
cvtsi2ssl 0x68(%rbx), %xmm0
mulss 0x8(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
callq 0x3500
movq 0xf0(%rbx), %rsi
movq 0xf8(%rbx), %rdx
leaq 0x20(%rsp), %rdi
callq 0xb056
movq 0x108(%rbx), %rsi
movq 0x110(%rbx), %rdx
leaq 0xf0(%rsp), %rdi
callq 0xb056
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x9730(%rip), %rsi      # 0x12353
leaq 0x9738(%rip), %rdx      # 0x12362
leaq 0x50(%rsp), %rdi
callq 0xb3fa
movss 0xb70(%rbx), %xmm0
movss %xmm0, 0x10(%rsp)
movss 0xb74(%rbx), %xmm0
movss %xmm0, 0x1c(%rsp)
leaq 0x128(%rsp), %rsi
leaq 0x70(%rsp), %rdi
callq 0x34f0
leaq 0xc0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xb490
leaq 0x90(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0xb490
leaq 0x50(%rsp), %rsi
leaq 0x70(%rsp), %rdx
leaq 0xc0(%rsp), %rcx
leaq 0x90(%rsp), %r8
movq %rbx, %rdi
movss 0x10(%rsp), %xmm0
movss 0x1c(%rsp), %xmm1
callq 0xa4c4
leaq 0x90(%rsp), %rdi
callq 0xb65e
leaq 0xc0(%rsp), %rdi
callq 0xb65e
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8ce7
callq 0x32c0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x8cf6
callq 0x32c0
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0xb65e
leaq 0x20(%rsp), %rdi
callq 0xb65e
movq 0xf2ad(%rip), %rsi      # 0x17fd0
leaq 0x120(%rsp), %rdi
callq 0x3170
leaq 0x190(%rsp), %rdi
callq 0x30e0
movsd 0x8(%rsp), %xmm0
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9833(%rip), %rdi      # 0x1258f
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3490
leaq 0x9821(%rip), %rdi      # 0x1258f
movl $0x1, %esi
xorl %eax, %eax
callq 0x3490
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xb65e
jmp 0x8d8f
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0xb65e
jmp 0x8da1
movq %rax, %rbx
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8dbc
callq 0x32c0
jmp 0x8dbc
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x8dd0
callq 0x32c0
jmp 0x8dd0
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0xb65e
leaq 0x20(%rsp), %rdi
callq 0xb65e
jmp 0x8df3
movq %rax, %rbx
jmp 0x8ddd
jmp 0x8df0
movq %rax, %rbx
movq 0xf1d6(%rip), %rsi      # 0x17fd0
leaq 0x120(%rsp), %rdi
callq 0x3170
leaq 0x190(%rsp), %rdi
callq 0x30e0
jmp 0x8e41
jmp 0x8e18
movq %rax, %rbx
jmp 0x8e2f
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x8e2f
callq 0x32c0
movq 0x120(%rsp), %rdi
testq %rdi, %rdi
je 0x8e41
callq 0x32c0
movq %rbx, %rdi
callq 0x35c0
nop