// File: /workspace/github_cpp_makefile_star2_O3/toxaart[P]hierarchical_block_sparse_lib/source/HierarchicalBlockSparseMatrix.h
// Function: hbsm::HierarchicalBlockSparseMatrix<double>::copy(hbsm::HierarchicalBlockSparseMatrix<double> const&, unsigned long*)
void HierarchicalBlockSparseMatrix<Treal>::copy(const HierarchicalBlockSparseMatrix<Treal> &other, size_t* no_of_resizes) {

			if(this == &other) return; // no need to copy itself to itself

			if(other.empty()){
				this->clear();
				return;
			}

			if(!empty()) clear();

			set_params(other.get_params());
			resize(other.nRows,other.nCols, no_of_resizes);
			nRows_orig = other.nRows_orig;
			nCols_orig = other.nCols_orig;


			if(other.lowest_level()){
				memcpy(&submatrix[0], &(other.submatrix[0]), sizeof(Treal) * other.submatrix.size());
				return;
			}

			frob_norm_squared_internal = other.frob_norm_squared_internal;
			n_block_multiplies = other.n_block_multiplies;

			for(int i = 0; i < 4; ++i){
				if(children[i] != NULL)
					throw std::runtime_error("Error in HierarchicalBlockSparseMatrix::copy(): non-null child exist!");

				if(other.children[i] != NULL){
					children[i] = std::make_shared<HierarchicalBlockSparseMatrix<Treal> >();
					children[i]->copy(*other.children[i], no_of_resizes);
					children[i]->parent = this;
				}


			}


		}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpq %rsi, %rdi
je 0x607f
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x42c4
testb %al, %al
je 0x5f59
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x43c2
movq %r14, %rdi
callq 0x42c4
testb %al, %al
jne 0x5f6d
movq %r14, %rdi
callq 0x43c2
movl 0x10(%rbx), %eax
leaq 0x4(%rsp), %rsi
movl %eax, (%rsi)
movq %r14, %rdi
callq 0x425e
movl (%rbx), %esi
movl 0x4(%rbx), %edx
movq %r14, %rdi
movq %r15, %rcx
callq 0x430c
movq 0x8(%rbx), %rax
movq %rax, 0x8(%r14)
movq %rbx, %rdi
callq 0x6b0e
testb %al, %al
je 0x5fbc
movq 0x70(%r14), %rdi
movq 0x70(%rbx), %rsi
movq 0x78(%rbx), %rdx
subq %rsi, %rdx
callq 0x2100
jmp 0x607f
movsd 0x18(%rbx), %xmm0
movsd %xmm0, 0x18(%r14)
movq 0x20(%rbx), %rax
movq %rax, 0x20(%r14)
movl $0x30, %r12d
movabsq $0x100000001, %r13      # imm = 0x100000001
leaq 0x7d32(%rip), %rbp      # 0xdd18
cmpq $0x0, -0x8(%r14,%r12)
jne 0x608e
cmpq $0x0, -0x8(%rbx,%r12)
je 0x6071
movl $0x98, %edi
callq 0x2130
movq %r13, 0x8(%rax)
movq %rbp, (%rax)
leaq 0x10(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movl $0xffffffff, 0x20(%rax) # imm = 0xFFFFFFFF
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x48(%rax)
movups %xmm0, 0x58(%rax)
movups %xmm0, 0x68(%rax)
movups %xmm0, 0x78(%rax)
movups %xmm0, 0x88(%rax)
movq %rdi, -0x8(%r14,%r12)
movq (%r14,%r12), %rcx
movq %rax, (%r14,%r12)
testq %rcx, %rcx
je 0x605b
movq %rcx, %rdi
callq 0x6b3c
movq -0x8(%r14,%r12), %rdi
movq -0x8(%rbx,%r12), %rsi
movq %r15, %rdx
callq 0x5f1a
movq -0x8(%r14,%r12), %rax
movq %r14, 0x68(%rax)
addq $0x10, %r12
cmpq $0x70, %r12
jne 0x5fe6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x2070
movq %rax, %rbx
leaq 0x507c(%rip), %rsi      # 0xb11e
movq %rax, %rdi
callq 0x2060
movq 0x7f3f(%rip), %rsi      # 0xdff0
movq 0x7f08(%rip), %rdx      # 0xdfc0
movq %rbx, %rdi
callq 0x21a0
movq %rax, %r14
movq %rbx, %rdi
callq 0x20e0
movq %r14, %rdi
callq 0x21c0
nop