// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r12d
movl %edx, %r13d
movq %rdi, %rbx
movl %edx, %eax
movl %ecx, %ecx
movl %r8d, %edx
imulq %rcx, %rdx
movl %r9d, %ebp
imulq %rax, %rbp
imulq %rdx, %rbp
testq %rsi, %rsi
setne %al
testq %rbp, %rbp
setne %cl
testb %cl, %al
je 0xb975
movq %rsi, %r14
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
imulq %rax, %rcx
movl 0x8(%rbx), %edx
movl 0xc(%rbx), %eax
imulq %rdx, %rax
imulq %rcx, %rax
movq 0x18(%rbx), %r15
cmpq %rsi, %r15
jne 0xb9ad
cmpq %rax, %rbp
jne 0xb9ad
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl %r8d, %ecx
movl %r9d, %r8d
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbc3e
cmpb $0x0, 0x10(%rbx)
jne 0xb989
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xb989
callq 0x4680
movq $0x0, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movb $0x0, 0x10(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, 0x10(%rbx)
jne 0xba2d
leaq (%r14,%rbp,8), %rcx
cmpq %r15, %rcx
jb 0xba2d
leaq (%r15,%rax,8), %rax
cmpq %r14, %rax
jbe 0xba2d
movq %r8, 0x10(%rsp)
movq %r9, 0x18(%rsp)
movq %rbp, %rax
shrq $0x3d, %rax
shlq $0x3, %rbp
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %rbp, %rdi
callq 0x4040
movq %rax, (%rsp)
movq %rax, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x4430
testq %r15, %r15
je 0xba09
movq %r15, %rdi
callq 0x4680
movq (%rsp), %rax
movq %rax, 0x18(%rbx)
movl %r13d, (%rbx)
movl %r12d, 0x4(%rbx)
movq 0x10(%rsp), %rax
movl %eax, 0x8(%rbx)
movq 0x18(%rsp), %rax
movl %eax, 0xc(%rbx)
jmp 0xb99b
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movl %r8d, %ecx
movl %r9d, %r8d
callq 0xbc3e
movq 0x18(%rbx), %rdi
shlq $0x3, %rbp
cmpb $0x1, 0x10(%rbx)
jne 0xba5f
movq %r14, %rsi
movq %rbp, %rdx
callq 0x48b0
jmp 0xb99b
movq %r14, %rsi
movq %rbp, %rdx
callq 0x4430
jmp 0xb99b
movq %rax, %rdi
callq 0x41d0
movq $0x0, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movl $0x4008, %edi           # imm = 0x4008
callq 0x4210
movq %rax, (%rsp)
movl (%rbx), %r15d
movl 0x4(%rbx), %r14d
movl 0x8(%rbx), %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rbx), %eax
movl %eax, 0x8(%rsp)
movq 0x18(%rbx), %rax
movq %rax, 0x20(%rsp)
movb 0x10(%rbx), %bl
movq %rbp, %rdi
callq 0xbeb1
movq %rax, %r10
leaq 0x67872(%rip), %rax     # 0x73338
leaq 0x68c45(%rip), %r11     # 0x74712
testb %bl, %bl
cmovneq %rax, %r11
leaq 0x88115(%rip), %rbx     # 0x93bef
leaq 0x68c36(%rip), %rsi     # 0x74717
movq (%rsp), %rdi
movl %r15d, %edx
movl %r14d, %ecx
movl 0xc(%rsp), %r8d
movl 0x8(%rsp), %r9d
xorl %eax, %eax
pushq 0x18(%rsp)
pushq 0x18(%rsp)
pushq %r12
pushq %r13
pushq %r10
pushq %rbx
pushq %r11
pushq 0x58(%rsp)
callq 0xbfd8
addq $0x40, %rsp
leaq 0xa10ec(%rip), %rsi     # 0xacc08
movq 0xa14ad(%rip), %rdx     # 0xacfd0
movq (%rsp), %rdi
callq 0x4900
movq %rax, %rbx
jmp 0xbb3d
movq %rax, %rbx
movq (%rsp), %rdi
callq 0x43b0
callq 0x48c0
movq %rbx, %rdi
callq 0x4950
movq %rax, %rdi
callq 0xa08f