// File: 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 %r12
pushq %rbx
subq $0x270, %rsp            # imm = 0x270
movq %rdi, 0x268(%rsp)
movq %rsi, 0x260(%rsp)
movq %rdx, 0x258(%rsp)
movq 0x268(%rsp), %rax
movq %rax, 0x100(%rsp)
cmpq $0x0, 0x260(%rsp)
jne 0x668a1
cmpq $0x0, 0x258(%rsp)
jne 0x668a1
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 0x821f3(%rip), %rcx     # 0xe89d2
leaq 0x632fb(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0xf0(%rsp)
callq 0x118f0
movq %rax, 0xf8(%rsp)
jmp 0x66804
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 0x82b34(%rip), %rsi     # 0xe938b
xorl %eax, %eax
callq 0x12220
jmp 0x66860
movq 0xd0(%rsp), %rdi
leaq 0x992f1(%rip), %rsi     # 0xffb60
leaq -0x54416(%rip), %rdx    # 0x12460
callq 0x5920
movq 0xd0(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
callq 0x53a0
jmp 0x66db3
cmpq $0x0, 0x260(%rsp)
je 0x668be
movq 0x260(%rsp), %rax
movq %rax, 0xc8(%rsp)
jmp 0x668da
movq 0x258(%rsp), %rdi
leaq 0x82891(%rip), %rsi     # 0xe915e
callq 0x654a0
movq %rax, 0xc8(%rsp)
movq 0xc8(%rsp), %rax
movq %rax, 0x240(%rsp)
leaq 0x140(%rsp), %rdi
xorl %esi, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x52a0
movq 0x240(%rsp), %rdi
leaq 0x140(%rsp), %rdx
leaq 0x82ad0(%rip), %rsi     # 0xe93e5
movb $0x0, %al
callq 0x5a10
movl %eax, 0x13c(%rsp)
movl $0x0, 0x138(%rsp)
movl $0x1, 0x134(%rsp)
movl $0x1, 0x130(%rsp)
movl $0x1, 0x12c(%rsp)
leaq 0x140(%rsp), %rdi
leaq 0x82a90(%rip), %rsi     # 0xe93ee
leaq 0x138(%rsp), %rdx
leaq 0x134(%rsp), %rcx
leaq 0x130(%rsp), %r8
leaq 0x12c(%rsp), %r9
movb $0x0, %al
callq 0x5510
movq 0x240(%rsp), %rdi
leaq 0x82b01(%rip), %rsi     # 0xe9495
movb $0x0, %al
callq 0x5a10
movl %eax, 0x13c(%rsp)
cmpl $0x0, 0x138(%rsp)
je 0x669ce
cmpl $0x0, 0x134(%rsp)
je 0x669ce
cmpl $0x0, 0x130(%rsp)
je 0x669ce
cmpl $0x0, 0x12c(%rsp)
jne 0x66b72
cmpq $0x0, 0x260(%rsp)
jne 0x669e6
movq 0x240(%rsp), %rdi
callq 0x5c6f0
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0x100(%rsp), %rax
movq %rcx, 0x98(%rsp)
movl (%rax), %ecx
movl %ecx, 0xa0(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0xa4(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0xa8(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0xac(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0xb0(%rsp)
movb 0x10(%rax), %dl
leaq 0x81f92(%rip), %rcx     # 0xe89d2
leaq 0x6309a(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0xb8(%rsp)
callq 0x118f0
movq %rax, 0xc0(%rsp)
jmp 0x66a65
cmpq $0x0, 0x258(%rsp)
je 0x66a82
movq 0x258(%rsp), %rax
movq %rax, 0x90(%rsp)
jmp 0x66a93
leaq 0x82a01(%rip), %rax     # 0xe948a
movq %rax, 0x90(%rsp)
jmp 0x66a93
movl 0xac(%rsp), %r9d
movl 0xa8(%rsp), %r8d
movl 0xa4(%rsp), %ecx
movl 0xa0(%rsp), %edx
movq 0x98(%rsp), %rdi
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %r10
movq 0xc0(%rsp), %r11
movq 0x90(%rsp), %rbx
movl 0x138(%rsp), %ebp
movl 0x134(%rsp), %r14d
movl 0x130(%rsp), %r15d
movl 0x12c(%rsp), %r12d
movq %rsp, %rax
movq %rax, 0x88(%rsp)
movl %r12d, 0x38(%rax)
movl %r15d, 0x30(%rax)
movl %r14d, 0x28(%rax)
movl %ebp, 0x20(%rax)
movq %rbx, 0x18(%rax)
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rsi, (%rax)
leaq 0x828d8(%rip), %rsi     # 0xe9400
xorl %eax, %eax
callq 0x5c880
jmp 0x66b31
movq 0x98(%rsp), %rdi
leaq 0x99130(%rip), %rsi     # 0xffc70
leaq -0xa087(%rip), %rdx     # 0x5cac0
callq 0x5920
movq 0x98(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x250(%rsp)
movl %eax, 0x24c(%rsp)
callq 0x53a0
jmp 0x66db3
movq 0x100(%rsp), %rdi
movl 0x138(%rsp), %esi
movl 0x134(%rsp), %edx
movl 0x130(%rsp), %ecx
movl 0x12c(%rsp), %r8d
callq 0x11900
movq 0x100(%rsp), %rdi
callq 0x117b0
movq %rax, %rcx
movq 0x100(%rsp), %rax
movq %rcx, 0x120(%rsp)
movq $0x0, 0x118(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x108(%rsp)
movl $0x1, 0x13c(%rsp)
movq $0x0, 0x118(%rsp)
movq 0x118(%rsp), %rcx
xorl %eax, %eax
cmpq 0x120(%rsp), %rcx
movb %al, 0x87(%rsp)
jae 0x66c18
cmpl $0x1, 0x13c(%rsp)
sete %al
movb %al, 0x87(%rsp)
movb 0x87(%rsp), %al
testb $0x1, %al
jne 0x66c25
jmp 0x66c87
movq 0x240(%rsp), %rdi
leaq 0x8285e(%rip), %rsi     # 0xe9492
leaq 0x110(%rsp), %rdx
movb $0x0, %al
callq 0x5a10
movl %eax, 0x13c(%rsp)
movsd 0x110(%rsp), %xmm0
movq 0x108(%rsp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, 0x108(%rsp)
movsd %xmm0, (%rax)
movq 0x118(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x118(%rsp)
jmp 0x66beb
cmpl $0x1, 0x13c(%rsp)
je 0x66d83
movq 0x100(%rsp), %rax
movl (%rax), %ecx
movl %ecx, 0x48(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x4c(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x50(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x54(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x58(%rsp)
movb 0x10(%rax), %dl
leaq 0x62e16(%rip), %rax     # 0xc9ae1
leaq 0x81d00(%rip), %rcx     # 0xe89d2
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x60(%rsp)
callq 0x118f0
movq %rax, 0x68(%rsp)
movq 0x118(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x70(%rsp)
movq 0x120(%rsp), %rax
movq %rax, 0x78(%rsp)
cmpq $0x0, 0x258(%rsp)
je 0x66d20
movq 0x258(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x66d2e
leaq 0x82763(%rip), %rax     # 0xe948a
movq %rax, 0x40(%rsp)
jmp 0x66d2e
movq 0x78(%rsp), %r10
movq 0x70(%rsp), %r11
movq 0x68(%rsp), %rbx
movq 0x60(%rsp), %r14
movq 0x58(%rsp), %r9
movl 0x54(%rsp), %r8d
movl 0x50(%rsp), %ecx
movl 0x4c(%rsp), %edx
movl 0x48(%rsp), %esi
movq 0x40(%rsp), %rax
leaq 0x8273f(%rip), %rdi     # 0xe94a3
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movq %r10, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movb $0x0, %al
callq 0x117e0
cmpq $0x0, 0x260(%rsp)
jne 0x66d9b
movq 0x240(%rsp), %rdi
callq 0x5c6f0
movq 0x100(%rsp), %rax
addq $0x270, %rsp            # imm = 0x270
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x250(%rsp), %rdi
callq 0x5970