void cftbsub(int n, double *a) {
  void bitrv2conj(int n, double *a);
  void bitrv216neg(double *a);
  void bitrv208neg(double *a);
  void cftb1st(int n, double *a);
  void cftrec4(int n, double *a);
  void cftleaf(int n, int isplt, double *a);
  void cftfx41(int n, double *a);
  void cftf161(double *a);
  void cftf081(double *a);
  void cftb040(double *a);
  void cftx020(double *a);
  if (n > 8) {
    if (n > 32) {
      cftb1st(n, a);
      if (n > 512) {
        cftrec4(n, a);
      } else if (n > 128) {
        cftleaf(n, 1, a);
      } else {
        cftfx41(n, a);
      }
      bitrv2conj(n, a);
    } else if (n == 32) {
      cftf161(a);
      bitrv216neg(a);
    } else {
      cftf081(a);
      bitrv208neg(a);
    }
  } else if (n == 8) {
    cftb040(a);
  } else if (n == 4) {
    cftx020(a);
  }
}


x86 assembly (clang, -O0):
<cftbsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x8,-0x4(%rbp)
jle    127f <cftbsub+0xcf>
cmpl   $0x20,-0x4(%rbp)
jle    1242 <cftbsub+0x92>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   10a0 <cftb1st@plt>
cmpl   $0x200,-0x4(%rbp)
jle    11fd <cftbsub+0x4d>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <cftrec4@plt>
jmp    1231 <cftbsub+0x81>
cmpl   $0x80,-0x4(%rbp)
jle    1220 <cftbsub+0x70>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x1,%esi
call   1050 <cftleaf@plt>
jmp    122c <cftbsub+0x7c>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1090 <cftfx41@plt>
jmp    1231 <cftbsub+0x81>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1070 <bitrv2conj@plt>
jmp    127a <cftbsub+0xca>
cmpl   $0x20,-0x4(%rbp)
jne    1263 <cftbsub+0xb3>
mov    -0x10(%rbp),%rdi
call   1030 <cftf161@plt>
mov    -0x10(%rbp),%rdi
call   10d0 <bitrv216neg@plt>
jmp    1275 <cftbsub+0xc5>
mov    -0x10(%rbp),%rdi
call   1060 <cftf081@plt>
mov    -0x10(%rbp),%rdi
call   10b0 <bitrv208neg@plt>
jmp    127a <cftbsub+0xca>
jmp    12b4 <cftbsub+0x104>
cmpl   $0x8,-0x4(%rbp)
jne    1297 <cftbsub+0xe7>
mov    -0x10(%rbp),%rdi
call   1080 <cftb040@plt>
jmp    12af <cftbsub+0xff>
cmpl   $0x4,-0x4(%rbp)
jne    12aa <cftbsub+0xfa>
mov    -0x10(%rbp),%rdi
call   10c0 <cftx020@plt>
jmp    12af <cftbsub+0xff>
jmp    12b4 <cftbsub+0x104>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cftbsub>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
cmp    $0x9,%edi
jl     11e0 <cftbsub+0x30>
cmp    $0x21,%ebp
jb     11f8 <cftbsub+0x48>
mov    %ebp,%edi
mov    %rbx,%rsi
call   10a0 <cftb1st@plt>
mov    %ebp,%edi
cmp    $0x201,%ebp
jb     1228 <cftbsub+0x78>
mov    %rbx,%rsi
call   1040 <cftrec4@plt>
jmp    125a <cftbsub+0xaa>
cmp    $0x4,%ebp
je     1213 <cftbsub+0x63>
cmp    $0x8,%ebp
jne    1221 <cftbsub+0x71>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1080 <cftb040@plt>
mov    %rbx,%rdi
cmp    $0x20,%ebp
jne    123f <cftbsub+0x8f>
call   1030 <cftf161@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10d0 <bitrv216neg@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10c0 <cftx020@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
cmp    $0x81,%ebp
jb     1252 <cftbsub+0xa2>
mov    $0x1,%esi
mov    %rbx,%rdx
call   1050 <cftleaf@plt>
jmp    125a <cftbsub+0xaa>
call   1060 <cftf081@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    10b0 <bitrv208neg@plt>
mov    %rbx,%rsi
call   1090 <cftfx41@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1070 <bitrv2conj@plt>

LLVM IR (-O0):
define void @cftbsub(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 8
br i1 %6, label %7, label %42
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 32
br i1 %9, label %10, label %31
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load double*, double** %4
%13 = load i32, i32* %3
%14 = icmp sgt i32 %13, 512
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = load i32, i32* %3
%17 = load double*, double** %4
br label %28
18: ; preds = %10
%19 = load i32, i32* %3
%20 = icmp sgt i32 %19, 128
br i1 %20, label %21, label %24
21: ; preds = %18
%22 = load i32, i32* %3
%23 = load double*, double** %4
br label %27
24: ; preds = %18
%25 = load i32, i32* %3
%26 = load double*, double** %4
br label %27
27: ; preds = %24, %21
br label %28
28: ; preds = %27, %15
%29 = load i32, i32* %3
%30 = load double*, double** %4
br label %41
31: ; preds = %7
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 32
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load double*, double** %4
%36 = load double*, double** %4
br label %40
37: ; preds = %31
%38 = load double*, double** %4
%39 = load double*, double** %4
br label %40
40: ; preds = %37, %34
br label %41
41: ; preds = %40, %28
br label %54
42: ; preds = %2
%43 = load i32, i32* %3
%44 = icmp eq i32 %43, 8
br i1 %44, label %45, label %47
45: ; preds = %42
%46 = load double*, double** %4
br label %53
47: ; preds = %42
%48 = load i32, i32* %3
%49 = icmp eq i32 %48, 4
br i1 %49, label %50, label %52
50: ; preds = %47
%51 = load double*, double** %4
br label %52
52: ; preds = %50, %47
br label %53
53: ; preds = %52, %45
br label %54
54: ; preds = %53, %41
ret void
}

LLVM IR (-O2):
define void @cftbsub(i32 %0, double* %1) {
%3 = icmp sgt i32 %0, 8
br i1 %3, label %4, label %18
4: ; preds = %2
%5 = icmp ugt i32 %0, 32
br i1 %5, label %6, label %14
6: ; preds = %4
tail call void @cftb1st(i32 %0, double* %1)
%7 = icmp ugt i32 %0, 512
br i1 %7, label %8, label %9
8: ; preds = %6
tail call void @cftrec4(i32 %0, double* %1)
br label %13
9: ; preds = %6
%10 = icmp ugt i32 %0, 128
br i1 %10, label %11, label %12
11: ; preds = %9
tail call void @cftleaf(i32 %0, i32 1, double* %1)
br label %13
12: ; preds = %9
tail call void @cftfx41(i32 %0, double* %1)
br label %13
13: ; preds = %11, %12, %8
tail call void @bitrv2conj(i32 %0, double* %1)
br label %21
14: ; preds = %4
%15 = icmp eq i32 %0, 32
br i1 %15, label %16, label %17
16: ; preds = %14
tail call void @cftf161(double* %1)
tail call void @bitrv216neg(double* %1)
br label %21
17: ; preds = %14
tail call void @cftf081(double* %1)
tail call void @bitrv208neg(double* %1)
br label %21
18: ; preds = %2
switch i32 %0, label %21 [
i32 8, label %19
i32 4, label %20
]
19: ; preds = %18
tail call void @cftb040(double* %1)
br label %21
20: ; preds = %18
tail call void @cftx020(double* %1)
br label %21
21: ; preds = %18, %19, %20, %13, %17, %16
ret void
}