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