// File: /workspace/github_cpp_makefile_star2_O2/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::load_graphicsmagick_external(char const*)
CImg<T>& load_graphicsmagick_external(const char *const filename) {
      if (!filename)
        throw CImgArgumentException(_cimg_instance
                                    "load_graphicsmagick_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 convert \"%s\" pnm:-",
                    cimg::graphicsmagick_path(),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_graphicsmagick_external(): Failed to load file '%s' with external command 'gm'.",
                                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 convert \"%s\" \"%s\"",
                    cimg::graphicsmagick_path(),s_filename.data(),
                    CImg<charT>::string(filetmp)._system_strescape().data());
      cimg::system(command,cimg::graphicsmagick_path());
      if (!(file = std::fopen(filetmp,"rb"))) {
        cimg::fclose(cimg::fopen(filename,"r"));
        throw CImgIOException(_cimg_instance
                              "load_graphicsmagick_external(): Failed to load file '%s' with external command 'gm'.",
                              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, 0x8(%rsp)
testq %rsi, %rsi
je 0x435d6
movq %rsi, %r14
leaq 0x31e6c(%rip), %rsi     # 0x7523b
movq %r14, %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 %r14, %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 0x29e41
movq 0x48(%rsp), %r8
leaq 0x34090(%rip), %rdx     # 0x774dd
leaq 0x250(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x4890
leaq 0x1d325(%rip), %rsi     # 0x60793
movq %rbx, %rdi
callq 0x4160
testq %rax, %rax
je 0x434a7
movq %rax, %r15
callq 0x9eac
movl (%rax), %ebx
callq 0x9eac
andl $0x0, (%rax)
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x38dfa
movq %r15, %rdi
callq 0x4740
jmp 0x435b5
leaq 0x33fa9(%rip), %r15     # 0x77457
leaq 0x50(%rsp), %r12
pushq $0x2f
popq %rbp
leaq 0x31d7e(%rip), %r13     # 0x7523b
xorl %edi, %edi
xorl %esi, %esi
callq 0x2a028
movq %rax, %rbx
callq 0x2a352
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4890
movq %r12, %rdi
movq %r13, %rsi
callq 0x45b0
testq %rax, %rax
je 0x43503
movq %rax, %rdi
callq 0x2a2f8
jmp 0x434bd
xorl %edi, %edi
xorl %esi, %esi
callq 0x29e41
movq %rax, %r15
movq 0x48(%rsp), %r12
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
pushq $0x1
popq %rdx
xorl %ecx, %ecx
callq 0x38750
leaq 0x10(%rsp), %rdi
callq 0x387b0
movq 0x18(%rax), %r9
leaq 0x34039(%rip), %rdx     # 0x77576
leaq 0x250(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x4890
leaq 0x10(%rsp), %rdi
callq 0xdba4
xorl %edi, %edi
xorl %esi, %esi
callq 0x29e41
leaq 0x250(%rsp), %rdi
movq %rax, %rsi
callq 0x2e487
leaq 0x31cba(%rip), %rsi     # 0x7523b
leaq 0x50(%rsp), %rdi
callq 0x45b0
testq %rax, %rax
je 0x43648
movq %rax, %rdi
callq 0x2a2f8
leaq 0x50(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x2cd3a
leaq 0x50(%rsp), %rdi
callq 0x4990
leaq 0x30(%rsp), %rdi
callq 0xdba4
movq 0x8(%rsp), %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 %rax, %r14
movq 0x8(%rsp), %rbx
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x111ec(%rip), %rax     # 0x547e8
leaq 0x125bf(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x31a89(%rip), %r11     # 0x7509f
leaq 0x33e54(%rip), %rsi     # 0x77471
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0x9d52
addq $0x20, %rsp
leaq 0x4c627(%rip), %rsi     # 0x8fc60
movq 0x4c998(%rip), %rdx     # 0x8ffd8
movq %r14, %rdi
callq 0x4910
leaq 0x1d144(%rip), %rsi     # 0x60793
movq %r14, %rdi
callq 0x2dca5
movq %rax, %rdi
callq 0x2a2f8
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
movq 0x8(%rsp), %rbx
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x11163(%rip), %rax     # 0x547e8
leaq 0x12536(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
leaq 0x31a04(%rip), %r11     # 0x7509f
leaq 0x33e51(%rip), %rsi     # 0x774f3
movq %r15, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0x2a3de
addq $0x20, %rsp
leaq 0x4c640(%rip), %rsi     # 0x8fd00
movq 0x4c911(%rip), %rdx     # 0x8ffd8
movq %r15, %rdi
callq 0x4910
jmp 0x43792
movq %rax, %rbx
movq %r15, %rdi
callq 0x4390
jmp 0x437c2
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xdba4
jmp 0x437c2
jmp 0x437bf
movq %rax, %rbx
movq %r14, %rdi
callq 0x4390
jmp 0x437cc
movq %rax, %rdi
callq 0x41d0
movq %r15, %rdi
callq 0x4740
callq 0x9eac
movl %ebx, (%rax)
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
movq 0x8(%rsp), %rbx
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x110a0(%rip), %rax     # 0x547e8
leaq 0x12473(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
leaq 0x31941(%rip), %r11     # 0x7509f
leaq 0x33d8e(%rip), %rsi     # 0x774f3
movq %r15, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0x2a3de
addq $0x20, %rsp
leaq 0x4c57d(%rip), %rsi     # 0x8fd00
movq 0x4c84e(%rip), %rdx     # 0x8ffd8
movq %r15, %rdi
callq 0x4910
movq %rax, %rbx
movq %r15, %rdi
callq 0x4390
jmp 0x437a2
movq %rax, %rbx
callq 0x48d0
jmp 0x437c2
movq %rax, %rdi
callq 0x7f6f
jmp 0x437bf
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
jmp 0x437c7
jmp 0x437bf
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xdba4
movq %rbx, %rdi
callq 0x4950