#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*/ cfftf1(int, double *, double *, double *, int *, int);
void cfftb(int n, double c[], double wsave[]) {
  int iw1, iw2;
  if (n == 1)
    return;
  iw1 = 2 * n;
  iw2 = iw1 + 2 * n;
  cfftf1(n, c, wsave, wsave + iw1, (int *)(wsave + iw2), +1);
}


x86 assembly (clang, -O0):
<cfftb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1132 <cfftb+0x22>
jmp    117d <cfftb+0x6d>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x18(%rbp),%r8
movslq -0x20(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
mov    $0x1,%r9d
call   1030 <cfftf1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfftb>:
cmp    $0x1,%edi
jne    1116 <cfftb+0x6>
ret
lea    (%rdi,%rdi,1),%eax
lea    0x0(,%rdi,4),%r8d
cltq
lea    (%rdx,%rax,8),%rcx
movslq %r8d,%rax
lea    (%rdx,%rax,8),%r8
mov    $0x1,%r9d
jmp    1030 <cfftf1@plt>

LLVM IR (-O0):
define void @cfftb(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 1
br i1 %10, label %11, label %12
11: ; preds = %3
br label %32
12: ; preds = %3
%13 = load i32, i32* %4
%14 = mul nsw i32 2, %13
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = load i32, i32* %4
%17 = mul nsw i32 2, %16
%18 = add nsw i32 %15, %17
store i32 %18, i32* %8
%19 = load i32, i32* %4
%20 = load double*, double** %5
%21 = load double*, double** %6
%22 = load double*, double** %6
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds double, double* %22, i64 %24
%26 = load double*, double** %6
%27 = load i32, i32* %8
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %26, i64 %28
%30 = bitcast double* %29 to i32*
%31 = call i32 @cfftf1(i32 %19, double* %20, double* %21, double* %25, i32* %30, i32 1)
br label %32
32: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @cfftb(i32 %0, double* %1, double* %2) {
%4 = icmp eq i32 %0, 1
br i1 %4, label %14, label %5
5: ; preds = %3
%6 = shl nsw i32 %0, 1
%7 = shl nsw i32 %0, 2
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds double, double* %2, i64 %8
%10 = sext i32 %7 to i64
%11 = getelementptr inbounds double, double* %2, i64 %10
%12 = bitcast double* %11 to i32*
%13 = tail call i32 @cfftf1(i32 %0, double* %1, double* %2, double* %9, i32* %12, i32 1)
br label %14
14: ; preds = %3, %5
ret void
}