// File: /workspace/github_cpp_makefile_star2_O3/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), %ecx
cmpl (%rsi), %ecx
jne 0xbb9f
movl 0x4(%rdi), %eax
cmpl 0x4(%rsi), %eax
jne 0xbb9f
testl %ecx, %ecx
jle 0xbb90
leaq 0x18(%rdi), %rbx
leaq 0x18(%rsi), %rdx
movq %rdx, -0x48(%rbp)
movq $0x0, -0x30(%rbp)
leaq 0x57fd(%rip), %r15      # 0x111f5
movq %rdi, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
testl %eax, %eax
jle 0xbb79
xorl %r12d, %r12d
xorl %r13d, %r13d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x30e0
testl %eax, %eax
jne 0xba31
movq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x30e0
testl %eax, %eax
je 0xbb32
movq %rbx, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x30e0
testl %eax, %eax
je 0xba95
movq %r14, %rdi
movq %r15, %rsi
callq 0x30e0
testl %eax, %eax
je 0xba62
movq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x30e0
testl %eax, %eax
je 0xbad5
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 0xbb19
movq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0x30e0
testl %eax, %eax
je 0xba43
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 0xbb19
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 %r14, %rbx
incq %r13
movslq 0x4(%rdi), %rax
addq $0x8, %r12
cmpq %rax, %r13
jl 0xba0e
jmp 0xbb77
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 0xbb1c
movl (%rdi), %ecx
movq -0x30(%rbp), %r9
incq %r9
movslq %ecx, %rdx
movq %r9, -0x30(%rbp)
cmpq %rdx, %r9
jl 0xba00
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x8, %edi
callq 0x3170
leaq 0x5695(%rip), %rcx      # 0x11245
movq %rcx, (%rax)
movq 0xa406(%rip), %rsi      # 0x15fc0
movq %rax, %rdi
xorl %edx, %edx
callq 0x34d0