// File: /workspace/github_c_makefile_star2_O1/YunyiQian[P]multitel3/fft.c
// Function: fftr
void	fftr(complex *x, int n, float dt) {
  int	i, j, n2;
  float	delw, w;
  complex t, g, h, isg;
  n2 = n/2;
  delw = PI/n;
  isg = IMAGE;
  if (dt>0.) {
     delw = -delw;
     isg = cngtv(isg);
     fft(x, n, dt);
  }
  x[0] = cmplx(x[0].x+x[0].y, x[0].x-x[0].y);
  for (i=1, w=delw; i<n2; i++, w+=delw) {
    j = n-i;
    t = conjg(x[j]);
    g = cplus(x[i], t);
    h = cplus(x[i], cngtv(t));
    h = cmltp(cmplx(cos(w), sin(w)), h);
    x[i] = dmltp(0.5, cplus(g, cmltp(isg,h)));
    x[j] = dmltp(0.5, cplus(conjg(g), cmltp(isg, conjg(h))));
  }
  x[n2] = conjg(x[n2]);
  if (dt<0.) {
    x[0] = dmltp(0.5, x[0]);
    fft(x, n, dt);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movss %xmm0, 0x4(%rsp)
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %ebp
shrl $0x1f, %ebp
addl %esi, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
movsd 0x4583(%rip), %xmm1     # 0x69f0
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
movaps %xmm0, 0x20(%rsp)
movss 0x455b(%rip), %xmm1     # 0x69e0
xorps %xmm0, %xmm0
callq 0x3954
movss 0x4(%rsp), %xmm1
ucomiss 0x3ba6(%rip), %xmm1     # 0x6040
jbe 0x24c9
movaps 0x20(%rsp), %xmm2
xorps 0x3b68(%rip), %xmm2     # 0x6010
movaps %xmm2, 0x20(%rsp)
callq 0x380c
movaps %xmm0, 0x40(%rsp)
movq %r14, %rdi
movl %ebx, %esi
movss 0x4(%rsp), %xmm0
callq 0x2224
jmp 0x24ce
movaps %xmm0, 0x40(%rsp)
sarl %ebp
movss (%r14), %xmm1
movss 0x4(%r14), %xmm2
movaps %xmm1, %xmm0
addss %xmm2, %xmm0
subss %xmm2, %xmm1
callq 0x3954
movlps %xmm0, (%r14)
cmpl $0x4, %ebx
jl 0x2643
movl %ebx, %eax
cmpl $0x3, %ebp
movl $0x2, %r15d
cmovgel %ebp, %r15d
leaq (%r14,%rax,8), %r12
addq $-0x8, %r12
movl $0x1, %r13d
movaps 0x20(%rsp), %xmm0
movss %xmm0, 0x8(%rsp)
movsd (%r12), %xmm0
callq 0x3862
movaps %xmm0, %xmm1
movaps %xmm0, 0x10(%rsp)
movsd (%r14,%r13,8), %xmm0
callq 0x37d8
movaps %xmm0, 0x30(%rsp)
movaps 0x10(%rsp), %xmm0
callq 0x380c
movaps %xmm0, %xmm1
movsd (%r14,%r13,8), %xmm0
callq 0x37d8
movaps %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtss2sd 0x8(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
callq 0x10e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0xc(%rsp)
movsd 0x50(%rsp), %xmm0
callq 0x11e0
xorps %xmm1, %xmm1
cvtsd2ss %xmm0, %xmm1
movss 0xc(%rsp), %xmm0
callq 0x3954
movaps 0x10(%rsp), %xmm1
callq 0x37dc
movaps %xmm0, %xmm1
movaps %xmm0, 0x10(%rsp)
movaps 0x40(%rsp), %xmm0
callq 0x37dc
movaps %xmm0, %xmm1
movaps 0x30(%rsp), %xmm0
callq 0x37d8
movaps %xmm0, %xmm1
movss 0x4419(%rip), %xmm0     # 0x69e8
callq 0x384c
movlps %xmm0, (%r14,%r13,8)
movaps 0x30(%rsp), %xmm0
callq 0x3862
movaps %xmm0, 0x30(%rsp)
movaps 0x10(%rsp), %xmm0
callq 0x3862
movaps %xmm0, %xmm1
movaps 0x40(%rsp), %xmm0
callq 0x37dc
movaps %xmm0, %xmm1
movaps 0x30(%rsp), %xmm0
callq 0x37d8
movaps %xmm0, %xmm1
movss 0x43d1(%rip), %xmm0     # 0x69e8
callq 0x384c
movlps %xmm0, (%r12)
incq %r13
movss 0x8(%rsp), %xmm0
addss 0x20(%rsp), %xmm0
movss %xmm0, 0x8(%rsp)
addq $-0x8, %r12
cmpq %r13, %r15
jne 0x2520
movslq %ebp, %r15
movsd (%r14,%r15,8), %xmm0
callq 0x3862
movlps %xmm0, (%r14,%r15,8)
xorps %xmm0, %xmm0
movss 0x4(%rsp), %xmm1
ucomiss %xmm1, %xmm0
jbe 0x2698
movsd (%r14), %xmm1
movss 0x4377(%rip), %xmm0     # 0x69e8
callq 0x384c
movlps %xmm0, (%r14)
movq %r14, %rdi
movl %ebx, %esi
movss 0x4(%rsp), %xmm0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2224
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq