// File: /workspace/github_cpp_makefile_star2_O1/demon386[P]git-store/./libs/filesystem/src/operations.cpp
// Function: boost::filesystem::detail::read_symlink(boost::filesystem::path const&, boost::system::error_code*)
BOOST_FILESYSTEM_DECL
  path read_symlink(const path& p, system::error_code* ec)
  {
    path symlink_path;

#   ifdef BOOST_POSIX_API

    for (std::size_t path_max = 64;; path_max *= 2)// loop 'til buffer large enough
    {
      boost::scoped_array<char> buf(new char[path_max]);
      ssize_t result;
      if ((result=::readlink(p.c_str(), buf.get(), path_max))== -1)
      {
        if (ec == 0)
          BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::read_symlink",
            p, error_code(errno, system_category())));
        else ec->assign(errno, system_category());
        break;
      }
      else
      {
        if(result != static_cast<ssize_t>(path_max))
        {
          symlink_path.assign(buf.get(), buf.get() + result);
          if (ec != 0) ec->clear();
          break;
        }
      }
    }

#   elif _WIN32_WINNT < 0x0600  // SDK earlier than Vista and Server 2008
    error(BOOST_ERROR_NOT_SUPPORTED, p, ec,
          "boost::filesystem::read_symlink");
#   else  // Vista and Server 2008 SDK, or later

    union info_t
    {
      char buf[REPARSE_DATA_BUFFER_HEADER_SIZE+MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
      REPARSE_DATA_BUFFER rdb;
    } info;

    handle_wrapper h(
      create_file_handle(p.c_str(), GENERIC_READ, 0, 0, OPEN_EXISTING,
        FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0));

    if (error(h.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0,
      p, ec, "boost::filesystem::read_symlink"))
        return symlink_path;

    DWORD sz;

    if (!error(::DeviceIoControl(h.handle, FSCTL_GET_REPARSE_POINT,
          0, 0, info.buf, sizeof(info), &sz, 0) == 0 ? BOOST_ERRNO : 0, p, ec,
          "boost::filesystem::read_symlink" ))
      symlink_path.assign(
        static_cast<wchar_t*>(info.rdb.SymbolicLinkReparseBuffer.PathBuffer)
        + info.rdb.SymbolicLinkReparseBuffer.PrintNameOffset/sizeof(wchar_t),
        static_cast<wchar_t*>(info.rdb.SymbolicLinkReparseBuffer.PathBuffer)
        + info.rdb.SymbolicLinkReparseBuffer.PrintNameOffset/sizeof(wchar_t)
        + info.rdb.SymbolicLinkReparseBuffer.PrintNameLength/sizeof(wchar_t));
#     endif
    return symlink_path;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x40, %r13d
movq %r13, %rdi
callq 0xb030
movq %rax, %r14
movq (%r12), %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0xb4b0
cmpq $-0x1, %rax
je 0x26dd1
cmpq %r13, %rax
jne 0x26de8
movq %r14, %rdi
callq 0xb5a0
addq %r13, %r13
jmp 0x26d9f
testq %r15, %r15
je 0x26e28
callq 0xb060
movl (%rax), %r12d
callq 0x2c80a
movl %r12d, (%r15)
jmp 0x26e0a
movq %r14, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29990
testq %r15, %r15
je 0x26e0e
movl $0x0, (%r15)
callq 0x2c80a
movq %rax, 0x8(%r15)
movq %r14, %rdi
callq 0xb5a0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x50, %edi
callq 0xb250
movq %rax, %r15
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xf03b(%rip), %rsi      # 0x35e7f
leaq 0xf053(%rip), %rdx      # 0x35e9e
leaq -0x50(%rbp), %rdi
callq 0xf97e
callq 0xb060
movl (%rax), %r13d
callq 0x2c80a
leaq -0x50(%rbp), %rsi
movq %r15, %rdi
movq %r12, %rdx
movl %r13d, %ecx
movq %rax, %r8
callq 0x29772
leaq 0x246eb(%rip), %rsi     # 0x4b568
leaq 0x29d8(%rip), %rdx      # 0x2985c
movq %r15, %rdi
callq 0xb7b0
movq %rax, %r12
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x26ea1
callq 0xb430
xorl %eax, %eax
jmp 0x26eaa
movq %rax, %r12
movb $0x1, %al
testb %al, %al
je 0x26ebb
movq %r15, %rdi
callq 0xb360
jmp 0x26ebb
movq %rax, %r12
movq %r14, %rdi
callq 0xb5a0
jmp 0x26ec8
movq %rax, %r12
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x26ed6
callq 0xb430
movq %r12, %rdi
callq 0xb7f0