#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*/ cftf081(double *);
int /*<<< orphan*/ cftf082(double *);
int /*<<< orphan*/ cftf161(double *);
int /*<<< orphan*/ cftf162(double *);
void cftfx41(int n, double *a) {
  if (n == 128) {
    cftf161(a);
    cftf162(&a[32]);
    cftf161(&a[64]);
    cftf161(&a[96]);
  } else {
    cftf081(a);
    cftf082(&a[16]);
    cftf081(&a[32]);
    cftf081(&a[48]);
  }
}


x86 assembly (clang, -O0):
<cftfx41>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x80,-0x4(%rbp)
jne    119a <cftfx41+0x5a>
mov    -0x10(%rbp),%rdi
call   1030 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x100,%rdi
call   1050 <cftf162@plt>
mov    -0x10(%rbp),%rdi
add    $0x200,%rdi
call   1030 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x300,%rdi
call   1030 <cftf161@plt>
jmp    11d3 <cftfx41+0x93>
mov    -0x10(%rbp),%rdi
call   1040 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0x80,%rdi
call   1060 <cftf082@plt>
mov    -0x10(%rbp),%rdi
add    $0x100,%rdi
call   1040 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0x180,%rdi
call   1040 <cftf081@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cftfx41>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x80,%edi
jne    117c <cftfx41+0x3c>
mov    %rbx,%rdi
call   1030 <cftf161@plt>
lea    0x100(%rbx),%rdi
call   1050 <cftf162@plt>
lea    0x200(%rbx),%rdi
call   1030 <cftf161@plt>
add    $0x300,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <cftf161@plt>
mov    %rbx,%rdi
call   1040 <cftf081@plt>
lea    0x80(%rbx),%rdi
call   1060 <cftf082@plt>
lea    0x100(%rbx),%rdi
call   1040 <cftf081@plt>
add    $0x180,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <cftf081@plt>

LLVM IR (-O0):
define void @cftfx41(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 eq i32 %5, 128
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = load double*, double** %4
%9 = call i32 @cftf161(double* %8)
%10 = load double*, double** %4
%11 = getelementptr inbounds double, double* %10, i64 32
%12 = call i32 @cftf162(double* %11)
%13 = load double*, double** %4
%14 = getelementptr inbounds double, double* %13, i64 64
%15 = call i32 @cftf161(double* %14)
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i64 96
%18 = call i32 @cftf161(double* %17)
br label %31
19: ; preds = %2
%20 = load double*, double** %4
%21 = call i32 @cftf081(double* %20)
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 16
%24 = call i32 @cftf082(double* %23)
%25 = load double*, double** %4
%26 = getelementptr inbounds double, double* %25, i64 32
%27 = call i32 @cftf081(double* %26)
%28 = load double*, double** %4
%29 = getelementptr inbounds double, double* %28, i64 48
%30 = call i32 @cftf081(double* %29)
br label %31
31: ; preds = %19, %7
ret void
}

LLVM IR (-O2):
define void @cftfx41(i32 %0, double* %1) {
%3 = icmp eq i32 %0, 128
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = tail call i32 @cftf161(double* %1)
%6 = getelementptr inbounds double, double* %1, i64 32
%7 = tail call i32 @cftf162(double* %6)
%8 = getelementptr inbounds double, double* %1, i64 64
%9 = tail call i32 @cftf161(double* %8)
%10 = getelementptr inbounds double, double* %1, i64 96
%11 = tail call i32 @cftf161(double* %10)
br label %20
12: ; preds = %2
%13 = tail call i32 @cftf081(double* %1)
%14 = getelementptr inbounds double, double* %1, i64 16
%15 = tail call i32 @cftf082(double* %14)
%16 = getelementptr inbounds double, double* %1, i64 32
%17 = tail call i32 @cftf081(double* %16)
%18 = getelementptr inbounds double, double* %1, i64 48
%19 = tail call i32 @cftf081(double* %18)
br label %20
20: ; preds = %12, %4
ret void
}