// File: /workspace/github_cpp_makefile_star2_O3/kebwi[P]Trifid/src/FFT/fft2d.cpp
// Function: rifft2d(double*, long, long)
void rifft2d(Float_t *data, long M2, long M){
/* Compute 2D real ifft and return results in-place	*/
/* The input must be in the order as outout from rfft2d */
/* INPUTS */
/* *data = input data array	*/
/* M2 = log2 of fft size number of rows out */
/* M = log2 of fft size number of columns out */
/* OUTPUTS */
/* *data = output data array	*/
long i1;
if((M2>0)&&(M>0)){
	if (M==1){
		cxpose(data, POW2(M)/2, Array2d[M2], POW2(M2), POW2(M2), 1);
		riffts(Array2d[M2], M2, 2);
		xpose(Array2d[M2], POW2(M2), Array2d[M2]+POW2(M2)*2, 2, 2, POW2(M2));
		cxpose(Array2d[M2]+POW2(M2)*2, POW2(M2), data, POW2(M)/2, 1, POW2(M2));
	}
	else if (M==2){
		cxpose(data, POW2(M)/2, Array2d[M2], POW2(M2), POW2(M2), 1);
		riffts(Array2d[M2], M2, 2);
		xpose(Array2d[M2], POW2(M2), Array2d[M2]+POW2(M2)*2, 2, 2, POW2(M2)); 
		cxpose(Array2d[M2]+POW2(M2)*2, POW2(M2), data, POW2(M)/2, 1, POW2(M2));

		cxpose(data + 2, POW2(M)/2, Array2d[M2], POW2(M2), POW2(M2), 1);
		iffts(Array2d[M2], M2, 1);
		cxpose(Array2d[M2], POW2(M2), data + 2, POW2(M)/2, 1, POW2(M2));
	}
	else{
		cxpose(data, POW2(M)/2, Array2d[M2], POW2(M2), POW2(M2), 1);
		riffts(Array2d[M2], M2, 2);
		xpose(Array2d[M2], POW2(M2), Array2d[M2]+POW2(M2)*2, 2, 2, POW2(M2));
		cxpose(Array2d[M2]+POW2(M2)*2, POW2(M2), data, POW2(M)/2, 1, POW2(M2));

		cxpose(data + 2, POW2(M)/2, Array2d[M2], POW2(M2), POW2(M2), 3);
		iffts(Array2d[M2], M2, 3);
		cxpose(Array2d[M2], POW2(M2), data + 2, POW2(M)/2, 3, POW2(M2));
		for (i1=4; i1<POW2(M)/2; i1+=4){
			cxpose(data + i1*2, POW2(M)/2, Array2d[M2], POW2(M2), POW2(M2), 4);
			iffts(Array2d[M2], M2, 4);
			cxpose(Array2d[M2], POW2(M2), data + i1*2, POW2(M)/2, 4, POW2(M2));
		}
	}
	riffts(data, M, POW2(M2));
}
else
	riffts(data, M2+M, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %rbx
testq %rsi, %rsi
setle %al
testq %rdx, %rdx
setle %cl
orb %al, %cl
jne 0x24212
cmpq $0x2, %rbp
je 0x24225
cmpq $0x1, %rbp
jne 0x2431f
movq %rbx, %r14
leaq 0x15a66(%rip), %rbx     # 0x39bf0
movq (%rbx,%r12,8), %rdx
movl $0x1, %r15d
movl %r12d, %ecx
shlq %cl, %r15
movl $0x1, %esi
movl $0x1, %r9d
movq %r14, %rdi
movq %r15, %rcx
movq %r15, %r8
callq 0x29601
movq (%rbx,%r12,8), %rdi
movl $0x2, %r13d
movl $0x2, %edx
movq %r12, %rsi
callq 0x2476e
movl %r12d, %ecx
shlq %cl, %r13
movq (%rbx,%r12,8), %rdi
leaq (%rdi,%r13,8), %rdx
shlq $0x3, %r13
movl $0x2, %ecx
movl $0x2, %r8d
movq %r15, %rsi
movq %r15, %r9
callq 0x29494
addq (%rbx,%r12,8), %r13
movq %r14, %rbx
movl $0x1, %ecx
movl $0x1, %r8d
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
jmp 0x242fb
addq %r12, %rbp
movl $0x1, %edx
movq %rbx, %rdi
movq %rbp, %rsi
jmp 0x2430c
leaq 0x159c4(%rip), %r14     # 0x39bf0
movq (%r14,%r12,8), %rdx
movl $0x1, %r15d
movl %r12d, %ecx
shlq %cl, %r15
movl $0x2, %r13d
movl $0x2, %esi
movl $0x1, %r9d
movq %rbx, %rdi
movq %r15, %rcx
movq %r15, %r8
callq 0x29601
movq (%r14,%r12,8), %rdi
movl $0x2, %edx
movq %r12, %rsi
callq 0x2476e
movl %r12d, %ecx
shlq %cl, %r13
movq (%r14,%r12,8), %rdi
leaq (%rdi,%r13,8), %rdx
shlq $0x3, %r13
movl $0x2, %ecx
movl $0x2, %r8d
movq %r15, %rsi
movq %r15, %r9
callq 0x29494
addq (%r14,%r12,8), %r13
movl $0x2, %ecx
movl $0x1, %r8d
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r15, %r9
callq 0x29601
leaq 0x10(%rbx), %r13
movq (%r14,%r12,8), %rdx
movl $0x2, %esi
movl $0x1, %r9d
movq %r13, %rdi
movq %r15, %rcx
movq %r15, %r8
callq 0x29601
movq (%r14,%r12,8), %rdi
movl $0x1, %edx
movq %r12, %rsi
callq 0x24718
movq (%r14,%r12,8), %rdi
movl $0x2, %ecx
movl $0x1, %r8d
movq %r15, %rsi
movq %r13, %rdx
movq %r15, %r9
callq 0x29601
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2476e
movl $0x1, %r13d
movl %ebp, %ecx
shlq %cl, %r13
movl $0x1, %r15d
shrq %r13
leaq 0x158b6(%rip), %r14     # 0x39bf0
movq (%r14,%r12,8), %rdx
movl %r12d, %ecx
shlq %cl, %r15
movl $0x1, %r9d
movq %rbx, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r15, %r8
callq 0x29601
movq (%r14,%r12,8), %rdi
movq %rbp, 0x8(%rsp)
movl $0x2, %ebp
movl $0x2, %edx
movq %r12, %rsi
callq 0x2476e
movl %r12d, %ecx
shlq %cl, %rbp
movq (%r14,%r12,8), %rdi
leaq (%rdi,%rbp,8), %rdx
shlq $0x3, %rbp
movl $0x2, %ecx
movl $0x2, %r8d
movq %r15, %rsi
movq %r15, %r9
callq 0x29494
addq (%r14,%r12,8), %rbp
movl $0x1, %r8d
movq %rbp, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movq %r15, %r9
callq 0x29601
leaq 0x10(%rbx), %rbp
movq (%r14,%r12,8), %rdx
movl $0x3, %r9d
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r15, %r8
callq 0x29601
movq (%r14,%r12,8), %rdi
movl $0x3, %edx
movq %r12, %rsi
callq 0x24718
movq (%r14,%r12,8), %rdi
movl $0x3, %r8d
movq %r15, %rsi
movq %rbp, %rdx
movq 0x8(%rsp), %rbp
movq %r13, %rcx
movq %r15, %r9
callq 0x29601
cmpq $0x4, %rbp
jb 0x24303
movq %rbx, 0x10(%rsp)
leaq 0x40(%rbx), %rbp
movl $0x4, %ebx
movq (%r14,%r12,8), %rdx
movl $0x4, %r9d
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r15, %r8
callq 0x29601
movq (%r14,%r12,8), %rdi
movl $0x4, %edx
movq %r12, %rsi
callq 0x24718
movq (%r14,%r12,8), %rdi
movl $0x4, %r8d
movq %r15, %rsi
movq %rbp, %rdx
movq %r13, %rcx
movq %r15, %r9
callq 0x29601
addq $0x4, %rbx
addq $0x40, %rbp
cmpq %r13, %rbx
jb 0x24424
movq 0x8(%rsp), %rbp
movq 0x10(%rsp), %rbx
jmp 0x24303