// File: /workspace/github_cpp_makefile_star2_O2/zeeev[P]DASVC/bamtools/src/toolkit/bamtools_stats.cpp
// Function: BamTools::StatsTool::StatsToolPrivate::PrintStats()
void StatsTool::StatsToolPrivate::PrintStats(void) {
  
    cout << endl;
    cout << "**********************************************" << endl;
    cout << "Stats for BAM file(s): " << endl;
    cout << "**********************************************" << endl;
    cout << endl;
    cout << "Total reads:       " << m_numReads << endl;
    cout << "Mapped reads:      " << m_numMapped << "\t(" << ((float)m_numMapped/m_numReads)*100 << "%)" << endl;
    cout << "Forward strand:    " << m_numForwardStrand << "\t(" << ((float)m_numForwardStrand/m_numReads)*100 << "%)" << endl;
    cout << "Reverse strand:    " << m_numReverseStrand << "\t(" << ((float)m_numReverseStrand/m_numReads)*100 << "%)" << endl;
    cout << "Failed QC:         " << m_numFailedQC << "\t(" << ((float)m_numFailedQC/m_numReads)*100 << "%)" << endl;
    cout << "Duplicates:        " << m_numDuplicates << "\t(" << ((float)m_numDuplicates/m_numReads)*100 << "%)" << endl;
    cout << "Paired-end reads:  " << m_numPaired << "\t(" << ((float)m_numPaired/m_numReads)*100 << "%)" << endl;
    
    if ( m_numPaired != 0 ) {
        cout << "'Proper-pairs':    " << m_numProperPair << "\t(" << ((float)m_numProperPair/m_numPaired)*100 << "%)" << endl;
        cout << "Both pairs mapped: " << m_numBothMatesMapped << "\t(" << ((float)m_numBothMatesMapped/m_numPaired)*100 << "%)" << endl;
        cout << "Read 1:            " << m_numFirstMate << endl;
        cout << "Read 2:            " << m_numSecondMate << endl;
        cout << "Singletons:        " << m_numSingletons << "\t(" << ((float)m_numSingletons/m_numPaired)*100 << "%)" << endl;
    }
    
    if ( m_settings->IsShowingInsertSizeSummary ) {
      
        double avgInsertSize = 0.0;
        if ( !m_insertSizes.empty() ) {
            avgInsertSize = ( accumulate(m_insertSizes.begin(), m_insertSizes.end(), 0.0) / (double)m_insertSizes.size() );
            cout << "Average insert size (absolute value): " << avgInsertSize << endl;
        }
        
        double medianInsertSize = 0.0;
        if ( CalculateMedian(m_insertSizes, medianInsertSize) )
            cout << "Median insert size (absolute value): " << medianInsertSize << endl;
    }
    cout << endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x32627(%rip), %r14     # 0x94f98
movq %r14, %rdi
callq 0x35300
leaq 0x12a20(%rip), %r15     # 0x753a0
movq %r14, %rdi
movq %r15, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
leaq 0x12a35(%rip), %rsi     # 0x753cf
movq %r14, %rdi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
movq %r14, %rdi
movq %r15, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
movq %r14, %rdi
callq 0x35300
leaq 0x12a1b(%rip), %rsi     # 0x753e7
movq %r14, %rdi
callq 0x355b0
movl 0x8(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
callq 0x35300
leaq 0x12a0d(%rip), %rsi     # 0x753fb
movq %r14, %rdi
callq 0x355b0
movl 0x14(%rbx), %esi
movq %rax, %rdi
callq 0x35400
leaq 0x12a07(%rip), %r15     # 0x7540f
movq %rax, %rdi
movq %r15, %rsi
callq 0x355b0
movl 0x14(%rbx), %ecx
cvtsi2ss %rcx, %xmm0
movl 0x8(%rbx), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
mulss 0x12949(%rip), %xmm0    # 0x75378
movq %rax, %rdi
callq 0x35480
leaq 0x129d4(%rip), %r12     # 0x75412
movq %rax, %rdi
movq %r12, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
leaq 0x129bd(%rip), %rsi     # 0x75415
movq %r14, %rdi
callq 0x355b0
movl 0x1c(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
movq %r15, %rsi
callq 0x355b0
movl 0x1c(%rbx), %ecx
cvtsi2ss %rcx, %xmm0
movl 0x8(%rbx), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
mulss 0x128e6(%rip), %xmm0    # 0x75378
movq %rax, %rdi
callq 0x35480
movq %rax, %rdi
movq %r12, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
leaq 0x12975(%rip), %rsi     # 0x75429
movq %r14, %rdi
callq 0x355b0
movl 0x20(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
movq %r15, %rsi
callq 0x355b0
movl 0x20(%rbx), %ecx
cvtsi2ss %rcx, %xmm0
movl 0x8(%rbx), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
mulss 0x1288a(%rip), %xmm0    # 0x75378
movq %rax, %rdi
callq 0x35480
movq %rax, %rdi
movq %r12, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
leaq 0x1292d(%rip), %rsi     # 0x7543d
movq %r14, %rdi
callq 0x355b0
movl 0x30(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
movq %r15, %rsi
callq 0x355b0
movl 0x30(%rbx), %ecx
cvtsi2ss %rcx, %xmm0
movl 0x8(%rbx), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
mulss 0x1282e(%rip), %xmm0    # 0x75378
movq %rax, %rdi
callq 0x35480
movq %rax, %rdi
movq %r12, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
leaq 0x128e5(%rip), %rsi     # 0x75451
movq %r14, %rdi
callq 0x355b0
movl 0x34(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
movq %r15, %rsi
callq 0x355b0
movl 0x34(%rbx), %ecx
cvtsi2ss %rcx, %xmm0
movl 0x8(%rbx), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
mulss 0x127d2(%rip), %xmm0    # 0x75378
movq %rax, %rdi
callq 0x35480
movq %rax, %rdi
movq %r12, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
leaq 0x1289d(%rip), %rsi     # 0x75465
movq %r14, %rdi
callq 0x355b0
movl 0xc(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
movq %r15, %rsi
callq 0x355b0
movl 0xc(%rbx), %ecx
cvtsi2ss %rcx, %xmm0
movl 0x8(%rbx), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
mulss 0x12776(%rip), %xmm0    # 0x75378
movq %rax, %rdi
callq 0x35480
movq %rax, %rdi
movq %r12, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
cmpl $0x0, 0xc(%rbx)
je 0x62d98
movq 0x3236a(%rip), %r14     # 0x94f98
leaq 0x12844(%rip), %rsi     # 0x75479
movq %r14, %rdi
callq 0x355b0
movl 0x10(%rbx), %esi
movq %rax, %rdi
callq 0x35400
leaq 0x127c0(%rip), %r15     # 0x7540f
movq %rax, %rdi
movq %r15, %rsi
callq 0x355b0
movl 0x10(%rbx), %ecx
cvtsi2ss %rcx, %xmm0
movl 0xc(%rbx), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
movss 0x12702(%rip), %xmm1    # 0x75378
mulss %xmm1, %xmm0
movq %rax, %rdi
callq 0x35480
leaq 0x12789(%rip), %r12     # 0x75412
movq %rax, %rdi
movq %r12, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
leaq 0x127ea(%rip), %rsi     # 0x7548d
movq %r14, %rdi
callq 0x355b0
movl 0x18(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
movq %r15, %rsi
callq 0x355b0
movl 0x18(%rbx), %ecx
cvtsi2ss %rcx, %xmm0
movl 0xc(%rbx), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
mulss 0x1269b(%rip), %xmm0    # 0x75378
movq %rax, %rdi
callq 0x35480
movq %rax, %rdi
movq %r12, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
leaq 0x127a2(%rip), %rsi     # 0x754a1
movq %r14, %rdi
callq 0x355b0
movl 0x24(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
callq 0x35300
leaq 0x12794(%rip), %rsi     # 0x754b5
movq %r14, %rdi
callq 0x355b0
movl 0x28(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
callq 0x35300
leaq 0x12786(%rip), %rsi     # 0x754c9
movq %r14, %rdi
callq 0x355b0
movl 0x2c(%rbx), %esi
movq %rax, %rdi
callq 0x35400
movq %rax, %rdi
movq %r15, %rsi
callq 0x355b0
movl 0x2c(%rbx), %ecx
cvtsi2ss %rcx, %xmm0
movl 0xc(%rbx), %ecx
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
mulss 0x125fb(%rip), %xmm0    # 0x75378
movq %rax, %rdi
callq 0x35480
movq %rax, %rdi
movq %r12, %rsi
callq 0x355b0
movq %rax, %rdi
callq 0x35300
movq (%rbx), %rax
cmpb $0x1, 0x2(%rax)
jne 0x62e5c
leaq 0x38(%rbx), %r14
movq 0x38(%rbx), %rdi
movq 0x40(%rbx), %rsi
cmpq %rsi, %rdi
je 0x62e1e
xorps %xmm0, %xmm0
callq 0x6364e
movq 0x40(%rbx), %rax
subq 0x38(%rbx), %rax
sarq $0x2, %rax
movq %rax, %xmm2
punpckldq 0x125a9(%rip), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
subpd 0x125b1(%rip), %xmm2    # 0x75390
movapd %xmm2, %xmm1
unpckhpd %xmm2, %xmm1            # xmm1 = xmm1[1],xmm2[1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x3219c(%rip), %rdi     # 0x94f98
leaq 0x126da(%rip), %rsi     # 0x754dd
callq 0x355b0
movq %rax, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x35a00
movq %rax, %rdi
callq 0x35300
leaq 0x10(%rsp), %rdx
andq $0x0, (%rdx)
movq %r14, %rsi
callq 0x628c0
testb %al, %al
je 0x62e5c
movq 0x3215e(%rip), %rdi     # 0x94f98
leaq 0x126c3(%rip), %rsi     # 0x75504
callq 0x355b0
movsd 0x10(%rsp), %xmm0
movq %rax, %rdi
callq 0x35a00
movq %rax, %rdi
callq 0x35300
movq 0x32135(%rip), %rdi     # 0x94f98
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x35300
nop