// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x10(%rbp)
jle 0x394ab
cmpq $0x0, -0x18(%rbp)
jle 0x394ab
cmpq $0x0, -0x20(%rbp)
jle 0x394ab
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x48(%rbp), %rdx
imulq -0x40(%rbp), %rdx
callq 0x3a810
cmpq $0x2, -0x20(%rbp)
jle 0x39217
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x48(%rbp), %rax
jge 0x39212
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x391ff
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
shlq %rax
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
imulq %rcx, %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x28(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x23b64(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdx
movq -0x40(%rbp), %rcx
movq -0x40(%rbp), %r8
movl $0x4, %r9d
callq 0x48240
movq -0x18(%rbp), %rcx
leaq 0x23b42(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
movl $0x4, %edx
callq 0x3a810
movq -0x18(%rbp), %rcx
leaq 0x23b25(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x40(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x30(%rbp), %rax
shlq %rax
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %r8d
shlq %cl, %r8
movq %r8, %rcx
imulq %rcx, %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x28(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
movq -0x40(%rbp), %r9
movl $0x4, %r8d
callq 0x48240
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0x39108
jmp 0x39201
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x390f2
jmp 0x392f7
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x48(%rbp), %rax
jge 0x392f5
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
shlq %rax
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
imulq %rcx, %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq 0x23a5b(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdx
movq -0x40(%rbp), %rcx
movq -0x40(%rbp), %r8
movq -0x38(%rbp), %r9
callq 0x48240
movq -0x18(%rbp), %rcx
leaq 0x23a3b(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x18(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x3a810
movq -0x18(%rbp), %rcx
leaq 0x23a1f(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x40(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x30(%rbp), %rax
shlq %rax
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %r8d
shlq %cl, %r8
movq %r8, %rcx
imulq %rcx, %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x40(%rbp), %r9
callq 0x48240
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x3921f
jmp 0x392f7
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
cmpq $0x2, %rax
jle 0x393ef
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
cmpq %rcx, %rax
jae 0x393ea
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %esi
shlq %cl, %rsi
movq -0x10(%rbp), %rcx
leaq 0x23962(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdx
movq -0x48(%rbp), %rcx
movq -0x48(%rbp), %r8
movl $0x4, %r9d
callq 0x48240
movq -0x10(%rbp), %rcx
leaq 0x23940(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x3a810
movq -0x10(%rbp), %rcx
leaq 0x23923(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x28(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x48(%rbp), %r9
movl $0x4, %r8d
callq 0x48240
movq -0x28(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x28(%rbp)
jmp 0x39311
jmp 0x394a9
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %esi
shlq %cl, %rsi
movq -0x10(%rbp), %rcx
leaq 0x238b2(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdx
movq -0x48(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x48(%rbp), %r8
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %r9d
shlq %cl, %r9
movq -0x58(%rbp), %rcx
callq 0x48240
movq -0x10(%rbp), %rcx
leaq 0x2387d(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %edx
shlq %cl, %rdx
callq 0x3a810
movq -0x10(%rbp), %rcx
leaq 0x23855(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x48(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rcx
addq -0x20(%rbp), %rcx
movl $0x1, %r8d
shlq %cl, %r8
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %r9
callq 0x48240
jmp 0x394fd
cmpq $0x0, -0x10(%rbp)
jne 0x394c5
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x38830
jmp 0x394fb
cmpq $0x0, -0x18(%rbp)
jne 0x394df
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x38830
jmp 0x394f9
cmpq $0x0, -0x20(%rbp)
jne 0x394f7
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x38830
jmp 0x394f9
jmp 0x394fb
jmp 0x394fd
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)