// File: /workspace/github_cpp_makefile_star2_O2/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::_load_ascii(_IO_FILE*, char const*)
CImg<T>& _load_ascii(std::FILE *const file, const char *const filename) {
      if (!file && !filename)
        throw CImgArgumentException(_cimg_instance
                                    "load_ascii(): Specified filename is (null).",
                                    cimg_instance);

      std::FILE *const nfile = file?file:cimg::fopen(filename,"rb");
      char line[256] = { 0 };
      int err = std::fscanf(nfile,"%255[^\n]",line);
      unsigned int dx = 0, dy = 1, dz = 1, dc = 1;
      std::sscanf(line,"%u%*c%u%*c%u%*c%u",&dx,&dy,&dz,&dc);
      err = std::fscanf(nfile,"%*[^0-9.eE+-]");
      if (!dx || !dy || !dz || !dc) {
        if (!file) cimg::fclose(nfile);
        throw CImgIOException(_cimg_instance
                              "load_ascii(): Invalid ascii header in file '%s', image dimensions are set "
                              "to (%u,%u,%u,%u).",
                              cimg_instance,
                              filename?filename:"(FILE*)",dx,dy,dz,dc);
      }
      assign(dx,dy,dz,dc);
      const unsigned long siz = size();
      unsigned long off = 0;
      double val;
      T *ptr = _data;
      for (err = 1, off = 0; off<siz && err==1; ++off) {
        err = std::fscanf(nfile,"%lf%*[^0-9.eE+-]",&val);
        *(ptr++) = (T)val;
      }
      if (err!=1)
        cimg::warn(_cimg_instance
                   "load_ascii(): Only %lu/%lu values read from file '%s'.",
                   cimg_instance,
                   off-1,siz,filename?filename:"(FILE*)");

      if (!file) cimg::fclose(nfile);
      return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %rbx
movq %rsi, %rax
orq %rdx, %rax
je 0x2e8d4
movq %rdx, %r14
movq %rsi, %r15
movq %rsi, 0x28(%rsp)
testq %rsi, %rsi
jne 0x2e724
leaq 0x46b22(%rip), %rsi     # 0x7523b
movq %r14, %rdi
callq 0x2dca5
movq %rax, %r15
movq %r14, 0x20(%rsp)
leaq 0x40(%rsp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x4280
leaq 0x46d7e(%rip), %rsi     # 0x754c2
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x49d0
leaq 0x1c(%rsp), %r13
andl $0x0, (%r13)
pushq $0x1
popq %rbp
leaq 0xc(%rsp), %rcx
movl %ebp, (%rcx)
leaq 0x8(%rsp), %r8
movl %ebp, (%r8)
leaq 0x4(%rsp), %r9
movl %ebp, (%r9)
leaq 0x46d4f(%rip), %rsi     # 0x754cb
movq %r14, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4510
leaq 0x46de2(%rip), %rsi     # 0x75572
movq %r15, 0x10(%rsp)
movq %r15, %rdi
xorl %eax, %eax
callq 0x49d0
movl (%r13), %esi
testl %esi, %esi
je 0x2e941
movl 0xc(%rsp), %edx
testl %edx, %edx
je 0x2e941
movl 0x8(%rsp), %ecx
testl %ecx, %ecx
je 0x2e941
movl 0x4(%rsp), %r8d
testl %r8d, %r8d
je 0x2e941
movq %rbx, %rdi
callq 0x988e
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
imulq %rax, %rcx
movl 0x8(%rbx), %eax
movl 0xc(%rbx), %r15d
imulq %rax, %r15
imulq %rcx, %r15
movq %rbx, 0x30(%rsp)
movq 0x18(%rbx), %r12
leaq 0x46d6e(%rip), %r13     # 0x7556f
leaq 0x38(%rsp), %r14
xorl %ebx, %ebx
cmpq %r15, %rbx
jae 0x2e837
cmpl $0x1, %ebp
jne 0x2e837
movq 0x10(%rsp), %rdi
movq %r13, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x49d0
movl %eax, %ebp
movsd 0x38(%rsp), %xmm0
movsd %xmm0, (%r12,%rbx,8)
incq %rbx
jmp 0x2e808
cmpl $0x1, %ebp
movq 0x30(%rsp), %r12
je 0x2e8ad
leaq 0x25fa0(%rip), %rax     # 0x547e8
leaq 0x27373(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%r12)
cmovneq %rax, %r10
decq %rbx
movq 0x20(%rsp), %rax
testq %rax, %rax
movl (%r12), %esi
movl 0x4(%r12), %edx
movl 0x8(%r12), %ecx
movl 0xc(%r12), %r8d
movq 0x18(%r12), %r9
leaq 0x46ce4(%rip), %r11     # 0x75567
cmovneq %rax, %r11
subq $0x8, %rsp
leaq 0x4680d(%rip), %r14     # 0x7509f
leaq 0x46ce7(%rip), %rdi     # 0x75580
xorl %eax, %eax
pushq %r11
pushq %r15
pushq %rbx
pushq %r14
pushq %r10
callq 0x97a7
addq $0x30, %rsp
cmpq $0x0, 0x28(%rsp)
jne 0x2e8bf
movq 0x10(%rsp), %rdi
callq 0x2a2f8
movq %r12, %rax
addq $0x148, %rsp            # imm = 0x148
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
movl 0x8(%rbx), %r8d
movl 0xc(%rbx), %r9d
leaq 0x25ef3(%rip), %rax     # 0x547e8
leaq 0x272c6(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%rbx)
cmovneq %rax, %r10
subq $0x8, %rsp
leaq 0x46790(%rip), %r11     # 0x7509f
leaq 0x46b52(%rip), %rsi     # 0x75468
movq %r14, %rdi
xorl %eax, %eax
pushq %r11
pushq %r10
pushq 0x18(%rbx)
callq 0x9d52
addq $0x20, %rsp
leaq 0x6132e(%rip), %rsi     # 0x8fc60
movq 0x6169f(%rip), %rdx     # 0x8ffd8
movq %r14, %rdi
callq 0x4910
movq %rbx, %rbp
cmpq $0x0, 0x28(%rsp)
jne 0x2e956
movq 0x10(%rsp), %rdi
callq 0x2a2f8
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, %r15
leaq 0x25e7e(%rip), %rax     # 0x547e8
leaq 0x27251(%rip), %r10     # 0x55bc2
cmpb $0x0, 0x10(%rbp)
cmovneq %rax, %r10
movq 0x20(%rsp), %rax
testq %rax, %rax
movl (%rbp), %edx
movl 0x4(%rbp), %ecx
movl 0x8(%rbp), %r8d
movl 0xc(%rbp), %r9d
leaq 0x46bd1(%rip), %r11     # 0x75567
cmovneq %rax, %r11
movl 0x1c(%rsp), %ebx
movl 0xc(%rsp), %r14d
movl 0x8(%rsp), %r12d
movl 0x4(%rsp), %r13d
leaq 0x46b29(%rip), %rsi     # 0x754dd
movq %r15, %rdi
xorl %eax, %eax
pushq %r13
pushq %r12
pushq %r14
pushq %rbx
pushq %r11
leaq 0x466d6(%rip), %r11     # 0x7509f
pushq %r11
pushq %r10
pushq 0x18(%rbp)
callq 0x2a3de
addq $0x40, %rsp
leaq 0x61320(%rip), %rsi     # 0x8fd00
movq 0x615f1(%rip), %rdx     # 0x8ffd8
movq %r15, %rdi
callq 0x4910
movq %rax, %rbx
movq %r15, %rdi
jmp 0x2e9fd
movq %rax, %rbx
movq %r14, %rdi
callq 0x4390
movq %rbx, %rdi
callq 0x4950