#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*/ wcodemat(double *, int, double *, int, int, int);
int /*<<< orphan*/ wcodemat_abs(double *, int, double *, int, int, int);
void wcodemat_matrix(double *matrixIn, int matrixInRow, int matrixInCol,
                     double *matrixOut, int matrixOutRow, int matrixOutCol,
                     int minv, int maxv, int abso) {
  if (abso)
    wcodemat_abs(matrixIn, matrixInRow * matrixInCol, matrixOut,
                 matrixInRow * matrixInCol, minv, maxv);
  else
    wcodemat(matrixIn, matrixInRow * matrixInCol, matrixOut,
             matrixInRow * matrixInCol, minv, maxv);
  return;
}


x86 assembly (clang, -O0):
<wcodemat_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
cmpl   $0x0,0x20(%rbp)
je     1179 <wcodemat_matrix+0x59>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
imul   -0x10(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1040 <wcodemat_abs@plt>
jmp    119c <wcodemat_matrix+0x7c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
imul   -0x10(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1030 <wcodemat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcodemat_matrix>:
mov    0x10(%rsp),%r9d
mov    0x8(%rsp),%r8d
imul   %edx,%esi
cmpl   $0x0,0x18(%rsp)
je     113e <wcodemat_matrix+0x1e>
mov    %rcx,%rdx
mov    %esi,%ecx
jmp    1040 <wcodemat_abs@plt>
mov    %rcx,%rdx
mov    %esi,%ecx
jmp    1030 <wcodemat@plt>

LLVM IR (-O0):
define void @wcodemat_matrix(double* %0, i32 %1, i32 %2, double* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store double* %0, double** %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store double* %3, double** %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32, i32* %18
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %33
21: ; preds = %9
%22 = load double*, double** %10
%23 = load i32, i32* %11
%24 = load i32, i32* %12
%25 = mul nsw i32 %23, %24
%26 = load double*, double** %13
%27 = load i32, i32* %11
%28 = load i32, i32* %12
%29 = mul nsw i32 %27, %28
%30 = load i32, i32* %16
%31 = load i32, i32* %17
%32 = call i32 @wcodemat_abs(double* %22, i32 %25, double* %26, i32 %29, i32 %30, i32 %31)
br label %45
33: ; preds = %9
%34 = load double*, double** %10
%35 = load i32, i32* %11
%36 = load i32, i32* %12
%37 = mul nsw i32 %35, %36
%38 = load double*, double** %13
%39 = load i32, i32* %11
%40 = load i32, i32* %12
%41 = mul nsw i32 %39, %40
%42 = load i32, i32* %16
%43 = load i32, i32* %17
%44 = call i32 @wcodemat(double* %34, i32 %37, double* %38, i32 %41, i32 %42, i32 %43)
br label %45
45: ; preds = %33, %21
ret void
}

LLVM IR (-O2):
define void @wcodemat_matrix(double* %0, i32 %1, i32 %2, double* %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = icmp eq i32 %8, 0
%11 = mul nsw i32 %2, %1
br i1 %10, label %14, label %12
12: ; preds = %9
%13 = tail call i32 @wcodemat_abs(double* %0, i32 %11, double* %3, i32 %11, i32 %6, i32 %7)
br label %16
14: ; preds = %9
%15 = tail call i32 @wcodemat(double* %0, i32 %11, double* %3, i32 %11, i32 %6, i32 %7)
br label %16
16: ; preds = %14, %12
ret void
}