// File: demon386[P]git-store/./libs/filesystem/src/operations.cpp
// Function: boost::filesystem::detail::directory_iterator_construct(boost::filesystem::directory_iterator&, boost::filesystem::path const&, boost::system::error_code*)
void directory_iterator_construct(directory_iterator& it,
    const path& p, system::error_code* ec)    
  {
    if (error(p.empty() ? not_found_error_code.value() : 0, p, ec,
              "boost::filesystem::directory_iterator::construct"))
      return;

    path::string_type filename;
    file_status file_stat, symlink_file_stat;
    error_code result = dir_itr_first(it.m_imp->handle,
#     if defined(BOOST_POSIX_API)
      it.m_imp->buffer,
#     endif
      p.c_str(), filename, file_stat, symlink_file_stat);

    if (result)
    {
      it.m_imp.reset();
      error(result.value(), p,
        ec, "boost::filesystem::directory_iterator::construct");
      return;
    }
    
    if (it.m_imp->handle == 0)
      it.m_imp.reset(); // eof, so make end iterator
    else // not eof
    {
      it.m_imp->dir_entry.assign(p / filename, file_stat, symlink_file_stat);
      if (filename[0] == dot // dot or dot-dot
        && (filename.size()== 1
          || (filename[1] == dot
            && filename.size()== 2)))
        {  it.increment(*ec); }
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4d570
testb $0x1, %al
jne 0x4c486
jmp 0x4c49a
leaq 0x4235b(%rip), %rdi     # 0x8e7e8
callq 0x475c0
movl %eax, -0x10c(%rbp)
jmp 0x4c4a4
xorl %eax, %eax
movl %eax, -0x10c(%rbp)
jmp 0x4c4a4
movl -0x10c(%rbp), %eax
movl %eax, -0x12c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0xdb50
movq -0x118(%rbp), %rdx
leaq 0x16b60(%rip), %rsi     # 0x63044
leaq -0x38(%rbp), %rdi
callq 0xd8b0
jmp 0x4c4ef
movq -0x120(%rbp), %rdx
movq -0x128(%rbp), %rsi
movl -0x12c(%rbp), %edi
leaq -0x38(%rbp), %rcx
callq 0x4a0b0
movb %al, -0x12d(%rbp)
jmp 0x4c514
leaq -0x38(%rbp), %rdi
callq 0xdca8
leaq -0x39(%rbp), %rdi
callq 0xd6b0
movb -0x12d(%rbp), %al
testb $0x1, %al
jne 0x4c532
jmp 0x4c568
jmp 0x4c8d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4c55a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xdca8
leaq -0x39(%rbp), %rdi
callq 0xd6b0
jmp 0x4c8e8
leaq -0x70(%rbp), %rdi
callq 0xd8f0
leaq -0x78(%rbp), %rdi
callq 0x4e0a0
jmp 0x4c57c
leaq -0x80(%rbp), %rdi
callq 0x4e0a0
jmp 0x4c587
movq -0x8(%rbp), %rdi
callq 0x4e0c0
movq %rax, -0x138(%rbp)
jmp 0x4c599
movq -0x138(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x148(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4e0c0
movq %rax, -0x140(%rbp)
jmp 0x4c5bd
movq -0x140(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x158(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4dc70
movq %rax, -0x150(%rbp)
jmp 0x4c5e1
movq -0x150(%rbp), %rdx
movq -0x158(%rbp), %rsi
movq -0x148(%rbp), %rdi
leaq -0x70(%rbp), %rcx
leaq -0x78(%rbp), %r8
leaq -0x80(%rbp), %r9
callq 0x4c900
movq %rdx, -0x168(%rbp)
movl %eax, -0x15c(%rbp)
jmp 0x4c616
movq -0x168(%rbp), %rax
movl -0x15c(%rbp), %ecx
movl %ecx, -0x90(%rbp)
movq %rax, -0x88(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x4d830
cmpq $0x0, %rax
je 0x4c737
movq -0x8(%rbp), %rdi
callq 0x4e110
leaq -0x90(%rbp), %rdi
callq 0x475c0
movl %eax, -0x184(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x180(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x178(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0xdb50
movq -0x170(%rbp), %rdx
leaq 0x169ac(%rip), %rsi     # 0x63044
leaq -0xb0(%rbp), %rdi
callq 0xd8b0
jmp 0x4c6a6
movq -0x178(%rbp), %rdx
movq -0x180(%rbp), %rsi
movl -0x184(%rbp), %edi
leaq -0xb0(%rbp), %rcx
callq 0x4a0b0
jmp 0x4c6c8
leaq -0xb0(%rbp), %rdi
callq 0xdca8
leaq -0xb1(%rbp), %rdi
callq 0xd6b0
movl $0x1, -0xb8(%rbp)
jmp 0x4c8cd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4c8df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4c726
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0xdca8
leaq -0xb1(%rbp), %rdi
callq 0xd6b0
jmp 0x4c8df
movq -0x8(%rbp), %rdi
callq 0x4e0c0
movq %rax, -0x190(%rbp)
jmp 0x4c749
movq -0x190(%rbp), %rax
cmpq $0x0, 0x30(%rax)
jne 0x4c765
movq -0x8(%rbp), %rdi
callq 0x4e110
jmp 0x4c8c3
movq -0x8(%rbp), %rdi
callq 0x4e0c0
movq %rax, -0x198(%rbp)
jmp 0x4c777
movq -0x198(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0xf8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4e1a0
jmp 0x4c7a2
movq -0x1a0(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
leaq -0xf8(%rbp), %rdx
callq 0x4d590
jmp 0x4c7be
movq -0x1a8(%rbp), %rdi
movq -0x78(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x100(%rbp), %rdx
movq -0x108(%rbp), %rcx
leaq -0xd8(%rbp), %rsi
callq 0x4e150
jmp 0x4c7f7
leaq -0xd8(%rbp), %rdi
callq 0x4d550
leaq -0xf8(%rbp), %rdi
callq 0x4d550
xorl %eax, %eax
movl %eax, %esi
leaq -0x70(%rbp), %rdi
callq 0xdc50
movq %rax, -0x1b0(%rbp)
jmp 0x4c825
movq -0x1b0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x4c8c1
leaq -0x70(%rbp), %rdi
callq 0xd430
cmpq $0x1, %rax
je 0x4c87c
leaq -0x70(%rbp), %rdi
movl $0x1, %esi
callq 0xdc50
movq %rax, -0x1b8(%rbp)
jmp 0x4c85e
movq -0x1b8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x4c8c1
leaq -0x70(%rbp), %rdi
callq 0xd430
cmpq $0x2, %rax
jne 0x4c8c1
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4e1d0
jmp 0x4c88b
jmp 0x4c8c1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4c8b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x4d550
leaq -0xf8(%rbp), %rdi
callq 0x4d550
jmp 0x4c8df
jmp 0x4c8c3
movl $0x0, -0xb8(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xdca8
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
leaq -0x70(%rbp), %rdi
callq 0xdca8
movq -0x48(%rbp), %rdi
callq 0xdb30
nopw %cs:(%rax,%rax)