// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9680
leaq 0x2c7bf(%rip), %rsi     # 0x4b5d9
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x94b0
testl %ebp, %ebp
je 0x1ef60
movq %rax, %r14
cmpl $0x2, %ebp
je 0x1ee9e
cmpl $0x1, %ebp
jne 0x1effb
cmpq $-0x1, %r14
je 0x1ef42
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x9520
leaq 0x2b947(%rip), %rdx     # 0x4a7a8
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x17c39
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $-0x1
popq %rcx
movq %r14, %rdx
callq 0x9520
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x1f0bc
jmp 0x1eefc
cmpq $-0x1, %r14
je 0x1ef39
leaq 0x48(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %r14, %rcx
callq 0x9520
leaq 0x2b8ea(%rip), %rdx     # 0x4a7ab
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x17c39
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
pushq $-0x1
popq %rcx
movq %r14, %rdx
callq 0x9520
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x1f0bc
leaq 0x8(%rsp), %rdi
leaq 0x88(%rsp), %r14
movq %r14, %rsi
callq 0x95e0
movq %r14, %rdi
callq 0x9a68
leaq 0x28(%rsp), %rdi
callq 0x9a68
leaq 0x68(%rsp), %rdi
callq 0x9a68
leaq 0x48(%rsp), %rdi
callq 0x9a68
jmp 0x1ef60
leaq 0x2b86b(%rip), %rsi     # 0x4a7ab
jmp 0x1ef49
leaq 0x2b85f(%rip), %rsi     # 0x4a7a8
leaq 0x8(%rsp), %rdi
callq 0x9a10
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x9a50
movl $0x200, %edi            # imm = 0x200
callq 0x9500
movq %rax, %r14
movq 0x8(%rsp), %rsi
pushq $0x10
popq %rdx
movq %rax, %rdi
callq 0x9550
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
jne 0x1efa7
leaq 0x8(%rsp), %rdi
callq 0x9a68
movq %r14, %rax
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testl %ebp, %ebp
leaq 0x2b80d(%rip), %rax     # 0x4a7bd
leaq 0x2b84c(%rip), %rsi     # 0x4a803
cmoveq %rax, %rsi
movq 0x4302e(%rip), %rdi     # 0x61ff0
callq 0x94e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x9460
movq %rax, %rdi
callq 0x9210
pushq $0x4
popq %rdi
callq 0x9220
movl $0x1, (%rax)
movq 0x42f69(%rip), %rsi     # 0x61f58
movq %rax, %rdi
xorl %edx, %edx
callq 0x9910
jmp 0x1f03f
movq 0x42fee(%rip), %rdi     # 0x61ff0
leaq 0x2b7a5(%rip), %rsi     # 0x4a7ae
callq 0x94e0
movq %rax, %rdi
movl %ebp, %esi
callq 0x9930
movq %rax, %rdi
callq 0x9210
pushq $0x4
popq %rdi
callq 0x9220
movl $0x1, (%rax)
movq 0x42f23(%rip), %rsi     # 0x61f58
movq %rax, %rdi
xorl %edx, %edx
callq 0x9910
jmp 0x1f041
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x9a68
jmp 0x1f055
jmp 0x1f052
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x9a68
jmp 0x1f066
jmp 0x1f063
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x9a68
jmp 0x1f08d
jmp 0x1f08a
jmp 0x1f08a
jmp 0x1f08a
movq %rax, %rbx
movl $0x200, %esi            # imm = 0x200
movq %r14, %rdi
callq 0x9510
jmp 0x1f08d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x9a68
movq %rbx, %rdi
callq 0x9950