// File: /workspace/github_cpp_makefile_star2_O3/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 $0x128, %rsp            # imm = 0x128
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
movq %rsi, %rdi
callq 0x297bc
testb %al, %al
je 0x262ef
leaq -0xd8(%rbp), %rax
movq %rax, -0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0xf98c
jmp 0x26301
leaq -0xe8(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x25db8
leaq -0x148(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2a67c
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0xc8(%rbp), %rbx
movl $0x0, (%rbx)
callq 0x2c4e2
movq %rax, 0x8(%rbx)
leaq -0xe8(%rbp), %rdi
movq %rbx, %rsi
callq 0x2869d
cmpl $0x1, %eax
jne 0x2636c
testq %r14, %r14
je 0x26746
callq 0x2c4c4
movl $0x2, (%r14)
movq %rax, 0x8(%r14)
jmp 0x2638d
cmpl $0x0, -0xc8(%rbp)
je 0x263fa
testq %r14, %r14
je 0x267b0
movups -0xc8(%rbp), %xmm0
movups %xmm0, (%r14)
movq -0x30(%rbp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
callq 0xf98c
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x263ba
callq 0xb430
leaq -0x138(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x263cf
callq 0xb430
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x263e4
callq 0xb430
movq -0x30(%rbp), %rax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0xa8(%rbp), %r13
movq -0x30(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x58(%rbp)
leaq -0x88(%rbp), %r15
leaq -0xe8(%rbp), %r12
movq $0x0, -0x48(%rbp)
movq -0x50(%rbp), %rax
movb $0x0, (%rax)
movq %r15, %rdi
movq %r12, %rsi
callq 0x2a24c
leaq -0xb8(%rbp), %rdi
movq %r12, %rsi
callq 0x2a39c
movq -0x68(%rbp), %rax
xorq -0x98(%rbp), %rax
movq -0x90(%rbp), %rcx
xorq -0x60(%rbp), %rcx
movq -0xb8(%rbp), %rdi
orq %rax, %rcx
setne %bl
cmpq %r13, %rdi
je 0x26471
callq 0xb430
testb %bl, %bl
je 0x264f3
callq 0x2aaff
movq %r15, %rdi
movq %rax, %rsi
callq 0x2a038
testl %eax, %eax
je 0x264e6
callq 0x2ac7b
movq %r15, %rdi
movq %rax, %rsi
callq 0x2a038
testl %eax, %eax
je 0x264c9
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x29e38
leaq -0x50(%rbp), %rdi
movq %r14, %rsi
callq 0x26910
testq %r14, %r14
je 0x264c0
cmpl $0x0, (%r14)
jne 0x2653a
movl %eax, %eax
cmpl $0x4, %eax
jne 0x264e6
jmp 0x264fd
leaq -0x50(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x2a038
testl %eax, %eax
je 0x264e6
leaq -0x50(%rbp), %rdi
callq 0x2a3ea
movq %r15, %rdi
callq 0x2b1ba
jmp 0x26435
movb $0x1, %r13b
xorl %ebx, %ebx
jmp 0x266d3
leaq -0x128(%rbp), %rdi
leaq -0x50(%rbp), %rsi
movq %r14, %rdx
callq 0x26acb
testq %r14, %r14
je 0x26556
cmpl $0x0, (%r14)
je 0x26556
movq -0x30(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
xorl %r13d, %r13d
jmp 0x266b8
movq -0x30(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
xorl %r13d, %r13d
jmp 0x264f6
leaq -0x50(%rbp), %rdi
callq 0x2a3ea
leaq -0x128(%rbp), %rdi
callq 0x297bc
testb %al, %al
je 0x265db
movq %r15, %rdi
callq 0x2b1ba
leaq -0xa8(%rbp), %r13
leaq -0xb8(%rbp), %rdi
movq %r12, %rsi
callq 0x2a39c
movq -0x68(%rbp), %rax
xorq -0x98(%rbp), %rax
movq -0x90(%rbp), %rcx
xorq -0x60(%rbp), %rcx
movq -0xb8(%rbp), %rdi
orq %rax, %rcx
setne %bl
cmpq %r13, %rdi
je 0x265ba
callq 0xb430
testb %bl, %bl
je 0x2667a
leaq -0x128(%rbp), %rdi
movq %r15, %rsi
callq 0x29e38
movq %r15, %rdi
callq 0x2b1ba
jmp 0x2657e
leaq -0xf8(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x108(%rbp), %rbx
movq %rbx, %rdi
callq 0xf98c
movq %rbx, %rdi
leaq -0x128(%rbp), %rsi
callq 0x29e38
leaq -0xa8(%rbp), %r13
movq %r15, %rdi
callq 0x2b1ba
leaq -0xb8(%rbp), %rdi
movq %r12, %rsi
callq 0x2a39c
movq -0x68(%rbp), %rax
xorq -0x98(%rbp), %rax
movq -0x90(%rbp), %rcx
xorq -0x60(%rbp), %rcx
movq -0xb8(%rbp), %rdi
orq %rax, %rcx
setne %bl
cmpq %r13, %rdi
je 0x2665d
callq 0xb430
testb %bl, %bl
je 0x2668e
leaq -0x108(%rbp), %rdi
movq %r15, %rsi
callq 0x29e38
movq %r15, %rdi
callq 0x2b1ba
jmp 0x26621
movb $0x1, %r13b
movq %r12, %rdi
leaq -0x128(%rbp), %rsi
callq 0xb290
jmp 0x266b8
movq %r12, %rdi
leaq -0x108(%rbp), %rsi
callq 0xb290
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x266b5
callq 0xb430
movb $0x1, %r13b
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x266d0
callq 0xb430
movl %r13d, %ebx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x266e8
callq 0xb430
testb %r13b, %r13b
je 0x263a8
testb %bl, %bl
leaq -0xa8(%rbp), %r13
jne 0x2641b
testq %r14, %r14
je 0x26715
movl $0x0, (%r14)
callq 0x2c4e2
movq %rax, 0x8(%r14)
leaq -0x50(%rbp), %rdi
callq 0x297bc
testb %al, %al
je 0x26818
movq -0x30(%rbp), %rdi
movq -0x58(%rbp), %rax
movq %rax, (%rdi)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
callq 0xf98c
jmp 0x263a8
movl $0x50, %edi
callq 0xb250
movq %rax, %r14
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xf30e(%rip), %rsi      # 0x35a70
leaq 0xf323(%rip), %rdx      # 0x35a8c
leaq -0x88(%rbp), %rdi
callq 0xf8ee
callq 0x2c4c4
leaq -0x88(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
movq %r14, %rdi
movl $0x2, %ecx
movq %rax, %r8
callq 0x2946c
leaq 0x24dc9(%rip), %rsi     # 0x4b568
leaq 0x2dd0(%rip), %rdx      # 0x29576
movq %r14, %rdi
callq 0xb7b0
jmp 0x26818
movl $0x50, %edi
callq 0xb250
movq %rax, %r14
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xf2a4(%rip), %rsi      # 0x35a70
leaq 0xf2b9(%rip), %rdx      # 0x35a8c
leaq -0x88(%rbp), %rdi
callq 0xf8ee
movl -0xc8(%rbp), %ecx
movq -0xc0(%rbp), %r8
leaq -0x88(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
movq %r14, %rdi
callq 0x2946c
leaq 0x24d5f(%rip), %rsi     # 0x4b568
leaq 0x2d66(%rip), %rdx      # 0x29576
movq %r14, %rdi
callq 0xb7b0
leaq 0xf26e(%rip), %rdi      # 0x35a8d
leaq 0xf2b3(%rip), %rsi      # 0x35ad9
leaq 0xf2d1(%rip), %rcx      # 0x35afe
movl $0x35e, %edx            # imm = 0x35E
callq 0xb310
jmp 0x2683f
jmp 0x26850
jmp 0x2686d
jmp 0x26893
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
jne 0x268c7
jmp 0x268cc
movq %rax, %rbx
movq %r14, %rdi
callq 0xb360
jmp 0x268cc
jmp 0x26876
jmp 0x268b4
movq %rax, %rbx
jmp 0x268f3
jmp 0x26893
jmp 0x2686d
movq %rax, %rbx
jmp 0x268cc
jmp 0x26876
jmp 0x26893
movq %rax, %rbx
movq -0x108(%rbp), %rdi
leaq -0xf8(%rbp), %rax
cmpq %rax, %rdi
je 0x26896
callq 0xb430
jmp 0x26896
movq %rax, %rbx
movq -0x128(%rbp), %rdi
leaq -0x118(%rbp), %rax
cmpq %rax, %rdi
je 0x268b7
callq 0xb430
jmp 0x268b7
jmp 0x268b4
jmp 0x268b4
movq %rax, %rbx
movq -0x88(%rbp), %rdi
leaq -0x78(%rbp), %rax
cmpq %rax, %rdi
je 0x268cc
callq 0xb430
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x268de
callq 0xb430
leaq -0x138(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x268f3
callq 0xb430
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x26908
callq 0xb430
movq %rbx, %rdi
callq 0xb7f0