// File: /workspace/github_cpp_makefile_star2_O2/kebwi[P]Trifid/src/FFT/fft2d.cpp
// Function: ifft3d(double*, long, long, long)
void ifft3d(Float_t *data, long M3, long M2, long M){
/* Compute 2D complex ifft 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)){
	iffts(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);
				iffts(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);
			iffts(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);
			iffts(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));
		iffts(Array2d[M3], M3, POW2(M2+M));
		cxpose(Array2d[M3], N3, data, POW2(M2+M), POW2(M2+M), N3);
	}
}
else
	if(M3==0) ifft2d(data, M2, M);
	else
		if(M2==0) ifft2d(data, M3, M);
		else
			if(M==0) ifft2d(data, M3, M2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r14
movq %rdx, %r13
pushq $0x1
popq %rbx
movq %rbx, %rdx
shlq %cl, %rdx
movq %rdi, %rbp
movq %rbx, %r12
movl %r13d, %ecx
shlq %cl, %r12
movl %esi, %ecx
shlq %cl, %rbx
testq %rsi, %rsi
setle %al
testq %r13, %r13
setle %cl
orb %al, %cl
testq %r14, %r14
setle %al
orb %cl, %al
jne 0x1ccc4
movq %rdx, (%rsp)
movq %rsi, 0x18(%rsp)
movq %rbx, %rdx
movl %r13d, %ecx
shlq %cl, %rdx
movq %rbp, %rdi
movq %r14, %rsi
callq 0x1d7b6
leaq (%r14,%r13), %rcx
xorl %eax, %eax
testq %rbx, %rbx
movq %rbx, 0x10(%rsp)
cmovgq %rbx, %rax
movq %rax, 0x28(%rsp)
cmpq $0x2, %r14
movq %rcx, 0x8(%rsp)
movq %rbp, 0x20(%rsp)
jbe 0x1ccee
xorl %eax, %eax
leaq 0x15fae(%rip), %rbx     # 0x32be0
pushq $0x4
popq %r14
movq (%rsp), %rsi
cmpq 0x28(%rsp), %rax
je 0x1cd6b
movq %rax, 0x30(%rsp)
addq %rax, %rax
shlq %cl, %rax
leaq (,%rax,8), %r15
addq %rbp, %r15
xorl %ebp, %ebp
cmpq %rsi, %rbp
jge 0x1ccad
movq (%rbx,%r13,8), %rdx
movq %r15, %rdi
movq %r12, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0x21836
movq (%rbx,%r13,8), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x1d7b6
movq (%rbx,%r13,8), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq (%rsp), %rcx
movq %r14, %r8
movq %r12, %r9
callq 0x21836
movq (%rsp), %rsi
addq $0x4, %rbp
addq $0x40, %r15
jmp 0x1cc5d
movq 0x30(%rsp), %rax
incq %rax
movq 0x20(%rsp), %rbp
movq 0x8(%rsp), %rcx
jmp 0x1cc3a
testq %rsi, %rsi
je 0x1ce4a
testq %r13, %r13
je 0x1ce52
testq %r14, %r14
je 0x1ce6b
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
movq (%rsp), %r15
subq $0x1, 0x28(%rsp)
jb 0x1cd6b
movq %rbx, %rax
movq 0x8(%rsp), %rcx
shlq %cl, %rax
leaq (,%rax,8), %r14
addq %rbp, %r14
leaq 0x15ec7(%rip), %rbp     # 0x32be0
movq (%rbp,%r13,8), %rdx
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rcx
movq %r12, %r8
movq %r15, %r9
callq 0x21836
movq (%rbp,%r13,8), %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x1d7b6
movq (%rbp,%r13,8), %rdi
movq 0x20(%rsp), %rbp
movq %r12, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r15, %r8
movq %r12, %r9
callq 0x21836
movq 0x8(%rsp), %rcx
addq $0x2, %rbx
jmp 0x1ccf4
cmpq $0x3, %rcx
jl 0x1cde8
pushq $0x1
popq %r15
shlq %cl, %r15
xorl %eax, %eax
movq 0x18(%rsp), %r12
movq 0x10(%rsp), %r13
pushq $0x4
popq %rbx
cmpq %r15, %rax
jae 0x1ccdf
movq %rax, (%rsp)
leaq 0x15e45(%rip), %r14     # 0x32be0
movq (%r14,%r12,8), %rdx
movq %rbp, %rdi
movq %r15, %rsi
movq %r13, %rcx
movq %r13, %r8
movq %rbx, %r9
callq 0x21836
movq (%r14,%r12,8), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1d7b6
movq (%r14,%r12,8), %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r15, %rcx
movq %rbx, %r8
movq %r13, %r9
callq 0x21836
movq (%rsp), %rax
addq $0x4, %rax
addq $0x40, %rbp
jmp 0x1cd87
leaq 0x15df1(%rip), %rbx     # 0x32be0
movq 0x18(%rsp), %r15
movq (%rbx,%r15,8), %rdx
pushq $0x4
popq %r14
movq %rbp, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %r12
movq %r12, %rcx
movq %r12, %r8
movq %r14, %r9
callq 0x21836
movq (%rbx,%r15,8), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1d7b6
movq (%rbx,%r15,8), %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r14, %rcx
movq %r14, %r8
movq %r12, %r9
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21836
movq %rbp, %rdi
movq %r13, %rsi
jmp 0x1ce55
movq %rbp, %rdi
movq %r14, %rdx
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1c6a1
movq %rbp, %rdi
movq %r13, %rdx
jmp 0x1ce58