// File: demon386[P]git-store/./libs/filesystem/src/path.cpp
// Function: boost::filesystem::path::m_normalize()
path& path::m_normalize()
  {
    if (m_pathname.empty()) return *this;
      
    path temp;
    iterator start(begin());
    iterator last(end());
    iterator stop(last--);
    for (iterator itr(start); itr != stop; ++itr)
    {
      // ignore "." except at start and last
      if (itr->native().size() == 1
        && (itr->native())[0] == dot
        && itr != start
        && itr != last) continue;

      // ignore a name and following ".."
      if (!temp.empty()
        && itr->native().size() == 2
        && (itr->native())[0] == dot
        && (itr->native())[1] == dot) // dot dot
      {
        string_type lf(temp.filename().native());  
        if (lf.size() > 0  
          && (lf.size() != 1
            || (lf[0] != dot
              && lf[0] != separator))
          && (lf.size() != 2 
            || (lf[0] != dot
              && lf[1] != dot
#             ifdef BOOST_WINDOWS_API
              && lf[1] != colon
#             endif
               )
             )
          )
        {
          temp.remove_filename();
          // if not root directory, must also remove "/" if any
          if (temp.m_pathname.size() > 0
            && temp.m_pathname[temp.m_pathname.size()-1]
              == separator)
          {
            string_type::size_type rds(
              root_directory_start(temp.m_pathname, temp.m_pathname.size()));
            if (rds == string_type::npos
              || rds != temp.m_pathname.size()-1) 
              { temp.m_pathname.erase(temp.m_pathname.size()-1); }
          }

          iterator next(itr);
          if (temp.empty() && ++next != stop
            && next == last && *last == detail::dot_path()) temp /= detail::dot_path();
          continue;
        }
      }

      temp /= *itr;
    };

    if (temp.empty()) temp /= detail::dot_path();
    m_pathname = temp.m_pathname;
    return *this;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0xdab0
testb $0x1, %al
jne 0x50fd5
jmp 0x50fe5
movq -0x188(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x51768
leaq -0x30(%rbp), %rdi
callq 0x4d620
movq -0x188(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x4ff50
jmp 0x51000
movq -0x188(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x50060
jmp 0x51015
leaq -0xd0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
xorl %edx, %edx
callq 0x52130
jmp 0x5102c
leaq -0x100(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x521c0
jmp 0x5103e
jmp 0x51040
leaq -0x100(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x4d870
movb %al, -0x189(%rbp)
jmp 0x5105b
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x510d7
jmp 0x51067
movl $0x2, -0x104(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x4d8a0
jmp 0x516aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x5175d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x51754
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x51748
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x5173c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x51699
leaq -0x100(%rbp), %rdi
callq 0x52200
movq %rax, -0x198(%rbp)
jmp 0x510ec
movq -0x198(%rbp), %rdi
callq 0x4e090
movq %rax, -0x1a0(%rbp)
jmp 0x51101
movq -0x1a0(%rbp), %rdi
callq 0xd430
cmpq $0x1, %rax
jne 0x511a9
leaq -0x100(%rbp), %rdi
callq 0x52200
movq %rax, -0x1a8(%rbp)
jmp 0x5112c
movq -0x1a8(%rbp), %rdi
callq 0x4e090
movq %rax, -0x1b0(%rbp)
jmp 0x51141
movq -0x1b0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd6d0
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x511a9
leaq -0x100(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4d870
movb %al, -0x1b1(%rbp)
jmp 0x51171
movb -0x1b1(%rbp), %al
testb $0x1, %al
jne 0x5117d
jmp 0x511a9
leaq -0x100(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4d870
movb %al, -0x1b2(%rbp)
jmp 0x51198
movb -0x1b2(%rbp), %al
testb $0x1, %al
jne 0x511a4
jmp 0x511a9
jmp 0x51686
leaq -0x30(%rbp), %rdi
callq 0x4d570
movb %al, -0x1b3(%rbp)
jmp 0x511ba
movb -0x1b3(%rbp), %al
testb $0x1, %al
jne 0x5165d
jmp 0x511ca
leaq -0x100(%rbp), %rdi
callq 0x52200
movq %rax, -0x1c0(%rbp)
jmp 0x511df
movq -0x1c0(%rbp), %rdi
callq 0x4e090
movq %rax, -0x1c8(%rbp)
jmp 0x511f4
movq -0x1c8(%rbp), %rdi
callq 0xd430
cmpq $0x2, %rax
jne 0x5165d
leaq -0x100(%rbp), %rdi
callq 0x52200
movq %rax, -0x1d0(%rbp)
jmp 0x5121f
movq -0x1d0(%rbp), %rdi
callq 0x4e090
movq %rax, -0x1d8(%rbp)
jmp 0x51234
movq -0x1d8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xd6d0
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x5165d
leaq -0x100(%rbp), %rdi
callq 0x52200
movq %rax, -0x1e0(%rbp)
jmp 0x51265
movq -0x1e0(%rbp), %rdi
callq 0x4e090
movq %rax, -0x1e8(%rbp)
jmp 0x5127a
movq -0x1e8(%rbp), %rdi
movl $0x1, %esi
callq 0xd6d0
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x5165d
leaq -0x148(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x50b60
jmp 0x512a9
leaq -0x148(%rbp), %rdi
callq 0x4e090
movq %rax, -0x1f0(%rbp)
jmp 0x512be
movq -0x1f0(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0xd230
jmp 0x512d3
leaq -0x148(%rbp), %rdi
callq 0x4d550
leaq -0x128(%rbp), %rdi
callq 0xd430
cmpq $0x0, %rax
jbe 0x51629
leaq -0x128(%rbp), %rdi
callq 0xd430
cmpq $0x1, %rax
jne 0x5135f
xorl %eax, %eax
movl %eax, %esi
leaq -0x128(%rbp), %rdi
callq 0xdc50
movq %rax, -0x1f8(%rbp)
jmp 0x51320
movq -0x1f8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x51629
xorl %eax, %eax
movl %eax, %esi
leaq -0x128(%rbp), %rdi
callq 0xdc50
movq %rax, -0x200(%rbp)
jmp 0x5134c
movq -0x200(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
je 0x51629
leaq -0x128(%rbp), %rdi
callq 0xd430
cmpq $0x2, %rax
jne 0x513ca
xorl %eax, %eax
movl %eax, %esi
leaq -0x128(%rbp), %rdi
callq 0xdc50
movq %rax, -0x208(%rbp)
jmp 0x5138a
movq -0x208(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x51629
leaq -0x128(%rbp), %rdi
movl $0x1, %esi
callq 0xdc50
movq %rax, -0x210(%rbp)
jmp 0x513b7
movq -0x210(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
je 0x51629
leaq -0x30(%rbp), %rdi
callq 0x50140
jmp 0x513d5
leaq -0x30(%rbp), %rdi
callq 0xd430
cmpq $0x0, %rax
jbe 0x514ed
leaq -0x30(%rbp), %rdi
movq %rdi, -0x220(%rbp)
callq 0xd430
movq -0x220(%rbp), %rdi
movq %rax, %rsi
decq %rsi
callq 0xdc50
movq %rax, -0x218(%rbp)
jmp 0x51413
movq -0x218(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x514ed
leaq -0x30(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0xd430
movq -0x230(%rbp), %rdi
movq %rax, %rsi
callq 0x507b0
movq %rax, -0x228(%rbp)
jmp 0x5144e
movq -0x228(%rbp), %rax
movq %rax, -0x150(%rbp)
cmpq $-0x1, -0x150(%rbp)
je 0x51490
movq -0x150(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x30(%rbp), %rdi
callq 0xd430
movq %rax, %rcx
movq -0x238(%rbp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x514eb
leaq -0x30(%rbp), %rdi
movq %rdi, -0x240(%rbp)
callq 0xd430
movq -0x240(%rbp), %rdi
movq %rax, %rsi
decq %rsi
movq $-0x1, %rdx
callq 0xd100
jmp 0x514bb
jmp 0x514eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x4d550
jmp 0x51699
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x5164f
jmp 0x514ed
leaq -0x180(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x521c0
jmp 0x51502
leaq -0x30(%rbp), %rdi
callq 0x4d570
movb %al, -0x241(%rbp)
jmp 0x51513
movb -0x241(%rbp), %al
testb $0x1, %al
jne 0x51522
jmp 0x51611
leaq -0x180(%rbp), %rdi
callq 0x4d980
movq %rax, -0x250(%rbp)
jmp 0x51537
movq -0x250(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x4d870
movb %al, -0x251(%rbp)
jmp 0x51552
movb -0x251(%rbp), %al
testb $0x1, %al
jne 0x51561
jmp 0x51611
leaq -0x180(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x52230
movb %al, -0x252(%rbp)
jmp 0x5157c
movb -0x252(%rbp), %al
testb $0x1, %al
jne 0x5158b
jmp 0x51611
leaq -0xa0(%rbp), %rdi
callq 0x4d8f0
movq %rax, -0x260(%rbp)
jmp 0x515a0
callq 0x50d50
movq %rax, -0x268(%rbp)
jmp 0x515ae
movq -0x268(%rbp), %rsi
movq -0x260(%rbp), %rdi
callq 0x4d8c0
movb %al, -0x269(%rbp)
jmp 0x515c9
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x515d5
jmp 0x51611
callq 0x50d50
movq %rax, -0x278(%rbp)
jmp 0x515e3
movq -0x278(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x4f990
jmp 0x515f5
jmp 0x51611
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x4d8a0
jmp 0x5164f
movl $0x4, -0x104(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x4d8a0
jmp 0x51633
movl $0x0, -0x104(%rbp)
leaq -0x128(%rbp), %rdi
callq 0xdca8
movl -0x104(%rbp), %eax
testl %eax, %eax
je 0x5164d
jmp 0x5164b
jmp 0x51686
jmp 0x5165d
leaq -0x128(%rbp), %rdi
callq 0xdca8
jmp 0x51699
leaq -0x100(%rbp), %rdi
callq 0x4d8f0
movq %rax, -0x280(%rbp)
jmp 0x51672
movq -0x280(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x4f990
jmp 0x51684
jmp 0x51686
leaq -0x100(%rbp), %rdi
callq 0x4d980
jmp 0x51694
jmp 0x51040
leaq -0x100(%rbp), %rdi
callq 0x4d8a0
jmp 0x5173c
leaq -0x30(%rbp), %rdi
callq 0x4d570
movb %al, -0x281(%rbp)
jmp 0x516bb
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0x516c7
jmp 0x516e9
callq 0x50d50
movq %rax, -0x290(%rbp)
jmp 0x516d5
movq -0x290(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x4f990
jmp 0x516e7
jmp 0x516e9
movq -0x188(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xd060
jmp 0x516fb
movq -0x188(%rbp), %rax
movq %rax, -0x8(%rbp)
movl $0x1, -0x104(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x4d8a0
leaq -0xa0(%rbp), %rdi
callq 0x4d8a0
leaq -0x60(%rbp), %rdi
callq 0x4d8a0
leaq -0x30(%rbp), %rdi
callq 0x4d550
jmp 0x51768
leaq -0xd0(%rbp), %rdi
callq 0x4d8a0
leaq -0xa0(%rbp), %rdi
callq 0x4d8a0
leaq -0x60(%rbp), %rdi
callq 0x4d8a0
leaq -0x30(%rbp), %rdi
callq 0x4d550
jmp 0x51775
movq -0x8(%rbp), %rax
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0xdb30
nop