#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*/ bitrv208neg(double *);
int /*<<< orphan*/ bitrv216neg(double *);
int /*<<< orphan*/ bitrv2conj(int, double *);
int /*<<< orphan*/ cftb040(double *);
int /*<<< orphan*/ cftb1st(int, double *);
int /*<<< orphan*/ cftf081(double *);
int /*<<< orphan*/ cftf161(double *);
int /*<<< orphan*/ cftfx41(int, double *);
int /*<<< orphan*/ cftleaf(int, int, double *);
int /*<<< orphan*/ cftrec4(int, double *);
int /*<<< orphan*/ cftx020(double *);
void cftbsub(int n, 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 %51
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 32
br i1 %9, label %10, label %36
10: ; preds = %7
%11 = load i32, i32* %3
%12 = load double*, double** %4
%13 = call i32 @cftb1st(i32 %11, double* %12)
%14 = load i32, i32* %3
%15 = icmp sgt i32 %14, 512
br i1 %15, label %16, label %20
16: ; preds = %10
%17 = load i32, i32* %3
%18 = load double*, double** %4
%19 = call i32 @cftrec4(i32 %17, double* %18)
br label %32
20: ; preds = %10
%21 = load i32, i32* %3
%22 = icmp sgt i32 %21, 128
br i1 %22, label %23, label %27
23: ; preds = %20
%24 = load i32, i32* %3
%25 = load double*, double** %4
%26 = call i32 @cftleaf(i32 %24, i32 1, double* %25)
br label %31
27: ; preds = %20
%28 = load i32, i32* %3
%29 = load double*, double** %4
%30 = call i32 @cftfx41(i32 %28, double* %29)
br label %31
31: ; preds = %27, %23
br label %32
32: ; preds = %31, %16
%33 = load i32, i32* %3
%34 = load double*, double** %4
%35 = call i32 @bitrv2conj(i32 %33, double* %34)
br label %50
36: ; preds = %7
%37 = load i32, i32* %3
%38 = icmp eq i32 %37, 32
br i1 %38, label %39, label %44
39: ; preds = %36
%40 = load double*, double** %4
%41 = call i32 @cftf161(double* %40)
%42 = load double*, double** %4
%43 = call i32 @bitrv216neg(double* %42)
br label %49
44: ; preds = %36
%45 = load double*, double** %4
%46 = call i32 @cftf081(double* %45)
%47 = load double*, double** %4
%48 = call i32 @bitrv208neg(double* %47)
br label %49
49: ; preds = %44, %39
br label %50
50: ; preds = %49, %32
br label %65
51: ; preds = %2
%52 = load i32, i32* %3
%53 = icmp eq i32 %52, 8
br i1 %53, label %54, label %57
54: ; preds = %51
%55 = load double*, double** %4
%56 = call i32 @cftb040(double* %55)
br label %64
57: ; preds = %51
%58 = load i32, i32* %3
%59 = icmp eq i32 %58, 4
br i1 %59, label %60, label %63
60: ; preds = %57
%61 = load double*, double** %4
%62 = call i32 @cftx020(double* %61)
br label %63
63: ; preds = %60, %57
br label %64
64: ; preds = %63, %54
br label %65
65: ; preds = %64, %50
ret void
}

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