void fft(x_real, x_imag, energy, phi, N) float x_real[1024], x_imag[1024],
    energy[1024], phi[1024];
int N;
{
  int M, MM1;
  static int init = 0;
  int NV2, NM1, MP;
  static double w_real[2][10], w_imag[2][10];
  int i, j, k, L;
  int ip, le, le1;
  double t_real, t_imag, u_real, u_imag;
  if (init == 0) {
    memset((char *)w_real, 0, sizeof(w_real));
    memset((char *)w_imag, 0, sizeof(w_imag));
    M = 10;
    for (L = 0; L < M; L++) {
      le = 1 << (M - L);
      le1 = le >> 1;
      w_real[0][L] = cos(3.14159265358979 / le1);
      w_imag[0][L] = -sin(3.14159265358979 / le1);
    }
    M = 8;
    for (L = 0; L < M; L++) {
      le = 1 << (M - L);
      le1 = le >> 1;
      w_real[1][L] = cos(3.14159265358979 / le1);
      w_imag[1][L] = -sin(3.14159265358979 / le1);
    }
    init++;
  }
  switch (N) {
  case 1024:
    M = 10;
    MP = 0;
    break;
  case 256:
    M = 8;
    MP = 1;
    break;
  default:
    printf("Error: Bad FFT Size in subs.c\n");
    exit(-1);
  }
  MM1 = M - 1;
  NV2 = N >> 1;
  NM1 = N - 1;
  for (L = 0; L < MM1; L++) {
    le = 1 << (M - L);
    le1 = le >> 1;
    u_real = 1;
    u_imag = 0;
    for (j = 0; j < le1; j++) {
      for (i = j; i < N; i += le) {
        ip = i + le1;
        t_real = x_real[i] + x_real[ip];
        t_imag = x_imag[i] + x_imag[ip];
        x_real[ip] = x_real[i] - x_real[ip];
        x_imag[ip] = x_imag[i] - x_imag[ip];
        x_real[i] = t_real;
        x_imag[i] = t_imag;
        t_real = x_real[ip];
        x_real[ip] = x_real[ip] * u_real - x_imag[ip] * u_imag;
        x_imag[ip] = x_imag[ip] * u_real + t_real * u_imag;
      }
      t_real = u_real;
      u_real = u_real * w_real[MP][L] - u_imag * w_imag[MP][L];
      u_imag = u_imag * w_real[MP][L] + t_real * w_imag[MP][L];
    }
  }
  for (i = 0; i < N; i += 2) {
    ip = i + 1;
    t_real = x_real[i] + x_real[ip];
    t_imag = x_imag[i] + x_imag[ip];
    x_real[ip] = x_real[i] - x_real[ip];
    x_imag[ip] = x_imag[i] - x_imag[ip];
    x_real[i] = t_real;
    x_imag[i] = t_imag;
    energy[i] = x_real[i] * x_real[i] + x_imag[i] * x_imag[i];
    if (energy[i] <= 0.0005) {
      phi[i] = 0;
      energy[i] = 0.0005;
    } else
      phi[i] = atan2((double)x_imag[i], (double)x_real[i]);
    energy[ip] = x_real[ip] * x_real[ip] + x_imag[ip] * x_imag[ip];
    if (energy[ip] == 0)
      phi[ip] = 0;
    else
      phi[ip] = atan2((double)x_imag[ip], (double)x_real[ip]);
  }
  j = 0;
  for (i = 0; i < NM1; i++) {
    if (i < j) {
      t_real = x_real[j];
      t_imag = x_imag[j];
      x_real[j] = x_real[i];
      x_imag[j] = x_imag[i];
      x_real[i] = t_real;
      x_imag[i] = t_imag;
      t_real = energy[j];
      energy[j] = energy[i];
      energy[i] = t_real;
      t_real = phi[j];
      phi[j] = phi[i];
      phi[i] = t_real;
    }
    k = NV2;
    while (k <= j) {
      j = j - k;
      k = k >> 1;
    }
    j = j + k;
  }
}


x86 assembly (clang, -O0):
<fft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
cmpl   $0x0,0x2eda(%rip)
jne    130b <fft+0x1ab>
lea    0x2edd(%rip),%rdi
xor    %esi,%esi
mov    $0xa0,%edx
call   1050 <memset@plt>
lea    0x2f6a(%rip),%rdi
xor    %esi,%esi
mov    $0xa0,%edx
call   1050 <memset@plt>
movl   $0xa,-0x28(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1256 <fft+0xf6>
mov    -0x28(%rbp),%ecx
sub    -0x48(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x54(%rbp)
cvtsi2sdl -0x54(%rbp),%xmm1
movsd  0xe1e(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1070 <cos@plt>
movslq -0x48(%rbp),%rcx
lea    0x2e6a(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
cvtsi2sdl -0x54(%rbp),%xmm1
movsd  0xdf8(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movslq -0x48(%rbp),%rcx
lea    0x2ecd(%rip),%rax
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11c0 <fft+0x60>
movl   $0x8,-0x28(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    12fc <fft+0x19c>
mov    -0x28(%rbp),%ecx
sub    -0x48(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x54(%rbp)
cvtsi2sdl -0x54(%rbp),%xmm1
movsd  0xd7a(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1070 <cos@plt>
movslq -0x48(%rbp),%rcx
lea    0x2dc6(%rip),%rax
movsd  %xmm0,0x50(%rax,%rcx,8)
cvtsi2sdl -0x54(%rbp),%xmm1
movsd  0xd53(%rip),%xmm0
divsd  %xmm1,%xmm0
call   1060 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movslq -0x48(%rbp),%rcx
lea    0x2e28(%rip),%rax
movsd  %xmm0,0x50(%rax,%rcx,8)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1264 <fft+0x104>
mov    0x2d5e(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2d55(%rip)
mov    -0x24(%rbp),%eax
mov    %eax,-0x7c(%rbp)
sub    $0x100,%eax
je     1347 <fft+0x1e7>
jmp    1321 <fft+0x1c1>
mov    -0x7c(%rbp),%eax
sub    $0x400,%eax
jne    135a <fft+0x1fa>
jmp    1334 <fft+0x1d4>
movl   $0xa,-0x28(%rbp)
movl   $0x0,-0x38(%rbp)
jmp    1372 <fft+0x212>
movl   $0x8,-0x28(%rbp)
movl   $0x1,-0x38(%rbp)
jmp    1372 <fft+0x212>
lea    0xcbb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x28(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x24(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1651 <fft+0x4f1>
mov    -0x28(%rbp),%ecx
sub    -0x48(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x54(%rbp)
movsd  0xc47(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x54(%rbp),%eax
jge    163e <fft+0x4de>
mov    -0x40(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1575 <fft+0x415>
mov    -0x3c(%rbp),%eax
add    -0x54(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movsd  -0x60(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movsd  -0x68(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  -0x70(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x50(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
jmp    13e7 <fft+0x287>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x70(%rbp),%xmm0
movslq -0x38(%rbp),%rcx
lea    0x2ae1(%rip),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x78(%rbp),%xmm1
movslq -0x38(%rbp),%rcx
lea    0x2b61(%rip),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x78(%rbp),%xmm0
movslq -0x38(%rbp),%rcx
lea    0x2a7d(%rip),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x60(%rbp),%xmm1
movslq -0x38(%rbp),%rcx
lea    0x2afd(%rip),%rax
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    13d5 <fft+0x275>
jmp    1643 <fft+0x4e3>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1394 <fft+0x234>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    18c3 <fft+0x763>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
addss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
subss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movsd  -0x60(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movsd  -0x68(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0x871(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     17c3 <fft+0x663>
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  0x85f(%rip),%xmm0
movss  %xmm0,(%rax,%rcx,4)
jmp    17fb <fft+0x69b>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <atan2@plt>
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1878 <fft+0x718>
jp     1878 <fft+0x718>
mov    -0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
jmp    18b0 <fft+0x750>
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm1
call   1030 <atan2@plt>
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    18b5 <fft+0x755>
mov    -0x3c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x3c(%rbp)
jmp    1658 <fft+0x4f8>
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1a41 <fft+0x8e1>
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    1a01 <fft+0x8a1>
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movsd  -0x60(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movsd  -0x68(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movsd  -0x60(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x40(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movsd  -0x60(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x30(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x40(%rbp),%eax
jg     1a2a <fft+0x8ca>
mov    -0x40(%rbp),%eax
sub    -0x44(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x44(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1a07 <fft+0x8a7>
mov    -0x40(%rbp),%eax
add    -0x44(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    18d1 <fft+0x771>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fft>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r8d,%r15d
mov    %rsi,%r14
cmpb   $0x0,0x2f05(%rip)
jne    123f <fft+0x10f>
xorps  %xmm0,%xmm0
movaps %xmm0,0x2f95(%rip)
movaps %xmm0,0x302e(%rip)
movaps 0xe97(%rip),%xmm0
movaps %xmm0,0x2ef0(%rip)
movaps 0xe99(%rip),%xmm0
movaps %xmm0,0x2f82(%rip)
movaps 0xe9b(%rip),%xmm0
movaps %xmm0,0x2ee4(%rip)
movapd 0xe9c(%rip),%xmm1
movapd %xmm1,0x2f74(%rip)
movapd 0xe9c(%rip),%xmm2
movapd %xmm2,0x2ed4(%rip)
movapd 0xe9c(%rip),%xmm3
movapd %xmm3,0x2f64(%rip)
movapd 0xe9c(%rip),%xmm4
movapd %xmm4,0x2ec4(%rip)
movapd 0xe9c(%rip),%xmm5
movapd %xmm5,0x2f54(%rip)
movapd 0xe9c(%rip),%xmm6
movapd %xmm6,0x2eb4(%rip)
movaps 0xe9d(%rip),%xmm7
movaps %xmm7,0x2f46(%rip)
movaps %xmm0,0x2eaf(%rip)
movapd %xmm1,0x2f47(%rip)
movapd %xmm2,0x2eaf(%rip)
movapd %xmm3,0x2f47(%rip)
movapd %xmm4,0x2eaf(%rip)
movapd %xmm5,0x2f47(%rip)
movapd %xmm6,0x2eaf(%rip)
movaps %xmm7,0x2f48(%rip)
movb   $0x1,0x2e11(%rip)
cmp    $0x400,%r15d
mov    %rdx,0x10(%rsp)
mov    %rdi,0x8(%rsp)
mov    %rcx,0x18(%rsp)
je     1270 <fft+0x140>
cmp    $0x100,%r15d
jne    1638 <fft+0x508>
mov    $0x1,%eax
mov    $0x8,%ecx
jmp    1277 <fft+0x147>
mov    $0xa,%ecx
xor    %eax,%eax
lea    -0x1(%rcx),%edx
mov    %rdx,0x30(%rsp)
mov    %r15d,%ebp
xor    %esi,%esi
shl    $0x4,%rax
lea    (%rax,%rax,4),%rax
lea    0x2dcd(%rip),%rdx
add    %rax,%rdx
mov    %rdx,0x28(%rsp)
lea    0x2e5e(%rip),%rdx
add    %rax,%rdx
mov    %rdx,0x20(%rsp)
xorpd  %xmm8,%xmm8
movhpd 0xdf8(%rip),%xmm8
movapd 0xddf(%rip),%xmm9
jmp    12e2 <fft+0x1b2>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rsi
cmp    0x30(%rsp),%rsi
mov    %r11,%rcx
je     1434 <fft+0x304>
mov    %rcx,%r11
sub    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cmp    $0x2,%eax
jl     12d0 <fft+0x1a0>
mov    %eax,%ecx
sar    %eax
movslq %eax,%rdi
cmp    $0x2,%edi
mov    $0x1,%eax
cmovge %edi,%eax
mov    0x28(%rsp),%rdx
movsd  (%rdx,%rsi,8),%xmm10
unpcklpd %xmm10,%xmm10
mov    0x20(%rsp),%rdx
movsd  (%rdx,%rsi,8),%xmm3
unpcklpd %xmm3,%xmm3
lea    0x0(,%rcx,4),%rdx
mov    %r14,%r12
mov    0x8(%rsp),%r9
xor    %r10d,%r10d
movapd %xmm8,%xmm4
jmp    136b <fft+0x23b>
nopl   (%rax)
movapd %xmm4,%xmm0
shufpd $0x1,%xmm5,%xmm0
mulpd  %xmm3,%xmm0
mulpd  %xmm10,%xmm4
addpd  %xmm0,%xmm4
add    $0x1,%r10
add    $0x4,%r9
add    $0x4,%r12
cmp    %rax,%r10
je     12d0 <fft+0x1a0>
movapd %xmm4,%xmm5
xorpd  %xmm9,%xmm5
cmp    %r15d,%r10d
jge    1340 <fft+0x210>
movapd %xmm4,%xmm6
unpckhpd %xmm4,%xmm6
mov    %r12,%rbx
mov    %r9,%r13
mov    %r10,%r8
nopw   0x0(%rax,%rax,1)
movss  0x0(%r13),%xmm7
movss  0x0(%r13,%rdi,4),%xmm0
movaps %xmm7,%xmm1
addss  %xmm0,%xmm1
movss  (%rbx),%xmm2
addss  (%rbx,%rdi,4),%xmm2
subss  %xmm0,%xmm7
movss  %xmm7,0x0(%r13,%rdi,4)
movss  (%rbx),%xmm0
subss  (%rbx,%rdi,4),%xmm0
movss  %xmm0,(%rbx,%rdi,4)
movss  %xmm1,0x0(%r13)
movss  %xmm2,(%rbx)
movss  0x0(%r13,%rdi,4),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rbx,%rdi,4),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm5,%xmm1
movapd %xmm4,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm6,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x0(%r13,%rdi,4)
movss  (%rbx,%rdi,4),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm6,%xmm0
addsd  %xmm2,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rbx,%rdi,4)
add    %rcx,%r8
add    %rdx,%r13
add    %rdx,%rbx
cmp    %rbp,%r8
jl     1390 <fft+0x260>
jmp    1340 <fft+0x210>
test   %r15d,%r15d
mov    0x18(%rsp),%r13
mov    0x10(%rsp),%r8
mov    0x8(%rsp),%rax
jle    1629 <fft+0x4f9>
lea    -0x1(%r15),%r12d
xor    %ebx,%ebx
jmp    1474 <fft+0x344>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  %xmm0,0x4(%r13,%rbx,4)
add    $0x2,%rbx
cmp    %rbp,%rbx
jae    158c <fft+0x45c>
movss  (%rax,%rbx,4),%xmm0
movss  0x4(%rax,%rbx,4),%xmm1
movaps %xmm0,%xmm2
movss  (%r14,%rbx,4),%xmm3
addss  0x4(%r14,%rbx,4),%xmm3
subss  %xmm1,%xmm0
movss  %xmm0,0x4(%rax,%rbx,4)
movss  (%r14,%rbx,4),%xmm0
subss  0x4(%r14,%rbx,4),%xmm0
addss  %xmm1,%xmm2
movss  %xmm0,0x4(%r14,%rbx,4)
movss  %xmm2,(%rax,%rbx,4)
movss  %xmm3,(%r14,%rbx,4)
movss  (%rax,%rbx,4),%xmm0
mulss  %xmm3,%xmm3
mulss  %xmm0,%xmm0
addss  %xmm3,%xmm0
movss  %xmm0,(%r8,%rbx,4)
cvtss2sd %xmm0,%xmm0
movsd  0xbd9(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1520 <fft+0x3f0>
movss  (%r14,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rax,%rbx,4),%xmm1
cvtss2sd %xmm1,%xmm1
call   1040 <atan2@plt>
mov    0x8(%rsp),%rax
mov    0x10(%rsp),%r8
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x0(%r13,%rbx,4)
jmp    1531 <fft+0x401>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movl   $0x0,0x0(%r13,%rbx,4)
movl   $0x3a03126f,(%r8,%rbx,4)
3a
movss  0x4(%rax,%rbx,4),%xmm1
movss  0x4(%r14,%rbx,4),%xmm0
mulss  %xmm0,%xmm0
mulss  %xmm1,%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,0x4(%r8,%rbx,4)
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm1
jne    155f <fft+0x42f>
jnp    1460 <fft+0x330>
movss  0x4(%r14,%rbx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x4(%rax,%rbx,4),%xmm1
cvtss2sd %xmm1,%xmm1
call   1040 <atan2@plt>
mov    0x8(%rsp),%rax
mov    0x10(%rsp),%r8
cvtsd2ss %xmm0,%xmm0
jmp    1460 <fft+0x330>
cmp    $0x2,%r15d
jl     1629 <fft+0x4f9>
mov    %r12d,%ebp
xor    %ecx,%ecx
xor    %edx,%edx
nopl   (%rax)
movslq %edx,%rsi
cmp    %rsi,%rcx
jge    1608 <fft+0x4d8>
movss  (%rax,%rsi,4),%xmm0
movss  (%r14,%rsi,4),%xmm1
movss  (%rax,%rcx,4),%xmm2
movss  %xmm2,(%rax,%rsi,4)
movss  (%r14,%rcx,4),%xmm2
movss  %xmm2,(%r14,%rsi,4)
movss  %xmm0,(%rax,%rcx,4)
movss  %xmm1,(%r14,%rcx,4)
movss  (%r8,%rsi,4),%xmm0
movss  (%r8,%rcx,4),%xmm1
movss  %xmm1,(%r8,%rsi,4)
movss  %xmm0,(%r8,%rcx,4)
movss  0x0(%r13,%rsi,4),%xmm0
movss  0x0(%r13,%rcx,4),%xmm1
movss  %xmm1,0x0(%r13,%rsi,4)
movss  %xmm0,0x0(%r13,%rcx,4)
mov    %r15d,%esi
nopl   0x0(%rax,%rax,1)
mov    %edx,%edi
sar    %esi
sub    %esi,%edx
jge    1610 <fft+0x4e0>
add    %edi,%esi
add    $0x1,%rcx
mov    %esi,%edx
cmp    %rbp,%rcx
jne    15a0 <fft+0x470>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa81(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@fft.init = internal global i32 0
@fft.w_real = internal global [2 x [10 x double]] zeroinitializer
@fft.w_imag = internal global [2 x [10 x double]] zeroinitializer
@.str = [31 x i8] c"Error: Bad FFT Size in subs.c\0A\00"
define void @fft(float* %0, float* %1, float* %2, float* %3, i32 %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store float* %3, float** %9
store i32 %4, i32* %10
%27 = load i32, i32* @fft.init
%28 = icmp eq i32 %27, 0
br i1 %28, label %29, label %92
29: ; preds = %5
store i32 10, i32* %11
store i32 0, i32* %19
br label %30
30: ; preds = %56, %29
%31 = load i32, i32* %19
%32 = load i32, i32* %11
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %59
34: ; preds = %30
%35 = load i32, i32* %11
%36 = load i32, i32* %19
%37 = sub nsw i32 %35, %36
%38 = shl i32 1, %37
store i32 %38, i32* %21
%39 = load i32, i32* %21
%40 = ashr i32 %39, 1
store i32 %40, i32* %22
%41 = load i32, i32* %22
%42 = sitofp i32 %41 to double
%43 = fdiv double 0x400921FB54442D11, %42
%44 = call double @cos(double %43)
%45 = load i32, i32* %19
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [10 x double], [10 x double]* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 0), i64 0, i64 %46
store double %44, double* %47
%48 = load i32, i32* %22
%49 = sitofp i32 %48 to double
%50 = fdiv double 0x400921FB54442D11, %49
%51 = call double @sin(double %50)
%52 = fneg double %51
%53 = load i32, i32* %19
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [10 x double], [10 x double]* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 0), i64 0, i64 %54
store double %52, double* %55
br label %56
56: ; preds = %34
%57 = load i32, i32* %19
%58 = add nsw i32 %57, 1
store i32 %58, i32* %19
br label %30
59: ; preds = %30
store i32 8, i32* %11
store i32 0, i32* %19
br label %60
60: ; preds = %86, %59
%61 = load i32, i32* %19
%62 = load i32, i32* %11
%63 = icmp slt i32 %61, %62
br i1 %63, label %64, label %89
64: ; preds = %60
%65 = load i32, i32* %11
%66 = load i32, i32* %19
%67 = sub nsw i32 %65, %66
%68 = shl i32 1, %67
store i32 %68, i32* %21
%69 = load i32, i32* %21
%70 = ashr i32 %69, 1
store i32 %70, i32* %22
%71 = load i32, i32* %22
%72 = sitofp i32 %71 to double
%73 = fdiv double 0x400921FB54442D11, %72
%74 = call double @cos(double %73)
%75 = load i32, i32* %19
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [10 x double], [10 x double]* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 1), i64 0, i64 %76
store double %74, double* %77
%78 = load i32, i32* %22
%79 = sitofp i32 %78 to double
%80 = fdiv double 0x400921FB54442D11, %79
%81 = call double @sin(double %80)
%82 = fneg double %81
%83 = load i32, i32* %19
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds [10 x double], [10 x double]* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 1), i64 0, i64 %84
store double %82, double* %85
br label %86
86: ; preds = %64
%87 = load i32, i32* %19
%88 = add nsw i32 %87, 1
store i32 %88, i32* %19
br label %60
89: ; preds = %60
%90 = load i32, i32* @fft.init
%91 = add nsw i32 %90, 1
store i32 %91, i32* @fft.init
br label %92
92: ; preds = %89, %5
%93 = load i32, i32* %10
switch i32 %93, label %96 [
i32 1024, label %94
i32 256, label %95
]
94: ; preds = %92
store i32 10, i32* %11
store i32 0, i32* %15
br label %98
95: ; preds = %92
store i32 8, i32* %11
store i32 1, i32* %15
br label %98
96: ; preds = %92
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
unreachable
98: ; preds = %95, %94
%99 = load i32, i32* %11
%100 = sub nsw i32 %99, 1
store i32 %100, i32* %12
%101 = load i32, i32* %10
%102 = ashr i32 %101, 1
store i32 %102, i32* %13
%103 = load i32, i32* %10
%104 = sub nsw i32 %103, 1
store i32 %104, i32* %14
store i32 0, i32* %19
br label %105
105: ; preds = %287, %98
%106 = load i32, i32* %19
%107 = load i32, i32* %12
%108 = icmp slt i32 %106, %107
br i1 %108, label %109, label %290
109: ; preds = %105
%110 = load i32, i32* %11
%111 = load i32, i32* %19
%112 = sub nsw i32 %110, %111
%113 = shl i32 1, %112
store i32 %113, i32* %21
%114 = load i32, i32* %21
%115 = ashr i32 %114, 1
store i32 %115, i32* %22
store double 1.000000e+00, double* %25
store double 0.000000e+00, double* %26
store i32 0, i32* %17
br label %116
116: ; preds = %283, %109
%117 = load i32, i32* %17
%118 = load i32, i32* %22
%119 = icmp slt i32 %117, %118
br i1 %119, label %120, label %286
120: ; preds = %116
%121 = load i32, i32* %17
store i32 %121, i32* %16
br label %122
122: ; preds = %240, %120
%123 = load i32, i32* %16
%124 = load i32, i32* %10
%125 = icmp slt i32 %123, %124
br i1 %125, label %126, label %244
126: ; preds = %122
%127 = load i32, i32* %16
%128 = load i32, i32* %22
%129 = add nsw i32 %127, %128
store i32 %129, i32* %20
%130 = load float*, float** %6
%131 = load i32, i32* %16
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds float, float* %130, i64 %132
%134 = load float, float* %133
%135 = load float*, float** %6
%136 = load i32, i32* %20
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds float, float* %135, i64 %137
%139 = load float, float* %138
%140 = fadd float %134, %139
%141 = fpext float %140 to double
store double %141, double* %23
%142 = load float*, float** %7
%143 = load i32, i32* %16
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds float, float* %142, i64 %144
%146 = load float, float* %145
%147 = load float*, float** %7
%148 = load i32, i32* %20
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds float, float* %147, i64 %149
%151 = load float, float* %150
%152 = fadd float %146, %151
%153 = fpext float %152 to double
store double %153, double* %24
%154 = load float*, float** %6
%155 = load i32, i32* %16
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds float, float* %154, i64 %156
%158 = load float, float* %157
%159 = load float*, float** %6
%160 = load i32, i32* %20
%161 = sext i32 %160 to i64
%162 = getelementptr inbounds float, float* %159, i64 %161
%163 = load float, float* %162
%164 = fsub float %158, %163
%165 = load float*, float** %6
%166 = load i32, i32* %20
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds float, float* %165, i64 %167
store float %164, float* %168
%169 = load float*, float** %7
%170 = load i32, i32* %16
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds float, float* %169, i64 %171
%173 = load float, float* %172
%174 = load float*, float** %7
%175 = load i32, i32* %20
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds float, float* %174, i64 %176
%178 = load float, float* %177
%179 = fsub float %173, %178
%180 = load float*, float** %7
%181 = load i32, i32* %20
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds float, float* %180, i64 %182
store float %179, float* %183
%184 = load double, double* %23
%185 = fptrunc double %184 to float
%186 = load float*, float** %6
%187 = load i32, i32* %16
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds float, float* %186, i64 %188
store float %185, float* %189
%190 = load double, double* %24
%191 = fptrunc double %190 to float
%192 = load float*, float** %7
%193 = load i32, i32* %16
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds float, float* %192, i64 %194
store float %191, float* %195
%196 = load float*, float** %6
%197 = load i32, i32* %20
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds float, float* %196, i64 %198
%200 = load float, float* %199
%201 = fpext float %200 to double
store double %201, double* %23
%202 = load float*, float** %6
%203 = load i32, i32* %20
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds float, float* %202, i64 %204
%206 = load float, float* %205
%207 = fpext float %206 to double
%208 = load double, double* %25
%209 = load float*, float** %7
%210 = load i32, i32* %20
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds float, float* %209, i64 %211
%213 = load float, float* %212
%214 = fpext float %213 to double
%215 = load double, double* %26
%216 = fmul double %214, %215
%217 = fneg double %216
%218 = call double @llvm.fmuladd.f64(double %207, double %208, double %217)
%219 = fptrunc double %218 to float
%220 = load float*, float** %6
%221 = load i32, i32* %20
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds float, float* %220, i64 %222
store float %219, float* %223
%224 = load float*, float** %7
%225 = load i32, i32* %20
%226 = sext i32 %225 to i64
%227 = getelementptr inbounds float, float* %224, i64 %226
%228 = load float, float* %227
%229 = fpext float %228 to double
%230 = load double, double* %25
%231 = load double, double* %23
%232 = load double, double* %26
%233 = fmul double %231, %232
%234 = call double @llvm.fmuladd.f64(double %229, double %230, double %233)
%235 = fptrunc double %234 to float
%236 = load float*, float** %7
%237 = load i32, i32* %20
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds float, float* %236, i64 %238
store float %235, float* %239
br label %240
240: ; preds = %126
%241 = load i32, i32* %21
%242 = load i32, i32* %16
%243 = add nsw i32 %242, %241
store i32 %243, i32* %16
br label %122
244: ; preds = %122
%245 = load double, double* %25
store double %245, double* %23
%246 = load double, double* %25
%247 = load i32, i32* %15
%248 = sext i32 %247 to i64
%249 = getelementptr inbounds [2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 %248
%250 = load i32, i32* %19
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds [10 x double], [10 x double]* %249, i64 0, i64 %251
%253 = load double, double* %252
%254 = load double, double* %26
%255 = load i32, i32* %15
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds [2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 %256
%258 = load i32, i32* %19
%259 = sext i32 %258 to i64
%260 = getelementptr inbounds [10 x double], [10 x double]* %257, i64 0, i64 %259
%261 = load double, double* %260
%262 = fmul double %254, %261
%263 = fneg double %262
%264 = call double @llvm.fmuladd.f64(double %246, double %253, double %263)
store double %264, double* %25
%265 = load double, double* %26
%266 = load i32, i32* %15
%267 = sext i32 %266 to i64
%268 = getelementptr inbounds [2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 %267
%269 = load i32, i32* %19
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds [10 x double], [10 x double]* %268, i64 0, i64 %270
%272 = load double, double* %271
%273 = load double, double* %23
%274 = load i32, i32* %15
%275 = sext i32 %274 to i64
%276 = getelementptr inbounds [2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 %275
%277 = load i32, i32* %19
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds [10 x double], [10 x double]* %276, i64 0, i64 %278
%280 = load double, double* %279
%281 = fmul double %273, %280
%282 = call double @llvm.fmuladd.f64(double %265, double %272, double %281)
store double %282, double* %26
br label %283
283: ; preds = %244
%284 = load i32, i32* %17
%285 = add nsw i32 %284, 1
store i32 %285, i32* %17
br label %116
286: ; preds = %116
br label %287
287: ; preds = %286
%288 = load i32, i32* %19
%289 = add nsw i32 %288, 1
store i32 %289, i32* %19
br label %105
290: ; preds = %105
store i32 0, i32* %16
br label %291
291: ; preds = %483, %290
%292 = load i32, i32* %16
%293 = load i32, i32* %10
%294 = icmp slt i32 %292, %293
br i1 %294, label %295, label %486
295: ; preds = %291
%296 = load i32, i32* %16
%297 = add nsw i32 %296, 1
store i32 %297, i32* %20
%298 = load float*, float** %6
%299 = load i32, i32* %16
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds float, float* %298, i64 %300
%302 = load float, float* %301
%303 = load float*, float** %6
%304 = load i32, i32* %20
%305 = sext i32 %304 to i64
%306 = getelementptr inbounds float, float* %303, i64 %305
%307 = load float, float* %306
%308 = fadd float %302, %307
%309 = fpext float %308 to double
store double %309, double* %23
%310 = load float*, float** %7
%311 = load i32, i32* %16
%312 = sext i32 %311 to i64
%313 = getelementptr inbounds float, float* %310, i64 %312
%314 = load float, float* %313
%315 = load float*, float** %7
%316 = load i32, i32* %20
%317 = sext i32 %316 to i64
%318 = getelementptr inbounds float, float* %315, i64 %317
%319 = load float, float* %318
%320 = fadd float %314, %319
%321 = fpext float %320 to double
store double %321, double* %24
%322 = load float*, float** %6
%323 = load i32, i32* %16
%324 = sext i32 %323 to i64
%325 = getelementptr inbounds float, float* %322, i64 %324
%326 = load float, float* %325
%327 = load float*, float** %6
%328 = load i32, i32* %20
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds float, float* %327, i64 %329
%331 = load float, float* %330
%332 = fsub float %326, %331
%333 = load float*, float** %6
%334 = load i32, i32* %20
%335 = sext i32 %334 to i64
%336 = getelementptr inbounds float, float* %333, i64 %335
store float %332, float* %336
%337 = load float*, float** %7
%338 = load i32, i32* %16
%339 = sext i32 %338 to i64
%340 = getelementptr inbounds float, float* %337, i64 %339
%341 = load float, float* %340
%342 = load float*, float** %7
%343 = load i32, i32* %20
%344 = sext i32 %343 to i64
%345 = getelementptr inbounds float, float* %342, i64 %344
%346 = load float, float* %345
%347 = fsub float %341, %346
%348 = load float*, float** %7
%349 = load i32, i32* %20
%350 = sext i32 %349 to i64
%351 = getelementptr inbounds float, float* %348, i64 %350
store float %347, float* %351
%352 = load double, double* %23
%353 = fptrunc double %352 to float
%354 = load float*, float** %6
%355 = load i32, i32* %16
%356 = sext i32 %355 to i64
%357 = getelementptr inbounds float, float* %354, i64 %356
store float %353, float* %357
%358 = load double, double* %24
%359 = fptrunc double %358 to float
%360 = load float*, float** %7
%361 = load i32, i32* %16
%362 = sext i32 %361 to i64
%363 = getelementptr inbounds float, float* %360, i64 %362
store float %359, float* %363
%364 = load float*, float** %6
%365 = load i32, i32* %16
%366 = sext i32 %365 to i64
%367 = getelementptr inbounds float, float* %364, i64 %366
%368 = load float, float* %367
%369 = load float*, float** %6
%370 = load i32, i32* %16
%371 = sext i32 %370 to i64
%372 = getelementptr inbounds float, float* %369, i64 %371
%373 = load float, float* %372
%374 = load float*, float** %7
%375 = load i32, i32* %16
%376 = sext i32 %375 to i64
%377 = getelementptr inbounds float, float* %374, i64 %376
%378 = load float, float* %377
%379 = load float*, float** %7
%380 = load i32, i32* %16
%381 = sext i32 %380 to i64
%382 = getelementptr inbounds float, float* %379, i64 %381
%383 = load float, float* %382
%384 = fmul float %378, %383
%385 = call float @llvm.fmuladd.f32(float %368, float %373, float %384)
%386 = load float*, float** %8
%387 = load i32, i32* %16
%388 = sext i32 %387 to i64
%389 = getelementptr inbounds float, float* %386, i64 %388
store float %385, float* %389
%390 = load float*, float** %8
%391 = load i32, i32* %16
%392 = sext i32 %391 to i64
%393 = getelementptr inbounds float, float* %390, i64 %392
%394 = load float, float* %393
%395 = fpext float %394 to double
%396 = fcmp ole double %395, 5.000000e-04
br i1 %396, label %397, label %406
397: ; preds = %295
%398 = load float*, float** %9
%399 = load i32, i32* %16
%400 = sext i32 %399 to i64
%401 = getelementptr inbounds float, float* %398, i64 %400
store float 0.000000e+00, float* %401
%402 = load float*, float** %8
%403 = load i32, i32* %16
%404 = sext i32 %403 to i64
%405 = getelementptr inbounds float, float* %402, i64 %404
store float 0x3F40624DE0000000, float* %405
br label %425
406: ; preds = %295
%407 = load float*, float** %7
%408 = load i32, i32* %16
%409 = sext i32 %408 to i64
%410 = getelementptr inbounds float, float* %407, i64 %409
%411 = load float, float* %410
%412 = fpext float %411 to double
%413 = load float*, float** %6
%414 = load i32, i32* %16
%415 = sext i32 %414 to i64
%416 = getelementptr inbounds float, float* %413, i64 %415
%417 = load float, float* %416
%418 = fpext float %417 to double
%419 = call double @atan2(double %412, double %418)
%420 = fptrunc double %419 to float
%421 = load float*, float** %9
%422 = load i32, i32* %16
%423 = sext i32 %422 to i64
%424 = getelementptr inbounds float, float* %421, i64 %423
store float %420, float* %424
br label %425
425: ; preds = %406, %397
%426 = load float*, float** %6
%427 = load i32, i32* %20
%428 = sext i32 %427 to i64
%429 = getelementptr inbounds float, float* %426, i64 %428
%430 = load float, float* %429
%431 = load float*, float** %6
%432 = load i32, i32* %20
%433 = sext i32 %432 to i64
%434 = getelementptr inbounds float, float* %431, i64 %433
%435 = load float, float* %434
%436 = load float*, float** %7
%437 = load i32, i32* %20
%438 = sext i32 %437 to i64
%439 = getelementptr inbounds float, float* %436, i64 %438
%440 = load float, float* %439
%441 = load float*, float** %7
%442 = load i32, i32* %20
%443 = sext i32 %442 to i64
%444 = getelementptr inbounds float, float* %441, i64 %443
%445 = load float, float* %444
%446 = fmul float %440, %445
%447 = call float @llvm.fmuladd.f32(float %430, float %435, float %446)
%448 = load float*, float** %8
%449 = load i32, i32* %20
%450 = sext i32 %449 to i64
%451 = getelementptr inbounds float, float* %448, i64 %450
store float %447, float* %451
%452 = load float*, float** %8
%453 = load i32, i32* %20
%454 = sext i32 %453 to i64
%455 = getelementptr inbounds float, float* %452, i64 %454
%456 = load float, float* %455
%457 = fcmp oeq float %456, 0.000000e+00
br i1 %457, label %458, label %463
458: ; preds = %425
%459 = load float*, float** %9
%460 = load i32, i32* %20
%461 = sext i32 %460 to i64
%462 = getelementptr inbounds float, float* %459, i64 %461
store float 0.000000e+00, float* %462
br label %482
463: ; preds = %425
%464 = load float*, float** %7
%465 = load i32, i32* %20
%466 = sext i32 %465 to i64
%467 = getelementptr inbounds float, float* %464, i64 %466
%468 = load float, float* %467
%469 = fpext float %468 to double
%470 = load float*, float** %6
%471 = load i32, i32* %20
%472 = sext i32 %471 to i64
%473 = getelementptr inbounds float, float* %470, i64 %472
%474 = load float, float* %473
%475 = fpext float %474 to double
%476 = call double @atan2(double %469, double %475)
%477 = fptrunc double %476 to float
%478 = load float*, float** %9
%479 = load i32, i32* %20
%480 = sext i32 %479 to i64
%481 = getelementptr inbounds float, float* %478, i64 %480
store float %477, float* %481
br label %482
482: ; preds = %463, %458
br label %483
483: ; preds = %482
%484 = load i32, i32* %16
%485 = add nsw i32 %484, 2
store i32 %485, i32* %16
br label %291
486: ; preds = %291
store i32 0, i32* %17
store i32 0, i32* %16
br label %487
487: ; preds = %596, %486
%488 = load i32, i32* %16
%489 = load i32, i32* %14
%490 = icmp slt i32 %488, %489
br i1 %490, label %491, label %599
491: ; preds = %487
%492 = load i32, i32* %16
%493 = load i32, i32* %17
%494 = icmp slt i32 %492, %493
br i1 %494, label %495, label %580
495: ; preds = %491
%496 = load float*, float** %6
%497 = load i32, i32* %17
%498 = sext i32 %497 to i64
%499 = getelementptr inbounds float, float* %496, i64 %498
%500 = load float, float* %499
%501 = fpext float %500 to double
store double %501, double* %23
%502 = load float*, float** %7
%503 = load i32, i32* %17
%504 = sext i32 %503 to i64
%505 = getelementptr inbounds float, float* %502, i64 %504
%506 = load float, float* %505
%507 = fpext float %506 to double
store double %507, double* %24
%508 = load float*, float** %6
%509 = load i32, i32* %16
%510 = sext i32 %509 to i64
%511 = getelementptr inbounds float, float* %508, i64 %510
%512 = load float, float* %511
%513 = load float*, float** %6
%514 = load i32, i32* %17
%515 = sext i32 %514 to i64
%516 = getelementptr inbounds float, float* %513, i64 %515
store float %512, float* %516
%517 = load float*, float** %7
%518 = load i32, i32* %16
%519 = sext i32 %518 to i64
%520 = getelementptr inbounds float, float* %517, i64 %519
%521 = load float, float* %520
%522 = load float*, float** %7
%523 = load i32, i32* %17
%524 = sext i32 %523 to i64
%525 = getelementptr inbounds float, float* %522, i64 %524
store float %521, float* %525
%526 = load double, double* %23
%527 = fptrunc double %526 to float
%528 = load float*, float** %6
%529 = load i32, i32* %16
%530 = sext i32 %529 to i64
%531 = getelementptr inbounds float, float* %528, i64 %530
store float %527, float* %531
%532 = load double, double* %24
%533 = fptrunc double %532 to float
%534 = load float*, float** %7
%535 = load i32, i32* %16
%536 = sext i32 %535 to i64
%537 = getelementptr inbounds float, float* %534, i64 %536
store float %533, float* %537
%538 = load float*, float** %8
%539 = load i32, i32* %17
%540 = sext i32 %539 to i64
%541 = getelementptr inbounds float, float* %538, i64 %540
%542 = load float, float* %541
%543 = fpext float %542 to double
store double %543, double* %23
%544 = load float*, float** %8
%545 = load i32, i32* %16
%546 = sext i32 %545 to i64
%547 = getelementptr inbounds float, float* %544, i64 %546
%548 = load float, float* %547
%549 = load float*, float** %8
%550 = load i32, i32* %17
%551 = sext i32 %550 to i64
%552 = getelementptr inbounds float, float* %549, i64 %551
store float %548, float* %552
%553 = load double, double* %23
%554 = fptrunc double %553 to float
%555 = load float*, float** %8
%556 = load i32, i32* %16
%557 = sext i32 %556 to i64
%558 = getelementptr inbounds float, float* %555, i64 %557
store float %554, float* %558
%559 = load float*, float** %9
%560 = load i32, i32* %17
%561 = sext i32 %560 to i64
%562 = getelementptr inbounds float, float* %559, i64 %561
%563 = load float, float* %562
%564 = fpext float %563 to double
store double %564, double* %23
%565 = load float*, float** %9
%566 = load i32, i32* %16
%567 = sext i32 %566 to i64
%568 = getelementptr inbounds float, float* %565, i64 %567
%569 = load float, float* %568
%570 = load float*, float** %9
%571 = load i32, i32* %17
%572 = sext i32 %571 to i64
%573 = getelementptr inbounds float, float* %570, i64 %572
store float %569, float* %573
%574 = load double, double* %23
%575 = fptrunc double %574 to float
%576 = load float*, float** %9
%577 = load i32, i32* %16
%578 = sext i32 %577 to i64
%579 = getelementptr inbounds float, float* %576, i64 %578
store float %575, float* %579
br label %580
580: ; preds = %495, %491
%581 = load i32, i32* %13
store i32 %581, i32* %18
br label %582
582: ; preds = %586, %580
%583 = load i32, i32* %18
%584 = load i32, i32* %17
%585 = icmp sle i32 %583, %584
br i1 %585, label %586, label %592
586: ; preds = %582
%587 = load i32, i32* %17
%588 = load i32, i32* %18
%589 = sub nsw i32 %587, %588
store i32 %589, i32* %17
%590 = load i32, i32* %18
%591 = ashr i32 %590, 1
store i32 %591, i32* %18
br label %582
592: ; preds = %582
%593 = load i32, i32* %17
%594 = load i32, i32* %18
%595 = add nsw i32 %593, %594
store i32 %595, i32* %17
br label %596
596: ; preds = %592
%597 = load i32, i32* %16
%598 = add nsw i32 %597, 1
store i32 %598, i32* %16
br label %487
599: ; preds = %487
ret void
}

LLVM IR (-O2):
@fft.init = internal unnamed_addr global i1 false
@fft.w_real = internal unnamed_addr global [2 x [10 x double]] zeroinitializer
@fft.w_imag = internal unnamed_addr global [2 x [10 x double]] zeroinitializer
@str = [30 x i8] c"Error: Bad FFT Size in subs.c\00"
define void @fft(float* nocapture %0, float* nocapture %1, float* nocapture %2, float* nocapture %3, i32 %4) {
%6 = load i1, i1* @fft.init
br i1 %6, label %8, label %7
7: ; preds = %5
tail call void @llvm.memset.p0i8.i64(i8* align 16 dereferenceable(160) bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 1, i64 8) to i8*), i8 0, i64 16, i1 false)
tail call void @llvm.memset.p0i8.i64(i8* align 16 dereferenceable(160) bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 1, i64 8) to i8*), i8 0, i64 16, i1 false)
store <2 x double> <double 0x3FEFFFD8858E8A92, double 0x3FEFFF62169B92DB>, <2 x double>* bitcast ([2 x [10 x double]]* @fft.w_real to <2 x double>*)
store <2 x double> <double 0xBF7921F0FE67006A, double 0xBF8921D1FCDEC77D>, <2 x double>* bitcast ([2 x [10 x double]]* @fft.w_imag to <2 x double>*)
store <2 x double> <double 0x3FEFFD886084CD0D, double 0x3FEFF621E3796D7E>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 0, i64 2) to <2 x double>*)
store <2 x double> <double 0xBF992155F7A36677, double 0xBFA91F65F10DD80D>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 0, i64 2) to <2 x double>*)
store <2 x double> <double 0x3FEFD88DA3D12526, double 0x3FEF6297CFF75CB1>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 0, i64 4) to <2 x double>*)
store <2 x double> <double 0xBFB917A6BC29B425, double 0xBFC8F8B83C69A604>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 0, i64 4) to <2 x double>*)
store <2 x double> <double 0x3FED906BCF328D48, double 0x3FE6A09E667F3BD2>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 0, i64 6) to <2 x double>*)
store <2 x double> <double 0xBFD87DE2A6AEA95C, double 0xBFE6A09E667F3BC7>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 0, i64 6) to <2 x double>*)
store <2 x double> <double 0x3CDD1A62633145C0, double -1.000000e+00>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 0, i64 8) to <2 x double>*)
store <2 x double> <double -1.000000e+00, double 0xBCED1A62633145C0>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 0, i64 8) to <2 x double>*)
store <2 x double> <double 0x3FEFFD886084CD0D, double 0x3FEFF621E3796D7E>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 1, i64 0) to <2 x double>*)
store <2 x double> <double 0xBF992155F7A36677, double 0xBFA91F65F10DD80D>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 1, i64 0) to <2 x double>*)
store <2 x double> <double 0x3FEFD88DA3D12526, double 0x3FEF6297CFF75CB1>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 1, i64 2) to <2 x double>*)
store <2 x double> <double 0xBFB917A6BC29B425, double 0xBFC8F8B83C69A604>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 1, i64 2) to <2 x double>*)
store <2 x double> <double 0x3FED906BCF328D48, double 0x3FE6A09E667F3BD2>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 1, i64 4) to <2 x double>*)
store <2 x double> <double 0xBFD87DE2A6AEA95C, double 0xBFE6A09E667F3BC7>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 1, i64 4) to <2 x double>*)
store <2 x double> <double 0x3CDD1A62633145C0, double -1.000000e+00>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 1, i64 6) to <2 x double>*)
store <2 x double> <double -1.000000e+00, double 0xBCED1A62633145C0>, <2 x double>* bitcast (double* getelementptr inbounds ([2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 1, i64 6) to <2 x double>*)
store i1 true, i1* @fft.init
br label %8
8: ; preds = %7, %5
switch i32 %4, label %10 [
i32 1024, label %12
i32 256, label %9
]
9: ; preds = %8
br label %12
10: ; preds = %8
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
tail call void @exit(i32 -1)
unreachable
12: ; preds = %8, %9
%13 = phi i32 [ 8, %9 ], [ 10, %8 ]
%14 = phi i64 [ 1, %9 ], [ 0, %8 ]
%15 = add nsw i32 %13, -1
%16 = zext i32 %4 to i64
%17 = zext i32 %15 to i64
br label %21
18: ; preds = %89
%19 = add i32 %4, -1
%20 = icmp sgt i32 %4, 0
br i1 %20, label %96, label %181
21: ; preds = %12, %89
%22 = phi i64 [ 0, %12 ], [ %90, %89 ]
%23 = trunc i64 %22 to i32
%24 = sub i32 %13, %23
%25 = shl nuw i32 1, %24
%26 = ashr i32 %25, 1
%27 = icmp sgt i32 %25, 1
br i1 %27, label %28, label %89
28: ; preds = %21
%29 = getelementptr inbounds [2 x [10 x double]], [2 x [10 x double]]* @fft.w_real, i64 0, i64 %14, i64 %22
%30 = load double, double* %29
%31 = getelementptr inbounds [2 x [10 x double]], [2 x [10 x double]]* @fft.w_imag, i64 0, i64 %14, i64 %22
%32 = load double, double* %31
%33 = zext i32 %25 to i64
%34 = sext i32 %26 to i64
%35 = call i32 @llvm.smax.i32(i32 %26, i32 1)
%36 = zext i32 %35 to i64
%37 = insertelement <2 x double> poison, double %30, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
%39 = insertelement <2 x double> poison, double %32, i64 0
%40 = shufflevector <2 x double> %39, <2 x double> poison, <2 x i32> zeroinitializer
br label %41
41: ; preds = %28, %81
%42 = phi i64 [ 0, %28 ], [ %87, %81 ]
%43 = phi <2 x double> [ <double 0.000000e+00, double 1.000000e+00>, %28 ], [ %86, %81 ]
%44 = trunc i64 %42 to i32
%45 = icmp slt i32 %44, %4
%46 = extractelement <2 x double> %43, i64 0
%47 = fneg double %46
br i1 %45, label %48, label %81
48: ; preds = %41
%49 = extractelement <2 x double> %43, i64 1
br label %50
50: ; preds = %48, %50
%51 = phi i64 [ %79, %50 ], [ %42, %48 ]
%52 = add nsw i64 %51, %34
%53 = getelementptr inbounds float, float* %0, i64 %51
%54 = load float, float* %53
%55 = getelementptr inbounds float, float* %0, i64 %52
%56 = load float, float* %55
%57 = fadd float %54, %56
%58 = getelementptr inbounds float, float* %1, i64 %51
%59 = load float, float* %58
%60 = getelementptr inbounds float, float* %1, i64 %52
%61 = load float, float* %60
%62 = fadd float %59, %61
%63 = fsub float %54, %56
store float %63, float* %55
%64 = load float, float* %58
%65 = load float, float* %60
%66 = fsub float %64, %65
store float %66, float* %60
store float %57, float* %53
store float %62, float* %58
%67 = load float, float* %55
%68 = fpext float %67 to double
%69 = load float, float* %60
%70 = fpext float %69 to double
%71 = fmul double %47, %70
%72 = tail call double @llvm.fmuladd.f64(double %68, double %49, double %71)
%73 = fptrunc double %72 to float
store float %73, float* %55
%74 = load float, float* %60
%75 = fpext float %74 to double
%76 = fmul double %46, %68
%77 = tail call double @llvm.fmuladd.f64(double %75, double %49, double %76)
%78 = fptrunc double %77 to float
store float %78, float* %60
%79 = add i64 %51, %33
%80 = icmp slt i64 %79, %16
br i1 %80, label %50, label %81
81: ; preds = %50, %41
%82 = extractelement <2 x double> %43, i64 1
%83 = insertelement <2 x double> poison, double %82, i64 0
%84 = insertelement <2 x double> %83, double %47, i64 1
%85 = fmul <2 x double> %84, %40
%86 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %43, <2 x double> %38, <2 x double> %85)
%87 = add nuw nsw i64 %42, 1
%88 = icmp eq i64 %87, %36
br i1 %88, label %89, label %41
89: ; preds = %81, %21
%90 = add nuw nsw i64 %22, 1
%91 = icmp eq i64 %90, %17
br i1 %91, label %18, label %21
92: ; preds = %143
%93 = icmp sgt i32 %4, 1
br i1 %93, label %94, label %181
94: ; preds = %92
%95 = zext i32 %19 to i64
br label %148
96: ; preds = %18, %143
%97 = phi i64 [ %146, %143 ], [ 0, %18 ]
%98 = or i64 %97, 1
%99 = getelementptr inbounds float, float* %0, i64 %97
%100 = load float, float* %99
%101 = getelementptr inbounds float, float* %0, i64 %98
%102 = load float, float* %101
%103 = fadd float %100, %102
%104 = getelementptr inbounds float, float* %1, i64 %97
%105 = load float, float* %104
%106 = getelementptr inbounds float, float* %1, i64 %98
%107 = load float, float* %106
%108 = fadd float %105, %107
%109 = fsub float %100, %102
store float %109, float* %101
%110 = load float, float* %104
%111 = load float, float* %106
%112 = fsub float %110, %111
store float %112, float* %106
store float %103, float* %99
store float %108, float* %104
%113 = load float, float* %99
%114 = fmul float %108, %108
%115 = tail call float @llvm.fmuladd.f32(float %113, float %113, float %114)
%116 = getelementptr inbounds float, float* %2, i64 %97
store float %115, float* %116
%117 = fpext float %115 to double
%118 = fcmp ugt double %117, 5.000000e-04
br i1 %118, label %121, label %119
119: ; preds = %96
%120 = getelementptr inbounds float, float* %3, i64 %97
store float 0.000000e+00, float* %120
store float 0x3F40624DE0000000, float* %116
br label %129
121: ; preds = %96
%122 = load float, float* %104
%123 = fpext float %122 to double
%124 = load float, float* %99
%125 = fpext float %124 to double
%126 = tail call double @atan2(double %123, double %125)
%127 = fptrunc double %126 to float
%128 = getelementptr inbounds float, float* %3, i64 %97
store float %127, float* %128
br label %129
129: ; preds = %121, %119
%130 = load float, float* %101
%131 = load float, float* %106
%132 = fmul float %131, %131
%133 = tail call float @llvm.fmuladd.f32(float %130, float %130, float %132)
%134 = getelementptr inbounds float, float* %2, i64 %98
store float %133, float* %134
%135 = fcmp oeq float %133, 0.000000e+00
br i1 %135, label %143, label %136
136: ; preds = %129
%137 = load float, float* %106
%138 = fpext float %137 to double
%139 = load float, float* %101
%140 = fpext float %139 to double
%141 = tail call double @atan2(double %138, double %140)
%142 = fptrunc double %141 to float
br label %143
143: ; preds = %129, %136
%144 = phi float [ %142, %136 ], [ 0.000000e+00, %129 ]
%145 = getelementptr inbounds float, float* %3, i64 %98
store float %144, float* %145
%146 = add nuw nsw i64 %97, 2
%147 = icmp ult i64 %146, %16
br i1 %147, label %96, label %92
148: ; preds = %94, %177
%149 = phi i64 [ 0, %94 ], [ %179, %177 ]
%150 = phi i32 [ 0, %94 ], [ %178, %177 ]
%151 = sext i32 %150 to i64
%152 = icmp slt i64 %149, %151
br i1 %152, label %153, label %170
153: ; preds = %148
%154 = getelementptr inbounds float, float* %0, i64 %151
%155 = load float, float* %154
%156 = getelementptr inbounds float, float* %1, i64 %151
%157 = load float, float* %156
%158 = getelementptr inbounds float, float* %0, i64 %149
%159 = load float, float* %158
store float %159, float* %154
%160 = getelementptr inbounds float, float* %1, i64 %149
%161 = load float, float* %160
store float %161, float* %156
store float %155, float* %158
store float %157, float* %160
%162 = getelementptr inbounds float, float* %2, i64 %151
%163 = load float, float* %162
%164 = getelementptr inbounds float, float* %2, i64 %149
%165 = load float, float* %164
store float %165, float* %162
store float %163, float* %164
%166 = getelementptr inbounds float, float* %3, i64 %151
%167 = load float, float* %166
%168 = getelementptr inbounds float, float* %3, i64 %149
%169 = load float, float* %168
store float %169, float* %166
store float %167, float* %168
br label %170
170: ; preds = %153, %148
br label %171
171: ; preds = %170, %171
%172 = phi i32 [ %176, %171 ], [ %150, %170 ]
%173 = phi i32 [ %174, %171 ], [ %4, %170 ]
%174 = ashr i32 %173, 1
%175 = icmp slt i32 %172, %174
%176 = sub nsw i32 %172, %174
br i1 %175, label %177, label %171
177: ; preds = %171
%178 = add nsw i32 %174, %172
%179 = add nuw nsw i64 %149, 1
%180 = icmp eq i64 %179, %95
br i1 %180, label %181, label %148
181: ; preds = %177, %18, %92
ret void
}