void cftfx41(int n, float *a, int nw, float *w) {
  void cftf161(float *a, float *w);
  void cftf162(float *a, float *w);
  void cftf081(float *a, float *w);
  void cftf082(float *a, float *w);
  if (n == 128) {
    cftf161(a, &w[nw - 8]);
    cftf162(&a[32], &w[nw - 32]);
    cftf161(&a[64], &w[nw - 8]);
    cftf161(&a[96], &w[nw - 8]);
  } else {
    cftf081(a, &w[nw - 8]);
    cftf082(&a[16], &w[nw - 8]);
    cftf081(&a[32], &w[nw - 8]);
    cftf081(&a[48], &w[nw - 8]);
  }
}


x86 assembly (clang, -O0):
<cftfx41>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x80,-0x4(%rbp)
jne    11ed <cftfx41+0xad>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1030 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x80,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%eax
sub    $0x20,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1050 <cftf162@plt>
mov    -0x10(%rbp),%rdi
add    $0x100,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1030 <cftf161@plt>
mov    -0x10(%rbp),%rdi
add    $0x180,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1030 <cftf161@plt>
jmp    126f <cftfx41+0x12f>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1040 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0x40,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1060 <cftf082@plt>
mov    -0x10(%rbp),%rdi
add    $0x80,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1040 <cftf081@plt>
mov    -0x10(%rbp),%rdi
add    $0xc0,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%eax
sub    $0x8,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1040 <cftf081@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cftfx41>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
movslq %edx,%r12
lea    (%rcx,%r12,4),%r14
add    $0xffffffffffffffe0,%r14
cmp    $0x80,%edi
jne    11ac <cftfx41+0x6c>
mov    %rcx,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <cftf161@plt>
lea    0x80(%rbx),%rdi
lea    (%r15,%r12,4),%rsi
add    $0xffffffffffffff80,%rsi
call   1050 <cftf162@plt>
lea    0x100(%rbx),%rdi
mov    %r14,%rsi
call   1030 <cftf161@plt>
add    $0x180,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <cftf161@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <cftf081@plt>
lea    0x40(%rbx),%rdi
mov    %r14,%rsi
call   1060 <cftf082@plt>
lea    0x80(%rbx),%rdi
mov    %r14,%rsi
call   1040 <cftf081@plt>
add    $0xc0,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <cftf081@plt>

LLVM IR (-O0):
define void @cftfx41(i32 %0, float* %1, i32 %2, float* %3) {
%5 = alloca i32
%6 = alloca float*
%7 = alloca i32
%8 = alloca float*
store i32 %0, i32* %5
store float* %1, float** %6
store i32 %2, i32* %7
store float* %3, float** %8
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 128
br i1 %10, label %11, label %39
11: ; preds = %4
%12 = load float*, float** %6
%13 = load float*, float** %8
%14 = load i32, i32* %7
%15 = sub nsw i32 %14, 8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds float, float* %13, i64 %16
%18 = load float*, float** %6
%19 = getelementptr inbounds float, float* %18, i64 32
%20 = load float*, float** %8
%21 = load i32, i32* %7
%22 = sub nsw i32 %21, 32
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %20, i64 %23
%25 = load float*, float** %6
%26 = getelementptr inbounds float, float* %25, i64 64
%27 = load float*, float** %8
%28 = load i32, i32* %7
%29 = sub nsw i32 %28, 8
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds float, float* %27, i64 %30
%32 = load float*, float** %6
%33 = getelementptr inbounds float, float* %32, i64 96
%34 = load float*, float** %8
%35 = load i32, i32* %7
%36 = sub nsw i32 %35, 8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds float, float* %34, i64 %37
br label %67
39: ; preds = %4
%40 = load float*, float** %6
%41 = load float*, float** %8
%42 = load i32, i32* %7
%43 = sub nsw i32 %42, 8
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds float, float* %41, i64 %44
%46 = load float*, float** %6
%47 = getelementptr inbounds float, float* %46, i64 16
%48 = load float*, float** %8
%49 = load i32, i32* %7
%50 = sub nsw i32 %49, 8
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds float, float* %48, i64 %51
%53 = load float*, float** %6
%54 = getelementptr inbounds float, float* %53, i64 32
%55 = load float*, float** %8
%56 = load i32, i32* %7
%57 = sub nsw i32 %56, 8
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds float, float* %55, i64 %58
%60 = load float*, float** %6
%61 = getelementptr inbounds float, float* %60, i64 48
%62 = load float*, float** %8
%63 = load i32, i32* %7
%64 = sub nsw i32 %63, 8
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds float, float* %62, i64 %65
br label %67
67: ; preds = %39, %11
ret void
}

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