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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jle 0x38811
cmpq $0x0, -0x18(%rbp)
jle 0x38811
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rcx
movl $0x1, %edx
shlq %cl, %rdx
callq 0x3a7b0
cmpq $0x2, -0x18(%rbp)
jle 0x38747
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
cmpq %rcx, %rax
jae 0x38742
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %esi
shlq %cl, %rsi
movq -0x10(%rbp), %rcx
leaq 0x24635(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rcx
movl $0x1, %r8d
shlq %cl, %r8
movq -0x30(%rbp), %rcx
movl $0x4, %r9d
callq 0x48240
movq -0x10(%rbp), %rcx
leaq 0x245fa(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x3a7b0
movq -0x10(%rbp), %rcx
leaq 0x245dd(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %esi
shlq %cl, %rsi
movq -0x8(%rbp), %rdx
movq -0x20(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rcx
movl $0x1, %r9d
shlq %cl, %r9
movq -0x28(%rbp), %rcx
movl $0x4, %r8d
callq 0x48240
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
jmp 0x38646
jmp 0x3880f
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %esi
shlq %cl, %rsi
movq -0x10(%rbp), %rcx
leaq 0x2455e(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rcx
movl $0x1, %r8d
shlq %cl, %r8
movq -0x18(%rbp), %rcx
movl $0x1, %r9d
shlq %cl, %r9
movq -0x40(%rbp), %rcx
callq 0x48240
movq -0x10(%rbp), %rcx
leaq 0x2451c(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
shlq %cl, %rdx
callq 0x3a7b0
movq -0x10(%rbp), %rcx
leaq 0x244f8(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rcx
movl $0x1, %esi
shlq %cl, %rsi
movq -0x8(%rbp), %rdx
movq -0x18(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rcx
movl $0x1, %r8d
shlq %cl, %r8
movq -0x10(%rbp), %rcx
movl $0x1, %r9d
shlq %cl, %r9
movq -0x38(%rbp), %rcx
callq 0x48240
jmp 0x38827
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq -0x18(%rbp), %rsi
movl $0x1, %edx
callq 0x3a7b0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)