// File: /workspace/github_cpp_makefile_star2_O1/demon386[P]git-store/./libs/filesystem/src/operations.cpp
// Function: boost::filesystem::detail::temp_directory_path(boost::system::error_code*)
BOOST_FILESYSTEM_DECL
  path temp_directory_path(system::error_code* ec)
  {
#   ifdef BOOST_POSIX_API
      const char* val = 0;
      
      (val = std::getenv("TMPDIR" )) ||
      (val = std::getenv("TMP"    )) ||
      (val = std::getenv("TEMP"   )) ||
      (val = std::getenv("TEMPDIR"));
      
#     ifdef __ANDROID__
        const char* default_tmp = "/data/local/tmp";
#     else
        const char* default_tmp = "/tmp";
#     endif
      path p((val!=0) ? val : default_tmp);
       
      if (p.empty() || (ec&&!is_directory(p, *ec))||(!ec&&!is_directory(p)))
      {
        error(ENOTDIR, p, ec, "boost::filesystem::temp_directory_path");
        return p;
      }
        
      return p;
      
#   else  // Windows

      const wchar_t* tmp_env = L"TMP";
      const wchar_t* temp_env = L"TEMP";
      const wchar_t* localappdata_env = L"LOCALAPPDATA";
      const wchar_t* userprofile_env = L"USERPROFILE";
      const wchar_t* env_list[]
        = {tmp_env, temp_env, localappdata_env, userprofile_env, 0};

      path p;
      for (int i = 0; env_list[i]; ++i)
      {
        std::wstring env = wgetenv(env_list[i]);
        if (!env.empty())
        {
          p = env;
          if (i >= 2)
            p /= L"Temp";
          error_code lcl_ec;
          if (exists(p, lcl_ec) && !lcl_ec && is_directory(p, lcl_ec) && !lcl_ec)
            break;
          p.clear();
        }
      }

      if (p.empty())
      {
        // use vector since in C++03 a string is not required to be contiguous
        std::vector<wchar_t> buf(::GetWindowsDirectoryW(NULL, 0));

        if (buf.empty()
          || ::GetWindowsDirectoryW(&buf[0], static_cast<UINT>(buf.size())) == 0)
        {
          error(::GetLastError(), ec, "boost::filesystem::temp_directory_path");
          return path();
        }
        p = &*buf.begin();  // do not depend on buf.size(); see ticket #10388
        p /= L"Temp";
      }
      return p;

#   endif
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xd3fb(%rip), %rdi      # 0x35f43
callq 0xb550
testq %rax, %rax
jne 0x28b80
leaq 0xd3f1(%rip), %rdi      # 0x35f4a
callq 0xb550
testq %rax, %rax
jne 0x28b80
leaq 0xd3e4(%rip), %rdi      # 0x35f4e
callq 0xb550
testq %rax, %rax
jne 0x28b80
leaq 0xd3d8(%rip), %rdi      # 0x35f53
callq 0xb550
testq %rax, %rax
leaq 0xd3d1(%rip), %rsi      # 0x35f5b
cmovneq %rax, %rsi
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
callq 0xb1c0
cmpq $0x0, 0x8(%rbx)
je 0x28bc2
testq %r14, %r14
je 0x28bb3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28975
jmp 0x28bbd
movq %rbx, %rdi
xorl %esi, %esi
callq 0x28975
cmpl $0x3, %eax
je 0x28c03
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xd38f(%rip), %rsi      # 0x35f60
leaq 0xd3ae(%rip), %rdx      # 0x35f86
leaq -0x38(%rbp), %rdi
callq 0xf97e
leaq -0x38(%rbp), %rcx
movl $0x14, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x27ab3
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x28c03
callq 0xb430
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28c26
movq %rax, %r14
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x28c29
callq 0xb430
jmp 0x28c29
movq %rax, %r14
movq (%rbx), %rdi
addq $0x10, %rbx
cmpq %rbx, %rdi
je 0x28c3a
callq 0xb430
movq %r14, %rdi
callq 0xb7f0