// File: ncbi[P]amr/common.cpp
// Function: Common_sp::OFStream::open(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&)
void OFStream::open (const string &dirName,
	                   const string &fileName,
	                   const string &extension)
{ 
	QC_ASSERT (! fileName. empty ());
	QC_ASSERT (! is_open ());
	
#if 0
  if (! dirName. empty () && contains (fileName, '/'))
    throw runtime_error ("Slash in file name: " + strQuote (fileName));
#endif

	string pathName;
	if (! dirName. empty () && ! isDirName (dirName))
	  pathName = dirName + "/";
	pathName += fileName;
	if (! extension. empty ())
		pathName += "." + extension;
	
  exceptions (std::ios::failbit | std::ios::badbit);  // In ifstream these flags collide with eofbit
	try {	ofstream::open (pathName); }
    catch (const exception &e)
    {
      throw runtime_error ("Cannot create file " + shellQuote (pathName) + "\n" + e. what ());
    }

	if (! good ())
	  throw runtime_error ("Cannot create file " + shellQuote (pathName));
}

// Assembly:
subq $0x418, %rsp            # imm = 0x418
movq %rdi, 0x410(%rsp)
movq %rsi, 0x408(%rsp)
movq %rdx, 0x400(%rsp)
movq %rcx, 0x3f8(%rsp)
movq 0x410(%rsp), %rax
movq %rax, 0x48(%rsp)
callq 0xc090
movl $0x0, (%rax)
movq 0x400(%rsp), %rdi
callq 0xcc10
testb $0x1, %al
jne 0x59ad5
jmp 0x59d5c
callq 0xc8c0
cmpl $0x0, %eax
jne 0x59d52
leaq 0x357(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xcd00
movq 0x40(%rsp), %rdx
leaq 0x73f18(%rip), %rsi     # 0xcda19
leaq 0x358(%rsp), %rdi
callq 0x29fd0
jmp 0x59b10
leaq 0x320(%rsp), %rdi
movl $0xb7b, %esi            # imm = 0xB7B
callq 0x2ded0
jmp 0x59b24
leaq 0x378(%rsp), %rdi
leaq 0x358(%rsp), %rsi
leaq 0x320(%rsp), %rdx
callq 0x2dde0
jmp 0x59b43
leaq 0x72057(%rip), %rdx     # 0xcbba1
leaq 0x398(%rsp), %rdi
leaq 0x378(%rsp), %rsi
callq 0x2a2f0
jmp 0x59b61
leaq 0x2df(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xcd00
movq 0x38(%rsp), %rdx
leaq 0x7513c(%rip), %rsi     # 0xcecbb
leaq 0x2e0(%rsp), %rdi
callq 0x29fd0
jmp 0x59b8e
leaq 0x73e81(%rip), %rdx     # 0xcda16
leaq 0x300(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
callq 0x2a2f0
jmp 0x59bac
leaq 0x3b8(%rsp), %rdi
leaq 0x398(%rsp), %rsi
leaq 0x300(%rsp), %rdx
callq 0x2dde0
jmp 0x59bcb
leaq 0x75138(%rip), %rdx     # 0xced0a
leaq 0x3d8(%rsp), %rdi
leaq 0x3b8(%rsp), %rsi
callq 0x2a2f0
jmp 0x59be9
leaq 0x3d8(%rsp), %rdi
callq 0x3e9b0
jmp 0x59bf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59d40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59d33
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59d26
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59d19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59cff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59cf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59ce5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59cd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
leaq 0x3d8(%rsp), %rdi
callq 0xce98
leaq 0x3b8(%rsp), %rdi
callq 0xce98
leaq 0x300(%rsp), %rdi
callq 0xce98
leaq 0x2e0(%rsp), %rdi
callq 0xce98
leaq 0x2df(%rsp), %rdi
callq 0xc7a0
leaq 0x398(%rsp), %rdi
callq 0xce98
leaq 0x378(%rsp), %rdi
callq 0xce98
leaq 0x320(%rsp), %rdi
callq 0xce98
leaq 0x358(%rsp), %rdi
callq 0xce98
leaq 0x357(%rsp), %rdi
callq 0xc7a0
jmp 0x5a4e9
movl $0x1, %edi
callq 0xc8d0
callq 0xc090
movq 0x48(%rsp), %rdi
movl $0x0, (%rax)
callq 0xc5a0
testb $0x1, %al
jne 0x59d7a
jmp 0x5a001
callq 0xc8c0
cmpl $0x0, %eax
jne 0x59ff7
leaq 0x237(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0xcd00
movq 0x30(%rsp), %rdx
leaq 0x73c73(%rip), %rsi     # 0xcda19
leaq 0x238(%rsp), %rdi
callq 0x29fd0
jmp 0x59db5
leaq 0x210(%rsp), %rdi
movl $0xb7c, %esi            # imm = 0xB7C
callq 0x2ded0
jmp 0x59dc9
leaq 0x258(%rsp), %rdi
leaq 0x238(%rsp), %rsi
leaq 0x210(%rsp), %rdx
callq 0x2dde0
jmp 0x59de8
leaq 0x71db2(%rip), %rdx     # 0xcbba1
leaq 0x278(%rsp), %rdi
leaq 0x258(%rsp), %rsi
callq 0x2a2f0
jmp 0x59e06
leaq 0x1cf(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xcd00
movq 0x28(%rsp), %rdx
leaq 0x74e97(%rip), %rsi     # 0xcecbb
leaq 0x1d0(%rsp), %rdi
callq 0x29fd0
jmp 0x59e33
leaq 0x73bdc(%rip), %rdx     # 0xcda16
leaq 0x1f0(%rsp), %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x2a2f0
jmp 0x59e51
leaq 0x298(%rsp), %rdi
leaq 0x278(%rsp), %rsi
leaq 0x1f0(%rsp), %rdx
callq 0x2dde0
jmp 0x59e70
leaq 0x74ea8(%rip), %rdx     # 0xced1f
leaq 0x2b8(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x2a2f0
jmp 0x59e8e
leaq 0x2b8(%rsp), %rdi
callq 0x3e9b0
jmp 0x59e9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59fe5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59fd8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59fcb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59fbe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59fa4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59f97
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59f8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x59f7d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
leaq 0x2b8(%rsp), %rdi
callq 0xce98
leaq 0x298(%rsp), %rdi
callq 0xce98
leaq 0x1f0(%rsp), %rdi
callq 0xce98
leaq 0x1d0(%rsp), %rdi
callq 0xce98
leaq 0x1cf(%rsp), %rdi
callq 0xc7a0
leaq 0x278(%rsp), %rdi
callq 0xce98
leaq 0x258(%rsp), %rdi
callq 0xce98
leaq 0x210(%rsp), %rdi
callq 0xce98
leaq 0x238(%rsp), %rdi
callq 0xce98
leaq 0x237(%rsp), %rdi
callq 0xc7a0
jmp 0x5a4e9
movl $0x1, %edi
callq 0xc8d0
leaq 0x1a8(%rsp), %rdi
callq 0xca10
movq 0x408(%rsp), %rdi
callq 0xcc10
testb $0x1, %al
jne 0x5a097
movq 0x408(%rsp), %rdi
callq 0x31310
movb %al, 0x27(%rsp)
jmp 0x5a032
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x5a097
jmp 0x5a03c
movq 0x408(%rsp), %rsi
leaq 0x743b3(%rip), %rdx     # 0xce3fe
leaq 0x188(%rsp), %rdi
callq 0x2d9a0
jmp 0x5a05a
leaq 0x1a8(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0xc8f0
leaq 0x188(%rsp), %rdi
callq 0xce98
jmp 0x5a097
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x5a4dc
movq 0x400(%rsp), %rsi
leaq 0x1a8(%rsp), %rdi
callq 0xc960
jmp 0x5a0ae
movq 0x3f8(%rsp), %rdi
callq 0xcc10
testb $0x1, %al
jne 0x5a129
movq 0x3f8(%rsp), %rdx
leaq 0x7112d(%rip), %rsi     # 0xcb1fb
leaq 0x168(%rsp), %rdi
callq 0x2a1c0
jmp 0x5a0dd
leaq 0x1a8(%rsp), %rdi
leaq 0x168(%rsp), %rsi
callq 0xc960
jmp 0x5a0f4
leaq 0x168(%rsp), %rdi
callq 0xce98
jmp 0x5a129
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
leaq 0x168(%rsp), %rdi
callq 0xce98
jmp 0x5a4dc
movq 0x48(%rsp), %rax
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movl $0x4, %edi
movl $0x1, %esi
callq 0x75720
movl %eax, 0x20(%rsp)
jmp 0x5a152
movl 0x20(%rsp), %esi
movq 0x18(%rsp), %rdi
callq 0xc200
jmp 0x5a162
movq 0x48(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
movl $0x10, %edx
callq 0xc3a0
jmp 0x5a17b
jmp 0x5a38d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
movl 0x344(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x5a4dc
movq 0x348(%rsp), %rdi
callq 0xc2f0
movq %rax, 0x160(%rsp)
movb $0x1, 0xbf(%rsp)
movl $0x10, %edi
callq 0xc3b0
movq %rax, 0x10(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0xc320
jmp 0x5a1eb
leaq 0xe0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x2d3d0
jmp 0x5a202
leaq 0x74b23(%rip), %rsi     # 0xced2c
leaq 0x100(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x2a340
jmp 0x5a220
leaq 0x757f6(%rip), %rdx     # 0xcfa1d
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x2a2f0
jmp 0x5a23e
movq 0x160(%rsp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rdx
leaq 0x140(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x2a2f0
jmp 0x5a269
movq 0x10(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0xcbb0
jmp 0x5a27d
movq 0x10(%rsp), %rdi
movb $0x0, 0xbf(%rsp)
movq 0xabd5f(%rip), %rsi     # 0x105ff0
movq 0xabcd8(%rip), %rdx     # 0x105f70
callq 0xcc80
jmp 0x5a4fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x5a36b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x5a35e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x5a351
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x5a344
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x5a337
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
leaq 0x140(%rsp), %rdi
callq 0xce98
leaq 0x120(%rsp), %rdi
callq 0xce98
leaq 0x100(%rsp), %rdi
callq 0xce98
leaq 0xe0(%rsp), %rdi
callq 0xce98
leaq 0xc0(%rsp), %rdi
callq 0xce98
testb $0x1, 0xbf(%rsp)
jne 0x5a377
jmp 0x5a381
movq 0x10(%rsp), %rdi
callq 0xc580
callq 0xcbe0
jmp 0x5a388
jmp 0x5a4dc
movq 0x48(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0xcc60
movb %al, 0xf(%rsp)
jmp 0x5a3a7
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x5a4c7
jmp 0x5a3b5
movb $0x1, 0x57(%rsp)
movl $0x10, %edi
callq 0xc3b0
movq %rax, (%rsp)
leaq 0x58(%rsp), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0xc320
jmp 0x5a3dc
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x2d3d0
jmp 0x5a3ed
leaq 0x74938(%rip), %rsi     # 0xced2c
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rdx
callq 0x2a340
jmp 0x5a408
movq (%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xcbb0
jmp 0x5a41b
movq (%rsp), %rdi
movb $0x0, 0x57(%rsp)
movq 0xabbc5(%rip), %rsi     # 0x105ff0
movq 0xabb3e(%rip), %rdx     # 0x105f70
callq 0xcc80
jmp 0x5a4fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x5a4b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x5a4a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
jmp 0x5a49f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x348(%rsp)
movl %eax, 0x344(%rsp)
leaq 0x98(%rsp), %rdi
callq 0xce98
leaq 0x78(%rsp), %rdi
callq 0xce98
leaq 0x58(%rsp), %rdi
callq 0xce98
testb $0x1, 0x57(%rsp)
jne 0x5a4bc
jmp 0x5a4c5
movq (%rsp), %rdi
callq 0xc580
jmp 0x5a4dc
leaq 0x1a8(%rsp), %rdi
callq 0xce98
addq $0x418, %rsp            # imm = 0x418
retq
leaq 0x1a8(%rsp), %rdi
callq 0xce98
movq 0x348(%rsp), %rdi
callq 0xccf0
movq %rax, %rdi
callq 0x2ad70
nop