// File: demon386[P]git-store/./libs/filesystem/src/operations.cpp
// Function: boost::filesystem::absolute(boost::filesystem::path const&, boost::filesystem::path const&)
BOOST_FILESYSTEM_DECL
  path absolute(const path& p, const path& base)
  {
//    if ( p.empty() || p.is_absolute() )
//      return p;
//    //  recursively calling absolute is sub-optimal, but is simple
//    path abs_base(base.is_absolute() ? base : absolute(base));
//# ifdef BOOST_WINDOWS_API
//    if (p.has_root_directory())
//      return abs_base.root_name() / p;
//    //  !p.has_root_directory
//    if (p.has_root_name())
//      return p.root_name()
//        / abs_base.root_directory() / abs_base.relative_path() / p.relative_path();
//    //  !p.has_root_name()
//# endif
//    return abs_base / p;

    //  recursively calling absolute is sub-optimal, but is sure and simple
    path abs_base(base.is_absolute() ? base : absolute(base));

    //  store expensive to compute values that are needed multiple times
    path p_root_name (p.root_name());
    path base_root_name (abs_base.root_name());
    path p_root_directory (p.root_directory());

    if (p.empty())
      return abs_base;

    if (!p_root_name.empty())  // p.has_root_name()
    {
      if (p_root_directory.empty())  // !p.has_root_directory()
        return p_root_name / abs_base.root_directory()
        / abs_base.relative_path() / p.relative_path();
      // p is absolute, so fall through to return p at end of block
    }

    else if (!p_root_directory.empty())  // p.has_root_directory()
    {
#     ifdef BOOST_POSIX_API
      // POSIX can have root name it it is a network path
      if (base_root_name.empty())   // !abs_base.has_root_name()
        return p;
#     endif
      return base_root_name / p;
    }

    else
    {
      return abs_base / p;
    }

    return p;  // p.is_absolute() is true
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rdi, -0x188(%rbp)
movq %rdi, %rax
movq %rax, -0x180(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4d4d0
movb $0x0, -0x59(%rbp)
testb $0x1, %al
jne 0x4760b
jmp 0x4761a
movq -0x18(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x4d4f0
jmp 0x47654
movq -0x18(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x4d520
movq -0x198(%rbp), %rsi
movq -0x190(%rbp), %rdx
movb $0x1, -0x59(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x475d0
jmp 0x47652
jmp 0x47654
testb $0x1, -0x59(%rbp)
jne 0x4765c
jmp 0x47665
leaq -0x58(%rbp), %rdi
callq 0x4d550
movq -0x10(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x50600
jmp 0x47677
leaq -0xb0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x50600
jmp 0x47689
movq -0x10(%rbp), %rsi
leaq -0xd0(%rbp), %rdi
callq 0x50720
jmp 0x4769b
movq -0x10(%rbp), %rdi
callq 0x4d570
movb %al, -0x199(%rbp)
jmp 0x476ac
movb -0x199(%rbp), %al
testb $0x1, %al
jne 0x476bb
jmp 0x47742
movq -0x188(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4d4f0
jmp 0x476cd
movl $0x1, -0xd4(%rbp)
jmp 0x479a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
testb $0x1, -0x59(%rbp)
jne 0x476f0
jmp 0x476f9
leaq -0x58(%rbp), %rdi
callq 0x4d550
jmp 0x47a13
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x47a0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x479fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x479f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x479e6
leaq -0x90(%rbp), %rdi
callq 0x4d570
movb %al, -0x19a(%rbp)
jmp 0x47756
movb -0x19a(%rbp), %al
testb $0x1, %al
jne 0x478e8
jmp 0x47766
leaq -0xd0(%rbp), %rdi
callq 0x4d570
movb %al, -0x19b(%rbp)
jmp 0x4777a
movb -0x19b(%rbp), %al
testb $0x1, %al
jne 0x47789
jmp 0x478e3
leaq -0x138(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x50720
jmp 0x4779b
leaq -0x118(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x138(%rbp), %rdx
callq 0x4d590
jmp 0x477b7
leaq -0x158(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x508f0
jmp 0x477c9
leaq -0xf8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
leaq -0x158(%rbp), %rdx
callq 0x4d590
jmp 0x477e5
movq -0x10(%rbp), %rsi
leaq -0x178(%rbp), %rdi
callq 0x508f0
jmp 0x477f7
movq -0x188(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0x178(%rbp), %rdx
callq 0x4d590
jmp 0x47813
leaq -0x178(%rbp), %rdi
callq 0x4d550
leaq -0xf8(%rbp), %rdi
callq 0x4d550
leaq -0x158(%rbp), %rdi
callq 0x4d550
leaq -0x118(%rbp), %rdi
callq 0x4d550
leaq -0x138(%rbp), %rdi
callq 0x4d550
movl $0x1, -0xd4(%rbp)
jmp 0x479a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x478d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x478c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x478ba
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x478ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x4d550
leaq -0xf8(%rbp), %rdi
callq 0x4d550
leaq -0x158(%rbp), %rdi
callq 0x4d550
leaq -0x118(%rbp), %rdi
callq 0x4d550
leaq -0x138(%rbp), %rdi
callq 0x4d550
jmp 0x479e6
jmp 0x4798d
leaq -0xd0(%rbp), %rdi
callq 0x4d570
movb %al, -0x19c(%rbp)
jmp 0x478fc
movb -0x19c(%rbp), %al
testb $0x1, %al
jne 0x4796b
jmp 0x47908
leaq -0xb0(%rbp), %rdi
callq 0x4d570
movb %al, -0x19d(%rbp)
jmp 0x4791c
movb -0x19d(%rbp), %al
testb $0x1, %al
jne 0x47928
jmp 0x47946
movq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4d4f0
jmp 0x4793a
movl $0x1, -0xd4(%rbp)
jmp 0x479a9
movq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0xb0(%rbp), %rsi
callq 0x4d590
jmp 0x4795f
movl $0x1, -0xd4(%rbp)
jmp 0x479a9
movq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq -0x38(%rbp), %rsi
callq 0x4d590
jmp 0x47981
movl $0x1, -0xd4(%rbp)
jmp 0x479a9
movq -0x188(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4d4f0
jmp 0x4799f
movl $0x1, -0xd4(%rbp)
leaq -0xd0(%rbp), %rdi
callq 0x4d550
leaq -0xb0(%rbp), %rdi
callq 0x4d550
leaq -0x90(%rbp), %rdi
callq 0x4d550
leaq -0x38(%rbp), %rdi
callq 0x4d550
movq -0x180(%rbp), %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbp
retq
leaq -0xd0(%rbp), %rdi
callq 0x4d550
leaq -0xb0(%rbp), %rdi
callq 0x4d550
leaq -0x90(%rbp), %rdi
callq 0x4d550
leaq -0x38(%rbp), %rdi
callq 0x4d550
movq -0x68(%rbp), %rdi
callq 0xdb30
nopl (%rax)