// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::cimg::medcon_path(char const*, bool)
inline const char* medcon_path(const char *const user_path=0, const bool reinit_path=false) {
      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;
        std::FILE *file = 0;
#if cimg_OS==2
        const char *const pf_path = programfiles_path();
        if (!path_found) {
          std::strcpy(s_path,".\\medcon.exe");
          if ((file=std::fopen(s_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) {
          cimg_snprintf(s_path,sizeof(s_path),"%s\\XMedCon\\bin\\medcon.bat",pf_path);
          if ((file=std::fopen(s_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) {
          cimg_snprintf(s_path,sizeof(s_path),"%s\\XMedCon\\bin\\medcon.exe",pf_path);
          if ((file=std::fopen(s_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) {
          std::strcpy(s_path,"C:\\XMedCon\\bin\\medcon.exe");
          if ((file=std::fopen(s_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(s_path,"medcon.exe");
#else
        if (!path_found) {
          std::strcpy(s_path,"./medcon");
          if ((file=std::fopen(s_path,"r"))!=0) { cimg::fclose(file); path_found = true; }
        }
        if (!path_found) std::strcpy(s_path,"medcon");
#endif
        winformat_string(s_path);
      }
      cimg::mutex(7,0);
      return s_path;
    }

// Assembly:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
movl $0x7, %edi
movl $0x1, %esi
callq 0x12d30
testb $0x1, 0x1f(%rsp)
je 0x5c16f
movq 0xa6c59(%rip), %rax     # 0x102da8
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x5c164
movq 0x8(%rsp), %rdi
callq 0x5680
movq $0x0, 0xa6c39(%rip) # 0x102da8
cmpq $0x0, 0x20(%rsp)
je 0x5c1c0
cmpq $0x0, 0xa6c29(%rip)     # 0x102da8
jne 0x5c192
movl $0x400, %edi            # imm = 0x400
callq 0x5040
movq %rax, 0xa6c16(%rip)     # 0x102da8
movq 0xa6c0f(%rip), %rdi     # 0x102da8
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x52a0
movq 0xa6bfc(%rip), %rdi     # 0x102da8
movq 0x20(%rsp), %rsi
movl $0x3ff, %edx            # imm = 0x3FF
callq 0x5270
jmp 0x5c271
cmpq $0x0, 0xa6be0(%rip)     # 0x102da8
jne 0x5c26f
movl $0x400, %edi            # imm = 0x400
callq 0x5040
movq %rax, 0xa6bc9(%rip)     # 0x102da8
movq 0xa6bc2(%rip), %rdi     # 0x102da8
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x52a0
movb $0x0, 0x1e(%rsp)
movq $0x0, 0x10(%rsp)
testb $0x1, 0x1e(%rsp)
jne 0x5c249
movq 0xa6b9a(%rip), %rdi     # 0x102da8
leaq 0x8cccb(%rip), %rsi     # 0xe8ee0
callq 0x54d0
movq 0xa6b87(%rip), %rdi     # 0x102da8
leaq 0x7848a(%rip), %rsi     # 0xd46b2
callq 0x55c0
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x5c247
movq 0x10(%rsp), %rdi
callq 0x5c6f0
movb $0x1, 0x1e(%rsp)
jmp 0x5c249
testb $0x1, 0x1e(%rsp)
jne 0x5c263
movq 0xa6b51(%rip), %rdi     # 0x102da8
leaq 0x8cc84(%rip), %rsi     # 0xe8ee2
callq 0x54d0
movq 0xa6b3e(%rip), %rdi     # 0x102da8
callq 0x5c780
jmp 0x5c271
movl $0x7, %edi
xorl %esi, %esi
callq 0x12d30
movq 0xa6b24(%rip), %rax     # 0x102da8
addq $0x28, %rsp
retq
nopl (%rax)