// File: demon386[P]git-store/./libs/filesystem/src/path.cpp
// Function: boost::filesystem::path::m_path_iterator_decrement(boost::filesystem::path::iterator&)
void path::m_path_iterator_decrement(path::iterator & it)
  {
    BOOST_ASSERT_MSG(it.m_pos, "path::iterator decrement past begin()");

    size_type end_pos(it.m_pos);

    // if at end and there was a trailing non-root '/', return "."
    if (it.m_pos == it.m_path_ptr->m_pathname.size()
      && it.m_path_ptr->m_pathname.size() > 1
      && is_separator(it.m_path_ptr->m_pathname[it.m_pos-1])
      && !is_root_separator(it.m_path_ptr->m_pathname, it.m_pos-1) 
       )
    {
      --it.m_pos;
      it.m_element = detail::dot_path();
      return;
    }

    size_type root_dir_pos(root_directory_start(it.m_path_ptr->m_pathname, end_pos));

    // skip separators unless root directory
    for (
      ; 
      end_pos > 0
      && (end_pos-1) != root_dir_pos
      && is_separator(it.m_path_ptr->m_pathname[end_pos-1])
      ;
      --end_pos) {}

    it.m_pos = filename_pos(it.m_path_ptr->m_pathname, end_pos);
    it.m_element = it.m_path_ptr->m_pathname.substr(it.m_pos, end_pos - it.m_pos);
    if (it.m_element.m_pathname == preferred_separator_string) // needed for Windows, harmless on POSIX 
      it.m_element.m_pathname = separator_string;    // generic format; see docs 
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x28(%rcx)
movb %al, -0x45(%rbp)
je 0x51c43
movb $0x1, %al
movb %al, -0x45(%rbp)
jmp 0x51c43
movb -0x45(%rbp), %al
testb $0x1, %al
jne 0x51c4c
jmp 0x51c4e
jmp 0x51c6d
leaq 0x11cf1(%rip), %rdi     # 0x63946
leaq 0x11b5f(%rip), %rsi     # 0x637bb
movl $0x308, %edx            # imm = 0x308
leaq 0x11d14(%rip), %rcx     # 0x6397c
callq 0xd400
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xd430
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jne 0x51d1b
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xd430
cmpq $0x1, %rax
jbe 0x51d1b
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
subq $0x1, %rsi
callq 0xd6d0
movsbl (%rax), %edi
callq 0x4fab0
testb $0x1, %al
jne 0x51cd8
jmp 0x51d1b
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rsi
subq $0x1, %rsi
callq 0x50c10
testb $0x1, %al
jne 0x51d1b
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x28(%rax)
callq 0x50d50
movq %rax, %rsi
movq -0x8(%rbp), %rdi
callq 0x4d9b0
jmp 0x51e1b
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x507b0
movq %rax, -0x18(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x51(%rbp)
jbe 0x51d6f
movq -0x10(%rbp), %rcx
subq $0x1, %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x51(%rbp)
je 0x51d6f
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rsi
subq $0x1, %rsi
callq 0xd6d0
movsbl (%rax), %edi
callq 0x4fab0
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x51d78
jmp 0x51d88
jmp 0x51d7a
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x51d30
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x509e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq -0x10(%rbp), %rcx
subq %rdx, %rcx
leaq -0x38(%rbp), %rdi
movq %rdi, -0x60(%rbp)
callq 0xd650
movq -0x60(%rbp), %rsi
movq -0x8(%rbp), %rdi
callq 0x52280
jmp 0x51dd3
leaq -0x38(%rbp), %rdi
callq 0xdca8
movq -0x8(%rbp), %rdi
movq 0x3c8a1(%rip), %rsi     # 0x8e688
callq 0x13120
testb $0x1, %al
jne 0x51df2
jmp 0x51e1b
movq 0x3c897(%rip), %rsi     # 0x8e690
movq -0x8(%rbp), %rdi
callq 0xd8a0
jmp 0x51e1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xdca8
jmp 0x51e21
addq $0x60, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0xdb30
nopw (%rax,%rax)