// File: /workspace/github_cpp_makefile_star2_O1/ncbi[P]amr/common.cpp
// Function: Common_sp::which(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string which (const string &progName)
{
  ASSERT (! progName. empty ());

  const List<string> paths (str2list (getEnv ("PATH"), ':'));
  for (const string& path : paths)
    if (   ! path. empty () 
        && fileExists (path + "/" + progName)
       )
      return path + "/";

  return noString;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %rbx
movq %rdi, %r14
callq 0xa070
movl $0x0, (%rax)
cmpq $0x0, 0x8(%rbx)
je 0x40841
leaq 0x38(%rsp), %rax
movq %rax, 0x70(%rsp)
movq %rax, -0x10(%rax)
leaq 0x4c2df(%rip), %rsi     # 0x8c8ea
leaq 0x4c2dc(%rip), %rdx     # 0x8c8ee
leaq 0x28(%rsp), %rdi
callq 0x2fdd8
movq 0x28(%rsp), %rdi
callq 0xa6d0
movq %rax, %r15
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
testq %r15, %r15
je 0x40654
movq %r15, %rdi
callq 0xa260
movq %r15, %rdx
addq %rax, %rdx
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x2fdd8
jmp 0x4066f
movq 0x7047d(%rip), %rsi     # 0xb0ad8
movq 0x7047e(%rip), %rdx     # 0xb0ae0
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x2c652
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x3a, %edx
callq 0x39fe8
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4069f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x406bb
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0x50(%rsp), %r15
leaq 0x50(%rsp), %rax
cmpq %rax, %r15
je 0x40802
leaq 0x10(%r14), %rax
movq %rax, 0x48(%rsp)
leaq 0x28(%rsp), %r13
movq 0x18(%r15), %r12
testq %r12, %r12
je 0x40748
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x2c652
movq %r13, %rdi
leaq 0x4cbda(%rip), %rsi     # 0x8d2e6
callq 0xaac0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r13, %rdi
callq 0xa190
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4074c
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x40752
xorl %ebp, %ebp
jmp 0x40780
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x3a1f2
cmpl $0x4, %eax
sete %bpl
testq %r12, %r12
je 0x407bd
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x407a1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x407bd
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
testb %bpl, %bpl
je 0x407f1
movq 0x48(%rsp), %rax
movq %rax, (%r14)
movq 0x10(%r15), %rsi
movq 0x18(%r15), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2c652
movq %r14, %rdi
leaq 0x4caff(%rip), %rsi     # 0x8d2e6
callq 0xaac0
testb %bpl, %bpl
jne 0x40822
movq (%r15), %r15
leaq 0x50(%rsp), %rax
cmpq %rax, %r15
jne 0x406dc
leaq 0x10(%r14), %rax
movq %rax, (%r14)
movq 0x702c8(%rip), %rsi     # 0xb0ad8
movq 0x702c9(%rip), %rdx     # 0xb0ae0
addq %rsi, %rdx
movq %r14, %rdi
callq 0x2c652
leaq 0x50(%rsp), %rdi
callq 0x2fd92
movq %r14, %rax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa6b0
testl %eax, %eax
jne 0x408d9
leaq 0xc8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4c0d5(%rip), %rsi     # 0x8c936
leaq 0x4c0e1(%rip), %rdx     # 0x8c949
leaq 0xb8(%rsp), %rdi
callq 0x2fdd8
leaq 0xd8(%rsp), %rdi
movl $0x6cb, %esi            # imm = 0x6CB
callq 0x2d60a
leaq 0xf8(%rsp), %rdi
leaq 0xb8(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0x2d562
leaq 0x4a33a(%rip), %rsi     # 0x8abe5
leaq 0xf8(%rsp), %rdi
callq 0xaac0
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x408e3
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x408f0
movl $0x1, %edi
callq 0xa6c0
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xa8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4c87b(%rip), %rsi     # 0x8d197
leaq 0x4c89b(%rip), %rdx     # 0x8d1be
leaq 0x98(%rsp), %rdi
callq 0x2fdd8
leaq 0x4bffc(%rip), %rsi     # 0x8c933
leaq 0x98(%rsp), %rdi
callq 0xaac0
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x40969
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x40979
movq %rdx, 0x78(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x88(%rsp)
movq 0x8(%rax), %rsi
leaq 0x78(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x2d562
leaq 0x4c814(%rip), %rsi     # 0x8d1bf
leaq 0x28(%rsp), %rdi
callq 0xaac0
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x409d6
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x409e3
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x3523b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x40a23
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40a23
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40a43
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40a43
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x40a62
movq 0x88(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40a62
movq %rax, %rbx
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x40a84
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40a84
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x40aa0
movq 0x60(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40aa0
movq %rax, %rbx
leaq 0x108(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40ac6
movq 0x108(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40ac6
movq %rax, %rbx
leaq 0xe8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40aec
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40aec
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0x40bd2
movq 0xc8(%rsp), %rsi
jmp 0x40b4a
jmp 0x40b54
jmp 0x40b93
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x40b32
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40b32
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x40bd2
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40bd2
movq %rax, %rbx
jmp 0x40bd2
movq %rax, %rbx
movq (%r14), %rdi
cmpq 0x48(%rsp), %rdi
je 0x40bc8
movq 0x48(%rsp), %rax
movq (%rax), %rsi
jmp 0x40bc0
jmp 0x40b93
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x40b9b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40b9b
movq %rax, %rbx
jmp 0x40bc8
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq 0x70(%rsp), %rdi
jne 0x40bbb
jmp 0x40bc8
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x40bc8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
leaq 0x50(%rsp), %rdi
callq 0x2fd92
movq %rbx, %rdi
callq 0xaa10