// File: IlanPrice[P]Linear-Algebra-Library-in-Cplusplus/Matrix.cpp
// Function: operator*(Matrix const&, Vector const&)
Vector operator*(const Matrix& A, const Vector& v)
{
	if (A.mColumns!=length(v)) { throw Exception("Dimensions mismatch",
			  "cannot perform matrix-vector multiplication");}
	Vector ans(A.mRows);
	for (int i= 0;i<A.mRows;i++)
		{
			for (int j = 0; j<A.mColumns; j++)
			{
				ans(i+1) += A(i+1,j+1)*v(j+1);
			}
		}
	return ans;
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0x48(%rsp)
movq %rdi, %rax
movq %rax, 0x50(%rsp)
movq %rdi, 0xd0(%rsp)
movq %rsi, 0xc8(%rsp)
movq %rdx, 0xc0(%rsp)
movq 0xc8(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x58(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x4090
movl %eax, %ecx
movl 0x58(%rsp), %eax
cmpl %ecx, %eax
je 0x70ef
movb $0x1, 0x66(%rsp)
movl $0x40, %edi
callq 0x2070
movq %rax, 0x38(%rsp)
leaq 0x9f(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x21c0
movq 0x40(%rsp), %rdx
leaq 0xb436(%rip), %rsi      # 0x1242e
leaq 0xa0(%rsp), %rdi
callq 0x2110
jmp 0x7007
leaq 0x67(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x21c0
movq 0x30(%rsp), %rdx
leaq 0xb445(%rip), %rsi      # 0x12467
leaq 0x68(%rsp), %rdi
callq 0x2110
jmp 0x702e
movq 0x38(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
leaq 0x68(%rsp), %rdx
callq 0x4d60
jmp 0x7047
movq 0x38(%rsp), %rdi
movb $0x0, 0x66(%rsp)
leaq 0xed48(%rip), %rsi      # 0x15da0
leaq -0x232f(%rip), %rdx     # 0x4d30
callq 0x2180
jmp 0x7245
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x70ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
jmp 0x70b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x2080
leaq 0x67(%rsp), %rdi
callq 0x20f0
leaq 0xa0(%rsp), %rdi
callq 0x2080
leaq 0x9f(%rsp), %rdi
callq 0x20f0
testb $0x1, 0x66(%rsp)
jne 0x70e0
jmp 0x70ea
movq 0x38(%rsp), %rdi
callq 0x20a0
jmp 0x7238
movq 0x48(%rsp), %rdi
movb $0x0, 0x65(%rsp)
movq 0xc8(%rsp), %rax
movl 0x8(%rax), %esi
callq 0x2d70
movl $0x0, 0x60(%rsp)
movl 0x60(%rsp), %eax
movq 0xc8(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x7215
movl $0x0, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
movq 0xc8(%rsp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x7203
movq 0xc8(%rsp), %rdi
movl 0x60(%rsp), %esi
incl %esi
movl 0x5c(%rsp), %edx
incl %edx
callq 0x7250
movq %rax, 0x28(%rsp)
jmp 0x7163
movq 0x28(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0xc0(%rsp), %rdi
movl 0x5c(%rsp), %esi
incl %esi
callq 0x3c10
movq %rax, 0x20(%rsp)
jmp 0x718c
movq 0x48(%rsp), %rdi
movq 0x20(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movl 0x60(%rsp), %esi
incl %esi
callq 0x3ee0
movq %rax, 0x10(%rsp)
jmp 0x71b2
movq 0x10(%rsp), %rax
movsd 0x8(%rsp), %xmm2
movsd 0x18(%rsp), %xmm0
movsd (%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movl 0x5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x5c(%rsp)
jmp 0x712e
movq 0x48(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x90(%rsp)
movl %eax, 0x8c(%rsp)
callq 0x2ea0
jmp 0x7238
jmp 0x7205
movl 0x60(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x60(%rsp)
jmp 0x7111
movb $0x1, 0x65(%rsp)
testb $0x1, 0x65(%rsp)
jne 0x722b
movq 0x48(%rsp), %rdi
callq 0x2ea0
movq 0x50(%rsp), %rax
addq $0xd8, %rsp
retq
movq 0x90(%rsp), %rdi
callq 0x21b0
nopw %cs:(%rax,%rax)