// File: /workspace/github_cpp_makefile_star2_O2/BenLangmead[P]bowtie/./hit.h
// Function: HitSink::HitSink(OutFileBuf&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool, EList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 128>*, unsigned long, unsigned long, bool)
explicit HitSink(
		OutFileBuf& out,
		const std::string& dumpAl,
		const std::string& dumpUnal,
		const std::string& dumpMax,
		bool onePairFile,
		bool sampleMax,
		EList<string>* refnames,
		size_t nthreads,
		size_t perThreadBufSize,
		bool reorder) :
		out_(out),
		_refnames(refnames),
		mutex_(),
		dumpAlBase_(dumpAl),
		dumpUnalBase_(dumpUnal),
		dumpMaxBase_(dumpMax),
		onePairFile_(onePairFile),
		sampleMax_(sampleMax),
		quiet_(false),
		nthreads_((nthreads > 0) ? nthreads : 1),
		ptBufs_(),
		ptCounts_(nthreads_),
		perThreadBufSize_(perThreadBufSize),
		ptNumAligned_(NULL),
		reorder_(reorder),
		next_batch_to_flush_(0)
	{
		size_t nelt = 5 * nthreads_;
		ptNumAligned_ = new uint64_t[nelt];
		std::memset(reinterpret_cast<void*>(const_cast<uint64_t*>(ptNumAligned_)), 0, sizeof(uint64_t) * nelt);
		ptNumReported_ = ptNumAligned_ + nthreads_;
		ptNumReportedPaired_ = ptNumReported_ + nthreads_;
		ptNumUnaligned_ = ptNumReportedPaired_ + nthreads_;
		ptNumMaxed_ = ptNumUnaligned_ + nthreads_;
		ptBufs_.resize(nthreads_);
		ptCounts_.resize(nthreads_);
		ptCounts_.fillZero();
		initDumps();

		if (reorder_) {
			reorderInfo_.resize(nthreads_);
			for (size_t i = 0; i < nthreads_; i++) {
				reorderInfo_[i].batchId = 0;
				reorderInfo_[i].waiting = false;
				reorderInfo_[i].flushed = true;
			}
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %r14d
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r12
movq %rdi, %r15
movb 0x80(%rsp), %al
movq 0x70(%rsp), %rcx
movq 0x68(%rsp), %rdx
leaq 0x46e47(%rip), %rdi     # 0x609c8
movq %rdi, (%r15)
movq %rsi, 0x8(%r15)
movq %rdx, 0x10(%r15)
movb $0x0, 0x18(%r15)
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq %rcx, 0x20(%r15)
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
movq %rdx, 0x28(%r15)
andq $0x0, 0x30(%r15)
movq 0x78(%rsp), %rsi
leaq 0x28(%r15), %rdi
movq %rdi, 0x10(%rsp)
movl $0x80, %edi
movq %rdi, 0x38(%r15)
andq $0x0, 0x40(%r15)
movq %rdx, 0x48(%r15)
andq $0x0, 0x50(%r15)
movq %rcx, 0x58(%r15)
andq $0x0, 0x60(%r15)
movq %rsi, 0x68(%r15)
andq $0x0, 0x70(%r15)
movb %al, 0x78(%r15)
movq %rdx, 0x80(%r15)
andq $0x0, 0x88(%r15)
leaq 0x48(%r15), %rax
movq %rax, 0x8(%rsp)
leaq (%r15,%rdi), %rax
movq %rax, (%rsp)
movq %rdi, 0x90(%r15)
leaq 0xc8(%r15), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0xb8(%r15)
movups %xmm0, 0xa8(%r15)
movups %xmm0, 0x98(%r15)
movq %rbp, %rdi
callq 0x19e10
leaq 0x108(%r15), %rdi
movq %rdi, 0x18(%rsp)
movq %r12, %rsi
movq %rbp, 0x20(%rsp)
callq 0x9680
leaq 0x128(%r15), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x9680
leaq 0x148(%r15), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x9680
movb 0x60(%rsp), %al
movb %r14b, 0x168(%r15)
movb %al, 0x169(%r15)
andq $0x0, 0x1c8(%r15)
movb $0x0, 0x1f0(%r15)
andl $0x0, 0x1b8(%r15)
andw $0x0, 0x1bc(%r15)
movq 0x20(%r15), %r14
leaq (%r14,%r14,4), %rax
shrq $0x3d, %rax
imulq $0x28, %r14, %r13
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %r13, %rdi
callq 0x9030
movq %rax, %rbp
movq %rax, 0x1c8(%r15)
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x9270
leaq (,%r14,8), %rax
addq %rbp, %rax
movq %rax, 0x1d0(%r15)
leaq (%rax,%r14,8), %rax
movq %rax, 0x1d8(%r15)
leaq (%rax,%r14,8), %rax
movq %rax, 0x1e0(%r15)
leaq (%rax,%r14,8), %rax
movq %rax, 0x1e8(%r15)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x19e40
movq 0x20(%r15), %rsi
movq 0x8(%rsp), %rdi
callq 0x19e82
movq 0x50(%r15), %rdi
movq 0x60(%r15), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x9270
movq %r15, %rdi
callq 0x19ec4
cmpb $0x1, 0x78(%r15)
jne 0x19d97
movq 0x20(%r15), %rsi
movq (%rsp), %rdi
callq 0x19f1a
xorl %eax, %eax
xorl %ecx, %ecx
cmpq 0x20(%r15), %rcx
jae 0x19d97
movq 0x88(%r15), %rdx
andq $0x0, (%rdx,%rax)
movq 0x88(%r15), %rdx
movb $0x0, 0x9(%rdx,%rax)
movq 0x88(%r15), %rdx
movb $0x1, 0x8(%rdx,%rax)
incq %rcx
addq $0x10, %rax
jmp 0x19d64
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x19dc5
movq %rax, %r14
jmp 0x19dcd
movq %rax, %r14
jmp 0x19dd7
movq %rax, %r14
jmp 0x19de1
movq %rax, %r14
movq %rbx, %rdi
callq 0x9a68
movq %r12, %rdi
callq 0x9a68
movq 0x18(%rsp), %rdi
callq 0x9a68
movq 0x20(%rsp), %rdi
callq 0x19f5c
movq (%rsp), %rdi
callq 0x1a5f6
movq 0x8(%rsp), %rdi
callq 0x18c86
movq 0x10(%rsp), %rdi
callq 0x1a4c6
movq %r14, %rdi
callq 0x9950