// File: bothaynahazem[P]AsuMathLabG13/Matrix2017.cpp
// Function: Matrix::rdivide(Matrix const&, Matrix const&)
Matrix Matrix::rdivide(const Matrix&s, const Matrix& m)
{
	if(m.type=="complex"&&s.type=="complex")
	{
		Matrix result("complex",m.nRows,m.nColumns);
    for (int i=0; i<m.nRows; i++)
    {
        for (int j=0; j<m.nColumns; j++)
            result.cvalues[i][j] = ( s.cvalues[i][j] / m.cvalues[i][j] );
		}
		return result;
	}
	else if(m.type!="complex"&&s.type=="complex")
	{
		Matrix result("complex",m.nRows,m.nColumns);
		for (int i=0; i<m.nRows; i++)
		{
				for (int j=0; j<m.nColumns; j++)
						result.cvalues[i][j] = ( s.cvalues[i][j] / m.values[i][j] );
		}
		return result;
	 }
	 else if(m.type=="complex"&&s.type!="complex")
	{
		Matrix result("complex",m.nRows,m.nColumns);
		for (int i=0; i<m.nRows; i++)
		{
				for (int j=0; j<m.nColumns; j++)
						result.cvalues[i][j] = ( s.values[i][j] / m.cvalues[i][j] );
		}
		return result;
	 }
	 else if(m.type!="complex"&&s.type!="complex")
	{
		Matrix result(m.nRows,m.nColumns);
		for (int i=0; i<m.nRows; i++)
		{
				for (int j=0; j<m.nColumns; j++)
						result.values[i][j] = ( s.values[i][j] / m.values[i][j] );
		}
		return result;
	 }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x158(%rbp)
movq %rdi, %rax
movq %rax, -0x150(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
leaq 0x627a(%rip), %rsi      # 0x1b405
callq 0xafa0
testb $0x1, %al
jne 0x15199
jmp 0x15388
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x625d(%rip), %rsi      # 0x1b405
callq 0xafa0
testb $0x1, %al
jne 0x151b6
jmp 0x15388
movb $0x0, -0x21(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x160(%rbp)
callq 0x3640
movq -0x160(%rbp), %rdx
leaq 0x622d(%rip), %rsi      # 0x1b405
leaq -0x48(%rbp), %rdi
callq 0xab40
jmp 0x151e3
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movl %ecx, -0x168(%rbp)
movl 0x4(%rax), %eax
movl %eax, -0x164(%rbp)
leaq -0x70(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x19810
jmp 0x15209
movl -0x164(%rbp), %ecx
movl -0x168(%rbp), %edx
movq -0x158(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
movsd -0x68(%rbp), %xmm1
leaq -0x48(%rbp), %rsi
xorl %r8d, %r8d
callq 0x19470
jmp 0x15234
leaq -0x48(%rbp), %rdi
callq 0x3270
leaq -0x49(%rbp), %rdi
callq 0x3410
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x1536d
movl $0x0, -0x78(%rbp)
movl -0x78(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x1535d
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x74(%rbp), %rdx
movq (%rax,%rdx,8), %rdi
movslq -0x78(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rdx,8), %rsi
addq %rax, %rsi
callq 0x19d40
movsd %xmm1, -0x178(%rbp)
movsd %xmm0, -0x170(%rbp)
jmp 0x152b4
movq -0x158(%rbp), %rax
movsd -0x178(%rbp), %xmm0
movsd -0x170(%rbp), %xmm1
movsd %xmm1, -0x88(%rbp)
movsd %xmm0, -0x80(%rbp)
movq 0x10(%rax), %rax
movslq -0x74(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x78(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x88(%rbp), %rcx
movq %rcx, (%rax)
movq -0x80(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x78(%rbp)
jmp 0x15263
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x15332
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3270
leaq -0x49(%rbp), %rdi
callq 0x3410
jmp 0x15998
movq -0x158(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0xe650
jmp 0x15998
jmp 0x1535f
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x1524d
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x15383
movq -0x158(%rbp), %rdi
callq 0xe650
jmp 0x15988
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
leaq 0x606e(%rip), %rsi      # 0x1b405
callq 0xaca0
testb $0x1, %al
jne 0x153a5
jmp 0x155e9
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x6051(%rip), %rsi      # 0x1b405
callq 0xafa0
testb $0x1, %al
jne 0x153c2
jmp 0x155e9
movb $0x0, -0x89(%rbp)
leaq -0xb1(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x3640
movq -0x180(%rbp), %rdx
leaq 0x601b(%rip), %rsi      # 0x1b405
leaq -0xb0(%rbp), %rdi
callq 0xab40
jmp 0x153f8
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movl %ecx, -0x188(%rbp)
movl 0x4(%rax), %eax
movl %eax, -0x184(%rbp)
leaq -0xc8(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x19810
jmp 0x15421
movl -0x184(%rbp), %ecx
movl -0x188(%rbp), %edx
movq -0x158(%rbp), %rdi
movsd -0xc8(%rbp), %xmm0
movsd -0xc0(%rbp), %xmm1
leaq -0xb0(%rbp), %rsi
xorl %r8d, %r8d
callq 0x19470
jmp 0x15455
leaq -0xb0(%rbp), %rdi
callq 0x3270
leaq -0xb1(%rbp), %rdi
callq 0x3410
movl $0x0, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x155c8
movl $0x0, -0xd0(%rbp)
movl -0xd0(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x155b2
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xcc(%rbp), %rdx
movq (%rax,%rdx,8), %rdi
movslq -0xd0(%rbp), %rcx
movq %rcx, %rax
shlq $0x4, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax,%rdx,8), %rax
leaq (%rax,%rcx,8), %rsi
callq 0x19d80
movsd %xmm1, -0x198(%rbp)
movsd %xmm0, -0x190(%rbp)
jmp 0x154f1
movq -0x158(%rbp), %rax
movsd -0x198(%rbp), %xmm0
movsd -0x190(%rbp), %xmm1
movsd %xmm1, -0xe0(%rbp)
movsd %xmm0, -0xd8(%rbp)
movq 0x10(%rax), %rax
movslq -0xcc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0xd0(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0xe0(%rbp), %rcx
movq %rcx, (%rax)
movq -0xd8(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0xd0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xd0(%rbp)
jmp 0x15493
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x15584
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x3270
leaq -0xb1(%rbp), %rdi
callq 0x3410
jmp 0x15998
movq -0x158(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0xe650
jmp 0x15998
jmp 0x155b4
movl -0xcc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xcc(%rbp)
jmp 0x15477
movb $0x1, -0x89(%rbp)
testb $0x1, -0x89(%rbp)
jne 0x155e4
movq -0x158(%rbp), %rdi
callq 0xe650
jmp 0x15988
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5e0d(%rip), %rsi      # 0x1b405
callq 0xafa0
testb $0x1, %al
jne 0x15606
jmp 0x15847
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5df0(%rip), %rsi      # 0x1b405
callq 0xaca0
testb $0x1, %al
jne 0x15623
jmp 0x15847
movb $0x0, -0xe1(%rbp)
leaq -0x109(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
callq 0x3640
movq -0x1a0(%rbp), %rdx
leaq 0x5dba(%rip), %rsi      # 0x1b405
leaq -0x108(%rbp), %rdi
callq 0xab40
jmp 0x15659
movq -0x20(%rbp), %rax
movl (%rax), %ecx
movl %ecx, -0x1a8(%rbp)
movl 0x4(%rax), %eax
movl %eax, -0x1a4(%rbp)
leaq -0x120(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x19810
jmp 0x15682
movl -0x1a4(%rbp), %ecx
movl -0x1a8(%rbp), %edx
movq -0x158(%rbp), %rdi
movsd -0x120(%rbp), %xmm0
movsd -0x118(%rbp), %xmm1
leaq -0x108(%rbp), %rsi
xorl %r8d, %r8d
callq 0x19470
jmp 0x156b6
leaq -0x108(%rbp), %rdi
callq 0x3270
leaq -0x109(%rbp), %rdi
callq 0x3410
movl $0x0, -0x124(%rbp)
movl -0x124(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x15826
movl $0x0, -0x128(%rbp)
movl -0x128(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x15810
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x124(%rbp), %rdx
movq (%rax,%rdx,8), %rcx
movslq -0x128(%rbp), %rax
leaq (%rcx,%rax,8), %rdi
movq -0x20(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq (%rcx,%rdx,8), %rsi
shlq $0x4, %rax
addq %rax, %rsi
callq 0x19cf0
movsd %xmm1, -0x1b8(%rbp)
movsd %xmm0, -0x1b0(%rbp)
jmp 0x1574f
movq -0x158(%rbp), %rax
movsd -0x1b8(%rbp), %xmm0
movsd -0x1b0(%rbp), %xmm1
movsd %xmm1, -0x138(%rbp)
movsd %xmm0, -0x130(%rbp)
movq 0x10(%rax), %rax
movslq -0x124(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x128(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x138(%rbp), %rcx
movq %rcx, (%rax)
movq -0x130(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl -0x128(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x128(%rbp)
jmp 0x156f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x157e2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x3270
leaq -0x109(%rbp), %rdi
callq 0x3410
jmp 0x15998
movq -0x158(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
callq 0xe650
jmp 0x15998
jmp 0x15812
movl -0x124(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x124(%rbp)
jmp 0x156d8
movb $0x1, -0xe1(%rbp)
testb $0x1, -0xe1(%rbp)
jne 0x15842
movq -0x158(%rbp), %rdi
callq 0xe650
jmp 0x15988
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5baf(%rip), %rsi      # 0x1b405
callq 0xaca0
testb $0x1, %al
jne 0x15864
jmp 0x15980
movq -0x18(%rbp), %rdi
addq $0x18, %rdi
leaq 0x5b92(%rip), %rsi      # 0x1b405
callq 0xaca0
testb $0x1, %al
jne 0x15881
jmp 0x15980
movq -0x158(%rbp), %rdi
movb $0x0, -0x139(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %esi
movq -0x20(%rbp), %rax
movl 0x4(%rax), %edx
xorl %ecx, %ecx
xorps %xmm0, %xmm0
callq 0xe7c0
movl $0x0, -0x140(%rbp)
movl -0x140(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x15962
movl $0x0, -0x144(%rbp)
movl -0x144(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x1594c
movq -0x158(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x140(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x144(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x140(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x144(%rbp), %rdx
divsd (%rcx,%rdx,8), %xmm0
movq 0x8(%rax), %rax
movslq -0x140(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x144(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x144(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x144(%rbp)
jmp 0x158cc
jmp 0x1594e
movl -0x140(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x140(%rbp)
jmp 0x158b0
movb $0x1, -0x139(%rbp)
testb $0x1, -0x139(%rbp)
jne 0x1597e
movq -0x158(%rbp), %rdi
callq 0xe650
jmp 0x15988
jmp 0x15982
jmp 0x15984
jmp 0x15986
ud2
movq -0x150(%rbp), %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3630
nopw %cs:(%rax,%rax)