// File: 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:
subq $0x338, %rsp            # imm = 0x338
movq %rdi, 0x330(%rsp)
movq %rsi, 0x328(%rsp)
movq 0x330(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x73c60
callq 0xc090
movl $0x0, (%rax)
movq 0x328(%rsp), %rdi
callq 0xcc10
testb $0x1, %al
jne 0x46b4a
jmp 0x46dd1
callq 0xc8c0
cmpl $0x0, %eax
jne 0x46dc7
leaq 0x287(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xcd00
movq 0x28(%rsp), %rdx
leaq 0x86ea3(%rip), %rsi     # 0xcda19
leaq 0x288(%rsp), %rdi
callq 0x29fd0
jmp 0x46b85
leaq 0x250(%rsp), %rdi
movl $0x575, %esi            # imm = 0x575
callq 0x2ded0
jmp 0x46b99
leaq 0x2a8(%rsp), %rdi
leaq 0x288(%rsp), %rsi
leaq 0x250(%rsp), %rdx
callq 0x2dde0
jmp 0x46bb8
leaq 0x84fe2(%rip), %rdx     # 0xcbba1
leaq 0x2c8(%rsp), %rdi
leaq 0x2a8(%rsp), %rsi
callq 0x2a2f0
jmp 0x46bd6
leaq 0x20f(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xcd00
movq 0x20(%rsp), %rdx
leaq 0x873b9(%rip), %rsi     # 0xcdfad
leaq 0x210(%rsp), %rdi
callq 0x29fd0
jmp 0x46c03
leaq 0x86e0c(%rip), %rdx     # 0xcda16
leaq 0x230(%rsp), %rdi
leaq 0x210(%rsp), %rsi
callq 0x2a2f0
jmp 0x46c21
leaq 0x2e8(%rsp), %rdi
leaq 0x2c8(%rsp), %rsi
leaq 0x230(%rsp), %rdx
callq 0x2dde0
jmp 0x46c40
leaq 0x8738a(%rip), %rdx     # 0xcdfd1
leaq 0x308(%rsp), %rdi
leaq 0x2e8(%rsp), %rsi
callq 0x2a2f0
jmp 0x46c5e
leaq 0x308(%rsp), %rdi
callq 0x3e9b0
jmp 0x46c6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x46db5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x46da8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x46d9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x46d8e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x46d74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x46d67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x46d5a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x46d4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
leaq 0x308(%rsp), %rdi
callq 0xce98
leaq 0x2e8(%rsp), %rdi
callq 0xce98
leaq 0x230(%rsp), %rdi
callq 0xce98
leaq 0x210(%rsp), %rdi
callq 0xce98
leaq 0x20f(%rsp), %rdi
callq 0xc7a0
leaq 0x2c8(%rsp), %rdi
callq 0xce98
leaq 0x2a8(%rsp), %rdi
callq 0xce98
leaq 0x250(%rsp), %rdi
callq 0xce98
leaq 0x288(%rsp), %rdi
callq 0xce98
leaq 0x287(%rsp), %rdi
callq 0xc7a0
jmp 0x4744b
movl $0x1, %edi
callq 0xc8d0
movq 0x328(%rsp), %rsi
leaq 0x1f0(%rsp), %rdi
movl $0x2f, %edx
callq 0x43d10
jmp 0x46ded
movq 0x30(%rsp), %rdi
leaq 0x1f0(%rsp), %rsi
callq 0x73d60
leaq 0x1f0(%rsp), %rdi
callq 0x32410
movq 0x30(%rsp), %rdi
callq 0x73d90
movq %rax, 0x1e8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x73de0
movq %rax, 0x1e0(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x73dc0
testb $0x1, %al
jne 0x46e4e
jmp 0x46f1d
leaq 0x1e8(%rsp), %rdi
callq 0x73e10
movq %rax, %rdi
callq 0xcc10
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x1f(%rsp)
jne 0x46e72
jmp 0x46e9d
movq 0x30(%rsp), %rdi
callq 0x73d90
movq %rax, 0x1d8(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x1d8(%rsp), %rsi
callq 0x73dc0
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x46ea7
jmp 0x46f01
leaq 0x1c8(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x73e80
movq 0x30(%rsp), %rdi
movq 0x1c8(%rsp), %rsi
callq 0x73e30
movq %rax, 0x1d0(%rsp)
movq 0x1d0(%rsp), %rax
movq %rax, 0x1e8(%rsp)
jmp 0x46f18
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x4744b
leaq 0x1e8(%rsp), %rdi
xorl %esi, %esi
callq 0x73ea0
movq %rax, 0x1c0(%rsp)
jmp 0x46e1e
movq 0x30(%rsp), %rdi
callq 0x73d90
movq %rax, 0x1b8(%rsp)
movq 0x1b8(%rsp), %rax
movq %rax, 0x1e8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x73de0
movq %rax, 0x1b0(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x1b0(%rsp), %rsi
callq 0x73dc0
testb $0x1, %al
jne 0x46f6f
jmp 0x46ff8
leaq 0x1e8(%rsp), %rdi
callq 0x73ed0
movq %rax, %rdi
leaq 0x84275(%rip), %rsi     # 0xcb1fb
callq 0x2e1b0
movb %al, 0x1e(%rsp)
jmp 0x46f91
movb 0x1e(%rsp), %al
testb $0x1, %al
jne 0x46f9b
jmp 0x46fdc
leaq 0x1a0(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x73e80
movq 0x30(%rsp), %rdi
movq 0x1a0(%rsp), %rsi
callq 0x73e30
movq %rax, 0x1a8(%rsp)
movq 0x1a8(%rsp), %rax
movq %rax, 0x1e8(%rsp)
jmp 0x46ff3
leaq 0x1e8(%rsp), %rdi
xorl %esi, %esi
callq 0x73ea0
movq %rax, 0x198(%rsp)
jmp 0x46f3f
movq 0x30(%rsp), %rdi
callq 0x73d90
movq %rax, 0x190(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x1e8(%rsp)
movq 0x30(%rsp), %rdi
callq 0x73de0
movq %rax, 0x188(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x188(%rsp), %rsi
callq 0x73dc0
testb $0x1, %al
jne 0x4704a
jmp 0x47443
leaq 0x1e8(%rsp), %rdi
callq 0x73ed0
movq %rax, %rdi
leaq 0x85e9a(%rip), %rsi     # 0xccefb
callq 0x2e1b0
movb %al, 0x1d(%rsp)
jmp 0x4706c
movb 0x1d(%rsp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x1c(%rsp)
jne 0x4707d
jmp 0x470a8
movq 0x30(%rsp), %rdi
callq 0x73d90
movq %rax, 0x180(%rsp)
leaq 0x1e8(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x73dc0
movb %al, 0x1c(%rsp)
movb 0x1c(%rsp), %al
testb $0x1, %al
jne 0x470b5
jmp 0x4742a
leaq 0x170(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x73e80
movq 0x30(%rsp), %rdi
movq 0x170(%rsp), %rsi
callq 0x73e30
movq %rax, 0x178(%rsp)
leaq 0x178(%rsp), %rdi
xorl %esi, %esi
callq 0x73ef0
movq %rax, 0x168(%rsp)
leaq 0x178(%rsp), %rdi
callq 0x73e10
movq %rax, %rdi
callq 0xcc10
testb $0x1, %al
jne 0x47119
jmp 0x473f5
callq 0xc090
movq 0x30(%rsp), %rdi
movl $0x0, (%rax)
callq 0x73d90
movq %rax, 0x160(%rsp)
leaq 0x178(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x73f20
xorb $-0x1, %al
testb $0x1, %al
jne 0x47156
jmp 0x473c5
callq 0xc8c0
cmpl $0x0, %eax
jne 0x473bb
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xcd00
movq 0x10(%rsp), %rdx
leaq 0x86897(%rip), %rsi     # 0xcda19
leaq 0xc0(%rsp), %rdi
callq 0x29fd0
jmp 0x47191
leaq 0x98(%rsp), %rdi
movl $0x595, %esi            # imm = 0x595
callq 0x2ded0
jmp 0x471a5
leaq 0xe0(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x2dde0
jmp 0x471c4
leaq 0x849d6(%rip), %rdx     # 0xcbba1
leaq 0x100(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x2a2f0
jmp 0x471e2
leaq 0x57(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xcd00
movq 0x8(%rsp), %rdx
leaq 0x86db0(%rip), %rsi     # 0xcdfad
leaq 0x58(%rsp), %rdi
callq 0x29fd0
jmp 0x47209
leaq 0x86806(%rip), %rdx     # 0xcda16
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x2a2f0
jmp 0x47221
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0x2dde0
jmp 0x4723d
leaq 0x86da1(%rip), %rdx     # 0xcdfe5
leaq 0x140(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0x2a2f0
jmp 0x4725b
leaq 0x140(%rsp), %rdi
callq 0x3e9b0
jmp 0x4726a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x473a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x4739c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x4738f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x47382
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x4736b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x47361
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x47357
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
jmp 0x4734a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x278(%rsp)
movl %eax, 0x274(%rsp)
leaq 0x140(%rsp), %rdi
callq 0xce98
leaq 0x120(%rsp), %rdi
callq 0xce98
leaq 0x78(%rsp), %rdi
callq 0xce98
leaq 0x58(%rsp), %rdi
callq 0xce98
leaq 0x57(%rsp), %rdi
callq 0xc7a0
leaq 0x100(%rsp), %rdi
callq 0xce98
leaq 0xe0(%rsp), %rdi
callq 0xce98
leaq 0x98(%rsp), %rdi
callq 0xce98
leaq 0xc0(%rsp), %rdi
callq 0xce98
leaq 0xbf(%rsp), %rdi
callq 0xc7a0
jmp 0x4744b
movl $0x1, %edi
callq 0xc8d0
leaq 0x178(%rsp), %rdi
callq 0x73ed0
movq %rax, %rdi
leaq 0x85b1f(%rip), %rsi     # 0xccefb
callq 0xca00
jmp 0x473e3
movq 0x178(%rsp), %rax
movq %rax, 0x1e8(%rsp)
jmp 0x47428
leaq 0x40(%rsp), %rdi
leaq 0x178(%rsp), %rsi
callq 0x73e80
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x73e30
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x1e8(%rsp)
jmp 0x4743e
leaq 0x1e8(%rsp), %rdi
xorl %esi, %esi
callq 0x73ea0
movq %rax, 0x38(%rsp)
jmp 0x4701a
addq $0x338, %rsp            # imm = 0x338
retq
movq 0x30(%rsp), %rdi
callq 0x32410
movq 0x278(%rsp), %rdi
callq 0xccf0
nopw %cs:(%rax,%rax)