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

    struct stat path_stat;
    if (error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0,
        p, ec, "boost::filesystem::file_size"))
      return static_cast<boost::uintmax_t>(-1);
   if (error(!S_ISREG(path_stat.st_mode) ? EPERM : 0,
        p, ec, "boost::filesystem::file_size"))
      return static_cast<boost::uintmax_t>(-1);

    return static_cast<boost::uintmax_t>(path_stat.st_size);

#   else  // Windows

    // assume uintmax_t is 64-bits on all Windows compilers

    WIN32_FILE_ATTRIBUTE_DATA fad;

    if (error(::GetFileAttributesExW(p.c_str(), ::GetFileExInfoStandard, &fad)== 0
      ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::file_size"))
          return static_cast<boost::uintmax_t>(-1);

    if (error((fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)!= 0
      ? ERROR_NOT_SUPPORTED : 0, p, ec, "boost::filesystem::file_size"))
      return static_cast<boost::uintmax_t>(-1);

    return (static_cast<boost::uintmax_t>(fad.nFileSizeHigh)
              << (sizeof(fad.nFileSizeLow)*8)) + fad.nFileSizeLow;
#   endif
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4dc70
movq %rax, %rdi
leaq -0xa8(%rbp), %rsi
callq 0xdae0
cmpl $0x0, %eax
je 0x4a3cf
callq 0xd070
movl (%rax), %eax
movl %eax, -0x108(%rbp)
jmp 0x4a3d9
xorl %eax, %eax
movl %eax, -0x108(%rbp)
jmp 0x4a3d9
movl -0x108(%rbp), %eax
movl %eax, -0x124(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0xdb50
movq -0x110(%rbp), %rdx
leaq 0x18991(%rip), %rsi     # 0x62dad
leaq -0xc8(%rbp), %rdi
callq 0xd8b0
jmp 0x4a42a
movq -0x118(%rbp), %rdx
movq -0x120(%rbp), %rsi
movl -0x124(%rbp), %edi
leaq -0xc8(%rbp), %rcx
callq 0x4a0b0
movb %al, -0x125(%rbp)
jmp 0x4a452
leaq -0xc8(%rbp), %rdi
callq 0xdca8
leaq -0xc9(%rbp), %rdi
callq 0xd6b0
movb -0x125(%rbp), %al
testb $0x1, %al
jne 0x4a476
jmp 0x4a4c6
movq $-0x1, -0x8(%rbp)
jmp 0x4a5c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x4a4b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0xdca8
leaq -0xc9(%rbp), %rdi
callq 0xd6b0
jmp 0x4a5d2
movl -0x90(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
subl $0x8000, %eax           # imm = 0x8000
setne %al
movzbl %al, %eax
movl %eax, -0x144(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0xdb50
movq -0x130(%rbp), %rdx
leaq 0x18894(%rip), %rsi     # 0x62dad
leaq -0x100(%rbp), %rdi
callq 0xd8b0
jmp 0x4a527
movq -0x138(%rbp), %rdx
movq -0x140(%rbp), %rsi
movl -0x144(%rbp), %edi
leaq -0x100(%rbp), %rcx
callq 0x4a0b0
movb %al, -0x145(%rbp)
jmp 0x4a54f
leaq -0x100(%rbp), %rdi
callq 0xdca8
leaq -0x101(%rbp), %rdi
callq 0xd6b0
movb -0x145(%rbp), %al
testb $0x1, %al
jne 0x4a573
jmp 0x4a5bd
movq $-0x1, -0x8(%rbp)
jmp 0x4a5c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x4a5af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x100(%rbp), %rdi
callq 0xdca8
leaq -0x101(%rbp), %rdi
callq 0xd6b0
jmp 0x4a5d2
movq -0x78(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0xd8(%rbp), %rdi
callq 0xdb30
nop