// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::_load_inr_header(_IO_FILE*, int*, float*)
static void _load_inr_header(std::FILE *file, int out[8], float *const voxel_size) {
      char item[1024] = { 0 }, tmp1[64] = { 0 }, tmp2[64] = { 0 };
      out[0] = std::fscanf(file,"%63s",item);
      out[0] = out[1] = out[2] = out[3] = out[5] = 1; out[4] = out[6] = out[7] = -1;
      if(cimg::strncasecmp(item,"#INRIMAGE-4#{",13)!=0)
        throw CImgIOException("CImg<%s>::load_inr(): INRIMAGE-4 header not found.",
                              pixel_type());

      while (std::fscanf(file," %63[^\n]%*c",item)!=EOF && std::strncmp(item,"##}",3)) {
        std::sscanf(item," XDIM%*[^0-9]%d",out);
        std::sscanf(item," YDIM%*[^0-9]%d",out+1);
        std::sscanf(item," ZDIM%*[^0-9]%d",out+2);
        std::sscanf(item," VDIM%*[^0-9]%d",out+3);
        std::sscanf(item," PIXSIZE%*[^0-9]%d",out+6);
        if (voxel_size) {
          std::sscanf(item," VX%*[^0-9.+-]%f",voxel_size);
          std::sscanf(item," VY%*[^0-9.+-]%f",voxel_size+1);
          std::sscanf(item," VZ%*[^0-9.+-]%f",voxel_size+2);
        }
        if (std::sscanf(item," CPU%*[ =]%s",tmp1)) out[7]=cimg::strncasecmp(tmp1,"sun",3)?0:1;
        switch (std::sscanf(item," TYPE%*[ =]%s %s",tmp1,tmp2)) {
        case 0 : break;
        case 2 : out[5] = cimg::strncasecmp(tmp1,"unsigned",8)?1:0; std::strncpy(tmp1,tmp2,sizeof(tmp1)-1);
        case 1 :
          if (!cimg::strncasecmp(tmp1,"int",3)   || !cimg::strncasecmp(tmp1,"fixed",5))  out[4] = 0;
          if (!cimg::strncasecmp(tmp1,"float",5) || !cimg::strncasecmp(tmp1,"double",6)) out[4] = 1;
          if (!cimg::strncasecmp(tmp1,"packed",6))                                       out[4] = 2;
          if (out[4]>=0) break;
        default :
          throw CImgIOException("CImg<%s>::load_inr(): Invalid pixel type '%s' defined in header.",
                                pixel_type(),
                                tmp2);
        }
      }
      if(out[0]<0 || out[1]<0 || out[2]<0 || out[3]<0)
        throw CImgIOException("CImg<%s>::load_inr(): Invalid dimensions (%d,%d,%d,%d) defined in header.",
                              pixel_type(),
                              out[0],out[1],out[2],out[3]);
      if(out[4]<0 || out[5]<0)
        throw CImgIOException("CImg<%s>::load_inr(): Incomplete pixel type defined in header.",
                              pixel_type());
      if(out[6]<0)
        throw CImgIOException("CImg<%s>::load_inr(): Incomplete PIXSIZE field defined in header.",
                              pixel_type());
      if(out[7]<0)
        throw CImgIOException("CImg<%s>::load_inr(): Big/Little Endian coding type undefined in header.",
                              pixel_type());
    }

// Assembly:
subq $0x518, %rsp            # imm = 0x518
movq %rdi, 0x510(%rsp)
movq %rsi, 0x508(%rsp)
movq %rdx, 0x500(%rsp)
leaq 0x100(%rsp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x52a0
leaq 0xc0(%rsp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x52a0
leaq 0x80(%rsp), %rdi
xorl %esi, %esi
movl $0x40, %edx
callq 0x52a0
movq 0x510(%rsp), %rdi
leaq 0x100(%rsp), %rdx
leaq 0x65cff(%rip), %rsi     # 0xea6b1
movb $0x0, %al
callq 0x5a10
movl %eax, %ecx
movq 0x508(%rsp), %rax
movl %ecx, (%rax)
movq 0x508(%rsp), %rax
movl $0x1, 0x14(%rax)
movq 0x508(%rsp), %rax
movl $0x1, 0xc(%rax)
movq 0x508(%rsp), %rax
movl $0x1, 0x8(%rax)
movq 0x508(%rsp), %rax
movl $0x1, 0x4(%rax)
movq 0x508(%rsp), %rax
movl $0x1, (%rax)
movq 0x508(%rsp), %rax
movl $0xffffffff, 0x1c(%rax) # imm = 0xFFFFFFFF
movq 0x508(%rsp), %rax
movl $0xffffffff, 0x18(%rax) # imm = 0xFFFFFFFF
movq 0x508(%rsp), %rax
movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF
leaq 0x100(%rsp), %rdi
leaq 0x65c6b(%rip), %rsi     # 0xea6b6
movl $0xd, %edx
callq 0x3afa0
cmpl $0x0, %eax
je 0x84ac4
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, 0x60(%rsp)
callq 0x118f0
movq %rax, 0x68(%rsp)
jmp 0x84a75
movq 0x68(%rsp), %rdx
movq 0x60(%rsp), %rdi
leaq 0x65c3e(%rip), %rsi     # 0xea6c4
xorl %eax, %eax
callq 0x5c880
jmp 0x84a8f
movq 0x60(%rsp), %rdi
leaq 0x7b1d5(%rip), %rsi     # 0xffc70
leaq -0x27fe2(%rip), %rdx    # 0x5cac0
callq 0x5920
movq 0x60(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
callq 0x53a0
jmp 0x850aa
jmp 0x84ac6
movq 0x510(%rsp), %rdi
leaq 0x100(%rsp), %rdx
leaq 0x65c1a(%rip), %rsi     # 0xea6f7
movb $0x0, %al
callq 0x5a10
movl %eax, %ecx
xorl %eax, %eax
cmpl $-0x1, %ecx
movb %al, 0x5f(%rsp)
je 0x84b14
leaq 0x100(%rsp), %rdi
leaq 0x65c03(%rip), %rsi     # 0xea703
movl $0x3, %edx
callq 0x5230
cmpl $0x0, %eax
setne %al
movb %al, 0x5f(%rsp)
movb 0x5f(%rsp), %al
testb $0x1, %al
jne 0x84b21
jmp 0x84e73
leaq 0x100(%rsp), %rdi
movq 0x508(%rsp), %rdx
leaq 0x65bcf(%rip), %rsi     # 0xea707
movb $0x0, %al
callq 0x5510
leaq 0x100(%rsp), %rdi
movq 0x508(%rsp), %rdx
addq $0x4, %rdx
leaq 0x65bbd(%rip), %rsi     # 0xea717
movb $0x0, %al
callq 0x5510
leaq 0x100(%rsp), %rdi
movq 0x508(%rsp), %rdx
addq $0x8, %rdx
leaq 0x65bab(%rip), %rsi     # 0xea727
movb $0x0, %al
callq 0x5510
leaq 0x100(%rsp), %rdi
movq 0x508(%rsp), %rdx
addq $0xc, %rdx
leaq 0x65b99(%rip), %rsi     # 0xea737
movb $0x0, %al
callq 0x5510
leaq 0x100(%rsp), %rdi
movq 0x508(%rsp), %rdx
addq $0x18, %rdx
leaq 0x65b87(%rip), %rsi     # 0xea747
movb $0x0, %al
callq 0x5510
cmpq $0x0, 0x500(%rsp)
je 0x84c34
leaq 0x100(%rsp), %rdi
movq 0x500(%rsp), %rdx
leaq 0x65b71(%rip), %rsi     # 0xea75a
movb $0x0, %al
callq 0x5510
leaq 0x100(%rsp), %rdi
movq 0x500(%rsp), %rdx
addq $0x4, %rdx
leaq 0x65b60(%rip), %rsi     # 0xea76b
movb $0x0, %al
callq 0x5510
leaq 0x100(%rsp), %rdi
movq 0x500(%rsp), %rdx
addq $0x8, %rdx
leaq 0x65b4f(%rip), %rsi     # 0xea77c
movb $0x0, %al
callq 0x5510
leaq 0x100(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
leaq 0x65b42(%rip), %rsi     # 0xea78d
movb $0x0, %al
callq 0x5510
cmpl $0x0, %eax
je 0x84c8a
leaq 0xc0(%rsp), %rdi
leaq 0x65b34(%rip), %rsi     # 0xea79a
movl $0x3, %edx
callq 0x3afa0
movl %eax, %edx
movl $0x1, %ecx
xorl %eax, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq 0x508(%rsp), %rax
movl %ecx, 0x1c(%rax)
leaq 0x65b0d(%rip), %rsi     # 0xea79e
xorl %eax, %eax
leaq 0x100(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
leaq 0x80(%rsp), %rcx
callq 0x5510
movl %eax, %ecx
movl %ecx, 0x58(%rsp)
testl %eax, %eax
je 0x84cd5
jmp 0x84cbc
movl 0x58(%rsp), %eax
subl $0x1, %eax
je 0x84d27
jmp 0x84cc7
movl 0x58(%rsp), %eax
subl $0x2, %eax
je 0x84cda
jmp 0x84dfc
jmp 0x84e6e
leaq 0xc0(%rsp), %rdi
leaq 0x65ac6(%rip), %rsi     # 0xea7af
movl $0x8, %edx
callq 0x3afa0
movl %eax, %edx
xorl %ecx, %ecx
movl $0x1, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq 0x508(%rsp), %rax
movl %ecx, 0x14(%rax)
leaq 0xc0(%rsp), %rdi
leaq 0x80(%rsp), %rsi
movl $0x3f, %edx
callq 0x5270
leaq 0xc0(%rsp), %rdi
leaq 0x63743(%rip), %rsi     # 0xe8479
movl $0x3, %edx
callq 0x3afa0
cmpl $0x0, %eax
je 0x84d63
leaq 0xc0(%rsp), %rdi
leaq 0x65a64(%rip), %rsi     # 0xea7b8
movl $0x5, %edx
callq 0x3afa0
cmpl $0x0, %eax
jne 0x84d72
movq 0x508(%rsp), %rax
movl $0x0, 0x10(%rax)
leaq 0xc0(%rsp), %rdi
leaq 0x636e9(%rip), %rsi     # 0xe846a
movl $0x5, %edx
callq 0x3afa0
cmpl $0x0, %eax
je 0x84dae
leaq 0xc0(%rsp), %rdi
leaq 0x64223(%rip), %rsi     # 0xe8fc2
movl $0x6, %edx
callq 0x3afa0
cmpl $0x0, %eax
jne 0x84dbd
movq 0x508(%rsp), %rax
movl $0x1, 0x10(%rax)
leaq 0xc0(%rsp), %rdi
leaq 0x659f2(%rip), %rsi     # 0xea7be
movl $0x6, %edx
callq 0x3afa0
cmpl $0x0, %eax
jne 0x84dea
movq 0x508(%rsp), %rax
movl $0x2, 0x10(%rax)
movq 0x508(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jl 0x84dfa
jmp 0x84e6e
jmp 0x84dfc
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, 0x48(%rsp)
callq 0x118f0
movq %rax, 0x50(%rsp)
jmp 0x84e17
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rdi
leaq 0x6599d(%rip), %rsi     # 0xea7c5
xorl %eax, %eax
leaq 0x80(%rsp), %rcx
callq 0x5c880
jmp 0x84e39
movq 0x48(%rsp), %rdi
leaq 0x7ae2b(%rip), %rsi     # 0xffc70
leaq -0x2838c(%rip), %rdx    # 0x5cac0
callq 0x5920
movq 0x48(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
callq 0x53a0
jmp 0x850aa
jmp 0x84ac6
movq 0x508(%rsp), %rax
cmpl $0x0, (%rax)
jl 0x84eae
movq 0x508(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jl 0x84eae
movq 0x508(%rsp), %rax
cmpl $0x0, 0x8(%rax)
jl 0x84eae
movq 0x508(%rsp), %rax
cmpl $0x0, 0xc(%rax)
jge 0x84f32
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, 0x38(%rsp)
callq 0x118f0
movq %rax, 0x40(%rsp)
jmp 0x84ec9
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rdi
movq 0x508(%rsp), %rax
movl (%rax), %ecx
movl 0x4(%rax), %r8d
movl 0x8(%rax), %r9d
movl 0xc(%rax), %esi
movq %rsp, %rax
movl %esi, (%rax)
leaq 0x65912(%rip), %rsi     # 0xea806
xorl %eax, %eax
callq 0x5c880
jmp 0x84efd
movq 0x38(%rsp), %rdi
leaq 0x7ad67(%rip), %rsi     # 0xffc70
leaq -0x28450(%rip), %rdx    # 0x5cac0
callq 0x5920
movq 0x38(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
callq 0x53a0
jmp 0x850aa
movq 0x508(%rsp), %rax
cmpl $0x0, 0x10(%rax)
jl 0x84f4e
movq 0x508(%rsp), %rax
cmpl $0x0, 0x14(%rax)
jge 0x84fb8
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, 0x28(%rsp)
callq 0x118f0
movq %rax, 0x30(%rsp)
jmp 0x84f69
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rdi
leaq 0x658d6(%rip), %rsi     # 0xea850
xorl %eax, %eax
callq 0x5c880
jmp 0x84f83
movq 0x28(%rsp), %rdi
leaq 0x7ace1(%rip), %rsi     # 0xffc70
leaq -0x284d6(%rip), %rdx    # 0x5cac0
callq 0x5920
movq 0x28(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
callq 0x53a0
jmp 0x850aa
movq 0x508(%rsp), %rax
cmpl $0x0, 0x18(%rax)
jge 0x8502d
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, 0x18(%rsp)
callq 0x118f0
movq %rax, 0x20(%rsp)
jmp 0x84fe1
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rdi
leaq 0x6589d(%rip), %rsi     # 0xea88f
xorl %eax, %eax
callq 0x5c880
jmp 0x84ffb
movq 0x18(%rsp), %rdi
leaq 0x7ac69(%rip), %rsi     # 0xffc70
leaq -0x2854e(%rip), %rdx    # 0x5cac0
callq 0x5920
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
callq 0x53a0
jmp 0x850aa
movq 0x508(%rsp), %rax
cmpl $0x0, 0x1c(%rax)
jge 0x850a2
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, 0x8(%rsp)
callq 0x118f0
movq %rax, 0x10(%rsp)
jmp 0x85056
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rdi
leaq 0x6586a(%rip), %rsi     # 0xea8d1
xorl %eax, %eax
callq 0x5c880
jmp 0x85070
movq 0x8(%rsp), %rdi
leaq 0x7abf4(%rip), %rsi     # 0xffc70
leaq -0x285c3(%rip), %rdx    # 0x5cac0
callq 0x5920
movq 0x8(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x78(%rsp)
movl %eax, 0x74(%rsp)
callq 0x53a0
jmp 0x850aa
addq $0x518, %rsp            # imm = 0x518
retq
movq 0x78(%rsp), %rdi
callq 0x5970
nopw %cs:(%rax,%rax)
nop