// File: BenLangmead[P]bowtie/./hit.h
// Function: HitSink::openOf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
std::ofstream* openOf(const std::string& name,
	                      int mateType,
	                      const std::string& suffix)
	{
		std::string s = name;
		size_t dotoff = name.find_last_of(".");
		if(mateType == 1) {
			if(dotoff == string::npos) {
				s += "_1"; s += suffix;
			} else {
				s = name.substr(0, dotoff) + "_1" + s.substr(dotoff);
			}
		} else if(mateType == 2) {
			if(dotoff == string::npos) {
				s += "_2"; s += suffix;
			} else {
				s = name.substr(0, dotoff) + "_2" + s.substr(dotoff);
			}
		} else if(mateType != 0) {
			cerr << "Bad mate type " << mateType << endl; throw 1;
		}
		std::ofstream* tmp = new ofstream(s.c_str(), ios::out);
		if(tmp->fail()) {
			if(mateType == 0) {
				cerr << "Could not open single-ended aligned/unaligned-read file for writing: " << name << endl;
			} else {
				cerr << "Could not open paired-end aligned/unaligned-read file for writing: " << name << endl;
			}
			throw 1;
		}
		return tmp;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0xa220
movq -0x10(%rbp), %rdi
leaq 0x5554d(%rip), %rsi     # 0x8d8ff
movq $-0x1, %rdx
callq 0xa590
movq %rax, -0x48(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x38508
cmpq $-0x1, -0x48(%rbp)
jne 0x3840a
leaq 0x546ac(%rip), %rsi     # 0x8ca86
leaq -0x40(%rbp), %rdi
callq 0xa5b0
jmp 0x383e5
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0xa7b0
jmp 0x383f4
jmp 0x38503
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x38837
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0xb8(%rbp), %rdi
callq 0xa620
jmp 0x38424
leaq 0x5465b(%rip), %rdx     # 0x8ca86
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x28470
jmp 0x38440
movq -0x48(%rbp), %rdx
leaq -0xd8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq $-0x1, %rcx
callq 0xa620
jmp 0x3845d
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x388b0
jmp 0x38476
leaq -0x40(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0xa760
leaq -0x78(%rbp), %rdi
callq 0xacd8
leaq -0xd8(%rbp), %rdi
callq 0xacd8
leaq -0x98(%rbp), %rdi
callq 0xacd8
leaq -0xb8(%rbp), %rdi
callq 0xacd8
jmp 0x38503
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x384f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x384e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0xacd8
leaq -0x98(%rbp), %rdi
callq 0xacd8
leaq -0xb8(%rbp), %rdi
callq 0xacd8
jmp 0x38837
jmp 0x386be
cmpl $0x2, -0x14(%rbp)
jne 0x38643
cmpq $-0x1, -0x48(%rbp)
jne 0x3853f
leaq 0x54569(%rip), %rsi     # 0x8ca89
leaq -0x40(%rbp), %rdi
callq 0xa5b0
jmp 0x3852b
movq -0x20(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0xa7b0
jmp 0x3853a
jmp 0x38641
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0x138(%rbp), %rdi
callq 0xa620
jmp 0x38559
leaq 0x54529(%rip), %rdx     # 0x8ca89
leaq -0x118(%rbp), %rdi
leaq -0x138(%rbp), %rsi
callq 0x28470
jmp 0x38575
movq -0x48(%rbp), %rdx
leaq -0x158(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movq $-0x1, %rcx
callq 0xa620
jmp 0x38592
leaq -0xf8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x158(%rbp), %rdx
callq 0x388b0
jmp 0x385ae
leaq -0x40(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0xa760
leaq -0xf8(%rbp), %rdi
callq 0xacd8
leaq -0x158(%rbp), %rdi
callq 0xacd8
leaq -0x118(%rbp), %rdi
callq 0xacd8
leaq -0x138(%rbp), %rdi
callq 0xacd8
jmp 0x38641
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x38630
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x38624
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x158(%rbp), %rdi
callq 0xacd8
leaq -0x118(%rbp), %rdi
callq 0xacd8
leaq -0x138(%rbp), %rdi
callq 0xacd8
jmp 0x38837
jmp 0x386bc
cmpl $0x0, -0x14(%rbp)
je 0x386ba
movq 0x6f9a0(%rip), %rdi     # 0xa7ff0
leaq 0x54435(%rip), %rsi     # 0x8ca8c
callq 0xa5d0
movq %rax, -0x168(%rbp)
jmp 0x38665
movq -0x168(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0xab40
movq %rax, -0x170(%rbp)
jmp 0x3867d
movq -0x170(%rbp), %rdi
movq 0x6f8dd(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x38692
movl $0x4, %edi
callq 0xa290
movq %rax, %rdi
movl $0x1, (%rdi)
movq 0x6f8a4(%rip), %rsi     # 0xa7f50
xorl %eax, %eax
movl %eax, %edx
callq 0xab10
jmp 0x38849
jmp 0x386bc
jmp 0x386be
movl $0x200, %edi            # imm = 0x200
callq 0xa5f0
movq %rax, -0x178(%rbp)
jmp 0x386d1
leaq -0x40(%rbp), %rdi
callq 0xa210
movq -0x178(%rbp), %rdi
movq %rax, %rsi
movl $0x10, %edx
callq 0xa680
jmp 0x386f0
movq -0x178(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0xa030
movb %al, -0x179(%rbp)
jmp 0x3871c
movb -0x179(%rbp), %al
testb $0x1, %al
jne 0x3872b
jmp 0x38810
cmpl $0x0, -0x14(%rbp)
jne 0x3879f
movq 0x6f8b8(%rip), %rdi     # 0xa7ff0
leaq 0x5435c(%rip), %rsi     # 0x8ca9b
callq 0xa5d0
movq %rax, -0x188(%rbp)
jmp 0x3874d
movq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xa540
movq %rax, -0x190(%rbp)
jmp 0x38766
movq -0x190(%rbp), %rdi
movq 0x6f7f4(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x3877b
jmp 0x387eb
movq -0x178(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
movl $0x200, %esi            # imm = 0x200
callq 0xa600
jmp 0x38837
movq 0x6f84a(%rip), %rdi     # 0xa7ff0
leaq 0x54334(%rip), %rsi     # 0x8cae1
callq 0xa5d0
movq %rax, -0x198(%rbp)
jmp 0x387bb
movq -0x198(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xa540
movq %rax, -0x1a0(%rbp)
jmp 0x387d4
movq -0x1a0(%rbp), %rdi
movq 0x6f786(%rip), %rsi     # 0xa7f68
callq 0xa640
jmp 0x387e9
jmp 0x387eb
movl $0x4, %edi
callq 0xa290
movq %rax, %rdi
movl $0x1, (%rdi)
movq 0x6f74b(%rip), %rsi     # 0xa7f50
xorl %eax, %eax
movl %eax, %edx
callq 0xab10
jmp 0x38849
movq -0x160(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xacd8
movq -0x1a8(%rbp), %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0xacd8
movq -0x50(%rbp), %rdi
callq 0xab60
nopl (%rax)