// File: /workspace/github_cpp_makefile_star2_O1/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::_save_inr(_IO_FILE*, char const*, float const*) const
const CImg<T>& _save_inr(std::FILE *const file, const char *const filename, const float *const voxel_size) const {
      if (!file && !filename)
        throw CImgArgumentException(_cimg_instance
                                    "save_inr(): Specified filename is (null).",
                                    cimg_instance);
      if (is_empty()) { cimg::fempty(file,filename); return *this; }

      int inrpixsize=-1;
      const char *inrtype = "unsigned fixed\nPIXSIZE=8 bits\nSCALE=2**0";
      if (!cimg::strcasecmp(pixel_type(),"unsigned char")) {
        inrtype = "unsigned fixed\nPIXSIZE=8 bits\nSCALE=2**0"; inrpixsize = 1;
      }
      if (!cimg::strcasecmp(pixel_type(),"char")) {
        inrtype = "fixed\nPIXSIZE=8 bits\nSCALE=2**0"; inrpixsize = 1;
      }
      if (!cimg::strcasecmp(pixel_type(),"unsigned short")) {
        inrtype = "unsigned fixed\nPIXSIZE=16 bits\nSCALE=2**0";inrpixsize = 2;
      }
      if (!cimg::strcasecmp(pixel_type(),"short")) {
        inrtype = "fixed\nPIXSIZE=16 bits\nSCALE=2**0"; inrpixsize = 2;
      }
      if (!cimg::strcasecmp(pixel_type(),"unsigned int")) {
        inrtype = "unsigned fixed\nPIXSIZE=32 bits\nSCALE=2**0";inrpixsize = 4;
      }
      if (!cimg::strcasecmp(pixel_type(),"int")) {
        inrtype = "fixed\nPIXSIZE=32 bits\nSCALE=2**0"; inrpixsize = 4;
      }
      if (!cimg::strcasecmp(pixel_type(),"float")) {
        inrtype = "float\nPIXSIZE=32 bits"; inrpixsize = 4;
      }
      if (!cimg::strcasecmp(pixel_type(),"double")) {
        inrtype = "float\nPIXSIZE=64 bits"; inrpixsize = 8;
      }
      if (inrpixsize<=0)
        throw CImgIOException(_cimg_instance
                              "save_inr(): Unsupported pixel type '%s' for file '%s'",
                              cimg_instance,
                              pixel_type(),filename?filename:"(FILE*)");

      std::FILE *const nfile = file?file:cimg::fopen(filename,"wb");
      char header[257] = { 0 };
      int err = cimg_snprintf(header,sizeof(header),"#INRIMAGE-4#{\nXDIM=%u\nYDIM=%u\nZDIM=%u\nVDIM=%u\n",
                              _width,_height,_depth,_spectrum);
      if (voxel_size) err+=std::sprintf(header + err,"VX=%g\nVY=%g\nVZ=%g\n",voxel_size[0],voxel_size[1],voxel_size[2]);
      err+=std::sprintf(header + err,"TYPE=%s\nCPU=%s\n",inrtype,cimg::endianness()?"sun":"decm");
      std::memset(header + err,'\n',252 - err);
      std::memcpy(header + 252,"##}\n",4);
      cimg::fwrite(header,256,nfile);
      cimg_forXYZ(*this,x,y,z) cimg_forC(*this,c) cimg::fwrite(&((*this)(x,y,z,c)),1,nfile);
      if (!file) cimg::fclose(nfile);
      return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdi, %rbx
movq %rsi, %rax
orq %rdx, %rax
je 0x62eb3
movq %rdx, %r13
cmpq $0x0, 0x18(%rbx)
je 0x62e3f
movdqu (%rbx), %xmm0
pxor %xmm1, %xmm1
pcmpeqd %xmm0, %xmm1
movmskps %xmm1, %eax
testb %al, %al
jne 0x62e3f
movq %rcx, %r12
xorl %eax, %eax
xorl %ecx, %ecx
testb %al, %al
jne 0x62b4a
incq %rcx
cmpl $0x7, %ecx
jne 0x62b3e
movb $0x1, %al
testb %al, %al
je 0x62f0c
movq %rsi, %r14
movq %rsi, 0x28(%rsp)
testq %rsi, %rsi
jne 0x62b73
leaq 0x30fc5(%rip), %rsi     # 0x93b2d
movq %r13, %rdi
callq 0x3ceb3
movq %rax, %r14
leaq 0x34883(%rip), %r13     # 0x973fd
leaq 0x30(%rsp), %rbp
movl $0x101, %edx            # imm = 0x101
movq %rbp, %rdi
xorl %esi, %esi
callq 0x4290
movl (%rbx), %ecx
movl 0x4(%rbx), %r8d
movl 0x8(%rbx), %r9d
movl 0xc(%rbx), %r10d
subq $0x8, %rsp
leaq 0x348d0(%rip), %rdx     # 0x97477
movl $0x101, %esi            # imm = 0x101
movq %rbp, %rdi
xorl %eax, %eax
pushq %r10
callq 0x4880
addq $0x10, %rsp
movl %eax, %ebp
testq %r12, %r12
movq %rbx, 0x20(%rsp)
je 0x62bfd
movslq %ebp, %rax
leaq (%rsp,%rax), %rdi
addq $0x30, %rdi
xorps %xmm0, %xmm0
cvtss2sd (%r12), %xmm0
xorps %xmm1, %xmm1
cvtss2sd 0x4(%r12), %xmm1
cvtss2sd 0x8(%r12), %xmm2
leaq 0x348b2(%rip), %rsi     # 0x974a6
movb $0x3, %al
callq 0x40a0
addl %eax, %ebp
movslq %ebp, %rbx
leaq (%rsp,%rbx), %rdi
addq $0x30, %rdi
leaq 0x348aa(%rip), %rsi     # 0x974b9
leaq 0x348b3(%rip), %rcx     # 0x974c9
movq %r13, %rdx
xorl %eax, %eax
callq 0x40a0
addl %eax, %ebx
movslq %ebx, %rax
leaq (%rsp,%rax), %rdi
addq $0x30, %rdi
movl $0xfc, %ecx
subl %eax, %ecx
movslq %ecx, %rdx
movl $0xa, %esi
callq 0x4290
movl $0xa7d2323, 0x12c(%rsp) # imm = 0xA7D2323
testq %r14, %r14
je 0x62f83
movl $0x100, %r15d           # imm = 0x100
xorl %r12d, %r12d
movl $0x3f00000, %ebx        # imm = 0x3F00000
cmpq %rbx, %r15
movl $0x3f00000, %r13d       # imm = 0x3F00000
cmovbq %r15, %r13
leaq 0x30(%rsp,%r12), %rdi
movl $0x1, %esi
movq %r13, %rdx
movq %r14, %rcx
callq 0x4a70
addq %rax, %r12
subq %rax, %r15
cmpq %rax, %r13
jne 0x62c95
testq %r15, %r15
jne 0x62c63
testq %r15, %r15
je 0x62cb0
leaq 0x33a34(%rip), %rdi     # 0x966d5
movl $0x100, %edx            # imm = 0x100
movq %r12, %rsi
xorl %eax, %eax
callq 0xbb52
movq 0x20(%rsp), %rbx
cmpl $0x0, 0x8(%rbx)
jle 0x62e01
movq $0x0, 0x8(%rsp)
cmpl $0x0, 0x4(%rbx)
jle 0x62de7
movq $0x0, 0x10(%rsp)
cmpl $0x0, (%rbx)
jle 0x62dcd
movq $0x0, 0x18(%rsp)
cmpl $0x0, 0xc(%rbx)
jle 0x62db4
xorl %r12d, %r12d
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
movq 0x10(%rsp), %rdx
imulq %rax, %rdx
imulq %rax, %rcx
movl 0x8(%rbx), %r13d
imulq %r12, %r13
imulq %rcx, %r13
imulq 0x8(%rsp), %rcx
shlq $0x3, %rdx
addq 0x18(%rbx), %rdx
movq 0x18(%rsp), %rax
leaq (%rdx,%rax,8), %rax
leaq (%rax,%rcx,8), %rax
shlq $0x3, %r13
addq %rax, %r13
je 0x62e5f
movl $0x1, %ebx
xorl %ebp, %ebp
leaq (,%rbx,8), %rax
cmpq $0x3f00000, %rax        # imm = 0x3F00000
movl $0x7e0000, %r15d        # imm = 0x7E0000
cmovbq %rbx, %r15
leaq (%r13,%rbp,8), %rdi
movl $0x8, %esi
movq %r15, %rdx
movq %r14, %rcx
callq 0x4a70
addq %rax, %rbp
subq %rax, %rbx
cmpq %rax, %r15
jne 0x62d84
testq %rbx, %rbx
jne 0x62d47
testq %rbx, %rbx
je 0x62d9f
movl $0x1, %edx
leaq 0x33940(%rip), %rdi     # 0x966d5
movq %rbp, %rsi
xorl %eax, %eax
callq 0xbb52
incq %r12
movq 0x20(%rsp), %rbx
movslq 0xc(%rbx), %rax
cmpq %rax, %r12
jl 0x62cfa
movq 0x18(%rsp), %rdx
incq %rdx
movslq (%rbx), %rax
movq %rdx, 0x18(%rsp)
cmpq %rax, %rdx
jl 0x62ced
movq 0x10(%rsp), %rdx
incq %rdx
movslq 0x4(%rbx), %rax
movq %rdx, 0x10(%rsp)
cmpq %rax, %rdx
jl 0x62cdb
movq 0x8(%rsp), %rdx
incq %rdx
movslq 0x8(%rbx), %rax
movq %rdx, 0x8(%rsp)
cmpq %rax, %rdx
jl 0x62cc8
cmpq $0x0, 0x28(%rsp)
jne 0x62e4a
movq 0x4a198(%rip), %rax     # 0xacfa8
cmpq %r14, (%rax)
je 0x62e4a
movq 0x4a16c(%rip), %rax     # 0xacf88
cmpq %r14, (%rax)
je 0x62e4a
movq %r14, %rdi
callq 0x4540
testl %eax, %eax
je 0x62e4a
leaq 0x30c98(%rip), %rdi     # 0x93acc
movl %eax, %esi
xorl %eax, %eax
callq 0xbb52
jmp 0x62e4a
movq %rsi, %rdi
movq %r13, %rsi
callq 0x5f9f0
movq %rbx, %rax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
subq $0x8, %rsp
leaq 0x33810(%rip), %rsi     # 0x96687
leaq 0x30d71(%rip), %rcx     # 0x93bef
leaq 0x104b3(%rip), %r8      # 0x73338
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %r9
xorl %eax, %eax
pushq %r14
callq 0xc196
addq $0x10, %rsp
leaq 0x49d7c(%rip), %rsi     # 0xacc20
movq 0x4a125(%rip), %rdx     # 0xacfd0
movq %r15, %rdi
callq 0x4900
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x10464(%rip), %rax     # 0x73338
leaq 0x11837(%rip), %r10     # 0x74712
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x30d01(%rip), %r11     # 0x93bef
leaq 0x34487(%rip), %rsi     # 0x9737c
movq %r15, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0xc196
addq $0x20, %rsp
jmp 0x62e9d
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
leaq 0x10418(%rip), %rax     # 0x73338
leaq 0x117eb(%rip), %r10     # 0x74712
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
testq %r13, %r13
movl (%rbx), %edx
movl 0x4(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x3119b(%rip), %r11     # 0x940e1
cmovneq %r13, %r11
subq $0x8, %rsp
movq %rbx, %r14
leaq 0x30c97(%rip), %rbx     # 0x93bef
leaq 0x344b4(%rip), %rsi     # 0x97413
movq %r15, %rdi
xorl %eax, %eax
pushq %r11
pushq %rbx
pushq %rbx
pushq %r10
pushq 0x18(%r14)
callq 0x385b4
addq $0x30, %rsp
leaq 0x49d72(%rip), %rsi     # 0xaccf0
jmp 0x62ea4
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
subq $0x8, %rsp
leaq 0x336ec(%rip), %rsi     # 0x96687
leaq 0x1c33e(%rip), %rcx     # 0x7f2e0
leaq 0x32459(%rip), %r8      # 0x95402
leaq 0x38(%rsp), %r9
movl $0x100, %edx            # imm = 0x100
movq %rax, %rdi
xorl %eax, %eax
pushq %r14
callq 0xc196
addq $0x10, %rsp
jmp 0x62e9d
jmp 0x62fce
jmp 0x62fce
jmp 0x62fce
movq %rax, %rbx
movq %r15, %rdi
callq 0x43b0
movq %rbx, %rdi
callq 0x4950
nop