// File: /workspace/github_cpp_makefile_star2_O1/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 $0x288, %rsp            # imm = 0x288
movq %rsi, %r15
movq %rdi, %rbx
callq 0x31d0
movq %rax, %r13
movq 0xa8(%rbx), %rax
cmpq %rax, 0xb0(%rbx)
je 0x8894
movq %rax, 0xb0(%rbx)
movq 0xc0(%rbx), %rax
cmpq %rax, 0xc8(%rbx)
je 0x88ab
movq %rax, 0xc8(%rbx)
movq 0xf0(%rbx), %r14
movq 0xf8(%rbx), %r12
cmpq %r12, %r14
je 0x88eb
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 0xc229
movq %r14, %rdi
movq %r12, %rsi
callq 0xc30c
movq 0x108(%rbx), %r14
movq 0x110(%rbx), %r12
cmpq %r12, %r14
je 0x892b
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 0xc229
movq %r14, %rdi
movq %r12, %rsi
callq 0xc30c
testq %r15, %r15
jle 0x8b2c
movq %r13, (%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0xae8(%rbx), %rcx
movq (%rcx), %rax
cmpq %rax, 0x8(%rcx)
je 0x8d96
movq (%rax), %rax
leaq (%r12,%r12,2), %r14
shlq $0x3, %r14
movq 0x18(%rax), %rsi
addq %r14, %rsi
leaq 0x110(%rsp), %rdi
callq 0xaf48
movq 0xae8(%rbx), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq $0x1, %rdx
jbe 0x8da8
movq 0x8(%rax), %rax
addq 0x18(%rax), %r14
leaq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0xaf48
movq 0x110(%rsp), %rbp
movq 0x118(%rsp), %r14
cmpq %r14, %rbp
je 0x89e7
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 0xc229
movq %rbp, %rdi
movq %r14, %rsi
callq 0xc30c
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %rbp
cmpq %rbp, %r14
je 0x8a23
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 0xc229
movq %r14, %rdi
movq %rbp, %rsi
callq 0xc30c
movq 0xf0(%rbx), %rax
movq 0xf8(%rbx), %rcx
movq 0x110(%rsp), %rdx
movq 0x118(%rsp), %rsi
cmpq %rcx, %rax
setne %dil
cmpq %rsi, %rdx
setne %r8b
andb %dil, %r8b
cmpb $0x1, %r8b
jne 0x8af4
xorl %edi, %edi
movl (%rax), %r8d
movl (%rdx), %r9d
cmpl %r9d, %r8d
jge 0x8a6f
addq $0x4, %rax
jmp 0x8a7c
jg 0x8a78
incq %rdi
addq $0x4, %rax
addq $0x4, %rdx
cmpq %rcx, %rax
je 0x8a86
cmpq %rsi, %rdx
jne 0x8a5e
testq %rdi, %rdi
je 0x8af4
movq 0x108(%rbx), %rax
movq 0x110(%rbx), %rcx
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rsi
cmpq %rcx, %rax
setne %dil
cmpq %rsi, %rdx
setne %r9b
andb %dil, %r9b
xorl %r8d, %r8d
cmpb $0x1, %r9b
jne 0x8af1
xorl %edi, %edi
movl (%rax), %r8d
movl (%rdx), %r9d
cmpl %r9d, %r8d
jge 0x8ad0
addq $0x4, %rax
jmp 0x8add
jg 0x8ad9
incq %rdi
addq $0x4, %rax
addq $0x4, %rdx
cmpq %rcx, %rax
je 0x8ae7
cmpq %rsi, %rdx
jne 0x8abf
xorl %r8d, %r8d
testq %rdi, %rdi
setne %r8b
addl %r8d, %r13d
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8b03
callq 0x32c0
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x8b15
callq 0x32c0
incq %r12
cmpq %r15, %r12
jne 0x893e
cvtsi2ss %r13d, %xmm1
movq (%rsp), %r13
jmp 0x8b2f
xorps %xmm1, %xmm1
cvtsi2ss %r15, %xmm0
divss %xmm0, %xmm1
movss %xmm1, (%rsp)
callq 0x31d0
subq %r13, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
divsd 0x961b(%rip), %xmm0     # 0x12170
addsd 0x8(%rbx), %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xb70(%rbx)
callq 0xd4f4
movss %xmm0, 0xb74(%rbx)
movq 0xf45e(%rip), %r14      # 0x17fd8
leaq 0x97b7(%rip), %rsi      # 0x12338
movl $0x22, %edx
movq %r14, %rdi
callq 0x3340
xorps %xmm0, %xmm0
cvtsi2ssl 0x68(%rbx), %xmm0
mulss (%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 0x110(%rsp), %r14
movq %r14, %rdi
callq 0x3410
movq (%r14), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x128(%rsp,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x128(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x118(%rsp,%rax)
xorps %xmm0, %xmm0
cvtsi2ssl 0x68(%rbx), %xmm0
mulss (%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
callq 0x3500
movq 0xf0(%rbx), %rsi
movq 0xf8(%rbx), %rdx
leaq 0x10(%rsp), %rdi
callq 0xb0ae
movq 0x108(%rbx), %rsi
movq 0x110(%rbx), %rdx
leaq 0xe0(%rsp), %rdi
callq 0xb0ae
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x96f1(%rip), %rsi      # 0x1235b
leaq 0x96f9(%rip), %rdx      # 0x1236a
leaq 0x40(%rsp), %rdi
callq 0xb452
movss 0xb70(%rbx), %xmm0
movss %xmm0, 0xc(%rsp)
movss 0xb74(%rbx), %xmm0
movss %xmm0, 0x8(%rsp)
leaq 0x118(%rsp), %rsi
leaq 0x60(%rsp), %rdi
callq 0x34f0
leaq 0xb0(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xb4e2
leaq 0x80(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0xb4e2
leaq 0x40(%rsp), %rsi
leaq 0x60(%rsp), %rdx
leaq 0xb0(%rsp), %rcx
leaq 0x80(%rsp), %r8
movq %rbx, %rdi
movss 0xc(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
callq 0xa536
leaq 0x80(%rsp), %rdi
callq 0xb6b0
leaq 0xb0(%rsp), %rdi
callq 0xb6b0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8d2b
callq 0x32c0
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x8d3a
callq 0x32c0
xorps %xmm0, %xmm0
cvtss2sd (%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0xe0(%rsp), %rdi
callq 0xb6b0
leaq 0x10(%rsp), %rdi
callq 0xb6b0
movq 0xf26b(%rip), %rsi      # 0x17fd0
leaq 0x110(%rsp), %rdi
callq 0x3170
leaq 0x180(%rsp), %rdi
callq 0x30e0
movsd (%rsp), %xmm0
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x97fa(%rip), %rdi      # 0x12597
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x3490
leaq 0x97e8(%rip), %rdi      # 0x12597
movl $0x1, %esi
xorl %eax, %eax
callq 0x3490
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0xb6b0
jmp 0x8dd0
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xb6b0
jmp 0x8de2
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8dfa
callq 0x32c0
jmp 0x8dfa
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x8e0e
callq 0x32c0
jmp 0x8e0e
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0xb6b0
leaq 0x10(%rsp), %rdi
callq 0xb6b0
jmp 0x8e31
movq %rax, %rbx
jmp 0x8e1b
jmp 0x8e2e
movq %rax, %rbx
movq 0xf198(%rip), %rsi      # 0x17fd0
leaq 0x110(%rsp), %rdi
callq 0x3170
leaq 0x180(%rsp), %rdi
callq 0x30e0
jmp 0x8e7f
jmp 0x8e56
movq %rax, %rbx
jmp 0x8e6d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x8e6d
callq 0x32c0
movq 0x110(%rsp), %rdi
testq %rdi, %rdi
je 0x8e7f
callq 0x32c0
movq %rbx, %rdi
callq 0x35c0
nop