#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_col(double *matrixIn, int matrixInRow, int matrixInCol,
                         double *matrixOut, int matrixOutRow, int matrixOutCol,
                         int minv, int maxv, int abso) {
  int count;
  for (count = 0; count < matrixInCol; count++) {
    if (abso)
      wcodemat_abs(matrixIn + count * matrixInRow, matrixInRow,
                   matrixOut + count * matrixInRow, matrixInRow, minv, maxv);
    else
      wcodemat(matrixIn + count * matrixInRow, matrixInRow,
               matrixOut + count * matrixInRow, matrixInRow, minv, maxv);
  }
  return;
}


x86 assembly (clang, -O0):
<wcodemat_matrix_col>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%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)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11f2 <wcodemat_matrix_col+0xd2>
cmpl   $0x0,0x20(%rbp)
je     11a4 <wcodemat_matrix_col+0x84>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x24(%rbp),%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0xc(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1040 <wcodemat_abs@plt>
jmp    11df <wcodemat_matrix_col+0xbf>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x24(%rbp),%eax
imul   -0xc(%rbp),%eax
cltq
shl    $0x3,%rax
add    %rax,%rdx
mov    -0xc(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1030 <wcodemat@plt>
jmp    11e4 <wcodemat_matrix_col+0xc4>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    114e <wcodemat_matrix_col+0x2e>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcodemat_matrix_col>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1183 <wcodemat_matrix_col+0x63>
mov    %rcx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    0x40(%rsp),%r12d
movslq %esi,%r13
mov    %edx,%r15d
shl    $0x3,%r13
jmp    1161 <wcodemat_matrix_col+0x41>
nopl   0x0(%rax)
call   1030 <wcodemat@plt>
add    %r13,%rbp
add    %r13,%rbx
add    $0xffffffffffffffff,%r15
je     1183 <wcodemat_matrix_col+0x63>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
mov    %r14d,%ecx
mov    %r12d,%r8d
mov    0x48(%rsp),%r9d
cmpl   $0x0,0x50(%rsp)
je     1150 <wcodemat_matrix_col+0x30>
call   1040 <wcodemat_abs@plt>
jmp    1155 <wcodemat_matrix_col+0x35>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @wcodemat_matrix_col(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
%19 = 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
store i32 0, i32* %19
br label %20
20: ; preds = %64, %9
%21 = load i32, i32* %19
%22 = load i32, i32* %12
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %67
24: ; preds = %20
%25 = load i32, i32* %18
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %45
27: ; preds = %24
%28 = load double*, double** %10
%29 = load i32, i32* %19
%30 = load i32, i32* %11
%31 = mul nsw i32 %29, %30
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %28, i64 %32
%34 = load i32, i32* %11
%35 = load double*, double** %13
%36 = load i32, i32* %19
%37 = load i32, i32* %11
%38 = mul nsw i32 %36, %37
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %35, i64 %39
%41 = load i32, i32* %11
%42 = load i32, i32* %16
%43 = load i32, i32* %17
%44 = call i32 @wcodemat_abs(double* %33, i32 %34, double* %40, i32 %41, i32 %42, i32 %43)
br label %63
45: ; preds = %24
%46 = load double*, double** %10
%47 = load i32, i32* %19
%48 = load i32, i32* %11
%49 = mul nsw i32 %47, %48
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %46, i64 %50
%52 = load i32, i32* %11
%53 = load double*, double** %13
%54 = load i32, i32* %19
%55 = load i32, i32* %11
%56 = mul nsw i32 %54, %55
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %53, i64 %57
%59 = load i32, i32* %11
%60 = load i32, i32* %16
%61 = load i32, i32* %17
%62 = call i32 @wcodemat(double* %51, i32 %52, double* %58, i32 %59, i32 %60, i32 %61)
br label %63
63: ; preds = %45, %27
br label %64
64: ; preds = %63
%65 = load i32, i32* %19
%66 = add nsw i32 %65, 1
store i32 %66, i32* %19
br label %20
67: ; preds = %20
ret void
}

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