// File: /workspace/github_cpp_makefile_star2_O3/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 $0x108, %rsp            # imm = 0x108
movq %rsi, %rbx
movq %rdi, %r12
callq 0xa070
movl $0x0, (%rax)
cmpq $0x0, 0x8(%rbx)
je 0x403d5
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x4c726(%rip), %rsi     # 0x8c8ea
leaq 0x4c723(%rip), %rdx     # 0x8c8ee
movq %rsp, %rdi
callq 0x2fa1a
movq (%rsp), %rdi
callq 0xa6d0
leaq 0x30(%rsp), %r13
movq %r13, -0x10(%r13)
testq %rax, %rax
je 0x4020a
movq %rax, %r14
movq %rax, %rdi
callq 0xa260
movq %r14, %rdx
addq %rax, %rdx
leaq 0x20(%rsp), %rdi
movq %r14, %rsi
callq 0x2fa1a
jmp 0x40225
movq 0x708c7(%rip), %rsi     # 0xb0ad8
movq 0x708c8(%rip), %rdx     # 0xb0ae0
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x2c212
leaq 0x48(%rsp), %r15
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
movl $0x3a, %edx
callq 0x39af4
movq %r12, 0x40(%rsp)
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x40258
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x40273
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0x48(%rsp), %rbp
cmpq %r15, %rbp
je 0x40361
movq %rsp, %r12
movq 0x18(%rbp), %rdx
testq %rdx, %rdx
je 0x40354
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rbp), %rsi
addq %rsi, %rdx
movq %r12, %rdi
callq 0x2c212
movq %r12, %rdi
leaq 0x4d01d(%rip), %rsi     # 0x8d2d0
callq 0xaac0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r12, %rdi
callq 0xa190
movq %r13, 0x20(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x402ea
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
jmp 0x402f2
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x28(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rsp), %rdi
movl $0x1, %esi
callq 0x39cfe
movl %eax, %r14d
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x40333
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4034e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
cmpl $0x4, %r14d
je 0x40388
movq (%rbp), %rbp
cmpq %r15, %rbp
jne 0x40284
movq 0x40(%rsp), %r15
leaq 0x10(%r15), %rax
movq %rax, (%r15)
movq 0x70764(%rip), %rsi     # 0xb0ad8
movq 0x70765(%rip), %rdx     # 0xb0ae0
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2c212
jmp 0x403b6
movq 0x40(%rsp), %r15
leaq 0x10(%r15), %r14
movq %r14, (%r15)
movq 0x10(%rbp), %rsi
movq 0x18(%rbp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2c212
leaq 0x4cf22(%rip), %rsi     # 0x8d2d0
movq %r15, %rdi
callq 0xaac0
leaq 0x48(%rsp), %rdi
callq 0x2f9d4
movq %r15, %rax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa6b0
testl %eax, %eax
jne 0x4046d
leaq 0xb8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x4c541(%rip), %rsi     # 0x8c936
leaq 0x4c54d(%rip), %rdx     # 0x8c949
leaq 0xa8(%rsp), %rdi
callq 0x2fa1a
leaq 0xc8(%rsp), %rdi
movl $0x6cb, %esi            # imm = 0x6CB
callq 0x2d1fa
leaq 0xe8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
callq 0x2d152
leaq 0x4a7a6(%rip), %rsi     # 0x8abe5
leaq 0xe8(%rsp), %rdi
callq 0xaac0
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x40477
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x40484
movl $0x1, %edi
callq 0xa6c0
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x4ccd1(%rip), %rsi     # 0x8d181
leaq 0x4ccf1(%rip), %rdx     # 0x8d1a8
leaq 0x88(%rsp), %rdi
callq 0x2fa1a
leaq 0x4c468(%rip), %rsi     # 0x8c933
leaq 0x88(%rsp), %rdi
callq 0xaac0
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x404fa
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x40507
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
movq 0x8(%rax), %rsi
leaq 0x68(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rsp, %rdi
leaq 0x48(%rsp), %rsi
callq 0x2d152
leaq 0x4cc72(%rip), %rsi     # 0x8d1a9
movq %rsp, %rdi
callq 0xaac0
leaq 0x30(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x40560
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x4056d
movq %rdx, 0x20(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x30(%rsp)
movq 0x8(%rax), %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
callq 0x34fa2
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x405ad
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x405ad
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x405cd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x405cd
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x405e9
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x405e9
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x4060b
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x4060b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x40627
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40627
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4064d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x4064d
movq %rax, %rbx
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x40673
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40673
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r14, %rdi
je 0x40737
movq 0xb8(%rsp), %rsi
jmp 0x406dd
movq %rax, %rbx
movq (%r15), %rdi
cmpq %r14, %rdi
je 0x4072d
movq (%r14), %rsi
jmp 0x40725
jmp 0x406f3
jmp 0x406e7
jmp 0x406f3
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x406ca
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x406ca
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x40737
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x40737
movq %rax, %rbx
jmp 0x40737
jmp 0x406ee
movq %rax, %rbx
jmp 0x40712
movq %rax, %rbx
jmp 0x4072d
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r13, %rdi
je 0x40712
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x4072d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xa5a0
leaq 0x48(%rsp), %rdi
callq 0x2f9d4
movq %rbx, %rdi
callq 0xaa10
nop