// File: bothaynahazem[P]AsuMathLabG13/Matrix2017.cpp
// Function: Matrix::getTranspose()
Matrix Matrix::getTranspose() {
    if(this->type=="complex")
    {
    Matrix x("complex",nColumns, nRows);
	for (int ir = 0; ir<x.nRows;ir++) {
		for (int ic = 0; ic<x.nColumns;ic++) {
			x.cvalues[ir][ic] = cvalues[ic][ir];
		}
	}
	return x;
    }
    else
    {
	Matrix x(nColumns, nRows);
	for (int ir = 0; ir<x.nRows;ir++) {
		for (int ic = 0; ic<x.nColumns;ic++) {
			x.values[ir][ic] = values[ic][ir];
		}
	}
	return x;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x90(%rbp)
movq %rdi, %rax
movq %rax, -0x88(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x80(%rbp)
addq $0x18, %rdi
leaq 0x588e(%rip), %rsi      # 0x1b405
callq 0xafa0
testb $0x1, %al
jne 0x15b85
jmp 0x15cf6
movb $0x0, -0x11(%rbp)
leaq -0x39(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x3640
movq -0x98(%rbp), %rdx
leaq 0x585e(%rip), %rsi      # 0x1b405
leaq -0x38(%rbp), %rdi
callq 0xab40
jmp 0x15bb2
movq -0x80(%rbp), %rax
movl (%rax), %ecx
movl %ecx, -0xa0(%rbp)
movl 0x4(%rax), %eax
movl %eax, -0x9c(%rbp)
leaq -0x60(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x19810
jmp 0x15bd8
movl -0xa0(%rbp), %ecx
movl -0x9c(%rbp), %edx
movq -0x90(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
movsd -0x58(%rbp), %xmm1
leaq -0x38(%rbp), %rsi
xorl %r8d, %r8d
callq 0x19470
jmp 0x15c03
leaq -0x38(%rbp), %rdi
callq 0x3270
leaq -0x39(%rbp), %rdi
callq 0x3410
movl $0x0, -0x64(%rbp)
movq -0x90(%rbp), %rcx
movl -0x64(%rbp), %eax
cmpl (%rcx), %eax
jge 0x15cdb
movl $0x0, -0x68(%rbp)
movq -0x90(%rbp), %rcx
movl -0x68(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x15ccb
movq -0x90(%rbp), %rax
movq -0x80(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq -0x68(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x64(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq 0x10(%rax), %rax
movslq -0x64(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movslq -0x68(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x15c35
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x15cbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3270
leaq -0x39(%rbp), %rdi
callq 0x3410
jmp 0x15db4
jmp 0x15ccd
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x15c1c
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x15cf1
movq -0x90(%rbp), %rdi
callq 0xe650
jmp 0x15da4
movq -0x90(%rbp), %rdi
movq -0x80(%rbp), %rax
movb $0x0, -0x69(%rbp)
movl 0x4(%rax), %esi
movl (%rax), %edx
xorl %ecx, %ecx
xorps %xmm0, %xmm0
callq 0xe7c0
movl $0x0, -0x70(%rbp)
movq -0x90(%rbp), %rcx
movl -0x70(%rbp), %eax
cmpl (%rcx), %eax
jge 0x15d8c
movl $0x0, -0x74(%rbp)
movq -0x90(%rbp), %rcx
movl -0x74(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x15d7f
movq -0x90(%rbp), %rax
movq -0x80(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x74(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x70(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x8(%rax), %rax
movslq -0x70(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x74(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x15d30
jmp 0x15d81
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x15d1b
movb $0x1, -0x69(%rbp)
testb $0x1, -0x69(%rbp)
jne 0x15da2
movq -0x90(%rbp), %rdi
callq 0xe650
jmp 0x15da4
movq -0x88(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3630
nopl (%rax)