// File: /workspace/github_c_makefile_star2_O3/xbarin02[P]uFFT/fft-dit.c
// Function: fft
int fft(float complex *vector, size_t N)
{
	if (!N) return 0;

	if (N & (N - 1)) return 1;

	float complex *buffers[2] = { vector, malloc(N*sizeof(float complex)) };

	if (!buffers[1]) return -1;

	int b = 0;

	b = nop_reverse(b, buffers, N);
	b = fft_reverse(b, buffers, N);
	b = nop_reverse(b, buffers, N);

	memmove(vector, buffers[b&1], N*sizeof(float complex));

	free(buffers[1]);

	return 0;
}

// Assembly:
testq %rsi, %rsi
je 0x18bd
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r14
leaq -0x1(%rsi), %rcx
movl $0x1, %eax
testq %rcx, %rsi
jne 0x18c5
movq %rdi, %rbx
movq %rdi, 0x20(%rsp)
leaq (,%r14,8), %r15
movq %r15, %rdi
callq 0x1070
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x18c0
movq %rax, 0x80(%rsp)
movq %r15, 0x88(%rsp)
movq %rbx, 0x90(%rsp)
leaq 0x20(%rsp), %rsi
xorl %edi, %edi
movq %r14, %rdx
callq 0x18d7
movl %eax, %edi
cmpq $0x1, %r14
je 0x1882
movq %r14, %rax
shrq %rax
bsrq %rax, %rax
xorq $-0x40, %rax
addq $0x41, %rax
movq %rax, 0x98(%rsp)
movl $0x1, %edx
xorl %ecx, %ecx
movapd 0x1caf(%rip), %xmm7     # 0x3060
pcmpeqd %xmm8, %xmm8
movdqa 0x1c61(%rip), %xmm9     # 0x3020
movq %r14, 0xb0(%rsp)
movq %r14, %rsi
shrq %cl, %rsi
movl $0x2, %eax
shll %cl, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, 0x1c(%rsp)
movq %rdx, 0xa0(%rsp)
andq $-0x2, %rdx
movq %rdx, 0xa8(%rsp)
movl %edi, 0x18(%rsp)
movl %edi, %eax
andl $0x1, %eax
movq 0x20(%rsp,%rax,8), %rdx
xorl $0x1, %eax
movq %rsi, %r15
shrq %r15
movq 0x20(%rsp,%rax,8), %rbx
leaq -0x1(%rcx), %rax
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm1     # xmm1 = xmm0[0,1,0,1]
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm10    # xmm10 = xmm0[0,1,0,1]
leaq (%rbx,%r15,8), %r12
leaq (,%rsi,8), %rax
movq %rax, 0xb8(%rsp)
addq $0xc, %rdx
movq %rdx, 0x38(%rsp)
pxor 0x1c21(%rip), %xmm1     # 0x3070
movdqa %xmm1, 0xd0(%rsp)
xorl %r13d, %r13d
movq %rcx, 0xc8(%rsp)
movq %rsi, 0xc0(%rsp)
movdqa %xmm10, 0x40(%rsp)
testq %rcx, %rcx
je 0x156c
movq %r13, %rax
xorl %edx, %edx
divq %rsi
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm3     # xmm3 = xmm0[0,1,0,1]
pxor %xmm1, %xmm1
movq 0xa8(%rsp), %rax
movdqa 0x1b6f(%rip), %xmm4     # 0x3010
movdqa %xmm1, %xmm0
movdqa %xmm4, %xmm2
movdqa %xmm3, %xmm5
psrlq %xmm4, %xmm5
pshufd $0xee, %xmm4, %xmm6     # xmm6 = xmm4[2,3,2,3]
movdqa %xmm3, %xmm1
psrlq %xmm6, %xmm1
movsd %xmm5, %xmm1            # xmm1 = xmm5[0],xmm1[1]
andpd %xmm7, %xmm1
movdqa %xmm4, %xmm5
pxor %xmm8, %xmm5
psllq $0x20, %xmm5
pshufd $0xed, %xmm5, %xmm5     # xmm5 = xmm5[1,3,2,3]
movdqa %xmm5, %xmm6
psrad $0x1f, %xmm6
punpckldq %xmm6, %xmm5    # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1]
paddq %xmm10, %xmm5
movapd %xmm1, %xmm6
psllq %xmm5, %xmm6
pshufd $0xee, %xmm5, %xmm5     # xmm5 = xmm5[2,3,2,3]
psllq %xmm5, %xmm1
movsd %xmm6, %xmm1            # xmm1 = xmm6[0],xmm1[1]
orpd %xmm0, %xmm1
paddq %xmm9, %xmm4
addq $-0x2, %rax
jne 0x14a1
pxor 0x1b59(%rip), %xmm2     # 0x3070
movdqa %xmm2, %xmm3
movdqa 0xd0(%rsp), %xmm5
pcmpgtd %xmm5, %xmm3
pshufd $0xa0, %xmm3, %xmm4     # xmm4 = xmm3[0,0,2,2]
pcmpeqd %xmm5, %xmm2
pshufd $0xf5, %xmm2, %xmm2     # xmm2 = xmm2[1,1,3,3]
pand %xmm4, %xmm2
pshufd $0xf5, %xmm3, %xmm3     # xmm3 = xmm3[1,1,3,3]
por %xmm2, %xmm3
pand %xmm3, %xmm0
pandn %xmm1, %xmm3
por %xmm0, %xmm3
pshufd $0xee, %xmm3, %xmm0     # xmm0 = xmm3[2,3,2,3]
por %xmm3, %xmm0
movq %xmm0, %rax
testq %rax, %rax
js 0x1572
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
jmp 0x158a
pxor %xmm0, %xmm0
jmp 0x158a
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
cmpq $0x2, %rsi
jae 0x15cc
movq 0xc0(%rsp), %rsi
addq %rsi, %r13
movq 0xb8(%rsp), %rax
addq %rax, %r12
addq %rax, %rbx
addq %rax, 0x38(%rsp)
movq 0xb0(%rsp), %r14
cmpq %r14, %r13
movq 0xc8(%rsp), %rcx
jb 0x1472
jmp 0x1860
divss 0x1c(%rsp), %xmm0
movaps %xmm0, %xmm1
mulss 0x1aa3(%rip), %xmm1     # 0x3080
movss %xmm1, 0x14(%rsp)
addss 0x1a9d(%rip), %xmm1     # 0x3088
movss %xmm1, 0xc(%rsp)
movss %xmm0, 0x10(%rsp)
mulss 0x1a85(%rip), %xmm0     # 0x3084
movss %xmm0, 0x8(%rsp)
movq 0x38(%rsp), %rbp
xorl %r14d, %r14d
movss 0x14(%rsp), %xmm0
ucomiss %xmm0, %xmm0
movsd -0xc(%rbp), %xmm0
movaps %xmm0, 0x70(%rsp)
movss -0x4(%rbp), %xmm0
movaps %xmm0, 0x60(%rsp)
movss (%rbp), %xmm0
movaps %xmm0, 0x50(%rsp)
movss 0xc(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
jp 0x1765
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
callq 0x1060
movaps %xmm0, %xmm2
movaps 0x60(%rsp), %xmm4
movaps %xmm4, %xmm0
shufps $0x0, %xmm4, %xmm0      # xmm0 = xmm0[0,0],xmm4[0,0]
mulps %xmm2, %xmm0
movaps 0x50(%rsp), %xmm1
movaps %xmm1, %xmm3
shufps $0x0, %xmm1, %xmm3      # xmm3 = xmm3[0,0],xmm1[0,0]
movaps %xmm2, %xmm5
shufps $0xe1, %xmm2, %xmm5     # xmm5 = xmm5[1,0],xmm2[2,3]
mulps %xmm3, %xmm5
movaps %xmm0, %xmm3
subps %xmm5, %xmm3
addps %xmm0, %xmm5
movaps %xmm5, %xmm0
shufps $0x1, %xmm3, %xmm0      # xmm0 = xmm0[1,0],xmm3[0,0]
shufps $0xe2, %xmm3, %xmm0     # xmm0 = xmm0[2,0],xmm3[2,3]
ucomiss %xmm3, %xmm3
jp 0x17a5
movaps 0x70(%rsp), %xmm1
addps %xmm0, %xmm1
movss 0x14(%rsp), %xmm0
ucomiss %xmm0, %xmm0
movlps %xmm1, (%rbx,%r14,8)
movsd -0xc(%rbp), %xmm0
movaps %xmm0, 0x70(%rsp)
movss -0x4(%rbp), %xmm0
movaps %xmm0, 0x60(%rsp)
movss (%rbp), %xmm0
movaps %xmm0, 0x50(%rsp)
movss 0xc(%rsp), %xmm0
movss 0x8(%rsp), %xmm1
jp 0x17c6
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
callq 0x1060
movaps %xmm0, %xmm2
movaps 0x60(%rsp), %xmm4
movaps %xmm4, %xmm0
shufps $0x0, %xmm4, %xmm0      # xmm0 = xmm0[0,0],xmm4[0,0]
mulps %xmm2, %xmm0
movaps 0x50(%rsp), %xmm1
movaps %xmm1, %xmm3
shufps $0x0, %xmm1, %xmm3      # xmm3 = xmm3[0,0],xmm1[0,0]
movaps %xmm2, %xmm5
shufps $0xe1, %xmm2, %xmm5     # xmm5 = xmm5[1,0],xmm2[2,3]
mulps %xmm3, %xmm5
movaps %xmm0, %xmm3
subps %xmm5, %xmm3
addps %xmm0, %xmm5
movaps %xmm5, %xmm0
shufps $0x1, %xmm3, %xmm0      # xmm0 = xmm0[1,0],xmm3[0,0]
shufps $0xe2, %xmm3, %xmm0     # xmm0 = xmm0[2,0],xmm3[2,3]
ucomiss %xmm3, %xmm3
jp 0x1805
movapd 0x1932(%rip), %xmm7     # 0x3060
pcmpeqd %xmm8, %xmm8
movdqa 0x18e4(%rip), %xmm9     # 0x3020
movdqa 0x40(%rsp), %xmm10
movaps 0x70(%rsp), %xmm1
subps %xmm0, %xmm1
movlps %xmm1, (%r12,%r14,8)
incq %r14
addq $0x10, %rbp
cmpq %r14, %r15
jne 0x160d
jmp 0x1590
movss 0x8(%rsp), %xmm1
ucomiss %xmm1, %xmm1
movss 0xc(%rsp), %xmm0
jnp 0x1646
pxor %xmm3, %xmm3
movss 0x18fa(%rip), %xmm0     # 0x3080
movss 0x18f6(%rip), %xmm1     # 0x3084
movd 0x10(%rsp), %xmm2
callq 0x2060
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
jmp 0x1646
shufps $0x55, %xmm5, %xmm5     # xmm5 = xmm5[1,1,1,1]
ucomiss %xmm5, %xmm5
jnp 0x1693
movaps %xmm2, %xmm3
shufps $0x55, %xmm2, %xmm3     # xmm3 = xmm3[1,1],xmm2[1,1]
movaps %xmm4, %xmm0
callq 0x2060
jmp 0x1693
movss 0x8(%rsp), %xmm1
ucomiss %xmm1, %xmm1
movss 0xc(%rsp), %xmm0
jnp 0x16d9
xorps %xmm3, %xmm3
movss 0x189a(%rip), %xmm0     # 0x3080
movss 0x1896(%rip), %xmm1     # 0x3084
movss 0x10(%rsp), %xmm2
callq 0x2060
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
jmp 0x16d9
shufps $0x55, %xmm5, %xmm5     # xmm5 = xmm5[1,1,1,1]
ucomiss %xmm5, %xmm5
movapd 0x184c(%rip), %xmm7     # 0x3060
pcmpeqd %xmm8, %xmm8
movdqa 0x17fe(%rip), %xmm9     # 0x3020
movdqa 0x40(%rsp), %xmm10
jnp 0x1743
movaps %xmm2, %xmm3
shufps $0x55, %xmm2, %xmm3     # xmm3 = xmm3[1,1],xmm2[1,1]
movaps %xmm4, %xmm0
callq 0x2060
movdqa 0x40(%rsp), %xmm10
movdqa 0x17d2(%rip), %xmm9     # 0x3020
pcmpeqd %xmm8, %xmm8
movapd 0x1805(%rip), %xmm7     # 0x3060
jmp 0x1743
incq %rcx
movl 0x18(%rsp), %edi
incl %edi
movq 0xa0(%rsp), %rdx
incq %rdx
cmpq 0x98(%rsp), %rcx
jne 0x13c7
leaq 0x20(%rsp), %rsi
movq %r14, %rdx
callq 0x18d7
andl $0x1, %eax
movq 0x20(%rsp,%rax,8), %rsi
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rdx
callq 0x1080
movq 0x80(%rsp), %rdi
callq 0x1030
xorl %eax, %eax
jmp 0x18c5
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq