// File: /workspace/github_c_makefile_star2_O0/YunyiQian[P]multitel3/fft.c
// Function: fft
void	fft(complex *a, int n, float dt) {
  int i, j, k, step, m;
  complex u, w, t;
  double pi;
  pi = -PI;
  if (dt<0.) pi = PI;
  for (m=n/2,j=0,i=1; i<n-1; i++) {
    for (k=m; k<=j; k/=2) j -= k;
    j += k;
    if(i<j) {
      t = a[i];
      a[i] = a[j];
      a[j] = t;
    }
  }
  for (m=1,step=2; m<n; m=step, step*=2) {
    for (u=One,w=cmplx(cos(pi/m),sin(pi/m)),j=0; j<m; j++) {
      for (i=j; i<n; i+=step) {
	k = i+m;
	t = cmltp(a[k], u);
	a[k] = cplus(a[i], cngtv(t));
	a[i] = cplus(a[i], t);
      }
      u = cmltp(u, w);
    }
  }
  if (dt<0.) dt=-1./(n*dt);
  for (i=0; i<n; i++) a[i] = dmltp(dt, a[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movss %xmm0, -0x10(%rbp)
movsd 0x6599(%rip), %xmm0     # 0x89a8
movsd %xmm0, -0x48(%rbp)
movss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x2433
movsd 0x6582(%rip), %xmm0     # 0x89b0
movsd %xmm0, -0x48(%rbp)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x24e2
movl -0x24(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jg 0x2489
movl -0x1c(%rbp), %ecx
movl -0x18(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
jmp 0x2466
movl -0x1c(%rbp), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x24d2
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq -0x8(%rbp), %rdx
movslq -0x18(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq -0x40(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
jmp 0x24d4
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x244f
movl $0x1, -0x24(%rbp)
movl $0x2, -0x20(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x26b8
movss 0x64d4(%rip), %xmm0     # 0x89d8
xorps %xmm1, %xmm1
callq 0x48c0
movlpd %xmm0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movsd -0x48(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x10d0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x8c(%rbp)
movsd -0x48(%rbp), %xmm0
cvtsi2sdl -0x24(%rbp), %xmm1
divsd %xmm1, %xmm0
callq 0x1190
movaps %xmm0, %xmm1
movss -0x8c(%rbp), %xmm0
cvtsd2ss %xmm1, %xmm1
callq 0x48c0
movlpd %xmm0, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x26a3
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2679
movl -0x14(%rbp), %eax
movl -0x24(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd -0x30(%rbp), %xmm1
callq 0x4640
movlpd %xmm0, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0xb0(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0xb8(%rbp)
movsd -0x40(%rbp), %xmm0
callq 0x46a0
movq -0xb8(%rbp), %rcx
movq -0xa8(%rbp), %rax
movlpd %xmm0, -0x70(%rbp)
movsd (%rax,%rcx,8), %xmm0
movsd -0x70(%rbp), %xmm1
callq 0x45f0
movq -0xb0(%rbp), %rcx
movq -0xa8(%rbp), %rax
movlpd %xmm0, -0x68(%rbp)
movq -0x68(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
movslq -0x14(%rbp), %rcx
movq %rcx, %rdx
movq %rdx, -0xa0(%rbp)
movsd (%rax,%rcx,8), %xmm0
movsd -0x40(%rbp), %xmm1
callq 0x45f0
movq -0xa0(%rbp), %rcx
movq -0x98(%rbp), %rax
movlpd %xmm0, -0x78(%rbp)
movq -0x78(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x20(%rbp), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x2585
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
callq 0x4640
movlpd %xmm0, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2573
jmp 0x26a5
movl -0x20(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %eax
shll %eax
movl %eax, -0x20(%rbp)
jmp 0x24f0
movss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x26ed
cvtsi2ssl -0xc(%rbp), %xmm0
mulss -0x10(%rbp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x62d8(%rip), %xmm0     # 0x89b8
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x2750
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movslq -0x14(%rbp), %rcx
movq %rcx, %rdx
movq %rdx, -0xc8(%rbp)
movss -0x10(%rbp), %xmm0
movsd (%rax,%rcx,8), %xmm1
callq 0x4750
movq -0xc8(%rbp), %rcx
movq -0xc0(%rbp), %rax
movlpd %xmm0, -0x88(%rbp)
movq -0x88(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x26f4
addq $0xd0, %rsp
popq %rbp
retq
nopl (%rax)