// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %rax
movq %rdx, %r8
movabsq $0x8, %r10
cqto
idivq %r10
movq %rsi, %r11
shlq $0x6, %r11
leaq 0x38(%r8), %rbx
leaq (,%rcx,8), %r14
leaq (,%rsi,8), %r10
testq %rax, %rax
jle 0x217f1
movq %rbx, %r15
movq %r9, %r12
movq %rdi, %r13
testq %r12, %r12
jle 0x217de
movsd (%r13), %xmm0
leaq (,%rsi,8), %rbp
addq %r13, %rbp
movsd (%r13,%rsi,8), %xmm1
movsd (%r10,%rbp), %xmm2
addq %r10, %rbp
movsd (%r10,%rbp), %xmm3
addq %r10, %rbp
movsd (%r10,%rbp), %xmm4
addq %r10, %rbp
movsd (%r10,%rbp), %xmm5
addq %r10, %rbp
movsd (%r10,%rbp), %xmm6
addq %r10, %rbp
movsd (%r10,%rbp), %xmm7
movsd %xmm0, -0x38(%r15)
movsd %xmm1, -0x30(%r15)
movsd %xmm2, -0x28(%r15)
movsd %xmm3, -0x20(%r15)
movsd %xmm4, -0x18(%r15)
movsd %xmm5, -0x10(%r15)
movsd %xmm6, -0x8(%r15)
movsd %xmm7, (%r15)
addq $0x8, %r13
decq %r12
addq %r14, %r15
jmp 0x2174c
addq %r11, %rdi
addq $0x40, %r8
decq %rax
addq $0x40, %rbx
jmp 0x2173a
testq %rdx, %rdx
je 0x2182b
testq %r9, %r9
jle 0x2182b
leaq 0x8(%rdi), %rax
movq %rdx, %rsi
movq %r8, %r11
testq %rsi, %rsi
jle 0x2181f
movsd (%rdi), %xmm0
movsd %xmm0, (%r11)
addq $0x8, %r11
decq %rsi
addq %r10, %rdi
jmp 0x21805
leaq (%r8,%rcx,8), %r8
decq %r9
movq %rax, %rdi
jmp 0x217f6
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq