// File: bothaynahazem[P]AsuMathLabG13/Matrix2017.cpp
// Function: Matrix::copy(Matrix const&)
void Matrix::copy(const Matrix& m)
{
	reset();
	this->nRows = m.nRows;
	this->nColumns = m.nColumns;
	if ((nRows*nColumns) == 0)
	{
		values = NULL;
		cvalues=NULL;
		return;
	}
   if(m.type=="complex")
   {
     type="complex";
	 cvalues = new complex<double>*[nRows];
	 for (int iR = 0;iR<nRows;iR++)
	 {
		cvalues[iR] = new complex<double>[nColumns];
		for (int iC = 0;iC<nColumns;iC++)
		{
			cvalues[iR][iC] = m.cvalues[iR][iC];
		}
	 }
	}
   else
    {
	 values = new double*[nRows];
	 for (int iR = 0;iR<nRows;iR++)
	 {
		values[iR] = new double[nColumns];
		for (int iC = 0;iC<nColumns;iC++)
		{
			values[iR][iC] = m.values[iR][iC];
		}
	 }
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
callq 0xe690
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, (%rcx)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, 0x4(%rcx)
movl (%rcx), %eax
imull 0x4(%rcx), %eax
cmpl $0x0, %eax
jne 0xed47
movq -0x38(%rbp), %rax
movq $0x0, 0x8(%rax)
movq $0x0, 0x10(%rax)
jmp 0xefd7
movq -0x10(%rbp), %rdi
addq $0x18, %rdi
leaq 0xc6af(%rip), %rsi      # 0x1b405
callq 0xafa0
testb $0x1, %al
jne 0xed64
jmp 0xeef0
movq -0x38(%rbp), %rdi
addq $0x18, %rdi
leaq 0xc692(%rip), %rsi      # 0x1b405
callq 0x34f0
movq -0x38(%rbp), %rax
movslq (%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -0x14(%rbp)
movq -0x38(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl (%rcx), %eax
jge 0xeeeb
movq -0x38(%rbp), %rax
movslq 0x4(%rax), %rax
movq %rax, -0x48(%rbp)
movl $0x10, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
movq %rdi, -0x50(%rbp)
callq 0x3030
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, -0x40(%rbp)
cmpq $0x0, %rax
je 0xee47
movq -0x40(%rbp), %rax
movq -0x48(%rbp), %rdx
shlq $0x4, %rdx
movq %rax, %rcx
addq %rdx, %rcx
movq %rcx, -0x60(%rbp)
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq %rdi, -0x68(%rbp)
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x19810
jmp 0xee32
movq -0x60(%rbp), %rcx
movq -0x68(%rbp), %rax
addq $0x10, %rax
cmpq %rcx, %rax
movq %rax, -0x58(%rbp)
jne 0xee1d
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x28(%rbp)
movq -0x38(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0xeedb
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x14(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x28(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x10(%rax), %rax
movslq -0x14(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x28(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xee62
movq -0x50(%rbp), %rsi
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x36d0
jmp 0xefdd
jmp 0xeedd
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xedb2
jmp 0xefd7
movq -0x38(%rbp), %rax
movslq (%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x2c(%rbp)
movq -0x38(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl (%rcx), %eax
jge 0xefd5
movq -0x38(%rbp), %rax
movslq 0x4(%rax), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x3030
movq %rax, %rdx
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movl -0x30(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0xefc5
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x2c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x30(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xef7c
jmp 0xefc7
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xef2a
jmp 0xefd7
addq $0x70, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3630
nopw %cs:(%rax,%rax)