// File: /workspace/github_cpp_makefile_star2_O1/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 $0x48, %rsp
movq %rdx, %r14
movq %rdi, -0x30(%rbp)
leaq -0x58(%rbp), %rbx
movq %rbx, %rdi
callq 0x2c300
movaps 0xaa85(%rip), %xmm0     # 0x36b60
movaps %xmm0, -0x70(%rbp)
cmpq $0x0, 0x8(%rbx)
je 0x2c205
movl $0x20, %ecx
leaq 0xaa1a(%rip), %rsi      # 0x36b10
xorl %r15d, %r15d
movq %r14, -0x38(%rbp)
movq -0x58(%rbp), %rax
cmpl $0x25, (%rax,%r15,4)
jne 0x2c1f8
cmpl $0x20, %ecx
jne 0x2c1d4
leaq 0xa9ad(%rip), %rdi      # 0x36ac9
xorl %esi, %esi
xorl %eax, %eax
callq 0xb370
movl %eax, %r13d
cmpl $-0x1, %eax
jne 0x2c145
leaq 0xa9a2(%rip), %rdi      # 0x36ad6
xorl %esi, %esi
xorl %eax, %eax
callq 0xb370
movl %eax, %r13d
cmpl $-0x1, %eax
je 0x2c1a0
xorl %r14d, %r14d
leaq -0x70(%rbp), %r12
cmpq $0xf, %r14
ja 0x2c196
movl $0x10, %edx
subq %r14, %rdx
movl %r13d, %edi
movq %r12, %rsi
callq 0xb640
movq %rax, %rbx
cmpq $-0x1, %rax
je 0x2c176
addq %rbx, %r14
addq %rbx, %r12
jmp 0x2c18e
movl %r13d, %edi
callq 0xb8b0
callq 0xb060
movl (%rax), %edi
movq -0x38(%rbp), %rsi
callq 0x2c28d
cmpq $-0x1, %rbx
jne 0x2c14c
jmp 0x2c1b0
movl %r13d, %edi
callq 0xb8b0
jmp 0x2c1b0
callq 0xb060
movl (%rax), %edi
movq -0x38(%rbp), %rsi
callq 0x2c28d
xorl %ecx, %ecx
movq -0x38(%rbp), %r14
testq %r14, %r14
je 0x2c1cd
cmpl $0x0, (%r14)
leaq 0xa94a(%rip), %rsi      # 0x36b10
je 0x2c1d4
jmp 0x2c24e
leaq 0xa93c(%rip), %rsi      # 0x36b10
movl %ecx, %eax
shrl %eax
movsbl -0x70(%rbp,%rax), %eax
leal 0x1(%rcx), %edx
shll $0x2, %ecx
andb $0x4, %cl
sarl %cl, %eax
andl $0xf, %eax
movl (%rsi,%rax,4), %eax
movq -0x58(%rbp), %rcx
movl %eax, (%rcx,%r15,4)
movl %edx, %ecx
incq %r15
cmpq -0x50(%rbp), %r15
jb 0x2c0fd
testq %r14, %r14
je 0x2c21a
movl $0x0, (%r14)
callq 0x2c80a
movq %rax, 0x8(%r14)
leaq -0x58(%rbp), %rsi
movq -0x30(%rbp), %rdi
xorl %edx, %edx
callq 0x2c36e
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c23b
callq 0xb430
movq -0x30(%rbp), %rax
addq $0x48, %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 0x6c4a(%rip), %rdx      # 0x32eaa
movq %rdx, %rsi
callq 0xf97e
jmp 0x2c229
jmp 0x2c270
jmp 0x2c270
jmp 0x2c270
movq %rax, %rbx
leaq -0x48(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2c285
callq 0xb430
movq %rbx, %rdi
callq 0xb7f0