// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./hit.h
// Function: HitSink::finish(bool)
void finish(bool hadoopOut) {
		// Flush all per-thread buffers
		flushAll();

		// Close all output streams
		closeOuts();

		// Print information about how many unpaired and/or paired
		// reads were aligned.
		if(!quiet_) {
			uint64_t numReported = 0, numReportedPaired = 0;
			uint64_t numAligned = 0, numUnaligned = 0;
			uint64_t numMaxed = 0;
			for(size_t i = 0; i < nthreads_; i++) {
				numReported += ptNumReported_[i];
				numReportedPaired += ptNumReportedPaired_[i];
				numAligned += ptNumAligned_[i];
				numUnaligned += ptNumUnaligned_[i];
				numMaxed += ptNumMaxed_[i];
			}

			uint64_t tot = numAligned + numUnaligned;
			if (!sampleMax_)
				tot += numMaxed;
			double alPct = 0.0, unalPct = 0.0, maxPct = 0.0;
			if(tot > 0) {
				if (sampleMax_)
					alPct   = 100.0 * (double)(numAligned) / (double)tot;
				else
					alPct   = 100.0 * (double)(numAligned + numMaxed) / (double)tot;
				unalPct = 100.0 * (double)numUnaligned / (double)tot;
				maxPct  = 100.0 * (double)numMaxed / (double)tot;
			}
			cerr << "# reads processed: " << tot << endl;
			cerr << "# reads with at least one alignment: "
			     << numAligned + (sampleMax_ ? 0 : numMaxed) << " (" << fixed << setprecision(2)
			     << alPct << "%)" << endl;
			cerr << "# reads that failed to align: "
			     << numUnaligned << " (" << fixed << setprecision(2)
			     << unalPct << "%)" << endl;
			if(numMaxed > 0) {
				if(sampleMax_) {
					cerr << "# reads with alignments sampled due to -M: "
						 << numMaxed << " (" << fixed << setprecision(2)
						 << maxPct << "%)" << endl;
				} else {
					cerr << "# reads with alignments suppressed due to -m: "
						 << numMaxed << " (" << fixed << setprecision(2)
						 << maxPct << "%)" << endl;
				}
			}
			if(numReported == 0 && numReportedPaired == 0) {
				cerr << "No alignments" << endl;
			}
			else if(numReportedPaired > 0 && numReported == 0) {
				cerr << "Reported " << (numReportedPaired >> 1)
					 << " paired-end alignments" << endl;
			}
			else if(numReported > 0 && numReportedPaired == 0) {
				cerr << "Reported " << numReported
					 << " alignments" << endl;
			}
			else {
				assert_gt(numReported + numReportedPaired, 0);
				cerr << "Reported " << (numReportedPaired >> 1)
					 << " paired-end alignments and " << numReported
					 << " singleton alignments" << endl;
			}
			if(hadoopOut) {
				cerr << "reporter:counter:Bowtie,Reads with reported alignments," << numAligned << endl;
				cerr << "reporter:counter:Bowtie,Reads with no alignments," << numUnaligned << endl;
				cerr << "reporter:counter:Bowtie,Reads exceeding -m limit," << numMaxed << endl;
				cerr << "reporter:counter:Bowtie,Unpaired alignments reported," << numReported << endl;
				cerr << "reporter:counter:Bowtie,Paired alignments reported," << numReportedPaired << endl;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebx
movq %rdi, %rbp
callq 0x3e4b6
movq %rbp, %rdi
callq 0x1ac76
cmpb $0x0, 0x1f0(%rbp)
jne 0x188ee
movl %ebx, 0xc(%rsp)
movq 0x20(%rbp), %rax
movq 0x1c8(%rbp), %rcx
movq 0x1d0(%rbp), %rdx
movq 0x1d8(%rbp), %rsi
movq 0x1e0(%rbp), %rdi
movq 0x1e8(%rbp), %r8
xorl %r15d, %r15d
xorl %r9d, %r9d
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebx, %ebx
xorl %r14d, %r14d
cmpq %r9, %rax
je 0x184a3
addq (%rdx,%r9,8), %r14
addq (%rsi,%r9,8), %rbx
addq (%rcx,%r9,8), %r13
addq (%rdi,%r9,8), %r12
addq (%r8,%r9,8), %r15
incq %r9
jmp 0x18485
leaq (%r12,%r13), %rcx
movb 0x169(%rbp), %dl
leaq (%rcx,%r15), %rax
testb %dl, %dl
movq %rax, %rdi
cmovneq %rcx, %rdi
testq %rdi, %rdi
movq %rdi, 0x28(%rsp)
je 0x18594
xorl %esi, %esi
testb %dl, %dl
cmoveq %r15, %rsi
cmovneq %rcx, %rax
addq %r13, %rsi
movq %rsi, %xmm6
movq %r12, %xmm0
punpcklqdq %xmm0, %xmm6    # xmm6 = xmm6[0],xmm0[0]
movdqa 0x2ee63(%rip), %xmm0    # 0x47350
movdqa %xmm6, %xmm1
pand %xmm0, %xmm1
movdqa 0x2ee63(%rip), %xmm2    # 0x47360
por %xmm2, %xmm1
psrlq $0x20, %xmm6
movdqa 0x2ee62(%rip), %xmm3    # 0x47370
por %xmm3, %xmm6
movapd 0x2ee66(%rip), %xmm4    # 0x47380
subpd %xmm4, %xmm6
addpd %xmm1, %xmm6
mulpd 0x2ee66(%rip), %xmm6    # 0x47390
movq %rax, %xmm1
movq %rdi, %xmm5
punpcklqdq %xmm5, %xmm1    # xmm1 = xmm1[0],xmm5[0]
pand %xmm1, %xmm0
por %xmm2, %xmm0
psrlq $0x20, %xmm1
por %xmm3, %xmm1
subpd %xmm4, %xmm1
addpd %xmm0, %xmm1
movq %r15, %xmm0
punpckldq 0x2ee42(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x2ee4a(%rip), %xmm0    # 0x473b0
divpd %xmm1, %xmm6
movapd %xmm6, 0x10(%rsp)
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
addsd %xmm0, %xmm2
mulsd 0x2ee7c(%rip), %xmm2    # 0x47400
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
divsd %xmm1, %xmm2
movapd %xmm2, 0x30(%rsp)
jmp 0x185a8
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq 0x49a41(%rip), %rdi     # 0x61ff0
leaq 0x32c6d(%rip), %rsi     # 0x4b223
callq 0x94e0
movq %rax, %rdi
movq 0x28(%rsp), %rsi
callq 0x9310
movq %rax, %rdi
callq 0x9210
leaq 0x32c60(%rip), %rsi     # 0x4b237
movq 0x49a12(%rip), %rdi     # 0x61ff0
callq 0x94e0
xorl %esi, %esi
cmpb $0x0, 0x169(%rbp)
cmoveq %r15, %rsi
addq %r13, %rsi
movq %rax, %rdi
callq 0x9310
leaq 0x2f593(%rip), %rsi     # 0x47b95
movq %rax, %rdi
callq 0x94e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl $0xfffffefb, %esi       # imm = 0xFFFFFEFB
movl 0x18(%rax,%rcx), %edx
andl %esi, %edx
orl $0x4, %edx
movl %edx, 0x18(%rax,%rcx)
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
pushq $0x2
popq %rdx
movq %rdx, 0x8(%rax,%rcx)
movq %rax, %rdi
movaps 0x10(%rsp), %xmm0
callq 0x9840
leaq 0x32c17(%rip), %rsi     # 0x4b25d
movq %rax, %rdi
callq 0x94e0
movq %rax, %rdi
callq 0x9210
leaq 0x32c03(%rip), %rsi     # 0x4b260
movq 0x4998c(%rip), %rdi     # 0x61ff0
callq 0x94e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x9310
movq %rax, %rdi
leaq 0x2f517(%rip), %rsi     # 0x47b95
callq 0x94e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
movl $0xfffffefb, %esi       # imm = 0xFFFFFEFB
andl %esi, %edx
orl $0x4, %edx
movl %edx, 0x18(%rax,%rcx)
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
pushq $0x2
popq %rdx
movq %rdx, 0x8(%rax,%rcx)
movaps 0x10(%rsp), %xmm0
movhlps %xmm0, %xmm0            # xmm0 = xmm0[1,1]
movq %rax, %rdi
callq 0x9840
movq %rax, %rdi
leaq 0x32b98(%rip), %rsi     # 0x4b25d
callq 0x94e0
movq %rax, %rdi
callq 0x9210
testq %r15, %r15
je 0x18765
leaq 0x32b9d(%rip), %rax     # 0x4b27f
leaq 0x32bc2(%rip), %rsi     # 0x4b2ab
cmpb $0x0, 0x169(%rbp)
cmovneq %rax, %rsi
movq 0x498f5(%rip), %rdi     # 0x61ff0
callq 0x94e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x9310
leaq 0x2f483(%rip), %rsi     # 0x47b95
movq %rax, %rdi
callq 0x94e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%rax,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%rax,%rcx)
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x2, 0x8(%rax,%rcx)
movq %rax, %rdi
movaps 0x30(%rsp), %xmm0
callq 0x9840
leaq 0x32b08(%rip), %rsi     # 0x4b25d
movq %rax, %rdi
callq 0x94e0
movq %rax, %rdi
callq 0x9210
movq %r14, %rax
orq %rbx, %rax
jne 0x18780
movq 0x4987c(%rip), %rdi     # 0x61ff0
leaq 0x32b5f(%rip), %rsi     # 0x4b2da
jmp 0x18817
testq %rbx, %rbx
je 0x187b4
testq %r14, %r14
jne 0x187b4
movq 0x4985f(%rip), %rdi     # 0x61ff0
leaq 0x32b50(%rip), %rsi     # 0x4b2e8
callq 0x94e0
movq %rbx, %rsi
shrq %rsi
movq %rax, %rdi
callq 0x9310
leaq 0x32b40(%rip), %rsi     # 0x4b2f2
jmp 0x18814
movq 0x49835(%rip), %rdi     # 0x61ff0
leaq 0x32b26(%rip), %rsi     # 0x4b2e8
callq 0x94e0
testq %r14, %r14
je 0x187e5
testq %rbx, %rbx
jne 0x187e5
movq %rax, %rdi
movq %r14, %rsi
callq 0x9310
leaq 0x316b5(%rip), %rsi     # 0x49e98
jmp 0x18814
movq %rbx, %rsi
shrq %rsi
movq %rax, %rdi
callq 0x9310
leaq 0x32b0f(%rip), %rsi     # 0x4b309
movq %rax, %rdi
callq 0x94e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x9310
leaq 0x32b11(%rip), %rsi     # 0x4b325
movq %rax, %rdi
callq 0x94e0
movq %rax, %rdi
callq 0x9210
cmpb $0x0, 0xc(%rsp)
je 0x188ee
movq 0x497ba(%rip), %rbp     # 0x61ff0
leaq 0x32afe(%rip), %rsi     # 0x4b33b
movq %rbp, %rdi
callq 0x94e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x9310
movq %rax, %rdi
callq 0x9210
leaq 0x32b14(%rip), %rsi     # 0x4b373
movq %rbp, %rdi
callq 0x94e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x9310
movq %rax, %rdi
callq 0x9210
leaq 0x32b24(%rip), %rsi     # 0x4b3a5
movq %rbp, %rdi
callq 0x94e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x9310
movq %rax, %rdi
callq 0x9210
leaq 0x32b34(%rip), %rsi     # 0x4b3d7
movq %rbp, %rdi
callq 0x94e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x9310
movq %rax, %rdi
callq 0x9210
leaq 0x32b48(%rip), %rsi     # 0x4b40d
movq %rbp, %rdi
callq 0x94e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x9310
movq %rax, %rdi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9210
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop