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

      char command[1024] = { 0 }, filetmp[512] = { 0 }, body[512] = { 0 };
      const char
        *ext = cimg::split_filename(filename,body),
        *ext2 = cimg::split_filename(body,0);
      std::FILE *file;
      do {
        if (!cimg::strcasecmp(ext,"gz")) {
          if (*ext2) cimg_snprintf(filetmp,sizeof(filetmp),"%s%c%s.%s",
                                   cimg::temporary_path(),cimg_file_separator,cimg::filenamerand(),ext2);
          else cimg_snprintf(filetmp,sizeof(filetmp),"%s%c%s.cimg",
                             cimg::temporary_path(),cimg_file_separator,cimg::filenamerand());
        } else {
          if (*ext) cimg_snprintf(filetmp,sizeof(filetmp),"%s%c%s.%s",
                                  cimg::temporary_path(),cimg_file_separator,cimg::filenamerand(),ext);
          else cimg_snprintf(filetmp,sizeof(filetmp),"%s%c%s.cimg",
                             cimg::temporary_path(),cimg_file_separator,cimg::filenamerand());
        }
        if ((file=std::fopen(filetmp,"rb"))!=0) cimg::fclose(file);
      } while (file);
      save(filetmp);
      cimg_snprintf(command,sizeof(command),"%s -c \"%s\" > \"%s\"",
                    cimg::gzip_path(),
                    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_gzip_external(): Failed to save file '%s' with external command 'gzip'.",
                              cimg_instance,
                              filename);

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

// Assembly:
pushq %rbx
subq $0x990, %rsp            # imm = 0x990
movq %rdi, 0x980(%rsp)
movq %rsi, 0x978(%rsp)
movq 0x980(%rsp), %rax
movq %rax, 0x100(%rsp)
cmpq $0x0, 0x978(%rsp)
jne 0x9af53
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x100(%rsp), %rax
movq %rcx, 0xd0(%rsp)
movl (%rax), %ecx
movl %ecx, 0xd8(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0xdc(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0xe0(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0xe4(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0xe8(%rsp)
movb 0x10(%rax), %dl
leaq 0x4db41(%rip), %rcx     # 0xe89d2
leaq 0x2ec49(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0xf0(%rsp)
callq 0x118f0
movq %rax, 0xf8(%rsp)
jmp 0x9aeb6
movl 0xe4(%rsp), %r9d
movl 0xe0(%rsp), %r8d
movl 0xdc(%rsp), %ecx
movl 0xd8(%rsp), %edx
movq 0xd0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0xf0(%rsp), %r10
movq 0xf8(%rsp), %r11
movq %rsp, %rax
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x51b47(%rip), %rsi     # 0xeca50
xorl %eax, %eax
callq 0x12220
jmp 0x9af12
movq 0xd0(%rsp), %rdi
leaq 0x64c3f(%rip), %rsi     # 0xffb60
leaq -0x88ac8(%rip), %rdx    # 0x12460
callq 0x5920
movq 0xd0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
callq 0x53a0
jmp 0x9b49e
movq 0x100(%rsp), %rdi
callq 0x10320
testb $0x1, %al
jne 0x9af66
jmp 0x9af8c
movq 0x978(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x9c310
movq 0x100(%rsp), %rax
movq %rax, 0x988(%rsp)
jmp 0x9b48d
leaq 0x560(%rsp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x52a0
leaq 0x360(%rsp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x52a0
leaq 0x160(%rsp), %rdi
xorl %esi, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x52a0
movq 0x978(%rsp), %rdi
leaq 0x160(%rsp), %rsi
callq 0x63280
movq %rax, 0x158(%rsp)
leaq 0x160(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x63280
movq %rax, 0x150(%rsp)
movq 0x158(%rsp), %rdi
leaq 0x4e343(%rip), %rsi     # 0xe9350
callq 0x633b0
cmpl $0x0, %eax
jne 0x9b0e3
movq 0x150(%rsp), %rax
cmpb $0x0, (%rax)
je 0x9b08a
leaq 0x360(%rsp), %rax
movq %rax, 0xc0(%rsp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x5c290
movq %rax, 0xc8(%rsp)
callq 0x5c7a0
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rcx
movq %rax, %r9
movq 0x150(%rsp), %rax
movl $0x200, %esi            # imm = 0x200
leaq 0x4fcb4(%rip), %rdx     # 0xead2b
movl $0x2f, %r8d
movq %rax, (%rsp)
movb $0x0, %al
callq 0x5890
jmp 0x9b0de
leaq 0x360(%rsp), %rax
movq %rax, 0xb0(%rsp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x5c290
movq %rax, 0xb8(%rsp)
callq 0x5c7a0
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rcx
movq %rax, %r9
movl $0x200, %esi            # imm = 0x200
leaq 0x519e1(%rip), %rdx     # 0xecab2
movl $0x2f, %r8d
movb $0x0, %al
callq 0x5890
jmp 0x9b1a8
movq 0x158(%rsp), %rax
cmpb $0x0, (%rax)
je 0x9b152
leaq 0x360(%rsp), %rax
movq %rax, 0xa0(%rsp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x5c290
movq %rax, 0xa8(%rsp)
callq 0x5c7a0
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rcx
movq %rax, %r9
movq 0x158(%rsp), %rax
movl $0x200, %esi            # imm = 0x200
leaq 0x4fbec(%rip), %rdx     # 0xead2b
movl $0x2f, %r8d
movq %rax, (%rsp)
movb $0x0, %al
callq 0x5890
jmp 0x9b1a6
leaq 0x360(%rsp), %rax
movq %rax, 0x90(%rsp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
callq 0x5c290
movq %rax, 0x98(%rsp)
callq 0x5c7a0
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rcx
movq %rax, %r9
movl $0x200, %esi            # imm = 0x200
leaq 0x51919(%rip), %rdx     # 0xecab2
movl $0x2f, %r8d
movb $0x0, %al
callq 0x5890
jmp 0x9b1a8
leaq 0x360(%rsp), %rdi
leaq 0x4dfa7(%rip), %rsi     # 0xe915e
callq 0x55c0
movq %rax, 0x148(%rsp)
cmpq $0x0, %rax
je 0x9b1d7
movq 0x148(%rsp), %rdi
callq 0x5c6f0
jmp 0x9b1d9
cmpq $0x0, 0x148(%rsp)
jne 0x9affe
movq 0x100(%rsp), %rdi
leaq 0x360(%rsp), %rsi
movq %rsi, 0x68(%rsp)
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x6, %ecx
callq 0x99f0
leaq 0x560(%rsp), %rax
movq %rax, 0x60(%rsp)
xorl %esi, %esi
movl %esi, 0x74(%rsp)
movl %esi, %edi
callq 0xb0a60
movq 0x68(%rsp), %rsi
movl 0x74(%rsp), %ecx
movq %rax, 0x78(%rsp)
leaq 0x128(%rsp), %rdi
movq %rdi, 0x80(%rsp)
movl $0x1, %edx
callq 0x7ab40
movq 0x80(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x88(%rsp)
jmp 0x9b265
movq 0x88(%rsp), %rdi
callq 0x1a3e0
movq %rax, 0x58(%rsp)
movq 0x978(%rsp), %rsi
leaq 0x108(%rsp), %rdi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7ab40
jmp 0x9b295
leaq 0x108(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x50(%rsp)
jmp 0x9b2a9
movq 0x50(%rsp), %rdi
callq 0x1a3e0
movq 0x60(%rsp), %rdi
movq 0x78(%rsp), %rcx
movq 0x58(%rsp), %r8
movq %rax, %r9
movl $0x400, %esi            # imm = 0x400
leaq 0x4fa64(%rip), %rdx     # 0xead35
movb $0x0, %al
callq 0x5890
leaq 0x108(%rsp), %rdi
callq 0x1a320
leaq 0x128(%rsp), %rdi
callq 0x1a320
leaq 0x560(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x66380
movq 0x978(%rsp), %rdi
leaq 0x4de4c(%rip), %rsi     # 0xe915e
callq 0x55c0
movq %rax, 0x148(%rsp)
cmpq $0x0, 0x148(%rsp)
jne 0x9b463
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x100(%rsp), %rax
movq %rcx, 0x20(%rsp)
movl (%rax), %ecx
movl %ecx, 0x28(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x2c(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x30(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x34(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x38(%rsp)
movb 0x10(%rax), %dl
leaq 0x4d65c(%rip), %rcx     # 0xe89d2
leaq 0x2e764(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x40(%rsp)
callq 0x118f0
movq %rax, 0x48(%rsp)
jmp 0x9b395
movl 0x34(%rsp), %r9d
movl 0x30(%rsp), %r8d
movl 0x2c(%rsp), %ecx
movl 0x28(%rsp), %edx
movq 0x20(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %r10
movq 0x48(%rsp), %r11
movq 0x978(%rsp), %rbx
movq %rsp, %rax
movq %rbx, 0x18(%rax)
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x516e2(%rip), %rsi     # 0xecabe
xorl %eax, %eax
callq 0x5c880
jmp 0x9b3e5
movq 0x20(%rsp), %rdi
leaq 0x6487f(%rip), %rsi     # 0xffc70
leaq -0x3e938(%rip), %rdx    # 0x5cac0
callq 0x5920
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
jmp 0x9b434
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x1a320
leaq 0x128(%rsp), %rdi
callq 0x1a320
jmp 0x9b49e
movq 0x20(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x970(%rsp)
movl %eax, 0x96c(%rsp)
callq 0x53a0
jmp 0x9b49e
movq 0x148(%rsp), %rdi
callq 0x5c6f0
leaq 0x360(%rsp), %rdi
callq 0x59c0
movq 0x100(%rsp), %rax
movq %rax, 0x988(%rsp)
movq 0x988(%rsp), %rax
addq $0x990, %rsp            # imm = 0x990
popq %rbx
retq
movq 0x970(%rsp), %rdi
callq 0x5970
nopl (%rax,%rax)