// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::load_gzip_external(char const*)
CImg<T>& load_gzip_external(const char *const filename) {
      if (!filename)
        throw CImgIOException(_cimg_instance
                              "load_gzip_external(): Specified filename is (null).",
                              cimg_instance);
      std::fclose(cimg::fopen(filename,"rb"));            // Check if file exists.
      char command[1024] = { 0 }, filetmp[512] = { 0 }, body[512] = { 0 };
      const char
        *const ext = cimg::split_filename(filename,body),
        *const ext2 = cimg::split_filename(body,0);

      std::FILE *file = 0;
      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::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::temporary_path(),cimg_file_separator,cimg::filenamerand());
        }
        if ((file=std::fopen(filetmp,"rb"))!=0) cimg::fclose(file);
      } while (file);
      cimg_snprintf(command,sizeof(command),"%s -c \"%s\" > \"%s\"",
                    cimg::gunzip_path(),
                    CImg<charT>::string(filename)._system_strescape().data(),
                    CImg<charT>::string(filetmp)._system_strescape().data());
      cimg::system(command);
      if (!(file = std::fopen(filetmp,"rb"))) {
        cimg::fclose(cimg::fopen(filename,"r"));
        throw CImgIOException(_cimg_instance
                              "load_gzip_external(): Failed to load file '%s' with external command 'gunzip'.",
                              cimg_instance,
                              filename);

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

// Assembly:
pushq %rbx
subq $0x980, %rsp            # imm = 0x980
movq %rdi, 0x978(%rsp)
movq %rsi, 0x970(%rsp)
movq 0x978(%rsp), %rax
movq %rax, 0x100(%rsp)
cmpq $0x0, 0x970(%rsp)
jne 0x64ea3
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 0x83bf1(%rip), %rcx     # 0xe89d2
leaq 0x64cf9(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0xf0(%rsp)
callq 0x118f0
movq %rax, 0xf8(%rsp)
jmp 0x64e06
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 0x85e70(%rip), %rsi     # 0xeacc9
xorl %eax, %eax
callq 0x5c880
jmp 0x64e62
movq 0xd0(%rsp), %rdi
leaq 0x9adff(%rip), %rsi     # 0xffc70
leaq -0x83b8(%rip), %rdx     # 0x5cac0
callq 0x5920
movq 0xd0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x968(%rsp)
movl %eax, 0x964(%rsp)
callq 0x53a0
jmp 0x653d8
movq 0x970(%rsp), %rdi
leaq 0x842ac(%rip), %rsi     # 0xe915e
callq 0x654a0
movq %rax, %rdi
callq 0x5530
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 0x970(%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 $0x0, 0x148(%rsp)
movq 0x158(%rsp), %rdi
leaq 0x84404(%rip), %rsi     # 0xe9350
callq 0x633b0
cmpl $0x0, %eax
jne 0x65022
movq 0x150(%rsp), %rax
cmpb $0x0, (%rax)
je 0x64fc9
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 0x85d75(%rip), %rdx     # 0xead2b
movl $0x2f, %r8d
movq %rax, (%rsp)
movb $0x0, %al
callq 0x5890
jmp 0x6501d
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 0x83ee9(%rip), %rdx     # 0xe8ef9
movl $0x2f, %r8d
movb $0x0, %al
callq 0x5890
jmp 0x650e7
movq 0x158(%rsp), %rax
cmpb $0x0, (%rax)
je 0x65091
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 0x85cad(%rip), %rdx     # 0xead2b
movl $0x2f, %r8d
movq %rax, (%rsp)
movb $0x0, %al
callq 0x5890
jmp 0x650e5
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 0x83e21(%rip), %rdx     # 0xe8ef9
movl $0x2f, %r8d
movb $0x0, %al
callq 0x5890
jmp 0x650e7
leaq 0x360(%rsp), %rdi
leaq 0x84068(%rip), %rsi     # 0xe915e
callq 0x55c0
movq %rax, 0x148(%rsp)
cmpq $0x0, %rax
je 0x65116
movq 0x148(%rsp), %rdi
callq 0x5c6f0
jmp 0x65118
cmpq $0x0, 0x148(%rsp)
jne 0x64f3d
leaq 0x560(%rsp), %rax
movq %rax, 0x68(%rsp)
xorl %esi, %esi
movl %esi, 0x74(%rsp)
movl %esi, %edi
callq 0x665b0
movl 0x74(%rsp), %ecx
movq %rax, 0x78(%rsp)
movq 0x970(%rsp), %rsi
leaq 0x128(%rsp), %rdi
movq %rdi, 0x80(%rsp)
movl $0x1, %edx
callq 0x7ab40
movq 0x80(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x88(%rsp)
jmp 0x65183
movq 0x88(%rsp), %rdi
callq 0x1a3e0
movq %rax, 0x60(%rsp)
leaq 0x108(%rsp), %rdi
leaq 0x360(%rsp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x7ab40
jmp 0x651b3
leaq 0x108(%rsp), %rdi
callq 0x7abe0
movq %rax, 0x58(%rsp)
jmp 0x651c7
movq 0x58(%rsp), %rdi
callq 0x1a3e0
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rcx
movq 0x60(%rsp), %r8
movq %rax, %r9
movl $0x400, %esi            # imm = 0x400
leaq 0x85b46(%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
leaq 0x360(%rsp), %rdi
leaq 0x83f2e(%rip), %rsi     # 0xe915e
callq 0x55c0
movq %rax, 0x148(%rsp)
cmpq $0x0, %rax
jne 0x65398
movq 0x970(%rsp), %rdi
leaq 0x6f45c(%rip), %rsi     # 0xd46b2
callq 0x654a0
movq %rax, %rdi
callq 0x5c6f0
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x100(%rsp), %rax
movq %rcx, 0x28(%rsp)
movl (%rax), %ecx
movl %ecx, 0x30(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x34(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x38(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x3c(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x40(%rsp)
movb 0x10(%rax), %dl
leaq 0x83727(%rip), %rcx     # 0xe89d2
leaq 0x6482f(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x48(%rsp)
callq 0x118f0
movq %rax, 0x50(%rsp)
jmp 0x652ca
movl 0x3c(%rsp), %r9d
movl 0x38(%rsp), %r8d
movl 0x34(%rsp), %ecx
movl 0x30(%rsp), %edx
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %r10
movq 0x50(%rsp), %r11
movq 0x970(%rsp), %rbx
movq %rsp, %rax
movq %rbx, 0x18(%rax)
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x85a36(%rip), %rsi     # 0xead47
xorl %eax, %eax
callq 0x5c880
jmp 0x6531a
movq 0x28(%rsp), %rdi
leaq 0x9a94a(%rip), %rsi     # 0xffc70
leaq -0x886d(%rip), %rdx     # 0x5cac0
callq 0x5920
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x968(%rsp)
movl %eax, 0x964(%rsp)
jmp 0x65369
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x968(%rsp)
movl %eax, 0x964(%rsp)
leaq 0x108(%rsp), %rdi
callq 0x1a320
leaq 0x128(%rsp), %rdi
callq 0x1a320
jmp 0x653d8
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x968(%rsp)
movl %eax, 0x964(%rsp)
callq 0x53a0
jmp 0x653d8
movq 0x148(%rsp), %rdi
callq 0x5c6f0
movq 0x100(%rsp), %rdi
leaq 0x360(%rsp), %rsi
callq 0x61570
leaq 0x360(%rsp), %rdi
callq 0x59c0
movq 0x100(%rsp), %rax
addq $0x980, %rsp            # imm = 0x980
popq %rbx
retq
movq 0x968(%rsp), %rdi
callq 0x5970
nopw %cs:(%rax,%rax)
nop