// File: /workspace/github_cpp_makefile_star2_O2/demon386[P]git-store/./libs/filesystem/src/operations.cpp
// Function: boost::filesystem::detail::symlink_status(boost::filesystem::path const&, boost::system::error_code*)
BOOST_FILESYSTEM_DECL
  file_status symlink_status(const path& p, error_code* ec)
  {
#   ifdef BOOST_POSIX_API

    struct stat path_stat;
    if (::lstat(p.c_str(), &path_stat)!= 0)
    {
      if (ec != 0)                            // always report errno, even though some
        ec->assign(errno, system_category());   // errno values are not status_errors

      if (errno == ENOENT || errno == ENOTDIR) // these are not errors
      {
        return fs::file_status(fs::file_not_found, fs::no_perms);
      }
      if (ec == 0)
        BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status",
          p, error_code(errno, system_category())));
      return fs::file_status(fs::status_error);
    }
    if (ec != 0) ec->clear();
    if (S_ISREG(path_stat.st_mode))
      return fs::file_status(fs::regular_file,
        static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
    if (S_ISDIR(path_stat.st_mode))
      return fs::file_status(fs::directory_file,
        static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
    if (S_ISLNK(path_stat.st_mode))
      return fs::file_status(fs::symlink_file,
        static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
    if (S_ISBLK(path_stat.st_mode))
      return fs::file_status(fs::block_file,
        static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
    if (S_ISCHR(path_stat.st_mode))
      return fs::file_status(fs::character_file,
        static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
    if (S_ISFIFO(path_stat.st_mode))
      return fs::file_status(fs::fifo_file,
        static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
    if (S_ISSOCK(path_stat.st_mode))
      return fs::file_status(fs::socket_file,
        static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
    return fs::file_status(fs::type_unknown);

#   else  // Windows

    DWORD attr(::GetFileAttributesW(p.c_str()));
    if (attr == 0xFFFFFFFF)
    {
      return process_status_failure(p, ec);
    }

    if (ec != 0) ec->clear();

    if (attr & FILE_ATTRIBUTE_REPARSE_POINT)
      return is_reparse_point_a_symlink(p)
             ? file_status(symlink_file, make_permissions(p, attr))
             : file_status(reparse_file, make_permissions(p, attr));

    return (attr & FILE_ATTRIBUTE_DIRECTORY)
      ? file_status(directory_file, make_permissions(p, attr))
      : file_status(regular_file, make_permissions(p, attr));

#   endif
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rdi
leaq -0xd8(%rbp), %rsi
callq 0xc690
testl %eax, %eax
je 0x22542
callq 0xc060
movq %rax, %r15
testq %r14, %r14
je 0x22513
movl (%r15), %r12d
callq 0x2761f
movl %r12d, (%r14)
movq %rax, 0x8(%r14)
movl (%r15), %edx
xorl %eax, %eax
pushq $0x1
popq %rcx
cmpl $0x2, %edx
je 0x225ca
cmpl $0x14, %edx
je 0x225ca
testq %r14, %r14
je 0x225e1
movl $0xffff, %eax           # imm = 0xFFFF
xorl %ecx, %ecx
jmp 0x225ca
testq %r14, %r14
je 0x2254f
movq %r14, %rdi
callq 0x24b32
movl -0xc0(%rbp), %edx
movl %edx, %esi
andl $0xf000, %esi           # imm = 0xF000
addl $0xfffff000, %esi       # imm = 0xFFFFF000
shrl $0xc, %esi
movl $0xffff, %eax           # imm = 0xFFFF
pushq $0xa
popq %rcx
cmpl $0xb, %esi
ja 0x225ca
leaq 0xd512(%rip), %rdi      # 0x2fa8c
movslq (%rdi,%rsi,4), %rsi
addq %rdi, %rsi
jmpq *%rsi
andl $0xfff, %edx            # imm = 0xFFF
pushq $0x7
jmp 0x225c7
andl $0xfff, %edx            # imm = 0xFFF
pushq $0x4
jmp 0x225c7
andl $0xfff, %edx            # imm = 0xFFF
pushq $0x6
jmp 0x225c7
andl $0xfff, %edx            # imm = 0xFFF
pushq $0x8
jmp 0x225c7
andl $0xfff, %edx            # imm = 0xFFF
pushq $0x3
jmp 0x225c7
andl $0xfff, %edx            # imm = 0xFFF
pushq $0x5
jmp 0x225c7
andl $0xfff, %edx            # imm = 0xFFF
pushq $0x2
popq %rcx
movl %edx, %eax
shlq $0x20, %rax
orq %rcx, %rax
addq $0xc0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
pushq $0x50
popq %rdi
callq 0xc250
movq %rax, %r14
leaq 0xd9e6(%rip), %rsi      # 0x2ffd9
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0xc1b0
movl (%r15), %r15d
callq 0x2761f
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
movl %r15d, %ecx
movq %rax, %r8
callq 0x24a48
leaq 0x25f64(%rip), %rsi     # 0x48588
leaq 0x24bd(%rip), %rdx      # 0x24ae8
movq %r14, %rdi
callq 0xc810
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0xc9a0
jmp 0x2264c
movq %rax, %rbx
movq %r14, %rdi
callq 0xc390
movq %rbx, %rdi
callq 0xc850