// File: /workspace/github_cpp_makefile_star2_O1/demon386[P]git-store/./libs/filesystem/src/operations.cpp
// Function: boost::filesystem::detail::canonical(boost::filesystem::path const&, boost::filesystem::path const&, boost::system::error_code*)
BOOST_FILESYSTEM_DECL
  path canonical(const path& p, const path& base, system::error_code* ec)
  {
    path source (p.is_absolute() ? p : absolute(p, base));
    path root(source.root_path());
    path result;

    system::error_code local_ec;
    file_status stat (status(source, local_ec));

    if (stat.type() == fs::file_not_found)
    {
      if (ec == 0)
        BOOST_FILESYSTEM_THROW(filesystem_error(
          "boost::filesystem::canonical", source,
          error_code(system::errc::no_such_file_or_directory, system::generic_category())));
      ec->assign(system::errc::no_such_file_or_directory, system::generic_category());
      return result;
    }
    else if (local_ec)
    {
      if (ec == 0)
        BOOST_FILESYSTEM_THROW(filesystem_error(
          "boost::filesystem::canonical", source, local_ec));
      *ec = local_ec;
      return result;
    }

    bool scan (true);
    while (scan)
    {
      scan = false;
      result.clear();
      for (path::iterator itr = source.begin(); itr != source.end(); ++itr)
      {
        if (*itr == dot_path())
          continue;
        if (*itr == dot_dot_path())
        {
          if (result != root)
            result.remove_filename();
          continue;
        }

        result /= *itr;

        bool is_sym (is_symlink(detail::symlink_status(result, ec)));
        if (ec && *ec)
          return path();

        if (is_sym)
        {
          path link(detail::read_symlink(result, ec));
          if (ec && *ec)
            return path();
          result.remove_filename();

          if (link.is_absolute())
          {
            for (++itr; itr != source.end(); ++itr)
              link /= *itr;
            source = link;
          }
          else // link is relative
          {
            path new_source(result);
            new_source /= link;
            for (++itr; itr != source.end(); ++itr)
              new_source /= *itr;
            source = new_source;
          }
          scan = true;  // symlink causes scan to be restarted
          break;
        }
      }
    }
    if (ec != 0)
      ec->clear();
    BOOST_ASSERT_MSG(result.is_absolute(), "canonical() implementation error; please report");
    return result;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rcx, -0x60(%rbp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, -0x38(%rbp)
movq %rsi, %rdi
callq 0x29a86
testb %al, %al
je 0x2652f
leaq -0xb8(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0xc8(%rbp), %rdi
callq 0xfa18
jmp 0x26541
leaq -0xc8(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x25fe4
leaq -0x158(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2a95e
leaq -0x48(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0xa8(%rbp), %rbx
movl $0x0, (%rbx)
callq 0x2c80a
movq %rax, 0x8(%rbx)
leaq -0xc8(%rbp), %rdi
movq %rbx, %rsi
callq 0x28975
cmpl $0x1, %eax
jne 0x265af
movq -0x60(%rbp), %rbx
testq %rbx, %rbx
je 0x269c2
callq 0x2c7ec
movl $0x2, (%rbx)
movq %rax, 0x8(%rbx)
jmp 0x265d3
cmpl $0x0, -0xa8(%rbp)
movq -0x60(%rbp), %rax
je 0x26640
testq %rax, %rax
je 0x26a2f
movups -0xa8(%rbp), %xmm0
movups %xmm0, (%rax)
movq -0x38(%rbp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq %rsi, %rdx
callq 0xfa18
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rax
cmpq %rax, %rdi
je 0x26600
callq 0xb430
leaq -0x148(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26615
callq 0xb430
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2662a
callq 0xb430
movq -0x38(%rbp), %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x128(%rbp), %rbx
movq -0x38(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x68(%rbp)
movb $0x1, %al
movl %eax, -0x2c(%rbp)
leaq -0x98(%rbp), %r15
leaq -0xc8(%rbp), %r12
leaq -0x138(%rbp), %r13
testb $0x1, -0x2c(%rbp)
je 0x26979
movq $0x0, -0x50(%rbp)
movq -0x58(%rbp), %rax
movb $0x0, (%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x2a54a
movl $0x0, -0x2c(%rbp)
movq %r13, %rdi
movq %r12, %rsi
callq 0x2a680
movq -0x78(%rbp), %rax
xorq -0x118(%rbp), %rax
movq -0x110(%rbp), %rcx
xorq -0x70(%rbp), %rcx
movq -0x138(%rbp), %rdi
orq %rax, %rcx
setne %r14b
cmpq %rbx, %rdi
je 0x266d1
callq 0xb430
testb %r14b, %r14b
je 0x2694c
callq 0x2ade1
movq %r15, %rdi
movq %rax, %rsi
callq 0x2a334
testl %eax, %eax
je 0x2693f
callq 0x2af5d
movq %r15, %rdi
movq %rax, %rsi
callq 0x2a334
testl %eax, %eax
je 0x267a5
leaq -0x58(%rbp), %rdi
movq %r15, %rsi
callq 0x2a134
leaq -0x58(%rbp), %rdi
movq -0x60(%rbp), %r14
movq %r14, %rsi
callq 0x26ba2
testq %r14, %r14
je 0x26753
cmpl $0x0, (%r14)
je 0x26753
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %r14d
jmp 0x2693a
movl %eax, %eax
xorl %r14d, %r14d
cmpl $0x4, %eax
jne 0x2693a
leaq -0x108(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movq -0x60(%rbp), %r14
movq %r14, %rdx
callq 0x26d68
testq %r14, %r14
je 0x267cd
cmpl $0x0, (%r14)
je 0x267cd
movq -0x38(%rbp), %rax
movq -0x68(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movl $0x1, %r14d
jmp 0x26922
leaq -0x58(%rbp), %r14
movq %r14, %rdi
leaq -0x158(%rbp), %rsi
callq 0x2a334
testl %eax, %eax
je 0x2693f
movq %r14, %rdi
callq 0x2a6ce
jmp 0x2693f
leaq -0x58(%rbp), %rdi
callq 0x2a6ce
leaq -0x108(%rbp), %rdi
callq 0x29a86
testb %al, %al
je 0x26849
movq %r15, %rdi
callq 0x2b496
movq %r13, %rdi
movq %r12, %rsi
callq 0x2a680
movq -0x78(%rbp), %rax
xorq -0x118(%rbp), %rax
movq -0x110(%rbp), %rcx
xorq -0x70(%rbp), %rcx
movq -0x138(%rbp), %rdi
orq %rax, %rcx
setne %r14b
cmpq %rbx, %rdi
je 0x26827
callq 0xb430
testb %r14b, %r14b
je 0x268df
leaq -0x108(%rbp), %rdi
movq %r15, %rsi
callq 0x2a134
movq %r15, %rdi
callq 0x2b496
jmp 0x267ee
leaq -0xd8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %r14
movq %r14, %rdi
callq 0xfa18
movq %r14, %rdi
leaq -0x108(%rbp), %rsi
callq 0x2a134
movq %r15, %rdi
callq 0x2b496
movq %r13, %rdi
movq %r12, %rsi
callq 0x2a680
movq -0x78(%rbp), %rax
xorq -0x118(%rbp), %rax
movq -0x110(%rbp), %rcx
xorq -0x70(%rbp), %rcx
movq -0x138(%rbp), %rdi
orq %rax, %rcx
setne %r14b
cmpq %rbx, %rdi
je 0x268c1
callq 0xb430
testb %r14b, %r14b
je 0x268f0
leaq -0xe8(%rbp), %rdi
movq %r15, %rsi
callq 0x2a134
movq %r15, %rdi
callq 0x2b496
jmp 0x26888
movq %r12, %rdi
leaq -0x108(%rbp), %rsi
callq 0xb290
jmp 0x26917
movq %r12, %rdi
leaq -0xe8(%rbp), %rsi
callq 0xb290
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x26917
callq 0xb430
movb $0x1, %al
movl %eax, -0x2c(%rbp)
movl $0x4, %r14d
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x2693a
callq 0xb430
testl %r14d, %r14d
jne 0x26952
movq %r15, %rdi
callq 0x2b496
jmp 0x26698
movl $0x4, %r14d
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x2696a
callq 0xb430
cmpl $0x4, %r14d
je 0x2666d
jmp 0x265ee
movq -0x60(%rbp), %rbx
testq %rbx, %rbx
je 0x26991
movl $0x0, (%rbx)
callq 0x2c80a
movq %rax, 0x8(%rbx)
leaq -0x58(%rbp), %rdi
callq 0x29a86
testb %al, %al
je 0x26a9a
movq -0x38(%rbp), %rdi
movq -0x68(%rbp), %rax
movq %rax, (%rdi)
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
addq %rsi, %rdx
callq 0xfa18
jmp 0x265ee
movl $0x50, %edi
callq 0xb250
movq %rax, %r14
leaq -0x88(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xf08f(%rip), %rsi      # 0x35a70
leaq 0xf0a4(%rip), %rdx      # 0x35a8c
leaq -0x98(%rbp), %rdi
callq 0xf97e
callq 0x2c7ec
leaq -0x98(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
movq %r14, %rdi
movl $0x2, %ecx
movq %rax, %r8
callq 0x29772
leaq 0x24b4a(%rip), %rsi     # 0x4b568
leaq 0x2e37(%rip), %rdx      # 0x2985c
movq %r14, %rdi
callq 0xb7b0
jmp 0x26a9a
movl $0x50, %edi
callq 0xb250
movq %rax, %r14
leaq -0x88(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xf022(%rip), %rsi      # 0x35a70
leaq 0xf037(%rip), %rdx      # 0x35a8c
leaq -0x98(%rbp), %rdi
callq 0xf97e
movl -0xa8(%rbp), %ecx
movq -0xa0(%rbp), %r8
leaq -0x98(%rbp), %rsi
leaq -0xc8(%rbp), %rdx
movq %r14, %rdi
callq 0x29772
leaq 0x24add(%rip), %rsi     # 0x4b568
leaq 0x2dca(%rip), %rdx      # 0x2985c
movq %r14, %rdi
callq 0xb7b0
leaq 0xefec(%rip), %rdi      # 0x35a8d
leaq 0xf031(%rip), %rsi      # 0x35ad9
leaq 0xf04f(%rip), %rcx      # 0x35afe
movl $0x35e, %edx            # imm = 0x35E
callq 0xb310
jmp 0x26abf
jmp 0x26ad7
jmp 0x26af6
movq %rax, %rbx
movq -0x98(%rbp), %rdi
cmpq %r15, %rdi
je 0x26ad3
callq 0xb430
xorl %eax, %eax
jmp 0x26adc
movq %rax, %rbx
movb $0x1, %al
testb %al, %al
je 0x26b5e
movq %r14, %rdi
callq 0xb360
jmp 0x26b5e
movq %rax, %rbx
jmp 0x26b85
jmp 0x26af6
jmp 0x26b26
movq %rax, %rbx
jmp 0x26b5e
jmp 0x26b09
jmp 0x26b43
jmp 0x26b26
jmp 0x26b43
jmp 0x26b43
jmp 0x26b09
jmp 0x26b26
movq %rax, %rbx
movq -0xe8(%rbp), %rdi
leaq -0xd8(%rbp), %rax
cmpq %rax, %rdi
je 0x26b29
callq 0xb430
jmp 0x26b29
movq %rax, %rbx
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x26b46
callq 0xb430
jmp 0x26b46
movq %rax, %rbx
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x26b5e
callq 0xb430
leaq -0x48(%rbp), %rax
movq -0x58(%rbp), %rdi
cmpq %rax, %rdi
je 0x26b70
callq 0xb430
leaq -0x148(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26b85
callq 0xb430
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26b9a
callq 0xb430
movq %rbx, %rdi
callq 0xb7f0