#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*/ idwt_neo(double *, double *, int, double *, double *, int,
                            double *, int);
double *malloc(int);
int /*<<< orphan*/ matrix_tran(double *, int, int, double *, int, int);
void idwt2D_neo(double *matrixInApprox, double *matrixInColDetail,
                double *matrixInRowDetail, double *matrixInDetail,
                int matrixInRow, int matrixInCol, double *lowRe, double *hiRe,
                int filterLen, double *matrixOut, int matrixOutRow,
                int matrixOutCol) {
  int row, col;
  int matrixInRowM, matrixInColM;
  double *matrixOutApproxPre, *matrixOutDetailPre;
  double *matrixOutApproxTemp, *matrixOutDetailTemp;
  double *matrixOutPre;
  matrixInRowM = matrixInRow;
  matrixInColM = matrixInCol;
  matrixOutApproxPre = malloc(matrixOutRow * matrixInColM * sizeof(double));
  matrixOutApproxTemp = malloc(matrixOutRow * matrixInColM * sizeof(double));
  for (col = 0; col < matrixInColM; col++)
    idwt_neo((matrixInApprox + col * matrixInRowM),
             (matrixInColDetail + col * matrixInRowM), matrixInRowM, lowRe,
             hiRe, filterLen, (matrixOutApproxPre + col * matrixOutRow),
             matrixOutRow);
  matrix_tran(matrixOutApproxPre, matrixInColM, matrixOutRow,
              matrixOutApproxTemp, matrixInColM, matrixOutRow);
  free(matrixOutApproxPre);
  matrixOutDetailPre = malloc(matrixOutRow * matrixInColM * sizeof(double));
  for (col = 0; col < matrixInColM; col++)
    idwt_neo((matrixInRowDetail + col * matrixInRowM),
             (matrixInDetail + col * matrixInRowM), matrixInRowM, lowRe, hiRe,
             filterLen, (matrixOutDetailPre + col * matrixOutRow),
             matrixOutRow);
  matrixOutDetailTemp = malloc(matrixOutRow * matrixInColM * sizeof(double));
  matrix_tran(matrixOutDetailPre, matrixInColM, matrixOutRow,
              matrixOutDetailTemp, matrixInColM, matrixOutRow);
  free(matrixOutDetailPre);
  matrixOutPre = malloc(matrixOutRow * matrixOutCol * sizeof(double));
  for (row = 0; row < matrixOutRow; row++)
    idwt_neo((matrixOutApproxTemp + row * matrixInColM),
             (matrixOutDetailTemp + row * matrixInColM), matrixInColM, lowRe,
             hiRe, filterLen, (matrixOutPre + row * matrixOutCol),
             matrixOutCol);
  free(matrixOutApproxTemp);
  free(matrixOutDetailTemp);
  matrix_tran(matrixOutPre, matrixOutRow, matrixOutCol, matrixOut, matrixOutRow,
              matrixOutCol);
  free(matrixOutPre);
  return;
}


x86 assembly (clang, -O0):
<idwt2D_neo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%rax
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
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    0x30(%rbp),%eax
imul   -0x38(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    0x30(%rbp),%eax
imul   -0x38(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    122d <idwt2D_neo+0xed>
mov    -0x8(%rbp),%rdi
mov    -0x30(%rbp),%eax
imul   -0x34(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%eax
imul   -0x34(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x34(%rbp),%edx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8
mov    0x20(%rbp),%r9d
mov    -0x40(%rbp),%r10
mov    -0x30(%rbp),%eax
imul   0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r10
mov    0x30(%rbp),%eax
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1040 <idwt_neo@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11b8 <idwt2D_neo+0x78>
mov    -0x40(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    0x30(%rbp),%edx
mov    -0x50(%rbp),%rcx
mov    -0x38(%rbp),%r8d
mov    0x30(%rbp),%r9d
call   1060 <matrix_tran@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    0x30(%rbp),%eax
imul   -0x38(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    12e5 <idwt2D_neo+0x1a5>
mov    -0x18(%rbp),%rdi
mov    -0x30(%rbp),%eax
imul   -0x34(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    -0x30(%rbp),%eax
imul   -0x34(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x34(%rbp),%edx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8
mov    0x20(%rbp),%r9d
mov    -0x48(%rbp),%r10
mov    -0x30(%rbp),%eax
imul   0x30(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r10
mov    0x30(%rbp),%eax
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1040 <idwt_neo@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1270 <idwt2D_neo+0x130>
mov    0x30(%rbp),%eax
imul   -0x38(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x38(%rbp),%esi
mov    0x30(%rbp),%edx
mov    -0x58(%rbp),%rcx
mov    -0x38(%rbp),%r8d
mov    0x30(%rbp),%r9d
call   1060 <matrix_tran@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    0x30(%rbp),%eax
imul   0x38(%rbp),%eax
cltq
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    0x30(%rbp),%eax
jge    13b5 <idwt2D_neo+0x275>
mov    -0x50(%rbp),%rdi
mov    -0x2c(%rbp),%eax
imul   -0x38(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x58(%rbp),%rsi
mov    -0x2c(%rbp),%eax
imul   -0x38(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x38(%rbp),%edx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8
mov    0x20(%rbp),%r9d
mov    -0x60(%rbp),%r10
mov    -0x2c(%rbp),%eax
imul   0x38(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r10
mov    0x38(%rbp),%eax
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1040 <idwt_neo@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1340 <idwt2D_neo+0x200>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
mov    0x30(%rbp),%esi
mov    0x38(%rbp),%edx
mov    0x28(%rbp),%rcx
mov    0x30(%rbp),%r8d
mov    0x38(%rbp),%r9d
call   1060 <matrix_tran@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idwt2D_neo>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9d,%r15d
mov    %r8d,%r12d
mov    %rcx,0x70(%rsp)
mov    %rdx,0x68(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbp
mov    0xe8(%rsp),%eax
mov    %rax,0x38(%rsp)
mov    0xe0(%rsp),%r13d
mov    0xd8(%rsp),%rax
mov    %rax,0x78(%rsp)
mov    0xd0(%rsp),%eax
mov    %eax,0x24(%rsp)
mov    0xc8(%rsp),%rax
mov    %rax,0x50(%rsp)
mov    0xc0(%rsp),%rax
mov    %rax,0x48(%rsp)
mov    %r9d,%ebx
imul   %r13d,%ebx
shl    $0x3,%ebx
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    %rax,0x58(%rsp)
mov    %ebx,0x34(%rsp)
mov    %ebx,%edi
call   1050 <malloc@plt>
mov    %r13,%rbx
mov    %rax,0x40(%rsp)
mov    %r12d,0x28(%rsp)
movslq %r12d,%rax
mov    %rax,0x60(%rsp)
movslq %ebx,%rax
mov    %rax,0x18(%rsp)
mov    %r15d,%r13d
mov    %r15d,0xc(%rsp)
test   %r15d,%r15d
jle    126e <idwt2D_neo+0x12e>
mov    0x18(%rsp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,0x10(%rsp)
mov    0x60(%rsp),%rax
lea    0x0(,%rax,8),%rax
mov    %rax,0x80(%rsp)
mov    %r13,%r15
mov    0x58(%rsp),%r12
nopw   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r14,%rsi
mov    0x28(%rsp),%edx
mov    0x48(%rsp),%rcx
mov    0x50(%rsp),%r8
mov    0x24(%rsp),%r9d
push   %rbx
push   %r12
call   1040 <idwt_neo@plt>
add    $0x10,%rsp
add    0x10(%rsp),%r12
mov    0x80(%rsp),%rax
add    %rax,%rbp
add    %rax,%r14
add    $0xffffffffffffffff,%r15
jne    1230 <idwt2D_neo+0xf0>
mov    0x58(%rsp),%r14
mov    %r14,%rdi
mov    0xc(%rsp),%ebp
mov    %ebp,%esi
mov    %ebx,%edx
mov    0x40(%rsp),%rcx
mov    %ebp,%r8d
mov    %ebx,%r9d
mov    %rbx,%r12
call   1060 <matrix_tran@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x34(%rsp),%edi
call   1050 <malloc@plt>
mov    %rax,0x10(%rsp)
test   %ebp,%ebp
mov    0x70(%rsp),%r14
mov    0x60(%rsp),%rax
mov    0x18(%rsp),%rcx
mov    0x68(%rsp),%rbx
jle    132b <idwt2D_neo+0x1eb>
shl    $0x3,%rcx
shl    $0x3,%rax
mov    0x10(%rsp),%rbp
mov    %rcx,0x18(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
mov    0x28(%rsp),%edx
mov    0x48(%rsp),%rcx
mov    0x50(%rsp),%r8
mov    0x24(%rsp),%r9d
push   %r12
push   %rbp
mov    %r13,%r15
mov    %r12,%r13
mov    %rax,%r12
call   1040 <idwt_neo@plt>
mov    0x28(%rsp),%rcx
mov    %r12,%rax
mov    %r13,%r12
mov    %r15,%r13
add    $0x10,%rsp
add    %rcx,%rbp
add    %rax,%rbx
add    %rax,%r14
add    $0xffffffffffffffff,%r13
jne    12e0 <idwt2D_neo+0x1a0>
mov    0x34(%rsp),%edi
call   1050 <malloc@plt>
mov    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    0xc(%rsp),%esi
mov    %r12d,%edx
mov    %rax,0x18(%rsp)
mov    %rax,%rcx
mov    %esi,%r8d
mov    %r12d,%r9d
call   1060 <matrix_tran@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r12d,%edi
imul   0x38(%rsp),%edi
shl    $0x3,%edi
call   1050 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %r12,0x28(%rsp)
test   %r12d,%r12d
jle    13e7 <idwt2D_neo+0x2a7>
movslq 0xc(%rsp),%r15
movslq 0x38(%rsp),%r13
mov    0x28(%rsp),%r14d
shl    $0x3,%r13
shl    $0x3,%r15
mov    0x18(%rsp),%rbp
mov    0x40(%rsp),%rbx
mov    0x10(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    0xc(%rsp),%edx
mov    0x48(%rsp),%rcx
mov    0x50(%rsp),%r8
mov    0x24(%rsp),%r9d
push   0x38(%rsp)
push   %r12
call   1040 <idwt_neo@plt>
add    $0x10,%rsp
add    %r13,%r12
add    %r15,%rbx
add    %r15,%rbp
add    $0xffffffffffffffff,%r14
jne    13b0 <idwt2D_neo+0x270>
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    0x28(%rsp),%rsi
mov    0x38(%rsp),%rdx
mov    0x78(%rsp),%rcx
mov    %esi,%r8d
mov    %edx,%r9d
call   1060 <matrix_tran@plt>
mov    %rbx,%rdi
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

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

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