// File: bothaynahazem[P]AsuMathLabG13/Matrix2017.cpp
// Function: Matrix::Matrix(int, int, double, ...)
Matrix::Matrix(int nRows, int nColumns, double first, ...)
{
	this->nRows = nRows;
	this->nColumns = nColumns;
	if ((nRows*nColumns) == 0)
	{
		values = NULL;
		return;
	}
	values = new double*[nRows];
	va_list va;
	va_start(va, first);
	for (int iR = 0;iR<nRows;iR++)
	{
		values[iR] = new double[nColumns];
		for (int iC = 0;iC<nColumns;iC++)
		{
			values[iR][iC] = (iC == 0 && iR == 0) ? first : va_arg(va, double);
		}
	}
	va_end(va);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
testb %al, %al
je 0xea27
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x108(%rbp)
addq $0x18, %rdi
movq %rdi, -0x110(%rbp)
callq 0x3510
movq -0x108(%rbp), %rax
movl -0xc(%rbp), %ecx
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movl %ecx, 0x4(%rax)
movl -0xc(%rbp), %eax
imull -0x10(%rbp), %eax
cmpl $0x0, %eax
jne 0xea98
movq -0x108(%rbp), %rax
movq $0x0, 0x8(%rax)
jmp 0xec5b
movslq -0xc(%rbp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x3030
movq %rax, -0x118(%rbp)
jmp 0xeac0
movq -0x108(%rbp), %rax
movq -0x118(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq -0x40(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x40, 0x4(%rax)
movl $0x18, (%rax)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xec57
movslq -0x10(%rbp), %rax
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x3030
movq %rax, -0x120(%rbp)
jmp 0xeb31
movq -0x120(%rbp), %rdx
movq -0x108(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x44(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xec47
cmpl $0x0, -0x48(%rbp)
jne 0xeb7c
cmpl $0x0, -0x44(%rbp)
jne 0xeb7c
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x128(%rbp)
jmp 0xec15
leaq -0x40(%rbp), %rax
movq %rax, -0x140(%rbp)
addq $0x4, %rax
movq %rax, -0x138(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0x12c(%rbp)
cmpl $0xa0, %eax
ja 0xebe5
movq -0x138(%rbp), %rcx
movl -0x12c(%rbp), %edx
movq -0x140(%rbp), %rsi
movslq %edx, %rax
addq 0x10(%rsi), %rax
addl $0x10, %edx
movl %edx, (%rcx)
movq %rax, -0x148(%rbp)
jmp 0xec02
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3270
jmp 0xec64
movq -0x140(%rbp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x8, %rdx
movq %rdx, 0x8(%rcx)
movq %rax, -0x148(%rbp)
movq -0x148(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x128(%rbp)
movq -0x108(%rbp), %rax
movsd -0x128(%rbp), %xmm0
movq 0x8(%rax), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x48(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xeb52
jmp 0xec49
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0xeafd
leaq -0x40(%rbp), %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3630
nopl (%rax)