// File: IlanPrice[P]Linear-Algebra-Library-in-Cplusplus/Matrix.cpp
// Function: operator*(Matrix const&, Matrix const&)
Matrix operator*(const Matrix& A, const Matrix& B)
{
	if (CanMultiply(A,B)==false) {throw Exception("Dimensions mismatch",
			  "cannot perform matrix multiplication");}

	Matrix ans(A.mRows, B.mColumns);

	for (int i = 0; i<A.mRows; i++)
			{
				for( int j=0; j<B.mColumns; j++)
				{
					double temp = 0;
					for (int k=0; k<A.mColumns; k++)
					{
						temp += A.mElements[i][k]*B.mElements[k][j];
					}
					ans.mElements[i][j]=temp;

				}
			}
	return ans;

}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xa8(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x5300
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x6e1e
movb $0x1, 0x46(%rsp)
movl $0x40, %edi
callq 0x2070
movq %rax, 0x8(%rsp)
leaq 0x7f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x21c0
movq 0x10(%rsp), %rdx
leaq 0xb6f0(%rip), %rsi      # 0x1242e
leaq 0x80(%rsp), %rdi
callq 0x2110
jmp 0x6d4d
leaq 0x47(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x21c0
movq (%rsp), %rdx
leaq 0xb6dc(%rip), %rsi      # 0x12442
leaq 0x48(%rsp), %rdi
callq 0x2110
jmp 0x6d72
movq 0x8(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x4d60
jmp 0x6d8b
movq 0x8(%rsp), %rdi
movb $0x0, 0x46(%rsp)
leaq 0xf004(%rip), %rsi      # 0x15da0
leaq -0x2073(%rip), %rdx     # 0x4d30
callq 0x2180
jmp 0x6f6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0x6dfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0x6de5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x2080
leaq 0x47(%rsp), %rdi
callq 0x20f0
leaq 0x80(%rsp), %rdi
callq 0x2080
leaq 0x7f(%rsp), %rdi
callq 0x20f0
testb $0x1, 0x46(%rsp)
jne 0x6e0f
jmp 0x6e19
movq 0x8(%rsp), %rdi
callq 0x20a0
jmp 0x6f62
movq 0x18(%rsp), %rdi
movb $0x0, 0x45(%rsp)
movq 0xa8(%rsp), %rax
movl 0x8(%rax), %esi
movq 0xa0(%rsp), %rax
movl 0xc(%rax), %edx
callq 0x4e80
movl $0x0, 0x40(%rsp)
movl 0x40(%rsp), %eax
movq 0xa8(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x6f3f
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movq 0xa0(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x6f2d
xorps %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0xa8(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x6efc
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movslq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x2c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movslq 0x2c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x3c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd 0x30(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x6e8e
movq 0x18(%rsp), %rax
movsd 0x30(%rsp), %xmm0
movq (%rax), %rax
movslq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x3c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x6e68
jmp 0x6f2f
movl 0x40(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40(%rsp)
jmp 0x6e4b
movb $0x1, 0x45(%rsp)
testb $0x1, 0x45(%rsp)
jne 0x6f55
movq 0x18(%rsp), %rdi
callq 0x5230
movq 0x20(%rsp), %rax
addq $0xb8, %rsp
retq
movq 0x70(%rsp), %rdi
callq 0x21b0
nopl (%rax)