// File: ncbi[P]amr/common.cpp
// Function: Common_sp::errorExit(char const*, bool)
[[noreturn]] void errorExit (const char* msg,
                             bool segmFault)
// alloc() may not work
{ 
	beep ();
	
	ostream* os = logPtr ? logPtr : & cerr; 
	
	// time ??
#ifndef _MSC_VER
	const string hostname (getEnv ("HOSTNAME"));
	const string shell    (getEnv ("SHELL"));	
	const string pwd      (getEnv ("PWD"));
	const string path     (getEnv ("PATH"));
#endif
  if (contains (msg, error_caption))  // msg already is the result of errorExit()
    *os << endl << msg << endl;
  else
  {
  	*os << endl;
  	{
  	  const OColor oc (*os, Color::red, true, true);
      *os << error_caption;
    }
    *os << endl
        << msg << endl << endl
      #ifndef _MSC_VER
  	    << "HOSTNAME: " << nvl (hostname, "?") << endl
  	    << "SHELL: "    << nvl (shell,    "?") << endl
  	    << "PWD: "      << nvl (pwd,      "?") << endl
  	    << "PATH: "     << nvl (path,     "?") << endl
      #endif
  	    << "Progam name:  " << programName << endl
  	    << "Command line: " << getCommandLine () << endl;
  }
  //system (("env >> " + logFName). c_str ());

  os->flush ();           

  if (cxml)
    cxml->print (string (error_caption) + ": " + msg);

  if (segmFault)
    abort ();    
  exit (1);
}

// Assembly:
subq $0x488, %rsp            # imm = 0x488
movb %sil, %al
movq %rdi, 0x480(%rsp)
andb $0x1, %al
movb %al, 0x47f(%rsp)
callq 0x3e850
cmpq $0x0, 0xc9160(%rip)     # 0x106c78
je 0x3db2b
movq 0xc9157(%rip), %rax     # 0x106c78
movq %rax, 0x130(%rsp)
jmp 0x3db3c
movq 0xc84b6(%rip), %rax     # 0x105fe8
movq %rax, 0x130(%rsp)
jmp 0x3db3c
movq 0x130(%rsp), %rax
movq %rax, 0x470(%rsp)
leaq 0x42f(%rsp), %rdi
movq %rdi, 0x128(%rsp)
callq 0xcd00
movq 0x128(%rsp), %rdx
leaq 0x8fe48(%rip), %rsi     # 0xcd9b8
leaq 0x430(%rsp), %rdi
callq 0x29fd0
jmp 0x3db7f
leaq 0x450(%rsp), %rdi
leaq 0x430(%rsp), %rsi
callq 0x73260
jmp 0x3db96
leaq 0x430(%rsp), %rdi
callq 0xce98
leaq 0x42f(%rsp), %rdi
callq 0xc7a0
leaq 0x3d7(%rsp), %rdi
movq %rdi, 0x120(%rsp)
callq 0xcd00
movq 0x120(%rsp), %rdx
leaq 0x8fded(%rip), %rsi     # 0xcd9c1
leaq 0x3d8(%rsp), %rdi
callq 0x29fd0
jmp 0x3dbe3
leaq 0x3f8(%rsp), %rdi
leaq 0x3d8(%rsp), %rsi
callq 0x73260
jmp 0x3dbfa
leaq 0x3d8(%rsp), %rdi
callq 0xce98
leaq 0x3d7(%rsp), %rdi
callq 0xc7a0
leaq 0x38f(%rsp), %rdi
movq %rdi, 0x118(%rsp)
callq 0xcd00
movq 0x118(%rsp), %rdx
leaq 0x8fd8f(%rip), %rsi     # 0xcd9c7
leaq 0x390(%rsp), %rdi
callq 0x29fd0
jmp 0x3dc47
leaq 0x3b0(%rsp), %rdi
leaq 0x390(%rsp), %rsi
callq 0x73260
jmp 0x3dc5e
leaq 0x390(%rsp), %rdi
callq 0xce98
leaq 0x38f(%rsp), %rdi
callq 0xc7a0
leaq 0x347(%rsp), %rdi
movq %rdi, 0x110(%rsp)
callq 0xcd00
movq 0x110(%rsp), %rdx
leaq 0x8fd2f(%rip), %rsi     # 0xcd9cb
leaq 0x348(%rsp), %rdi
callq 0x29fd0
jmp 0x3dcab
leaq 0x368(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x73260
jmp 0x3dcc2
leaq 0x348(%rsp), %rdi
callq 0xce98
leaq 0x347(%rsp), %rdi
callq 0xc7a0
movq 0x480(%rsp), %rax
movq %rax, 0x100(%rsp)
leaq 0x31f(%rsp), %rdi
movq %rdi, 0x108(%rsp)
callq 0xcd00
movq 0x100(%rsp), %rsi
movq 0x108(%rsp), %rdx
leaq 0x320(%rsp), %rdi
callq 0x29fd0
jmp 0x3dd20
leaq 0x2f7(%rsp), %rdi
movq %rdi, 0xf8(%rsp)
callq 0xcd00
movq 0xf8(%rsp), %rdx
leaq 0x8ea60(%rip), %rsi     # 0xcc7a4
leaq 0x2f8(%rsp), %rdi
callq 0x29fd0
jmp 0x3dd53
leaq 0x320(%rsp), %rdi
leaq 0x2f8(%rsp), %rsi
callq 0x2f5d0
movb %al, 0xf7(%rsp)
jmp 0x3dd71
leaq 0x2f8(%rsp), %rdi
callq 0xce98
leaq 0x2f7(%rsp), %rdi
callq 0xc7a0
leaq 0x320(%rsp), %rdi
callq 0xce98
leaq 0x31f(%rsp), %rdi
callq 0xc7a0
movb 0xf7(%rsp), %al
testb $0x1, %al
jne 0x3ddb5
jmp 0x3dfc3
movq 0x470(%rsp), %rdi
movq 0xc817c(%rip), %rsi     # 0x105f40
callq 0xc760
movq %rax, 0xe8(%rsp)
jmp 0x3ddd3
movq 0xe8(%rsp), %rdi
movq 0x480(%rsp), %rsi
callq 0xc6f0
movq %rax, 0xe0(%rsp)
jmp 0x3ddf2
movq 0xe0(%rsp), %rdi
movq 0xc813f(%rip), %rsi     # 0x105f40
callq 0xc760
jmp 0x3de08
jmp 0x3e675
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3de44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x430(%rsp), %rdi
callq 0xce98
leaq 0x42f(%rsp), %rdi
callq 0xc7a0
jmp 0x3e83a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3de8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x3d8(%rsp), %rdi
callq 0xce98
leaq 0x3d7(%rsp), %rdi
callq 0xc7a0
jmp 0x3e82d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3ded6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x390(%rsp), %rdi
callq 0xce98
leaq 0x38f(%rsp), %rdi
callq 0xc7a0
jmp 0x3e820
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3df1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x348(%rsp), %rdi
callq 0xce98
leaq 0x347(%rsp), %rdi
callq 0xc7a0
jmp 0x3e813
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3df98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3df7e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x2f8(%rsp), %rdi
callq 0xce98
leaq 0x2f7(%rsp), %rdi
callq 0xc7a0
leaq 0x320(%rsp), %rdi
callq 0xce98
leaq 0x31f(%rsp), %rdi
callq 0xc7a0
jmp 0x3e806
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e806
movq 0x470(%rsp), %rdi
movq 0xc7f6e(%rip), %rsi     # 0x105f40
callq 0xc760
jmp 0x3dfd9
movq 0x470(%rsp), %rsi
leaq 0x2e0(%rsp), %rdi
movl $0x1f, %edx
movl $0x1, %r8d
movl %r8d, %ecx
callq 0x30fc0
jmp 0x3dffe
movq 0x470(%rsp), %rdi
leaq 0x8e797(%rip), %rsi     # 0xcc7a4
callq 0xc6f0
jmp 0x3e014
leaq 0x2e0(%rsp), %rdi
callq 0x310f0
movq 0x470(%rsp), %rdi
movq 0xc7f10(%rip), %rsi     # 0x105f40
callq 0xc760
movq %rax, 0xd8(%rsp)
jmp 0x3e03f
movq 0xd8(%rsp), %rdi
movq 0x480(%rsp), %rsi
callq 0xc6f0
movq %rax, 0xd0(%rsp)
jmp 0x3e05e
movq 0xd0(%rsp), %rdi
movq 0xc7ed3(%rip), %rsi     # 0x105f40
callq 0xc760
movq %rax, 0xc8(%rsp)
jmp 0x3e07c
movq 0xc8(%rsp), %rdi
movq 0xc7eb5(%rip), %rsi     # 0x105f40
callq 0xc760
movq %rax, 0xc0(%rsp)
jmp 0x3e09a
movq 0xc0(%rsp), %rdi
leaq 0x8f927(%rip), %rsi     # 0xcd9d0
callq 0xc6f0
movq %rax, 0xb8(%rsp)
jmp 0x3e0b8
leaq 0x29f(%rsp), %rdi
movq %rdi, 0xb0(%rsp)
callq 0xcd00
movq 0xb0(%rsp), %rdx
leaq 0x8f8ff(%rip), %rsi     # 0xcd9db
leaq 0x2a0(%rsp), %rdi
callq 0x29fd0
jmp 0x3e0eb
leaq 0x2c0(%rsp), %rdi
leaq 0x450(%rsp), %rsi
leaq 0x2a0(%rsp), %rdx
callq 0x323b0
jmp 0x3e10a
movq 0xb8(%rsp), %rdi
leaq 0x2c0(%rsp), %rsi
callq 0xc660
movq %rax, 0xa8(%rsp)
jmp 0x3e129
movq 0xa8(%rsp), %rdi
movq 0xc7e08(%rip), %rsi     # 0x105f40
callq 0xc760
movq %rax, 0xa0(%rsp)
jmp 0x3e147
movq 0xa0(%rsp), %rdi
leaq 0x8f887(%rip), %rsi     # 0xcd9dd
callq 0xc6f0
movq %rax, 0x98(%rsp)
jmp 0x3e165
leaq 0x257(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0xcd00
movq 0x90(%rsp), %rdx
leaq 0x8f852(%rip), %rsi     # 0xcd9db
leaq 0x258(%rsp), %rdi
callq 0x29fd0
jmp 0x3e198
leaq 0x278(%rsp), %rdi
leaq 0x3f8(%rsp), %rsi
leaq 0x258(%rsp), %rdx
callq 0x323b0
jmp 0x3e1b7
movq 0x98(%rsp), %rdi
leaq 0x278(%rsp), %rsi
callq 0xc660
movq %rax, 0x88(%rsp)
jmp 0x3e1d6
movq 0x88(%rsp), %rdi
movq 0xc7d5b(%rip), %rsi     # 0x105f40
callq 0xc760
movq %rax, 0x80(%rsp)
jmp 0x3e1f4
movq 0x80(%rsp), %rdi
leaq 0x8f7e2(%rip), %rsi     # 0xcd9e5
callq 0xc6f0
movq %rax, 0x78(%rsp)
jmp 0x3e20f
leaq 0x20f(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0xcd00
movq 0x70(%rsp), %rdx
leaq 0x8f7ae(%rip), %rsi     # 0xcd9db
leaq 0x210(%rsp), %rdi
callq 0x29fd0
jmp 0x3e23c
leaq 0x230(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
leaq 0x210(%rsp), %rdx
callq 0x323b0
jmp 0x3e25b
movq 0x78(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0xc660
movq %rax, 0x68(%rsp)
jmp 0x3e274
movq 0x68(%rsp), %rdi
movq 0xc7cc0(%rip), %rsi     # 0x105f40
callq 0xc760
movq %rax, 0x60(%rsp)
jmp 0x3e28c
movq 0x60(%rsp), %rdi
leaq 0x8f753(%rip), %rsi     # 0xcd9eb
callq 0xc6f0
movq %rax, 0x58(%rsp)
jmp 0x3e2a4
leaq 0x1c7(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0xcd00
movq 0x50(%rsp), %rdx
leaq 0x8f719(%rip), %rsi     # 0xcd9db
leaq 0x1c8(%rsp), %rdi
callq 0x29fd0
jmp 0x3e2d1
leaq 0x1e8(%rsp), %rdi
leaq 0x368(%rsp), %rsi
leaq 0x1c8(%rsp), %rdx
callq 0x323b0
jmp 0x3e2f0
movq 0x58(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0xc660
movq %rax, 0x48(%rsp)
jmp 0x3e309
movq 0x48(%rsp), %rdi
movq 0xc7c2b(%rip), %rsi     # 0x105f40
callq 0xc760
movq %rax, 0x40(%rsp)
jmp 0x3e321
movq 0x40(%rsp), %rdi
leaq 0x8f6c5(%rip), %rsi     # 0xcd9f2
callq 0xc6f0
movq %rax, 0x38(%rsp)
jmp 0x3e339
movq 0x38(%rsp), %rdi
leaq 0xc8913(%rip), %rsi     # 0x106c58
callq 0xc660
movq %rax, 0x30(%rsp)
jmp 0x3e351
movq 0x30(%rsp), %rdi
movq 0xc7be3(%rip), %rsi     # 0x105f40
callq 0xc760
movq %rax, 0x28(%rsp)
jmp 0x3e369
movq 0x28(%rsp), %rdi
leaq 0x8f68c(%rip), %rsi     # 0xcda01
callq 0xc6f0
movq %rax, 0x20(%rsp)
jmp 0x3e381
leaq 0x1a0(%rsp), %rdi
callq 0x3ccf0
jmp 0x3e390
movq 0x20(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0xc660
movq %rax, 0x18(%rsp)
jmp 0x3e3a9
movq 0x18(%rsp), %rdi
movq 0xc7b8b(%rip), %rsi     # 0x105f40
callq 0xc760
jmp 0x3e3bc
leaq 0x1a0(%rsp), %rdi
callq 0xce98
leaq 0x1e8(%rsp), %rdi
callq 0xce98
leaq 0x1c8(%rsp), %rdi
callq 0xce98
leaq 0x1c7(%rsp), %rdi
callq 0xc7a0
leaq 0x230(%rsp), %rdi
callq 0xce98
leaq 0x210(%rsp), %rdi
callq 0xce98
leaq 0x20f(%rsp), %rdi
callq 0xc7a0
leaq 0x278(%rsp), %rdi
callq 0xce98
leaq 0x258(%rsp), %rdi
callq 0xce98
leaq 0x257(%rsp), %rdi
callq 0xc7a0
leaq 0x2c0(%rsp), %rdi
callq 0xce98
leaq 0x2a0(%rsp), %rdi
callq 0xce98
leaq 0x29f(%rsp), %rdi
callq 0xc7a0
jmp 0x3e675
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x2e0(%rsp), %rdi
callq 0x310f0
jmp 0x3e806
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e663
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e656
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e649
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e63c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e62f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e622
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e615
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e608
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e5fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e5ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e5e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e5d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0xce98
leaq 0x1e8(%rsp), %rdi
callq 0xce98
leaq 0x1c8(%rsp), %rdi
callq 0xce98
leaq 0x1c7(%rsp), %rdi
callq 0xc7a0
leaq 0x230(%rsp), %rdi
callq 0xce98
leaq 0x210(%rsp), %rdi
callq 0xce98
leaq 0x20f(%rsp), %rdi
callq 0xc7a0
leaq 0x278(%rsp), %rdi
callq 0xce98
leaq 0x258(%rsp), %rdi
callq 0xce98
leaq 0x257(%rsp), %rdi
callq 0xc7a0
leaq 0x2c0(%rsp), %rdi
callq 0xce98
leaq 0x2a0(%rsp), %rdi
callq 0xce98
leaq 0x29f(%rsp), %rdi
callq 0xc7a0
jmp 0x3e806
movq 0x470(%rsp), %rdi
callq 0xc500
jmp 0x3e684
leaq 0xc8645(%rip), %rdi     # 0x106cd0
callq 0x73320
testb $0x1, %al
jne 0x3e699
jmp 0x3e7ed
leaq 0xc8630(%rip), %rdi     # 0x106cd0
callq 0x73340
movq %rax, 0x8(%rsp)
leaq 0x13f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xcd00
movq 0x10(%rsp), %rdx
leaq 0x8e0dc(%rip), %rsi     # 0xcc7a4
leaq 0x140(%rsp), %rdi
callq 0x29fd0
jmp 0x3e6d7
leaq 0x8f30a(%rip), %rdx     # 0xcd9e8
leaq 0x160(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x2a2f0
jmp 0x3e6f5
movq 0x480(%rsp), %rdx
leaq 0x180(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x2a2f0
jmp 0x3e714
movq 0x8(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x73350
jmp 0x3e728
leaq 0x180(%rsp), %rdi
callq 0xce98
leaq 0x160(%rsp), %rdi
callq 0xce98
leaq 0x140(%rsp), %rdi
callq 0xce98
leaq 0x13f(%rsp), %rdi
callq 0xc7a0
jmp 0x3e7ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e7de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e7d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
jmp 0x3e7c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x420(%rsp)
movl %eax, 0x41c(%rsp)
leaq 0x180(%rsp), %rdi
callq 0xce98
leaq 0x160(%rsp), %rdi
callq 0xce98
leaq 0x140(%rsp), %rdi
callq 0xce98
leaq 0x13f(%rsp), %rdi
callq 0xc7a0
jmp 0x3e806
testb $0x1, 0x47f(%rsp)
je 0x3e7fc
callq 0xc420
movl $0x1, %edi
callq 0xc8d0
leaq 0x368(%rsp), %rdi
callq 0xce98
leaq 0x3b0(%rsp), %rdi
callq 0xce98
leaq 0x3f8(%rsp), %rdi
callq 0xce98
leaq 0x450(%rsp), %rdi
callq 0xce98
movq 0x420(%rsp), %rdi
callq 0xccf0
nopw (%rax,%rax)