#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*/ idwt_neo(double *, double *, int, double *, double *, int,
                            double *, int);
void dwt3d_line_reverse(double *mat3DInApp, double *mat3DInDet, int row1,
                        int col1, int sli1, double *mat3DOut, int row2,
                        int col2, int sli2, double *loDe, double *hiDe,
                        int filterLen) {
  int i;
  for (i = 0; i < row1 * sli1; i++)
    idwt_neo(mat3DInApp + i * col1, mat3DInDet + i * col1, col1, loDe, hiDe,
             filterLen, mat3DOut + i * col2, col2);
  return;
}


x86 assembly (clang, -O0):
<dwt3d_line_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jge    11c4 <dwt3d_line_reverse+0xb4>
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x2c(%rbp),%eax
imul   -0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%edx
mov    0x28(%rbp),%rcx
mov    0x30(%rbp),%r8
mov    0x38(%rbp),%r9d
mov    -0x28(%rbp),%r10
mov    -0x2c(%rbp),%eax
imul   0x18(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%r10
mov    0x18(%rbp),%eax
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <idwt_neo@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1149 <dwt3d_line_reverse+0x39>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dwt3d_line_reverse>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %ecx,0x4(%rsp)
imul   %r8d,%edx
test   %edx,%edx
jle    1188 <dwt3d_line_reverse+0x78>
mov    %r9,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    0x48(%rsp),%eax
movslq 0x4(%rsp),%r12
movslq %eax,%r13
mov    %edx,%r14d
shl    $0x3,%r13
shl    $0x3,%r12
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    0x4(%rsp),%edx
mov    0x58(%rsp),%rcx
mov    0x60(%rsp),%r8
mov    0x68(%rsp),%r9d
mov    0x48(%rsp),%eax
push   %rax
push   %r15
call   1030 <idwt_neo@plt>
add    $0x10,%rsp
add    %r13,%r15
add    %r12,%rbx
add    %r12,%rbp
add    $0xffffffffffffffff,%r14
jne    1150 <dwt3d_line_reverse+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @dwt3d_line_reverse(double* %0, double* %1, i32 %2, i32 %3, i32 %4, double* %5, i32 %6, i32 %7, i32 %8, double* %9, double* %10, i32 %11) {
%13 = mul i32 %4, %2
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %29
15: ; preds = %12
%16 = sext i32 %3 to i64
%17 = sext i32 %7 to i64
%18 = zext i32 %13 to i64
br label %19
19: ; preds = %15, %19
%20 = phi i64 [ 0, %15 ], [ %27, %19 ]
%21 = mul nsw i64 %20, %16
%22 = getelementptr inbounds double, double* %0, i64 %21
%23 = getelementptr inbounds double, double* %1, i64 %21
%24 = mul nsw i64 %20, %17
%25 = getelementptr inbounds double, double* %5, i64 %24
%26 = tail call i32 @idwt_neo(double* %22, double* %23, i32 %3, double* %9, double* %10, i32 %11, double* %25, i32 %7)
%27 = add nuw nsw i64 %20, 1
%28 = icmp eq i64 %27, %18
br i1 %28, label %29, label %19
29: ; preds = %19, %12
ret void
}