// File: /workspace/github_cpp_makefile_star2_O1/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 0x67a1f
movq %rsi, %rcx
cmpq $0x0, 0x18(%r13)
je 0x679b2
movdqu (%r13), %xmm0
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
testb %al, %al
jne 0x679b2
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 0x38039
movq %rax, %r12
callq 0x384af
movq %r13, %rbx
cmpl $0x1, 0xc(%r13)
leaq 0x2c5d6(%rip), %rdx     # 0x93ce1
leaq 0x2e425(%rip), %rcx     # 0x95b37
cmoveq %rdx, %rcx
movq %rcx, (%rsp)
leaq 0x2e25f(%rip), %rdx     # 0x95980
movl $0x200, %esi            # imm = 0x200
movq %r15, %rdi
movq %r12, %rcx
movl $0x2f, %r8d
movq %rax, %r9
xorl %eax, %eax
callq 0x4880
leaq 0x2c672(%rip), %rsi     # 0x93db5
movq %r15, %rdi
callq 0x45c0
testq %rax, %rax
je 0x677f9
movq 0x4584d(%rip), %rbp     # 0xacfa8
leaq 0x2e21e(%rip), %r15     # 0x95980
leaq 0x70(%rsp), %r12
leaq 0x2c647(%rip), %r13     # 0x93db5
cmpq %rax, (%rbp)
je 0x6779c
movq 0x4580d(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x6779c
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x6779c
leaq 0x2c339(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
xorl %edi, %edi
xorl %esi, %esi
callq 0x38039
movq %rax, %r14
callq 0x384af
cmpl $0x1, 0xc(%rbx)
leaq 0x2e37f(%rip), %rcx     # 0x95b37
leaq 0x2c522(%rip), %rdx     # 0x93ce1
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 0x4880
movq %r12, %rdi
movq %r13, %rsi
callq 0x45c0
testq %rax, %rax
jne 0x6776e
leaq 0x70(%rsp), %r14
movq %rbx, %r13
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x60e60
xorl %edi, %edi
xorl %esi, %esi
callq 0x37d68
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 0x106cc
movq %r12, %rdi
callq 0x4b1dc
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 0x106cc
leaq 0x30(%rsp), %rdi
callq 0x4b1dc
movq 0x18(%rax), %rax
movq %rax, (%rsp)
leaq 0x303ea(%rip), %rdx     # 0x97c93
leaq 0x270(%rsp), %rdi
movl $0x400, %esi            # imm = 0x400
movq %r15, %rcx
movl 0x24(%rsp), %r8d
movq %r12, %r9
xorl %eax, %eax
callq 0x4880
cmpb $0x0, 0x40(%rsp)
jne 0x678de
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x678de
callq 0x4680
cmpb $0x0, 0x60(%rsp)
jne 0x678f4
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x678f4
callq 0x4680
leaq 0x270(%rsp), %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x6795a
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 0x4480
movq %r14, %rdi
callq 0x4680
leaq 0x2c454(%rip), %rsi     # 0x93db5
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
je 0x67a93
movq 0x4562f(%rip), %rcx     # 0xacfa8
cmpq %rax, (%rcx)
je 0x679a6
movq 0x45603(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x679a6
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x679a6
leaq 0x2c12f(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
leaq 0x70(%rsp), %rdi
callq 0x49a0
jmp 0x67a0a
leaq 0x2c174(%rip), %rsi     # 0x93b2d
movq %rcx, %rdi
callq 0x3ceb3
testq %rax, %rax
je 0x679fc
movq 0x455db(%rip), %rcx     # 0xacfa8
cmpq %rax, (%rcx)
je 0x67a0a
movq 0x455af(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x67a0a
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x67a0a
leaq 0x2c0db(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
jmp 0x67a0a
leaq 0x2c09f(%rip), %rdi     # 0x93aa2
xorl %eax, %eax
callq 0xbb52
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 0xb8f1(%rip), %rsi      # 0x73338
leaq 0xccc4(%rip), %rdi      # 0x74712
cmpb $0x0, 0x10(%r13)
cmovneq %rsi, %rdi
leaq 0x2c191(%rip), %rsi     # 0x93bef
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x301b4(%rip), %rsi     # 0x97c27
movq %r14, %rdi
xorl %eax, %eax
callq 0xc196
leaq 0x4519c(%rip), %rsi     # 0xacc20
movq 0x45545(%rip), %rdx     # 0xacfd0
movq %r14, %rdi
callq 0x4900
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 0xb87d(%rip), %rsi      # 0x73338
leaq 0xcc50(%rip), %rdi      # 0x74712
cmpb $0x0, 0x10(%r13)
cmovneq %rsi, %rdi
movq %rbx, 0x18(%rsp)
leaq 0x2c118(%rip), %rsi     # 0x93bef
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x301c8(%rip), %rsi     # 0x97cb4
movq %r15, %rdi
xorl %eax, %eax
callq 0x385b4
leaq 0x451f3(%rip), %rsi     # 0xaccf0
movq 0x454cc(%rip), %rdx     # 0xacfd0
movq %r15, %rdi
callq 0x4900
movq %rax, %rbx
movq %r15, %rdi
jmp 0x67b52
movq %rax, %rbx
cmpb $0x0, 0x40(%rsp)
jne 0x67b34
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x67b34
callq 0x4680
jmp 0x67b34
jmp 0x67b31
movq %rax, %rbx
cmpb $0x0, 0x60(%rsp)
jne 0x67b57
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x67b57
callq 0x4680
jmp 0x67b57
movq %rax, %rbx
movq %r14, %rdi
callq 0x43b0
movq %rbx, %rdi
callq 0x4950
nop