// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
callq 0xb060
andl $0x0, (%rax)
cmpq $0x0, 0x8(%r15)
je 0x2f7a3
leaq 0x70(%rbx), %rdi
callq 0xb110
testb %al, %al
jne 0x2f877
leaq 0x40(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
cmpq $0x0, 0x8(%r12)
je 0x2f714
movq %r12, %rdi
callq 0x1e230
testb %al, %al
jne 0x2f714
leaq 0x2cbee(%rip), %rdx     # 0x5c2db
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x1c88d
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0xb6f0
movq %r12, %rdi
callq 0xbb68
leaq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0xbb00
cmpq $0x0, 0x8(%r14)
je 0x2f755
leaq 0x29ae4(%rip), %rsi     # 0x59213
leaq 0x10(%rsp), %rdi
movq %r14, %rdx
callq 0x1b8b7
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xbb00
leaq 0x10(%rsp), %rdi
callq 0xbb68
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
pushq $0x5
popq %rsi
callq 0xb190
leaq 0x30(%rsp), %rsi
pushq $0x10
popq %rdx
movq %rbx, %rdi
callq 0xb2e0
movq (%rbx), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%rbx,%rax)
jne 0x2f953
leaq 0x30(%rsp), %rdi
callq 0xbb68
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0xb6c0
testl %eax, %eax
jne 0x2f94b
leaq 0x2c18a(%rip), %rsi     # 0x5b941
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x1b7b6
leaq 0xf0(%rsp), %rdi
movl $0xb7b, %esi            # imm = 0xB7B
callq 0x1caa3
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x1ca3c
leaq 0x2a3ea(%rip), %rdx     # 0x59be3
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1b92d
leaq 0x2d380(%rip), %rsi     # 0x5cb92
leaq 0xb0(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1b7b6
leaq 0x2c113(%rip), %rdx     # 0x5b93e
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x1b92d
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x1ca3c
leaq 0x2d383(%rip), %rdx     # 0x5cbe1
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1b92d
leaq 0x30(%rsp), %rdi
callq 0x224fc
callq 0xb6c0
testl %eax, %eax
jne 0x2f94b
leaq 0x2c0b6(%rip), %rsi     # 0x5b941
leaq 0x70(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x1b7b6
leaq 0xf0(%rsp), %rdi
movl $0xb7c, %esi            # imm = 0xB7C
callq 0x1caa3
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0xf0(%rsp), %rdx
callq 0x1ca3c
leaq 0x2a316(%rip), %rdx     # 0x59be3
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1b92d
leaq 0x2d2ac(%rip), %rsi     # 0x5cb92
leaq 0xb0(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1b7b6
leaq 0x2c03f(%rip), %rdx     # 0x5b93e
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x1b92d
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x1ca3c
leaq 0x2d2c4(%rip), %rdx     # 0x5cbf6
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1b92d
leaq 0x30(%rsp), %rdi
callq 0x224fc
pushq $0x1
popq %rdi
callq 0xb6d0
pushq $0x10
popq %rdi
callq 0xb300
movq %rax, %r14
leaq 0x110(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xb7b0
leaq 0x50(%rsp), %rdi
leaq 0x110(%rsp), %rsi
callq 0x1c554
leaq 0x2d27a(%rip), %rsi     # 0x5cc03
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x1b94c
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xb940
xorl %ebp, %ebp
movq 0x54637(%rip), %rsi     # 0x83fe8
movq 0x545a8(%rip), %rdx     # 0x83f60
movq %r14, %rdi
callq 0xb9d0
jmp 0x2fb86
jmp 0x2f9c9
jmp 0x2f9d8
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xbb68
jmp 0x2f9db
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbb68
jmp 0x2f9ec
jmp 0x2f9e9
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0xbb68
jmp 0x2fa00
jmp 0x2f9fd
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0xbb68
jmp 0x2fa14
jmp 0x2fa11
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0xbb68
jmp 0x2fa25
jmp 0x2fa22
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0xbb68
jmp 0x2fa39
jmp 0x2fa36
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0xbb68
jmp 0x2fa6e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbb68
jmp 0x2fa5d
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x50(%rsp), %rdi
callq 0xbb68
jmp 0x2fa7e
jmp 0x2fa6b
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
jmp 0x2fc0a
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x110(%rsp), %rdi
callq 0xbb68
testb %bpl, %bpl
jne 0x2faa7
jmp 0x2fc05
jmp 0x2fa97
movq %rax, %rbx
jmp 0x2fc0f
jmp 0x2fc02
movq %rax, %rbx
movq %r14, %rdi
callq 0xb470
jmp 0x2fc05
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbb68
jmp 0x2fc05
jmp 0x2fc02
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x2fc05
movq %rbx, %rdi
callq 0xb270
movq %rax, %rbx
pushq $0x10
popq %rdi
callq 0xb300
movq %rax, %r14
leaq 0x130(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xb7b0
leaq 0x70(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x1c554
leaq 0x2d0eb(%rip), %rsi     # 0x5cc03
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0x1b94c
leaq 0x2ddc3(%rip), %rdx     # 0x5d8f4
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1b92d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %rax, %rdx
callq 0x1b92d
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0xb940
xorl %ebp, %ebp
movq 0x54471(%rip), %rsi     # 0x83fe8
movq 0x543e2(%rip), %rdx     # 0x83f60
movq %r14, %rdi
callq 0xb9d0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xbb68
jmp 0x2fb9b
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x50(%rsp), %rdi
callq 0xbb68
jmp 0x2fbad
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x90(%rsp), %rdi
callq 0xbb68
jmp 0x2fbc2
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x70(%rsp), %rdi
callq 0xbb68
jmp 0x2fbd4
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x130(%rsp), %rdi
callq 0xbb68
testb %bpl, %bpl
jne 0x2fbeb
jmp 0x2fbf3
movq %rax, %rbx
movq %r14, %rdi
callq 0xb470
callq 0xb970
jmp 0x2fc05
movq %rax, %rdi
callq 0x1bdcd
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xbb68
movq %rbx, %rdi
callq 0xba30
nop