// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
callq 0x16df0
movq 0x19508(%rip), %rdi     # 0x2ffc8
movq 0x194e9(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movq %rax, %rdi
leaq 0xa2ca(%rip), %rsi      # 0x20da0
callq 0x42b0
movq %rax, %rdi
movq 0x194cb(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movl $0x4, %edi
callq 0x17270
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %esi
movq 0x194c7(%rip), %rdi     # 0x2ffc8
callq 0x44a0
movq %rax, %rdi
movq -0x28(%rbp), %rax
movsd 0x120(%rax), %xmm0
callq 0x45b0
movq %rax, %rdi
leaq 0xa29a(%rip), %rsi      # 0x20dbe
callq 0x42b0
movq %rax, %rdi
movq 0x1947d(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movq 0x19489(%rip), %rdi     # 0x2ffc8
leaq 0xa290(%rip), %rsi      # 0x20dd6
callq 0x42b0
movq %rax, %rdi
movq -0x28(%rbp), %rax
movsd 0xa1ae(%rip), %xmm0     # 0x20d08
mulsd 0x130(%rax), %xmm0
callq 0x45b0
movq %rax, %rdi
leaq 0xa27c(%rip), %rsi      # 0x20ded
callq 0x42b0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x30(%rbp)
movq 0x10(%rax), %rdi
callq 0xf890
movq -0x30(%rbp), %rdi
cvtsi2sd %eax, %xmm1
movsd 0xa13e(%rip), %xmm0     # 0x20cd8
divsd %xmm1, %xmm0
callq 0x45b0
movq %rax, %rdi
movq 0x19403(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movq -0x28(%rbp), %rax
movsd 0x100(%rax), %xmm0
movq 0x19403(%rip), %rdi     # 0x2ffc8
callq 0x45b0
movq %rax, %rdi
leaq 0xa22e(%rip), %rsi      # 0x20e02
callq 0x42b0
movq %rax, %rdi
movq 0x193cd(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movq -0x28(%rbp), %rax
movsd 0x108(%rax), %xmm0
movq 0x193cd(%rip), %rdi     # 0x2ffc8
callq 0x45b0
movq %rax, %rdi
leaq 0xa215(%rip), %rsi      # 0x20e1f
callq 0x42b0
movq %rax, %rdi
movq 0x19397(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movq -0x28(%rbp), %rax
movsd 0x110(%rax), %xmm0
movq 0x19397(%rip), %rdi     # 0x2ffc8
callq 0x45b0
movq %rax, %rdi
leaq 0xa1fc(%rip), %rsi      # 0x20e3c
callq 0x42b0
movq %rax, %rdi
movq 0x19361(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movq -0x28(%rbp), %rax
movsd 0x118(%rax), %xmm0
movq 0x19361(%rip), %rdi     # 0x2ffc8
callq 0x45b0
movq %rax, %rdi
leaq 0xa1e3(%rip), %rsi      # 0x20e59
callq 0x42b0
movq %rax, %rdi
movq 0x1932b(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movq -0x28(%rbp), %rax
movsd 0x150(%rax), %xmm0
movq 0x1932b(%rip), %rdi     # 0x2ffc8
callq 0x45b0
movq %rax, %rdi
leaq 0xa1ca(%rip), %rsi      # 0x20e76
callq 0x42b0
movq %rax, %rdi
movq 0x192f5(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movq -0x28(%rbp), %rax
movsd 0x150(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x16cdc
jp 0x16cdc
jmp 0x16dad
movq 0x192e5(%rip), %rdi     # 0x2ffc8
leaq 0xa1af(%rip), %rsi      # 0x20e99
callq 0x42b0
movq -0x28(%rbp), %rdi
addq $0xa0, %rdi
callq 0x17290
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
addq $0xa0, %rdi
callq 0x172f0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x172c0
testb $0x1, %al
jne 0x16d2a
jmp 0x16d9a
movq 0x19297(%rip), %rdi     # 0x2ffc8
leaq 0xa17f(%rip), %rsi      # 0x20eb7
callq 0x42b0
movq %rax, -0x40(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x17320
movq -0x40(%rbp), %rdi
movl (%rax), %esi
callq 0x4520
movq %rax, %rdi
leaq 0xa15b(%rip), %rsi      # 0x20eba
callq 0x42b0
movq %rax, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x17320
movq -0x38(%rbp), %rdi
movl 0x4(%rax), %esi
callq 0x4520
movq %rax, %rdi
leaq 0xa137(%rip), %rsi      # 0x20ebe
callq 0x42b0
leaq -0x18(%rbp), %rdi
callq 0x17350
jmp 0x16d03
movq 0x19227(%rip), %rdi     # 0x2ffc8
movq 0x19208(%rip), %rsi     # 0x2ffb0
callq 0x42f0
movq -0x28(%rbp), %rax
movsd 0x158(%rax), %xmm0
movq 0x19208(%rip), %rdi     # 0x2ffc8
callq 0x45b0
movq %rax, %rdi
leaq 0xa0f4(%rip), %rsi      # 0x20ec3
callq 0x42b0
movq %rax, %rdi
movq 0x191d2(%rip), %rsi     # 0x2ffb0
callq 0x42f0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)