// File: manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<double>::assign(double const*, unsigned int, unsigned int, unsigned int, unsigned int)
CImg<T>& assign(const T *const values, const unsigned int size_x, const unsigned int size_y=1,
                    const unsigned int size_z=1, const unsigned int size_c=1) {
      const unsigned long siz = (unsigned long)size_x*size_y*size_z*size_c;
      if (!values || !siz) return assign();
      const unsigned long curr_siz = size();
      if (values==_data && siz==curr_siz) return assign(size_x,size_y,size_z,size_c);
      if (_is_shared || values+siz<_data || values>=_data+size()) {
        assign(size_x,size_y,size_z,size_c);
        if (_is_shared) std::memmove(_data,values,siz*sizeof(T));
        else std::memcpy(_data,values,siz*sizeof(T));
      } else {
        T *new_data = 0;
        try { new_data = new T[siz]; } catch (...) {
          _width = _height = _depth = _spectrum = 0; _data = 0;
          throw CImgInstanceException(_cimg_instance
                                      "assign(): Failed to allocate memory (%s) for image (%u,%u,%u,%u).",
                                      cimg_instance,
                                      cimg::strbuffersize(sizeof(T)*size_x*size_y*size_z*size_c),
                                      size_x,size_y,size_z,size_c);
        }
        std::memcpy(new_data,values,siz*sizeof(T));
        delete[] _data; _data = new_data; _width = size_x; _height = size_y; _depth = size_z; _spectrum = size_c;
      }
      return *this;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movl %edx, 0xe4(%rsp)
movl %ecx, 0xe0(%rsp)
movl %r8d, 0xdc(%rsp)
movl %r9d, 0xd8(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movl 0xe4(%rsp), %eax
movl 0xe0(%rsp), %ecx
imulq %rcx, %rax
movl 0xdc(%rsp), %ecx
imulq %rcx, %rax
movl 0xd8(%rsp), %ecx
imulq %rcx, %rax
movq %rax, 0xd0(%rsp)
cmpq $0x0, 0xe8(%rsp)
je 0x11333
cmpq $0x0, 0xd0(%rsp)
jne 0x1134d
movq 0xa8(%rsp), %rdi
callq 0x11230
movq %rax, 0xf8(%rsp)
jmp 0x1177a
movq 0xa8(%rsp), %rdi
callq 0x117b0
movq 0xa8(%rsp), %rcx
movq %rax, 0xc8(%rsp)
movq 0xe8(%rsp), %rax
cmpq 0x18(%rcx), %rax
jne 0x113c1
movq 0xd0(%rsp), %rax
cmpq 0xc8(%rsp), %rax
jne 0x113c1
movq 0xa8(%rsp), %rdi
movl 0xe4(%rsp), %esi
movl 0xe0(%rsp), %edx
movl 0xdc(%rsp), %ecx
movl 0xd8(%rsp), %r8d
callq 0x11900
movq %rax, 0xf8(%rsp)
jmp 0x1177a
movq 0xa8(%rsp), %rax
testb $0x1, 0x10(%rax)
jne 0x11440
movq 0xa8(%rsp), %rcx
movq 0xe8(%rsp), %rax
movq 0xd0(%rsp), %rdx
shlq $0x3, %rdx
addq %rdx, %rax
cmpq 0x18(%rcx), %rax
jb 0x11440
movq 0xa8(%rsp), %rdi
movq 0xe8(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x18(%rdi), %rax
movq %rax, 0x98(%rsp)
callq 0x117b0
movq 0x98(%rsp), %rcx
movq %rax, %rdx
movq 0xa0(%rsp), %rax
shlq $0x3, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jb 0x114c9
movq 0xa8(%rsp), %rdi
movl 0xe4(%rsp), %esi
movl 0xe0(%rsp), %edx
movl 0xdc(%rsp), %ecx
movl 0xd8(%rsp), %r8d
callq 0x11900
movq 0xa8(%rsp), %rax
testb $0x1, 0x10(%rax)
je 0x1149f
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0xe8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
shlq $0x3, %rdx
callq 0x58c0
jmp 0x114c4
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0xe8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
shlq $0x3, %rdx
callq 0x5420
jmp 0x1176a
movq $0x0, 0xc0(%rsp)
movq 0xd0(%rsp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x5040
movq %rax, 0x90(%rsp)
jmp 0x11502
movq 0x90(%rsp), %rax
movq %rax, 0xc0(%rsp)
jmp 0x116ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x51e0
movq 0xa8(%rsp), %rax
movl $0x0, 0xc(%rax)
movl $0x0, 0x8(%rax)
movl $0x0, 0x4(%rax)
movl $0x0, (%rax)
movq $0x0, 0x18(%rax)
movl $0x4008, %edi           # imm = 0x4008
callq 0x5240
movq %rax, %rcx
movq 0xa8(%rsp), %rax
movq %rcx, 0x60(%rsp)
movl (%rax), %ecx
movl %ecx, 0x68(%rsp)
movl 0x4(%rax), %ecx
movl %ecx, 0x6c(%rsp)
movl 0x8(%rax), %ecx
movl %ecx, 0x70(%rsp)
movl 0xc(%rax), %ecx
movl %ecx, 0x74(%rsp)
movq 0x18(%rax), %rcx
movq %rcx, 0x78(%rsp)
movb 0x10(%rax), %dl
leaq 0xd7427(%rip), %rcx     # 0xe89d2
leaq 0xb852f(%rip), %rax     # 0xc9ae1
testb $0x1, %dl
cmovneq %rcx, %rax
movq %rax, 0x80(%rsp)
callq 0x118f0
movq %rax, 0x88(%rsp)
jmp 0x115d0
movl 0xe4(%rsp), %eax
movl %eax, %edi
movl 0xe0(%rsp), %eax
imulq %rax, %rdi
movl 0xdc(%rsp), %eax
imulq %rax, %rdi
movl 0xd8(%rsp), %eax
imulq %rax, %rdi
shlq $0x3, %rdi
callq 0x11dc0
movq %rax, 0x58(%rsp)
jmp 0x1160a
movl 0x74(%rsp), %r9d
movl 0x70(%rsp), %r8d
movl 0x6c(%rsp), %ecx
movl 0x68(%rsp), %edx
movq 0x60(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %r10
movq 0x88(%rsp), %r11
movq 0x58(%rsp), %rbx
movl 0xe4(%rsp), %ebp
movl 0xe0(%rsp), %r14d
movl 0xdc(%rsp), %r15d
movl 0xd8(%rsp), %r12d
movq %rsp, %rax
movq %rax, 0x50(%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 0xb845f(%rip), %rsi     # 0xc9ae6
xorl %eax, %eax
callq 0x11fd0
jmp 0x11690
movq 0x60(%rsp), %rdi
leaq 0xee4ac(%rip), %rsi     # 0xffb48
leaq 0xb6d(%rip), %rdx       # 0x12210
callq 0x5920
jmp 0x117a7
movq 0x60(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
callq 0x53a0
jmp 0x116e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
callq 0x58d0
jmp 0x116e8
jmp 0x11792
movq 0xc0(%rsp), %rdi
movq 0xe8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
shlq $0x3, %rdx
callq 0x5420
movq 0xa8(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
je 0x1172f
movq 0x48(%rsp), %rdi
callq 0x5680
movq 0xa8(%rsp), %rax
movq 0xc0(%rsp), %rcx
movq %rcx, 0x18(%rax)
movl 0xe4(%rsp), %ecx
movl %ecx, (%rax)
movl 0xe0(%rsp), %ecx
movl %ecx, 0x4(%rax)
movl 0xdc(%rsp), %ecx
movl %ecx, 0x8(%rax)
movl 0xd8(%rsp), %ecx
movl %ecx, 0xc(%rax)
movq 0xa8(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0xf8(%rsp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xb8(%rsp), %rdi
callq 0x5970
movq %rax, %rdi
callq 0xcb20
nopw (%rax,%rax)