void FFT_1D(long N, long N_SQRT, long FFT_BS, long TR_BS,
            double _Complex A[N_SQRT][N_SQRT]) {
  long I, J;
  for (I = 0; I < N_SQRT; I += TR_BS) {
    trsp_blk(N, N_SQRT, TR_BS, (double _Complex(*)[N_SQRT]) & A[I][I]);
    for (J = I + TR_BS; J < N_SQRT; J += TR_BS)
      trsp_swap(N, N_SQRT, TR_BS, (double _Complex(*)[N_SQRT]) & A[I][J],
                (double _Complex(*)[N_SQRT]) & A[J][I]);
  }
  for (J = 0; J < N_SQRT; J += FFT_BS)
    FFT1D(N_SQRT, FFT_BS, (double _Complex(*)[N_SQRT]) & A[J][0]);
  for (I = 0; I < N_SQRT; I += TR_BS) {
    tw_trsp_blk(N, N_SQRT, TR_BS, I, (double _Complex(*)[N_SQRT]) & A[I][I]);
    for (J = I + TR_BS; J < N_SQRT; J += TR_BS)
      tw_trsp_swap(N, N_SQRT, TR_BS, I, J,
                   (double _Complex(*)[N_SQRT]) & A[I][J],
                   (double _Complex(*)[N_SQRT]) & A[J][I]);
  }
  for (J = 0; J < N_SQRT; J += FFT_BS)
    FFT1D_2(N_SQRT, FFT_BS, (double _Complex(*)[N_SQRT]) & A[J][0]);
  for (I = 0; I < N_SQRT; I += TR_BS) {
    trsp_blk(N, N_SQRT, TR_BS, (double _Complex(*)[N_SQRT]) & A[I][I]);
    for (J = I + TR_BS; J < N_SQRT; J += TR_BS)
      trsp_swap(N, N_SQRT, TR_BS, (double _Complex(*)[N_SQRT]) & A[I][J],
                (double _Complex(*)[N_SQRT]) & A[J][I]);
  }
}


x86 assembly (clang, -O0):
<FFT_1D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    125d <FFT_1D+0xfd>
mov    -0x40(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
imul   -0x30(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rcx
mov    -0x30(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rcx
mov    $0x0,%al
call   1060 <trsp_blk@plt>
mov    -0x30(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1247 <FFT_1D+0xe7>
mov    -0x40(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    %rax,%r8
imul   -0x30(%rbp),%r8
shl    $0x4,%r8
add    %r8,%rcx
mov    -0x38(%rbp),%r8
shl    $0x4,%r8
add    %r8,%rcx
mov    -0x28(%rbp),%r8
imul   -0x38(%rbp),%rax
shl    $0x4,%rax
add    %rax,%r8
mov    -0x30(%rbp),%rax
shl    $0x4,%rax
add    %rax,%r8
mov    $0x0,%al
call   1050 <trsp_swap@plt>
mov    -0x20(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    11d8 <FFT_1D+0x78>
jmp    124c <FFT_1D+0xec>
mov    -0x20(%rbp),%rax
add    -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    118c <FFT_1D+0x2c>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    12a7 <FFT_1D+0x147>
mov    -0x40(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
imul   -0x38(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdx
mov    $0x0,%al
call   1080 <FFT1D@plt>
mov    -0x18(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    1265 <FFT_1D+0x105>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1390 <FFT_1D+0x230>
mov    -0x40(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%r8
imul   -0x30(%rbp),%rax
shl    $0x4,%rax
add    %rax,%r8
mov    -0x30(%rbp),%rax
shl    $0x4,%rax
add    %rax,%r8
mov    $0x0,%al
call   1040 <tw_trsp_blk@plt>
mov    -0x30(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    137a <FFT_1D+0x21a>
mov    -0x40(%rbp),%r10
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    %r10,%rax
imul   -0x30(%rbp),%rax
shl    $0x4,%rax
add    %rax,%r9
mov    -0x38(%rbp),%rax
shl    $0x4,%rax
add    %rax,%r9
mov    -0x28(%rbp),%rax
imul   -0x38(%rbp),%r10
shl    $0x4,%r10
add    %r10,%rax
mov    -0x30(%rbp),%r10
shl    $0x4,%r10
add    %r10,%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   1030 <tw_trsp_swap@plt>
mov    -0x20(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    12ff <FFT_1D+0x19f>
jmp    137f <FFT_1D+0x21f>
mov    -0x20(%rbp),%rax
add    -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    12af <FFT_1D+0x14f>
movq   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    13da <FFT_1D+0x27a>
mov    -0x40(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
imul   -0x38(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rdx
mov    $0x0,%al
call   1070 <FFT1D_2@plt>
mov    -0x18(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    1398 <FFT_1D+0x238>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    14b3 <FFT_1D+0x353>
mov    -0x40(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
imul   -0x30(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rcx
mov    -0x30(%rbp),%rax
shl    $0x4,%rax
add    %rax,%rcx
mov    $0x0,%al
call   1060 <trsp_blk@plt>
mov    -0x30(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    149d <FFT_1D+0x33d>
mov    -0x40(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    %rax,%r8
imul   -0x30(%rbp),%r8
shl    $0x4,%r8
add    %r8,%rcx
mov    -0x38(%rbp),%r8
shl    $0x4,%r8
add    %r8,%rcx
mov    -0x28(%rbp),%r8
imul   -0x38(%rbp),%rax
shl    $0x4,%rax
add    %rax,%r8
mov    -0x30(%rbp),%rax
shl    $0x4,%rax
add    %rax,%r8
mov    $0x0,%al
call   1050 <trsp_swap@plt>
mov    -0x20(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    142e <FFT_1D+0x2ce>
jmp    14a2 <FFT_1D+0x342>
mov    -0x20(%rbp),%rax
add    -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    13e2 <FFT_1D+0x282>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FFT_1D>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r8,0x8(%rsp)
test   %rsi,%rsi
jle    14ae <FFT_1D+0x34e>
mov    %rcx,%r15
mov    %rsi,%r12
mov    %rdi,%r14
mov    %rdx,0x40(%rsp)
imul   %rsi,%rcx
shl    $0x4,%rcx
mov    0x8(%rsp),%rax
lea    (%rax,%rcx,1),%rbx
mov    %rsi,%rdx
shl    $0x4,%rdx
add    $0x10,%rdx
imul   %r15,%rdx
mov    %rdx,0x38(%rsp)
mov    %r15,%rdx
shl    $0x4,%rdx
lea    (%rax,%rdx,1),%rbp
xor    %eax,%eax
mov    %rcx,0x30(%rsp)
mov    %rdx,0x28(%rsp)
cs nopw 0x0(%rax,%rax,1)
mov    %rax,%r13
imul   %r12,%rax
shl    $0x4,%rax
add    0x8(%rsp),%rax
mov    %r13,%rcx
shl    $0x4,%rcx
add    %rax,%rcx
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <trsp_blk@plt>
mov    %r13,%rax
add    %r15,%rax
cmp    %r12,%rax
jge    1274 <FFT_1D+0x114>
mov    %rbp,0x20(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r14,%r13
mov    %rax,0x18(%rsp)
mov    %rax,%r14
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %rbp,%rcx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <trsp_swap@plt>
mov    0x28(%rsp),%rdx
mov    0x30(%rsp),%rcx
add    %r15,%r14
add    %rcx,%rbx
add    %rdx,%rbp
cmp    %r12,%r14
jl     1220 <FFT_1D+0xc0>
mov    0x38(%rsp),%rax
mov    0x10(%rsp),%rbx
add    %rax,%rbx
mov    0x20(%rsp),%rbp
add    %rax,%rbp
mov    0x18(%rsp),%rax
cmp    %r12,%rax
mov    %r13,%r14
jl     11d0 <FFT_1D+0x70>
test   %r12,%r12
mov    0x40(%rsp),%r13
jle    14ae <FFT_1D+0x34e>
mov    %r13,%rax
imul   %r12,%rax
shl    $0x4,%rax
mov    0x8(%rsp),%rbx
xor    %ebp,%ebp
mov    %rax,0x10(%rsp)
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <FFT1D@plt>
mov    0x10(%rsp),%rax
add    %r13,%rbp
add    %rax,%rbx
cmp    %r12,%rbp
jl     12a0 <FFT_1D+0x140>
test   %r12,%r12
mov    0x30(%rsp),%rcx
mov    0x28(%rsp),%rdx
jle    14ae <FFT_1D+0x34e>
mov    0x8(%rsp),%rax
lea    (%rax,%rcx,1),%r13
lea    (%rax,%rdx,1),%rbx
xor    %ebp,%ebp
mov    %r14,0x48(%rsp)
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rax
imul   %r12,%rax
shl    $0x4,%rax
add    0x8(%rsp),%rax
mov    %rbp,%r8
shl    $0x4,%r8
add    %rax,%r8
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %rbp,%rcx
xor    %eax,%eax
call   1040 <tw_trsp_blk@plt>
mov    %rbp,%rax
lea    (%r15,%rbp,1),%rax
cmp    %r12,%rax
jge    13ac <FFT_1D+0x24c>
mov    %rbx,0x18(%rsp)
mov    %rbx,%r14
mov    %r13,0x20(%rsp)
mov    %r13,%rbx
mov    %rax,0x50(%rsp)
mov    %rax,%r13
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,(%rsp)
mov    0x48(%rsp),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %rbp,%rcx
mov    %r13,%r8
mov    %r14,%r9
xor    %eax,%eax
call   1030 <tw_trsp_swap@plt>
add    %r15,%r13
add    0x30(%rsp),%rbx
add    0x28(%rsp),%r14
cmp    %r12,%r13
jl     1350 <FFT_1D+0x1f0>
mov    0x38(%rsp),%rax
mov    0x20(%rsp),%r13
add    %rax,%r13
mov    0x18(%rsp),%rbx
add    %rax,%rbx
mov    0x50(%rsp),%rax
mov    %rax,%rbp
cmp    %r12,%rax
mov    0x48(%rsp),%r14
jl     12f0 <FFT_1D+0x190>
test   %r12,%r12
mov    0x40(%rsp),%r13
jle    14ae <FFT_1D+0x34e>
mov    0x8(%rsp),%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <FFT1D_2@plt>
add    %r13,%rbp
add    0x10(%rsp),%rbx
cmp    %r12,%rbp
jl     13d0 <FFT_1D+0x270>
test   %r12,%r12
mov    0x30(%rsp),%rcx
mov    0x28(%rsp),%rdx
jle    14ae <FFT_1D+0x34e>
mov    0x8(%rsp),%rax
lea    (%rax,%rcx,1),%rbx
lea    (%rax,%rdx,1),%rbp
xor    %eax,%eax
nop
mov    %rax,%r13
imul   %r12,%rax
shl    $0x4,%rax
add    0x8(%rsp),%rax
mov    %r13,%rcx
shl    $0x4,%rcx
add    %rax,%rcx
mov    %r14,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <trsp_blk@plt>
mov    %r13,%rax
add    %r15,%rax
cmp    %r12,%rax
jge    14ae <FFT_1D+0x34e>
mov    %rbp,0x20(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r14,%r13
mov    %rax,0x18(%rsp)
mov    %rax,%r14
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %rbp,%rcx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <trsp_swap@plt>
add    %r15,%r14
add    0x30(%rsp),%rbx
add    0x28(%rsp),%rbp
cmp    %r12,%r14
jl     1460 <FFT_1D+0x300>
mov    0x38(%rsp),%rax
mov    0x10(%rsp),%rbx
add    %rax,%rbx
mov    0x20(%rsp),%rbp
add    %rax,%rbp
mov    0x18(%rsp),%rax
cmp    %r12,%rax
mov    %r13,%r14
jl     1410 <FFT_1D+0x2b0>
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @FFT_1D(i64 %0, i64 %1, i64 %2, i64 %3, { double, double }* %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca { double, double }*
%11 = alloca i64
%12 = alloca i64
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store { double, double }* %4, { double, double }** %10
%13 = load i64, i64* %7
%14 = load i64, i64* %7
store i64 0, i64* %11
br label %15
15: ; preds = %62, %5
%16 = load i64, i64* %11
%17 = load i64, i64* %7
%18 = icmp slt i64 %16, %17
br i1 %18, label %19, label %66
19: ; preds = %15
%20 = load i64, i64* %6
%21 = load i64, i64* %7
%22 = load i64, i64* %9
%23 = load i64, i64* %7
%24 = load { double, double }*, { double, double }** %10
%25 = load i64, i64* %11
%26 = mul nsw i64 %25, %14
%27 = getelementptr inbounds { double, double }, { double, double }* %24, i64 %26
%28 = load i64, i64* %11
%29 = getelementptr inbounds { double, double }, { double, double }* %27, i64 %28
%30 = call i32 (i64, i64, i64, { double, double }*, ...) bitcast (i32 (...)* @trsp_blk to i32 (i64, i64, i64, { double, double }*, ...)*)(i64 %20, i64 %21, i64 %22, { double, double }* %29)
%31 = load i64, i64* %11
%32 = load i64, i64* %9
%33 = add nsw i64 %31, %32
store i64 %33, i64* %12
br label %34
34: ; preds = %57, %19
%35 = load i64, i64* %12
%36 = load i64, i64* %7
%37 = icmp slt i64 %35, %36
br i1 %37, label %38, label %61
38: ; preds = %34
%39 = load i64, i64* %6
%40 = load i64, i64* %7
%41 = load i64, i64* %9
%42 = load i64, i64* %7
%43 = load { double, double }*, { double, double }** %10
%44 = load i64, i64* %11
%45 = mul nsw i64 %44, %14
%46 = getelementptr inbounds { double, double }, { double, double }* %43, i64 %45
%47 = load i64, i64* %12
%48 = getelementptr inbounds { double, double }, { double, double }* %46, i64 %47
%49 = load i64, i64* %7
%50 = load { double, double }*, { double, double }** %10
%51 = load i64, i64* %12
%52 = mul nsw i64 %51, %14
%53 = getelementptr inbounds { double, double }, { double, double }* %50, i64 %52
%54 = load i64, i64* %11
%55 = getelementptr inbounds { double, double }, { double, double }* %53, i64 %54
%56 = call i32 (i64, i64, i64, { double, double }*, { double, double }*, ...) bitcast (i32 (...)* @trsp_swap to i32 (i64, i64, i64, { double, double }*, { double, double }*, ...)*)(i64 %39, i64 %40, i64 %41, { double, double }* %48, { double, double }* %55)
br label %57
57: ; preds = %38
%58 = load i64, i64* %9
%59 = load i64, i64* %12
%60 = add nsw i64 %59, %58
store i64 %60, i64* %12
br label %34
61: ; preds = %34
br label %62
62: ; preds = %61
%63 = load i64, i64* %9
%64 = load i64, i64* %11
%65 = add nsw i64 %64, %63
store i64 %65, i64* %11
br label %15
66: ; preds = %15
store i64 0, i64* %12
br label %67
67: ; preds = %81, %66
%68 = load i64, i64* %12
%69 = load i64, i64* %7
%70 = icmp slt i64 %68, %69
br i1 %70, label %71, label %85
71: ; preds = %67
%72 = load i64, i64* %7
%73 = load i64, i64* %8
%74 = load i64, i64* %7
%75 = load { double, double }*, { double, double }** %10
%76 = load i64, i64* %12
%77 = mul nsw i64 %76, %14
%78 = getelementptr inbounds { double, double }, { double, double }* %75, i64 %77
%79 = getelementptr inbounds { double, double }, { double, double }* %78, i64 0
%80 = call i32 (i64, i64, { double, double }*, ...) bitcast (i32 (...)* @FFT1D to i32 (i64, i64, { double, double }*, ...)*)(i64 %72, i64 %73, { double, double }* %79)
br label %81
81: ; preds = %71
%82 = load i64, i64* %8
%83 = load i64, i64* %12
%84 = add nsw i64 %83, %82
store i64 %84, i64* %12
br label %67
85: ; preds = %67
store i64 0, i64* %11
br label %86
86: ; preds = %136, %85
%87 = load i64, i64* %11
%88 = load i64, i64* %7
%89 = icmp slt i64 %87, %88
br i1 %89, label %90, label %140
90: ; preds = %86
%91 = load i64, i64* %6
%92 = load i64, i64* %7
%93 = load i64, i64* %9
%94 = load i64, i64* %11
%95 = load i64, i64* %7
%96 = load { double, double }*, { double, double }** %10
%97 = load i64, i64* %11
%98 = mul nsw i64 %97, %14
%99 = getelementptr inbounds { double, double }, { double, double }* %96, i64 %98
%100 = load i64, i64* %11
%101 = getelementptr inbounds { double, double }, { double, double }* %99, i64 %100
%102 = call i32 (i64, i64, i64, i64, { double, double }*, ...) bitcast (i32 (...)* @tw_trsp_blk to i32 (i64, i64, i64, i64, { double, double }*, ...)*)(i64 %91, i64 %92, i64 %93, i64 %94, { double, double }* %101)
%103 = load i64, i64* %11
%104 = load i64, i64* %9
%105 = add nsw i64 %103, %104
store i64 %105, i64* %12
br label %106
106: ; preds = %131, %90
%107 = load i64, i64* %12
%108 = load i64, i64* %7
%109 = icmp slt i64 %107, %108
br i1 %109, label %110, label %135
110: ; preds = %106
%111 = load i64, i64* %6
%112 = load i64, i64* %7
%113 = load i64, i64* %9
%114 = load i64, i64* %11
%115 = load i64, i64* %12
%116 = load i64, i64* %7
%117 = load { double, double }*, { double, double }** %10
%118 = load i64, i64* %11
%119 = mul nsw i64 %118, %14
%120 = getelementptr inbounds { double, double }, { double, double }* %117, i64 %119
%121 = load i64, i64* %12
%122 = getelementptr inbounds { double, double }, { double, double }* %120, i64 %121
%123 = load i64, i64* %7
%124 = load { double, double }*, { double, double }** %10
%125 = load i64, i64* %12
%126 = mul nsw i64 %125, %14
%127 = getelementptr inbounds { double, double }, { double, double }* %124, i64 %126
%128 = load i64, i64* %11
%129 = getelementptr inbounds { double, double }, { double, double }* %127, i64 %128
%130 = call i32 (i64, i64, i64, i64, i64, { double, double }*, { double, double }*, ...) bitcast (i32 (...)* @tw_trsp_swap to i32 (i64, i64, i64, i64, i64, { double, double }*, { double, double }*, ...)*)(i64 %111, i64 %112, i64 %113, i64 %114, i64 %115, { double, double }* %122, { double, double }* %129)
br label %131
131: ; preds = %110
%132 = load i64, i64* %9
%133 = load i64, i64* %12
%134 = add nsw i64 %133, %132
store i64 %134, i64* %12
br label %106
135: ; preds = %106
br label %136
136: ; preds = %135
%137 = load i64, i64* %9
%138 = load i64, i64* %11
%139 = add nsw i64 %138, %137
store i64 %139, i64* %11
br label %86
140: ; preds = %86
store i64 0, i64* %12
br label %141
141: ; preds = %155, %140
%142 = load i64, i64* %12
%143 = load i64, i64* %7
%144 = icmp slt i64 %142, %143
br i1 %144, label %145, label %159
145: ; preds = %141
%146 = load i64, i64* %7
%147 = load i64, i64* %8
%148 = load i64, i64* %7
%149 = load { double, double }*, { double, double }** %10
%150 = load i64, i64* %12
%151 = mul nsw i64 %150, %14
%152 = getelementptr inbounds { double, double }, { double, double }* %149, i64 %151
%153 = getelementptr inbounds { double, double }, { double, double }* %152, i64 0
%154 = call i32 (i64, i64, { double, double }*, ...) bitcast (i32 (...)* @FFT1D_2 to i32 (i64, i64, { double, double }*, ...)*)(i64 %146, i64 %147, { double, double }* %153)
br label %155
155: ; preds = %145
%156 = load i64, i64* %8
%157 = load i64, i64* %12
%158 = add nsw i64 %157, %156
store i64 %158, i64* %12
br label %141
159: ; preds = %141
store i64 0, i64* %11
br label %160
160: ; preds = %207, %159
%161 = load i64, i64* %11
%162 = load i64, i64* %7
%163 = icmp slt i64 %161, %162
br i1 %163, label %164, label %211
164: ; preds = %160
%165 = load i64, i64* %6
%166 = load i64, i64* %7
%167 = load i64, i64* %9
%168 = load i64, i64* %7
%169 = load { double, double }*, { double, double }** %10
%170 = load i64, i64* %11
%171 = mul nsw i64 %170, %14
%172 = getelementptr inbounds { double, double }, { double, double }* %169, i64 %171
%173 = load i64, i64* %11
%174 = getelementptr inbounds { double, double }, { double, double }* %172, i64 %173
%175 = call i32 (i64, i64, i64, { double, double }*, ...) bitcast (i32 (...)* @trsp_blk to i32 (i64, i64, i64, { double, double }*, ...)*)(i64 %165, i64 %166, i64 %167, { double, double }* %174)
%176 = load i64, i64* %11
%177 = load i64, i64* %9
%178 = add nsw i64 %176, %177
store i64 %178, i64* %12
br label %179
179: ; preds = %202, %164
%180 = load i64, i64* %12
%181 = load i64, i64* %7
%182 = icmp slt i64 %180, %181
br i1 %182, label %183, label %206
183: ; preds = %179
%184 = load i64, i64* %6
%185 = load i64, i64* %7
%186 = load i64, i64* %9
%187 = load i64, i64* %7
%188 = load { double, double }*, { double, double }** %10
%189 = load i64, i64* %11
%190 = mul nsw i64 %189, %14
%191 = getelementptr inbounds { double, double }, { double, double }* %188, i64 %190
%192 = load i64, i64* %12
%193 = getelementptr inbounds { double, double }, { double, double }* %191, i64 %192
%194 = load i64, i64* %7
%195 = load { double, double }*, { double, double }** %10
%196 = load i64, i64* %12
%197 = mul nsw i64 %196, %14
%198 = getelementptr inbounds { double, double }, { double, double }* %195, i64 %197
%199 = load i64, i64* %11
%200 = getelementptr inbounds { double, double }, { double, double }* %198, i64 %199
%201 = call i32 (i64, i64, i64, { double, double }*, { double, double }*, ...) bitcast (i32 (...)* @trsp_swap to i32 (i64, i64, i64, { double, double }*, { double, double }*, ...)*)(i64 %184, i64 %185, i64 %186, { double, double }* %193, { double, double }* %200)
br label %202
202: ; preds = %183
%203 = load i64, i64* %9
%204 = load i64, i64* %12
%205 = add nsw i64 %204, %203
store i64 %205, i64* %12
br label %179
206: ; preds = %179
br label %207
207: ; preds = %206
%208 = load i64, i64* %9
%209 = load i64, i64* %11
%210 = add nsw i64 %209, %208
store i64 %210, i64* %11
br label %160
211: ; preds = %160
ret void
}

LLVM IR (-O2):
define void @FFT_1D(i64 %0, i64 %1, i64 %2, i64 %3, { double, double }* %4) {
%6 = icmp sgt i64 %1, 0
br i1 %6, label %9, label %82
7: ; preds = %19
br i1 %16, label %9, label %8
8: ; preds = %9, %7
br i1 %6, label %28, label %82
9: ; preds = %5, %7
%10 = phi i64 [ %15, %7 ], [ 0, %5 ]
%11 = mul nsw i64 %10, %1
%12 = getelementptr inbounds { double, double }, { double, double }* %4, i64 %11
%13 = getelementptr inbounds { double, double }, { double, double }* %12, i64 %10
%14 = tail call i32 (i64, i64, i64, { double, double }*, ...) bitcast (i32 (...)* @trsp_blk to i32 (i64, i64, i64, { double, double }*, ...)*)(i64 %0, i64 %1, i64 %3, { double, double }* %13)
%15 = add nsw i64 %10, %3
%16 = icmp slt i64 %15, %1
br i1 %16, label %17, label %8
17: ; preds = %9
%18 = getelementptr inbounds { double, double }, { double, double }* %4, i64 %10
br label %19
19: ; preds = %17, %19
%20 = phi i64 [ %25, %19 ], [ %15, %17 ]
%21 = getelementptr inbounds { double, double }, { double, double }* %12, i64 %20
%22 = mul nsw i64 %20, %1
%23 = getelementptr inbounds { double, double }, { double, double }* %18, i64 %22
%24 = tail call i32 (i64, i64, i64, { double, double }*, { double, double }*, ...) bitcast (i32 (...)* @trsp_swap to i32 (i64, i64, i64, { double, double }*, { double, double }*, ...)*)(i64 %0, i64 %1, i64 %3, { double, double }* %21, { double, double }* %23)
%25 = add nsw i64 %20, %3
%26 = icmp slt i64 %25, %1
br i1 %26, label %19, label %7
27: ; preds = %28
br i1 %6, label %37, label %82
28: ; preds = %8, %28
%29 = phi i64 [ %33, %28 ], [ 0, %8 ]
%30 = mul nsw i64 %29, %1
%31 = getelementptr inbounds { double, double }, { double, double }* %4, i64 %30
%32 = tail call i32 (i64, i64, { double, double }*, ...) bitcast (i32 (...)* @FFT1D to i32 (i64, i64, { double, double }*, ...)*)(i64 %1, i64 %2, { double, double }* %31)
%33 = add nsw i64 %29, %2
%34 = icmp slt i64 %33, %1
br i1 %34, label %28, label %27
35: ; preds = %47
br i1 %44, label %37, label %36
36: ; preds = %37, %35
br i1 %6, label %56, label %82
37: ; preds = %27, %35
%38 = phi i64 [ %43, %35 ], [ 0, %27 ]
%39 = mul nsw i64 %38, %1
%40 = getelementptr inbounds { double, double }, { double, double }* %4, i64 %39
%41 = getelementptr inbounds { double, double }, { double, double }* %40, i64 %38
%42 = tail call i32 (i64, i64, i64, i64, { double, double }*, ...) bitcast (i32 (...)* @tw_trsp_blk to i32 (i64, i64, i64, i64, { double, double }*, ...)*)(i64 %0, i64 %1, i64 %3, i64 %38, { double, double }* %41)
%43 = add nsw i64 %38, %3
%44 = icmp slt i64 %43, %1
br i1 %44, label %45, label %36
45: ; preds = %37
%46 = getelementptr inbounds { double, double }, { double, double }* %4, i64 %38
br label %47
47: ; preds = %45, %47
%48 = phi i64 [ %53, %47 ], [ %43, %45 ]
%49 = getelementptr inbounds { double, double }, { double, double }* %40, i64 %48
%50 = mul nsw i64 %48, %1
%51 = getelementptr inbounds { double, double }, { double, double }* %46, i64 %50
%52 = tail call i32 (i64, i64, i64, i64, i64, { double, double }*, { double, double }*, ...) bitcast (i32 (...)* @tw_trsp_swap to i32 (i64, i64, i64, i64, i64, { double, double }*, { double, double }*, ...)*)(i64 %0, i64 %1, i64 %3, i64 %38, i64 %48, { double, double }* %49, { double, double }* %51)
%53 = add nsw i64 %48, %3
%54 = icmp slt i64 %53, %1
br i1 %54, label %47, label %35
55: ; preds = %56
br i1 %6, label %64, label %82
56: ; preds = %36, %56
%57 = phi i64 [ %61, %56 ], [ 0, %36 ]
%58 = mul nsw i64 %57, %1
%59 = getelementptr inbounds { double, double }, { double, double }* %4, i64 %58
%60 = tail call i32 (i64, i64, { double, double }*, ...) bitcast (i32 (...)* @FFT1D_2 to i32 (i64, i64, { double, double }*, ...)*)(i64 %1, i64 %2, { double, double }* %59)
%61 = add nsw i64 %57, %2
%62 = icmp slt i64 %61, %1
br i1 %62, label %56, label %55
63: ; preds = %74
br i1 %71, label %64, label %82
64: ; preds = %55, %63
%65 = phi i64 [ %70, %63 ], [ 0, %55 ]
%66 = mul nsw i64 %65, %1
%67 = getelementptr inbounds { double, double }, { double, double }* %4, i64 %66
%68 = getelementptr inbounds { double, double }, { double, double }* %67, i64 %65
%69 = tail call i32 (i64, i64, i64, { double, double }*, ...) bitcast (i32 (...)* @trsp_blk to i32 (i64, i64, i64, { double, double }*, ...)*)(i64 %0, i64 %1, i64 %3, { double, double }* %68)
%70 = add nsw i64 %65, %3
%71 = icmp slt i64 %70, %1
br i1 %71, label %72, label %82
72: ; preds = %64
%73 = getelementptr inbounds { double, double }, { double, double }* %4, i64 %65
br label %74
74: ; preds = %72, %74
%75 = phi i64 [ %80, %74 ], [ %70, %72 ]
%76 = getelementptr inbounds { double, double }, { double, double }* %67, i64 %75
%77 = mul nsw i64 %75, %1
%78 = getelementptr inbounds { double, double }, { double, double }* %73, i64 %77
%79 = tail call i32 (i64, i64, i64, { double, double }*, { double, double }*, ...) bitcast (i32 (...)* @trsp_swap to i32 (i64, i64, i64, { double, double }*, { double, double }*, ...)*)(i64 %0, i64 %1, i64 %3, { double, double }* %76, { double, double }* %78)
%80 = add nsw i64 %75, %3
%81 = icmp slt i64 %80, %1
br i1 %81, label %74, label %63
82: ; preds = %63, %64, %5, %8, %27, %36, %55
ret void
}