// File: /workspace/github_cpp_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rax
movq %rdi, %rcx
cmpq $0x4, %r8
movq %rax, -0x10(%rsp)
jl 0x296b1
movq %r8, %r11
shrq $0x2, %r11
shlq $0x4, %rax
movq %rsi, %r10
shlq $0x6, %r10
movq %rsi, %rbx
shlq $0x5, %rbx
movq %rsi, %r14
shlq $0x4, %r14
leaq (%r14,%r14,2), %r15
leaq 0x30(%rdx), %r13
leaq 0x1(%r9), %rdi
movq %rdi, -0x8(%rsp)
testq %r9, %r9
jle 0x29699
movq -0x8(%rsp), %rbp
movq %r13, %r12
movq %rcx, %rdi
movups (%rdi), %xmm0
movups (%rdi,%r14), %xmm1
movups (%rdi,%rbx), %xmm2
movups (%rdi,%r15), %xmm3
movups %xmm0, -0x30(%r12)
movups %xmm1, -0x20(%r12)
movups %xmm2, -0x10(%r12)
movups %xmm3, (%r12)
addq $0x10, %rdi
addq %rax, %r12
decq %rbp
cmpq $0x1, %rbp
ja 0x29661
addq %r10, %rcx
addq $0x40, %rdx
leaq -0x1(%r11), %rdi
addq $0x40, %r13
cmpq $0x1, %r11
movq %rdi, %r11
jg 0x29651
leaq 0x3(%r8), %rax
testq %r8, %r8
cmovnsq %r8, %rax
andq $-0x4, %rax
subq %rax, %r8
sete %al
testq %r9, %r9
setle %dil
orb %al, %dil
movq -0x10(%rsp), %rbx
jne 0x2971d
shlq $0x4, %rbx
shlq $0x4, %rsi
leaq 0x1(%r8), %rax
testq %r8, %r8
jle 0x29709
movq %rax, %rdi
movq %rcx, %r10
movq %rdx, %r11
movups (%r10), %xmm0
movups %xmm0, (%r11)
addq $0x10, %r11
addq %rsi, %r10
decq %rdi
cmpq $0x1, %rdi
ja 0x296f1
addq $0x10, %rcx
addq %rbx, %rdx
leaq -0x1(%r9), %rdi
cmpq $0x1, %r9
movq %rdi, %r9
jg 0x296e3
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq