// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
testl %r8d, %r8d
jle 0x48da
movl %edx, %ebp
testl %edx, %edx
jle 0x48da
movl %esi, %r15d
testl %esi, %esi
jle 0x48da
testl %ecx, %ecx
jle 0x48da
movl 0x8(%rdi), %eax
cmpl %ebp, %eax
jl 0x4858
movl 0xc(%rdi), %edx
cmpl %ecx, %edx
jl 0x4858
cmpl %r15d, %eax
jb 0x4858
movl %r8d, %r14d
cmpl %r8d, %edx
jl 0x4858
movq %r9, %rbx
movq %rdi, 0x10(%rsp)
subl %r15d, %ebp
leal 0x1(%rbp), %r12d
subl %ecx, %r14d
leal 0x1(%r14), %r13d
leaq 0x58(%rsp), %rdi
movl %r12d, %esi
movl %r13d, %edx
movl %ecx, 0xc(%rsp)
callq 0x3dd4
testl %ebp, %ebp
js 0x483c
movq 0x10(%rsp), %rax
movq (%rax), %rax
movl %r15d, %ecx
leaq (%rax,%rcx,8), %rax
addq $-0x8, %rax
movl 0xc(%rsp), %ecx
xorl %edx, %edx
testl %r14d, %r14d
js 0x4834
movq (%rbx), %rsi
movq (%rsi,%rdx,8), %rsi
movq (%rax,%rdx,8), %rdi
leaq (%rdi,%rcx,8), %rdi
addq $-0x8, %rdi
xorl %r8d, %r8d
movsd (%rsi,%r8,8), %xmm0
movsd %xmm0, (%rdi,%r8,8)
incq %r8
cmpq %r8, %r13
jne 0x4820
incq %rdx
cmpq %r12, %rdx
jne 0x4805
leaq 0x58(%rsp), %rdi
callq 0x3fe2
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x40, %edi
callq 0x2070
movq %rax, %rbx
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x78bf(%rip), %rsi      # 0xc134
leaq 0x78c7(%rip), %rdx      # 0xc143
leaq 0x18(%rsp), %rdi
callq 0x3c44
leaq 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x7981(%rip), %rsi      # 0xc218
leaq 0x79a6(%rip), %rdx      # 0xc244
leaq 0x68(%rsp), %rdi
callq 0x3c44
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
leaq 0x68(%rsp), %rdx
movq %rbx, %rdi
callq 0x3cdc
xorl %ebp, %ebp
leaq 0xb4d2(%rip), %rsi      # 0xfd98
leaq -0xcb3(%rip), %rdx      # 0x3c1a
movq %rbx, %rdi
callq 0x2180
jmp 0x4960
movl $0x40, %edi
callq 0x2070
movq %rax, %rbx
leaq 0x48(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x78e6(%rip), %rsi      # 0xc1dd
leaq 0x78eb(%rip), %rdx      # 0xc1e9
leaq 0x38(%rsp), %rdi
callq 0x3c44
leaq 0x98(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x78ce(%rip), %rsi      # 0xc1ea
leaq 0x78f4(%rip), %rdx      # 0xc217
leaq 0x88(%rsp), %rdi
callq 0x3c44
movb $0x1, %bpl
leaq 0x38(%rsp), %rsi
leaq 0x88(%rsp), %rdx
movq %rbx, %rdi
callq 0x3cdc
xorl %ebp, %ebp
leaq 0xb447(%rip), %rsi      # 0xfd98
leaq -0xd3e(%rip), %rdx      # 0x3c1a
movq %rbx, %rdi
callq 0x2180
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %r12, %rdi
je 0x4975
callq 0x2100
movq 0x38(%rsp), %rdi
jmp 0x499d
movq %rax, %r14
movq 0x38(%rsp), %rdi
jmp 0x49b6
movq %rax, %r14
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x4998
callq 0x2100
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x49a7
callq 0x2100
testb %bpl, %bpl
jne 0x49c7
jmp 0x49cf
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x49c7
callq 0x2100
jmp 0x49c7
jmp 0x49c4
movq %rax, %r14
movq %rbx, %rdi
callq 0x20c0
movq %r14, %rdi
callq 0x21b0
nop