// File: /workspace/github_cpp_makefile_star2_O1/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
cmpq $0x8, %r8
movq %rcx, -0x8(%rsp)
jl 0x2a252
movq %r8, %r11
shrq $0x3, %r11
movq %rsi, %rax
shlq $0x6, %rax
leaq 0x38(%rdx), %r10
leaq (,%rcx,8), %rbx
leaq 0x1(%r9), %rcx
leaq (,%rsi,8), %r15
testq %r9, %r9
jle 0x2a236
movq %rcx, %r12
movq %r10, %r13
movq %rdi, %rbp
movsd (%rbp), %xmm0
leaq (,%rsi,8), %r14
addq %rbp, %r14
movsd (%rbp,%rsi,8), %xmm1
movsd (%r15,%r14), %xmm2
addq %r15, %r14
movsd (%r15,%r14), %xmm3
addq %r15, %r14
movsd (%r15,%r14), %xmm4
addq %r15, %r14
movsd (%r15,%r14), %xmm5
addq %r15, %r14
movsd (%r15,%r14), %xmm6
addq %r15, %r14
movsd (%r15,%r14), %xmm7
movsd %xmm0, -0x38(%r13)
movsd %xmm1, -0x30(%r13)
movsd %xmm2, -0x28(%r13)
movsd %xmm3, -0x20(%r13)
movsd %xmm4, -0x18(%r13)
movsd %xmm5, -0x10(%r13)
movsd %xmm6, -0x8(%r13)
movsd %xmm7, (%r13)
addq $0x8, %rbp
addq %rbx, %r13
decq %r12
cmpq $0x1, %r12
jg 0x2a1a9
addq %rax, %rdi
addq $0x40, %rdx
leaq -0x1(%r11), %r14
addq $0x40, %r10
cmpq $0x1, %r11
movq %r14, %r11
jg 0x2a197
leaq 0x7(%r8), %rax
testq %r8, %r8
cmovnsq %r8, %rax
andq $-0x8, %rax
subq %rax, %r8
sete %al
testq %r9, %r9
setle %cl
orb %al, %cl
movq -0x8(%rsp), %r14
jne 0x2a2ba
shlq $0x3, %rsi
leaq 0x1(%r8), %rax
testq %r8, %r8
jle 0x2a2a5
movq %rax, %r10
movq %rdi, %r11
movq %rdx, %rbx
movsd (%r11), %xmm0
movsd %xmm0, (%rbx)
addq $0x8, %rbx
addq %rsi, %r11
decq %r10
cmpq $0x1, %r10
jg 0x2a28c
addq $0x8, %rdi
leaq (%rdx,%r14,8), %rdx
leaq -0x1(%r9), %rcx
cmpq $0x1, %r9
movq %rcx, %r9
jg 0x2a27e
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq