// File: 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
movq %rsp, %rbp
subq $0xb0, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x78b70
movq -0x78(%rbp), %rdi
callq 0x2fae0
movq -0x78(%rbp), %rax
testb $0x1, 0x1f0(%rax)
jne 0x29f89
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x78(%rbp), %rcx
movq -0x40(%rbp), %rax
cmpq 0x20(%rcx), %rax
jae 0x29908
movq -0x78(%rbp), %rax
movq 0x1d0(%rax), %rcx
movq -0x40(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
addq -0x18(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x1d8(%rax), %rcx
movq -0x40(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
addq -0x20(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq 0x1c8(%rax), %rcx
movq -0x40(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
addq -0x28(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movq 0x1e0(%rax), %rcx
movq -0x40(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
addq -0x30(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movq 0x1e8(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x2986e
movq -0x78(%rbp), %rax
movq -0x28(%rbp), %rcx
addq -0x30(%rbp), %rcx
movq %rcx, -0x48(%rbp)
testb $0x1, 0x169(%rax)
jne 0x2992d
movq -0x38(%rbp), %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x50(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x58(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x60(%rbp)
cmpq $0x0, -0x48(%rbp)
jbe 0x29aa3
movq -0x78(%rbp), %rax
testb $0x1, 0x169(%rax)
je 0x299b3
movq -0x28(%rbp), %xmm0
movaps 0x5fd87(%rip), %xmm3    # 0x896f0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x5fd8b(%rip), %xmm2    # 0x89700
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x5fd84(%rip), %xmm1    # 0x89710
mulsd %xmm1, %xmm0
movq -0x48(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
jmp 0x29a12
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
addq %rcx, %rax
movq %rax, %xmm0
movaps 0x5fd26(%rip), %xmm3    # 0x896f0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x5fd2a(%rip), %xmm2    # 0x89700
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x5fd23(%rip), %xmm1    # 0x89710
mulsd %xmm1, %xmm0
movq -0x48(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x30(%rbp), %xmm0
movaps 0x5fcd2(%rip), %xmm3    # 0x896f0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x5fcd6(%rip), %xmm2    # 0x89700
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x5fccf(%rip), %xmm1    # 0x89710
mulsd %xmm1, %xmm0
movq -0x48(%rbp), %xmm4
punpckldq %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
subpd %xmm2, %xmm4
movaps %xmm4, %xmm5
unpckhpd %xmm4, %xmm4            # xmm4 = xmm4[1,1]
addsd %xmm5, %xmm4
divsd %xmm4, %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x38(%rbp), %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm4
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm4, %xmm0
mulsd %xmm1, %xmm0
movq -0x48(%rbp), %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movq 0x7e546(%rip), %rdi     # 0xa7ff0
leaq 0x63a6e(%rip), %rsi     # 0x8d51f
callq 0xa5d0
movq %rax, %rdi
movq -0x48(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
movq 0x7e49c(%rip), %rsi     # 0xa7f68
callq 0xa640
movq 0x7e518(%rip), %rdi     # 0xa7ff0
leaq 0x63a54(%rip), %rsi     # 0x8d533
callq 0xa5d0
movq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x88(%rbp)
movq -0x28(%rbp), %rcx
movq %rcx, -0x80(%rbp)
testb $0x1, 0x169(%rax)
je 0x29b0e
xorl %eax, %eax
movq %rax, -0x90(%rbp)
jmp 0x29b19
movq -0x38(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x90(%rbp), %rax
addq %rax, %rsi
callq 0xa130
movq %rax, %rdi
leaq 0x60358(%rip), %rsi     # 0x89e95
callq 0xa5d0
movq %rax, %rdi
leaq 0x4f074(%rip), %rsi     # 0x78bc0
callq 0xa1c0
movq %rax, -0xa0(%rbp)
movl $0x2, %edi
callq 0x78bf0
movq -0xa0(%rbp), %rdi
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %esi
callq 0xa9f0
movq %rax, %rdi
movsd -0x50(%rbp), %xmm0
callq 0xac50
movq %rax, %rdi
leaq 0x639ce(%rip), %rsi     # 0x8d559
callq 0xa5d0
movq %rax, %rdi
movq 0x7e3ce(%rip), %rsi     # 0xa7f68
callq 0xa640
movq 0x7e44a(%rip), %rdi     # 0xa7ff0
leaq 0x639af(%rip), %rsi     # 0x8d55c
callq 0xa5d0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
leaq 0x602cd(%rip), %rsi     # 0x89e95
callq 0xa5d0
movq %rax, %rdi
leaq 0x4efe9(%rip), %rsi     # 0x78bc0
callq 0xa1c0
movq %rax, -0x98(%rbp)
movl $0x2, %edi
callq 0x78bf0
movq -0x98(%rbp), %rdi
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %esi
callq 0xa9f0
movq %rax, %rdi
movsd -0x58(%rbp), %xmm0
callq 0xac50
movq %rax, %rdi
leaq 0x63943(%rip), %rsi     # 0x8d559
callq 0xa5d0
movq %rax, %rdi
movq 0x7e343(%rip), %rsi     # 0xa7f68
callq 0xa640
cmpq $0x0, -0x38(%rbp)
jbe 0x29d63
movq -0x78(%rbp), %rax
testb $0x1, 0x169(%rax)
je 0x29cd6
movq 0x7e3a3(%rip), %rdi     # 0xa7ff0
leaq 0x63927(%rip), %rsi     # 0x8d57b
callq 0xa5d0
movq %rax, %rdi
movq -0x38(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
leaq 0x60226(%rip), %rsi     # 0x89e95
callq 0xa5d0
movq %rax, %rdi
leaq 0x4ef42(%rip), %rsi     # 0x78bc0
callq 0xa1c0
movq %rax, -0xa8(%rbp)
movl $0x2, %edi
callq 0x78bf0
movq -0xa8(%rbp), %rdi
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %esi
callq 0xa9f0
movq %rax, %rdi
movsd -0x60(%rbp), %xmm0
callq 0xac50
movq %rax, %rdi
leaq 0x6389c(%rip), %rsi     # 0x8d559
callq 0xa5d0
movq %rax, %rdi
movq 0x7e29c(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x29d61
movq 0x7e313(%rip), %rdi     # 0xa7ff0
leaq 0x638c3(%rip), %rsi     # 0x8d5a7
callq 0xa5d0
movq %rax, %rdi
movq -0x38(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
leaq 0x60196(%rip), %rsi     # 0x89e95
callq 0xa5d0
movq %rax, %rdi
leaq 0x4eeb2(%rip), %rsi     # 0x78bc0
callq 0xa1c0
movq %rax, -0xb0(%rbp)
movl $0x2, %edi
callq 0x78bf0
movq -0xb0(%rbp), %rdi
movl %eax, -0x70(%rbp)
movl -0x70(%rbp), %esi
callq 0xa9f0
movq %rax, %rdi
movsd -0x60(%rbp), %xmm0
callq 0xac50
movq %rax, %rdi
leaq 0x6380c(%rip), %rsi     # 0x8d559
callq 0xa5d0
movq %rax, %rdi
movq 0x7e20c(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x29d63
cmpq $0x0, -0x18(%rbp)
jne 0x29d98
cmpq $0x0, -0x20(%rbp)
jne 0x29d98
movq 0x7e278(%rip), %rdi     # 0xa7ff0
leaq 0x63857(%rip), %rsi     # 0x8d5d6
callq 0xa5d0
movq %rax, %rdi
movq 0x7e1da(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x29e97
cmpq $0x0, -0x20(%rbp)
jbe 0x29deb
cmpq $0x0, -0x18(%rbp)
jne 0x29deb
movq 0x7e243(%rip), %rdi     # 0xa7ff0
leaq 0x63830(%rip), %rsi     # 0x8d5e4
callq 0xa5d0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
shrq %rsi
callq 0xa130
movq %rax, %rdi
leaq 0x6381c(%rip), %rsi     # 0x8d5ee
callq 0xa5d0
movq %rax, %rdi
movq 0x7e187(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x29e95
cmpq $0x0, -0x18(%rbp)
jbe 0x29e38
cmpq $0x0, -0x20(%rbp)
jne 0x29e38
movq 0x7e1f0(%rip), %rdi     # 0xa7ff0
leaq 0x637dd(%rip), %rsi     # 0x8d5e4
callq 0xa5d0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
leaq 0x62354(%rip), %rsi     # 0x8c176
callq 0xa5d0
movq %rax, %rdi
movq 0x7e137(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x29e93
movq 0x7e1b1(%rip), %rdi     # 0xa7ff0
leaq 0x6379e(%rip), %rsi     # 0x8d5e4
callq 0xa5d0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
shrq %rsi
callq 0xa130
movq %rax, %rdi
leaq 0x637a1(%rip), %rsi     # 0x8d605
callq 0xa5d0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
leaq 0x637a2(%rip), %rsi     # 0x8d621
callq 0xa5d0
movq %rax, %rdi
movq 0x7e0da(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x29e95
jmp 0x29e97
testb $0x1, -0x9(%rbp)
je 0x29f87
movq 0x7e148(%rip), %rdi     # 0xa7ff0
leaq 0x63788(%rip), %rsi     # 0x8d637
callq 0xa5d0
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
movq 0x7e09e(%rip), %rsi     # 0xa7f68
callq 0xa640
movq 0x7e11a(%rip), %rdi     # 0xa7ff0
leaq 0x63792(%rip), %rsi     # 0x8d66f
callq 0xa5d0
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
movq 0x7e070(%rip), %rsi     # 0xa7f68
callq 0xa640
movq 0x7e0ec(%rip), %rdi     # 0xa7ff0
leaq 0x63796(%rip), %rsi     # 0x8d6a1
callq 0xa5d0
movq %rax, %rdi
movq -0x38(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
movq 0x7e042(%rip), %rsi     # 0xa7f68
callq 0xa640
movq 0x7e0be(%rip), %rdi     # 0xa7ff0
leaq 0x6379a(%rip), %rsi     # 0x8d6d3
callq 0xa5d0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
movq 0x7e014(%rip), %rsi     # 0xa7f68
callq 0xa640
movq 0x7e090(%rip), %rdi     # 0xa7ff0
leaq 0x637a2(%rip), %rsi     # 0x8d709
callq 0xa5d0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0xa130
movq %rax, %rdi
movq 0x7dfe6(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x29f89
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)