// File: /workspace/github_cpp_makefile_star2_O1/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, %rbx
movq %rsi, %r15
movq %rdi, %rbp
testq %rsi, %rsi
setle %al
testq %rdx, %rdx
setle %cl
orb %al, %cl
jne 0x24481
cmpq $0x2, %rbx
movq %rbx, 0x10(%rsp)
movq %rbp, 0x8(%rsp)
je 0x24494
cmpq $0x1, %rbx
jne 0x2459a
leaq 0x157f4(%rip), %rbx     # 0x39bf0
movq (%rbx,%r15,8), %rdx
movl $0x1, %r12d
movl %r15d, %ecx
shlq %cl, %r12
movl $0x1, %esi
movl $0x1, %r9d
movq %rbp, %rdi
movq %r12, %rcx
movq %r12, %r8
callq 0x2a2c5
movq (%rbx,%r15,8), %rdi
movl $0x2, %r13d
movl $0x2, %edx
movq %r15, %rsi
callq 0x249d6
movl %r15d, %ecx
shlq %cl, %r13
movq (%rbx,%r15,8), %rdi
leaq (%rdi,%r13,8), %rdx
shlq $0x3, %r13
movl $0x2, %ecx
movl $0x2, %r8d
movq %r12, %rsi
movq %r12, %r9
callq 0x2a158
addq (%rbx,%r15,8), %r13
movl $0x1, %ecx
movl $0x1, %r8d
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
jmp 0x2456a
addq %r15, %rbx
movl $0x1, %edx
movq %rbp, %rdi
movq %rbx, %rsi
jmp 0x24587
leaq 0x15755(%rip), %r14     # 0x39bf0
movq (%r14,%r15,8), %rdx
movl $0x1, %r12d
movl %r15d, %ecx
shlq %cl, %r12
movl $0x2, %r13d
movl $0x2, %esi
movl $0x1, %r9d
movq %rbp, %rdi
movq %r12, %rcx
movq %r12, %r8
callq 0x2a2c5
movq (%r14,%r15,8), %rdi
movl $0x2, %edx
movq %r15, %rsi
callq 0x249d6
movl %r15d, %ecx
shlq %cl, %r13
movq (%r14,%r15,8), %rdi
leaq (%rdi,%r13,8), %rdx
shlq $0x3, %r13
movl $0x2, %ecx
movl $0x2, %r8d
movq %r12, %rsi
movq %r12, %r9
callq 0x2a158
addq (%r14,%r15,8), %r13
movl $0x2, %ecx
movl $0x1, %r8d
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r12, %r9
callq 0x2a2c5
leaq 0x10(%rbp), %r13
movq (%r14,%r15,8), %rdx
movl $0x2, %esi
movl $0x1, %r9d
movq %r13, %rdi
movq %r12, %rcx
movq %r12, %r8
callq 0x2a2c5
movq (%r14,%r15,8), %rdi
movl $0x1, %edx
movq %r15, %rsi
callq 0x24980
movq (%r14,%r15,8), %rdi
movl $0x2, %ecx
movl $0x1, %r8d
movq %r12, %rsi
movq %r13, %rdx
movq %r12, %r9
callq 0x2a2c5
movl $0x1, %edx
movl %r15d, %ecx
shlq %cl, %rdx
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x249d6
movl $0x1, %r12d
movl %ebx, %ecx
shlq %cl, %r12
movl $0x1, %r13d
shrq %r12
leaq 0x1563b(%rip), %r14     # 0x39bf0
movq (%r14,%r15,8), %rdx
movl %r15d, %ecx
shlq %cl, %r13
movl $0x1, %r9d
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rcx
movq %r13, %r8
callq 0x2a2c5
movq (%r14,%r15,8), %rdi
movl $0x2, %ebp
movl $0x2, %edx
movq %r15, %rsi
callq 0x249d6
movl %r15d, %ecx
shlq %cl, %rbp
movq (%r14,%r15,8), %rdi
leaq (%rdi,%rbp,8), %rdx
shlq $0x3, %rbp
movl $0x2, %ecx
movl $0x2, %r8d
movq %r13, %rsi
movq %r13, %r9
callq 0x2a158
addq (%r14,%r15,8), %rbp
movl $0x1, %r8d
movq %rbp, %rdi
movq %r13, %rsi
movq 0x8(%rsp), %rbp
movq %rbp, %rdx
movq %r12, %rcx
movq %r13, %r9
callq 0x2a2c5
addq $0x10, %rbp
movq (%r14,%r15,8), %rdx
movl $0x3, %r9d
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rcx
movq %r13, %r8
callq 0x2a2c5
movq (%r14,%r15,8), %rdi
movl $0x3, %edx
movq %r15, %rsi
callq 0x24980
movq (%r14,%r15,8), %rdi
movl $0x3, %r8d
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %r13, %r9
callq 0x2a2c5
cmpq $0x4, %rbx
jb 0x24572
movq 0x8(%rsp), %rax
leaq 0x40(%rax), %rbp
movl $0x4, %ebx
movq (%r14,%r15,8), %rdx
movl $0x4, %r9d
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rcx
movq %r13, %r8
callq 0x2a2c5
movq (%r14,%r15,8), %rdi
movl $0x4, %edx
movq %r15, %rsi
callq 0x24980
movq (%r14,%r15,8), %rdi
movl $0x4, %r8d
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %r13, %r9
callq 0x2a2c5
addq $0x4, %rbx
addq $0x40, %rbp
cmpq %r12, %rbx
jb 0x2469a
jmp 0x24572