// File: /workspace/github_cpp_makefile_star2_O3/UCBASiCS[P]SPRIGHT/src/experimentoutput.cpp
// Function: ExperimentOutput::displayGlobalResults()
void ExperimentOutput::displayGlobalResults()
{
    setGlobalResultsFigures();

    std::cout 	<< std::endl << "<===== SPRIGHT RESULTS =====>" << std::endl;
    std::cout 	<< std::setprecision(4)  << averageMSEerrorAmplitude << " -> MSE error amplitude" << std::endl;
    // std::cout   << maxMSEerrorAmplitude << " -> maximum MSE amplitude"   << std::endl;
    std::cout 	<< "average freq error is " << averageMSEerror*100 << " percent of 2PI/N = " << 2*M_PI/config->getSignalLengthOriginal() << std::endl;
    // std::cout   << maxMSEerror          << " -> max MSE error frequencies"    << std::endl;
    std::cout   << averageFalseDetectionsNb << " -> average false detections" << std::endl;
    std::cout   << maxFalseDetectionsNb     << " -> maximum false detections" << std::endl;
    std::cout   << averageMissedLocationsNb << " -> average missed locations" << std::endl;
    std::cout   << maxMissedLocationsNb     << " -> maximum missed locations" << std::endl;
              // << probabilityOfFalseDetection << " -> probability of one or more false detection" << std::endl
              // << probabilityOfMissedLocation << " -> probability of one or more missed location" << std::endl
    std::cout << probabilityOfBinningFailure << " -> probability of binning failure" << std::endl;
    // if there were binning failures, list the sizes and counts of trapping sets
    if ( probabilityOfBinningFailure != 0 )
    {
        std::cout << "trapping sets (size, count): ";
        for ( auto it = trappingSetSizeCounter.cbegin(); it != trappingSetSizeCounter.cend(); ++it )
        {
            std::cout << "( " << it->first << " , " << it->second << " ), ";
        }
        std::cout << std::endl;
    }
    std::cout  << probabilityOfFullRecovery   << " -> probability of full recovery"   << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0xb024
movq 0xa3ba(%rip), %r14      # 0x14fc8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq %rax, %r15
leaq 0x41b1(%rip), %rsi      # 0xedf0
movl $0x1d, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq (%r14), %rax
movq -0x18(%rax), %rax
movq $0x4, 0x8(%r14,%rax)
movsd 0x120(%rbx), %xmm0
movq %r14, %rdi
callq 0x3400
movq %rax, %r15
leaq 0x4171(%rip), %rsi      # 0xee0e
movl $0x17, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
leaq 0x414e(%rip), %rsi      # 0xee26
movl $0x16, %edx
movq %r14, %rdi
callq 0x32b0
movsd 0x130(%rbx), %xmm0
mulsd 0x404b(%rip), %xmm0     # 0xed40
movq %r14, %rdi
callq 0x3400
movq %rax, %r15
leaq 0x4136(%rip), %rsi      # 0xee3d
movl $0x14, %edx
movq %rax, %rdi
callq 0x32b0
movq 0x10(%rbx), %rdi
callq 0x811c
cvtsi2sd %eax, %xmm1
movsd 0x3fd7(%rip), %xmm0     # 0xed00
divsd %xmm1, %xmm0
movq %r15, %rdi
callq 0x3400
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movsd 0x100(%rbx), %xmm0
movq %r14, %rdi
callq 0x3400
movq %rax, %r15
leaq 0x40d9(%rip), %rsi      # 0xee52
movl $0x1c, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movsd 0x108(%rbx), %xmm0
movq %r14, %rdi
callq 0x3400
movq %rax, %r15
leaq 0x40a8(%rip), %rsi      # 0xee6f
movl $0x1c, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movsd 0x110(%rbx), %xmm0
movq %r14, %rdi
callq 0x3400
movq %rax, %r15
leaq 0x4077(%rip), %rsi      # 0xee8c
movl $0x1c, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movsd 0x118(%rbx), %xmm0
movq %r14, %rdi
callq 0x3400
movq %rax, %r15
leaq 0x4046(%rip), %rsi      # 0xeea9
movl $0x1c, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movsd 0x150(%rbx), %xmm0
movq %r14, %rdi
callq 0x3400
movq %rax, %r14
leaq 0x4015(%rip), %rsi      # 0xeec6
movl $0x22, %edx
movq %rax, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movsd 0x150(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xaefd
jnp 0xafc4
movq 0xa0c4(%rip), %rdi      # 0x14fc8
leaq 0x3fde(%rip), %rsi      # 0xeee9
movl $0x1d, %edx
callq 0x32b0
movq %rbx, (%rsp)
movq 0xb0(%rbx), %rbx
testq %rbx, %rbx
je 0xaf92
movq 0xa09c(%rip), %r15      # 0x14fc8
leaq 0x3fd4(%rip), %r12      # 0xef07
leaq 0x3fd0(%rip), %r13      # 0xef0a
leaq 0x3fcd(%rip), %rbp      # 0xef0e
movl $0x2, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x32b0
movl 0x8(%rbx), %esi
movq %r15, %rdi
callq 0x3470
movq %rax, %r14
movl $0x3, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x32b0
movl 0xc(%rbx), %esi
movq %r14, %rdi
callq 0x3470
movl $0x4, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x32b0
movq (%rbx), %rbx
testq %rbx, %rbx
jne 0xaf41
movq 0xa02f(%rip), %rbx      # 0x14fc8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq (%rsp), %rbx
movsd 0x158(%rbx), %xmm0
movq 0x9ff5(%rip), %rdi      # 0x14fc8
callq 0x3400
movq %rax, %rbx
leaq 0x3f31(%rip), %rsi      # 0xef13
movl $0x20, %edx
movq %rax, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170