// File: IlanPrice[P]Linear-Algebra-Library-in-Cplusplus/Matrix.cpp
// Function: Matrix::operator()(int, int) const
const double& Matrix::operator()(int i, int j) const // 'const' because then can be used in the body of other functions which take const arguments
{

  if (i < 1 || j < 1)
    {
      throw Exception("out of range",
		  "accessing vector through () - index too small");
    }
  else if (i > mRows || j > mColumns)
    {
      throw Exception("length mismatch",
		  "accessing vector through () - index too high");
    }

  return mElements[i-1][j-1];

}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0xf0(%rsp)
movl %esi, 0xec(%rsp)
movl %edx, 0xe8(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x30(%rsp)
cmpl $0x1, 0xec(%rsp)
jl 0x7292
cmpl $0x1, 0xe8(%rsp)
jge 0x73d3
movb $0x1, 0x8e(%rsp)
movl $0x40, %edi
callq 0x2070
movq %rax, 0x20(%rsp)
leaq 0xc7(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x21c0
movq 0x28(%rsp), %rdx
leaq 0xaef6(%rip), %rsi      # 0x121bd
leaq 0xc8(%rsp), %rdi
callq 0x2110
jmp 0x72d6
leaq 0x8f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x21c0
movq 0x18(%rsp), %rdx
leaq 0xaed6(%rip), %rsi      # 0x121ca
leaq 0x90(%rsp), %rdi
callq 0x2110
jmp 0x7303
movq 0x20(%rsp), %rdi
leaq 0xc8(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x4d60
jmp 0x731f
movq 0x20(%rsp), %rdi
movb $0x0, 0x8e(%rsp)
leaq 0xea6d(%rip), %rsi      # 0x15da0
leaq -0x260a(%rip), %rdx     # 0x4d30
callq 0x2180
jmp 0x7552
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x73ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x7391
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x2080
leaq 0x8f(%rsp), %rdi
callq 0x20f0
leaq 0xc8(%rsp), %rdi
callq 0x2080
leaq 0xc7(%rsp), %rdi
callq 0x20f0
testb $0x1, 0x8e(%rsp)
jne 0x73c4
jmp 0x73ce
movq 0x20(%rsp), %rdi
callq 0x20a0
jmp 0x7545
movq 0x30(%rsp), %rcx
movl 0xec(%rsp), %eax
cmpl 0x8(%rcx), %eax
jg 0x73f9
movq 0x30(%rsp), %rcx
movl 0xe8(%rsp), %eax
cmpl 0xc(%rcx), %eax
jle 0x750e
movb $0x1, 0x3e(%rsp)
movl $0x40, %edi
callq 0x2070
movq %rax, 0x8(%rsp)
leaq 0x67(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x21c0
movq 0x10(%rsp), %rdx
leaq 0xacec(%rip), %rsi      # 0x12114
leaq 0x68(%rsp), %rdi
callq 0x2110
jmp 0x7434
leaq 0x3f(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x21c0
movq (%rsp), %rdx
leaq 0xadab(%rip), %rsi      # 0x121f8
leaq 0x40(%rsp), %rdi
callq 0x2110
jmp 0x7459
movq 0x8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x4d60
jmp 0x746f
movq 0x8(%rsp), %rdi
movb $0x0, 0x3e(%rsp)
leaq 0xe920(%rip), %rsi      # 0x15da0
leaq -0x2757(%rip), %rdx     # 0x4d30
callq 0x2180
jmp 0x7552
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x74ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
jmp 0x74db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0x40(%rsp), %rdi
callq 0x2080
leaq 0x3f(%rsp), %rdi
callq 0x20f0
leaq 0x68(%rsp), %rdi
callq 0x2080
leaq 0x67(%rsp), %rdi
callq 0x20f0
testb $0x1, 0x3e(%rsp)
jne 0x7502
jmp 0x750c
movq 0x8(%rsp), %rdi
callq 0x20a0
jmp 0x7545
jmp 0x7510
movq 0x30(%rsp), %rax
movq (%rax), %rax
movl 0xec(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0xe8(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
addq $0xf8, %rsp
retq
movq 0xb8(%rsp), %rdi
callq 0x21b0
nopw %cs:(%rax,%rax)