// File: /workspace/github_cpp_makefile_star2_O1/bothaynahazem[P]AsuMathLabG13/Matrix2017.cpp
// Function: Matrix::add(Matrix const&)
void Matrix::add(const Matrix& m)
{
	if (nRows != m.nRows || nColumns != m.nColumns)
		throw("Invalid matrix dimension");
	for (int iR = 0; iR < nRows; iR++)
	{
		for (int iC = 0;iC < nColumns;iC++)
    {
      if((this->type=="complex") && (m.type=="complex"))
        cvalues[iR][iC] += m.cvalues[iR][iC];
      else if((this->type=="complex") && (m.type!="complex"))
        cvalues[iR][iC] += m.values[iR][iC];
      else if((this->type!="complex") && (m.type=="complex"))
        cvalues[iR][iC] =values[iR][iC]+m.cvalues[iR][iC];
      else
        values[iR][iC] += m.values[iR][iC];
    }

	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl (%rdi), %eax
cmpl (%rsi), %eax
jne 0xbaba
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
jne 0xbaba
cmpl $0x0, (%rdi)
jle 0xbaab
leaq 0x18(%rdi), %rbx
leaq 0x18(%rsi), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x30(%rbp)
movq %rdi, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
cmpl $0x0, 0x4(%rdi)
jle 0xba94
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %rbx, %rdi
leaq 0x58c7(%rip), %r14      # 0x111f5
movq %r14, %rsi
callq 0x30e0
testl %eax, %eax
jne 0xb94e
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x30e0
testl %eax, %eax
je 0xba4f
movq %rbx, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30e0
testl %eax, %eax
je 0xb9b2
movq %r15, %rdi
movq %r14, %rsi
callq 0x30e0
testl %eax, %eax
je 0xb97f
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x30e0
testl %eax, %eax
je 0xb9f2
movq -0x38(%rbp), %rsi
movq 0x8(%rsi), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax,%r12), %xmm0
movq -0x40(%rbp), %rdi
movq 0x8(%rdi), %rax
movq (%rax,%rcx,8), %rax
addsd (%rax,%r12), %xmm0
movsd %xmm0, (%rax,%r12)
jmp 0xba36
movq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x30e0
testl %eax, %eax
je 0xb960
movq -0x38(%rbp), %rsi
movq 0x8(%rsi), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax,%r12), %xmm0
movq -0x40(%rbp), %rdi
movq 0x10(%rdi), %rax
movq (%rax,%rcx,8), %rax
addsd (%rax,%r12,2), %xmm0
movsd %xmm0, (%rax,%r12,2)
jmp 0xba36
movq -0x40(%rbp), %rdi
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
movq -0x30(%rbp), %r8
movq (%rax,%r8,8), %rax
movq -0x38(%rbp), %rsi
movq 0x10(%rsi), %rdx
movq (%rdx,%r8,8), %rdx
movsd (%rdx,%r12,2), %xmm0
addsd (%rax,%r12), %xmm0
movsd 0x8(%rdx,%r12,2), %xmm1
movq (%rcx,%r8,8), %rax
movsd %xmm0, (%rax,%r12,2)
movsd %xmm1, 0x8(%rax,%r12,2)
movq %r15, %rbx
incq %r13
movslq 0x4(%rdi), %rax
addq $0x8, %r12
cmpq %rax, %r13
jl 0xb924
jmp 0xba94
movq -0x38(%rbp), %rsi
movq 0x10(%rsi), %rax
movq -0x30(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movq -0x40(%rbp), %rdi
movq 0x10(%rdi), %rcx
movq (%rcx,%rdx,8), %rcx
movsd (%rax,%r12,2), %xmm0
movsd 0x8(%rax,%r12,2), %xmm1
addsd (%rcx,%r12,2), %xmm0
addsd 0x8(%rcx,%r12,2), %xmm1
movsd %xmm0, (%rcx,%r12,2)
movsd %xmm1, 0x8(%rcx,%r12,2)
jmp 0xba39
movq -0x30(%rbp), %rdx
incq %rdx
movslq (%rdi), %rax
movq %rdx, -0x30(%rbp)
cmpq %rax, %rdx
jl 0xb914
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x3170
leaq 0x577a(%rip), %rcx      # 0x11245
movq %rcx, (%rax)
movq 0xa4eb(%rip), %rsi      # 0x15fc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x34d0
nop