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

#ifdef cimg_use_png
#define _cimg_sie_ext1 "png"
#define _cimg_sie_ext2 "png"
#else
#define _cimg_sie_ext1 "pgm"
#define _cimg_sie_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_sie_ext1:_cimg_sie_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 -quality %u \"%s\" \"%s\"",
                    cimg::imagemagick_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_imagemagick_external(): Failed to save file '%s' with external command 'convert'.",
                              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 0x6482d
movq %rsi, %rcx
cmpq $0x0, 0x18(%r13)
je 0x647c0
movdqu (%r13), %xmm0
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
testb %al, %al
jne 0x647c0
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 0x2acf8(%rip), %rdx     # 0x8f211
leaq 0x2cb47(%rip), %rcx     # 0x91067
cmoveq %rdx, %rcx
movq %rcx, (%rsp)
leaq 0x2c981(%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 0x2ad94(%rip), %rsi     # 0x8f2e5
movq %r15, %rdi
callq 0x45d0
testq %rax, %rax
je 0x64607
movq 0x43a3f(%rip), %rbp     # 0xa7fa8
leaq 0x2c940(%rip), %r15     # 0x90eb0
leaq 0x70(%rsp), %r12
leaq 0x2ad69(%rip), %r13     # 0x8f2e5
cmpq %rax, (%rbp)
je 0x645aa
movq 0x439ff(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x645aa
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x645aa
leaq 0x2aa5b(%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 0x2caa1(%rip), %rcx     # 0x91067
leaq 0x2ac44(%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 0x6457c
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 0x3603e
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 0x2e90c(%rip), %rdx     # 0x92fc3
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 0x646ec
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x646ec
callq 0x4690
cmpb $0x0, 0x60(%rsp)
jne 0x64702
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x64702
callq 0x4690
leaq 0x270(%rsp), %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x64768
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 0x2ab76(%rip), %rsi     # 0x8f2e5
movq %rbx, %rdi
callq 0x45d0
testq %rax, %rax
je 0x648a1
movq 0x43821(%rip), %rcx     # 0xa7fa8
cmpq %rax, (%rcx)
je 0x647b4
movq 0x437f5(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x647b4
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x647b4
leaq 0x2a851(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
leaq 0x70(%rsp), %rdi
callq 0x49b0
jmp 0x64818
leaq 0x2a896(%rip), %rsi     # 0x8f05d
movq %rcx, %rdi
callq 0x3b111
testq %rax, %rax
je 0x6480a
movq 0x437cd(%rip), %rcx     # 0xa7fa8
cmpq %rax, (%rcx)
je 0x64818
movq 0x437a1(%rip), %rcx     # 0xa7f88
cmpq %rax, (%rcx)
je 0x64818
movq %rax, %rdi
callq 0x4550
testl %eax, %eax
je 0x64818
leaq 0x2a7fd(%rip), %rdi     # 0x8effc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb10
jmp 0x64818
leaq 0x2a7c1(%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 0xa013(%rip), %rsi      # 0x6e868
leaq 0xb3e6(%rip), %rdi      # 0x6fc42
cmpb $0x0, 0x10(%r13)
cmovneq %rsi, %rdi
leaq 0x2a8b3(%rip), %rsi     # 0x8f11f
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x2e6d9(%rip), %rsi     # 0x92f5a
movq %r14, %rdi
xorl %eax, %eax
callq 0xc16a
leaq 0x433be(%rip), %rsi     # 0xa7c50
movq 0x43737(%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 0x9f9f(%rip), %rsi      # 0x6e868
leaq 0xb372(%rip), %rdi      # 0x6fc42
cmpb $0x0, 0x10(%r13)
cmovneq %rsi, %rdi
movq %rbx, 0x18(%rsp)
leaq 0x2a83a(%rip), %rsi     # 0x8f11f
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x2e6e2(%rip), %rsi     # 0x92fdc
movq %r15, %rdi
xorl %eax, %eax
callq 0x36908
leaq 0x433e5(%rip), %rsi     # 0xa7cf0
movq 0x436be(%rip), %rdx     # 0xa7fd0
movq %r15, %rdi
callq 0x4910
movq %rax, %rbx
movq %r15, %rdi
jmp 0x64960
movq %rax, %rbx
cmpb $0x0, 0x40(%rsp)
jne 0x64942
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x64942
callq 0x4690
jmp 0x64942
jmp 0x6493f
movq %rax, %rbx
cmpb $0x0, 0x60(%rsp)
jne 0x64965
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x64965
callq 0x4690
jmp 0x64965
movq %rax, %rbx
movq %r14, %rdi
callq 0x43c0
movq %rbx, %rdi
callq 0x4960
nop