#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*/ initTrig(int, double *, double *);
int /*<<< orphan*/ twiddleFFT_10(int, int, int, int, double *, double *,
                                 double *, double *);
int /*<<< orphan*/ twiddleFFT_2(int, int, int, int, double *, double *,
                                double *, double *);
int /*<<< orphan*/ twiddleFFT_3(int, int, int, int, double *, double *,
                                double *, double *);
int /*<<< orphan*/ twiddleFFT_4(int, int, int, int, double *, double *,
                                double *, double *);
int /*<<< orphan*/ twiddleFFT_5(int, int, int, int, double *, double *,
                                double *, double *);
int /*<<< orphan*/ twiddleFFT_7(int, int, int, int, double *, double *,
                                double *, double *);
int /*<<< orphan*/ twiddleFFT_8(int, int, int, int, double *, double *,
                                double *, double *);
int /*<<< orphan*/ twiddleFFT_odd(int, int, int, int, double *, double *,
                                  double *, double *, double *, double *);
void twiddleTransfCtxt(int sofarRadix, int radix, int remainRadix,
                       double tblRe[], double tblIm[], double yRe[],
                       double yIm[]) {
  int groupOffset, dataOffset;
  int dataNo, twNo;
  double trigRe[37], trigIm[37];
  double twiddleRe[37], twiddleIm[37];
  int twiddleIncrement, twiddleIndex;
  if (radix > 10)
    initTrig(radix, trigRe, trigIm);
  twiddleIncrement = 0;
  dataOffset = 0;
  groupOffset = dataOffset;
  for (dataNo = 0; dataNo < sofarRadix; dataNo++) {
    twiddleIndex = 0;
    for (twNo = 0; twNo < radix; twNo++) {
      twiddleRe[twNo] = tblRe[twiddleIndex];
      twiddleIm[twNo] = tblIm[twiddleIndex];
      twiddleIndex = twiddleIndex + twiddleIncrement;
    }
    twiddleIncrement = twiddleIncrement + remainRadix;
    switch (radix) {
    case 2:
      twiddleFFT_2(sofarRadix, radix, remainRadix, groupOffset, twiddleRe,
                   twiddleIm, yRe, yIm);
      break;
    case 3:
      twiddleFFT_3(sofarRadix, radix, remainRadix, groupOffset, twiddleRe,
                   twiddleIm, yRe, yIm);
      break;
    case 4:
      twiddleFFT_4(sofarRadix, radix, remainRadix, groupOffset, twiddleRe,
                   twiddleIm, yRe, yIm);
      break;
    case 5:
      twiddleFFT_5(sofarRadix, radix, remainRadix, groupOffset, twiddleRe,
                   twiddleIm, yRe, yIm);
      break;
    case 7:
      twiddleFFT_7(sofarRadix, radix, remainRadix, groupOffset, twiddleRe,
                   twiddleIm, yRe, yIm);
      break;
    case 8:
      twiddleFFT_8(sofarRadix, radix, remainRadix, groupOffset, twiddleRe,
                   twiddleIm, yRe, yIm);
      break;
    case 10:
      twiddleFFT_10(sofarRadix, radix, remainRadix, groupOffset, twiddleRe,
                    twiddleIm, yRe, yIm);
      break;
    default:
      twiddleFFT_odd(sofarRadix, radix, remainRadix, groupOffset, twiddleRe,
                     twiddleIm, trigRe, trigIm, yRe, yIm);
      break;
    }
    dataOffset = dataOffset + 1;
    groupOffset = dataOffset;
  }
}


x86 assembly (clang, -O0):
<twiddleTransfCtxt>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x528,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0xa,-0x10(%rbp)
jle    11d5 <twiddleTransfCtxt+0x45>
mov    -0x10(%rbp),%edi
lea    -0x170(%rbp),%rsi
lea    -0x2a0(%rbp),%rdx
call   1030 <initTrig@plt>
movl   $0x0,-0x504(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    148e <twiddleTransfCtxt+0x2fe>
movl   $0x0,-0x508(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1276 <twiddleTransfCtxt+0xe6>
mov    -0x20(%rbp),%rax
movslq -0x508(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x40(%rbp),%rax
movsd  %xmm0,-0x3d0(%rbp,%rax,8)
ff ff
mov    -0x28(%rbp),%rax
movslq -0x508(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x40(%rbp),%rax
movsd  %xmm0,-0x500(%rbp,%rax,8)
ff ff
mov    -0x508(%rbp),%eax
add    -0x504(%rbp),%eax
mov    %eax,-0x508(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1210 <twiddleTransfCtxt+0x80>
mov    -0x504(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x504(%rbp)
mov    -0x10(%rbp),%eax
add    $0xfffffffe,%eax
mov    %eax,%ecx
mov    %rcx,-0x510(%rbp)
sub    $0x8,%eax
ja     1429 <twiddleTransfCtxt+0x299>
mov    -0x510(%rbp),%rax
lea    0xd53(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    -0x3d0(%rbp),%r8
lea    -0x500(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1070 <twiddleFFT_2@plt>
jmp    1471 <twiddleTransfCtxt+0x2e1>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    -0x3d0(%rbp),%r8
lea    -0x500(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   10a0 <twiddleFFT_3@plt>
jmp    1471 <twiddleTransfCtxt+0x2e1>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    -0x3d0(%rbp),%r8
lea    -0x500(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <twiddleFFT_4@plt>
jmp    1471 <twiddleTransfCtxt+0x2e1>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    -0x3d0(%rbp),%r8
lea    -0x500(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <twiddleFFT_5@plt>
jmp    1471 <twiddleTransfCtxt+0x2e1>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    -0x3d0(%rbp),%r8
lea    -0x500(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   10b0 <twiddleFFT_7@plt>
jmp    1471 <twiddleTransfCtxt+0x2e1>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    -0x3d0(%rbp),%r8
lea    -0x500(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1060 <twiddleFFT_8@plt>
jmp    1471 <twiddleTransfCtxt+0x2e1>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    -0x3d0(%rbp),%r8
lea    -0x500(%rbp),%r9
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1040 <twiddleFFT_10@plt>
jmp    1471 <twiddleTransfCtxt+0x2e1>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x34(%rbp),%ecx
lea    -0x3d0(%rbp),%r8
lea    -0x500(%rbp),%r9
lea    -0x170(%rbp),%rbx
lea    -0x2a0(%rbp),%r11
mov    -0x30(%rbp),%r10
mov    0x10(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1080 <twiddleFFT_odd@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11f3 <twiddleTransfCtxt+0x63>
add    $0x528,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<twiddleTransfCtxt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4f8,%rsp
mov    %r9,0x20(%rsp)
mov    %rcx,%r14
mov    %edx,0xc(%rsp)
mov    %esi,%r9d
cmp    $0xb,%esi
mov    %r9,0x18(%rsp)
mov    %edi,0x8(%rsp)
mov    %r8,0x10(%rsp)
jl     11e9 <twiddleTransfCtxt+0x59>
lea    0x3d0(%rsp),%rsi
lea    0x2a0(%rsp),%rdx
mov    %r9d,%edi
call   1030 <initTrig@plt>
mov    0x10(%rsp),%r8
mov    0x8(%rsp),%edi
mov    0x18(%rsp),%r9
test   %edi,%edi
jle    14ac <twiddleTransfCtxt+0x31c>
movslq 0xc(%rsp),%rax
mov    %r9d,%r12d
mov    %r12,0x28(%rsp)
and    $0xfffffffe,%r12d
mov    %rax,0x38(%rsp)
lea    0x0(,%rax,8),%rax
mov    %rax,0x30(%rsp)
xor    %r13d,%r13d
mov    %r14,%rbx
mov    %r8,%r15
xor    %ebp,%ebp
jmp    127d <twiddleTransfCtxt+0xed>
mov    0x8(%rsp),%edi
mov    $0x8,%esi
mov    0xc(%rsp),%edx
mov    %ebp,%ecx
lea    0x170(%rsp),%r8
lea    0x40(%rsp),%r9
push   0x530(%rsp)
push   0x28(%rsp)
call   1060 <twiddleFFT_8@plt>
nopl   (%rax)
mov    0x20(%rsp),%r8
mov    0x18(%rsp),%eax
mov    0x28(%rsp),%r9
add    $0x10,%rsp
add    0x38(%rsp),%r13
add    $0x1,%ebp
mov    0x30(%rsp),%rcx
add    %rcx,%r15
add    %rcx,%rbx
cmp    %eax,%ebp
je     14ac <twiddleTransfCtxt+0x31c>
test   %r9d,%r9d
jle    131a <twiddleTransfCtxt+0x18a>
xor    %eax,%eax
cmp    $0x1,%r9d
jne    12a0 <twiddleTransfCtxt+0x110>
xor    %ecx,%ecx
jmp    12f8 <twiddleTransfCtxt+0x168>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r14,%rdx,8),%xmm0
movsd  %xmm0,0x170(%rsp,%rax,8)
movsd  (%r8,%rdx,8),%xmm0
movsd  %xmm0,0x40(%rsp,%rax,8)
lea    (%rdx,%r13,1),%rcx
movsd  (%rbx,%rdx,8),%xmm0
movsd  %xmm0,0x178(%rsp,%rax,8)
movsd  (%r15,%rdx,8),%xmm0
movsd  %xmm0,0x48(%rsp,%rax,8)
add    %r13,%rcx
add    $0x2,%rax
mov    %rcx,%rdx
cmp    %rax,%r12
jne    12b0 <twiddleTransfCtxt+0x120>
testb  $0x1,0x28(%rsp)
je     131a <twiddleTransfCtxt+0x18a>
movsd  (%r14,%rcx,8),%xmm0
movsd  %xmm0,0x170(%rsp,%rax,8)
movsd  (%r8,%rcx,8),%xmm0
movsd  %xmm0,0x40(%rsp,%rax,8)
lea    -0x2(%r9),%eax
cmp    $0x8,%eax
ja     1395 <twiddleTransfCtxt+0x205>
lea    0xcd6(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x8(%rsp),%edi
mov    $0x2,%esi
mov    0xc(%rsp),%edx
mov    %ebp,%ecx
lea    0x170(%rsp),%r8
lea    0x40(%rsp),%r9
push   0x530(%rsp)
push   0x28(%rsp)
call   1070 <twiddleFFT_2@plt>
jmp    1250 <twiddleTransfCtxt+0xc0>
mov    0x8(%rsp),%edi
mov    $0x3,%esi
mov    0xc(%rsp),%edx
mov    %ebp,%ecx
lea    0x170(%rsp),%r8
lea    0x40(%rsp),%r9
push   0x530(%rsp)
push   0x28(%rsp)
call   10a0 <twiddleFFT_3@plt>
jmp    1250 <twiddleTransfCtxt+0xc0>
mov    0x8(%rsp),%edi
mov    %r9d,%esi
mov    0xc(%rsp),%edx
mov    %ebp,%ecx
lea    0x170(%rsp),%r8
lea    0x40(%rsp),%r9
push   0x530(%rsp)
push   0x28(%rsp)
lea    0x2b0(%rsp),%rax
push   %rax
lea    0x3e8(%rsp),%rax
push   %rax
call   1080 <twiddleFFT_odd@plt>
mov    0x30(%rsp),%r8
mov    0x28(%rsp),%eax
mov    0x38(%rsp),%r9
add    $0x20,%rsp
jmp    1262 <twiddleTransfCtxt+0xd2>
mov    0x8(%rsp),%edi
mov    $0x4,%esi
mov    0xc(%rsp),%edx
mov    %ebp,%ecx
lea    0x170(%rsp),%r8
lea    0x40(%rsp),%r9
push   0x530(%rsp)
push   0x28(%rsp)
call   1050 <twiddleFFT_4@plt>
jmp    1250 <twiddleTransfCtxt+0xc0>
mov    0x8(%rsp),%edi
mov    $0x5,%esi
mov    0xc(%rsp),%edx
mov    %ebp,%ecx
lea    0x170(%rsp),%r8
lea    0x40(%rsp),%r9
push   0x530(%rsp)
push   0x28(%rsp)
call   1090 <twiddleFFT_5@plt>
jmp    1250 <twiddleTransfCtxt+0xc0>
mov    0x8(%rsp),%edi
mov    $0x7,%esi
mov    0xc(%rsp),%edx
mov    %ebp,%ecx
lea    0x170(%rsp),%r8
lea    0x40(%rsp),%r9
push   0x530(%rsp)
push   0x28(%rsp)
call   10b0 <twiddleFFT_7@plt>
jmp    1250 <twiddleTransfCtxt+0xc0>
mov    0x8(%rsp),%edi
mov    $0xa,%esi
mov    0xc(%rsp),%edx
mov    %ebp,%ecx
lea    0x170(%rsp),%r8
lea    0x40(%rsp),%r9
push   0x530(%rsp)
push   0x28(%rsp)
call   1040 <twiddleFFT_10@plt>
jmp    1250 <twiddleTransfCtxt+0xc0>
add    $0x4f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @twiddleTransfCtxt(i32 %0, i32 %1, i32 %2, double* %3, double* %4, double* %5, double* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca [37 x double]
%20 = alloca [37 x double]
%21 = alloca [37 x double]
%22 = alloca [37 x double]
%23 = alloca i32
%24 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%25 = load i32, i32* %9
%26 = icmp sgt i32 %25, 10
br i1 %26, label %27, label %32
27: ; preds = %7
%28 = load i32, i32* %9
%29 = getelementptr inbounds [37 x double], [37 x double]* %19, i64 0, i64 0
%30 = getelementptr inbounds [37 x double], [37 x double]* %20, i64 0, i64 0
%31 = call i32 @initTrig(i32 %28, double* %29, double* %30)
br label %32
32: ; preds = %27, %7
store i32 0, i32* %23
store i32 0, i32* %16
%33 = load i32, i32* %16
store i32 %33, i32* %15
store i32 0, i32* %17
br label %34
34: ; preds = %157, %32
%35 = load i32, i32* %17
%36 = load i32, i32* %8
%37 = icmp slt i32 %35, %36
br i1 %37, label %38, label %160
38: ; preds = %34
store i32 0, i32* %24
store i32 0, i32* %18
br label %39
39: ; preds = %63, %38
%40 = load i32, i32* %18
%41 = load i32, i32* %9
%42 = icmp slt i32 %40, %41
br i1 %42, label %43, label %66
43: ; preds = %39
%44 = load double*, double** %11
%45 = load i32, i32* %24
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double, double* %44, i64 %46
%48 = load double, double* %47
%49 = load i32, i32* %18
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [37 x double], [37 x double]* %21, i64 0, i64 %50
store double %48, double* %51
%52 = load double*, double** %12
%53 = load i32, i32* %24
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %52, i64 %54
%56 = load double, double* %55
%57 = load i32, i32* %18
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [37 x double], [37 x double]* %22, i64 0, i64 %58
store double %56, double* %59
%60 = load i32, i32* %24
%61 = load i32, i32* %23
%62 = add nsw i32 %60, %61
store i32 %62, i32* %24
br label %63
63: ; preds = %43
%64 = load i32, i32* %18
%65 = add nsw i32 %64, 1
store i32 %65, i32* %18
br label %39
66: ; preds = %39
%67 = load i32, i32* %23
%68 = load i32, i32* %10
%69 = add nsw i32 %67, %68
store i32 %69, i32* %23
%70 = load i32, i32* %9
switch i32 %70, label %141 [
i32 2, label %71
i32 3, label %81
i32 4, label %91
i32 5, label %101
i32 7, label %111
i32 8, label %121
i32 10, label %131
]
71: ; preds = %66
%72 = load i32, i32* %8
%73 = load i32, i32* %9
%74 = load i32, i32* %10
%75 = load i32, i32* %15
%76 = getelementptr inbounds [37 x double], [37 x double]* %21, i64 0, i64 0
%77 = getelementptr inbounds [37 x double], [37 x double]* %22, i64 0, i64 0
%78 = load double*, double** %13
%79 = load double*, double** %14
%80 = call i32 @twiddleFFT_2(i32 %72, i32 %73, i32 %74, i32 %75, double* %76, double* %77, double* %78, double* %79)
br label %153
81: ; preds = %66
%82 = load i32, i32* %8
%83 = load i32, i32* %9
%84 = load i32, i32* %10
%85 = load i32, i32* %15
%86 = getelementptr inbounds [37 x double], [37 x double]* %21, i64 0, i64 0
%87 = getelementptr inbounds [37 x double], [37 x double]* %22, i64 0, i64 0
%88 = load double*, double** %13
%89 = load double*, double** %14
%90 = call i32 @twiddleFFT_3(i32 %82, i32 %83, i32 %84, i32 %85, double* %86, double* %87, double* %88, double* %89)
br label %153
91: ; preds = %66
%92 = load i32, i32* %8
%93 = load i32, i32* %9
%94 = load i32, i32* %10
%95 = load i32, i32* %15
%96 = getelementptr inbounds [37 x double], [37 x double]* %21, i64 0, i64 0
%97 = getelementptr inbounds [37 x double], [37 x double]* %22, i64 0, i64 0
%98 = load double*, double** %13
%99 = load double*, double** %14
%100 = call i32 @twiddleFFT_4(i32 %92, i32 %93, i32 %94, i32 %95, double* %96, double* %97, double* %98, double* %99)
br label %153
101: ; preds = %66
%102 = load i32, i32* %8
%103 = load i32, i32* %9
%104 = load i32, i32* %10
%105 = load i32, i32* %15
%106 = getelementptr inbounds [37 x double], [37 x double]* %21, i64 0, i64 0
%107 = getelementptr inbounds [37 x double], [37 x double]* %22, i64 0, i64 0
%108 = load double*, double** %13
%109 = load double*, double** %14
%110 = call i32 @twiddleFFT_5(i32 %102, i32 %103, i32 %104, i32 %105, double* %106, double* %107, double* %108, double* %109)
br label %153
111: ; preds = %66
%112 = load i32, i32* %8
%113 = load i32, i32* %9
%114 = load i32, i32* %10
%115 = load i32, i32* %15
%116 = getelementptr inbounds [37 x double], [37 x double]* %21, i64 0, i64 0
%117 = getelementptr inbounds [37 x double], [37 x double]* %22, i64 0, i64 0
%118 = load double*, double** %13
%119 = load double*, double** %14
%120 = call i32 @twiddleFFT_7(i32 %112, i32 %113, i32 %114, i32 %115, double* %116, double* %117, double* %118, double* %119)
br label %153
121: ; preds = %66
%122 = load i32, i32* %8
%123 = load i32, i32* %9
%124 = load i32, i32* %10
%125 = load i32, i32* %15
%126 = getelementptr inbounds [37 x double], [37 x double]* %21, i64 0, i64 0
%127 = getelementptr inbounds [37 x double], [37 x double]* %22, i64 0, i64 0
%128 = load double*, double** %13
%129 = load double*, double** %14
%130 = call i32 @twiddleFFT_8(i32 %122, i32 %123, i32 %124, i32 %125, double* %126, double* %127, double* %128, double* %129)
br label %153
131: ; preds = %66
%132 = load i32, i32* %8
%133 = load i32, i32* %9
%134 = load i32, i32* %10
%135 = load i32, i32* %15
%136 = getelementptr inbounds [37 x double], [37 x double]* %21, i64 0, i64 0
%137 = getelementptr inbounds [37 x double], [37 x double]* %22, i64 0, i64 0
%138 = load double*, double** %13
%139 = load double*, double** %14
%140 = call i32 @twiddleFFT_10(i32 %132, i32 %133, i32 %134, i32 %135, double* %136, double* %137, double* %138, double* %139)
br label %153
141: ; preds = %66
%142 = load i32, i32* %8
%143 = load i32, i32* %9
%144 = load i32, i32* %10
%145 = load i32, i32* %15
%146 = getelementptr inbounds [37 x double], [37 x double]* %21, i64 0, i64 0
%147 = getelementptr inbounds [37 x double], [37 x double]* %22, i64 0, i64 0
%148 = getelementptr inbounds [37 x double], [37 x double]* %19, i64 0, i64 0
%149 = getelementptr inbounds [37 x double], [37 x double]* %20, i64 0, i64 0
%150 = load double*, double** %13
%151 = load double*, double** %14
%152 = call i32 @twiddleFFT_odd(i32 %142, i32 %143, i32 %144, i32 %145, double* %146, double* %147, double* %148, double* %149, double* %150, double* %151)
br label %153
153: ; preds = %141, %131, %121, %111, %101, %91, %81, %71
%154 = load i32, i32* %16
%155 = add nsw i32 %154, 1
store i32 %155, i32* %16
%156 = load i32, i32* %16
store i32 %156, i32* %15
br label %157
157: ; preds = %153
%158 = load i32, i32* %17
%159 = add nsw i32 %158, 1
store i32 %159, i32* %17
br label %34
160: ; preds = %34
ret void
}

LLVM IR (-O2):
define void @twiddleTransfCtxt(i32 %0, i32 %1, i32 %2, double* nocapture %3, double* nocapture %4, double* %5, double* %6) {
%8 = alloca [37 x double]
%9 = alloca [37 x double]
%10 = alloca [37 x double]
%11 = alloca [37 x double]
%12 = bitcast [37 x double]* %8 to i8*
%13 = bitcast [37 x double]* %9 to i8*
%14 = bitcast [37 x double]* %10 to i8*
%15 = bitcast [37 x double]* %11 to i8*
%16 = icmp sgt i32 %1, 10
br i1 %16, label %17, label %21
17: ; preds = %7
%18 = getelementptr inbounds [37 x double], [37 x double]* %8, i64 0, i64 0
%19 = getelementptr inbounds [37 x double], [37 x double]* %9, i64 0, i64 0
%20 = call i32 @initTrig(i32 %1, double* %18, double* %19)
br label %21
21: ; preds = %17, %7
%22 = icmp sgt i32 %0, 0
br i1 %22, label %23, label %92
23: ; preds = %21
%24 = icmp sgt i32 %1, 0
%25 = getelementptr inbounds [37 x double], [37 x double]* %10, i64 0, i64 0
%26 = getelementptr inbounds [37 x double], [37 x double]* %11, i64 0, i64 0
%27 = getelementptr inbounds [37 x double], [37 x double]* %8, i64 0, i64 0
%28 = getelementptr inbounds [37 x double], [37 x double]* %9, i64 0, i64 0
%29 = sext i32 %2 to i64
%30 = zext i32 %1 to i64
%31 = and i64 %30, 1
%32 = icmp eq i32 %1, 1
%33 = and i64 %30, 4294967294
%34 = icmp eq i64 %31, 0
br label %35
35: ; preds = %23, %89
%36 = phi i64 [ 0, %23 ], [ %72, %89 ]
%37 = phi i32 [ 0, %23 ], [ %90, %89 ]
br i1 %24, label %38, label %71
38: ; preds = %35
br i1 %32, label %61, label %39
39: ; preds = %38, %39
%40 = phi i64 [ %58, %39 ], [ 0, %38 ]
%41 = phi i64 [ %57, %39 ], [ 0, %38 ]
%42 = phi i64 [ %59, %39 ], [ 0, %38 ]
%43 = getelementptr inbounds double, double* %3, i64 %41
%44 = load double, double* %43
%45 = getelementptr inbounds [37 x double], [37 x double]* %10, i64 0, i64 %40
store double %44, double* %45
%46 = getelementptr inbounds double, double* %4, i64 %41
%47 = load double, double* %46
%48 = getelementptr inbounds [37 x double], [37 x double]* %11, i64 0, i64 %40
store double %47, double* %48
%49 = add i64 %41, %36
%50 = or i64 %40, 1
%51 = getelementptr inbounds double, double* %3, i64 %49
%52 = load double, double* %51
%53 = getelementptr inbounds [37 x double], [37 x double]* %10, i64 0, i64 %50
store double %52, double* %53
%54 = getelementptr inbounds double, double* %4, i64 %49
%55 = load double, double* %54
%56 = getelementptr inbounds [37 x double], [37 x double]* %11, i64 0, i64 %50
store double %55, double* %56
%57 = add i64 %49, %36
%58 = add nuw nsw i64 %40, 2
%59 = add i64 %42, 2
%60 = icmp eq i64 %59, %33
br i1 %60, label %61, label %39
61: ; preds = %39, %38
%62 = phi i64 [ 0, %38 ], [ %58, %39 ]
%63 = phi i64 [ 0, %38 ], [ %57, %39 ]
br i1 %34, label %71, label %64
64: ; preds = %61
%65 = getelementptr inbounds double, double* %3, i64 %63
%66 = load double, double* %65
%67 = getelementptr inbounds [37 x double], [37 x double]* %10, i64 0, i64 %62
store double %66, double* %67
%68 = getelementptr inbounds double, double* %4, i64 %63
%69 = load double, double* %68
%70 = getelementptr inbounds [37 x double], [37 x double]* %11, i64 0, i64 %62
store double %69, double* %70
br label %71
71: ; preds = %64, %61, %35
%72 = add nsw i64 %36, %29
switch i32 %1, label %87 [
i32 2, label %73
i32 3, label %75
i32 4, label %77
i32 5, label %79
i32 7, label %81
i32 8, label %83
i32 10, label %85
]
73: ; preds = %71
%74 = call i32 @twiddleFFT_2(i32 %0, i32 2, i32 %2, i32 %37, double* %25, double* %26, double* %5, double* %6)
br label %89
75: ; preds = %71
%76 = call i32 @twiddleFFT_3(i32 %0, i32 3, i32 %2, i32 %37, double* %25, double* %26, double* %5, double* %6)
br label %89
77: ; preds = %71
%78 = call i32 @twiddleFFT_4(i32 %0, i32 4, i32 %2, i32 %37, double* %25, double* %26, double* %5, double* %6)
br label %89
79: ; preds = %71
%80 = call i32 @twiddleFFT_5(i32 %0, i32 5, i32 %2, i32 %37, double* %25, double* %26, double* %5, double* %6)
br label %89
81: ; preds = %71
%82 = call i32 @twiddleFFT_7(i32 %0, i32 7, i32 %2, i32 %37, double* %25, double* %26, double* %5, double* %6)
br label %89
83: ; preds = %71
%84 = call i32 @twiddleFFT_8(i32 %0, i32 8, i32 %2, i32 %37, double* %25, double* %26, double* %5, double* %6)
br label %89
85: ; preds = %71
%86 = call i32 @twiddleFFT_10(i32 %0, i32 10, i32 %2, i32 %37, double* %25, double* %26, double* %5, double* %6)
br label %89
87: ; preds = %71
%88 = call i32 @twiddleFFT_odd(i32 %0, i32 %1, i32 %2, i32 %37, double* %25, double* %26, double* %27, double* %28, double* %5, double* %6)
br label %89
89: ; preds = %87, %85, %83, %81, %79, %77, %75, %73
%90 = add nuw nsw i32 %37, 1
%91 = icmp eq i32 %90, %0
br i1 %91, label %92, label %35
92: ; preds = %89, %21
ret void
}