// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::cimg::temporary_path(char const*, bool)
inline const char* temporary_path(const char *const user_path=0, const bool reinit_path=false) {
#define _cimg_test_temporary_path(p) \
      if (!path_found) { \
        cimg_snprintf(s_path,1024,"%s",p); \
        cimg_snprintf(tmp,sizeof(tmp),"%s%c%s",s_path,cimg_file_separator,filetmp); \
        if ((file=std::fopen(tmp,"wb"))!=0) { cimg::fclose(file); std::remove(tmp); path_found = true; } \
      }
      static char *s_path = 0;
      cimg::mutex(7);
      if (reinit_path) { delete[] s_path; s_path = 0; }
      if (user_path) {
        if (!s_path) s_path = new char[1024];
        std::memset(s_path,0,1024);
        std::strncpy(s_path,user_path,1023);
      } else if (!s_path) {
        s_path = new char[1024];
        std::memset(s_path,0,1024);
        bool path_found = false;
        char tmp[1024] = { 0 }, filetmp[512] = { 0 };
        std::FILE *file = 0;
        cimg_snprintf(filetmp,sizeof(filetmp),"%s.tmp",cimg::filenamerand());
        char *tmpPath = std::getenv("TMP");
        if (!tmpPath) { tmpPath = std::getenv("TEMP"); winformat_string(tmpPath); }
        if (tmpPath) _cimg_test_temporary_path(tmpPath);
#if cimg_OS==2
        _cimg_test_temporary_path("C:\\WINNT\\Temp");
        _cimg_test_temporary_path("C:\\WINDOWS\\Temp");
        _cimg_test_temporary_path("C:\\Temp");
        _cimg_test_temporary_path("C:");
        _cimg_test_temporary_path("D:\\WINNT\\Temp");
        _cimg_test_temporary_path("D:\\WINDOWS\\Temp");
        _cimg_test_temporary_path("D:\\Temp");
        _cimg_test_temporary_path("D:");
#else
        _cimg_test_temporary_path("/tmp");
        _cimg_test_temporary_path("/var/tmp");
#endif
        if (!path_found) {
          *s_path = 0;
          std::strncpy(tmp,filetmp,sizeof(tmp)-1);
          if ((file=std::fopen(tmp,"wb"))!=0) { cimg::fclose(file); std::remove(tmp); path_found = true; }
        }
        if (!path_found) {
          cimg::mutex(7,0);
          throw CImgIOException("cimg::temporary_path(): Failed to locate path for writing temporary files.\n");
        }
      }
      cimg::mutex(7,0);
      return s_path;
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x600, %rsp            # imm = 0x600
movl %esi, %ebp
movq %rdi, %rbx
movb 0x75a49(%rip), %al      # 0xada98
testb %al, %al
je 0x383fa
leaq 0x75652(%rip), %rdi     # 0xad6b0
callq 0x4790
testb %bpl, %bpl
je 0x38084
movq 0x77d21(%rip), %rdi     # 0xafd90
testq %rdi, %rdi
je 0x38079
callq 0x4680
movq $0x0, 0x77d0c(%rip) # 0xafd90
movq 0x77d05(%rip), %rax     # 0xafd90
testq %rbx, %rbx
je 0x380d1
testq %rax, %rax
jne 0x380a6
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x77cea(%rip)     # 0xafd90
movq 0x77ce3(%rip), %r14     # 0xafd90
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x4290
movl $0x3ff, %edx            # imm = 0x3FF
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4240
jmp 0x383d1
testq %rax, %rax
jne 0x383d1
movl $0x400, %edi            # imm = 0x400
callq 0x4040
movq %rax, 0x77ca5(%rip)     # 0xafd90
movl $0x400, %edx            # imm = 0x400
movq %rax, %rdi
xorl %esi, %esi
callq 0x4290
leaq 0x200(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x4290
movq %rsp, %rbx
movl $0x200, %edx            # imm = 0x200
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4290
callq 0x384af
leaq 0x5b9ea(%rip), %rdx     # 0x93b16
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x4880
leaq 0x5b9d8(%rip), %rdi     # 0x93b1d
callq 0x45e0
testq %rax, %rax
jne 0x3815b
leaq 0x5b9cb(%rip), %rdi     # 0x93b21
callq 0x45e0
testq %rax, %rax
je 0x3820b
movq 0x77c25(%rip), %rdi     # 0xafd90
leaq 0x5d28f(%rip), %rdx     # 0x95401
xorl %ebp, %ebp
movl $0x400, %esi            # imm = 0x400
movq %rax, %rcx
xorl %eax, %eax
callq 0x4880
movq 0x77c06(%rip), %rcx     # 0xafd90
leaq 0x5b995(%rip), %rdx     # 0x93b26
leaq 0x200(%rsp), %rbx
movq %rsp, %r9
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movl $0x2f, %r8d
xorl %eax, %eax
callq 0x4880
leaq 0x5b975(%rip), %rsi     # 0x93b2d
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
je 0x3820d
movq 0x74ddc(%rip), %rcx     # 0xacfa8
cmpq %rax, (%rcx)
je 0x381f9
movq 0x74db0(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x381f9
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x381f9
leaq 0x5b8dc(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
leaq 0x200(%rsp), %rdi
callq 0x49a0
movb $0x1, %bpl
jmp 0x3820d
xorl %ebp, %ebp
testb %bpl, %bpl
jne 0x382ad
movq 0x77b73(%rip), %rax     # 0xafd90
movb $0x0, 0x4(%rax)
movl $0x706d742f, (%rax)     # imm = 0x706D742F
movq 0x77b62(%rip), %rcx     # 0xafd90
leaq 0x5b8f1(%rip), %rdx     # 0x93b26
leaq 0x200(%rsp), %rbx
movq %rsp, %r9
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movl $0x2f, %r8d
xorl %eax, %eax
callq 0x4880
leaq 0x5b8d1(%rip), %rsi     # 0x93b2d
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
je 0x382ad
movq 0x74d38(%rip), %rcx     # 0xacfa8
cmpq %rax, (%rcx)
je 0x3829d
movq 0x74d0c(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x3829d
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x3829d
leaq 0x5b838(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
leaq 0x200(%rsp), %rdi
callq 0x49a0
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x3834d
movq 0x77ad3(%rip), %rcx     # 0xafd90
movabsq $0x706d742f7261762f, %rax # imm = 0x706D742F7261762F
movq %rax, (%rcx)
movb $0x0, 0x8(%rcx)
leaq 0x5b851(%rip), %rdx     # 0x93b26
leaq 0x200(%rsp), %rbx
movq %rsp, %r9
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movl $0x2f, %r8d
xorl %eax, %eax
callq 0x4880
leaq 0x5b831(%rip), %rsi     # 0x93b2d
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
je 0x3834d
movq 0x74c98(%rip), %rcx     # 0xacfa8
cmpq %rax, (%rcx)
je 0x3833d
movq 0x74c6c(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x3833d
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x3833d
leaq 0x5b798(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
leaq 0x200(%rsp), %rdi
callq 0x49a0
movb $0x1, %bpl
testb %bpl, %bpl
jne 0x383cc
movq 0x77a37(%rip), %rax     # 0xafd90
movb $0x0, (%rax)
leaq 0x200(%rsp), %rbx
movq %rsp, %rsi
movl $0x3ff, %edx            # imm = 0x3FF
movq %rbx, %rdi
callq 0x4240
leaq 0x5b7b2(%rip), %rsi     # 0x93b2d
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
je 0x383cc
movq 0x74c19(%rip), %rcx     # 0xacfa8
cmpq %rax, (%rcx)
je 0x383bc
movq 0x74bed(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x383bc
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x383bc
leaq 0x5b719(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
leaq 0x200(%rsp), %rdi
callq 0x49a0
movb $0x1, %bpl
testb %bpl, %bpl
je 0x3840b
movb 0x756c1(%rip), %al      # 0xada98
testb %al, %al
je 0x38404
leaq 0x752ce(%rip), %rdi     # 0xad6b0
callq 0x43e0
movq 0x779a2(%rip), %rax     # 0xafd90
addq $0x600, %rsp            # imm = 0x600
popq %rbx
popq %r14
popq %rbp
retq
callq 0x5382
jmp 0x38057
callq 0x53d2
jmp 0x383db
movl $0x7, %edi
xorl %esi, %esi
callq 0xc87e
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %rbx
leaq 0x5b70e(%rip), %rsi     # 0x93b39
movq %rax, %rdi
xorl %eax, %eax
callq 0x385b4
leaq 0x748b4(%rip), %rsi     # 0xaccf0
movq 0x74b8d(%rip), %rdx     # 0xacfd0
movq %rbx, %rdi
callq 0x4900
movq %rax, %r14
movq %rbx, %rdi
callq 0x43b0
movq %r14, %rdi
callq 0x4950