// File: /workspace/github_cpp_makefile_star2_O2/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::load_imagemagick_external(char const*)
CImg<T>& load_imagemagick_external(const char *const filename) {
      if (!filename)
        throw CImgArgumentException(_cimg_instance
                                    "load_imagemagick_external(): Specified filename is (null).",
                                    cimg_instance);
      std::fclose(cimg::fopen(filename,"rb"));            // Check if file exists.
      char command[1024] = { 0 }, filetmp[512] = { 0 };
      std::FILE *file = 0;
      const CImg<charT> s_filename = CImg<charT>::string(filename)._system_strescape();
#if cimg_OS==1
      cimg_snprintf(command,sizeof(command),"%s%s \"%s\" pnm:-",
                    cimg::imagemagick_path(),
                    !cimg::strcasecmp(cimg::split_filename(filename),"pdf")?" -density 400x400":"",
                    s_filename.data());
      file = popen(command,"r");
      if (file) {
        const unsigned int omode = cimg::exception_mode();
        cimg::exception_mode() = 0;
        try { load_pnm(file); } catch (...) {
          pclose(file);
          cimg::exception_mode() = omode;
          throw CImgIOException(_cimg_instance
                                "load_imagemagick_external(): Failed to load file '%s' with "
                                "external command 'convert'.",
                                cimg_instance,
                                filename);
        }
        pclose(file);
        return *this;
      }
#endif
      do {
        cimg_snprintf(filetmp,sizeof(filetmp),"%s%c%s.pnm",
                      cimg::temporary_path(),cimg_file_separator,cimg::filenamerand());
        if ((file=std::fopen(filetmp,"rb"))!=0) cimg::fclose(file);
      } while (file);
      cimg_snprintf(command,sizeof(command),"%s%s \"%s\" \"%s\"",
                    cimg::imagemagick_path(),
                    !cimg::strcasecmp(cimg::split_filename(filename),"pdf")?" -density 400x400":"",
                    s_filename.data(),CImg<charT>::string(filetmp)._system_strescape().data());
      cimg::system(command,cimg::imagemagick_path());
      if (!(file = std::fopen(filetmp,"rb"))) {
        cimg::fclose(cimg::fopen(filename,"r"));
        throw CImgIOException(_cimg_instance
                              "load_imagemagick_external(): Failed to load file '%s' with external command 'convert'.",
                              cimg_instance,
                              filename);

      } else cimg::fclose(file);
      load_pnm(filetmp);
      std::remove(filetmp);
      return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x658, %rsp            # imm = 0x658
movq %rdi, %r14
testq %rsi, %rsi
je 0x431b0
movq %rsi, %r15
leaq 0x32306(%rip), %rsi     # 0x7523b
movq %r15, %rdi
callq 0x2dca5
movq %rax, %rdi
callq 0x4530
leaq 0x250(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x4280
leaq 0x50(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x4280
leaq 0x10(%rsp), %rbx
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r15, (%rsp)
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x38750
movq %rbx, %rdi
callq 0x387b0
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x38b58
leaq 0x10(%rsp), %rdi
callq 0xdba4
xorl %edi, %edi
xorl %esi, %esi
callq 0x29d46
movq %rax, %rbx
movq %r14, 0x8(%rsp)
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x2cc28
leaq 0x343f7(%rip), %rsi     # 0x773bc
movq %rax, %rdi
callq 0x2ccbe
testl %eax, %eax
leaq 0x343ea(%rip), %r15     # 0x773c0
leaq 0x1180b(%rip), %r12     # 0x547e8
movq %r12, %r8
cmoveq %r15, %r8
movq 0x48(%rsp), %r9
leaq 0x343bc(%rip), %rdx     # 0x773ac
leaq 0x250(%rsp), %r14
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4890
leaq 0x1d782(%rip), %rsi     # 0x60793
movq %r14, %rdi
callq 0x4160
testq %rax, %rax
je 0x4304d
movq %rax, %rbx
callq 0x9eac
movl (%rax), %ebp
callq 0x9eac
andl $0x0, (%rax)
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x38dfa
movq %rbx, %rdi
callq 0x4740
jmp 0x43191
leaq 0x34403(%rip), %r12     # 0x77457
leaq 0x50(%rsp), %r13
pushq $0x2f
popq %rbp
leaq 0x321d8(%rip), %rbx     # 0x7523b
xorl %edi, %edi
xorl %esi, %esi
callq 0x2a028
movq %rax, %r14
callq 0x2a352
movl $0x200, %esi            # imm = 0x200
movq %r13, %rdi
movq %r12, %rdx
movq %r14, %rcx
movl %ebp, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4890
movq %r13, %rdi
movq %rbx, %rsi
callq 0x45b0
testq %rax, %rax
je 0x430a9
movq %rax, %rdi
callq 0x2a2f8
jmp 0x43063
xorl %edi, %edi
xorl %esi, %esi
callq 0x29d46
movq 0x8(%rsp), %r14
movq %rax, %r12
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x2cc28
leaq 0x342f0(%rip), %rsi     # 0x773bc
movq %rax, %rdi
callq 0x2ccbe
testl %eax, %eax
leaq 0x1170b(%rip), %rax     # 0x547e8
cmovneq %rax, %r15
movq 0x48(%rsp), %rbx
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
callq 0x38750
leaq 0x10(%rsp), %rdi
callq 0x387b0
movq %rax, %r10
subq $0x8, %rsp
leaq 0x34350(%rip), %rdx     # 0x77462
leaq 0x258(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r12, %rcx
movq %r15, %r8
movq %rbx, %r9
xorl %eax, %eax
pushq 0x18(%r10)
callq 0x4890
popq %rcx
popq %rdx
leaq 0x10(%rsp), %rdi
callq 0xdba4
xorl %edi, %edi
xorl %esi, %esi
callq 0x29d46
leaq 0x250(%rsp), %rdi
movq %rax, %rsi
callq 0x2e487
leaq 0x320dc(%rip), %rsi     # 0x7523b
leaq 0x50(%rsp), %rdi
callq 0x45b0
testq %rax, %rax
je 0x43220
movq %rax, %rdi
callq 0x2a2f8
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0x2cd3a
leaq 0x50(%rsp), %rdi
callq 0x4990
leaq 0x30(%rsp), %rdi
callq 0xdba4
movq %r14, %rax
addq $0x658, %rsp            # imm = 0x658
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %r14, %rbx
movq %rax, %r14
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x11614(%rip), %rax     # 0x547e8
leaq 0x129e7(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x31eb1(%rip), %r11     # 0x7509f
leaq 0x3414e(%rip), %rsi     # 0x77343
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0x9d52
addq $0x20, %rsp
leaq 0x4ca4f(%rip), %rsi     # 0x8fc60
movq 0x4cdc0(%rip), %rdx     # 0x8ffd8
movq %r14, %rdi
callq 0x4910
leaq 0x1d56c(%rip), %rsi     # 0x60793
movq (%rsp), %rdi
callq 0x2dca5
movq %rax, %rdi
callq 0x2a2f8
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
movl (%r14), %edx
movl 0x4(%r14), %ecx
movl 0x8(%r14), %r8d
movl 0xc(%r14), %r9d
leaq 0x12967(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%r14)
leaq 0x11581(%rip), %rax     # 0x547e8
cmovneq %rax, %r10
leaq 0x31e2d(%rip), %r11     # 0x7509f
leaq 0x34159(%rip), %rsi     # 0x773d2
movq %r15, %rdi
xorl %eax, %eax
pushq (%rsp)
pushq %r11
pushq %r10
pushq 0x18(%r14)
callq 0x2a3de
addq $0x20, %rsp
leaq 0x4ca67(%rip), %rsi     # 0x8fd00
movq 0x4cd38(%rip), %rdx     # 0x8ffd8
movq %r15, %rdi
callq 0x4910
jmp 0x43364
movq %rax, %rbx
movq %r15, %rdi
callq 0x4390
jmp 0x43394
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xdba4
jmp 0x43394
jmp 0x43391
movq %rax, %rbx
movq %r14, %rdi
callq 0x4390
jmp 0x4339e
movq %rax, %rdi
callq 0x41d0
movq %rbx, %rdi
callq 0x4740
callq 0x9eac
movl %ebp, (%rax)
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
movl (%r14), %edx
movl 0x4(%r14), %ecx
movl 0x8(%r14), %r8d
movl 0xc(%r14), %r9d
leaq 0x128a4(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%r14)
cmovneq %r12, %r10
leaq 0x31d71(%rip), %r11     # 0x7509f
leaq 0x3409d(%rip), %rsi     # 0x773d2
movq %rax, %rdi
xorl %eax, %eax
pushq (%rsp)
pushq %r11
pushq %r10
pushq 0x18(%r14)
callq 0x2a3de
addq $0x20, %rsp
leaq 0x4c9ab(%rip), %rsi     # 0x8fd00
movq 0x4cc7c(%rip), %rdx     # 0x8ffd8
movq %r15, %rdi
callq 0x4910
movq %rax, %rbx
movq %r15, %rdi
callq 0x4390
jmp 0x43374
movq %rax, %rbx
callq 0x48d0
jmp 0x43394
movq %rax, %rdi
callq 0x7f6f
jmp 0x43391
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x43399
jmp 0x43391
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xdba4
movq %rbx, %rdi
callq 0x4950