void FFT1D(direction, M, N, x, scratch, upriv, umain2, MyNum, l_transtime,
           MyFirst, MyLast, pad_length, P, test_result, doprint, dostats,
           Global) int direction;
int M;
int N;
int *l_transtime;
double *x;
double *upriv;
double *scratch;
double *umain2;
int MyFirst;
int MyLast;
int pad_length;
int P;
int test_result;
int doprint;
int dostats;
struct GlobalMemory *Global;
{
  int i;
  int j;
  int m1;
  int n1;
  int flag = 0;
  unsigned int clocktime1;
  unsigned int clocktime2;
  m1 = M / 2;
  n1 = 1 << m1;
  { ; };
  if ((MyNum == 0) || (dostats)) {
    {
      long time();
      (clocktime1) = time(0);
    };
  }
  Transpose(n1, x, scratch, MyNum, MyFirst, MyLast, pad_length);
  if ((MyNum == 0) || (dostats)) {
    {
      long time();
      (clocktime2) = time(0);
    };
    *l_transtime += (clocktime2 - clocktime1);
  }
  for (j = MyFirst; j < MyLast; j++) {
    FFT1DOnce(direction, m1, n1, upriv, &scratch[2 * j * (n1 + pad_length)]);
    TwiddleOneCol(direction, n1, N, j, umain2,
                  &scratch[2 * j * (n1 + pad_length)], pad_length);
  }
  { ; };
  if ((MyNum == 0) || (dostats)) {
    {
      long time();
      (clocktime1) = time(0);
    };
  }
  Transpose(n1, scratch, x, MyNum, MyFirst, MyLast, pad_length);
  if ((MyNum == 0) || (dostats)) {
    {
      long time();
      (clocktime2) = time(0);
    };
    *l_transtime += (clocktime2 - clocktime1);
  }
  for (j = MyFirst; j < MyLast; j++) {
    FFT1DOnce(direction, m1, n1, upriv, &x[2 * j * (n1 + pad_length)]);
    if (direction == -1)
      Scale(n1, N, &x[2 * j * (n1 + pad_length)]);
  }
  { ; };
  if ((MyNum == 0) || (dostats)) {
    {
      long time();
      (clocktime1) = time(0);
    };
  }
  Transpose(n1, x, scratch, MyNum, MyFirst, MyLast, pad_length);
  if ((MyNum == 0) || (dostats)) {
    {
      long time();
      (clocktime2) = time(0);
    };
    *l_transtime += (clocktime2 - clocktime1);
  }
  { ; };
  if ((test_result) || (doprint)) {
    for (j = MyFirst; j < MyLast; j++) {
      CopyColumn(n1, &scratch[2 * j * (n1 + pad_length)],
                 &x[2 * j * (n1 + pad_length)]);
    }
  }
  { ; };
}


x86 assembly (clang, -O0):
<FFT1D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x60(%rbp),%rax
mov    0x58(%rbp),%eax
mov    0x50(%rbp),%eax
mov    0x48(%rbp),%eax
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x38(%rbp)
cmpl   $0x0,0x18(%rbp)
je     11d7 <FFT1D+0x77>
cmpl   $0x0,0x58(%rbp)
je     11e3 <FFT1D+0x83>
xor    %edi,%edi
mov    $0x0,%al
call   1070 <time@plt>
mov    %eax,-0x40(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    0x18(%rbp),%ecx
mov    0x28(%rbp),%r8d
mov    0x30(%rbp),%r9d
mov    0x38(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <Transpose@plt>
cmpl   $0x0,0x18(%rbp)
je     121a <FFT1D+0xba>
cmpl   $0x0,0x58(%rbp)
je     1234 <FFT1D+0xd4>
xor    %edi,%edi
mov    $0x0,%al
call   1070 <time@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%ecx
sub    -0x40(%rbp),%ecx
mov    0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    0x28(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x30(%rbp),%eax
jge    12c3 <FFT1D+0x163>
mov    -0x4(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    -0x38(%rbp),%r9d
add    0x38(%rbp),%r9d
imul   %r9d,%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
mov    $0x0,%al
call   1050 <FFT1DOnce@plt>
mov    -0x4(%rbp),%edi
mov    -0x38(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x30(%rbp),%ecx
mov    0x10(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    -0x38(%rbp),%r10d
add    0x38(%rbp),%r10d
imul   %r10d,%eax
cltq
shl    $0x3,%rax
add    %rax,%r9
mov    0x38(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1060 <TwiddleOneCol@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    123a <FFT1D+0xda>
cmpl   $0x0,0x18(%rbp)
je     12d7 <FFT1D+0x177>
cmpl   $0x0,0x58(%rbp)
je     12e3 <FFT1D+0x183>
xor    %edi,%edi
mov    $0x0,%al
call   1070 <time@plt>
mov    %eax,-0x40(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x18(%rbp),%ecx
mov    0x28(%rbp),%r8d
mov    0x30(%rbp),%r9d
mov    0x38(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <Transpose@plt>
cmpl   $0x0,0x18(%rbp)
je     131a <FFT1D+0x1ba>
cmpl   $0x0,0x58(%rbp)
je     1334 <FFT1D+0x1d4>
xor    %edi,%edi
mov    $0x0,%al
call   1070 <time@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%ecx
sub    -0x40(%rbp),%ecx
mov    0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    0x28(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x30(%rbp),%eax
jge    13bf <FFT1D+0x25f>
mov    -0x4(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    -0x38(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    -0x38(%rbp),%r9d
add    0x38(%rbp),%r9d
imul   %r9d,%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
mov    $0x0,%al
call   1050 <FFT1DOnce@plt>
cmpl   $0xffffffff,-0x4(%rbp)
jne    13ac <FFT1D+0x24c>
mov    -0x38(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    -0x38(%rbp),%ecx
add    0x38(%rbp),%ecx
imul   %ecx,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    $0x0,%al
call   1030 <Scale@plt>
jmp    13b1 <FFT1D+0x251>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    133a <FFT1D+0x1da>
cmpl   $0x0,0x18(%rbp)
je     13d3 <FFT1D+0x273>
cmpl   $0x0,0x58(%rbp)
je     13df <FFT1D+0x27f>
xor    %edi,%edi
mov    $0x0,%al
call   1070 <time@plt>
mov    %eax,-0x40(%rbp)
mov    -0x38(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    0x18(%rbp),%ecx
mov    0x28(%rbp),%r8d
mov    0x30(%rbp),%r9d
mov    0x38(%rbp),%eax
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <Transpose@plt>
cmpl   $0x0,0x18(%rbp)
je     1416 <FFT1D+0x2b6>
cmpl   $0x0,0x58(%rbp)
je     1430 <FFT1D+0x2d0>
xor    %edi,%edi
mov    $0x0,%al
call   1070 <time@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%ecx
sub    -0x40(%rbp),%ecx
mov    0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
cmpl   $0x0,0x48(%rbp)
jne    1444 <FFT1D+0x2e4>
cmpl   $0x0,0x50(%rbp)
je     14ab <FFT1D+0x34b>
mov    0x28(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x30(%rbp),%eax
jge    14a6 <FFT1D+0x346>
mov    -0x38(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    -0x38(%rbp),%ecx
add    0x38(%rbp),%ecx
imul   %ecx,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
mov    -0x38(%rbp),%ecx
add    0x38(%rbp),%ecx
imul   %ecx,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    $0x0,%al
call   1080 <CopyColumn@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    144a <FFT1D+0x2ea>
jmp    14ab <FFT1D+0x34b>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FFT1D>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,0x38(%rsp)
mov    %r8,%rbx
mov    %rcx,%rbp
mov    %edx,0x34(%rsp)
mov    %edi,0x1c(%rsp)
mov    0xa8(%rsp),%r13d
mov    0xa0(%rsp),%r15d
mov    0x98(%rsp),%r14d
mov    %esi,%ecx
shr    $0x1f,%ecx
add    %esi,%ecx
sar    %ecx
mov    $0x1,%r12d
mov    %ecx,0x18(%rsp)
shl    %cl,%r12d
mov    0x88(%rsp),%ecx
test   %ecx,%ecx
sete   %al
cmpl   $0x0,0xc8(%rsp)
setne  %dl
or     %al,%dl
mov    %dl,0xf(%rsp)
mov    %r8,0x20(%rsp)
mov    %rbp,0x28(%rsp)
mov    %r12,0x10(%rsp)
je     1225 <FFT1D+0xc5>
xor    %edi,%edi
xor    %eax,%eax
call   1070 <time@plt>
mov    %rax,0x40(%rsp)
mov    %r13d,(%rsp)
mov    %r12d,%edi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    0x88(%rsp),%ecx
mov    %r14d,%r8d
mov    %r15d,%r9d
xor    %eax,%eax
call   1040 <Transpose@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1070 <time@plt>
sub    0x40(%rsp),%eax
mov    0x90(%rsp),%rcx
add    %eax,(%rcx)
jmp    123f <FFT1D+0xdf>
mov    %r13d,(%rsp)
mov    %r12d,%edi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r14d,%r8d
mov    %r15d,%r9d
xor    %eax,%eax
call   1040 <Transpose@plt>
cmp    %r15d,%r14d
mov    0x20(%rsp),%rdi
mov    0x38(%rsp),%rcx
mov    0x34(%rsp),%ebx
mov    0x1c(%rsp),%r14d
mov    0x18(%rsp),%esi
jge    12f7 <FFT1D+0x197>
mov    0xa8(%rsp),%eax
mov    0x10(%rsp),%rdx
add    %eax,%edx
mov    0x98(%rsp),%eax
mov    %eax,%r12d
imul   %edx,%r12d
add    %edx,%edx
mov    %edx,0x40(%rsp)
add    %r12d,%r12d
mov    %eax,%r13d
nopw   0x0(%rax,%rax,1)
movslq %r12d,%r12
lea    (%rdi,%r12,8),%rbp
mov    %r14d,%edi
mov    0x10(%rsp),%r15
mov    %r15d,%edx
mov    %rbp,%r8
xor    %eax,%eax
call   1050 <FFT1DOnce@plt>
mov    0xa8(%rsp),%eax
mov    %eax,(%rsp)
mov    %r14d,%edi
mov    %r15d,%esi
mov    0xa0(%rsp),%r15d
mov    %ebx,%edx
mov    %r13d,%ecx
mov    0x80(%rsp),%r8
mov    %rbp,%r9
xor    %eax,%eax
call   1060 <TwiddleOneCol@plt>
mov    0x18(%rsp),%esi
mov    0x38(%rsp),%rcx
mov    0x20(%rsp),%rdi
add    $0x1,%r13d
add    0x40(%rsp),%r12d
cmp    %r13d,%r15d
jne    1290 <FFT1D+0x130>
cmpb   $0x0,0xf(%rsp)
je     1359 <FFT1D+0x1f9>
xor    %edi,%edi
xor    %eax,%eax
call   1070 <time@plt>
mov    %rax,%rbp
mov    0xa8(%rsp),%eax
mov    %eax,(%rsp)
mov    0x10(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    0x28(%rsp),%r12
mov    %r12,%rdx
mov    0x88(%rsp),%ecx
mov    0x98(%rsp),%r14d
mov    %r14d,%r8d
mov    %r15d,%r9d
xor    %eax,%eax
call   1040 <Transpose@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1070 <time@plt>
sub    %ebp,%eax
mov    0x90(%rsp),%rcx
add    %eax,(%rcx)
jmp    1391 <FFT1D+0x231>
mov    0xa8(%rsp),%eax
mov    %eax,(%rsp)
mov    0x10(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    0x28(%rsp),%r12
mov    %r12,%rdx
mov    0x88(%rsp),%ecx
mov    0x98(%rsp),%r14d
mov    %r14d,%r8d
mov    %r15d,%r9d
xor    %eax,%eax
call   1040 <Transpose@plt>
cmp    %r15d,%r14d
mov    0x38(%rsp),%r8
mov    0x18(%rsp),%esi
jge    141f <FFT1D+0x2bf>
mov    0xa8(%rsp),%eax
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,1),%r13d
mov    %r14d,%ebx
imul   %r13d,%ebx
add    %r13d,%r13d
add    %ebx,%ebx
mov    %r15d,%ebp
sub    %r14d,%ebp
jmp    13e6 <FFT1D+0x286>
nopw   0x0(%rax,%rax,1)
add    %r13d,%ebx
add    $0xffffffff,%ebp
mov    0x28(%rsp),%r12
mov    0x38(%rsp),%r8
mov    0x18(%rsp),%esi
je     141f <FFT1D+0x2bf>
movslq %ebx,%rax
lea    (%r12,%rax,8),%r12
mov    0x1c(%rsp),%edi
mov    0x10(%rsp),%rdx
mov    %r8,%rcx
mov    %r12,%r8
xor    %eax,%eax
call   1050 <FFT1DOnce@plt>
cmpl   $0xffffffff,0x1c(%rsp)
jne    13d0 <FFT1D+0x270>
mov    0x10(%rsp),%rdi
mov    0x34(%rsp),%esi
mov    %r12,%rdx
xor    %eax,%eax
call   1030 <Scale@plt>
jmp    13d0 <FFT1D+0x270>
mov    0xc0(%rsp),%ebp
mov    0xb8(%rsp),%ebx
cmpb   $0x0,0xf(%rsp)
je     148d <FFT1D+0x32d>
xor    %edi,%edi
xor    %eax,%eax
call   1070 <time@plt>
mov    %rax,%r12
mov    0xa8(%rsp),%eax
mov    %eax,(%rsp)
mov    0x10(%rsp),%rdi
mov    0x28(%rsp),%rsi
mov    0x20(%rsp),%r13
mov    %r13,%rdx
mov    0x88(%rsp),%ecx
mov    %r14d,%r8d
mov    %r15d,%r9d
xor    %eax,%eax
call   1040 <Transpose@plt>
xor    %edi,%edi
xor    %eax,%eax
call   1070 <time@plt>
sub    %r12d,%eax
mov    0x28(%rsp),%r12
mov    0x90(%rsp),%rcx
add    %eax,(%rcx)
jmp    14bb <FFT1D+0x35b>
mov    0xa8(%rsp),%eax
mov    %eax,(%rsp)
mov    0x10(%rsp),%rdi
mov    %r12,%rsi
mov    0x20(%rsp),%r13
mov    %r13,%rdx
mov    0x88(%rsp),%ecx
mov    %r14d,%r8d
mov    %r15d,%r9d
xor    %eax,%eax
call   1040 <Transpose@plt>
or     %ebx,%ebp
mov    0xa8(%rsp),%ebp
mov    0x10(%rsp),%rbx
je     1504 <FFT1D+0x3a4>
cmp    %r15d,%r14d
jge    1504 <FFT1D+0x3a4>
add    %ebx,%ebp
sub    %r14d,%r15d
imul   %ebp,%r14d
add    %ebp,%ebp
add    %r14d,%r14d
xchg   %ax,%ax
movslq %r14d,%r14
lea    0x0(,%r14,8),%rsi
add    %r13,%rsi
lea    (%r12,%r14,8),%rdx
mov    %ebx,%edi
xor    %eax,%eax
call   1080 <CopyColumn@plt>
add    %ebp,%r14d
add    $0xffffffff,%r15d
jne    14e0 <FFT1D+0x380>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.GlobalMemory = type opaque
define void @FFT1D(i32 %0, i32 %1, i32 %2, double* %3, double* %4, double* %5, double* %6, i32 %7, i32* %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, %struct.GlobalMemory* %16) {
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca double*
%22 = alloca double*
%23 = alloca double*
%24 = alloca double*
%25 = alloca i32
%26 = alloca i32*
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca %struct.GlobalMemory*
%35 = alloca i32
%36 = alloca i32
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
%41 = alloca i32
store i32 %0, i32* %18
store i32 %1, i32* %19
store i32 %2, i32* %20
store double* %3, double** %21
store double* %4, double** %22
store double* %5, double** %23
store double* %6, double** %24
store i32 %7, i32* %25
store i32* %8, i32** %26
store i32 %9, i32* %27
store i32 %10, i32* %28
store i32 %11, i32* %29
store i32 %12, i32* %30
store i32 %13, i32* %31
store i32 %14, i32* %32
store i32 %15, i32* %33
store %struct.GlobalMemory* %16, %struct.GlobalMemory** %34
store i32 0, i32* %39
%42 = load i32, i32* %19
%43 = sdiv i32 %42, 2
store i32 %43, i32* %37
%44 = load i32, i32* %37
%45 = shl i32 1, %44
store i32 %45, i32* %38
%46 = load i32, i32* %25
%47 = icmp eq i32 %46, 0
br i1 %47, label %51, label %48
48: ; preds = %17
%49 = load i32, i32* %33
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %48, %17
%52 = call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%53 = trunc i64 %52 to i32
store i32 %53, i32* %40
br label %54
54: ; preds = %51, %48
%55 = load i32, i32* %38
%56 = load double*, double** %21
%57 = load double*, double** %22
%58 = load i32, i32* %25
%59 = load i32, i32* %27
%60 = load i32, i32* %28
%61 = load i32, i32* %29
%62 = call i32 (i32, double*, double*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @Transpose to i32 (i32, double*, double*, i32, i32, i32, i32, ...)*)(i32 %55, double* %56, double* %57, i32 %58, i32 %59, i32 %60, i32 %61)
%63 = load i32, i32* %25
%64 = icmp eq i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %54
%66 = load i32, i32* %33
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %77
68: ; preds = %65, %54
%69 = call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%70 = trunc i64 %69 to i32
store i32 %70, i32* %41
%71 = load i32, i32* %41
%72 = load i32, i32* %40
%73 = sub i32 %71, %72
%74 = load i32*, i32** %26
%75 = load i32, i32* %74
%76 = add i32 %75, %73
store i32 %76, i32* %74
br label %77
77: ; preds = %68, %65
%78 = load i32, i32* %27
store i32 %78, i32* %36
br label %79
79: ; preds = %114, %77
%80 = load i32, i32* %36
%81 = load i32, i32* %28
%82 = icmp slt i32 %80, %81
br i1 %82, label %83, label %117
83: ; preds = %79
%84 = load i32, i32* %18
%85 = load i32, i32* %37
%86 = load i32, i32* %38
%87 = load double*, double** %23
%88 = load double*, double** %22
%89 = load i32, i32* %36
%90 = mul nsw i32 2, %89
%91 = load i32, i32* %38
%92 = load i32, i32* %29
%93 = add nsw i32 %91, %92
%94 = mul nsw i32 %90, %93
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double, double* %88, i64 %95
%97 = call i32 (i32, i32, i32, double*, double*, ...) bitcast (i32 (...)* @FFT1DOnce to i32 (i32, i32, i32, double*, double*, ...)*)(i32 %84, i32 %85, i32 %86, double* %87, double* %96)
%98 = load i32, i32* %18
%99 = load i32, i32* %38
%100 = load i32, i32* %20
%101 = load i32, i32* %36
%102 = load double*, double** %24
%103 = load double*, double** %22
%104 = load i32, i32* %36
%105 = mul nsw i32 2, %104
%106 = load i32, i32* %38
%107 = load i32, i32* %29
%108 = add nsw i32 %106, %107
%109 = mul nsw i32 %105, %108
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %103, i64 %110
%112 = load i32, i32* %29
%113 = call i32 (i32, i32, i32, i32, double*, double*, i32, ...) bitcast (i32 (...)* @TwiddleOneCol to i32 (i32, i32, i32, i32, double*, double*, i32, ...)*)(i32 %98, i32 %99, i32 %100, i32 %101, double* %102, double* %111, i32 %112)
br label %114
114: ; preds = %83
%115 = load i32, i32* %36
%116 = add nsw i32 %115, 1
store i32 %116, i32* %36
br label %79
117: ; preds = %79
%118 = load i32, i32* %25
%119 = icmp eq i32 %118, 0
br i1 %119, label %123, label %120
120: ; preds = %117
%121 = load i32, i32* %33
%122 = icmp ne i32 %121, 0
br i1 %122, label %123, label %126
123: ; preds = %120, %117
%124 = call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%125 = trunc i64 %124 to i32
store i32 %125, i32* %40
br label %126
126: ; preds = %123, %120
%127 = load i32, i32* %38
%128 = load double*, double** %22
%129 = load double*, double** %21
%130 = load i32, i32* %25
%131 = load i32, i32* %27
%132 = load i32, i32* %28
%133 = load i32, i32* %29
%134 = call i32 (i32, double*, double*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @Transpose to i32 (i32, double*, double*, i32, i32, i32, i32, ...)*)(i32 %127, double* %128, double* %129, i32 %130, i32 %131, i32 %132, i32 %133)
%135 = load i32, i32* %25
%136 = icmp eq i32 %135, 0
br i1 %136, label %140, label %137
137: ; preds = %126
%138 = load i32, i32* %33
%139 = icmp ne i32 %138, 0
br i1 %139, label %140, label %149
140: ; preds = %137, %126
%141 = call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%142 = trunc i64 %141 to i32
store i32 %142, i32* %41
%143 = load i32, i32* %41
%144 = load i32, i32* %40
%145 = sub i32 %143, %144
%146 = load i32*, i32** %26
%147 = load i32, i32* %146
%148 = add i32 %147, %145
store i32 %148, i32* %146
br label %149
149: ; preds = %140, %137
%150 = load i32, i32* %27
store i32 %150, i32* %36
br label %151
151: ; preds = %186, %149
%152 = load i32, i32* %36
%153 = load i32, i32* %28
%154 = icmp slt i32 %152, %153
br i1 %154, label %155, label %189
155: ; preds = %151
%156 = load i32, i32* %18
%157 = load i32, i32* %37
%158 = load i32, i32* %38
%159 = load double*, double** %23
%160 = load double*, double** %21
%161 = load i32, i32* %36
%162 = mul nsw i32 2, %161
%163 = load i32, i32* %38
%164 = load i32, i32* %29
%165 = add nsw i32 %163, %164
%166 = mul nsw i32 %162, %165
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds double, double* %160, i64 %167
%169 = call i32 (i32, i32, i32, double*, double*, ...) bitcast (i32 (...)* @FFT1DOnce to i32 (i32, i32, i32, double*, double*, ...)*)(i32 %156, i32 %157, i32 %158, double* %159, double* %168)
%170 = load i32, i32* %18
%171 = icmp eq i32 %170, -1
br i1 %171, label %172, label %185
172: ; preds = %155
%173 = load i32, i32* %38
%174 = load i32, i32* %20
%175 = load double*, double** %21
%176 = load i32, i32* %36
%177 = mul nsw i32 2, %176
%178 = load i32, i32* %38
%179 = load i32, i32* %29
%180 = add nsw i32 %178, %179
%181 = mul nsw i32 %177, %180
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds double, double* %175, i64 %182
%184 = call i32 (i32, i32, double*, ...) bitcast (i32 (...)* @Scale to i32 (i32, i32, double*, ...)*)(i32 %173, i32 %174, double* %183)
br label %185
185: ; preds = %172, %155
br label %186
186: ; preds = %185
%187 = load i32, i32* %36
%188 = add nsw i32 %187, 1
store i32 %188, i32* %36
br label %151
189: ; preds = %151
%190 = load i32, i32* %25
%191 = icmp eq i32 %190, 0
br i1 %191, label %195, label %192
192: ; preds = %189
%193 = load i32, i32* %33
%194 = icmp ne i32 %193, 0
br i1 %194, label %195, label %198
195: ; preds = %192, %189
%196 = call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%197 = trunc i64 %196 to i32
store i32 %197, i32* %40
br label %198
198: ; preds = %195, %192
%199 = load i32, i32* %38
%200 = load double*, double** %21
%201 = load double*, double** %22
%202 = load i32, i32* %25
%203 = load i32, i32* %27
%204 = load i32, i32* %28
%205 = load i32, i32* %29
%206 = call i32 (i32, double*, double*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @Transpose to i32 (i32, double*, double*, i32, i32, i32, i32, ...)*)(i32 %199, double* %200, double* %201, i32 %202, i32 %203, i32 %204, i32 %205)
%207 = load i32, i32* %25
%208 = icmp eq i32 %207, 0
br i1 %208, label %212, label %209
209: ; preds = %198
%210 = load i32, i32* %33
%211 = icmp ne i32 %210, 0
br i1 %211, label %212, label %221
212: ; preds = %209, %198
%213 = call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%214 = trunc i64 %213 to i32
store i32 %214, i32* %41
%215 = load i32, i32* %41
%216 = load i32, i32* %40
%217 = sub i32 %215, %216
%218 = load i32*, i32** %26
%219 = load i32, i32* %218
%220 = add i32 %219, %217
store i32 %220, i32* %218
br label %221
221: ; preds = %212, %209
%222 = load i32, i32* %31
%223 = icmp ne i32 %222, 0
br i1 %223, label %227, label %224
224: ; preds = %221
%225 = load i32, i32* %32
%226 = icmp ne i32 %225, 0
br i1 %226, label %227, label %258
227: ; preds = %224, %221
%228 = load i32, i32* %27
store i32 %228, i32* %36
br label %229
229: ; preds = %254, %227
%230 = load i32, i32* %36
%231 = load i32, i32* %28
%232 = icmp slt i32 %230, %231
br i1 %232, label %233, label %257
233: ; preds = %229
%234 = load i32, i32* %38
%235 = load double*, double** %22
%236 = load i32, i32* %36
%237 = mul nsw i32 2, %236
%238 = load i32, i32* %38
%239 = load i32, i32* %29
%240 = add nsw i32 %238, %239
%241 = mul nsw i32 %237, %240
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds double, double* %235, i64 %242
%244 = load double*, double** %21
%245 = load i32, i32* %36
%246 = mul nsw i32 2, %245
%247 = load i32, i32* %38
%248 = load i32, i32* %29
%249 = add nsw i32 %247, %248
%250 = mul nsw i32 %246, %249
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds double, double* %244, i64 %251
%253 = call i32 (i32, double*, double*, ...) bitcast (i32 (...)* @CopyColumn to i32 (i32, double*, double*, ...)*)(i32 %234, double* %243, double* %252)
br label %254
254: ; preds = %233
%255 = load i32, i32* %36
%256 = add nsw i32 %255, 1
store i32 %256, i32* %36
br label %229
257: ; preds = %229
br label %258
258: ; preds = %257, %224
ret void
}

LLVM IR (-O2):
%struct.GlobalMemory = type opaque
define void @FFT1D(i32 %0, i32 %1, i32 %2, double* %3, double* %4, double* %5, double* %6, i32 %7, i32* nocapture %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15, %struct.GlobalMemory* nocapture readnone %16) {
%18 = sdiv i32 %1, 2
%19 = shl nuw i32 1, %18
%20 = icmp eq i32 %7, 0
%21 = icmp ne i32 %15, 0
%22 = or i1 %20, %21
br i1 %22, label %25, label %23
23: ; preds = %17
%24 = tail call i32 (i32, double*, double*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @Transpose to i32 (i32, double*, double*, i32, i32, i32, i32, ...)*)(i32 %19, double* %3, double* %4, i32 %7, i32 %9, i32 %10, i32 %11)
br label %34
25: ; preds = %17
%26 = tail call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%27 = trunc i64 %26 to i32
%28 = tail call i32 (i32, double*, double*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @Transpose to i32 (i32, double*, double*, i32, i32, i32, i32, ...)*)(i32 %19, double* %3, double* %4, i32 %7, i32 %9, i32 %10, i32 %11)
%29 = tail call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%30 = trunc i64 %29 to i32
%31 = sub i32 %30, %27
%32 = load i32, i32* %8
%33 = add i32 %31, %32
store i32 %33, i32* %8
br label %34
34: ; preds = %23, %25
%35 = icmp slt i32 %9, %10
br i1 %35, label %36, label %51
36: ; preds = %34
%37 = add nsw i32 %19, %11
%38 = shl i32 %37, 1
%39 = zext i32 %9 to i64
br label %40
40: ; preds = %36, %40
%41 = phi i64 [ %39, %36 ], [ %48, %40 ]
%42 = trunc i64 %41 to i32
%43 = mul i32 %38, %42
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %4, i64 %44
%46 = tail call i32 (i32, i32, i32, double*, double*, ...) bitcast (i32 (...)* @FFT1DOnce to i32 (i32, i32, i32, double*, double*, ...)*)(i32 %0, i32 %18, i32 %19, double* %5, double* %45)
%47 = tail call i32 (i32, i32, i32, i32, double*, double*, i32, ...) bitcast (i32 (...)* @TwiddleOneCol to i32 (i32, i32, i32, i32, double*, double*, i32, ...)*)(i32 %0, i32 %19, i32 %2, i32 %42, double* %6, double* %45, i32 %11)
%48 = add i64 %41, 1
%49 = trunc i64 %48 to i32
%50 = icmp eq i32 %49, %10
br i1 %50, label %51, label %40
51: ; preds = %40, %34
br i1 %22, label %54, label %52
52: ; preds = %51
%53 = tail call i32 (i32, double*, double*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @Transpose to i32 (i32, double*, double*, i32, i32, i32, i32, ...)*)(i32 %19, double* %4, double* %3, i32 %7, i32 %9, i32 %10, i32 %11)
br label %63
54: ; preds = %51
%55 = tail call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%56 = trunc i64 %55 to i32
%57 = tail call i32 (i32, double*, double*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @Transpose to i32 (i32, double*, double*, i32, i32, i32, i32, ...)*)(i32 %19, double* %4, double* %3, i32 %7, i32 %9, i32 %10, i32 %11)
%58 = tail call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%59 = trunc i64 %58 to i32
%60 = sub i32 %59, %56
%61 = load i32, i32* %8
%62 = add i32 %60, %61
store i32 %62, i32* %8
br label %63
63: ; preds = %52, %54
br i1 %35, label %64, label %82
64: ; preds = %63
%65 = add nsw i32 %19, %11
%66 = shl i32 %65, 1
%67 = icmp eq i32 %0, -1
%68 = zext i32 %9 to i64
br label %69
69: ; preds = %64, %78
%70 = phi i64 [ %68, %64 ], [ %79, %78 ]
%71 = trunc i64 %70 to i32
%72 = mul i32 %66, %71
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double, double* %3, i64 %73
%75 = tail call i32 (i32, i32, i32, double*, double*, ...) bitcast (i32 (...)* @FFT1DOnce to i32 (i32, i32, i32, double*, double*, ...)*)(i32 %0, i32 %18, i32 %19, double* %5, double* %74)
br i1 %67, label %76, label %78
76: ; preds = %69
%77 = tail call i32 (i32, i32, double*, ...) bitcast (i32 (...)* @Scale to i32 (i32, i32, double*, ...)*)(i32 %19, i32 %2, double* %74)
br label %78
78: ; preds = %69, %76
%79 = add i64 %70, 1
%80 = trunc i64 %79 to i32
%81 = icmp eq i32 %80, %10
br i1 %81, label %82, label %69
82: ; preds = %78, %63
br i1 %22, label %85, label %83
83: ; preds = %82
%84 = tail call i32 (i32, double*, double*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @Transpose to i32 (i32, double*, double*, i32, i32, i32, i32, ...)*)(i32 %19, double* %3, double* %4, i32 %7, i32 %9, i32 %10, i32 %11)
br label %94
85: ; preds = %82
%86 = tail call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%87 = trunc i64 %86 to i32
%88 = tail call i32 (i32, double*, double*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @Transpose to i32 (i32, double*, double*, i32, i32, i32, i32, ...)*)(i32 %19, double* %3, double* %4, i32 %7, i32 %9, i32 %10, i32 %11)
%89 = tail call i64 (i32, ...) bitcast (i64 (...)* @time to i64 (i32, ...)*)(i32 0)
%90 = trunc i64 %89 to i32
%91 = sub i32 %90, %87
%92 = load i32, i32* %8
%93 = add i32 %91, %92
store i32 %93, i32* %8
br label %94
94: ; preds = %83, %85
%95 = or i32 %14, %13
%96 = icmp ne i32 %95, 0
%97 = and i1 %96, %35
br i1 %97, label %98, label %113
98: ; preds = %94
%99 = add nsw i32 %19, %11
%100 = shl i32 %99, 1
%101 = zext i32 %9 to i64
br label %102
102: ; preds = %98, %102
%103 = phi i64 [ %101, %98 ], [ %110, %102 ]
%104 = trunc i64 %103 to i32
%105 = mul i32 %100, %104
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds double, double* %4, i64 %106
%108 = getelementptr inbounds double, double* %3, i64 %106
%109 = tail call i32 (i32, double*, double*, ...) bitcast (i32 (...)* @CopyColumn to i32 (i32, double*, double*, ...)*)(i32 %19, double* %107, double* %108)
%110 = add i64 %103, 1
%111 = trunc i64 %110 to i32
%112 = icmp eq i32 %111, %10
br i1 %112, label %113, label %102
113: ; preds = %102, %94
ret void
}