// File: /workspace/github_cpp_makefile_star2_O3/ncbi[P]amr/common.cpp
// Function: Common_sp::Application::initEnvironment()
void Application::initEnvironment () 
{
  ASSERT (! programArgs. empty ());
  
  // execDir, programName
	execDir = getProgramDirName ();
	if (execDir. empty ())
		execDir = which (programArgs. front ());
  if (! isDirName (execDir))
    throw logic_error ("Cannot identify the directory of the executable");
  {
    string s (programArgs. front ());
    programName = rfindSplit (s, fileSlash);
    execDir = getDirName (path2canonical (execDir + programName));
  }

  string execDir_ (execDir);
  trimSuffix (execDir_, "/");				
  for (Key& key : keyArgs)
    if (! key. flag)
      replaceStr (key. defaultValue, "$BASE", execDir_);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
callq 0xa070
movl $0x0, (%rax)
movq 0x568f0(%rip), %rax     # 0xb0a80
cmpq 0x568f1(%rip), %rax     # 0xb0a88
je 0x5a4a6
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x659da
leaq 0xb0(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0xa6e0
movq (%r15), %rdi
leaq 0x18(%rsp), %r12
cmpq %r12, %rdi
je 0x5a1d9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
cmpq $0x0, 0xb8(%rbx)
jne 0x5a217
movq 0x56896(%rip), %rsi     # 0xb0a80
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x40187
movq %r14, %rdi
movq %r15, %rsi
callq 0xa6e0
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x5a217
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
leaq 0x8(%rsp), %rsi
movq %r12, (%rsi)
movw $0x2f, 0x10(%rsi)
movq $0x1, 0x8(%rsi)
movq %r14, %rdi
callq 0x37087
movl %eax, %ebp
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5a24e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
testb %bpl, %bpl
je 0x5a538
movq 0x56822(%rip), %rax     # 0xb0a80
leaq 0x8(%rsp), %r15
movq %r12, (%r15)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x2c212
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movl $0x2f, %edx
callq 0x39272
leaq 0x56807(%rip), %rdi     # 0xb0a98
leaq 0x28(%rsp), %r15
movq %r15, %rsi
callq 0xa6e0
movq (%r15), %rdi
leaq 0x38(%rsp), %rbp
cmpq %rbp, %rdi
je 0x5a2b8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
leaq 0x567d9(%rip), %rdx     # 0xb0a98
leaq 0x68(%rsp), %rdi
movq %r14, %rsi
callq 0x2ead3
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2dba0
leaq 0x48(%rsp), %rdi
movl $0x2f, %esi
movq $-0x1, %rdx
callq 0xab00
cmpq $-0x1, %rax
je 0x5a310
incq %rax
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0xa5d0
jmp 0x5a32e
leaq 0x28(%rsp), %rdi
movq %rbp, (%rdi)
movq 0x567b9(%rip), %rsi     # 0xb0ad8
movq 0x567ba(%rip), %rdx     # 0xb0ae0
addq %rsi, %rdx
callq 0x2c212
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xa6e0
movq (%r15), %rdi
cmpq %rbp, %rdi
je 0x5a353
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a36e
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a389
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5a3a0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
leaq 0x8(%rsp), %rdi
movq %r12, (%rdi)
movq 0xb0(%rbx), %rsi
movq 0xb8(%rbx), %rdx
addq %rsi, %rdx
callq 0x2c212
leaq 0x28(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x32f03(%rip), %rsi     # 0x8d2d0
leaq 0x32efd(%rip), %rdx     # 0x8d2d1
callq 0x2fa1a
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x3719e
movq 0x28(%rsp), %rdi
movq %rbp, %r13
cmpq %rbp, %rdi
je 0x5a402
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0xe8(%rbx), %rbp
addq $0xe8, %rbx
cmpq %rbx, %rbp
je 0x5a478
leaq 0x3437a(%rip), %r15     # 0x8e796
leaq 0x28(%rsp), %r12
leaq 0x8(%rsp), %r14
cmpb $0x0, 0x80(%rbp)
jne 0x5a46f
movq %r13, 0x28(%rsp)
movq %r12, %rdi
leaq 0x34353(%rip), %rsi     # 0x8e791
movq %r15, %rdx
callq 0x2fa1a
leaq 0xd0(%rbp), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x37474
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x5a46f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq (%rbp), %rbp
cmpq %rbx, %rbp
jne 0x5a426
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5a494
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa6b0
testl %eax, %eax
jne 0x5a56a
leaq 0xd8(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x32470(%rip), %rsi     # 0x8c936
leaq 0x3247c(%rip), %rdx     # 0x8c949
leaq 0xc8(%rsp), %rdi
callq 0x2fa1a
leaq 0xe8(%rsp), %rdi
movl $0xf28, %esi            # imm = 0xF28
callq 0x2d1fa
leaq 0x68(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
callq 0x2d152
leaq 0x306d8(%rip), %rsi     # 0x8abe5
leaq 0x68(%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 0x5a574
movups (%rcx), %xmm0
movups %xmm0, (%r15)
jmp 0x5a581
movl $0x10, %edi
callq 0xa2c0
movq %rax, %r14
leaq 0x34215(%rip), %rsi     # 0x8e761
movq %rax, %rdi
callq 0xa7f0
movq 0x55a65(%rip), %rsi     # 0xaffc0
movq 0x55a26(%rip), %rdx     # 0xaff88
movq %r14, %rdi
callq 0xa9b0
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 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x34165(%rip), %rsi     # 0x8e712
leaq 0x34194(%rip), %rdx     # 0x8e748
leaq 0xa8(%rsp), %rdi
callq 0x2fa1a
leaq 0x3236b(%rip), %rsi     # 0x8c933
leaq 0xa8(%rsp), %rdi
callq 0xaac0
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x5a5fa
movups (%rcx), %xmm0
movups %xmm0, (%r13)
jmp 0x5a60d
movq %rdx, 0x88(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x98(%rsp)
movq 0x8(%rax), %rsi
leaq 0x88(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2d152
leaq 0x34107(%rip), %rsi     # 0x8e749
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 0x5a66d
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x5a67a
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 0x34fa2
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x5a6ba
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x5a6ba
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a6da
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x5a6da
movq %rax, %rbx
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x5a6fc
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x5a6fc
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x5a71e
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x5a71e
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x5a73a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x5a73a
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a75a
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x5a75a
movq %rax, %rbx
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a780
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x5a780
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r14, %rdi
je 0x5a855
movq 0xd8(%rsp), %rsi
jmp 0x5a84d
movq %rax, %rbx
jmp 0x5a855
movq %rax, %rbx
movq %r14, %rdi
callq 0xa440
jmp 0x5a855
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
jne 0x5a82c
jmp 0x5a839
jmp 0x5a81a
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a7ea
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x5a7ea
movq %rax, %rbx
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5a80e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x5a80e
jmp 0x5a80b
jmp 0x5a80b
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
jne 0x5a848
jmp 0x5a855
movq %rax, %rbx
jmp 0x5a839
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x5a839
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5a855
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
movq %rbx, %rdi
callq 0xaa10
nop