// File: /workspace/github_cpp_makefile_star2_O3/demon386[P]git-store/./libs/filesystem/src/unique_path.cpp
// Function: boost::filesystem::detail::unique_path(boost::filesystem::path const&, boost::system::error_code*)
BOOST_FILESYSTEM_DECL
path unique_path(const path& model, system::error_code* ec)
{
  std::wstring s (model.wstring());  // std::string ng for MBCS encoded POSIX
  const wchar_t hex[] = L"0123456789abcdef";
  char ran[] = "123456789abcdef";  // init to avoid clang static analyzer message
                                   // see ticket #8954
  assert(sizeof(ran) == 16);
  const int max_nibbles = 2 * sizeof(ran);   // 4-bits per nibble

  int nibbles_used = max_nibbles;
  for(std::wstring::size_type i=0; i < s.size(); ++i)
  {
    if (s[i] == L'%')                        // digit request
    {
      if (nibbles_used == max_nibbles)
      {
        system_crypt_random(ran, sizeof(ran), ec);
        if (ec != 0 && *ec)
          return "";
        nibbles_used = 0;
      }
      int c = ran[nibbles_used/2];
      c >>= 4 * (nibbles_used++ & 1);  // if odd, shift right 1 nibble
      s[i] = hex[c & 0xf];             // convert to hex digit and replace
    }
  }

  if (ec != 0) ec->clear();

  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rdi, -0x30(%rbp)
leaq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x2bfce
movaps 0xad91(%rip), %xmm0     # 0x36b60
movaps %xmm0, -0x60(%rbp)
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x2bed2
movl $0x20, %ecx
movq -0x50(%rbp), %rdx
leaq 0xad20(%rip), %rbx      # 0x36b10
xorl %r15d, %r15d
cmpl $0x25, (%rdx,%r15,4)
jne 0x2bec6
cmpl $0x20, %ecx
jne 0x2be9e
leaq 0xacbb(%rip), %rdi      # 0x36ac9
xorl %esi, %esi
xorl %eax, %eax
callq 0xb370
movl %eax, %r13d
cmpl $-0x1, %eax
jne 0x2be37
leaq 0xacb0(%rip), %rdi      # 0x36ad6
xorl %esi, %esi
xorl %eax, %eax
callq 0xb370
movl %eax, %r13d
cmpl $-0x1, %eax
je 0x2be82
leaq -0x60(%rbp), %r12
xorl %ebx, %ebx
movl $0x10, %edx
subq %rbx, %rdx
movl %r13d, %edi
movq %r12, %rsi
callq 0xb640
cmpq $-0x1, %rax
je 0x2be73
addq %rax, %rbx
addq %rax, %r12
cmpq $0x10, %rbx
jb 0x2be3d
movl %r13d, %edi
callq 0xb8b0
leaq 0xac9f(%rip), %rbx      # 0x36b10
jmp 0x2be91
movl %r13d, %edi
callq 0xb8b0
leaq 0xac8e(%rip), %rbx      # 0x36b10
callq 0xb060
movl (%rax), %edi
movq %r14, %rsi
callq 0x2bf5a
xorl %ecx, %ecx
testq %r14, %r14
je 0x2be9e
cmpl $0x0, (%r14)
jne 0x2bf1b
movl %ecx, %eax
shrl %eax
movsbl -0x60(%rbp,%rax), %eax
leal 0x1(%rcx), %esi
shll $0x2, %ecx
andb $0x4, %cl
sarl %cl, %eax
andl $0xf, %eax
movl (%rbx,%rax,4), %eax
movq -0x50(%rbp), %rdx
movl %eax, (%rdx,%r15,4)
movq -0x48(%rbp), %rax
movl %esi, %ecx
incq %r15
cmpq %rax, %r15
jb 0x2bdf3
testq %r14, %r14
je 0x2bee7
movl $0x0, (%r14)
callq 0x2c4e2
movq %rax, 0x8(%r14)
leaq -0x50(%rbp), %rsi
movq -0x30(%rbp), %rdi
xorl %edx, %edx
callq 0x2c03c
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bf08
callq 0xb430
movq -0x30(%rbp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0x6f7d(%rip), %rdx      # 0x32eaa
movq %rdx, %rsi
callq 0xf8ee
jmp 0x2bef6
jmp 0x2bf3d
jmp 0x2bf3d
jmp 0x2bf3d
movq %rax, %rbx
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bf52
callq 0xb430
movq %rbx, %rdi
callq 0xb7f0