// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r15
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
andq $0x0, 0x10(%rdi)
callq 0xb060
andl $0x0, (%rax)
cmpq $0x0, 0x8(%r15)
je 0x26533
movq %rax, %r14
leaq 0x8(%rsp), %rdi
pushq $0x2f
popq %rdx
movq %r15, %rsi
callq 0x24e10
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3db5c
movq %r15, %rdi
callq 0x1e654
movq (%rbx), %rax
cmpq %rbx, %rax
je 0x263b0
cmpq $0x0, 0x18(%rax)
jne 0x263ab
cmpq (%rbx), %rax
je 0x263ab
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3c474
jmp 0x2638d
movq (%rax), %rax
jmp 0x2638d
movq (%rbx), %r12
leaq 0x32e59(%rip), %r15     # 0x59213
cmpq %rbx, %r12
je 0x263e6
leaq 0x10(%r12), %rdi
movq %r15, %rsi
callq 0x1cba2
testb %al, %al
je 0x263e0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3c474
movq %rax, %r12
jmp 0x263ba
movq (%r12), %r12
jmp 0x263ba
movq (%rbx), %r12
leaq 0x34b4d(%rip), %r15     # 0x5af3d
cmpq %rbx, %r12
je 0x26450
leaq 0x10(%r12), %rdi
movq %r15, %rsi
callq 0x1cba2
testb %al, %al
je 0x26432
cmpq (%rbx), %r12
je 0x26432
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3c474
movq 0x8(%rax), %r12
cmpq $0x0, 0x18(%r12)
je 0x26438
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3c474
movq %rax, %r12
jmp 0x263f0
movq (%r12), %r12
jmp 0x263f0
andl $0x0, (%r14)
cmpq (%rbx), %r12
jne 0x2645f
leaq 0x10(%r12), %rdi
movq %r15, %rsi
callq 0xbad0
jmp 0x263f0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0xb6c0
testl %eax, %eax
jne 0x26607
leaq 0x354ce(%rip), %rsi     # 0x5b941
leaq 0x88(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1b7b6
leaq 0x68(%rsp), %rdi
movl $0x595, %esi            # imm = 0x595
callq 0x1caa3
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x1ca3c
leaq 0x3372e(%rip), %rdx     # 0x59be3
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x1b92d
leaq 0x359b9(%rip), %rsi     # 0x5be8a
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1b7b6
leaq 0x35457(%rip), %rdx     # 0x5b93e
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1b92d
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x1ca3c
leaq 0x359ab(%rip), %rdx     # 0x5bec2
leaq 0x8(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1b92d
leaq 0x8(%rsp), %rdi
callq 0x224fc
callq 0xb6c0
testl %eax, %eax
jne 0x26607
leaq 0x353fa(%rip), %rsi     # 0x5b941
leaq 0x88(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1b7b6
leaq 0x68(%rsp), %rdi
movl $0x575, %esi            # imm = 0x575
callq 0x1caa3
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x1ca3c
leaq 0x3365a(%rip), %rdx     # 0x59be3
leaq 0xc8(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0x1b92d
leaq 0x358e5(%rip), %rsi     # 0x5be8a
leaq 0x28(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1b7b6
leaq 0x35383(%rip), %rdx     # 0x5b93e
leaq 0x48(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1b92d
leaq 0xe8(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x1ca3c
leaq 0x358c3(%rip), %rdx     # 0x5beae
leaq 0x8(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x1b92d
leaq 0x8(%rsp), %rdi
callq 0x224fc
pushq $0x1
popq %rdi
callq 0xb6d0
jmp 0x26617
jmp 0x26626
jmp 0x2663a
jmp 0x2664b
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0xbb68
jmp 0x26629
movq %rax, %r14
leaq 0xe8(%rsp), %rdi
callq 0xbb68
jmp 0x2663d
jmp 0x2665c
movq %rax, %r14
leaq 0x48(%rsp), %rdi
callq 0xbb68
jmp 0x2664e
jmp 0x26670
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0xbb68
jmp 0x2665f
jmp 0x26684
movq %rax, %r14
leaq 0xc8(%rsp), %rdi
callq 0xbb68
jmp 0x26673
jmp 0x26693
movq %rax, %r14
leaq 0xa8(%rsp), %rdi
callq 0xbb68
jmp 0x26687
jmp 0x266a9
movq %rax, %r14
leaq 0x68(%rsp), %rdi
callq 0xbb68
jmp 0x26696
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0xbb68
jmp 0x266ac
jmp 0x266a9
jmp 0x266a9
movq %rax, %r14
movq %rbx, %rdi
callq 0x1e654
movq %r14, %rdi
callq 0xba30