// File: /workspace/github_cpp_makefile_star2_O1/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 0x67535
movq %rsi, %rcx
cmpq $0x0, 0x18(%r13)
je 0x674c8
movdqu (%r13), %xmm0
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
testb %al, %al
jne 0x674c8
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 0x2cac0(%rip), %rdx     # 0x93ce1
leaq 0x2e90f(%rip), %rcx     # 0x95b37
cmoveq %rdx, %rcx
movq %rcx, (%rsp)
leaq 0x2e749(%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 0x2cb5c(%rip), %rsi     # 0x93db5
movq %r15, %rdi
callq 0x45c0
testq %rax, %rax
je 0x6730f
movq 0x45d37(%rip), %rbp     # 0xacfa8
leaq 0x2e708(%rip), %r15     # 0x95980
leaq 0x70(%rsp), %r12
leaq 0x2cb31(%rip), %r13     # 0x93db5
cmpq %rax, (%rbp)
je 0x672b2
movq 0x45cf7(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x672b2
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x672b2
leaq 0x2c823(%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 0x2e869(%rip), %rcx     # 0x95b37
leaq 0x2ca0c(%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 0x67284
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 0x37bf6
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 0x307ca(%rip), %rdx     # 0x97b89
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 0x673f4
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x673f4
callq 0x4680
cmpb $0x0, 0x60(%rsp)
jne 0x6740a
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x6740a
callq 0x4680
leaq 0x270(%rsp), %rdi
callq 0x41e0
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
andq %rax, %r15
je 0x67470
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 0x2c93e(%rip), %rsi     # 0x93db5
movq %rbx, %rdi
callq 0x45c0
testq %rax, %rax
je 0x675a9
movq 0x45b19(%rip), %rcx     # 0xacfa8
cmpq %rax, (%rcx)
je 0x674bc
movq 0x45aed(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x674bc
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x674bc
leaq 0x2c619(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
leaq 0x70(%rsp), %rdi
callq 0x49a0
jmp 0x67520
leaq 0x2c65e(%rip), %rsi     # 0x93b2d
movq %rcx, %rdi
callq 0x3ceb3
testq %rax, %rax
je 0x67512
movq 0x45ac5(%rip), %rcx     # 0xacfa8
cmpq %rax, (%rcx)
je 0x67520
movq 0x45a99(%rip), %rcx     # 0xacf88
cmpq %rax, (%rcx)
je 0x67520
movq %rax, %rdi
callq 0x4540
testl %eax, %eax
je 0x67520
leaq 0x2c5c5(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
jmp 0x67520
leaq 0x2c589(%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 0xbddb(%rip), %rsi      # 0x73338
leaq 0xd1ae(%rip), %rdi      # 0x74712
cmpb $0x0, 0x10(%r13)
cmovneq %rsi, %rdi
leaq 0x2c67b(%rip), %rsi     # 0x93bef
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x30597(%rip), %rsi     # 0x97b20
movq %r14, %rdi
xorl %eax, %eax
callq 0xc196
leaq 0x45686(%rip), %rsi     # 0xacc20
movq 0x45a2f(%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 0xbd67(%rip), %rsi      # 0x73338
leaq 0xd13a(%rip), %rdi      # 0x74712
cmpb $0x0, 0x10(%r13)
cmovneq %rsi, %rdi
movq %rbx, 0x18(%rsp)
leaq 0x2c602(%rip), %rsi     # 0x93bef
movq %rsi, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x305a0(%rip), %rsi     # 0x97ba2
movq %r15, %rdi
xorl %eax, %eax
callq 0x385b4
leaq 0x456dd(%rip), %rsi     # 0xaccf0
movq 0x459b6(%rip), %rdx     # 0xacfd0
movq %r15, %rdi
callq 0x4900
movq %rax, %rbx
movq %r15, %rdi
jmp 0x67668
movq %rax, %rbx
cmpb $0x0, 0x40(%rsp)
jne 0x6764a
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x6764a
callq 0x4680
jmp 0x6764a
jmp 0x67647
movq %rax, %rbx
cmpb $0x0, 0x60(%rsp)
jne 0x6766d
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x6766d
callq 0x4680
jmp 0x6766d
movq %rax, %rbx
movq %r14, %rdi
callq 0x43b0
movq %rbx, %rdi
callq 0x4950
nop