// File: /workspace/github_cpp_makefile_star2_O3/ncbi[P]amr/common.cpp
// Function: Common_sp::Dir::Dir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Dir::Dir (const string &dirName)
{
  ASSERT (! dirName. empty ());
  
  items = str2list (dirName, fileSlash);

  auto it = items. begin (); 
  while (it != items. end ())
    if (it->empty () && it != items. begin ())
    {
      auto it1 = items. erase (it);
      it = it1;
    }
    else 
      it++;
      
  it = items. begin (); 
  while (it != items. end ())
    if (*it == ".")
    {
      auto it1 = items. erase (it);
      it = it1;
    }
    else 
      it++;
      
  it = items. begin (); 
  while (it != items. end ())
    if (*it == ".." && it != items. begin ())
    {
      auto it1 = items. erase (it);
      it1--;
      if (it1->empty ())
      {
        ASSERT (it1 == items. begin ());
        *it1 = "..";
        it = it1;
      }
      else
      {
        auto it2 = items. erase (it1);
        it = it2;
      }
    }
    else
      it++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r15
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0xa070
movl $0x0, (%rax)
cmpq $0x0, 0x8(%r15)
je 0x3c347
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl $0x2f, %edx
callq 0x39af4
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x664d6
movq %r15, %rdi
callq 0x2f9d4
movq (%rbx), %r15
cmpq %rbx, %r15
je 0x3c1e7
movq %r15, %rsi
cmpq $0x0, 0x18(%r15)
movq (%r15), %r15
jne 0x3c1df
cmpq (%rbx), %rsi
je 0x3c1df
movq %rbx, %rdi
callq 0x67018
cmpq %rbx, %r15
jne 0x3c1c5
movq (%rbx), %r15
cmpq %rbx, %r15
je 0x3c21c
leaq 0x4e01d(%rip), %r12     # 0x8a210
leaq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xa160
movq (%r15), %r13
testl %eax, %eax
jne 0x3c211
movq %rbx, %rdi
movq %r15, %rsi
callq 0x67018
movq %r13, %r15
cmpq %rbx, %r13
jne 0x3c1f3
movq (%rbx), %r15
cmpq %rbx, %r15
je 0x3c294
leaq 0x4fd17(%rip), %r12     # 0x8bf3f
leaq 0x10(%r15), %rdi
movq %r12, %rsi
callq 0xa160
movq (%r15), %r13
testl %eax, %eax
jne 0x3c28c
cmpq (%rbx), %r15
je 0x3c28c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x67018
movq 0x8(%r13), %r13
cmpq $0x0, 0x18(%r13)
je 0x3c26a
movq (%r13), %r15
movq %rbx, %rdi
movq %r13, %rsi
callq 0x67018
movq %r15, %r13
jmp 0x3c28c
movl $0x0, (%r14)
cmpq (%rbx), %r13
jne 0x3c2a6
leaq 0x10(%r13), %rdi
movl $0x2, %r8d
xorl %esi, %esi
xorl %edx, %edx
movq %r12, %rcx
callq 0xa8c0
movq %r13, %r15
cmpq %rbx, %r13
jne 0x3c228
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa6b0
testl %eax, %eax
jne 0x3c3e8
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x50670(%rip), %rsi     # 0x8c936
leaq 0x5067c(%rip), %rdx     # 0x8c949
leaq 0x88(%rsp), %rdi
callq 0x2fa1a
leaq 0xa8(%rsp), %rdi
movl $0x595, %esi            # imm = 0x595
callq 0x2d1fa
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x2d152
leaq 0x4e8d5(%rip), %rsi     # 0x8abe5
leaq 0xc8(%rsp), %rdi
callq 0xaac0
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3c3f2
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x3c3ff
callq 0xa6b0
testl %eax, %eax
jne 0x3c3e8
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x505cf(%rip), %rsi     # 0x8c936
leaq 0x505db(%rip), %rdx     # 0x8c949
leaq 0x88(%rsp), %rdi
callq 0x2fa1a
leaq 0xa8(%rsp), %rdi
movl $0x575, %esi            # imm = 0x575
callq 0x2d1fa
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x2d152
leaq 0x4e834(%rip), %rsi     # 0x8abe5
leaq 0xc8(%rsp), %rdi
callq 0xaac0
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3c471
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x3c47e
movl $0x1, %edi
callq 0xa6c0
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x50a58(%rip), %rsi     # 0x8ce7f
leaq 0x50a74(%rip), %rdx     # 0x8cea2
leaq 0x68(%rsp), %rdi
callq 0x2fa1a
leaq 0x504f4(%rip), %rsi     # 0x8c933
leaq 0x68(%rsp), %rdi
callq 0xaac0
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3c4f0
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x3c4fd
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x509d9(%rip), %rsi     # 0x8ce7f
leaq 0x509f5(%rip), %rdx     # 0x8cea2
leaq 0x68(%rsp), %rdi
callq 0x2fa1a
leaq 0x50475(%rip), %rsi     # 0x8c933
leaq 0x68(%rsp), %rdi
callq 0xaac0
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3c56b
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x3c578
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rsi
leaq 0x48(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2d152
leaq 0x50985(%rip), %rsi     # 0x8ceb7
leaq 0xe8(%rsp), %rdi
callq 0xaac0
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3c5df
movups (%rcx), %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x3c5ec
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
movq 0x8(%rax), %rsi
leaq 0x48(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xe8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2d152
leaq 0x508f6(%rip), %rsi     # 0x8cea3
leaq 0xe8(%rsp), %rdi
callq 0xaac0
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x3c60d
movups (%rcx), %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x3c61a
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 %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
jmp 0x3c641
jmp 0x3c662
jmp 0x3c68a
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3c665
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3c665
movq %rax, %r14
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c68d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3c68d
jmp 0x3c6a8
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3c6ab
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3c6ab
jmp 0x3c6c6
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x3c6c9
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3c6c9
jmp 0x3c6e4
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3c6e7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3c6e7
jmp 0x3c70c
movq %rax, %r14
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c70f
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3c70f
jmp 0x3c734
movq %rax, %r14
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c737
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3c737
jmp 0x3c75a
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x3c75d
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3c75d
jmp 0x3c75a
jmp 0x3c75a
movq %rax, %r14
movq %rbx, %rdi
callq 0x2f9d4
movq %r14, %rdi
callq 0xaa10
nop