// File: kebwi[P]Trifid/src/FFT/matlib.cpp
// Function: xpose(double*, long, double*, long, long, long)
void xpose(Float_t *indata, long iRsiz, Float_t *outdata, long oRsiz, long Nrows, long Ncols){
/* not in-place matrix transpose	*/
/* INPUTS */
/* *indata = input data array	*/
/* iRsiz = offset to between rows of input data array	*/
/* oRsiz = offset to between rows of output data array	*/
/* Nrows = number of rows in input data array	*/
/* Ncols = number of columns in input data array	*/
/* OUTPUTS */
/* *outdata = output data array	*/

Float_t	*irow; 		/* pointer to input row start */
Float_t	*ocol; 		/* pointer to output col start */
Float_t	*idata; 	/* pointer to input data */
Float_t	*odata; 	/* pointer to output data */
long 	RowCnt;		/* row counter */
long 	ColCnt;		/* col counter */
Float_t	T0; 		/* data storage */
Float_t	T1; 		/* data storage */
Float_t	T2; 		/* data storage */
Float_t	T3; 		/* data storage */
Float_t	T4; 		/* data storage */
Float_t	T5; 		/* data storage */
Float_t	T6; 		/* data storage */
Float_t	T7; 		/* data storage */
const long inRsizd1 = iRsiz;
const long inRsizd2 = 2*iRsiz;
const long inRsizd3 = inRsizd2+iRsiz;
const long inRsizd4 = 4*iRsiz;
const long inRsizd5 = inRsizd3+inRsizd2;
const long inRsizd6 = inRsizd4+inRsizd2;
const long inRsizd7 = inRsizd4+inRsizd3;
const long inRsizd8 = 8*iRsiz;

ocol = outdata;
irow = indata;
for (RowCnt=Nrows/8; RowCnt>0; RowCnt--){
	idata = irow;
	odata = ocol;
	for (ColCnt=Ncols; ColCnt>0; ColCnt--){
		T0 = *idata;
		T1 = *(idata+inRsizd1);
		T2 = *(idata+inRsizd2);
		T3 = *(idata+inRsizd3);
		T4 = *(idata+inRsizd4);
		T5 = *(idata+inRsizd5);
		T6 = *(idata+inRsizd6);
		T7 = *(idata+inRsizd7);
		*odata = T0;
		*(odata+1) = T1;
		*(odata+2) = T2;
		*(odata+3) = T3;
		*(odata+4) = T4;
		*(odata+5) = T5;
		*(odata+6) = T6;
		*(odata+7) = T7;
		idata++;
		odata += oRsiz;
	}
	irow += inRsizd8;
	ocol += 8;
}
if (Nrows%8 != 0){
	for (ColCnt=Ncols; ColCnt>0; ColCnt--){
		idata = irow++;
		odata = ocol;
		ocol += oRsiz;
		for (RowCnt=Nrows%8; RowCnt>0; RowCnt--){
			T0 = *idata;
			*odata++ = T0;
			idata += iRsiz;
		}
	}
}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
shlq %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
shlq $0x2, %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
addq -0xb0(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rax
addq -0xb0(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xc0(%rbp), %rax
addq -0xb8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0xe0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jle 0x4816c
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jle 0x4813c
movq -0x48(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x48(%rbp), %rax
movq -0xa8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x48(%rbp), %rax
movq -0xb0(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq -0xb8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x48(%rbp), %rax
movq -0xc0(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x88(%rbp)
movq -0x48(%rbp), %rax
movq -0xc8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x90(%rbp)
movq -0x48(%rbp), %rax
movq -0xd0(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x98(%rbp)
movq -0x48(%rbp), %rax
movq -0xd8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0x68(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x70(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movsd -0x78(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, 0x10(%rax)
movsd -0x80(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, 0x18(%rax)
movsd -0x88(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, 0x20(%rax)
movsd -0x90(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, 0x28(%rax)
movsd -0x98(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, 0x30(%rax)
movsd -0xa0(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, 0x38(%rax)
movq -0x48(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
shlq $0x3, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x47fdd
movq -0xe0(%rbp), %rax
shlq $0x3, %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x40, %rax
movq %rax, -0x40(%rbp)
movq -0x58(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x47fba
movq -0x28(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x48233
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jle 0x48231
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x38(%rbp)
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x20(%rbp), %rax
shlq $0x3, %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movl $0x8, %ecx
cqto
idivq %rcx
movq %rdx, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jle 0x4821e
movq -0x48(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd -0x68(%rbp), %xmm0
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x50(%rbp)
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
shlq $0x3, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x481d4
jmp 0x48220
movq -0x60(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x4818c
jmp 0x48233
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)