// File: /workspace/github_cpp_makefile_star2_O3/manikandan5[P]Image-Matching-Stitching-Warping/./CImg.h
// Function: cimg_library::CImg<char>::assign(char 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
movq %rdi, %rbx
movl %edx, %eax
movl %ecx, %ecx
imulq %rax, %rcx
movq %r8, 0x8(%rsp)
movl %r8d, %eax
movq %r9, 0x10(%rsp)
movl %r9d, %ebp
imulq %rax, %rbp
imulq %rcx, %rbp
testq %rsi, %rsi
setne %al
testq %rbp, %rbp
setne %cl
testb %cl, %al
je 0x1230f
movl %edx, %r13d
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 0x12347
cmpq %rax, %rbp
jne 0x12347
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x124cc
cmpb $0x0, 0x10(%rbx)
jne 0x12323
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x12323
callq 0x4690
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 0x123a6
leaq (%r14,%rbp), %rcx
cmpq %r15, %rcx
jb 0x123a6
addq %r15, %rax
cmpq %r14, %rax
jbe 0x123a6
movq %rbp, %rdi
callq 0x4040
movq %rax, (%rsp)
movq %rax, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x4440
testq %r15, %r15
je 0x12385
movq %r15, %rdi
callq 0x4690
movq (%rsp), %rax
movq %rax, 0x18(%rbx)
movl %r13d, (%rbx)
movl %r12d, 0x4(%rbx)
movq 0x8(%rsp), %rax
movl %eax, 0x8(%rbx)
movq 0x10(%rsp), %rax
movl %eax, 0xc(%rbx)
jmp 0x12335
movq %rbx, %rdi
movl %r13d, %esi
movl %r12d, %edx
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %r8
callq 0x124cc
movq 0x18(%rbx), %rdi
cmpb $0x1, 0x10(%rbx)
jne 0x123d8
movq %r14, %rsi
movq %rbp, %rdx
callq 0x48c0
jmp 0x12335
movq %r14, %rsi
movq %rbp, %rdx
callq 0x4440
jmp 0x12335
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, 0x1c(%rsp)
movl 0xc(%rbx), %eax
movl %eax, 0x18(%rsp)
movq 0x18(%rbx), %rax
movq %rax, 0x20(%rsp)
movb 0x10(%rbx), %bl
movq %rbp, %rdi
callq 0xbe84
movq %rax, %r10
leaq 0x5c429(%rip), %rax     # 0x6e868
leaq 0x5d7fc(%rip), %r11     # 0x6fc42
testb %bl, %bl
cmovneq %rax, %r11
leaq 0x683bd(%rip), %rbx     # 0x7a810
leaq 0x5d7ed(%rip), %rsi     # 0x6fc47
movq (%rsp), %rdi
movl %r15d, %edx
movl %r14d, %ecx
movl 0x1c(%rsp), %r8d
movl 0x18(%rsp), %r9d
xorl %eax, %eax
pushq 0x10(%rsp)
pushq 0x10(%rsp)
pushq %r12
pushq %r13
pushq %r10
pushq %rbx
pushq %r11
pushq 0x58(%rsp)
callq 0xbfac
addq $0x40, %rsp
leaq 0x957a3(%rip), %rsi     # 0xa7c38
movq 0x95b34(%rip), %rdx     # 0xa7fd0
movq (%rsp), %rdi
callq 0x4910
movq %rax, %rbx
jmp 0x124b6
movq %rax, %rbx
movq (%rsp), %rdi
callq 0x43c0
callq 0x48d0
movq %rbx, %rdi
callq 0x4960
movq %rax, %rdi
callq 0xa02c
nop