// File: /workspace/github_cpp_makefile_star2_O3/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::save_graphicsmagick_external(char const*, unsigned int) const
const CImg<T>& save_graphicsmagick_external(const char *const filename, const unsigned int quality=100) const {
      if (!filename)
        throw CImgArgumentException(_cimg_instance
                                    "save_graphicsmagick_external(): Specified filename is (null).",
                                    cimg_instance);
      if (is_empty()) { cimg::fempty(0,filename); return *this; }

#ifdef cimg_use_png
#define _cimg_sge_ext1 "png"
#define _cimg_sge_ext2 "png"
#else
#define _cimg_sge_ext1 "pgm"
#define _cimg_sge_ext2 "ppm"
#endif
      char command[1024] = { 0 }, filetmp[512] = { 0 };
      std::FILE *file;
      do {
        cimg_snprintf(filetmp,sizeof(filetmp),"%s%c%s.%s",
                      cimg::temporary_path(),cimg_file_separator,cimg::filenamerand(),
                      _spectrum==1?_cimg_sge_ext1:_cimg_sge_ext2);
        if ((file=std::fopen(filetmp,"rb"))!=0) cimg::fclose(file);
      } while (file);
#ifdef cimg_use_png
      save_png(filetmp);
#else
      save_pnm(filetmp);
#endif
      cimg_snprintf(command,sizeof(command),"%s convert -quality %u \"%s\" \"%s\"",
                    cimg::graphicsmagick_path(),quality,
                    CImg<charT>::string(filetmp)._system_strescape().data(),
                    CImg<charT>::string(filename)._system_strescape().data());
      cimg::system(command);
      file = std::fopen(filename,"rb");
      if (!file)
        throw CImgIOException(_cimg_instance
                              "save_graphicsmagick_external(): Failed to save file '%s' with external command 'gm'.",
                              cimg_instance,
                              filename);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x678, %rsp            # imm = 0x678
movq %rdi, %r13
testq %rsi, %rsi
je 0x64d17
movq %rsi, %rcx
cmpq $0x0, 0x18(%r13)
je 0x64caa
movdqu (%r13), %xmm0
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
testb %al, %al
jne 0x64caa
movl %edx, 0x24(%rsp)
movq %rcx, 0x28(%rsp)
leaq 0x270(%rsp), %rdi
movl $0x400, %edx            # imm = 0x400
xorl %esi, %esi
callq 0x4290
leaq 0x70(%rsp), %r15
movl $0x200, %edx            # imm = 0x200
movq %r15, %rdi
xorl %esi, %esi
callq 0x4290
xorl %edi, %edi
xorl %esi, %esi
callq 0x36475
movq %rax, %r12
callq 0x36803
movq %r13, %rbx
cmpl $0x1, 0xc(%r13)
leaq 0x2a80e(%rip), %rdx     # 0x8f211
leaq 0x2c65d(%rip), %rcx     # 0x91067
cmoveq %rdx, %rcx
movq %rcx, (%rsp)
leaq 0x2c497(%rip), %rdx     # 0x90eb0
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
movq %r12, %rcx
movl $0x2f, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4890
leaq 0x2a8aa(%rip), %rsi     # 0x8f2e5
movq %r15, %rdi
callq 0x45d0
testq %rax, %rax
je 0x64af1
movq 0x43555(%rip), %rbp     # 0xa7fa8
leaq 0x2c456(%rip), %r15     # 0x90eb0
leaq 0x70(%rsp), %r12
leaq 0x2a87f(%rip), %r13     # 0x8f2e5
cmpq %rax, (%rbp)
je 0x64a94
movq 0x43515(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x64a94
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x64a94
leaq 0x2a571(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
xorl %edi, %edi
xorl %esi, %esi
callq 0x36475
movq %rax, %r14
callq 0x36803
cmpl $0x1, 0xc(%rbx)
leaq 0x2c5b7(%rip), %rcx     # 0x91067
leaq 0x2a75a(%rip), %rdx     # 0x8f211
cmoveq %rdx, %rcx
movq %rcx, (%rsp)
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
movl $0x2f, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4890
movq %r12, %rdi
movq %r13, %rsi
callq 0x45d0
testq %rax, %rax
jne 0x64a66
leaq 0x70(%rsp), %r14
movq %rbx, %r13
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x5e298
xorl %edi, %edi
xorl %esi, %esi
callq 0x361ac
movq %rax, %r15
movq %r14, %rdi
callq 0x41e0
leal 0x1(%rax), %edx
movl $0x0, (%rsp)
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x1073a
movq %r12, %rdi
callq 0x492e0
movq 0x18(%rax), %r12
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x41e0
leal 0x1(%rax), %edx
movl $0x0, (%rsp)
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x1073a
leaq 0x30(%rsp), %rdi
callq 0x492e0
movq 0x18(%rax), %rax
movq %rax, (%rsp)
leaq 0x2e52c(%rip), %rdx     # 0x930cd
leaq 0x270(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rcx
movl 0x24(%rsp), %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x4890
cmpb $0x0, 0x40(%rsp)
jne 0x64bd6
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x64bd6
callq 0x4690
cmpb $0x0, 0x60(%rsp)
jne 0x64bec
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x64bec
callq 0x4690
leaq 0x270(%rsp), %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x64c52
addl $0x10, %eax
movq %rax, %rdi
callq 0x4040
movq %rax, %r14
leaq 0x270(%rsp), %rsi
movq %rax, %rdi
movq %r15, %rdx
callq 0x4240
movabsq $0x7665642f203e3220, %rax # imm = 0x7665642F203E3220
movq %rax, (%r14,%r15)
movabsq $0x6c6c756e2f7665, %rax # imm = 0x6C6C756E2F7665
movq %rax, 0x6(%r14,%r15)
movq %r14, %rdi
callq 0x4490
movq %r14, %rdi
callq 0x4690
leaq 0x2a68c(%rip), %rsi     # 0x8f2e5
movq %rbx, %rdi
callq 0x45d0
testq %rax, %rax
je 0x64d8b
movq 0x43337(%rip), %rcx     # 0xa7fa8
cmpq %rax, (%rcx)
je 0x64c9e
movq 0x4330b(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x64c9e
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x64c9e
leaq 0x2a367(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
leaq 0x70(%rsp), %rdi
callq 0x49b0
jmp 0x64d02
leaq 0x2a3ac(%rip), %rsi     # 0x8f05d
movq %rcx, %rdi
callq 0x3b111
testq %rax, %rax
je 0x64cf4
movq 0x432e3(%rip), %rcx     # 0xa7fa8
cmpq %rax, (%rcx)
je 0x64d02
movq 0x432b7(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x64d02
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x64d02
leaq 0x2a313(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
jmp 0x64d02
leaq 0x2a2d7(%rip), %rdi     # 0x8efd2
xorl %eax, %eax
callq 0xbb10
movq %r13, %rax
addq $0x678, %rsp            # imm = 0x678
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
movq 0x18(%r13), %rax
leaq 0x9b29(%rip), %rsi      # 0x6e868
leaq 0xaefc(%rip), %rdi      # 0x6fc42
cmpb $0x0, 0x10(%r13)
cmovneq %rsi, %rdi
leaq 0x2a3c9(%rip), %rsi     # 0x8f11f
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x2e2f6(%rip), %rsi     # 0x93061
movq %r14, %rdi
xorl %eax, %eax
callq 0xc16a
leaq 0x42ed4(%rip), %rsi     # 0xa7c50
movq 0x4324d(%rip), %rdx     # 0xa7fd0
movq %r14, %rdi
callq 0x4910
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
movq 0x18(%r13), %rax
leaq 0x9ab5(%rip), %rsi      # 0x6e868
leaq 0xae88(%rip), %rdi      # 0x6fc42
cmpb $0x0, 0x10(%r13)
cmovneq %rsi, %rdi
movq %rbx, 0x18(%rsp)
leaq 0x2a350(%rip), %rsi     # 0x8f11f
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x2e30a(%rip), %rsi     # 0x930ee
movq %r15, %rdi
xorl %eax, %eax
callq 0x36908
leaq 0x42efb(%rip), %rsi     # 0xa7cf0
movq 0x431d4(%rip), %rdx     # 0xa7fd0
movq %r15, %rdi
callq 0x4910
movq %rax, %rbx
movq %r15, %rdi
jmp 0x64e4a
movq %rax, %rbx
cmpb $0x0, 0x40(%rsp)
jne 0x64e2c
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x64e2c
callq 0x4690
jmp 0x64e2c
jmp 0x64e29
movq %rax, %rbx
cmpb $0x0, 0x60(%rsp)
jne 0x64e4f
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x64e4f
callq 0x4690
jmp 0x64e4f
movq %rax, %rbx
movq %r14, %rdi
callq 0x43c0
movq %rbx, %rdi
callq 0x4960
nop