// File: kebwi[P]Trifid/src/FFT/matlib.cpp
// Function: cxpose(double*, long, double*, long, long, long)
void cxpose(Float_t *indata, long iRsiz, Float_t *outdata, long oRsiz, long Nrows, long Ncols){
/* not in-place complex Float_t 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	T0r; 		/* data storage */
Float_t	T0i; 		/* data storage */
Float_t	T1r; 		/* data storage */
Float_t	T1i; 		/* data storage */
Float_t	T2r; 		/* data storage */
Float_t	T2i; 		/* data storage */
Float_t	T3r; 		/* data storage */
Float_t	T3i; 		/* data storage */
const long inRsizd1 = 2*iRsiz;
const long inRsizd1i = 2*iRsiz + 1;
const long inRsizd2 = 4*iRsiz;
const long inRsizd2i = 4*iRsiz + 1;
const long inRsizd3 = inRsizd2+inRsizd1;
const long inRsizd3i = inRsizd2+inRsizd1 + 1;
const long inRsizd4 = 8*iRsiz;

ocol = outdata;
irow = indata;
for (RowCnt=Nrows/4; RowCnt>0; RowCnt--){
	idata = irow;
	odata = ocol;
	for (ColCnt=Ncols; ColCnt>0; ColCnt--){
		T0r = *idata;
		T0i = *(idata +1);
		T1r = *(idata+inRsizd1);
		T1i = *(idata+inRsizd1i);
		T2r = *(idata+inRsizd2);
		T2i = *(idata+inRsizd2i);
		T3r = *(idata+inRsizd3);
		T3i = *(idata+inRsizd3i);
		*odata = T0r;
		*(odata+1) = T0i;
		*(odata+2) = T1r;
		*(odata+3) = T1i;
		*(odata+4) = T2r;
		*(odata+5) = T2i;
		*(odata+6) = T3r;
		*(odata+7) = T3i;
		idata+=2;
		odata += 2*oRsiz;
	}
	irow += inRsizd4;
	ocol += 8;
}
if (Nrows%4 != 0){
	for (ColCnt=Ncols; ColCnt>0; ColCnt--){
		idata = irow;
		odata = ocol;
		for (RowCnt=Nrows%4; RowCnt>0; RowCnt--){
			T0r = *idata;
			T0i = *(idata+1);
			*odata = T0r;
			*(odata+1) = T0i;
			odata+=2;
			idata += 2*iRsiz;
		}
		irow+=2;
		ocol += 2*oRsiz;
	}
}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x58, %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
shlq %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
shlq %rax
addq $0x1, %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rax
shlq $0x2, %rax
movq %rax, -0xb8(%rbp)
movq -0x10(%rbp), %rax
shlq $0x2, %rax
addq $0x1, %rax
movq %rax, -0xc0(%rbp)
movq -0xb8(%rbp), %rax
addq -0xa8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xb8(%rbp), %rax
addq -0xa8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0xd8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movl $0x4, %ecx
cqto
idivq %rcx
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jle 0x484af
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 0x4847f
movq -0x48(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x48(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x70(%rbp)
movq -0x48(%rbp), %rax
movq -0xa8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq -0xb0(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x80(%rbp)
movq -0x48(%rbp), %rax
movq -0xb8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x88(%rbp)
movq -0x48(%rbp), %rax
movq -0xc0(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x90(%rbp)
movq -0x48(%rbp), %rax
movq -0xc8(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x98(%rbp)
movq -0x48(%rbp), %rax
movq -0xd0(%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 $0x10, %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x60(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x48324
movq -0xd8(%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 0x48301
movq -0x28(%rbp), %rax
movl $0x4, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
je 0x48598
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jle 0x48596
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movl $0x4, %ecx
cqto
idivq %rcx
movq %rdx, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jle 0x48566
movq -0x48(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
movq -0x48(%rbp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x68(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x70(%rbp), %xmm0
movq -0x50(%rbp), %rax
movsd %xmm0, 0x8(%rax)
movq -0x50(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x58(%rbp)
jmp 0x484fc
movq -0x38(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x60(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x484cf
jmp 0x48598
addq $0x58, %rsp
popq %rbp
retq
nop