// File: /workspace/github_cpp_makefile_star2_O1/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, %r13
testq %rsi, %rsi
je 0x5bfe8
movq %rsi, %r14
cmpb $0x2d, (%rsi)
jne 0x5bca3
movzbl 0x1(%r14), %eax
cmpl $0x2e, %eax
je 0x5bc97
testl %eax, %eax
jne 0x5bca3
movq 0x5130a(%rip), %rax     # 0xacfa8
movq (%rax), %rdi
jmp 0x5bcb5
leaq 0x3810b(%rip), %rsi     # 0x93db5
movq %r14, %rdi
callq 0x45c0
movq %rax, %rdi
testq %rdi, %rdi
je 0x5c05a
callq 0x4540
leaq 0x250(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x4290
leaq 0x50(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x4290
movq %r14, %rdi
callq 0x41e0
leal 0x1(%rax), %edx
subq $0x8, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
callq 0x106cc
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x4b1dc
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x4b77c
cmpb $0x0, 0x10(%rsp)
jne 0x5bd49
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5bd49
callq 0x4680
xorl %edi, %edi
xorl %esi, %esi
callq 0x37d68
movq 0x48(%rsp), %r8
leaq 0x3a2f9(%rip), %rdx     # 0x96057
leaq 0x250(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x4880
leaq 0x23564(%rip), %rsi     # 0x7f2e3
movq %rbx, %rdi
callq 0x4140
testq %rax, %rax
je 0x5bdc3
movq %rax, %r15
xorl %edi, %edi
xorl %esi, %esi
callq 0xc824
movl (%rax), %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0xc824
movl $0x0, (%rax)
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x48e80
movq %r15, %rdi
callq 0x4730
jmp 0x5bfbd
movq %r14, 0x20(%rsp)
movq %r13, 0x28(%rsp)
leaq 0x3a1fd(%rip), %r15     # 0x95fd1
leaq 0x50(%rsp), %r12
leaq 0x37fd5(%rip), %r13     # 0x93db5
movq 0x511c1(%rip), %r14     # 0xacfa8
leaq 0x37cde(%rip), %rbp     # 0x93acc
xorl %edi, %edi
xorl %esi, %esi
callq 0x38039
movq %rax, %rbx
callq 0x384af
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x2f, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4880
movq %r12, %rdi
movq %r13, %rsi
callq 0x45c0
testq %rax, %rax
je 0x5be58
cmpq %rax, (%r14)
je 0x5bdee
movq 0x5114f(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x5bdee
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x5bdee
movq %rbp, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
jmp 0x5bdee
xorl %edi, %edi
xorl %esi, %esi
callq 0x37d68
movq 0x28(%rsp), %r13
movq 0x20(%rsp), %rbp
movq %rax, %r15
movq 0x48(%rsp), %r12
leaq 0x50(%rsp), %rbx
movq %rbx, %rdi
callq 0x41e0
leal 0x1(%rax), %edx
subq $0x8, %rsp
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq $0x0
callq 0x106cc
addq $0x10, %rsp
movq %rsp, %rdi
callq 0x4b1dc
movq 0x18(%rax), %r9
leaq 0x3a232(%rip), %rdx     # 0x960f0
leaq 0x250(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x4880
cmpb $0x0, 0x10(%rsp)
jne 0x5beee
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5beee
callq 0x4680
xorl %edi, %edi
xorl %esi, %esi
callq 0x37d68
leaq 0x250(%rsp), %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x5bf5d
addl $0x10, %eax
movq %rax, %rdi
callq 0x4040
movq %rax, %r12
leaq 0x250(%rsp), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x4240
movabsq $0x7665642f203e3220, %rax # imm = 0x7665642F203E3220
movq %rax, (%r12,%r15)
movabsq $0x6c6c756e2f7665, %rax # imm = 0x6C6C756E2F7665
movq %rax, 0x6(%r12,%r15)
movq %r12, %rdi
callq 0x4480
movq %r12, %rdi
callq 0x4680
leaq 0x37e51(%rip), %rsi     # 0x93db5
leaq 0x50(%rsp), %rdi
callq 0x45c0
testq %rax, %rax
je 0x5c098
cmpq %rax, (%r14)
je 0x5bfa4
movq 0x51005(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x5bfa4
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x5bfa4
leaq 0x37b31(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
leaq 0x50(%rsp), %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x48e80
leaq 0x50(%rsp), %rdi
callq 0x49a0
cmpb $0x0, 0x40(%rsp)
jne 0x5bfd3
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x5bfd3
callq 0x4680
movq %r13, %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
movl (%r13), %edx
movl 0x4(%r13), %ecx
movl 0x8(%r13), %r8d
movl 0xc(%r13), %r9d
leaq 0x1732c(%rip), %rax     # 0x73338
leaq 0x186ff(%rip), %r10     # 0x74712
cmpb $0x0, 0x10(%r13)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x37bc8(%rip), %r11     # 0x93bef
leaq 0x39fbd(%rip), %rsi     # 0x95feb
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%r13)
callq 0xc196
addq $0x20, %rsp
leaq 0x50bd5(%rip), %rsi     # 0xacc20
movq 0x50f7e(%rip), %rdx     # 0xacfd0
movq %r14, %rdi
callq 0x4900
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
leaq 0x39be4(%rip), %rsi     # 0x95c52
leaq 0x37d40(%rip), %rcx     # 0x93db5
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x385b4
leaq 0x50c67(%rip), %rsi     # 0xaccf0
movq 0x50f40(%rip), %rdx     # 0xacfd0
movq %r15, %rdi
callq 0x4900
leaq 0x23244(%rip), %rsi     # 0x7f2e3
movq %rbp, %rdi
callq 0x3ceb3
movq %rax, %rdi
callq 0x3845e
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
movl (%r13), %edx
movl 0x4(%r13), %ecx
movl 0x8(%r13), %r8d
movl 0xc(%r13), %r9d
leaq 0x17265(%rip), %rax     # 0x73338
leaq 0x18638(%rip), %r10     # 0x74712
cmpb $0x0, 0x10(%r13)
cmovneq %rax, %r10
leaq 0x37b05(%rip), %r11     # 0x93bef
leaq 0x39f7c(%rip), %rsi     # 0x9606d
movq %r15, %rdi
xorl %eax, %eax
pushq %rbp
pushq %r11
pushq %r10
pushq 0x18(%r13)
callq 0x385b4
addq $0x20, %rsp
leaq 0x50be1(%rip), %rsi     # 0xaccf0
movq 0x50eba(%rip), %rdx     # 0xacfd0
movq %r15, %rdi
callq 0x4900
jmp 0x5c201
movq %rax, %rbx
movq %r15, %rdi
callq 0x43b0
jmp 0x5c23d
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x5c23d
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5c23d
callq 0x4680
jmp 0x5c23d
jmp 0x5c23a
movq %rax, %rbx
movq %r15, %rdi
jmp 0x5c16c
movq %rax, %rbx
movq %r14, %rdi
callq 0x43b0
jmp 0x5c253
movq %rax, %rdi
callq 0x41d0
movq %r15, %rdi
callq 0x4730
xorl %edi, %edi
xorl %esi, %esi
callq 0xc824
movl %ebx, (%rax)
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
movl (%r13), %edx
movl 0x4(%r13), %ecx
movl 0x8(%r13), %r8d
movl 0xc(%r13), %r9d
leaq 0x17183(%rip), %rax     # 0x73338
leaq 0x18556(%rip), %r10     # 0x74712
cmpb $0x0, 0x10(%r13)
cmovneq %rax, %r10
leaq 0x37a23(%rip), %r11     # 0x93bef
leaq 0x39e9a(%rip), %rsi     # 0x9606d
movq %r15, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
pushq 0x18(%r13)
callq 0x385b4
addq $0x20, %rsp
leaq 0x50afe(%rip), %rsi     # 0xaccf0
movq 0x50dd7(%rip), %rdx     # 0xacfd0
movq %r15, %rdi
callq 0x4900
movq %rax, %rbx
movq %r15, %rdi
callq 0x43b0
jmp 0x5c211
movq %rax, %rbx
callq 0x48c0
jmp 0x5c23d
movq %rax, %rdi
callq 0xa08f
jmp 0x5c23a
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x5c253
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5c253
jmp 0x5c24e
jmp 0x5c23a
movq %rax, %rbx
cmpb $0x0, 0x40(%rsp)
jne 0x5c253
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x5c253
callq 0x4680
movq %rbx, %rdi
callq 0x4950
nop