// File: /workspace/github_cpp_makefile_star2_O2/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImgList<double>::_save_cimg(_IO_FILE*, char const*, bool) const
const CImgList<T>& _save_cimg(std::FILE *const file, const char *const filename, const bool is_compressed) const {
      if (!file && !filename)
        throw CImgArgumentException(_cimglist_instance
                                    "save_cimg(): Specified filename is (null).",
                                    cimglist_instance);
#ifndef cimg_use_zlib
      if (is_compressed)
        cimg::warn(_cimglist_instance
                   "save_cimg(): Unable to save compressed data in file '%s' unless zlib is enabled, "
                   "saving them uncompressed.",
                   cimglist_instance,
                   filename?filename:"(FILE*)");
#endif
      std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
      const char *const ptype = pixel_type(), *const etype = cimg::endianness()?"big":"little";
      if (std::strstr(ptype,"unsigned")==ptype) std::fprintf(nfile,"%u unsigned_%s %s_endian\n",_width,ptype+9,etype);
      else std::fprintf(nfile,"%u %s %s_endian\n",_width,ptype,etype);
      cimglist_for(*this,l) {
        const CImg<T>& img = _data[l];
        std::fprintf(nfile,"%u %u %u %u",img._width,img._height,img._depth,img._spectrum);
        if (img._data) {
          CImg<T> tmp;
          if (cimg::endianness()) { tmp = img; cimg::invert_endianness(tmp._data,tmp.size()); }
          const CImg<T>& ref = cimg::endianness()?tmp:img;
          bool failed_to_compress = true;
          if (is_compressed) {
#ifdef cimg_use_zlib
            const unsigned long siz = sizeof(T)*ref.size();
            unsigned long csiz = siz + siz/100 + 16;
            Bytef *const cbuf = new Bytef[csiz];
            if (compress(cbuf,&csiz,(Bytef*)ref._data,siz))
              cimg::warn(_cimglist_instance
                         "save_cimg(): Failed to save compressed data for file '%s', saving them uncompressed.",
                         cimglist_instance,
                         filename?filename:"(FILE*)");
            else {
              std::fprintf(nfile," #%lu\n",csiz);
              cimg::fwrite(cbuf,csiz,nfile);
              delete[] cbuf;
              failed_to_compress = false;
            }
#endif
          }
          if (failed_to_compress) { // Write in a non-compressed way.
            std::fputc('\n',nfile);
            cimg::fwrite(ref._data,ref.size(),nfile);
          }
        } else std::fputc('\n',nfile);
      }
      if (!file) cimg::fclose(nfile);
      return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq %rsi, %rax
orq %rdx, %rax
je 0x48983
movq %rdx, %r12
movq %rsi, %r14
testb %cl, %cl
je 0x48871
testq %r12, %r12
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movq 0x8(%rbx), %rcx
leaq 0x2cd0f(%rip), %r9      # 0x75567
cmovneq %r12, %r9
leaq 0x2fd31(%rip), %rdi     # 0x78594
leaq 0x2c835(%rip), %r8      # 0x7509f
xorl %eax, %eax
callq 0x97a7
movq %r14, %r15
movq %r14, 0x8(%rsp)
testq %r14, %r14
jne 0x48890
leaq 0x2c758(%rip), %rsi     # 0x74fdd
movq %r12, %rdi
callq 0x2dca5
movq %rax, %r15
movl (%rbx), %edx
leaq 0x2fd89(%rip), %rsi     # 0x78622
leaq 0x2c7ff(%rip), %rcx     # 0x7509f
leaq 0x2e34e(%rip), %r8      # 0x76bf5
movq %r15, %rdi
xorl %eax, %eax
callq 0x4750
pushq $0xa
popq %rbp
xorl %r14d, %r14d
xorl %r13d, %r13d
movslq (%rbx), %rax
cmpq %rax, %r13
jge 0x48961
movq 0x8(%rbx), %r12
movl (%r12,%r14), %edx
movl 0x4(%r12,%r14), %ecx
movl 0x8(%r12,%r14), %r8d
movl 0xc(%r12,%r14), %r9d
movq %r15, %rdi
leaq 0x2d222(%rip), %rsi     # 0x75b09
xorl %eax, %eax
callq 0x4750
cmpq $0x0, 0x18(%r12,%r14)
je 0x4894b
andq $0x0, 0x28(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movb $0x0, 0x20(%rsp)
movl %ebp, %edi
movq %r15, %rsi
callq 0x4620
movq 0x18(%r12,%r14), %rdi
movl (%r12,%r14), %eax
movl 0x4(%r12,%r14), %ecx
imulq %rax, %rcx
movl 0x8(%r12,%r14), %eax
movl 0xc(%r12,%r14), %esi
imulq %rax, %rsi
imulq %rcx, %rsi
movq %r15, %rdx
callq 0x489e9
leaq 0x10(%rsp), %rdi
callq 0x6c96
jmp 0x48955
movl %ebp, %edi
movq %r15, %rsi
callq 0x4620
incq %r13
addq $0x20, %r14
jmp 0x488ba
cmpq $0x0, 0x8(%rsp)
jne 0x48971
movq %r15, %rdi
callq 0x2a2f8
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r14
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movq 0x8(%rbx), %r8
leaq 0x2fba6(%rip), %rsi     # 0x78546
leaq 0x2c6f8(%rip), %r9      # 0x7509f
movq %rax, %rdi
xorl %eax, %eax
callq 0x9d52
leaq 0x472a8(%rip), %rsi     # 0x8fc60
movq 0x47619(%rip), %rdx     # 0x8ffd8
movq %r14, %rdi
callq 0x4910
movq %rax, %rbx
movq %r14, %rdi
callq 0x4390
jmp 0x489e1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6c96
movq %rbx, %rdi
callq 0x4950