// File: IlanPrice[P]Linear-Algebra-Library-in-Cplusplus/Matrix.cpp
// Function: Matrix::setElements(int, int, int, int, Matrix)
void Matrix:: setElements(int istart, int iend, int jstart, int jend, Matrix A)
{
	if (istart < 1 || jstart < 1 || iend < 1 || jend < 1)
	    {
	      throw Exception("out of range",
			  "accessing vector through () - index too small");
	    }
	  else if (iend > mRows || jend > mColumns || istart > mRows || jstart > mColumns)
	    {
	      throw Exception("length mismatch",
			  "accessing vector through () - index too high");
	    }

	int sRows = iend - istart + 1; int sColumns = jend - jstart + 1;
	Matrix slice(sRows, sColumns);
	for (int i = 0; i<sRows; i++)
	{
		for (int j = 0; j<sColumns; j++)
		{
			mElements[istart -1 + i][jstart -1 + j] = A.mElements[i][j];
		}
	}
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %r9, 0x38(%rsp)
movq %rdi, 0x130(%rsp)
movl %esi, 0x12c(%rsp)
movl %edx, 0x128(%rsp)
movl %ecx, 0x124(%rsp)
movl %r8d, 0x120(%rsp)
movq %r9, 0x118(%rsp)
movq 0x130(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpl $0x1, 0x12c(%rsp)
jl 0x5f92
cmpl $0x1, 0x124(%rsp)
jl 0x5f92
cmpl $0x1, 0x128(%rsp)
jl 0x5f92
cmpl $0x1, 0x120(%rsp)
jge 0x60d3
movb $0x1, 0xbe(%rsp)
movl $0x40, %edi
callq 0x2070
movq %rax, 0x28(%rsp)
leaq 0xf7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x21c0
movq 0x30(%rsp), %rdx
leaq 0xc1f6(%rip), %rsi      # 0x121bd
leaq 0xf8(%rsp), %rdi
callq 0x2110
jmp 0x5fd6
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x21c0
movq 0x20(%rsp), %rdx
leaq 0xc1d6(%rip), %rsi      # 0x121ca
leaq 0xc0(%rsp), %rdi
callq 0x2110
jmp 0x6003
movq 0x28(%rsp), %rdi
leaq 0xf8(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x4d60
jmp 0x601f
movq 0x28(%rsp), %rdi
movb $0x0, 0xbe(%rsp)
leaq 0xfd6d(%rip), %rsi      # 0x15da0
leaq -0x130a(%rip), %rdx     # 0x4d30
callq 0x2180
jmp 0x6332
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x60ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x6091
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x2080
leaq 0xbf(%rsp), %rdi
callq 0x20f0
leaq 0xf8(%rsp), %rdi
callq 0x2080
leaq 0xf7(%rsp), %rdi
callq 0x20f0
testb $0x1, 0xbe(%rsp)
jne 0x60c4
jmp 0x60ce
movq 0x28(%rsp), %rdi
callq 0x20a0
jmp 0x6325
movq 0x40(%rsp), %rcx
movl 0x128(%rsp), %eax
cmpl 0x8(%rcx), %eax
jg 0x611b
movq 0x40(%rsp), %rcx
movl 0x120(%rsp), %eax
cmpl 0xc(%rcx), %eax
jg 0x611b
movq 0x40(%rsp), %rcx
movl 0x12c(%rsp), %eax
cmpl 0x8(%rcx), %eax
jg 0x611b
movq 0x40(%rsp), %rcx
movl 0x124(%rsp), %eax
cmpl 0xc(%rcx), %eax
jle 0x6244
movb $0x1, 0x6e(%rsp)
movl $0x40, %edi
callq 0x2070
movq %rax, 0x10(%rsp)
leaq 0x97(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x21c0
movq 0x18(%rsp), %rdx
leaq 0xbfc7(%rip), %rsi      # 0x12114
leaq 0x98(%rsp), %rdi
callq 0x2110
jmp 0x615c
leaq 0x6f(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x21c0
movq 0x8(%rsp), %rdx
leaq 0xc081(%rip), %rsi      # 0x121f8
leaq 0x70(%rsp), %rdi
callq 0x2110
jmp 0x6183
movq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x4d60
jmp 0x619c
movq 0x10(%rsp), %rdi
movb $0x0, 0x6e(%rsp)
leaq 0xfbf3(%rip), %rsi      # 0x15da0
leaq -0x1484(%rip), %rdx     # 0x4d30
callq 0x2180
jmp 0x6332
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x621f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
jmp 0x6208
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x2080
leaq 0x6f(%rsp), %rdi
callq 0x20f0
leaq 0x98(%rsp), %rdi
callq 0x2080
leaq 0x97(%rsp), %rdi
callq 0x20f0
testb $0x1, 0x6e(%rsp)
jne 0x6235
jmp 0x623f
movq 0x10(%rsp), %rdi
callq 0x20a0
jmp 0x6325
jmp 0x6246
movl 0x128(%rsp), %eax
subl 0x12c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x68(%rsp)
movl 0x120(%rsp), %eax
subl 0x124(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
movl 0x68(%rsp), %esi
movl 0x64(%rsp), %edx
leaq 0x50(%rsp), %rdi
callq 0x4e80
movl $0x0, 0x4c(%rsp)
movl 0x4c(%rsp), %eax
cmpl 0x68(%rsp), %eax
jge 0x6313
movl $0x0, 0x48(%rsp)
movl 0x48(%rsp), %eax
cmpl 0x64(%rsp), %eax
jge 0x6301
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movq (%rcx), %rcx
movslq 0x4c(%rsp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq 0x48(%rsp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq (%rax), %rax
movl 0x12c(%rsp), %ecx
subl $0x1, %ecx
addl 0x4c(%rsp), %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movl 0x124(%rsp), %ecx
subl $0x1, %ecx
addl 0x48(%rsp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x48(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x48(%rsp)
jmp 0x629c
jmp 0x6303
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
jmp 0x628a
leaq 0x50(%rsp), %rdi
callq 0x5230
addq $0x138, %rsp            # imm = 0x138
retq
movq 0xe8(%rsp), %rdi
callq 0x21b0
nopw %cs:(%rax,%rax)