// File: /workspace/github_cpp_makefile_star2_O2/demon386[P]git-store/./libs/filesystem/src/path.cpp
// Function: boost::filesystem::path::m_path_iterator_increment(boost::filesystem::path::iterator&)
void path::m_path_iterator_increment(path::iterator & it)
  {
    BOOST_ASSERT_MSG(it.m_pos < it.m_path_ptr->m_pathname.size(),
      "path::basic_iterator increment past end()");

    // increment to position past current element; if current element is implicit dot,
    // this will cause it.m_pos to represent the end iterator
    it.m_pos += it.m_element.m_pathname.size();

    // if the end is reached, we are done
    if (it.m_pos == it.m_path_ptr->m_pathname.size())
    {
      it.m_element.clear();  // aids debugging, may release unneeded memory
      return;
    }

    // both POSIX and Windows treat paths that begin with exactly two separators specially
    bool was_net(it.m_element.m_pathname.size() > 2
      && is_separator(it.m_element.m_pathname[0])
      && is_separator(it.m_element.m_pathname[1])
      && !is_separator(it.m_element.m_pathname[2]));

    // process separator (Windows drive spec is only case not a separator)
    if (is_separator(it.m_path_ptr->m_pathname[it.m_pos]))
    {
      // detect root directory
      if (was_net
#       ifdef BOOST_WINDOWS_API
        // case "c:/"
        || it.m_element.m_pathname[it.m_element.m_pathname.size()-1] == colon
#       endif
         )
      {
        it.m_element.m_pathname = separator;  // generic format; see docs
        return;
      }

      // skip separators until it.m_pos points to the start of the next element
      while (it.m_pos != it.m_path_ptr->m_pathname.size()
        && is_separator(it.m_path_ptr->m_pathname[it.m_pos]))
        { ++it.m_pos; }

      // detect trailing separator, and treat it as ".", per POSIX spec
      if (it.m_pos == it.m_path_ptr->m_pathname.size()
        && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1)) 
      {
        --it.m_pos;
        it.m_element = detail::dot_path();
        return;
      }
    }

    // get m_element
    size_type end_pos(it.m_path_ptr->m_pathname.find_first_of(separators, it.m_pos));
    if (end_pos == string_type::npos)
      end_pos = it.m_path_ptr->m_pathname.size();
    it.m_element = it.m_path_ptr->m_pathname.substr(it.m_pos, end_pos - it.m_pos);
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %rdi
movq 0x28(%rbx), %rdx
movq 0x8(%rdi), %rsi
cmpq %rsi, %rdx
jae 0x26641
movq 0x8(%rbx), %rax
addq %rax, %rdx
movq %rdx, 0x28(%rbx)
cmpq %rsi, %rdx
jne 0x2656d
andq $0x0, 0x8(%rbx)
movq (%rbx), %rax
movb $0x0, (%rax)
jmp 0x26618
cmpq $0x3, %rax
jb 0x2658a
movq (%rbx), %rax
cmpb $0x2f, (%rax)
jne 0x2658a
cmpb $0x2f, 0x1(%rax)
jne 0x2658a
cmpb $0x2f, 0x2(%rax)
setne %cl
jmp 0x2658c
xorl %ecx, %ecx
movq (%rdi), %rax
cmpb $0x2f, (%rax,%rdx)
jne 0x265d4
testb %cl, %cl
je 0x265ac
pushq $0x2f
popq %rsi
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xc7f0
cmpq %rdx, %rsi
je 0x265c0
cmpb $0x2f, (%rax,%rdx)
jne 0x265d4
incq %rdx
movq %rdx, 0x28(%rbx)
jmp 0x265ac
decq %rsi
callq 0x25f9a
testb %al, %al
je 0x26621
movq 0x20(%rbx), %rdi
movq 0x28(%rbx), %rdx
leaq 0x8a49(%rip), %rsi      # 0x2f024
callq 0xc260
movq 0x20(%rbx), %rsi
cmpq $-0x1, %rax
jne 0x265ee
movq 0x8(%rsi), %rax
movq 0x28(%rbx), %rdx
subq %rdx, %rax
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rax, %rcx
callq 0xc4f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc2b0
leaq -0x30(%rbp), %rdi
callq 0xc9a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
decq 0x28(%rbx)
callq 0x2601b
leaq 0x23007(%rip), %rsi     # 0x49638
movq %rbx, %rdi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0xc2b0
leaq 0xa18a(%rip), %rdi      # 0x307d2
leaq 0xa0f6(%rip), %rsi      # 0x30745
leaq 0xa1d9(%rip), %rcx      # 0x3082f
movl $0x2ce, %edx            # imm = 0x2CE
callq 0xc350
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0xc9a0
movq %rbx, %rdi
callq 0xc850