// File: /workspace/github_cpp_makefile_star2_O3/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 0x26b34
cmpq %r13, %rax
jne 0x26b4b
movq %r14, %rdi
callq 0xb5a0
addq %r13, %r13
jmp 0x26b02
testq %r15, %r15
je 0x26b8b
callq 0xb060
movl (%rax), %r12d
callq 0x2c4e2
movl %r12d, (%r15)
jmp 0x26b6d
movq %r14, %rdx
addq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x296c6
testq %r15, %r15
je 0x26b71
movl $0x0, (%r15)
callq 0x2c4e2
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, %r13
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xf2d8(%rip), %rsi      # 0x35e7f
leaq 0xf2f0(%rip), %rdx      # 0x35e9e
leaq -0x50(%rbp), %rdi
callq 0xf8ee
callq 0xb060
movl (%rax), %r15d
callq 0x2c4e2
leaq -0x50(%rbp), %rsi
movq %r13, %rdi
movq %r12, %rdx
movl %r15d, %ecx
movq %rax, %r8
callq 0x2946c
leaq 0x24988(%rip), %rsi     # 0x4b568
leaq 0x298f(%rip), %rdx      # 0x29576
movq %r13, %rdi
callq 0xb7b0
movq %rax, %r15
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x26c16
callq 0xb430
jmp 0x26c16
movq %rax, %r15
movq %r13, %rdi
callq 0xb360
jmp 0x26c16
movq %rax, %r15
movq %r14, %rdi
callq 0xb5a0
jmp 0x26c23
movq %rax, %r15
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x26c31
callq 0xb430
movq %r15, %rdi
callq 0xb7f0