#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_Wfunc(double *x, int N, double df, double Nf, double *W_r,
                double *W_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.; i < N; i++) {
    avx += x[i];
  }
  avx = avx / N;
  Ntot = 2 * Nf + 1;
  for (i = 0; i < Ntot; i++) {
    W_r[i] = 0.;
    W_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);
    for (i = 0; i < Ntot; i++) {
      c = c0 * cdf - s0 * sdf;
      s = s0 * cdf + c0 * sdf;
      W_r[i] += c;
      W_i[i] += s;
      c0 = c;
      s0 = s;
    }
  }
  for (i = 0; i < Ntot; i++) {
    W_r[i] /= (double)N;
    W_i[i] /= (double)N;
  }
}


x86 assembly (clang, -O0):
<FDFT_Wfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1184 <FDFT_Wfunc+0x64>
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1153 <FDFT_Wfunc+0x33>
movsd  -0x48(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  0xe58(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x3c(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    11f4 <FDFT_Wfunc+0xd4>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11ba <FDFT_Wfunc+0x9a>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    13c7 <FDFT_Wfunc+0x2a7>
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xdd5(%rip),%xmm1
subsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x8(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
subsd  -0x48(%rbp),%xmm1
movsd  0xdb2(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1030 <sin@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1040 <cos@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    13b4 <FDFT_Wfunc+0x294>
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12e1 <FDFT_Wfunc+0x1c1>
jmp    13b9 <FDFT_Wfunc+0x299>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11fb <FDFT_Wfunc+0xdb>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    141e <FDFT_Wfunc+0x2fe>
cvtsi2sdl -0xc(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
cvtsi2sdl -0xc(%rbp),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    13ce <FDFT_Wfunc+0x2ae>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FDFT_Wfunc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rcx,%r14
mov    %rdx,%rbx
movsd  %xmm0,0x10(%rsp)
mov    %rdi,%r15
mov    %esi,%ebp
test   %esi,%esi
jle    115a <FDFT_Wfunc+0x3a>
lea    -0x1(%rbp),%rcx
mov    %ebp,%eax
and    $0x7,%eax
cmp    $0x7,%rcx
jae    1160 <FDFT_Wfunc+0x40>
xorpd  %xmm2,%xmm2
xor    %ecx,%ecx
jmp    11b0 <FDFT_Wfunc+0x90>
xorpd  %xmm2,%xmm2
jmp    11ce <FDFT_Wfunc+0xae>
mov    %ebp,%edx
and    $0xfffffff8,%edx
xorpd  %xmm2,%xmm2
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
addsd  (%r15,%rcx,8),%xmm2
addsd  0x8(%r15,%rcx,8),%xmm2
addsd  0x10(%r15,%rcx,8),%xmm2
addsd  0x18(%r15,%rcx,8),%xmm2
addsd  0x20(%r15,%rcx,8),%xmm2
addsd  0x28(%r15,%rcx,8),%xmm2
addsd  0x30(%r15,%rcx,8),%xmm2
addsd  0x38(%r15,%rcx,8),%xmm2
add    $0x8,%rcx
cmp    %rcx,%rdx
jne    1170 <FDFT_Wfunc+0x50>
test   %rax,%rax
je     11ce <FDFT_Wfunc+0xae>
lea    (%r15,%rcx,8),%rcx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
addsd  (%rcx,%rdx,8),%xmm2
add    $0x1,%rdx
cmp    %rdx,%rax
jne    11c0 <FDFT_Wfunc+0xa0>
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
addsd  0xe22(%rip),%xmm0
cvttsd2si %xmm0,%r9d
mov    %r9d,%r12d
test   %r9d,%r9d
jle    13a8 <FDFT_Wfunc+0x288>
cmp    $0x4,%r9d
jb     120f <FDFT_Wfunc+0xef>
lea    (%r14,%r12,8),%rax
cmp    %rbx,%rax
jbe    12b4 <FDFT_Wfunc+0x194>
lea    (%rbx,%r12,8),%rax
cmp    %r14,%rax
jbe    12b4 <FDFT_Wfunc+0x194>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r12,%rcx
mov    %r12,%rdx
and    $0x3,%rdx
je     124a <FDFT_Wfunc+0x12a>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movq   $0x0,(%rbx,%rax,8)
movq   $0x0,(%r14,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1230 <FDFT_Wfunc+0x110>
cmp    $0x3,%rcx
jb     13a8 <FDFT_Wfunc+0x288>
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,%r12
jne    1260 <FDFT_Wfunc+0x140>
jmp    13a8 <FDFT_Wfunc+0x288>
mov    %r12d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%r8d
and    $0x3,%r8d
cmp    $0xc,%rcx
jae    12dd <FDFT_Wfunc+0x1bd>
xor    %edi,%edi
jmp    1360 <FDFT_Wfunc+0x240>
and    $0xfffffffffffffffc,%rdx
xor    %edi,%edi
xorpd  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
movupd %xmm0,(%rbx,%rdi,8)
movupd %xmm0,0x10(%rbx,%rdi,8)
movupd %xmm0,(%r14,%rdi,8)
movupd %xmm0,0x10(%r14,%rdi,8)
movupd %xmm0,0x20(%rbx,%rdi,8)
movupd %xmm0,0x30(%rbx,%rdi,8)
movupd %xmm0,0x20(%r14,%rdi,8)
movupd %xmm0,0x30(%r14,%rdi,8)
movupd %xmm0,0x40(%rbx,%rdi,8)
movupd %xmm0,0x50(%rbx,%rdi,8)
movupd %xmm0,0x40(%r14,%rdi,8)
movupd %xmm0,0x50(%r14,%rdi,8)
movupd %xmm0,0x60(%rbx,%rdi,8)
movupd %xmm0,0x70(%rbx,%rdi,8)
movupd %xmm0,0x60(%r14,%rdi,8)
movupd %xmm0,0x70(%r14,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rdx
jne    12f0 <FDFT_Wfunc+0x1d0>
test   %r8,%r8
je     139f <FDFT_Wfunc+0x27f>
lea    (%r14,%rdi,8),%rdx
add    $0x10,%rdx
lea    (%rbx,%rdi,8),%rdi
add    $0x10,%rdi
shl    $0x5,%r8
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
nop
movupd %xmm0,-0x10(%rdi,%rcx,1)
movupd %xmm0,(%rdi,%rcx,1)
movupd %xmm0,-0x10(%rdx,%rcx,1)
movupd %xmm0,(%rdx,%rcx,1)
add    $0x20,%rcx
cmp    %rcx,%r8
jne    1380 <FDFT_Wfunc+0x260>
cmp    %r12,%rax
jne    1211 <FDFT_Wfunc+0xf1>
mov    %r9d,0x4(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movapd %xmm0,0x40(%rsp)
test   %esi,%esi
jle    14dc <FDFT_Wfunc+0x3bc>
divsd  0x40(%rsp),%xmm2
movsd  0xc38(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
xor    %r13d,%r13d
movsd  %xmm2,0x28(%rsp)
jmp    1403 <FDFT_Wfunc+0x2e3>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r13
cmp    %rbp,%r13
movsd  0x28(%rsp),%xmm2
je     14dc <FDFT_Wfunc+0x3bc>
movsd  (%r15,%r13,8),%xmm1
subsd  %xmm2,%xmm1
mulsd  0xbfb(%rip),%xmm1
movsd  0x20(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x18(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x18(%rsp),%xmm0
call   1040 <cos@plt>
movsd  0x30(%rsp),%xmm5
movsd  0x8(%rsp),%xmm4
movsd  0x38(%rsp),%xmm3
cmpl   $0x0,0x4(%rsp)
jle    13f0 <FDFT_Wfunc+0x2d0>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movapd %xmm5,%xmm1
mulsd  %xmm3,%xmm1
movapd %xmm5,%xmm2
mulsd  %xmm4,%xmm2
mulsd  %xmm0,%xmm4
subsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
movsd  (%rbx,%rax,8),%xmm1
addsd  %xmm4,%xmm1
movsd  %xmm1,(%rbx,%rax,8)
movsd  (%r14,%rax,8),%xmm1
addsd  %xmm3,%xmm1
movsd  %xmm1,(%r14,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    1490 <FDFT_Wfunc+0x370>
jmp    13f0 <FDFT_Wfunc+0x2d0>
mov    0x4(%rsp),%eax
test   %eax,%eax
movapd 0x40(%rsp),%xmm2
jle    15f7 <FDFT_Wfunc+0x4d7>
cmp    $0x1,%eax
jne    14fa <FDFT_Wfunc+0x3da>
xor    %eax,%eax
jmp    15d0 <FDFT_Wfunc+0x4b0>
lea    (%r14,%r12,8),%rax
cmp    %rbx,%rax
jbe    1513 <FDFT_Wfunc+0x3f3>
lea    (%rbx,%r12,8),%rax
cmp    %r14,%rax
jbe    1513 <FDFT_Wfunc+0x3f3>
xor    %eax,%eax
jmp    15d0 <FDFT_Wfunc+0x4b0>
mov    %r12d,%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     1606 <FDFT_Wfunc+0x4e6>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
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    1550 <FDFT_Wfunc+0x430>
test   $0x1,%dl
je     15bd <FDFT_Wfunc+0x49d>
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    %r12,%rax
je     15f7 <FDFT_Wfunc+0x4d7>
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,%r12
jne    15d0 <FDFT_Wfunc+0x4b0>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ecx,%ecx
test   $0x1,%dl
jne    159f <FDFT_Wfunc+0x47f>
jmp    15bd <FDFT_Wfunc+0x49d>

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

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