void swt_out1(double *sigIn, int sigInLength, double *sigOutMatrix,
              int rowLength, int colLength, double *filterLow, double *filterHi,
              int filterLength, int step) {
  int row, count, *filterLen;
  double *approxTemp, *approxOut, *sigOutTemp;
  double *filterLowTemp, *filterHiTemp, *filterLowM, *filterHiM;
  filterLen = malloc(step * sizeof(int));
  approxTemp = malloc(colLength * sizeof(double));
  approxOut = malloc(colLength * sizeof(double));
  sigOutTemp = malloc(rowLength * colLength * sizeof(double));
  filterLen[0] = filterLength;
  if (step > 1) {
    for (count = 1; count < step; count++)
      filterLen[count] = filterLen[count - 1] * 2;
  }
  filterLowTemp = malloc((filterLen[step - 1] + 1) * sizeof(double));
  filterHiTemp = malloc((filterLen[step - 1] + 1) * sizeof(double));
  filterLowM = malloc((filterLen[step - 1] + 1) * sizeof(double));
  filterHiM = malloc((filterLen[step - 1] + 1) * sizeof(double));
  for (count = 0; count < (filterLen[step - 1] + 1); count++) {
    filterLowM[count] = 0;
    filterHiM[count] = 0;
  }
  verbatim_copy(filterLow, filterLength, filterLowTemp, filterLen[0]);
  verbatim_copy(filterHi, filterLength, filterHiTemp, filterLen[0]);
  verbatim_copy(sigIn, sigInLength, approxTemp, sigInLength);
  for (row = 0; row < step; row++) {
    swt_conv(approxTemp, sigInLength, approxOut, sigInLength,
             sigOutTemp + row * colLength, sigInLength, filterLowTemp,
             filterHiTemp, filterLen[row]);
    verbatim_copy(approxOut, sigInLength, approxTemp, sigInLength);
    if (row < (step - 1)) {
      dyadup_1D_feed_even(filterLowTemp, filterLen[row], filterLowM,
                          filterLen[row] * 2 + 1);
      dyadup_1D_feed_even(filterHiTemp, filterLen[row], filterHiM,
                          filterLen[row] * 2 + 1);
      verbatim_copy(filterLowM + 1, filterLen[row] * 2, filterLowTemp,
                    filterLen[row] * 2);
      verbatim_copy(filterHiM + 1, filterLen[row] * 2, filterHiTemp,
                    filterLen[row] * 2);
    }
  }
  verbatim_copy(approxTemp, sigInLength, sigOutTemp + step * colLength,
                sigInLength);
  free(approxTemp);
  free(approxOut);
  free(filterLowM);
  free(filterHiM);
  free(filterLowTemp);
  free(filterHiTemp);
  free(filterLen);
  matrix_tran(sigOutTemp, rowLength, colLength, sigOutMatrix, colLength,
              rowLength);
  free(sigOutTemp);
  return;
}


x86 assembly (clang, -O0):
<swt_out1>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x88,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movslq 0x20(%rbp),%rdi
shl    $0x2,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x40(%rbp)
movslq -0x28(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x48(%rbp)
movslq -0x28(%rbp),%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x28(%rbp),%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    0x18(%rbp),%ecx
mov    -0x40(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x1,0x20(%rbp)
jle    122d <swt_out1+0xcd>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    1228 <swt_out1+0xc8>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
shl    $0x1,%edx
mov    -0x40(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11f0 <swt_out1+0x90>
jmp    122d <swt_out1+0xcd>
mov    -0x40(%rbp),%rax
mov    0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    -0x40(%rbp),%rax
mov    0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    -0x40(%rbp),%rax
mov    0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    -0x40(%rbp),%rax
mov    0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
add    $0x1,%eax
movslq %eax,%rdi
shl    $0x3,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x78(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x40(%rbp),%rcx
mov    0x20(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
mov    (%rcx,%rdx,4),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    130c <swt_out1+0x1ac>
mov    -0x70(%rbp),%rax
movslq -0x38(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x78(%rbp),%rax
movslq -0x38(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12c0 <swt_out1+0x160>
mov    -0x30(%rbp),%rdi
mov    0x18(%rbp),%esi
mov    -0x60(%rbp),%rdx
mov    -0x40(%rbp),%rax
mov    (%rax),%ecx
mov    $0x0,%al
call   1070 <verbatim_copy@plt>
mov    0x10(%rbp),%rdi
mov    0x18(%rbp),%esi
mov    -0x68(%rbp),%rdx
mov    -0x40(%rbp),%rax
mov    (%rax),%ecx
mov    $0x0,%al
call   1070 <verbatim_copy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x0,%al
call   1070 <verbatim_copy@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    149e <swt_out1+0x33e>
mov    -0x48(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x50(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x58(%rbp),%r8
mov    -0x34(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r8
mov    -0x14(%rbp),%r9d
mov    -0x60(%rbp),%r11
mov    -0x68(%rbp),%r10
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rbx
mov    (%rax,%rbx,4),%eax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1060 <swt_conv@plt>
mov    -0x50(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x0,%al
call   1070 <verbatim_copy@plt>
mov    -0x34(%rbp),%eax
mov    0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    148b <swt_out1+0x32b>
mov    -0x60(%rbp),%rdi
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x70(%rbp),%rdx
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
mov    $0x0,%al
call   1040 <dyadup_1D_feed_even@plt>
mov    -0x68(%rbp),%rdi
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
mov    -0x78(%rbp),%rdx
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
mov    $0x0,%al
call   1040 <dyadup_1D_feed_even@plt>
mov    -0x70(%rbp),%rdi
add    $0x8,%rdi
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
shl    $0x1,%esi
mov    -0x60(%rbp),%rdx
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
shl    $0x1,%ecx
mov    $0x0,%al
call   1070 <verbatim_copy@plt>
mov    -0x78(%rbp),%rdi
add    $0x8,%rdi
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
shl    $0x1,%esi
mov    -0x68(%rbp),%rdx
mov    -0x40(%rbp),%rax
movslq -0x34(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
shl    $0x1,%ecx
mov    $0x0,%al
call   1070 <verbatim_copy@plt>
jmp    1490 <swt_out1+0x330>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1358 <swt_out1+0x1f8>
mov    -0x48(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x58(%rbp),%rdx
mov    0x20(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0x14(%rbp),%ecx
mov    $0x0,%al
call   1070 <verbatim_copy@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    $0x0,%al
call   1080 <matrix_tran@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<swt_out1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9,0x30(%rsp)
mov    %r8d,%ebx
mov    %ecx,%r14d
mov    %rdx,0x88(%rsp)
mov    %esi,0xc(%rsp)
mov    %rdi,0x60(%rsp)
movslq 0xe0(%rsp),%r13
mov    0xd8(%rsp),%r12d
mov    0xd0(%rsp),%rax
mov    %rax,0x28(%rsp)
lea    0x0(,%r13,4),%rdi
call   1060 <malloc@plt>
mov    %rax,%rbp
movslq %ebx,%r15
shl    $0x3,%r15
mov    %r15,%rdi
call   1060 <malloc@plt>
mov    %rax,0x58(%rsp)
mov    %r15,0x90(%rsp)
mov    %r15,%rdi
call   1060 <malloc@plt>
mov    %rax,0x78(%rsp)
mov    %ebx,0x68(%rsp)
mov    %r14d,0x6c(%rsp)
imul   %r14d,%ebx
movslq %ebx,%rdi
shl    $0x3,%rdi
call   1060 <malloc@plt>
mov    %r12,%rbx
mov    %rax,0x70(%rsp)
mov    %rbp,0x10(%rsp)
mov    %ebx,0x0(%rbp)
mov    %r13d,%eax
mov    %rax,0x50(%rsp)
cmp    $0x2,%r13
jl     12be <swt_out1+0x14e>
mov    0x50(%rsp),%rax
lea    -0x1(%rax),%rsi
lea    -0x2(%rax),%rdi
mov    %esi,%eax
and    $0x3,%eax
mov    $0x1,%edx
mov    %ebx,%ecx
cmp    $0x3,%rdi
jb     1291 <swt_out1+0x121>
and    $0xfffffffffffffffc,%rsi
xor    %edx,%edx
mov    %ebx,%ecx
mov    0x10(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
lea    (%rcx,%rcx,1),%edi
mov    %edi,0x4(%rbp,%rdx,4)
lea    0x0(,%rcx,4),%edi
mov    %edi,0x8(%rbp,%rdx,4)
lea    0x0(,%rcx,8),%edi
mov    %edi,0xc(%rbp,%rdx,4)
shl    $0x4,%ecx
mov    %ecx,0x10(%rbp,%rdx,4)
add    $0x4,%rdx
cmp    %rdx,%rsi
jne    1260 <swt_out1+0xf0>
add    $0x1,%rdx
test   %rax,%rax
je     12be <swt_out1+0x14e>
mov    0x10(%rsp),%rsi
lea    (%rsi,%rdx,4),%rdx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    %ecx,%ecx
mov    %ecx,(%rdx,%rsi,4)
add    $0x1,%rsi
cmp    %rsi,%rax
jne    12b0 <swt_out1+0x140>
mov    %rbx,%r12
movslq %r13d,%rcx
mov    0x10(%rsp),%rax
mov    %rcx,0x38(%rsp)
movslq -0x4(%rax,%rcx,4),%r14
lea    0x8(,%r14,8),%rbx
mov    %rbx,%rdi
call   1060 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %rbx,%rdi
call   1060 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %rbx,%rdi
call   1060 <malloc@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1060 <malloc@plt>
mov    %rax,%rbp
test   %r14,%r14
js     1335 <swt_out1+0x1c5>
mov    %r14d,%eax
lea    0x8(,%rax,8),%rbx
mov    %r15,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1040 <memset@plt>
mov    %rbp,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1040 <memset@plt>
mov    %rbp,0x40(%rsp)
mov    %r15,0x48(%rsp)
mov    0x30(%rsp),%rdi
mov    %r12,%rbx
mov    %ebx,%esi
mov    0x20(%rsp),%rdx
mov    %ebx,%ecx
xor    %eax,%eax
call   1080 <verbatim_copy@plt>
mov    0x28(%rsp),%rdi
mov    %ebx,%esi
mov    0x18(%rsp),%rdx
mov    %ebx,%ecx
xor    %eax,%eax
call   1080 <verbatim_copy@plt>
mov    0x60(%rsp),%rdi
mov    0xc(%rsp),%ecx
mov    %ecx,%esi
mov    0x58(%rsp),%rdx
xor    %eax,%eax
call   1080 <verbatim_copy@plt>
mov    %r13,0x80(%rsp)
test   %r13d,%r13d
mov    0x38(%rsp),%r14
jle    14ae <swt_out1+0x33e>
add    $0xffffffffffffffff,%r14
mov    0x48(%rsp),%rax
add    $0x8,%rax
mov    %rax,0x30(%rsp)
mov    0x40(%rsp),%rax
add    $0x8,%rax
mov    %rax,0x28(%rsp)
addq   $0xffffffffffffffff,0x50(%rsp)
mov    0x70(%rsp),%r8
xor    %r15d,%r15d
mov    %r12,%rbp
mov    %r14,0x38(%rsp)
nop
sub    $0x8,%rsp
mov    0x60(%rsp),%r12
mov    %r12,%rdi
mov    0x14(%rsp),%ebx
mov    %ebx,%esi
mov    0x80(%rsp),%r13
mov    %r13,%rdx
mov    %ebx,%ecx
mov    %r8,0x68(%rsp)
mov    %ebx,%r9d
xor    %eax,%eax
push   %rbp
push   0x28(%rsp)
push   0x38(%rsp)
call   1070 <swt_conv@plt>
add    $0x20,%rsp
mov    %r13,%rdi
mov    %ebx,%esi
mov    %r12,%rdx
mov    %ebx,%ecx
xor    %eax,%eax
call   1080 <verbatim_copy@plt>
cmp    %r14,%r15
jge    1487 <swt_out1+0x317>
lea    0x0(%rbp,%rbp,1),%ebx
lea    0x1(%rbp,%rbp,1),%r12d
mov    0x20(%rsp),%r13
mov    %r13,%rdi
mov    %ebp,%esi
mov    0x48(%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1050 <dyadup_1D_feed_even@plt>
mov    0x18(%rsp),%r14
mov    %r14,%rdi
mov    %ebp,%esi
mov    0x40(%rsp),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
call   1050 <dyadup_1D_feed_even@plt>
mov    0x30(%rsp),%rdi
mov    %ebx,%esi
mov    %r13,%rdx
mov    %ebx,%ecx
xor    %eax,%eax
call   1080 <verbatim_copy@plt>
mov    0x28(%rsp),%rdi
mov    %ebx,%esi
mov    %r14,%rdx
mov    0x38(%rsp),%r14
mov    %ebx,%ecx
xor    %eax,%eax
call   1080 <verbatim_copy@plt>
cmp    %r15,0x50(%rsp)
je     14ae <swt_out1+0x33e>
mov    0x10(%rsp),%rax
mov    0x4(%rax,%r15,4),%ebp
mov    0x60(%rsp),%r8
add    0x90(%rsp),%r8
add    $0x1,%r15
jmp    13d0 <swt_out1+0x260>
mov    0x68(%rsp),%ebx
mov    0x80(%rsp),%rax
imul   %ebx,%eax
cltq
mov    0x70(%rsp),%r14
lea    (%r14,%rax,8),%rdx
mov    0x58(%rsp),%rbp
mov    %rbp,%rdi
mov    0xc(%rsp),%ecx
mov    %ecx,%esi
xor    %eax,%eax
call   1080 <verbatim_copy@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    0x78(%rsp),%rdi
call   1030 <free@plt>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
mov    0x6c(%rsp),%esi
mov    %ebx,%edx
mov    0x88(%rsp),%rcx
mov    %ebx,%r8d
mov    %esi,%r9d
xor    %eax,%eax
call   1090 <matrix_tran@plt>
mov    %r14,%rdi
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

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