void cftbsub(int n, double *a, double *w) {
  void cft1st(int n, double *a, double *w);
  void cftmdl(int n, int l, double *a, double *w);
  int j, j1, j2, j3, l;
  double x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
  l = 2;
  if (n > 8) {
    cft1st(n, a, w);
    l = 8;
    while ((l << 2) < n) {
      cftmdl(n, l, a, w);
      l <<= 2;
    }
  }
  if ((l << 2) == n) {
    for (j = 0; j < l; j += 2) {
      j1 = j + l;
      j2 = j1 + l;
      j3 = j2 + l;
      x0r = a[j] + a[j1];
      x0i = -a[j + 1] - a[j1 + 1];
      x1r = a[j] - a[j1];
      x1i = -a[j + 1] + a[j1 + 1];
      x2r = a[j2] + a[j3];
      x2i = a[j2 + 1] + a[j3 + 1];
      x3r = a[j2] - a[j3];
      x3i = a[j2 + 1] - a[j3 + 1];
      a[j] = x0r + x2r;
      a[j + 1] = x0i - x2i;
      a[j2] = x0r - x2r;
      a[j2 + 1] = x0i + x2i;
      a[j1] = x1r - x3i;
      a[j1 + 1] = x1i - x3r;
      a[j3] = x1r + x3i;
      a[j3 + 1] = x1i + x3r;
    }
  } else {
    for (j = 0; j < l; j += 2) {
      j1 = j + l;
      x0r = a[j] - a[j1];
      x0i = -a[j + 1] + a[j1 + 1];
      a[j] += a[j1];
      a[j + 1] = -a[j + 1] - a[j1 + 1];
      a[j1] = x0r;
      a[j1 + 1] = x0i;
    }
  }
}


x86 assembly (clang, -O0):
<cftbsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x2,-0x2c(%rbp)
cmpl   $0x8,-0x4(%rbp)
jle    1190 <cftbsub+0x70>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <cft1st@plt>
movl   $0x8,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
shl    $0x2,%eax
cmp    -0x4(%rbp),%eax
jge    118b <cftbsub+0x6b>
mov    -0x4(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1040 <cftmdl@plt>
mov    -0x2c(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0x2c(%rbp)
jmp    115b <cftbsub+0x3b>
jmp    1190 <cftbsub+0x70>
mov    -0x2c(%rbp),%eax
shl    $0x2,%eax
cmp    -0x4(%rbp),%eax
jne    13fa <cftbsub+0x2da>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13f5 <cftbsub+0x2d5>
mov    -0x1c(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x38(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
addsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
subsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a6 <cftbsub+0x86>
jmp    151d <cftbsub+0x3fd>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1518 <cftbsub+0x3f8>
mov    -0x1c(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    1401 <cftbsub+0x2e1>
jmp    151d <cftbsub+0x3fd>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cftbsub>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r15d
mov    $0x2,%r12d
cmp    $0x9,%edi
jl     1181 <cftbsub+0x61>
mov    %rdx,%r14
mov    %r15d,%edi
mov    %rbx,%rsi
call   1030 <cft1st@plt>
mov    $0x8,%r12d
cmp    $0x21,%r15d
jb     1181 <cftbsub+0x61>
mov    $0x8,%esi
mov    $0x20,%eax
nopl   (%rax)
mov    %eax,%r12d
mov    %r15d,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1040 <cftmdl@plt>
lea    0x0(,%r12,4),%eax
mov    %r12d,%esi
cmp    %r15d,%eax
jl     1160 <cftbsub+0x40>
lea    0x0(,%r12,4),%eax
cmp    %r15d,%eax
jne    12d9 <cftbsub+0x1b9>
test   %r12d,%r12d
jle    136d <cftbsub+0x24d>
movabs $0x200000000,%r8
mov    %r12d,%r9d
add    %r12d,%r12d
or     $0x1,%r12
mov    %r9,%rax
shl    $0x20,%rax
lea    (%rbx,%r9,8),%r10
lea    (%rax,%rax,2),%rcx
lea    (%r9,%r9,2),%rdx
lea    (%rbx,%rdx,8),%r11
mov    %r9,%r14
shl    $0x4,%r14
add    %rbx,%r14
xor    %esi,%esi
movapd 0xe25(%rip),%xmm8
nopl   0x0(%rax,%rax,1)
movsd  (%r10,%rsi,8),%xmm5
movsd  (%rbx,%rsi,8),%xmm10
movsd  0x8(%rbx,%rsi,8),%xmm6
movapd %xmm10,%xmm4
addsd  %xmm5,%xmm4
movapd %xmm6,%xmm3
xorpd  %xmm8,%xmm3
mov    %rax,%rdx
sar    $0x1d,%rdx
or     $0x8,%rdx
movsd  (%rbx,%rdx,1),%xmm2
subsd  %xmm2,%xmm3
subsd  %xmm5,%xmm10
subsd  %xmm6,%xmm2
movsd  (%r14,%rsi,8),%xmm5
movsd  (%r11,%rsi,8),%xmm9
movapd %xmm5,%xmm7
addsd  %xmm9,%xmm7
lea    (%r12,%rsi,1),%edi
movslq %edi,%rbp
movsd  (%rbx,%rbp,8),%xmm1
mov    %rcx,%rdi
sar    $0x1d,%rdi
or     $0x8,%rdi
movsd  (%rbx,%rdi,1),%xmm6
movapd %xmm1,%xmm0
addsd  %xmm6,%xmm0
subsd  %xmm9,%xmm5
subsd  %xmm6,%xmm1
movapd %xmm4,%xmm6
addsd  %xmm7,%xmm6
movsd  %xmm6,(%rbx,%rsi,8)
movapd %xmm3,%xmm6
subsd  %xmm0,%xmm6
movsd  %xmm6,0x8(%rbx,%rsi,8)
subsd  %xmm7,%xmm4
movsd  %xmm4,(%r14,%rsi,8)
addsd  %xmm3,%xmm0
movsd  %xmm0,(%rbx,%rbp,8)
movapd %xmm10,%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%r10,%rsi,8)
movapd %xmm2,%xmm0
subsd  %xmm5,%xmm0
movsd  %xmm0,(%rbx,%rdx,1)
addsd  %xmm10,%xmm1
movsd  %xmm1,(%r11,%rsi,8)
addsd  %xmm2,%xmm5
movsd  %xmm5,(%rbx,%rdi,1)
add    $0x2,%rsi
add    %r8,%rax
add    %r8,%rcx
cmp    %r9,%rsi
jb     11e0 <cftbsub+0xc0>
jmp    136d <cftbsub+0x24d>
test   %r12d,%r12d
jle    136d <cftbsub+0x24d>
movabs $0x200000000,%rax
mov    %r12d,%ebp
mov    %rbp,%rcx
shl    $0x20,%rcx
lea    (%rbx,%rbp,8),%rsi
xor    %edi,%edi
movapd 0xcfc(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rsi,%rdi,8),%xmm1
movsd  (%rbx,%rdi,8),%xmm2
movsd  0x8(%rbx,%rdi,8),%xmm3
movapd %xmm2,%xmm4
subsd  %xmm1,%xmm4
mov    %rcx,%rdx
sar    $0x1d,%rdx
or     $0x8,%rdx
movsd  (%rbx,%rdx,1),%xmm5
movapd %xmm5,%xmm6
subsd  %xmm3,%xmm6
addsd  %xmm1,%xmm2
movsd  %xmm2,(%rbx,%rdi,8)
xorpd  %xmm0,%xmm3
subsd  %xmm5,%xmm3
movsd  %xmm3,0x8(%rbx,%rdi,8)
movsd  %xmm4,(%rsi,%rdi,8)
movsd  %xmm6,(%rbx,%rdx,1)
add    $0x2,%rdi
add    %rax,%rcx
cmp    %rbp,%rdi
jb     1310 <cftbsub+0x1f0>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @cftbsub(i32 %0, double* %1, double* %2) {
%4 = icmp sgt i32 %0, 8
br i1 %4, label %5, label %12
5: ; preds = %3
tail call void @cft1st(i32 %0, double* %1, double* %2)
%6 = icmp ugt i32 %0, 32
br i1 %6, label %7, label %12
7: ; preds = %5, %7
%8 = phi i32 [ %10, %7 ], [ 32, %5 ]
%9 = phi i32 [ %8, %7 ], [ 8, %5 ]
tail call void @cftmdl(i32 %0, i32 %9, double* %1, double* %2)
%10 = shl i32 %8, 2
%11 = icmp slt i32 %10, %0
br i1 %11, label %7, label %12
12: ; preds = %7, %5, %3
%13 = phi i32 [ 2, %3 ], [ 8, %5 ], [ %8, %7 ]
%14 = shl i32 %13, 2
%15 = icmp eq i32 %14, %0
%16 = icmp sgt i32 %13, 0
br i1 %15, label %20, label %17
17: ; preds = %12
br i1 %16, label %18, label %97
18: ; preds = %17
%19 = zext i32 %13 to i64
br label %75
20: ; preds = %12
br i1 %16, label %21, label %97
21: ; preds = %20
%22 = zext i32 %13 to i64
%23 = shl i32 %13, 1
br label %24
24: ; preds = %21, %24
%25 = phi i64 [ 0, %21 ], [ %73, %24 ]
%26 = trunc i64 %25 to i32
%27 = add nuw nsw i64 %25, %22
%28 = add nuw nsw i64 %27, %22
%29 = add i32 %23, %26
%30 = add nuw nsw i64 %28, %22
%31 = getelementptr inbounds double, double* %1, i64 %25
%32 = load double, double* %31
%33 = getelementptr inbounds double, double* %1, i64 %27
%34 = load double, double* %33
%35 = fadd double %32, %34
%36 = or i64 %25, 1
%37 = getelementptr inbounds double, double* %1, i64 %36
%38 = load double, double* %37
%39 = fneg double %38
%40 = shl i64 %27, 32
%41 = ashr exact i64 %40, 32
%42 = or i64 %41, 1
%43 = getelementptr inbounds double, double* %1, i64 %42
%44 = load double, double* %43
%45 = fsub double %39, %44
%46 = fsub double %32, %34
%47 = fsub double %44, %38
%48 = getelementptr inbounds double, double* %1, i64 %28
%49 = load double, double* %48
%50 = getelementptr inbounds double, double* %1, i64 %30
%51 = load double, double* %50
%52 = fadd double %49, %51
%53 = or i32 %29, 1
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %1, i64 %54
%56 = load double, double* %55
%57 = shl i64 %30, 32
%58 = ashr exact i64 %57, 32
%59 = or i64 %58, 1
%60 = getelementptr inbounds double, double* %1, i64 %59
%61 = load double, double* %60
%62 = fadd double %56, %61
%63 = fsub double %49, %51
%64 = fsub double %56, %61
%65 = fadd double %35, %52
store double %65, double* %31
%66 = fsub double %45, %62
store double %66, double* %37
%67 = fsub double %35, %52
store double %67, double* %48
%68 = fadd double %45, %62
store double %68, double* %55
%69 = fsub double %46, %64
store double %69, double* %33
%70 = fsub double %47, %63
store double %70, double* %43
%71 = fadd double %46, %64
store double %71, double* %50
%72 = fadd double %47, %63
store double %72, double* %60
%73 = add nuw nsw i64 %25, 2
%74 = icmp ult i64 %73, %22
br i1 %74, label %24, label %97
75: ; preds = %18, %75
%76 = phi i64 [ 0, %18 ], [ %95, %75 ]
%77 = add nuw nsw i64 %76, %19
%78 = getelementptr inbounds double, double* %1, i64 %76
%79 = load double, double* %78
%80 = getelementptr inbounds double, double* %1, i64 %77
%81 = load double, double* %80
%82 = fsub double %79, %81
%83 = or i64 %76, 1
%84 = getelementptr inbounds double, double* %1, i64 %83
%85 = load double, double* %84
%86 = shl i64 %77, 32
%87 = ashr exact i64 %86, 32
%88 = or i64 %87, 1
%89 = getelementptr inbounds double, double* %1, i64 %88
%90 = load double, double* %89
%91 = fsub double %90, %85
%92 = fadd double %79, %81
store double %92, double* %78
%93 = fneg double %85
%94 = fsub double %93, %90
store double %94, double* %84
store double %82, double* %80
store double %91, double* %89
%95 = add nuw nsw i64 %76, 2
%96 = icmp ult i64 %95, %19
br i1 %96, label %75, label %97
97: ; preds = %75, %24, %17, %20
ret void
}