#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 M_PI;
double cos(double);
double sin(double);
void FFT(double *c, int N, int isign) {
  int n, n2, nb, j, k, i0, i1;
  double wr, wi, wrk, wik;
  double d, dr, di, d0r, d0i, d1r, d1i;
  double *cp;
  j = 0;
  n2 = N / 2;
  for (k = 0; k < N; ++k) {
    if (k < j) {
      i0 = k << 1;
      i1 = j << 1;
      dr = c[i0];
      di = c[i0 + 1];
      c[i0] = c[i1];
      c[i0 + 1] = c[i1 + 1];
      c[i1] = dr;
      c[i1 + 1] = di;
    }
    n = N >> 1;
    while ((n >= 2) && (j >= n)) {
      j -= n;
      n = n >> 1;
    }
    j += n;
  }
  for (n = 2; n <= N; n = n << 1) {
    wr = cos(2.0 * M_PI / n);
    wi = sin(2.0 * M_PI / n);
    if (isign == 1)
      wi = -wi;
    cp = c;
    nb = N / n;
    n2 = n >> 1;
    for (j = 0; j < nb; ++j) {
      wrk = 1.0;
      wik = 0.0;
      for (k = 0; k < n2; ++k) {
        i0 = k << 1;
        i1 = i0 + n;
        d0r = cp[i0];
        d0i = cp[i0 + 1];
        d1r = cp[i1];
        d1i = cp[i1 + 1];
        dr = wrk * d1r - wik * d1i;
        di = wrk * d1i + wik * d1r;
        cp[i0] = d0r + dr;
        cp[i0 + 1] = d0i + di;
        cp[i1] = d0r - dr;
        cp[i1 + 1] = d0i - di;
        d = wrk;
        wrk = wr * wrk - wi * wik;
        wik = wr * wik + wi * d;
      }
      cp += n << 1;
    }
  }
}


x86 assembly (clang, -O0):
<FFT>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1278 <FFT+0x158>
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    120b <FFT+0xeb>
mov    -0x24(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x68(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x2,-0x14(%rbp)
mov    %al,-0x91(%rbp)
jl     1235 <FFT+0x115>
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
setge  %al
mov    %al,-0x91(%rbp)
mov    -0x91(%rbp),%al
test   $0x1,%al
jne    1248 <FFT+0x128>
jmp    1261 <FFT+0x141>
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1214 <FFT+0xf4>
mov    -0x14(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1151 <FFT+0x31>
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     154f <FFT+0x42f>
movsd  0xd6d(%rip),%xmm0
mov    0x2d4e(%rip),%rax
mulsd  (%rax),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  0xd47(%rip),%xmm0
mov    0x2d28(%rip),%rax
mulsd  (%rax),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x40(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    1302 <FFT+0x1e2>
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    153c <FFT+0x41c>
movsd  0xccd(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1510 <FFT+0x3f0>
mov    -0x24(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x90(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x90(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x90(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x90(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x88(%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  -0x48(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x50(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x70(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
mov    -0x90(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0x90(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    -0x90(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x90(%rbp),%rax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    134f <FFT+0x22f>
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x90(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x90(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1327 <FFT+0x207>
jmp    1541 <FFT+0x421>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    127f <FFT+0x15f>
add    $0xa0,%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    %edx,0x4(%rsp)
test   %esi,%esi
jle    11c9 <FFT+0xa9>
mov    %esi,%r13d
mov    %rdi,%r12
mov    %esi,%eax
xor    %ecx,%ecx
xor    %edx,%edx
jmp    115d <FFT+0x3d>
nopl   0x0(%rax,%rax,1)
add    %edi,%esi
add    $0x1,%rcx
mov    %esi,%edx
cmp    %rax,%rcx
je     11c3 <FFT+0xa3>
movslq %edx,%rsi
cmp    %rsi,%rcx
jge    11aa <FFT+0x8a>
lea    (%rdx,%rdx,1),%esi
mov    %rcx,%rdi
shl    $0x21,%rdi
sar    $0x1d,%rdi
lea    (%rcx,%rcx,1),%ebp
add    $0x1,%ebp
movslq %ebp,%rbp
movupd (%r12,%rdi,1),%xmm0
movslq %esi,%rsi
movsd  (%r12,%rsi,8),%xmm1
movsd  %xmm1,(%r12,%rdi,1)
lea    0x1(%rdx,%rdx,1),%edi
movslq %edi,%rdi
movsd  (%r12,%rdi,8),%xmm1
movsd  %xmm1,(%r12,%rbp,8)
movupd %xmm0,(%r12,%rsi,8)
mov    %r13d,%esi
nopl   (%rax)
mov    %esi,%ebp
mov    %edx,%edi
sar    %esi
cmp    $0x4,%ebp
jl     1150 <FFT+0x30>
mov    %edi,%edx
sub    %esi,%edx
jge    11b0 <FFT+0x90>
jmp    1150 <FFT+0x30>
cmp    $0x2,%r13d
jge    11d8 <FFT+0xb8>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x2,%r14d
mov    0x2e03(%rip),%r15
xorpd  %xmm8,%xmm8
movhpd 0xe1d(%rip),%xmm8
movapd %xmm8,0x10(%rsp)
jmp    120e <FFT+0xee>
nopl   0x0(%rax)
add    %r14d,%r14d
mov    %r14d,%r8d
mov    %r8d,%r14d
cmp    %r13d,%r8d
jg     11c9 <FFT+0xa9>
movsd  (%r15),%xmm0
addsd  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %r14d,%xmm1
movsd  %xmm1,0x8(%rsp)
divsd  %xmm1,%xmm0
call   1040 <cos@plt>
movapd %xmm0,0x20(%rsp)
movsd  (%r15),%xmm0
addsd  %xmm0,%xmm0
divsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
cmpl   $0x1,0x4(%rsp)
je     1260 <FFT+0x140>
movapd 0xda9(%rip),%xmm7
jmp    126c <FFT+0x14c>
nopl   0x0(%rax)
movapd 0xd98(%rip),%xmm7
xorpd  %xmm7,%xmm0
movapd 0x10(%rsp),%xmm8
movapd 0x20(%rsp),%xmm9
mov    %r13d,%eax
cltd
idiv   %r14d
test   %eax,%eax
jle    1200 <FFT+0xe0>
mov    %r14d,%edx
sar    %edx
movapd %xmm0,%xmm1
xorpd  %xmm7,%xmm1
lea    (%r14,%r14,1),%r8d
movslq %r8d,%r10
movslq %r14d,%r9
cmp    $0x2,%edx
mov    $0x1,%ecx
cmovl  %ecx,%edx
pshufd $0x44,%xmm1,%xmm1
unpcklpd %xmm9,%xmm9
shl    $0x3,%r10
shl    $0x4,%rdx
xor    %ebx,%ebx
mov    %r12,%rcx
jmp    12de <FFT+0x1be>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    %r10,%rcx
add    $0x1,%ebx
cmp    %eax,%ebx
je     1206 <FFT+0xe6>
test   %r14d,%r14d
jle    12d0 <FFT+0x1b0>
mov    %r9,%rdi
xor    %ebp,%ebp
movapd %xmm8,%xmm2
nopl   (%rax)
movupd (%rcx,%rbp,1),%xmm3
lea    0x0(,%rdi,8),%rsi
or     $0x8,%rsi
movapd %xmm2,%xmm4
xorpd  %xmm7,%xmm4
movsd  (%rcx,%rsi,1),%xmm5
movsd  (%rcx,%rdi,8),%xmm6
unpcklpd %xmm6,%xmm4
unpcklpd %xmm5,%xmm6
unpcklpd %xmm2,%xmm5
mulpd  %xmm5,%xmm4
movapd %xmm2,%xmm5
unpckhpd %xmm2,%xmm5
mulpd  %xmm5,%xmm6
addpd  %xmm4,%xmm6
movapd %xmm3,%xmm4
addpd  %xmm6,%xmm4
movupd %xmm4,(%rcx,%rbp,1)
subpd  %xmm6,%xmm3
movlpd %xmm3,(%rcx,%rdi,8)
movhpd %xmm3,(%rcx,%rsi,1)
movapd %xmm0,%xmm3
unpcklpd %xmm2,%xmm3
movapd %xmm9,%xmm4
mulpd  %xmm2,%xmm4
unpckhpd %xmm1,%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm4,%xmm2
add    $0x10,%rbp
add    $0x2,%rdi
cmp    %rbp,%rdx
jne    12f0 <FFT+0x1d0>
jmp    12d0 <FFT+0x1b0>

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

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define void @FFT(double* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %125
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %11
7: ; preds = %45
%8 = icmp slt i32 %1, 2
br i1 %8, label %125, label %9
9: ; preds = %7
%10 = icmp eq i32 %2, 1
br label %49
11: ; preds = %5, %45
%12 = phi i64 [ 0, %5 ], [ %47, %45 ]
%13 = phi i32 [ 0, %5 ], [ %46, %45 ]
%14 = sext i32 %13 to i64
%15 = icmp slt i64 %12, %14
br i1 %15, label %16, label %36
16: ; preds = %11
%17 = shl i32 %13, 1
%18 = shl i64 %12, 33
%19 = ashr exact i64 %18, 32
%20 = getelementptr inbounds double, double* %0, i64 %19
%21 = trunc i64 %12 to i32
%22 = shl i32 %21, 1
%23 = or i32 %22, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %0, i64 %24
%26 = bitcast double* %20 to <2 x double>*
%27 = load <2 x double>, <2 x double>* %26
%28 = sext i32 %17 to i64
%29 = getelementptr inbounds double, double* %0, i64 %28
%30 = load double, double* %29
store double %30, double* %20
%31 = or i32 %17, 1
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %0, i64 %32
%34 = load double, double* %33
store double %34, double* %25
%35 = bitcast double* %29 to <2 x double>*
store <2 x double> %27, <2 x double>* %35
br label %36
36: ; preds = %16, %11
br label %37
37: ; preds = %36, %37
%38 = phi i32 [ %44, %37 ], [ %13, %36 ]
%39 = phi i32 [ %40, %37 ], [ %1, %36 ]
%40 = ashr i32 %39, 1
%41 = icmp sgt i32 %39, 3
%42 = icmp sge i32 %38, %40
%43 = select i1 %41, i1 %42, i1 false
%44 = sub nsw i32 %38, %40
br i1 %43, label %37, label %45
45: ; preds = %37
%46 = add nsw i32 %40, %38
%47 = add nuw nsw i64 %12, 1
%48 = icmp eq i64 %47, %6
br i1 %48, label %7, label %11
49: ; preds = %9, %122
%50 = phi i32 [ 2, %9 ], [ %123, %122 ]
%51 = load double, double* @M_PI
%52 = fmul double %51, 2.000000e+00
%53 = sitofp i32 %50 to double
%54 = fdiv double %52, %53
%55 = tail call double @cos(double %54)
%56 = load double, double* @M_PI
%57 = fmul double %56, 2.000000e+00
%58 = fdiv double %57, %53
%59 = tail call double @sin(double %58)
%60 = fneg double %59
%61 = select i1 %10, double %60, double %59
%62 = sdiv i32 %1, %50
%63 = icmp sgt i32 %62, 0
br i1 %63, label %66, label %64
64: ; preds = %49
%65 = shl i32 %50, 1
br label %122
66: ; preds = %49
%67 = ashr i32 %50, 1
%68 = icmp sgt i32 %50, 0
%69 = fneg double %61
%70 = shl i32 %50, 1
%71 = sext i32 %70 to i64
%72 = sext i32 %50 to i64
%73 = call i32 @llvm.smax.i32(i32 %67, i32 1)
%74 = zext i32 %73 to i64
%75 = insertelement <2 x double> poison, double %61, i64 0
%76 = insertelement <2 x double> poison, double %69, i64 1
%77 = insertelement <2 x double> poison, double %55, i64 0
%78 = shufflevector <2 x double> %77, <2 x double> poison, <2 x i32> zeroinitializer
br label %79
79: ; preds = %66, %118
%80 = phi double* [ %0, %66 ], [ %119, %118 ]
%81 = phi i32 [ 0, %66 ], [ %120, %118 ]
br i1 %68, label %82, label %118
82: ; preds = %79, %82
%83 = phi i64 [ %116, %82 ], [ 0, %79 ]
%84 = phi <2 x double> [ %115, %82 ], [ <double 0.000000e+00, double 1.000000e+00>, %79 ]
%85 = shl nuw i64 %83, 1
%86 = add nsw i64 %85, %72
%87 = getelementptr inbounds double, double* %80, i64 %85
%88 = bitcast double* %87 to <2 x double>*
%89 = load <2 x double>, <2 x double>* %88
%90 = getelementptr inbounds double, double* %80, i64 %86
%91 = load double, double* %90
%92 = or i64 %86, 1
%93 = getelementptr inbounds double, double* %80, i64 %92
%94 = load double, double* %93
%95 = extractelement <2 x double> %84, i64 0
%96 = fneg double %95
%97 = insertelement <2 x double> poison, double %94, i64 0
%98 = shufflevector <2 x double> %97, <2 x double> %84, <2 x i32> <i32 0, i32 2>
%99 = insertelement <2 x double> poison, double %96, i64 0
%100 = insertelement <2 x double> %99, double %91, i64 1
%101 = fmul <2 x double> %98, %100
%102 = shufflevector <2 x double> %84, <2 x double> undef, <2 x i32> <i32 1, i32 1>
%103 = insertelement <2 x double> poison, double %91, i64 0
%104 = insertelement <2 x double> %103, double %94, i64 1
%105 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %102, <2 x double> %104, <2 x double> %101)
%106 = fadd <2 x double> %89, %105
%107 = bitcast double* %87 to <2 x double>*
store <2 x double> %106, <2 x double>* %107
%108 = fsub <2 x double> %89, %105
%109 = extractelement <2 x double> %108, i64 0
store double %109, double* %90
%110 = fsub <2 x double> %89, %105
%111 = extractelement <2 x double> %110, i64 1
store double %111, double* %93
%112 = shufflevector <2 x double> %75, <2 x double> %84, <2 x i32> <i32 0, i32 2>
%113 = shufflevector <2 x double> %76, <2 x double> %84, <2 x i32> <i32 3, i32 1>
%114 = fmul <2 x double> %112, %113
%115 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %78, <2 x double> %84, <2 x double> %114)
%116 = add nuw nsw i64 %83, 1
%117 = icmp eq i64 %116, %74
br i1 %117, label %118, label %82
118: ; preds = %82, %79
%119 = getelementptr inbounds double, double* %80, i64 %71
%120 = add nuw nsw i32 %81, 1
%121 = icmp eq i32 %120, %62
br i1 %121, label %122, label %79
122: ; preds = %118, %64
%123 = phi i32 [ %65, %64 ], [ %70, %118 ]
%124 = icmp sgt i32 %123, %1
br i1 %124, label %125, label %49
125: ; preds = %122, %3, %7
ret void
}