// File: bothaynahazem[P]AsuMathLabG13/Matrix2017.cpp
// Function: Matrix::getString[abi:cxx11]()
string Matrix::getString()
{
	string s="";
	for (int iR = 0; iR<nRows; iR++)
	{
		for (int iC = 0; iC<nColumns; iC++)
		{
			//cout << values[iR][iC] << " ";

			char buffer[50]="";
			if(this->type=="complex")
			{
				if (cvalues[iR][iC].imag()==0)
					snprintf(buffer, 50, "%g\t", cvalues[iR][iC].real());
				else if (cvalues[iR][iC].real()==0)
								if(cvalues[iR][iC].imag()==1)
									snprintf(buffer, 50, "i\t");
								else if(cvalues[iR][iC].imag()==-1)
										snprintf(buffer, 50, "-i\t");
								else
									snprintf(buffer, 50, "%gi\t", cvalues[iR][iC].imag());
				else if (cvalues[iR][iC].real()!=0 && cvalues[iR][iC].imag()<0)
							 if(cvalues[iR][iC].imag()==-1)
									snprintf(buffer, 50, "%g-i\t", cvalues[iR][iC].real());
						   else
							 snprintf(buffer, 50, "%g%gi\t", cvalues[iR][iC].real(),cvalues[iR][iC].imag());
				else
				 if(cvalues[iR][iC].imag()==1)
					snprintf(buffer, 50, "%g+i\t", cvalues[iR][iC].real());
				 else
					snprintf(buffer, 50, "%g+%gi\t", cvalues[iR][iC].real(),cvalues[iR][iC].imag());
      }else
			snprintf(buffer, 50, "%g\t", values[iR][iC]);
			s += buffer;
		}
		//cout << endl;
		s += "\n";
	}
	return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movb $0x0, -0x11(%rbp)
leaq -0x12(%rbp), %rdi
movq %rdi, -0x68(%rbp)
callq 0x3640
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rdx
leaq 0xaf6c(%rip), %rsi      # 0x1b432
callq 0xab40
jmp 0x104cd
leaq -0x12(%rbp), %rdi
callq 0x3410
movl $0x0, -0x28(%rbp)
movq -0x78(%rbp), %rcx
movl -0x28(%rbp), %eax
cmpl (%rcx), %eax
jge 0x10ac1
movl $0x0, -0x2c(%rbp)
movq -0x78(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x10a9f
movq -0x78(%rbp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movw $0x0, -0x30(%rbp)
addq $0x18, %rdi
leaq 0xaede(%rip), %rsi      # 0x1b405
callq 0xafa0
movb %al, -0x81(%rbp)
jmp 0x10534
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x10543
jmp 0x10a50
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19870
movsd %xmm0, -0x90(%rbp)
jmp 0x1056d
movsd -0x90(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x10618
jp 0x10618
movq -0x78(%rbp), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19890
movsd %xmm0, -0x98(%rbp)
jmp 0x105bd
movsd -0x98(%rbp), %xmm0
movq -0xa0(%rbp), %rdi
movl $0x32, %esi
leaq 0xae57(%rip), %rdx      # 0x1b42f
movb $0x1, %al
callq 0x3590
jmp 0x10a4e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x12(%rbp), %rdi
callq 0x3410
jmp 0x10ae1
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3270
jmp 0x10ae1
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19890
movsd %xmm0, -0xa8(%rbp)
jmp 0x10642
movsd -0xa8(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x10774
jp 0x10774
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19870
movsd %xmm0, -0xb0(%rbp)
jmp 0x10687
movsd -0xb0(%rbp), %xmm0
movsd 0xace9(%rip), %xmm1     # 0x1b380
ucomisd %xmm1, %xmm0
jne 0x106bb
jp 0x106bb
leaq -0x60(%rbp), %rdi
movl $0x32, %esi
leaq 0xad94(%rip), %rdx      # 0x1b443
movb $0x0, %al
callq 0x3590
jmp 0x1076f
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19870
movsd %xmm0, -0xb8(%rbp)
jmp 0x106e5
movsd -0xb8(%rbp), %xmm0
movsd 0xac93(%rip), %xmm1     # 0x1b388
ucomisd %xmm1, %xmm0
jne 0x10716
jp 0x10716
leaq -0x60(%rbp), %rdi
movl $0x32, %esi
leaq 0xad28(%rip), %rdx      # 0x1b435
movb $0x0, %al
callq 0x3590
jmp 0x1076d
movq -0x78(%rbp), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19870
movsd %xmm0, -0xc0(%rbp)
jmp 0x1074b
movsd -0xc0(%rbp), %xmm0
movq -0xc8(%rbp), %rdi
movl $0x32, %esi
leaq 0xace3(%rip), %rdx      # 0x1b449
movb $0x1, %al
callq 0x3590
jmp 0x1076f
jmp 0x10a4c
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19890
movsd %xmm0, -0xd0(%rbp)
jmp 0x1079e
movsd -0xd0(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x107b6
jp 0x107b6
jmp 0x10921
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19870
movsd %xmm0, -0xd8(%rbp)
jmp 0x107e0
movsd -0xd8(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x10921
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19870
movsd %xmm0, -0xe0(%rbp)
jmp 0x1081f
movsd -0xe0(%rbp), %xmm0
movsd 0xab59(%rip), %xmm1     # 0x1b388
ucomisd %xmm1, %xmm0
jne 0x10893
jp 0x10893
movq -0x78(%rbp), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0xf0(%rbp)
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19890
movsd %xmm0, -0xe8(%rbp)
jmp 0x1086c
movsd -0xe8(%rbp), %xmm0
movq -0xf0(%rbp), %rdi
movl $0x32, %esi
leaq 0xabac(%rip), %rdx      # 0x1b433
movb $0x1, %al
callq 0x3590
jmp 0x1091c
movq -0x78(%rbp), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0x100(%rbp)
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19890
movsd %xmm0, -0xf8(%rbp)
jmp 0x108c8
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19870
movsd %xmm0, -0x108(%rbp)
jmp 0x108f2
movsd -0x108(%rbp), %xmm1
movsd -0xf8(%rbp), %xmm0
movq -0x100(%rbp), %rdi
movl $0x32, %esi
leaq 0xab24(%rip), %rdx      # 0x1b439
movb $0x2, %al
callq 0x3590
jmp 0x10a4a
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19870
movsd %xmm0, -0x110(%rbp)
jmp 0x1094b
movsd -0x110(%rbp), %xmm0
movsd 0xaa25(%rip), %xmm1     # 0x1b380
ucomisd %xmm1, %xmm0
jne 0x109bf
jp 0x109bf
movq -0x78(%rbp), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0x120(%rbp)
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19890
movsd %xmm0, -0x118(%rbp)
jmp 0x10998
movsd -0x118(%rbp), %xmm0
movq -0x120(%rbp), %rdi
movl $0x32, %esi
leaq 0xaa8d(%rip), %rdx      # 0x1b440
movb $0x1, %al
callq 0x3590
jmp 0x10a48
movq -0x78(%rbp), %rax
leaq -0x60(%rbp), %rcx
movq %rcx, -0x130(%rbp)
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19890
movsd %xmm0, -0x128(%rbp)
jmp 0x109f4
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x19870
movsd %xmm0, -0x138(%rbp)
jmp 0x10a1e
movsd -0x138(%rbp), %xmm1
movsd -0x128(%rbp), %xmm0
movq -0x130(%rbp), %rdi
movl $0x32, %esi
leaq 0xaa05(%rip), %rdx      # 0x1b446
movb $0x2, %al
callq 0x3590
jmp 0x10a4a
jmp 0x10a4c
jmp 0x10a4e
jmp 0x10a80
movq -0x78(%rbp), %rax
leaq -0x60(%rbp), %rdi
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movl $0x32, %esi
leaq 0xa9b6(%rip), %rdx      # 0x1b42f
movb $0x1, %al
callq 0x3590
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x33a0
jmp 0x10a8f
jmp 0x10a91
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x104f3
movq -0x70(%rbp), %rdi
leaq 0xa965(%rip), %rsi      # 0x1b40f
callq 0x33a0
jmp 0x10ab1
jmp 0x10ab3
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x104dd
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x10ad4
movq -0x70(%rbp), %rdi
callq 0x3270
movq -0x80(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3630
nopw (%rax,%rax)