// File: /workspace/github_cpp_makefile_star2_O1/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 0x3c7f2
movq %rax, %r14
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
movl $0x2f, %edx
callq 0x39fe8
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6692a
movq %r15, %rdi
callq 0x2fd92
movq (%rbx), %r15
cmpq %rbx, %r15
je 0x3c689
movq %r15, %rsi
cmpq $0x0, 0x18(%r15)
movq (%r15), %r15
jne 0x3c668
cmpq (%rbx), %rsi
je 0x3c668
movq %rbx, %rdi
callq 0x67470
jmp 0x3c668
movq (%rbx), %r12
cmpq %rbx, %r12
je 0x3c6c0
leaq 0x4db78(%rip), %r15     # 0x8a210
leaq 0x10(%r12), %rdi
movq %r15, %rsi
callq 0xa160
movq (%r12), %r13
testl %eax, %eax
jne 0x3c6b8
movq %rbx, %rdi
movq %r12, %rsi
callq 0x67470
movq %r13, %r12
cmpq %rbx, %r13
jne 0x3c698
movq (%rbx), %r13
cmpq %rbx, %r13
je 0x3c73f
leaq 0x4f870(%rip), %r15     # 0x8bf3f
leaq 0x10(%r13), %rdi
movq %r15, %rsi
callq 0xa160
movq (%r13), %r12
testl %eax, %eax
jne 0x3c737
cmpq (%rbx), %r13
je 0x3c737
movq %rbx, %rdi
movq %r13, %rsi
callq 0x67470
movq 0x8(%r12), %r12
movq 0x18(%r12), %rdx
testq %rdx, %rdx
je 0x3c716
movq (%r12), %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0x67470
movq %r13, %r12
jmp 0x3c737
movl $0x0, (%r14)
cmpq (%rbx), %r12
jne 0x3c751
leaq 0x10(%r12), %rdi
movl $0x2, %r8d
xorl %esi, %esi
movq %r15, %rcx
callq 0xa8c0
movq %r12, %r13
cmpq %rbx, %r12
jne 0x3c6cf
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0xa6b0
testl %eax, %eax
jne 0x3c893
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x501c5(%rip), %rsi     # 0x8c936
leaq 0x501d1(%rip), %rdx     # 0x8c949
leaq 0x88(%rsp), %rdi
callq 0x2fdd8
leaq 0xa8(%rsp), %rdi
movl $0x595, %esi            # imm = 0x595
callq 0x2d60a
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x2d562
leaq 0x4e42a(%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 0x3c89d
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x3c8aa
callq 0xa6b0
testl %eax, %eax
jne 0x3c893
leaq 0x98(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x50124(%rip), %rsi     # 0x8c936
leaq 0x50130(%rip), %rdx     # 0x8c949
leaq 0x88(%rsp), %rdi
callq 0x2fdd8
leaq 0xa8(%rsp), %rdi
movl $0x575, %esi            # imm = 0x575
callq 0x2d60a
leaq 0xc8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
callq 0x2d562
leaq 0x4e389(%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 0x3c91c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
jmp 0x3c929
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 0x505c3(%rip), %rsi     # 0x8ce95
leaq 0x505df(%rip), %rdx     # 0x8ceb8
leaq 0x68(%rsp), %rdi
callq 0x2fdd8
leaq 0x50049(%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 0x3c99b
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x3c9a8
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 0x50544(%rip), %rsi     # 0x8ce95
leaq 0x50560(%rip), %rdx     # 0x8ceb8
leaq 0x68(%rsp), %rdi
callq 0x2fdd8
leaq 0x4ffca(%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 0x3ca16
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
jmp 0x3ca23
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 0x2d562
leaq 0x504f0(%rip), %rsi     # 0x8cecd
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 0x3ca8a
movups (%rcx), %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x3ca97
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 0x2d562
leaq 0x50461(%rip), %rsi     # 0x8ceb9
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 0x3cab8
movups (%rcx), %xmm0
leaq 0x18(%rsp), %rdx
movups %xmm0, (%rdx)
jmp 0x3cac5
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 %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
jmp 0x3caec
jmp 0x3cb0d
jmp 0x3cb35
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3cb10
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3cb10
movq %rax, %r14
leaq 0xf8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cb38
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3cb38
jmp 0x3cb53
movq %rax, %r14
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3cb56
movq 0x58(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3cb56
jmp 0x3cb71
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x3cb74
movq 0x78(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3cb74
jmp 0x3cb8f
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x3cb92
movq 0x38(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3cb92
jmp 0x3cbb7
movq %rax, %r14
leaq 0xd8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cbba
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3cbba
jmp 0x3cbdf
movq %rax, %r14
leaq 0xb8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3cbe2
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3cbe2
jmp 0x3cc05
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %r15, %rdi
je 0x3cc08
movq 0x98(%rsp), %rsi
incq %rsi
callq 0xa5a0
jmp 0x3cc08
jmp 0x3cc05
jmp 0x3cc05
movq %rax, %r14
movq %rbx, %rdi
callq 0x2fd92
movq %r14, %rdi
callq 0xaa10