// File: /workspace/github_cpp_makefile_star2_O1/kebwi[P]Trifid/src/FFT/fft2d.cpp
// Function: fft3d(double*, long, long, long)
void fft3d(Float_t *data, long M3, long M2, long M){
/* Compute 2D complex fft and return results in-place	*/
/* INPUTS */
/* *data = input data array	*/
/* M3 = log2 of fft size number of pages */
/* M2 = log2 of fft size number of rows */
/* M = log2 of fft size number of columns */
/* OUTPUTS */
/* *data = output data array	*/
long i1;
long i2;
const long N = POW2(M);
const long N2 = POW2(M2);
const long N3 = POW2(M3);
if((M3>0)&&(M2>0)&&(M>0)){
	ffts(data, M, N3*N2);
	if (M>2)
		for (i2=0; i2<N3; i2++){
			for (i1=0; i1<N; i1+=4){
				cxpose(data + i2*2*POW2(M2+M) + i1*2, N, Array2d[M2], N2, N2, 4);
				ffts(Array2d[M2], M2, 4);
				cxpose(Array2d[M2], N2, data + i2*2*POW2(M2+M) + i1*2, N, 4, N2);
			}
		}
	else{
		for (i2=0; i2<N3; i2++){
			cxpose(data + i2*2*POW2(M2+M), N, Array2d[M2], N2, N2, N);
			ffts(Array2d[M2], M2, N);
			cxpose(Array2d[M2], N2, data + i2*2*POW2(M2+M), N, N, N2);
		}
	}
	if ((M2+M)>2)
		for (i1=0; i1<POW2(M2+M); i1+=4){
			cxpose(data + i1*2, POW2(M2+M), Array2d[M3], N3, N3, 4);
			ffts(Array2d[M3], M3, 4);
			cxpose(Array2d[M3], N3, data + i1*2, POW2(M2+M), 4, N3);
		}
	else{
		cxpose(data, POW2(M2+M), Array2d[M3], N3, N3, POW2(M2+M));
		ffts(Array2d[M3], M3, POW2(M2+M));
		cxpose(Array2d[M3], N3, data, POW2(M2+M), POW2(M2+M), N3);
	}
}
else
	if(M3==0) fft2d(data, M2, M);
	else
		if(M2==0) fft2d(data, M3, M);
		else
			if(M==0) fft2d(data, M3, M2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %rbx
movq %rdx, %r13
movl $0x1, %edx
movl $0x1, %ebp
shlq %cl, %rbp
movl $0x1, %r12d
movl %r13d, %ecx
shlq %cl, %r12
movl %esi, %ecx
shlq %cl, %rdx
testq %rsi, %rsi
setle %al
testq %r13, %r13
setle %cl
orb %al, %cl
testq %rbx, %rbx
setle %al
orb %cl, %al
jne 0x23b78
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movl %r13d, %ecx
shlq %cl, %rdx
movq %rdi, 0x20(%rsp)
movq %rbx, %rsi
callq 0x24957
movq %rbx, 0x18(%rsp)
cmpq $0x2, %rbx
jle 0x23b9b
cmpq $0x3f, 0x10(%rsp)
je 0x23c38
movq 0x18(%rsp), %rax
addq %r13, %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x2, %rax
movl $0x1, %ecx
cmovgeq %rax, %rcx
movq %rcx, 0x30(%rsp)
movq $0x0, (%rsp)
leaq 0x1610a(%rip), %rbx     # 0x39bf0
cmpq $0x3f, 0x18(%rsp)
je 0x23b5d
movq (%rsp), %rax
addq %rax, %rax
movq 0x28(%rsp), %rcx
shlq %cl, %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %r14
xorl %r15d, %r15d
movq (%rbx,%r13,8), %rdx
movl $0x4, %r9d
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rcx
movq %r12, %r8
callq 0x2a2c5
movq (%rbx,%r13,8), %rdi
movl $0x4, %edx
movq %r13, %rsi
callq 0x24957
movq (%rbx,%r13,8), %rdi
movl $0x4, %r8d
movq %r12, %rsi
movq %r14, %rdx
movq %rbp, %rcx
movq %r12, %r9
callq 0x2a2c5
addq $0x4, %r15
addq $0x40, %r14
cmpq %rbp, %r15
jl 0x23b09
movq (%rsp), %rcx
incq %rcx
movq %rcx, (%rsp)
cmpq 0x30(%rsp), %rcx
jne 0x23ae6
jmp 0x23c38
testq %rsi, %rsi
je 0x23d3d
testq %r13, %r13
je 0x23d40
testq %rbx, %rbx
jne 0x23cbf
movq %r13, %rdx
jmp 0x23d43
cmpq $0x3f, 0x10(%rsp)
je 0x23c38
movq 0x18(%rsp), %rax
addq %r13, %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
cmpq $0x2, %rax
movl $0x1, %ebx
cmovgeq %rax, %rbx
xorl %r15d, %r15d
movq %r15, %rax
movq (%rsp), %rcx
shlq %cl, %rax
movq 0x20(%rsp), %rcx
leaq (%rcx,%rax,8), %r14
leaq 0x1600e(%rip), %rax     # 0x39bf0
movq (%rax,%r13,8), %rdx
movq %r14, %rdi
movq %rbp, %rsi
movq %r12, %rcx
movq %r12, %r8
movq %rbp, %r9
callq 0x2a2c5
leaq 0x15fef(%rip), %rax     # 0x39bf0
movq (%rax,%r13,8), %rdi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x24957
leaq 0x15fd9(%rip), %rax     # 0x39bf0
movq (%rax,%r13,8), %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %rbp, %rcx
movq %rbp, %r8
movq %r12, %r9
callq 0x2a2c5
addq $0x2, %r15
decq %rbx
jne 0x23bc8
movq 0x18(%rsp), %rcx
addq %r13, %rcx
cmpq $0x3, %rcx
jl 0x23cce
movl $0x1, %r12d
shlq %cl, %r12
xorl %ebx, %ebx
leaq 0x15f94(%rip), %r14     # 0x39bf0
movq 0x20(%rsp), %r15
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %rbp
movq (%r14,%r13,8), %rdx
movl $0x4, %r9d
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rcx
movq %rbp, %r8
callq 0x2a2c5
movq (%r14,%r13,8), %rdi
movl $0x4, %edx
movq %r13, %rsi
callq 0x24957
movq (%r14,%r13,8), %rdi
movl $0x4, %r8d
movq %rbp, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %rbp, %r9
callq 0x2a2c5
addq $0x4, %rbx
addq $0x40, %r15
cmpq %r12, %rbx
jb 0x23c6b
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15f1b(%rip), %rbx     # 0x39bf0
movq 0x10(%rsp), %r15
movq (%rbx,%r15,8), %rdx
movl $0x4, %esi
movl $0x4, %r9d
movq 0x20(%rsp), %r14
movq %r14, %rdi
movq 0x8(%rsp), %r12
movq %r12, %rcx
movq %r12, %r8
callq 0x2a2c5
movq (%rbx,%r15,8), %rdi
movl $0x4, %edx
movq %r15, %rsi
callq 0x24957
movq (%rbx,%r15,8), %rdi
movl $0x4, %ecx
movl $0x4, %r8d
movq %r12, %rsi
movq %r14, %rdx
movq %r12, %r9
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2a2c5
movq %r13, %rsi
movq %rbx, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x236fc