// File: /workspace/github_cpp_makefile_star2_O3/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 0x59488
movq %rsi, %r14
cmpb $0x2d, (%rsi)
jne 0x59143
movzbl 0x1(%r14), %eax
cmpl $0x2e, %eax
je 0x59137
testl %eax, %eax
jne 0x59143
movq 0x4ee6a(%rip), %rax     # 0xa7fa8
movq (%rax), %rdi
jmp 0x59155
leaq 0x3619b(%rip), %rsi     # 0x8f2e5
movq %r14, %rdi
callq 0x45d0
movq %rax, %rdi
testq %rdi, %rdi
je 0x594fa
callq 0x4550
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 0x1073a
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x492e0
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x49890
cmpb $0x0, 0x10(%rsp)
jne 0x591e9
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x591e9
callq 0x4690
xorl %edi, %edi
xorl %esi, %esi
callq 0x361ac
movq 0x48(%rsp), %r8
leaq 0x38389(%rip), %rdx     # 0x91587
leaq 0x250(%rsp), %rbx
movl $0x400, %esi            # imm = 0x400
movq %rbx, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x4890
leaq 0x215f4(%rip), %rsi     # 0x7a813
movq %rbx, %rdi
callq 0x4140
testq %rax, %rax
je 0x59263
movq %rax, %r15
xorl %edi, %edi
xorl %esi, %esi
callq 0xc7e5
movl (%rax), %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0xc7e5
movl $0x0, (%rax)
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x46f8a
movq %r15, %rdi
callq 0x4740
jmp 0x5945d
movq %r14, 0x20(%rsp)
movq %r13, 0x28(%rsp)
leaq 0x3828d(%rip), %r15     # 0x91501
leaq 0x50(%rsp), %r12
leaq 0x36065(%rip), %r13     # 0x8f2e5
movq 0x4ed21(%rip), %r14     # 0xa7fa8
leaq 0x35d6e(%rip), %rbp     # 0x8effc
xorl %edi, %edi
xorl %esi, %esi
callq 0x36475
movq %rax, %rbx
callq 0x36803
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
movq %r15, %rdx
movq %rbx, %rcx
movl $0x2f, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4890
movq %r12, %rdi
movq %r13, %rsi
callq 0x45d0
testq %rax, %rax
je 0x592f8
cmpq %rax, (%r14)
je 0x5928e
movq 0x4ecaf(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x5928e
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x5928e
movq %rbp, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
jmp 0x5928e
xorl %edi, %edi
xorl %esi, %esi
callq 0x361ac
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 0x1073a
addq $0x10, %rsp
movq %rsp, %rdi
callq 0x492e0
movq 0x18(%rax), %r9
leaq 0x382c2(%rip), %rdx     # 0x91620
leaq 0x250(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x4890
cmpb $0x0, 0x10(%rsp)
jne 0x5938e
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x5938e
callq 0x4690
xorl %edi, %edi
xorl %esi, %esi
callq 0x361ac
leaq 0x250(%rsp), %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x593fd
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 0x4490
movq %r12, %rdi
callq 0x4690
leaq 0x35ee1(%rip), %rsi     # 0x8f2e5
leaq 0x50(%rsp), %rdi
callq 0x45d0
testq %rax, %rax
je 0x59538
cmpq %rax, (%r14)
je 0x59444
movq 0x4eb65(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x59444
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x59444
leaq 0x35bc1(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
leaq 0x50(%rsp), %rdx
movq %r13, %rdi
xorl %esi, %esi
callq 0x46f8a
leaq 0x50(%rsp), %rdi
callq 0x49b0
cmpb $0x0, 0x40(%rsp)
jne 0x59473
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x59473
callq 0x4690
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 0x153bc(%rip), %rax     # 0x6e868
leaq 0x1678f(%rip), %r10     # 0x6fc42
cmpb $0x0, 0x10(%r13)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x35c58(%rip), %r11     # 0x8f11f
leaq 0x3804d(%rip), %rsi     # 0x9151b
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%r13)
callq 0xc16a
addq $0x20, %rsp
leaq 0x4e765(%rip), %rsi     # 0xa7c50
movq 0x4eade(%rip), %rdx     # 0xa7fd0
movq %r14, %rdi
callq 0x4910
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
leaq 0x37c74(%rip), %rsi     # 0x91182
leaq 0x35dd0(%rip), %rcx     # 0x8f2e5
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x36908
leaq 0x4e7c7(%rip), %rsi     # 0xa7cf0
movq 0x4eaa0(%rip), %rdx     # 0xa7fd0
movq %r15, %rdi
callq 0x4910
leaq 0x212d4(%rip), %rsi     # 0x7a813
movq %rbp, %rdi
callq 0x3b111
movq %rax, %rdi
callq 0x367a9
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 0x152f5(%rip), %rax     # 0x6e868
leaq 0x166c8(%rip), %r10     # 0x6fc42
cmpb $0x0, 0x10(%r13)
cmovneq %rax, %r10
leaq 0x35b95(%rip), %r11     # 0x8f11f
leaq 0x3800c(%rip), %rsi     # 0x9159d
movq %r15, %rdi
xorl %eax, %eax
pushq %rbp
pushq %r11
pushq %r10
pushq 0x18(%r13)
callq 0x36908
addq $0x20, %rsp
leaq 0x4e741(%rip), %rsi     # 0xa7cf0
movq 0x4ea1a(%rip), %rdx     # 0xa7fd0
movq %r15, %rdi
callq 0x4910
jmp 0x596a1
movq %rax, %rbx
movq %r15, %rdi
callq 0x43c0
jmp 0x596dd
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x596dd
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x596dd
callq 0x4690
jmp 0x596dd
jmp 0x596da
movq %rax, %rbx
movq %r15, %rdi
jmp 0x5960c
movq %rax, %rbx
movq %r14, %rdi
callq 0x43c0
jmp 0x596f3
movq %rax, %rdi
callq 0x41d0
movq %r15, %rdi
callq 0x4740
xorl %edi, %edi
xorl %esi, %esi
callq 0xc7e5
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 0x15213(%rip), %rax     # 0x6e868
leaq 0x165e6(%rip), %r10     # 0x6fc42
cmpb $0x0, 0x10(%r13)
cmovneq %rax, %r10
leaq 0x35ab3(%rip), %r11     # 0x8f11f
leaq 0x37f2a(%rip), %rsi     # 0x9159d
movq %r15, %rdi
xorl %eax, %eax
pushq %r14
pushq %r11
pushq %r10
pushq 0x18(%r13)
callq 0x36908
addq $0x20, %rsp
leaq 0x4e65e(%rip), %rsi     # 0xa7cf0
movq 0x4e937(%rip), %rdx     # 0xa7fd0
movq %r15, %rdi
callq 0x4910
movq %rax, %rbx
movq %r15, %rdi
callq 0x43c0
jmp 0x596b1
movq %rax, %rbx
callq 0x48d0
jmp 0x596dd
movq %rax, %rdi
callq 0xa02c
jmp 0x596da
movq %rax, %rbx
cmpb $0x0, 0x10(%rsp)
jne 0x596f3
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x596f3
jmp 0x596ee
jmp 0x596da
movq %rax, %rbx
cmpb $0x0, 0x40(%rsp)
jne 0x596f3
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x596f3
callq 0x4690
movq %rbx, %rdi
callq 0x4960
nop