#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*/ free(double *);
int /*<<< orphan*/ iswt_conv_step(double *, double *, int, double *, int,
                                  double *, double *, int, int);
double *malloc(int);
int /*<<< orphan*/ matrix_tran(double *, int, int, double *, int, int);
void iswt2(double *matrixInApprox, double *matrixInColDetail,
           double *matrixInRowDetail, double *matrixInDetail, int matrixInRow,
           int matrixInCol, double *matrixOut, int matrixOutRow,
           int matrixOutCol, double *filterLow, double *filterHi,
           int filterLength, int step) {
  int row, col;
  double *matrixOutApproxPre, *matrixOutDetailPre;
  double *matrixOutPre;
  double *pMatrixOutApproxPre, *pMatrixOutDetailPre;
  matrixOutApproxPre = malloc(matrixInRow * matrixInCol * sizeof(double));
  matrixOutDetailPre = malloc(matrixInRow * matrixInCol * sizeof(double));
  for (col = 0; col < matrixInCol; col++) {
    iswt_conv_step(matrixInApprox + col * matrixInRow,
                   matrixInColDetail + col * matrixInRow, matrixInRow,
                   matrixOutApproxPre + col * matrixInRow, matrixInRow,
                   filterLow, filterHi, filterLength, step);
    iswt_conv_step(matrixInRowDetail + col * matrixInRow,
                   matrixInDetail + col * matrixInRow, matrixInRow,
                   matrixOutDetailPre + col * matrixInRow, matrixInRow,
                   filterLow, filterHi, filterLength, step);
  }
  pMatrixOutApproxPre = malloc(matrixInRow * matrixInCol * sizeof(double));
  matrix_tran(matrixOutApproxPre, matrixInCol, matrixInRow, pMatrixOutApproxPre,
              matrixInRow, matrixInCol);
  free(matrixOutApproxPre);
  pMatrixOutDetailPre = malloc(matrixInRow * matrixInCol * sizeof(double));
  matrix_tran(matrixOutDetailPre, matrixInCol, matrixInRow, pMatrixOutDetailPre,
              matrixInRow, matrixInCol);
  free(matrixOutDetailPre);
  matrixOutPre = malloc(matrixInRow * matrixInCol * sizeof(double));
  for (row = 0; row < matrixInRow; row++) {
    iswt_conv_step(pMatrixOutApproxPre + row * matrixInCol,
                   pMatrixOutDetailPre + row * matrixInCol, matrixInCol,
                   matrixOutPre + row * matrixInCol, matrixInCol, filterLow,
                   filterHi, filterLength, step);
  }
  free(pMatrixOutApproxPre);
  free(pMatrixOutDetailPre);
  matrix_tran(matrixOutPre, matrixInRow, matrixInCol, matrixOut, matrixInRow,
              matrixInCol);
  free(matrixOutPre);
  return;
}


x86 assembly (clang, -O0):
<iswt2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x40(%rbp),%eax
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x24(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1291 <iswt2+0x151>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x24(%rbp),%edx
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x24(%rbp),%r8d
mov    0x28(%rbp),%r9
mov    0x30(%rbp),%r11
mov    0x38(%rbp),%r10d
mov    0x40(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <iswt_conv_step@plt>
mov    -0x18(%rbp),%rdi
mov    -0x30(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x24(%rbp),%edx
mov    -0x40(%rbp),%rcx
mov    -0x30(%rbp),%eax
imul   -0x24(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x24(%rbp),%r8d
mov    0x28(%rbp),%r9
mov    0x30(%rbp),%r11
mov    0x38(%rbp),%r10d
mov    0x40(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <iswt_conv_step@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11af <iswt2+0x6f>
mov    -0x24(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x28(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x50(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
call   1060 <matrix_tran@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x28(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x58(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
call   1060 <matrix_tran@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x24(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    13a6 <iswt2+0x266>
mov    -0x50(%rbp),%rdi
mov    -0x2c(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x58(%rbp),%rsi
mov    -0x2c(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x28(%rbp),%edx
mov    -0x48(%rbp),%rcx
mov    -0x2c(%rbp),%eax
imul   -0x28(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rcx
mov    -0x28(%rbp),%r8d
mov    0x28(%rbp),%r9
mov    0x30(%rbp),%r11
mov    0x38(%rbp),%r10d
mov    0x40(%rbp),%eax
mov    %r11,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1040 <iswt_conv_step@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1328 <iswt2+0x1e8>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
mov    0x10(%rbp),%rcx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
call   1060 <matrix_tran@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswt2>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %rcx,%rbx
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%r12
mov    0xe0(%rsp),%eax
mov    %rax,0x40(%rsp)
mov    0xd8(%rsp),%eax
mov    %rax,0x38(%rsp)
mov    0xd0(%rsp),%rax
mov    %rax,0x30(%rsp)
mov    0xc8(%rsp),%rax
mov    %rax,0x60(%rsp)
mov    0xb0(%rsp),%rax
mov    %rax,0x68(%rsp)
mov    %r8d,0xc(%rsp)
imul   %r9d,%r15d
shl    $0x3,%r15d
mov    %r15d,%edi
call   1050 <malloc@plt>
mov    %rax,0x50(%rsp)
mov    %r15d,0x4c(%rsp)
mov    %r15d,%edi
call   1050 <malloc@plt>
mov    %rax,0x58(%rsp)
mov    %r14d,0x24(%rsp)
test   %r14d,%r14d
jle    129e <iswt2+0x15e>
mov    %r12,%rcx
movslq 0xc(%rsp),%rax
mov    0x24(%rsp),%edx
shl    $0x3,%rax
mov    %rax,0x70(%rsp)
mov    0x58(%rsp),%r15
mov    0x50(%rsp),%r12
mov    0xc(%rsp),%r14d
nopl   (%rax)
mov    %rdx,0x28(%rsp)
mov    %rcx,0x10(%rsp)
mov    %r13,0x18(%rsp)
sub    $0x8,%rsp
mov    0x18(%rsp),%rdi
mov    %rbp,%rsi
mov    %r14d,%edx
mov    %r12,%rcx
mov    %r14d,%r8d
mov    0x68(%rsp),%r13
mov    %r13,%r9
mov    0x48(%rsp),%rax
push   %rax
mov    0x48(%rsp),%rax
push   %rax
push   0x48(%rsp)
call   1040 <iswt_conv_step@plt>
add    $0x18,%rsp
mov    0x20(%rsp),%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
mov    %r15,%rcx
mov    %r14d,%r8d
mov    %r13,%r9
push   0x48(%rsp)
mov    0x28(%rsp),%r13
push   0x48(%rsp)
push   0x48(%rsp)
call   1040 <iswt_conv_step@plt>
mov    0x48(%rsp),%rdx
mov    0x30(%rsp),%rcx
add    $0x20,%rsp
mov    0x70(%rsp),%rax
add    %rax,%rcx
add    %rax,%rbp
add    %rax,%r12
add    %rax,%r13
add    %rax,%rbx
add    %rax,%r15
add    $0xffffffffffffffff,%rdx
jne    1200 <iswt2+0xc0>
mov    0x4c(%rsp),%r14d
mov    %r14d,%edi
call   1050 <malloc@plt>
mov    0x50(%rsp),%rbp
mov    %rbp,%rdi
mov    0x24(%rsp),%r12d
mov    %r12d,%esi
mov    0xc(%rsp),%ebx
mov    %ebx,%edx
mov    %rax,0x18(%rsp)
mov    %rax,%rcx
mov    %ebx,%r8d
mov    %r12d,%r9d
call   1060 <matrix_tran@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r14d,%edi
call   1050 <malloc@plt>
mov    0x58(%rsp),%rbp
mov    %rbp,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %rax,0x10(%rsp)
mov    %rax,%rcx
mov    %ebx,%r8d
mov    %r12d,%r9d
call   1060 <matrix_tran@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r14d,%edi
call   1050 <malloc@plt>
mov    %rax,0x28(%rsp)
test   %ebx,%ebx
jle    137c <iswt2+0x23c>
movslq %r12d,%r14
mov    0xc(%rsp),%r15d
shl    $0x3,%r14
mov    0x28(%rsp),%r13
mov    0x10(%rsp),%rbp
mov    0x18(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r12d,%edx
mov    %r13,%rcx
mov    %r12d,%r8d
mov    0x68(%rsp),%r9
push   0x48(%rsp)
push   0x48(%rsp)
push   0x48(%rsp)
call   1040 <iswt_conv_step@plt>
add    $0x20,%rsp
add    %r14,%rbx
add    %r14,%rbp
add    %r14,%r13
add    $0xffffffffffffffff,%r15
jne    1340 <iswt2+0x200>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rbx
mov    %rbx,%rdi
mov    0xc(%rsp),%esi
mov    %r12d,%edx
mov    0x68(%rsp),%rcx
mov    %esi,%r8d
mov    %r12d,%r9d
call   1060 <matrix_tran@plt>
mov    %rbx,%rdi
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @iswt2(double* %0, double* %1, double* %2, double* %3, i32 %4, i32 %5, double* %6, i32 %7, i32 %8, double* %9, double* %10, i32 %11, i32 %12) {
%14 = shl i32 %4, 3
%15 = mul i32 %14, %5
%16 = tail call double* @malloc(i32 %15)
%17 = tail call double* @malloc(i32 %15)
%18 = icmp sgt i32 %5, 0
br i1 %18, label %19, label %35
19: ; preds = %13
%20 = sext i32 %4 to i64
%21 = zext i32 %5 to i64
br label %22
22: ; preds = %19, %22
%23 = phi i64 [ 0, %19 ], [ %33, %22 ]
%24 = mul nsw i64 %23, %20
%25 = getelementptr inbounds double, double* %0, i64 %24
%26 = getelementptr inbounds double, double* %1, i64 %24
%27 = getelementptr inbounds double, double* %16, i64 %24
%28 = tail call i32 @iswt_conv_step(double* %25, double* %26, i32 %4, double* %27, i32 %4, double* %9, double* %10, i32 %11, i32 %12)
%29 = getelementptr inbounds double, double* %2, i64 %24
%30 = getelementptr inbounds double, double* %3, i64 %24
%31 = getelementptr inbounds double, double* %17, i64 %24
%32 = tail call i32 @iswt_conv_step(double* %29, double* %30, i32 %4, double* %31, i32 %4, double* %9, double* %10, i32 %11, i32 %12)
%33 = add nuw nsw i64 %23, 1
%34 = icmp eq i64 %33, %21
br i1 %34, label %35, label %22
35: ; preds = %22, %13
%36 = tail call double* @malloc(i32 %15)
%37 = tail call i32 @matrix_tran(double* %16, i32 %5, i32 %4, double* %36, i32 %4, i32 %5)
%38 = tail call i32 @free(double* %16)
%39 = tail call double* @malloc(i32 %15)
%40 = tail call i32 @matrix_tran(double* %17, i32 %5, i32 %4, double* %39, i32 %4, i32 %5)
%41 = tail call i32 @free(double* %17)
%42 = tail call double* @malloc(i32 %15)
%43 = icmp sgt i32 %4, 0
br i1 %43, label %44, label %56
44: ; preds = %35
%45 = sext i32 %5 to i64
%46 = zext i32 %4 to i64
br label %47
47: ; preds = %44, %47
%48 = phi i64 [ 0, %44 ], [ %54, %47 ]
%49 = mul nsw i64 %48, %45
%50 = getelementptr inbounds double, double* %36, i64 %49
%51 = getelementptr inbounds double, double* %39, i64 %49
%52 = getelementptr inbounds double, double* %42, i64 %49
%53 = tail call i32 @iswt_conv_step(double* %50, double* %51, i32 %5, double* %52, i32 %5, double* %9, double* %10, i32 %11, i32 %12)
%54 = add nuw nsw i64 %48, 1
%55 = icmp eq i64 %54, %46
br i1 %55, label %56, label %47
56: ; preds = %47, %35
%57 = tail call i32 @free(double* %36)
%58 = tail call i32 @free(double* %39)
%59 = tail call i32 @matrix_tran(double* %42, i32 %4, i32 %5, double* %6, i32 %4, i32 %5)
%60 = tail call i32 @free(double* %42)
ret void
}