#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(long double);
double sin(long double);
void fft_rec(int N, int offset, int delta, double (*x)[2], double (*X)[2],
             double (*XX)[2]) {
  int N2 = N / 2;
  int k;
  double cs, sn;
  int k00, k01, k10, k11;
  double tmp0, tmp1;
  if (N != 2) {
    fft_rec(N2, offset, 2 * delta, x, XX, X);
    fft_rec(N2, offset + delta, 2 * delta, x, XX, X);
    for (k = 0; k < N2; k++) {
      k00 = offset + k * delta;
      k01 = k00 + N2 * delta;
      k10 = offset + 2 * k * delta;
      k11 = k10 + delta;
      cs = cos((6.2831853071795864769252867665590057683943L) * k / (double)N);
      sn = sin((6.2831853071795864769252867665590057683943L) * k / (double)N);
      tmp0 = cs * XX[k11][0] + sn * XX[k11][1];
      tmp1 = cs * XX[k11][1] - sn * XX[k11][0];
      X[k01][0] = XX[k10][0] - tmp0;
      X[k01][1] = XX[k10][1] - tmp1;
      X[k00][0] = XX[k10][0] + tmp0;
      X[k00][1] = XX[k10][1] + tmp1;
    }
  } else {
    k00 = offset;
    k01 = k00 + delta;
    X[k01][0] = x[k00][0] - x[k01][0];
    X[k01][1] = x[k00][1] - x[k01][1];
    X[k00][0] = x[k00][0] + x[k01][0];
    X[k00][1] = x[k00][1] + x[k01][1];
  }
}


x86 assembly (clang, -O0):
<fft_rec>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x2c(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     13b7 <fft_rec+0x287>
mov    -0x2c(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
shl    $0x1,%edx
mov    -0x18(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1050 <fft_rec@plt>
mov    -0x2c(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
shl    $0x1,%edx
mov    -0x18(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1050 <fft_rec@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13b2 <fft_rec+0x282>
mov    -0x8(%rbp),%eax
mov    -0x30(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x2c(%rbp),%ecx
mov    -0xc(%rbp),%edx
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0x48(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x30(%rbp),%edx
mov    -0xc(%rbp),%eax
imul   %eax,%edx
mov    %ecx,%eax
mov    %edx,%ecx
lea    (%rax,%rcx,2),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x68(%rbp)
fildl  -0x68(%rbp)
fldt   0xdf6(%rip)
fld    %st(0)
fstpt  -0x84(%rbp)
fmulp  %st,%st(1)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
fldl   -0x70(%rbp)
fdivrp %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <cos@plt>
fldt   -0x84(%rbp)
movsd  %xmm0,-0x38(%rbp)
mov    -0x30(%rbp),%eax
mov    %eax,-0x64(%rbp)
fildl  -0x64(%rbp)
fmulp  %st,%st(1)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
fldl   -0x78(%rbp)
fdivrp %st,%st(1)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <sin@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x50(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm2
movsd  -0x40(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x50(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x50(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm2
movsd  -0x40(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x50(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
mulsd  (%rax),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
addsd  -0x58(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
addsd  -0x60(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11ac <fft_rec+0x7c>
jmp    14b0 <fft_rec+0x380>
mov    -0x8(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
subsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
subsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
addsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x48(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
addsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movsd  %xmm0,0x8(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fft_rec>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r8,%r12
mov    %rcx,%rbp
mov    %rdx,0x10(%rsp)
mov    %esi,%ebx
cmp    $0x2,%edi
jne    11b4 <fft_rec+0x84>
mov    0x10(%rsp),%rcx
add    %ebx,%ecx
movslq %ebx,%rax
shl    $0x4,%rax
movsd  0x0(%rbp,%rax,1),%xmm0
movslq %ecx,%rcx
shl    $0x4,%rcx
subsd  0x0(%rbp,%rcx,1),%xmm0
movsd  %xmm0,(%r12,%rcx,1)
movsd  0x8(%rbp,%rax,1),%xmm0
subsd  0x8(%rbp,%rcx,1),%xmm0
movsd  %xmm0,0x8(%r12,%rcx,1)
movsd  0x0(%rbp,%rax,1),%xmm0
addsd  0x0(%rbp,%rcx,1),%xmm0
movsd  %xmm0,(%r12,%rax,1)
movsd  0x8(%rbp,%rax,1),%xmm0
addsd  0x8(%rbp,%rcx,1),%xmm0
movsd  %xmm0,0x8(%r12,%rax,1)
jmp    134e <fft_rec+0x21e>
mov    %r9,%r15
mov    %edi,%r13d
shr    $0x1f,%r13d
add    %edi,%r13d
sar    %r13d
mov    0x10(%rsp),%r14
lea    (%r14,%r14,1),%edx
mov    %edx,0x24(%rsp)
mov    %edi,0x18(%rsp)
mov    %r13d,%edi
mov    %ebx,%esi
mov    %rbp,%rcx
mov    %r9,%r8
mov    %r12,%r9
call   1050 <fft_rec@plt>
lea    (%r14,%rbx,1),%esi
mov    0x24(%rsp),%r14d
mov    %r13d,%edi
mov    %r14d,%edx
mov    %rbp,%rcx
mov    %r15,%r8
mov    %r12,%r9
call   1050 <fft_rec@plt>
mov    0x18(%rsp),%ecx
cmp    $0x2,%ecx
jl     134e <fft_rec+0x21e>
mov    %r13d,%eax
mov    %rax,0x48(%rsp)
mov    0x10(%rsp),%rax
imul   %eax,%r13d
mov    %ecx,0x2c(%rsp)
fildl  0x2c(%rsp)
fstpt  0x60(%rsp)
movslq %eax,%rcx
movslq %ebx,%rdx
movslq %r13d,%rax
shl    $0x4,%rdx
shl    $0x4,%rcx
mov    %rcx,0x40(%rsp)
shl    $0x4,%rax
add    %rdx,%rax
add    $0x8,%rax
mov    %rax,0x30(%rsp)
or     $0x8,%rdx
mov    %rdx,0x38(%rsp)
xor    %ebp,%ebp
fldt   0xd9a(%rip)
fstpt  0x54(%rsp)
nopw   0x0(%rax,%rax,1)
mov    0x10(%rsp),%rax
mov    %r14d,%r13d
lea    (%rax,%rbx,1),%r14d
mov    %ebp,0x28(%rsp)
fldt   0x54(%rsp)
fimull 0x28(%rsp)
fldt   0x60(%rsp)
fdivrp %st,%st(1)
fld    %st(0)
fstpt  0x6c(%rsp)
fstpt  (%rsp)
call   1040 <cos@plt>
movsd  %xmm0,0x18(%rsp)
fldt   0x6c(%rsp)
fstpt  (%rsp)
call   1030 <sin@plt>
movslq %r14d,%rax
mov    %r13d,%r14d
shl    $0x4,%rax
movsd  (%r15,%rax,1),%xmm1
movsd  0x8(%r15,%rax,1),%xmm2
movsd  0x18(%rsp),%xmm4
movapd %xmm4,%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm4
subsd  %xmm1,%xmm4
movslq %ebx,%rbx
mov    %rbx,%rax
shl    $0x4,%rax
movsd  (%r15,%rax,1),%xmm0
subsd  %xmm3,%xmm0
mov    0x30(%rsp),%rcx
movsd  %xmm0,-0x8(%r12,%rcx,1)
movsd  0x8(%r15,%rax,1),%xmm0
subsd  %xmm4,%xmm0
movsd  %xmm0,(%r12,%rcx,1)
addsd  (%r15,%rax,1),%xmm3
mov    0x38(%rsp),%rcx
movsd  %xmm3,-0x8(%r12,%rcx,1)
addsd  0x8(%r15,%rax,1),%xmm4
movsd  %xmm4,(%r12,%rcx,1)
add    $0x1,%rbp
add    0x40(%rsp),%r12
add    %r13d,%ebx
cmp    %rbp,0x48(%rsp)
jne    1270 <fft_rec+0x140>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @fft_rec(i32 %0, i32 %1, i32 %2, [2 x double]* %3, [2 x double]* %4, [2 x double]* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [2 x double]*
%11 = alloca [2 x double]*
%12 = alloca [2 x double]*
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca double
%22 = alloca double
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store [2 x double]* %3, [2 x double]** %10
store [2 x double]* %4, [2 x double]** %11
store [2 x double]* %5, [2 x double]** %12
%23 = load i32, i32* %7
%24 = sdiv i32 %23, 2
store i32 %24, i32* %13
%25 = load i32, i32* %7
%26 = icmp ne i32 %25, 2
br i1 %26, label %27, label %173
27: ; preds = %6
%28 = load i32, i32* %13
%29 = load i32, i32* %8
%30 = load i32, i32* %9
%31 = mul nsw i32 2, %30
%32 = load [2 x double]*, [2 x double]** %10
%33 = load [2 x double]*, [2 x double]** %12
%34 = load [2 x double]*, [2 x double]** %11
%35 = load i32, i32* %13
%36 = load i32, i32* %8
%37 = load i32, i32* %9
%38 = add nsw i32 %36, %37
%39 = load i32, i32* %9
%40 = mul nsw i32 2, %39
%41 = load [2 x double]*, [2 x double]** %10
%42 = load [2 x double]*, [2 x double]** %12
%43 = load [2 x double]*, [2 x double]** %11
store i32 0, i32* %14
br label %44
44: ; preds = %169, %27
%45 = load i32, i32* %14
%46 = load i32, i32* %13
%47 = icmp slt i32 %45, %46
br i1 %47, label %48, label %172
48: ; preds = %44
%49 = load i32, i32* %8
%50 = load i32, i32* %14
%51 = load i32, i32* %9
%52 = mul nsw i32 %50, %51
%53 = add nsw i32 %49, %52
store i32 %53, i32* %17
%54 = load i32, i32* %17
%55 = load i32, i32* %13
%56 = load i32, i32* %9
%57 = mul nsw i32 %55, %56
%58 = add nsw i32 %54, %57
store i32 %58, i32* %18
%59 = load i32, i32* %8
%60 = load i32, i32* %14
%61 = mul nsw i32 2, %60
%62 = load i32, i32* %9
%63 = mul nsw i32 %61, %62
%64 = add nsw i32 %59, %63
store i32 %64, i32* %19
%65 = load i32, i32* %19
%66 = load i32, i32* %9
%67 = add nsw i32 %65, %66
store i32 %67, i32* %20
%68 = load i32, i32* %14
%69 = sitofp i32 %68 to x86_fp80
%70 = fmul x86_fp80 0xK4001C90FDAA22168C235, %69
%71 = load i32, i32* %7
%72 = sitofp i32 %71 to double
%73 = fpext double %72 to x86_fp80
%74 = fdiv x86_fp80 %70, %73
%75 = call double @cos(x86_fp80 %74)
store double %75, double* %15
%76 = load i32, i32* %14
%77 = sitofp i32 %76 to x86_fp80
%78 = fmul x86_fp80 0xK4001C90FDAA22168C235, %77
%79 = load i32, i32* %7
%80 = sitofp i32 %79 to double
%81 = fpext double %80 to x86_fp80
%82 = fdiv x86_fp80 %78, %81
%83 = call double @sin(x86_fp80 %82)
store double %83, double* %16
%84 = load double, double* %15
%85 = load [2 x double]*, [2 x double]** %12
%86 = load i32, i32* %20
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [2 x double], [2 x double]* %85, i64 %87
%89 = getelementptr inbounds [2 x double], [2 x double]* %88, i64 0, i64 0
%90 = load double, double* %89
%91 = load double, double* %16
%92 = load [2 x double]*, [2 x double]** %12
%93 = load i32, i32* %20
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [2 x double], [2 x double]* %92, i64 %94
%96 = getelementptr inbounds [2 x double], [2 x double]* %95, i64 0, i64 1
%97 = load double, double* %96
%98 = fmul double %91, %97
%99 = call double @llvm.fmuladd.f64(double %84, double %90, double %98)
store double %99, double* %21
%100 = load double, double* %15
%101 = load [2 x double]*, [2 x double]** %12
%102 = load i32, i32* %20
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds [2 x double], [2 x double]* %101, i64 %103
%105 = getelementptr inbounds [2 x double], [2 x double]* %104, i64 0, i64 1
%106 = load double, double* %105
%107 = load double, double* %16
%108 = load [2 x double]*, [2 x double]** %12
%109 = load i32, i32* %20
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [2 x double], [2 x double]* %108, i64 %110
%112 = getelementptr inbounds [2 x double], [2 x double]* %111, i64 0, i64 0
%113 = load double, double* %112
%114 = fmul double %107, %113
%115 = fneg double %114
%116 = call double @llvm.fmuladd.f64(double %100, double %106, double %115)
store double %116, double* %22
%117 = load [2 x double]*, [2 x double]** %12
%118 = load i32, i32* %19
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [2 x double], [2 x double]* %117, i64 %119
%121 = getelementptr inbounds [2 x double], [2 x double]* %120, i64 0, i64 0
%122 = load double, double* %121
%123 = load double, double* %21
%124 = fsub double %122, %123
%125 = load [2 x double]*, [2 x double]** %11
%126 = load i32, i32* %18
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [2 x double], [2 x double]* %125, i64 %127
%129 = getelementptr inbounds [2 x double], [2 x double]* %128, i64 0, i64 0
store double %124, double* %129
%130 = load [2 x double]*, [2 x double]** %12
%131 = load i32, i32* %19
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [2 x double], [2 x double]* %130, i64 %132
%134 = getelementptr inbounds [2 x double], [2 x double]* %133, i64 0, i64 1
%135 = load double, double* %134
%136 = load double, double* %22
%137 = fsub double %135, %136
%138 = load [2 x double]*, [2 x double]** %11
%139 = load i32, i32* %18
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [2 x double], [2 x double]* %138, i64 %140
%142 = getelementptr inbounds [2 x double], [2 x double]* %141, i64 0, i64 1
store double %137, double* %142
%143 = load [2 x double]*, [2 x double]** %12
%144 = load i32, i32* %19
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds [2 x double], [2 x double]* %143, i64 %145
%147 = getelementptr inbounds [2 x double], [2 x double]* %146, i64 0, i64 0
%148 = load double, double* %147
%149 = load double, double* %21
%150 = fadd double %148, %149
%151 = load [2 x double]*, [2 x double]** %11
%152 = load i32, i32* %17
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [2 x double], [2 x double]* %151, i64 %153
%155 = getelementptr inbounds [2 x double], [2 x double]* %154, i64 0, i64 0
store double %150, double* %155
%156 = load [2 x double]*, [2 x double]** %12
%157 = load i32, i32* %19
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds [2 x double], [2 x double]* %156, i64 %158
%160 = getelementptr inbounds [2 x double], [2 x double]* %159, i64 0, i64 1
%161 = load double, double* %160
%162 = load double, double* %22
%163 = fadd double %161, %162
%164 = load [2 x double]*, [2 x double]** %11
%165 = load i32, i32* %17
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds [2 x double], [2 x double]* %164, i64 %166
%168 = getelementptr inbounds [2 x double], [2 x double]* %167, i64 0, i64 1
store double %163, double* %168
br label %169
169: ; preds = %48
%170 = load i32, i32* %14
%171 = add nsw i32 %170, 1
store i32 %171, i32* %14
br label %44
172: ; preds = %44
br label %250
173: ; preds = %6
%174 = load i32, i32* %8
store i32 %174, i32* %17
%175 = load i32, i32* %17
%176 = load i32, i32* %9
%177 = add nsw i32 %175, %176
store i32 %177, i32* %18
%178 = load [2 x double]*, [2 x double]** %10
%179 = load i32, i32* %17
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds [2 x double], [2 x double]* %178, i64 %180
%182 = getelementptr inbounds [2 x double], [2 x double]* %181, i64 0, i64 0
%183 = load double, double* %182
%184 = load [2 x double]*, [2 x double]** %10
%185 = load i32, i32* %18
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds [2 x double], [2 x double]* %184, i64 %186
%188 = getelementptr inbounds [2 x double], [2 x double]* %187, i64 0, i64 0
%189 = load double, double* %188
%190 = fsub double %183, %189
%191 = load [2 x double]*, [2 x double]** %11
%192 = load i32, i32* %18
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds [2 x double], [2 x double]* %191, i64 %193
%195 = getelementptr inbounds [2 x double], [2 x double]* %194, i64 0, i64 0
store double %190, double* %195
%196 = load [2 x double]*, [2 x double]** %10
%197 = load i32, i32* %17
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds [2 x double], [2 x double]* %196, i64 %198
%200 = getelementptr inbounds [2 x double], [2 x double]* %199, i64 0, i64 1
%201 = load double, double* %200
%202 = load [2 x double]*, [2 x double]** %10
%203 = load i32, i32* %18
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds [2 x double], [2 x double]* %202, i64 %204
%206 = getelementptr inbounds [2 x double], [2 x double]* %205, i64 0, i64 1
%207 = load double, double* %206
%208 = fsub double %201, %207
%209 = load [2 x double]*, [2 x double]** %11
%210 = load i32, i32* %18
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds [2 x double], [2 x double]* %209, i64 %211
%213 = getelementptr inbounds [2 x double], [2 x double]* %212, i64 0, i64 1
store double %208, double* %213
%214 = load [2 x double]*, [2 x double]** %10
%215 = load i32, i32* %17
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds [2 x double], [2 x double]* %214, i64 %216
%218 = getelementptr inbounds [2 x double], [2 x double]* %217, i64 0, i64 0
%219 = load double, double* %218
%220 = load [2 x double]*, [2 x double]** %10
%221 = load i32, i32* %18
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds [2 x double], [2 x double]* %220, i64 %222
%224 = getelementptr inbounds [2 x double], [2 x double]* %223, i64 0, i64 0
%225 = load double, double* %224
%226 = fadd double %219, %225
%227 = load [2 x double]*, [2 x double]** %11
%228 = load i32, i32* %17
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds [2 x double], [2 x double]* %227, i64 %229
%231 = getelementptr inbounds [2 x double], [2 x double]* %230, i64 0, i64 0
store double %226, double* %231
%232 = load [2 x double]*, [2 x double]** %10
%233 = load i32, i32* %17
%234 = sext i32 %233 to i64
%235 = getelementptr inbounds [2 x double], [2 x double]* %232, i64 %234
%236 = getelementptr inbounds [2 x double], [2 x double]* %235, i64 0, i64 1
%237 = load double, double* %236
%238 = load [2 x double]*, [2 x double]** %10
%239 = load i32, i32* %18
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds [2 x double], [2 x double]* %238, i64 %240
%242 = getelementptr inbounds [2 x double], [2 x double]* %241, i64 0, i64 1
%243 = load double, double* %242
%244 = fadd double %237, %243
%245 = load [2 x double]*, [2 x double]** %11
%246 = load i32, i32* %17
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds [2 x double], [2 x double]* %245, i64 %247
%249 = getelementptr inbounds [2 x double], [2 x double]* %248, i64 0, i64 1
store double %244, double* %249
br label %250
250: ; preds = %173, %172
ret void
}

LLVM IR (-O2):
define void @fft_rec(i32 %0, i32 %1, i32 %2, [2 x double]* %3, [2 x double]* nocapture %4, [2 x double]* nocapture %5) {
%7 = sdiv i32 %0, 2
%8 = icmp eq i32 %0, 2
br i1 %8, label %61, label %9
9: ; preds = %6
%10 = shl i32 %2, 1
tail call void @fft_rec(i32 %7, i32 %1, i32 %10, [2 x double]* %3, [2 x double]* %5, [2 x double]* %4)
%11 = add nsw i32 %2, %1
tail call void @fft_rec(i32 %7, i32 %11, i32 %10, [2 x double]* %3, [2 x double]* %5, [2 x double]* %4)
%12 = icmp sgt i32 %0, 1
br i1 %12, label %13, label %85
13: ; preds = %9
%14 = mul nsw i32 %7, %2
%15 = sitofp i32 %0 to x86_fp80
%16 = sext i32 %2 to i64
%17 = sext i32 %1 to i64
%18 = sext i32 %14 to i64
%19 = zext i32 %7 to i64
br label %20
20: ; preds = %13, %20
%21 = phi i64 [ 0, %13 ], [ %59, %20 ]
%22 = mul nsw i64 %21, %16
%23 = add nsw i64 %22, %17
%24 = add nsw i64 %23, %18
%25 = trunc i64 %21 to i32
%26 = mul i32 %10, %25
%27 = add nsw i32 %26, %1
%28 = add nsw i32 %27, %2
%29 = sitofp i32 %25 to x86_fp80
%30 = fmul x86_fp80 %29, 0xK4001C90FDAA22168C235
%31 = fdiv x86_fp80 %30, %15
%32 = tail call double @cos(x86_fp80 %31)
%33 = tail call double @sin(x86_fp80 %31)
%34 = sext i32 %28 to i64
%35 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 %34, i64 0
%36 = load double, double* %35
%37 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 %34, i64 1
%38 = load double, double* %37
%39 = fmul double %33, %38
%40 = tail call double @llvm.fmuladd.f64(double %32, double %36, double %39)
%41 = fneg double %33
%42 = fmul double %36, %41
%43 = tail call double @llvm.fmuladd.f64(double %32, double %38, double %42)
%44 = sext i32 %27 to i64
%45 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 %44, i64 0
%46 = load double, double* %45
%47 = fsub double %46, %40
%48 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 %24, i64 0
store double %47, double* %48
%49 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 %44, i64 1
%50 = load double, double* %49
%51 = fsub double %50, %43
%52 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 %24, i64 1
store double %51, double* %52
%53 = load double, double* %45
%54 = fadd double %40, %53
%55 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 %23, i64 0
store double %54, double* %55
%56 = load double, double* %49
%57 = fadd double %43, %56
%58 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 %23, i64 1
store double %57, double* %58
%59 = add nuw nsw i64 %21, 1
%60 = icmp eq i64 %59, %19
br i1 %60, label %85, label %20
61: ; preds = %6
%62 = add nsw i32 %2, %1
%63 = sext i32 %1 to i64
%64 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 %63, i64 0
%65 = load double, double* %64
%66 = sext i32 %62 to i64
%67 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 %66, i64 0
%68 = load double, double* %67
%69 = fsub double %65, %68
%70 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 %66, i64 0
store double %69, double* %70
%71 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 %63, i64 1
%72 = load double, double* %71
%73 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 %66, i64 1
%74 = load double, double* %73
%75 = fsub double %72, %74
%76 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 %66, i64 1
store double %75, double* %76
%77 = load double, double* %64
%78 = load double, double* %67
%79 = fadd double %77, %78
%80 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 %63, i64 0
store double %79, double* %80
%81 = load double, double* %71
%82 = load double, double* %73
%83 = fadd double %81, %82
%84 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 %63, i64 1
store double %83, double* %84
br label %85
85: ; preds = %20, %9, %61
ret void
}