// File: /workspace/github_cpp_makefile_star2_O2/ncbi[P]amr/common.cpp
// Function: Common_sp::ShellApplication::exec2str(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&) const
string ShellApplication::exec2str (const string &cmd,
                                   const string &tmpName,
                                   const string &logFName) const
{
  ASSERT (! tmp. empty ());
  ASSERT (! contains (tmpName, ' '));
  const string out (tmp + "/" + tmpName);
  exec (cmd + " > " + out, logFName);
  const StringVector vec (out, (size_t) 1, false);
  if (vec. size () != 1)
    throw runtime_error (cmd + "\nOne line is expected");
  return vec [0];  
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %rbx
callq 0xb060
andl $0x0, (%rax)
cmpq $0x0, 0x170(%r13)
je 0x3b584
pushq $0x20
popq %rsi
movq %r12, %rdi
callq 0x1c948
testb %al, %al
jne 0x3b658
addq $0x168, %r13            # imm = 0x168
leaq 0x20e32(%rip), %rdx     # 0x5c2db
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
callq 0x1c88d
leaq 0x48(%rsp), %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x1cbaf
leaq 0x8(%rsp), %rdi
callq 0xbb68
leaq 0x1f75a(%rip), %rdx     # 0x5ac34
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x1c88d
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x1cbaf
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x2812e
leaq 0x8(%rsp), %rdi
callq 0xbb68
leaq 0x28(%rsp), %rdi
callq 0xbb68
leaq 0x8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
callq 0x29a8c
movq 0x10(%rsp), %rax
subq 0x8(%rsp), %rax
cmpq $0x20, %rax
jne 0x3b734
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x1d398
movq %rbx, %rdi
movq %rax, %rsi
callq 0xb7b0
leaq 0x8(%rsp), %rdi
callq 0x20bee
leaq 0x48(%rsp), %rdi
callq 0xbb68
movq %rbx, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xb6c0
testl %eax, %eax
jne 0x3b72c
leaq 0x203a9(%rip), %rsi     # 0x5b941
leaq 0xc8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1b7b6
leaq 0xa8(%rsp), %rdi
movl $0x1128, %esi           # imm = 0x1128
callq 0x1caa3
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x1ca3c
leaq 0x1e603(%rip), %rdx     # 0x59be3
leaq 0x28(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1b92d
leaq 0x22695(%rip), %rsi     # 0x5dc8e
leaq 0x68(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1b7b6
leaq 0x2032f(%rip), %rdx     # 0x5b93e
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1b92d
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x1ca3c
leaq 0x226b2(%rip), %rdx     # 0x5dcf1
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1b92d
leaq 0x48(%rsp), %rdi
callq 0x224fc
callq 0xb6c0
testl %eax, %eax
jne 0x3b72c
leaq 0x202d5(%rip), %rsi     # 0x5b941
leaq 0xc8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1b7b6
leaq 0xa8(%rsp), %rdi
movl $0x1129, %esi           # imm = 0x1129
callq 0x1caa3
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x1ca3c
leaq 0x1e52f(%rip), %rdx     # 0x59be3
leaq 0x28(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1b92d
leaq 0x225c1(%rip), %rsi     # 0x5dc8e
leaq 0x68(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1b7b6
leaq 0x2025b(%rip), %rdx     # 0x5b93e
leaq 0x88(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x1b92d
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x88(%rsp), %rdx
callq 0x1ca3c
leaq 0x225ee(%rip), %rdx     # 0x5dd01
leaq 0x48(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1b92d
leaq 0x48(%rsp), %rdi
callq 0x224fc
pushq $0x1
popq %rdi
callq 0xb6d0
pushq $0x10
popq %rdi
callq 0xb300
movq %rax, %r15
leaq 0x225d5(%rip), %rdx     # 0x5dd1b
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x1c88d
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0xb940
xorl %ebp, %ebp
movq 0x4887c(%rip), %rsi     # 0x83fe8
movq 0x487ed(%rip), %rdx     # 0x83f60
movq %r15, %rdi
callq 0xb9d0
jmp 0x3b77f
jmp 0x3b78e
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xbb68
jmp 0x3b791
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xbb68
jmp 0x3b7a2
jmp 0x3b79f
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
callq 0xbb68
jmp 0x3b7b6
jmp 0x3b7b3
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0xbb68
jmp 0x3b7c7
jmp 0x3b7c4
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbb68
jmp 0x3b7d8
jmp 0x3b7d5
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0xbb68
jmp 0x3b7ec
jmp 0x3b7e9
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0xbb68
jmp 0x3b800
jmp 0x3b7fd
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
jmp 0x3b873
jmp 0x3b80c
movq %rax, %rbx
jmp 0x3b878
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbb68
testb %bpl, %bpl
jne 0x3b828
jmp 0x3b864
movq %rax, %rbx
movq %r15, %rdi
callq 0xb470
jmp 0x3b864
jmp 0x3b852
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xbb68
jmp 0x3b846
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xbb68
jmp 0x3b86e
movq %rax, %rbx
jmp 0x3b86e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x3b873
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20bee
leaq 0x48(%rsp), %rdi
callq 0xbb68
movq %rbx, %rdi
callq 0xba30