#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double cos(double);
double sin(double);
void FDFT(double *x, double *y, int N, double df, double Nf, double *f_r,
          double *f_i) {
  int i, j, Ntot;
  double avx, avy, c, s, fval, val, yval;
  double xf0, xdf, sdf, cdf, s0, c0, xt, f0;
  for (i = 0, avx = 0., avy = 0.; i < N; i++) {
    avx += x[i];
    avy += y[i];
  }
  avx = avx / N;
  avy = avy / N;
  Ntot = 2 * Nf + 1;
  for (i = 0; i < Ntot; i++) {
    f_r[i] = 0.;
    f_i[i] = 0.;
  }
  for (j = 0; j < N; j++) {
    f0 = (-Nf - 1) * df;
    xt = 6.28318530717958647692528676656 * (x[j] - avx);
    xf0 = xt * f0;
    xdf = xt * df;
    s0 = sin(xf0);
    c0 = cos(xf0);
    sdf = sin(xdf);
    cdf = cos(xdf);
    yval = y[j] - avy;
    for (i = 0; i < Ntot; i++) {
      c = c0 * cdf - s0 * sdf;
      s = s0 * cdf + c0 * sdf;
      f_r[i] += yval * c;
      f_i[i] += yval * s;
      c0 = c;
      s0 = s;
    }
  }
  for (i = 0; i < Ntot; i++) {
    f_r[i] /= (double)N;
    f_i[i] /= (double)N;
  }
}


x86 assembly (clang, -O0):
<FDFT>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11a7 <FDFT+0x87>
mov    -0x8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    115f <FDFT+0x3f>
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe22(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x44(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    122a <FDFT+0x10a>
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11f0 <FDFT+0xd0>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1437 <FDFT+0x317>
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xd9f(%rip),%xmm1
subsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
subsd  -0x50(%rbp),%xmm1
movsd  0xd7c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1030 <sin@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1040 <cos@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
call   1030 <sin@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
call   1040 <cos@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x10(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    1424 <FDFT+0x304>
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0x98(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0xb0(%rbp),%xmm1
ff
mulsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1337 <FDFT+0x217>
jmp    1429 <FDFT+0x309>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1231 <FDFT+0x111>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jge    148e <FDFT+0x36e>
cvtsi2sdl -0x14(%rbp),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
cvtsi2sdl -0x14(%rbp),%xmm1
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    143e <FDFT+0x31e>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FDFT>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r8,%r14
mov    %rcx,%rbx
movsd  %xmm0,0x18(%rsp)
mov    %edx,%r15d
test   %edx,%edx
jle    115e <FDFT+0x3e>
lea    -0x1(%r15),%rcx
mov    %r15d,%r9d
and    $0x3,%r9d
cmp    $0x3,%rcx
jae    1168 <FDFT+0x48>
xorpd  %xmm2,%xmm2
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
jmp    11b7 <FDFT+0x97>
xorpd  %xmm0,%xmm0
xorpd  %xmm2,%xmm2
jmp    11e4 <FDFT+0xc4>
mov    %r15d,%ebp
and    $0xfffffffc,%ebp
xorpd  %xmm2,%xmm2
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
nopl   0x0(%rax,%rax,1)
addsd  (%rdi,%rcx,8),%xmm2
addsd  (%rsi,%rcx,8),%xmm0
addsd  0x8(%rdi,%rcx,8),%xmm2
addsd  0x8(%rsi,%rcx,8),%xmm0
addsd  0x10(%rdi,%rcx,8),%xmm2
addsd  0x10(%rsi,%rcx,8),%xmm0
addsd  0x18(%rdi,%rcx,8),%xmm2
addsd  0x18(%rsi,%rcx,8),%xmm0
add    $0x4,%rcx
cmp    %rcx,%rbp
jne    1180 <FDFT+0x60>
test   %r9,%r9
je     11e4 <FDFT+0xc4>
lea    (%rsi,%rcx,8),%rbp
lea    (%rdi,%rcx,8),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
addsd  (%rcx,%rax,8),%xmm2
addsd  0x0(%rbp,%rax,8),%xmm0
add    $0x1,%rax
cmp    %rax,%r9
jne    11d0 <FDFT+0xb0>
movsd  %xmm0,0x8(%rsp)
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
addsd  0xe06(%rip),%xmm0
cvttsd2si %xmm0,%r10d
mov    %r10d,%r13d
test   %r10d,%r10d
jle    13ba <FDFT+0x29a>
cmp    $0x4,%r10d
jb     122b <FDFT+0x10b>
lea    (%r14,%r13,8),%rax
cmp    %rbx,%rax
jbe    12c4 <FDFT+0x1a4>
lea    (%rbx,%r13,8),%rax
cmp    %r14,%rax
jbe    12c4 <FDFT+0x1a4>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r13,%rcx
mov    %r13,%rbp
and    $0x3,%rbp
je     125a <FDFT+0x13a>
nop
movq   $0x0,(%rbx,%rax,8)
movq   $0x0,(%r14,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rbp
jne    1240 <FDFT+0x120>
cmp    $0x3,%rcx
jb     13ba <FDFT+0x29a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movq   $0x0,(%rbx,%rax,8)
movq   $0x0,(%r14,%rax,8)
movq   $0x0,0x8(%rbx,%rax,8)
movq   $0x0,0x8(%r14,%rax,8)
movq   $0x0,0x10(%rbx,%rax,8)
movq   $0x0,0x10(%r14,%rax,8)
movq   $0x0,0x18(%rbx,%rax,8)
movq   $0x0,0x18(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%r13
jne    1270 <FDFT+0x150>
jmp    13ba <FDFT+0x29a>
mov    %r13d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rbp
mov    %rbp,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %ecx,%r9d
and    $0x3,%r9d
cmp    $0xc,%rbp
jae    12ed <FDFT+0x1cd>
xor    %ebp,%ebp
jmp    1370 <FDFT+0x250>
and    $0xfffffffffffffffc,%rcx
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
movupd %xmm0,(%rbx,%rbp,8)
movupd %xmm0,0x10(%rbx,%rbp,8)
movupd %xmm0,(%r14,%rbp,8)
movupd %xmm0,0x10(%r14,%rbp,8)
movupd %xmm0,0x20(%rbx,%rbp,8)
movupd %xmm0,0x30(%rbx,%rbp,8)
movupd %xmm0,0x20(%r14,%rbp,8)
movupd %xmm0,0x30(%r14,%rbp,8)
movupd %xmm0,0x40(%rbx,%rbp,8)
movupd %xmm0,0x50(%rbx,%rbp,8)
movupd %xmm0,0x40(%r14,%rbp,8)
movupd %xmm0,0x50(%r14,%rbp,8)
movupd %xmm0,0x60(%rbx,%rbp,8)
movupd %xmm0,0x70(%rbx,%rbp,8)
movupd %xmm0,0x60(%r14,%rbp,8)
movupd %xmm0,0x70(%r14,%rbp,8)
add    $0x10,%rbp
add    $0xfffffffffffffffc,%rcx
jne    1300 <FDFT+0x1e0>
test   %r9,%r9
je     13b1 <FDFT+0x291>
lea    (%r14,%rbp,8),%r11
add    $0x10,%r11
lea    (%rbx,%rbp,8),%rcx
add    $0x10,%rcx
shl    $0x5,%r9
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
nop
movupd %xmm0,-0x10(%rcx,%rbp,1)
movupd %xmm0,(%rcx,%rbp,1)
movupd %xmm0,-0x10(%r11,%rbp,1)
movupd %xmm0,(%r11,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%r9
jne    1390 <FDFT+0x270>
cmp    %r13,%rax
jne    122d <FDFT+0x10d>
mov    %r10d,0x4(%rsp)
mov    %rsi,0x28(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movapd %xmm0,0x50(%rsp)
test   %edx,%edx
jle    1524 <FDFT+0x404>
movapd 0x50(%rsp),%xmm3
divsd  %xmm3,%xmm2
movsd  0x8(%rsp),%xmm0
divsd  %xmm3,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xc0d(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
xor    %ebp,%ebp
movsd  %xmm2,0x38(%rsp)
jmp    1436 <FDFT+0x316>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
cmp    %r15,%rbp
movsd  0x38(%rsp),%xmm2
mov    %r12,%rdi
je     1524 <FDFT+0x404>
mov    %rdi,%r12
movsd  (%rdi,%rbp,8),%xmm1
subsd  %xmm2,%xmm1
mulsd  0xbc6(%rip),%xmm1
movsd  0x30(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
mulsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x20(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x20(%rsp),%xmm0
call   1040 <cos@plt>
movsd  0x40(%rsp),%xmm6
movsd  0x10(%rsp),%xmm5
movsd  0x48(%rsp),%xmm4
cmpl   $0x0,0x4(%rsp)
jle    1420 <FDFT+0x300>
mov    0x28(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm1
subsd  0x8(%rsp),%xmm1
xor    %eax,%eax
nopl   (%rax)
movapd %xmm6,%xmm2
mulsd  %xmm4,%xmm2
movapd %xmm6,%xmm3
mulsd  %xmm5,%xmm3
mulsd  %xmm0,%xmm5
subsd  %xmm2,%xmm5
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
movapd %xmm1,%xmm2
mulsd  %xmm5,%xmm2
addsd  (%rbx,%rax,8),%xmm2
movsd  %xmm2,(%rbx,%rax,8)
movapd %xmm1,%xmm2
mulsd  %xmm4,%xmm2
addsd  (%r14,%rax,8),%xmm2
movsd  %xmm2,(%r14,%rax,8)
add    $0x1,%rax
cmp    %rax,%r13
jne    14d0 <FDFT+0x3b0>
jmp    1420 <FDFT+0x300>
mov    0x4(%rsp),%r12d
test   %r12d,%r12d
movapd 0x50(%rsp),%xmm2
jle    1637 <FDFT+0x517>
cmp    $0x1,%r12d
jne    1545 <FDFT+0x425>
xor    %eax,%eax
jmp    1610 <FDFT+0x4f0>
lea    (%r14,%r13,8),%rax
cmp    %rbx,%rax
jbe    155e <FDFT+0x43e>
lea    (%rbx,%r13,8),%rax
cmp    %r14,%rax
jbe    155e <FDFT+0x43e>
xor    %eax,%eax
jmp    1610 <FDFT+0x4f0>
mov    %r13d,%eax
and    $0xfffffffe,%eax
movapd %xmm2,%xmm0
unpcklpd %xmm2,%xmm0
lea    -0x2(%rax),%rcx
mov    %rcx,%rdx
shr    %rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1646 <FDFT+0x526>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
nopl   0x0(%rax)
movupd (%rbx,%rcx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rcx,8)
movupd (%r14,%rcx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%r14,%rcx,8)
movupd 0x10(%rbx,%rcx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,0x10(%rbx,%rcx,8)
movupd 0x10(%r14,%rcx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,0x10(%r14,%rcx,8)
add    $0x4,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1590 <FDFT+0x470>
test   $0x1,%dl
je     15fd <FDFT+0x4dd>
movupd (%rbx,%rcx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%rbx,%rcx,8)
movupd (%r14,%rcx,8),%xmm1
divpd  %xmm0,%xmm1
movupd %xmm1,(%r14,%rcx,8)
cmp    %r13,%rax
je     1637 <FDFT+0x517>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rbx,%rax,8),%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,(%rbx,%rax,8)
movsd  (%r14,%rax,8),%xmm0
divsd  %xmm2,%xmm0
movsd  %xmm0,(%r14,%rax,8)
add    $0x1,%rax
cmp    %rax,%r13
jne    1610 <FDFT+0x4f0>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ecx,%ecx
test   $0x1,%dl
jne    15df <FDFT+0x4bf>
jmp    15fd <FDFT+0x4dd>

LLVM IR (-O0):
define void @FDFT(double* %0, double* %1, i32 %2, double %3, double %4, double* %5, double* %6) {
%8 = alloca double*
%9 = alloca double*
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
store double* %0, double** %8
store double* %1, double** %9
store i32 %2, i32* %10
store double %3, double* %11
store double %4, double* %12
store double* %5, double** %13
store double* %6, double** %14
store i32 0, i32* %15
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
br label %33
33: ; preds = %52, %7
%34 = load i32, i32* %15
%35 = load i32, i32* %10
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %55
37: ; preds = %33
%38 = load double*, double** %8
%39 = load i32, i32* %15
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
%42 = load double, double* %41
%43 = load double, double* %18
%44 = fadd double %43, %42
store double %44, double* %18
%45 = load double*, double** %9
%46 = load i32, i32* %15
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %45, i64 %47
%49 = load double, double* %48
%50 = load double, double* %19
%51 = fadd double %50, %49
store double %51, double* %19
br label %52
52: ; preds = %37
%53 = load i32, i32* %15
%54 = add nsw i32 %53, 1
store i32 %54, i32* %15
br label %33
55: ; preds = %33
%56 = load double, double* %18
%57 = load i32, i32* %10
%58 = sitofp i32 %57 to double
%59 = fdiv double %56, %58
store double %59, double* %18
%60 = load double, double* %19
%61 = load i32, i32* %10
%62 = sitofp i32 %61 to double
%63 = fdiv double %60, %62
store double %63, double* %19
%64 = load double, double* %12
%65 = call double @llvm.fmuladd.f64(double 2.000000e+00, double %64, double 1.000000e+00)
%66 = fptosi double %65 to i32
store i32 %66, i32* %17
store i32 0, i32* %15
br label %67
67: ; preds = %80, %55
%68 = load i32, i32* %15
%69 = load i32, i32* %17
%70 = icmp slt i32 %68, %69
br i1 %70, label %71, label %83
71: ; preds = %67
%72 = load double*, double** %13
%73 = load i32, i32* %15
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
store double 0.000000e+00, double* %75
%76 = load double*, double** %14
%77 = load i32, i32* %15
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
store double 0.000000e+00, double* %79
br label %80
80: ; preds = %71
%81 = load i32, i32* %15
%82 = add nsw i32 %81, 1
store i32 %82, i32* %15
br label %67
83: ; preds = %67
store i32 0, i32* %16
br label %84
84: ; preds = %163, %83
%85 = load i32, i32* %16
%86 = load i32, i32* %10
%87 = icmp slt i32 %85, %86
br i1 %87, label %88, label %166
88: ; preds = %84
%89 = load double, double* %12
%90 = fneg double %89
%91 = fsub double %90, 1.000000e+00
%92 = load double, double* %11
%93 = fmul double %91, %92
store double %93, double* %32
%94 = load double*, double** %8
%95 = load i32, i32* %16
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %94, i64 %96
%98 = load double, double* %97
%99 = load double, double* %18
%100 = fsub double %98, %99
%101 = fmul double 0x401921FB54442D18, %100
store double %101, double* %31
%102 = load double, double* %31
%103 = load double, double* %32
%104 = fmul double %102, %103
store double %104, double* %25
%105 = load double, double* %31
%106 = load double, double* %11
%107 = fmul double %105, %106
store double %107, double* %26
%108 = load double, double* %25
%109 = call double @sin(double %108)
store double %109, double* %29
%110 = load double, double* %25
%111 = call double @cos(double %110)
store double %111, double* %30
%112 = load double, double* %26
%113 = call double @sin(double %112)
store double %113, double* %27
%114 = load double, double* %26
%115 = call double @cos(double %114)
store double %115, double* %28
%116 = load double*, double** %9
%117 = load i32, i32* %16
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %116, i64 %118
%120 = load double, double* %119
%121 = load double, double* %19
%122 = fsub double %120, %121
store double %122, double* %24
store i32 0, i32* %15
br label %123
123: ; preds = %159, %88
%124 = load i32, i32* %15
%125 = load i32, i32* %17
%126 = icmp slt i32 %124, %125
br i1 %126, label %127, label %162
127: ; preds = %123
%128 = load double, double* %30
%129 = load double, double* %28
%130 = load double, double* %29
%131 = load double, double* %27
%132 = fmul double %130, %131
%133 = fneg double %132
%134 = call double @llvm.fmuladd.f64(double %128, double %129, double %133)
store double %134, double* %20
%135 = load double, double* %29
%136 = load double, double* %28
%137 = load double, double* %30
%138 = load double, double* %27
%139 = fmul double %137, %138
%140 = call double @llvm.fmuladd.f64(double %135, double %136, double %139)
store double %140, double* %21
%141 = load double, double* %24
%142 = load double, double* %20
%143 = load double*, double** %13
%144 = load i32, i32* %15
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %143, i64 %145
%147 = load double, double* %146
%148 = call double @llvm.fmuladd.f64(double %141, double %142, double %147)
store double %148, double* %146
%149 = load double, double* %24
%150 = load double, double* %21
%151 = load double*, double** %14
%152 = load i32, i32* %15
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %151, i64 %153
%155 = load double, double* %154
%156 = call double @llvm.fmuladd.f64(double %149, double %150, double %155)
store double %156, double* %154
%157 = load double, double* %20
store double %157, double* %30
%158 = load double, double* %21
store double %158, double* %29
br label %159
159: ; preds = %127
%160 = load i32, i32* %15
%161 = add nsw i32 %160, 1
store i32 %161, i32* %15
br label %123
162: ; preds = %123
br label %163
163: ; preds = %162
%164 = load i32, i32* %16
%165 = add nsw i32 %164, 1
store i32 %165, i32* %16
br label %84
166: ; preds = %84
store i32 0, i32* %15
br label %167
167: ; preds = %188, %166
%168 = load i32, i32* %15
%169 = load i32, i32* %17
%170 = icmp slt i32 %168, %169
br i1 %170, label %171, label %191
171: ; preds = %167
%172 = load i32, i32* %10
%173 = sitofp i32 %172 to double
%174 = load double*, double** %13
%175 = load i32, i32* %15
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds double, double* %174, i64 %176
%178 = load double, double* %177
%179 = fdiv double %178, %173
store double %179, double* %177
%180 = load i32, i32* %10
%181 = sitofp i32 %180 to double
%182 = load double*, double** %14
%183 = load i32, i32* %15
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds double, double* %182, i64 %184
%186 = load double, double* %185
%187 = fdiv double %186, %181
store double %187, double* %185
br label %188
188: ; preds = %171
%189 = load i32, i32* %15
%190 = add nsw i32 %189, 1
store i32 %190, i32* %15
br label %167
191: ; preds = %167
ret void
}

LLVM IR (-O2):
define void @FDFT(double* nocapture %0, double* nocapture %1, i32 %2, double %3, double %4, double* nocapture %5, double* nocapture %6) {
%8 = icmp sgt i32 %2, 0
br i1 %8, label %9, label %72
9: ; preds = %7
%10 = zext i32 %2 to i64
%11 = add nsw i64 %10, -1
%12 = and i64 %10, 3
%13 = icmp ult i64 %11, 3
br i1 %13, label %51, label %14
14: ; preds = %9
%15 = and i64 %10, 4294967292
br label %16
16: ; preds = %16, %14
%17 = phi i64 [ 0, %14 ], [ %48, %16 ]
%18 = phi double [ 0.000000e+00, %14 ], [ %44, %16 ]
%19 = phi double [ 0.000000e+00, %14 ], [ %47, %16 ]
%20 = phi i64 [ 0, %14 ], [ %49, %16 ]
%21 = getelementptr inbounds double, double* %0, i64 %17
%22 = load double, double* %21
%23 = fadd double %18, %22
%24 = getelementptr inbounds double, double* %1, i64 %17
%25 = load double, double* %24
%26 = fadd double %19, %25
%27 = or i64 %17, 1
%28 = getelementptr inbounds double, double* %0, i64 %27
%29 = load double, double* %28
%30 = fadd double %23, %29
%31 = getelementptr inbounds double, double* %1, i64 %27
%32 = load double, double* %31
%33 = fadd double %26, %32
%34 = or i64 %17, 2
%35 = getelementptr inbounds double, double* %0, i64 %34
%36 = load double, double* %35
%37 = fadd double %30, %36
%38 = getelementptr inbounds double, double* %1, i64 %34
%39 = load double, double* %38
%40 = fadd double %33, %39
%41 = or i64 %17, 3
%42 = getelementptr inbounds double, double* %0, i64 %41
%43 = load double, double* %42
%44 = fadd double %37, %43
%45 = getelementptr inbounds double, double* %1, i64 %41
%46 = load double, double* %45
%47 = fadd double %40, %46
%48 = add nuw nsw i64 %17, 4
%49 = add i64 %20, 4
%50 = icmp eq i64 %49, %15
br i1 %50, label %51, label %16
51: ; preds = %16, %9
%52 = phi double [ undef, %9 ], [ %44, %16 ]
%53 = phi double [ undef, %9 ], [ %47, %16 ]
%54 = phi i64 [ 0, %9 ], [ %48, %16 ]
%55 = phi double [ 0.000000e+00, %9 ], [ %44, %16 ]
%56 = phi double [ 0.000000e+00, %9 ], [ %47, %16 ]
%57 = icmp eq i64 %12, 0
br i1 %57, label %72, label %58
58: ; preds = %51, %58
%59 = phi i64 [ %69, %58 ], [ %54, %51 ]
%60 = phi double [ %65, %58 ], [ %55, %51 ]
%61 = phi double [ %68, %58 ], [ %56, %51 ]
%62 = phi i64 [ %70, %58 ], [ 0, %51 ]
%63 = getelementptr inbounds double, double* %0, i64 %59
%64 = load double, double* %63
%65 = fadd double %60, %64
%66 = getelementptr inbounds double, double* %1, i64 %59
%67 = load double, double* %66
%68 = fadd double %61, %67
%69 = add nuw nsw i64 %59, 1
%70 = add i64 %62, 1
%71 = icmp eq i64 %70, %12
br i1 %71, label %72, label %58
72: ; preds = %51, %58, %7
%73 = phi double [ 0.000000e+00, %7 ], [ %53, %51 ], [ %68, %58 ]
%74 = phi double [ 0.000000e+00, %7 ], [ %52, %51 ], [ %65, %58 ]
%75 = sitofp i32 %2 to double
%76 = fdiv double %74, %75
%77 = fdiv double %73, %75
%78 = tail call double @llvm.fmuladd.f64(double %4, double 2.000000e+00, double 1.000000e+00)
%79 = fptosi double %78 to i32
%80 = icmp sgt i32 %79, 0
br i1 %80, label %81, label %176
81: ; preds = %72
%82 = zext i32 %79 to i64
%83 = icmp ult i32 %79, 4
br i1 %83, label %159, label %84
84: ; preds = %81
%85 = getelementptr double, double* %5, i64 %82
%86 = getelementptr double, double* %6, i64 %82
%87 = icmp ugt double* %86, %5
%88 = icmp ugt double* %85, %6
%89 = and i1 %87, %88
br i1 %89, label %159, label %90
90: ; preds = %84
%91 = and i64 %82, 4294967292
%92 = add nsw i64 %91, -4
%93 = lshr exact i64 %92, 2
%94 = add nuw nsw i64 %93, 1
%95 = and i64 %94, 3
%96 = icmp ult i64 %92, 12
br i1 %96, label %140, label %97
97: ; preds = %90
%98 = and i64 %94, 9223372036854775804
br label %99
99: ; preds = %99, %97
%100 = phi i64 [ 0, %97 ], [ %137, %99 ]
%101 = phi i64 [ 0, %97 ], [ %138, %99 ]
%102 = getelementptr inbounds double, double* %5, i64 %100
%103 = bitcast double* %102 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %103
%104 = getelementptr inbounds double, double* %102, i64 2
%105 = bitcast double* %104 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %105
%106 = getelementptr inbounds double, double* %6, i64 %100
%107 = bitcast double* %106 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %107
%108 = getelementptr inbounds double, double* %106, i64 2
%109 = bitcast double* %108 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %109
%110 = or i64 %100, 4
%111 = getelementptr inbounds double, double* %5, i64 %110
%112 = bitcast double* %111 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %112
%113 = getelementptr inbounds double, double* %111, i64 2
%114 = bitcast double* %113 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %114
%115 = getelementptr inbounds double, double* %6, i64 %110
%116 = bitcast double* %115 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %116
%117 = getelementptr inbounds double, double* %115, i64 2
%118 = bitcast double* %117 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %118
%119 = or i64 %100, 8
%120 = getelementptr inbounds double, double* %5, i64 %119
%121 = bitcast double* %120 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %121
%122 = getelementptr inbounds double, double* %120, i64 2
%123 = bitcast double* %122 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %123
%124 = getelementptr inbounds double, double* %6, i64 %119
%125 = bitcast double* %124 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %125
%126 = getelementptr inbounds double, double* %124, i64 2
%127 = bitcast double* %126 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %127
%128 = or i64 %100, 12
%129 = getelementptr inbounds double, double* %5, i64 %128
%130 = bitcast double* %129 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %130
%131 = getelementptr inbounds double, double* %129, i64 2
%132 = bitcast double* %131 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %132
%133 = getelementptr inbounds double, double* %6, i64 %128
%134 = bitcast double* %133 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %134
%135 = getelementptr inbounds double, double* %133, i64 2
%136 = bitcast double* %135 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %136
%137 = add nuw i64 %100, 16
%138 = add nuw i64 %101, 4
%139 = icmp eq i64 %138, %98
br i1 %139, label %140, label %99
140: ; preds = %99, %90
%141 = phi i64 [ 0, %90 ], [ %137, %99 ]
%142 = icmp eq i64 %95, 0
br i1 %142, label %157, label %143
143: ; preds = %140, %143
%144 = phi i64 [ %154, %143 ], [ %141, %140 ]
%145 = phi i64 [ %155, %143 ], [ 0, %140 ]
%146 = getelementptr inbounds double, double* %5, i64 %144
%147 = bitcast double* %146 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %147
%148 = getelementptr inbounds double, double* %146, i64 2
%149 = bitcast double* %148 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %149
%150 = getelementptr inbounds double, double* %6, i64 %144
%151 = bitcast double* %150 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %151
%152 = getelementptr inbounds double, double* %150, i64 2
%153 = bitcast double* %152 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %153
%154 = add nuw i64 %144, 4
%155 = add i64 %145, 1
%156 = icmp eq i64 %155, %95
br i1 %156, label %157, label %143
157: ; preds = %143, %140
%158 = icmp eq i64 %91, %82
br i1 %158, label %176, label %159
159: ; preds = %84, %81, %157
%160 = phi i64 [ 0, %84 ], [ 0, %81 ], [ %91, %157 ]
%161 = xor i64 %160, -1
%162 = add nsw i64 %161, %82
%163 = and i64 %82, 3
%164 = icmp eq i64 %163, 0
br i1 %164, label %173, label %165
165: ; preds = %159, %165
%166 = phi i64 [ %170, %165 ], [ %160, %159 ]
%167 = phi i64 [ %171, %165 ], [ 0, %159 ]
%168 = getelementptr inbounds double, double* %5, i64 %166
store double 0.000000e+00, double* %168
%169 = getelementptr inbounds double, double* %6, i64 %166
store double 0.000000e+00, double* %169
%170 = add nuw nsw i64 %166, 1
%171 = add i64 %167, 1
%172 = icmp eq i64 %171, %163
br i1 %172, label %173, label %165
173: ; preds = %165, %159
%174 = phi i64 [ %160, %159 ], [ %170, %165 ]
%175 = icmp ult i64 %162, 3
br i1 %175, label %176, label %182
176: ; preds = %173, %182, %157, %72
br i1 %8, label %177, label %197
177: ; preds = %176
%178 = fsub double -1.000000e+00, %4
%179 = fmul double %178, %3
%180 = zext i32 %2 to i64
%181 = zext i32 %79 to i64
br label %263
182: ; preds = %173, %182
%183 = phi i64 [ %195, %182 ], [ %174, %173 ]
%184 = getelementptr inbounds double, double* %5, i64 %183
store double 0.000000e+00, double* %184
%185 = getelementptr inbounds double, double* %6, i64 %183
store double 0.000000e+00, double* %185
%186 = add nuw nsw i64 %183, 1
%187 = getelementptr inbounds double, double* %5, i64 %186
store double 0.000000e+00, double* %187
%188 = getelementptr inbounds double, double* %6, i64 %186
store double 0.000000e+00, double* %188
%189 = add nuw nsw i64 %183, 2
%190 = getelementptr inbounds double, double* %5, i64 %189
store double 0.000000e+00, double* %190
%191 = getelementptr inbounds double, double* %6, i64 %189
store double 0.000000e+00, double* %191
%192 = add nuw nsw i64 %183, 3
%193 = getelementptr inbounds double, double* %5, i64 %192
store double 0.000000e+00, double* %193
%194 = getelementptr inbounds double, double* %6, i64 %192
store double 0.000000e+00, double* %194
%195 = add nuw nsw i64 %183, 4
%196 = icmp eq i64 %195, %82
br i1 %196, label %176, label %182
197: ; preds = %295, %176
br i1 %80, label %198, label %308
198: ; preds = %197
%199 = zext i32 %79 to i64
%200 = icmp eq i32 %79, 1
br i1 %200, label %261, label %201
201: ; preds = %198
%202 = getelementptr double, double* %5, i64 %199
%203 = getelementptr double, double* %6, i64 %199
%204 = icmp ugt double* %203, %5
%205 = icmp ugt double* %202, %6
%206 = and i1 %204, %205
br i1 %206, label %261, label %207
207: ; preds = %201
%208 = and i64 %199, 4294967294
%209 = insertelement <2 x double> poison, double %75, i64 0
%210 = shufflevector <2 x double> %209, <2 x double> poison, <2 x i32> zeroinitializer
%211 = add nsw i64 %208, -2
%212 = lshr exact i64 %211, 1
%213 = add nuw i64 %212, 1
%214 = and i64 %213, 1
%215 = icmp eq i64 %211, 0
br i1 %215, label %245, label %216
216: ; preds = %207
%217 = and i64 %213, -2
br label %218
218: ; preds = %218, %216
%219 = phi i64 [ 0, %216 ], [ %242, %218 ]
%220 = phi i64 [ 0, %216 ], [ %243, %218 ]
%221 = getelementptr inbounds double, double* %5, i64 %219
%222 = bitcast double* %221 to <2 x double>*
%223 = load <2 x double>, <2 x double>* %222
%224 = fdiv <2 x double> %223, %210
%225 = bitcast double* %221 to <2 x double>*
store <2 x double> %224, <2 x double>* %225
%226 = getelementptr inbounds double, double* %6, i64 %219
%227 = bitcast double* %226 to <2 x double>*
%228 = load <2 x double>, <2 x double>* %227
%229 = fdiv <2 x double> %228, %210
%230 = bitcast double* %226 to <2 x double>*
store <2 x double> %229, <2 x double>* %230
%231 = or i64 %219, 2
%232 = getelementptr inbounds double, double* %5, i64 %231
%233 = bitcast double* %232 to <2 x double>*
%234 = load <2 x double>, <2 x double>* %233
%235 = fdiv <2 x double> %234, %210
%236 = bitcast double* %232 to <2 x double>*
store <2 x double> %235, <2 x double>* %236
%237 = getelementptr inbounds double, double* %6, i64 %231
%238 = bitcast double* %237 to <2 x double>*
%239 = load <2 x double>, <2 x double>* %238
%240 = fdiv <2 x double> %239, %210
%241 = bitcast double* %237 to <2 x double>*
store <2 x double> %240, <2 x double>* %241
%242 = add nuw i64 %219, 4
%243 = add nuw i64 %220, 2
%244 = icmp eq i64 %243, %217
br i1 %244, label %245, label %218
245: ; preds = %218, %207
%246 = phi i64 [ 0, %207 ], [ %242, %218 ]
%247 = icmp eq i64 %214, 0
br i1 %247, label %259, label %248
248: ; preds = %245
%249 = getelementptr inbounds double, double* %5, i64 %246
%250 = bitcast double* %249 to <2 x double>*
%251 = load <2 x double>, <2 x double>* %250
%252 = fdiv <2 x double> %251, %210
%253 = bitcast double* %249 to <2 x double>*
store <2 x double> %252, <2 x double>* %253
%254 = getelementptr inbounds double, double* %6, i64 %246
%255 = bitcast double* %254 to <2 x double>*
%256 = load <2 x double>, <2 x double>* %255
%257 = fdiv <2 x double> %256, %210
%258 = bitcast double* %254 to <2 x double>*
store <2 x double> %257, <2 x double>* %258
br label %259
259: ; preds = %245, %248
%260 = icmp eq i64 %208, %199
br i1 %260, label %308, label %261
261: ; preds = %201, %198, %259
%262 = phi i64 [ 0, %201 ], [ 0, %198 ], [ %208, %259 ]
br label %298
263: ; preds = %177, %295
%264 = phi i64 [ 0, %177 ], [ %296, %295 ]
%265 = getelementptr inbounds double, double* %0, i64 %264
%266 = load double, double* %265
%267 = fsub double %266, %76
%268 = fmul double %267, 0x401921FB54442D18
%269 = fmul double %179, %268
%270 = fmul double %268, %3
%271 = tail call double @sin(double %269)
%272 = tail call double @cos(double %269)
%273 = tail call double @sin(double %270)
%274 = tail call double @cos(double %270)
%275 = getelementptr inbounds double, double* %1, i64 %264
%276 = load double, double* %275
%277 = fsub double %276, %77
br i1 %80, label %278, label %295
278: ; preds = %263, %278
%279 = phi i64 [ %293, %278 ], [ 0, %263 ]
%280 = phi double [ %284, %278 ], [ %272, %263 ]
%281 = phi double [ %286, %278 ], [ %271, %263 ]
%282 = fneg double %281
%283 = fmul double %273, %282
%284 = tail call double @llvm.fmuladd.f64(double %280, double %274, double %283)
%285 = fmul double %273, %280
%286 = tail call double @llvm.fmuladd.f64(double %281, double %274, double %285)
%287 = getelementptr inbounds double, double* %5, i64 %279
%288 = load double, double* %287
%289 = tail call double @llvm.fmuladd.f64(double %277, double %284, double %288)
store double %289, double* %287
%290 = getelementptr inbounds double, double* %6, i64 %279
%291 = load double, double* %290
%292 = tail call double @llvm.fmuladd.f64(double %277, double %286, double %291)
store double %292, double* %290
%293 = add nuw nsw i64 %279, 1
%294 = icmp eq i64 %293, %181
br i1 %294, label %295, label %278
295: ; preds = %278, %263
%296 = add nuw nsw i64 %264, 1
%297 = icmp eq i64 %296, %180
br i1 %297, label %197, label %263
298: ; preds = %261, %298
%299 = phi i64 [ %306, %298 ], [ %262, %261 ]
%300 = getelementptr inbounds double, double* %5, i64 %299
%301 = load double, double* %300
%302 = fdiv double %301, %75
store double %302, double* %300
%303 = getelementptr inbounds double, double* %6, i64 %299
%304 = load double, double* %303
%305 = fdiv double %304, %75
store double %305, double* %303
%306 = add nuw nsw i64 %299, 1
%307 = icmp eq i64 %306, %199
br i1 %307, label %308, label %298
308: ; preds = %298, %259, %197
ret void
}