void eq_scal(int m, int n, void *info,
             int (*mat)(void *info, int k, int ndx[], double val[]), double R[],
             double S[], int ord) {
  int i, j, len, t, pass, *ndx;
  double big, temp, *val;
  if (!(m > 0 && n > 0))
    glp_lib_fault("eq_scal: m = %d; n = %d; invalid parameters", m, n);
  ndx = glp_lib_ucalloc(1 + (m >= n ? m : n), sizeof(int));
  val = glp_lib_ucalloc(1 + (m >= n ? m : n), sizeof(double));
  for (pass = 0; pass <= 1; pass++) {
    if (ord == pass) {
      for (i = 1; i <= m; i++) {
        big = 0.0;
        len = mat(info, +i, ndx, val);
        if (!(0 <= len && len <= n))
          glp_lib_fault("eq_scal: i = %d; len = %d; invalid row length", i,
                        len);
        for (t = 1; t <= len; t++) {
          j = ndx[t];
          if (!(1 <= j && j <= n))
            glp_lib_fault("eq_scal: i = %d; j = %d; invalid column ind"
                          "ex",
                          i, j);
          temp = R[i] * fabs(val[t]) * S[j];
          if (big < temp)
            big = temp;
        }
        if (big != 0.0)
          R[i] /= big;
      }
    } else {
      for (j = 1; j <= n; j++) {
        big = 0.0;
        len = mat(info, -j, ndx, val);
        if (!(0 <= len && len <= m))
          glp_lib_fault("eq_scal: j = %d; len = %d; invalid column leng"
                        "th",
                        j, len);
        for (t = 1; t <= len; t++) {
          i = ndx[t];
          if (!(1 <= i && i <= m))
            glp_lib_fault("eq_scal: i = %d; j = %d; invalid row index", i, j);
          temp = R[i] * fabs(val[t]) * S[j];
          if (big < temp)
            big = temp;
        }
        if (big != 0.0)
          S[j] /= big;
      }
    }
  }
  glp_lib_ufree(ndx);
  glp_lib_ufree(val);
  return;
}


x86 assembly (clang, -O0):
<eq_scal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1165 <eq_scal+0x35>
cmpl   $0x0,-0x8(%rbp)
jg     1179 <eq_scal+0x49>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1050 <glp_lib_fault@plt>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1190 <eq_scal+0x60>
mov    -0x4(%rbp),%eax
mov    %eax,-0x64(%rbp)
jmp    1196 <eq_scal+0x66>
mov    -0x8(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%edi
add    $0x1,%edi
mov    $0x4,%esi
mov    $0x0,%al
call   1040 <glp_lib_ucalloc@plt>
cltq
mov    %rax,-0x48(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     11c5 <eq_scal+0x95>
mov    -0x4(%rbp),%eax
mov    %eax,-0x68(%rbp)
jmp    11cb <eq_scal+0x9b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%edi
add    $0x1,%edi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <glp_lib_ucalloc@plt>
cltq
mov    %rax,-0x60(%rbp)
movl   $0x0,-0x3c(%rbp)
cmpl   $0x1,-0x3c(%rbp)
jg     14e7 <eq_scal+0x3b7>
mov    0x10(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jne    1369 <eq_scal+0x239>
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1364 <eq_scal+0x234>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    -0x60(%rbp),%rcx
call   *%rax
mov    %eax,-0x34(%rbp)
xor    %eax,%eax
cmp    -0x34(%rbp),%eax
jg     124a <eq_scal+0x11a>
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    125e <eq_scal+0x12e>
mov    -0x2c(%rbp),%esi
mov    -0x34(%rbp),%edx
lea    0xde5(%rip),%rdi
mov    $0x0,%al
call   1050 <glp_lib_fault@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jg     1319 <eq_scal+0x1e9>
mov    -0x48(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x30(%rbp)
mov    $0x1,%eax
cmp    -0x30(%rbp),%eax
jg     1299 <eq_scal+0x169>
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    12ad <eq_scal+0x17d>
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1050 <glp_lib_fault@plt>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xd32(%rip),%xmm2
pand   %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1306 <eq_scal+0x1d6>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    130b <eq_scal+0x1db>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1265 <eq_scal+0x135>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1336 <eq_scal+0x206>
jp     1336 <eq_scal+0x206>
jmp    1351 <eq_scal+0x221>
movsd  -0x50(%rbp),%xmm1
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1356 <eq_scal+0x226>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1207 <eq_scal+0xd7>
jmp    14d4 <eq_scal+0x3a4>
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     14cf <eq_scal+0x39f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
sub    -0x30(%rbp),%esi
mov    -0x48(%rbp),%rdx
mov    -0x60(%rbp),%rcx
call   *%rax
mov    %eax,-0x34(%rbp)
xor    %eax,%eax
cmp    -0x34(%rbp),%eax
jg     13b5 <eq_scal+0x285>
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    13c9 <eq_scal+0x299>
mov    -0x30(%rbp),%esi
mov    -0x34(%rbp),%edx
lea    0xcd6(%rip),%rdi
mov    $0x0,%al
call   1050 <glp_lib_fault@plt>
movl   $0x1,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jg     1484 <eq_scal+0x354>
mov    -0x48(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x1,%eax
cmp    -0x2c(%rbp),%eax
jg     1404 <eq_scal+0x2d4>
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jle    1418 <eq_scal+0x2e8>
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
lea    0xcb8(%rip),%rdi
mov    $0x0,%al
call   1050 <glp_lib_fault@plt>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x60(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xbc7(%rip),%xmm2
pand   %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1471 <eq_scal+0x341>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    1476 <eq_scal+0x346>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    13d0 <eq_scal+0x2a0>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14a1 <eq_scal+0x371>
jp     14a1 <eq_scal+0x371>
jmp    14bc <eq_scal+0x38c>
movsd  -0x50(%rbp),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    14c1 <eq_scal+0x391>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1370 <eq_scal+0x240>
jmp    14d4 <eq_scal+0x3a4>
jmp    14d9 <eq_scal+0x3a9>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11ea <eq_scal+0xba>
mov    -0x48(%rbp),%rdi
mov    $0x0,%al
call   1030 <glp_lib_ufree@plt>
mov    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1030 <glp_lib_ufree@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq_scal>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9,0x28(%rsp)
mov    %r8,0x20(%rsp)
mov    %rcx,0x40(%rsp)
mov    %rdx,0x38(%rsp)
mov    %esi,%r14d
mov    %edi,%ebp
mov    0x90(%rsp),%eax
mov    %eax,0x30(%rsp)
test   %edi,%edi
jle    116b <eq_scal+0x3b>
test   %r14d,%r14d
jg     117e <eq_scal+0x4e>
lea    0xea6(%rip),%rdi
mov    %ebp,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <glp_lib_fault@plt>
cmp    %r14d,%ebp
mov    %ebp,%ebx
cmovl  %r14d,%ebx
add    $0x1,%ebx
mov    $0x4,%esi
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <glp_lib_ucalloc@plt>
movslq %eax,%r15
mov    $0x8,%esi
mov    %ebx,%edi
xor    %eax,%eax
call   1040 <glp_lib_ucalloc@plt>
movslq %eax,%r12
mov    %r14,%rax
mov    %r14,0x10(%rsp)
lea    0x1(%r14),%eax
mov    %rax,0x50(%rsp)
mov    %rbp,%rax
mov    %rbp,0x8(%rsp)
lea    0x1(%rbp),%eax
mov    %rax,0x48(%rsp)
mov    $0x1,%cl
xor    %eax,%eax
jmp    11f5 <eq_scal+0xc5>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x1,%eax
testb  $0x1,0x34(%rsp)
mov    $0x0,%ecx
je     143a <eq_scal+0x30a>
cmp    0x30(%rsp),%eax
mov    %ecx,0x34(%rsp)
jne    1320 <eq_scal+0x1f0>
cmpl   $0x0,0x8(%rsp)
jle    11e0 <eq_scal+0xb0>
mov    $0x1,%ebp
jmp    122b <eq_scal+0xfb>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    0x48(%rsp),%rbp
je     11e0 <eq_scal+0xb0>
mov    0x38(%rsp),%rdi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r12,%rcx
call   *0x40(%rsp)
mov    %eax,%r13d
test   %eax,%eax
js     124a <eq_scal+0x11a>
cmp    0x10(%rsp),%r13d
jle    125d <eq_scal+0x12d>
lea    0xdf3(%rip),%rdi
mov    %ebp,%esi
mov    %r13d,%edx
xor    %eax,%eax
call   1050 <glp_lib_fault@plt>
test   %r13d,%r13d
jle    1220 <eq_scal+0xf0>
add    $0x1,%r13d
xorpd  %xmm1,%xmm1
mov    $0x1,%r14d
jmp    12d1 <eq_scal+0x1a1>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xdeb(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
xor    %eax,%eax
movsd  %xmm1,0x18(%rsp)
call   1050 <glp_lib_fault@plt>
movsd  0x18(%rsp),%xmm1
movsd  (%r12,%r14,8),%xmm0
andpd  0xd54(%rip),%xmm0
mov    0x20(%rsp),%rax
mulsd  (%rax,%rbp,8),%xmm0
mov    0x28(%rsp),%rax
mulsd  (%rax,%rbx,8),%xmm0
maxsd  %xmm1,%xmm0
add    $0x1,%r14
movapd %xmm0,%xmm1
cmp    %r14,%r13
je     12f0 <eq_scal+0x1c0>
movslq (%r15,%r14,4),%rbx
test   %rbx,%rbx
jle    1280 <eq_scal+0x150>
cmp    0x10(%rsp),%ebx
jle    129e <eq_scal+0x16e>
jmp    1280 <eq_scal+0x150>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
ucomisd 0xd18(%rip),%xmm0
jne    1300 <eq_scal+0x1d0>
jnp    1220 <eq_scal+0xf0>
mov    0x20(%rsp),%rax
movsd  (%rax,%rbp,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rbp,8)
jmp    1220 <eq_scal+0xf0>
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,0x10(%rsp)
jle    11e0 <eq_scal+0xb0>
mov    $0x1,%r13d
jmp    134f <eq_scal+0x21f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r13
cmp    0x50(%rsp),%r13
je     11e0 <eq_scal+0xb0>
mov    %r13d,%esi
neg    %esi
mov    0x38(%rsp),%rdi
mov    %r15,%rdx
mov    %r12,%rcx
call   *0x40(%rsp)
mov    %eax,%r14d
test   %eax,%eax
js     1371 <eq_scal+0x241>
cmp    0x8(%rsp),%r14d
jle    1385 <eq_scal+0x255>
lea    0xd28(%rip),%rdi
mov    %r13d,%esi
mov    %r14d,%edx
xor    %eax,%eax
call   1050 <glp_lib_fault@plt>
test   %r14d,%r14d
jle    1340 <eq_scal+0x210>
add    $0x1,%r14d
xorpd  %xmm1,%xmm1
mov    $0x1,%ebp
jmp    13f3 <eq_scal+0x2c3>
nopl   0x0(%rax)
lea    0xd2a(%rip),%rdi
mov    %ebx,%esi
mov    %r13d,%edx
xor    %eax,%eax
movsd  %xmm1,0x18(%rsp)
call   1050 <glp_lib_fault@plt>
movsd  0x18(%rsp),%xmm1
movsd  (%r12,%rbp,8),%xmm0
andpd  0xc33(%rip),%xmm0
mov    0x20(%rsp),%rax
mulsd  (%rax,%rbx,8),%xmm0
mov    0x28(%rsp),%rax
mulsd  (%rax,%r13,8),%xmm0
maxsd  %xmm1,%xmm0
add    $0x1,%rbp
movapd %xmm0,%xmm1
cmp    %rbp,%r14
je     1410 <eq_scal+0x2e0>
movslq (%r15,%rbp,4),%rbx
test   %rbx,%rbx
jle    13a0 <eq_scal+0x270>
cmp    0x8(%rsp),%ebx
jle    13bf <eq_scal+0x28f>
jmp    13a0 <eq_scal+0x270>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
ucomisd 0xbf8(%rip),%xmm0
jne    1420 <eq_scal+0x2f0>
jnp    1340 <eq_scal+0x210>
mov    0x28(%rsp),%rax
movsd  (%rax,%r13,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%r13,8)
jmp    1340 <eq_scal+0x210>
mov    %r15,%rdi
xor    %eax,%eax
call   1030 <glp_lib_ufree@plt>
mov    %r12,%rdi
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <glp_lib_ufree@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"eq_scal: m = %d; n = %d; invalid parameters\00"
@.str.1 = [46 x i8] c"eq_scal: i = %d; len = %d; invalid row length\00"
@.str.2 = [46 x i8] c"eq_scal: i = %d; j = %d; invalid column index\00"
@.str.3 = [49 x i8] c"eq_scal: j = %d; len = %d; invalid column length\00"
@.str.4 = [43 x i8] c"eq_scal: i = %d; j = %d; invalid row index\00"
define void @eq_scal(i32 %0, i32 %1, i8* %2, i32 (i8*, i32, i32*, double*)* %3, double* %4, double* %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32 (i8*, i32, i32*, double*)*
%12 = alloca double*
%13 = alloca double*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32*
%21 = alloca double
%22 = alloca double
%23 = alloca double*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i32 (i8*, i32, i32*, double*)* %3, i32 (i8*, i32, i32*, double*)** %11
store double* %4, double** %12
store double* %5, double** %13
store i32 %6, i32* %14
%24 = load i32, i32* %8
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %7
%27 = load i32, i32* %9
%28 = icmp sgt i32 %27, 0
br i1 %28, label %33, label %29
29: ; preds = %26, %7
%30 = load i32, i32* %8
%31 = load i32, i32* %9
%32 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %30, i32 %31)
br label %33
33: ; preds = %29, %26
%34 = load i32, i32* %8
%35 = load i32, i32* %9
%36 = icmp sge i32 %34, %35
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = load i32, i32* %8
br label %41
39: ; preds = %33
%40 = load i32, i32* %9
br label %41
41: ; preds = %39, %37
%42 = phi i32 [ %38, %37 ], [ %40, %39 ]
%43 = add nsw i32 1, %42
%44 = call i32 (i32, i64, ...) bitcast (i32 (...)* @glp_lib_ucalloc to i32 (i32, i64, ...)*)(i32 %43, i64 4)
%45 = sext i32 %44 to i64
%46 = inttoptr i64 %45 to i32*
store i32* %46, i32** %20
%47 = load i32, i32* %8
%48 = load i32, i32* %9
%49 = icmp sge i32 %47, %48
br i1 %49, label %50, label %52
50: ; preds = %41
%51 = load i32, i32* %8
br label %54
52: ; preds = %41
%53 = load i32, i32* %9
br label %54
54: ; preds = %52, %50
%55 = phi i32 [ %51, %50 ], [ %53, %52 ]
%56 = add nsw i32 1, %55
%57 = call i32 (i32, i64, ...) bitcast (i32 (...)* @glp_lib_ucalloc to i32 (i32, i64, ...)*)(i32 %56, i64 8)
%58 = sext i32 %57 to i64
%59 = inttoptr i64 %58 to double*
store double* %59, double** %23
store i32 0, i32* %19
br label %60
60: ; preds = %243, %54
%61 = load i32, i32* %19
%62 = icmp sle i32 %61, 1
br i1 %62, label %63, label %246
63: ; preds = %60
%64 = load i32, i32* %14
%65 = load i32, i32* %19
%66 = icmp eq i32 %64, %65
br i1 %66, label %67, label %154
67: ; preds = %63
store i32 1, i32* %15
br label %68
68: ; preds = %150, %67
%69 = load i32, i32* %15
%70 = load i32, i32* %8
%71 = icmp sle i32 %69, %70
br i1 %71, label %72, label %153
72: ; preds = %68
store double 0.000000e+00, double* %21
%73 = load i32 (i8*, i32, i32*, double*)*, i32 (i8*, i32, i32*, double*)** %11
%74 = load i8*, i8** %10
%75 = load i32, i32* %15
%76 = load i32*, i32** %20
%77 = load double*, double** %23
%78 = call i32 %73(i8* %74, i32 %75, i32* %76, double* %77)
store i32 %78, i32* %17
%79 = load i32, i32* %17
%80 = icmp sle i32 0, %79
br i1 %80, label %81, label %85
81: ; preds = %72
%82 = load i32, i32* %17
%83 = load i32, i32* %9
%84 = icmp sle i32 %82, %83
br i1 %84, label %89, label %85
85: ; preds = %81, %72
%86 = load i32, i32* %15
%87 = load i32, i32* %17
%88 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %86, i32 %87)
br label %89
89: ; preds = %85, %81
store i32 1, i32* %18
br label %90
90: ; preds = %135, %89
%91 = load i32, i32* %18
%92 = load i32, i32* %17
%93 = icmp sle i32 %91, %92
br i1 %93, label %94, label %138
94: ; preds = %90
%95 = load i32*, i32** %20
%96 = load i32, i32* %18
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %95, i64 %97
%99 = load i32, i32* %98
store i32 %99, i32* %16
%100 = load i32, i32* %16
%101 = icmp sle i32 1, %100
br i1 %101, label %102, label %106
102: ; preds = %94
%103 = load i32, i32* %16
%104 = load i32, i32* %9
%105 = icmp sle i32 %103, %104
br i1 %105, label %110, label %106
106: ; preds = %102, %94
%107 = load i32, i32* %15
%108 = load i32, i32* %16
%109 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 %107, i32 %108)
br label %110
110: ; preds = %106, %102
%111 = load double*, double** %12
%112 = load i32, i32* %15
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds double, double* %111, i64 %113
%115 = load double, double* %114
%116 = load double*, double** %23
%117 = load i32, i32* %18
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %116, i64 %118
%120 = load double, double* %119
%121 = call double @llvm.fabs.f64(double %120)
%122 = fmul double %115, %121
%123 = load double*, double** %13
%124 = load i32, i32* %16
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double, double* %123, i64 %125
%127 = load double, double* %126
%128 = fmul double %122, %127
store double %128, double* %22
%129 = load double, double* %21
%130 = load double, double* %22
%131 = fcmp olt double %129, %130
br i1 %131, label %132, label %134
132: ; preds = %110
%133 = load double, double* %22
store double %133, double* %21
br label %134
134: ; preds = %132, %110
br label %135
135: ; preds = %134
%136 = load i32, i32* %18
%137 = add nsw i32 %136, 1
store i32 %137, i32* %18
br label %90
138: ; preds = %90
%139 = load double, double* %21
%140 = fcmp une double %139, 0.000000e+00
br i1 %140, label %141, label %149
141: ; preds = %138
%142 = load double, double* %21
%143 = load double*, double** %12
%144 = load i32, i32* %15
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %143, i64 %145
%147 = load double, double* %146
%148 = fdiv double %147, %142
store double %148, double* %146
br label %149
149: ; preds = %141, %138
br label %150
150: ; preds = %149
%151 = load i32, i32* %15
%152 = add nsw i32 %151, 1
store i32 %152, i32* %15
br label %68
153: ; preds = %68
br label %242
154: ; preds = %63
store i32 1, i32* %16
br label %155
155: ; preds = %238, %154
%156 = load i32, i32* %16
%157 = load i32, i32* %9
%158 = icmp sle i32 %156, %157
br i1 %158, label %159, label %241
159: ; preds = %155
store double 0.000000e+00, double* %21
%160 = load i32 (i8*, i32, i32*, double*)*, i32 (i8*, i32, i32*, double*)** %11
%161 = load i8*, i8** %10
%162 = load i32, i32* %16
%163 = sub nsw i32 0, %162
%164 = load i32*, i32** %20
%165 = load double*, double** %23
%166 = call i32 %160(i8* %161, i32 %163, i32* %164, double* %165)
store i32 %166, i32* %17
%167 = load i32, i32* %17
%168 = icmp sle i32 0, %167
br i1 %168, label %169, label %173
169: ; preds = %159
%170 = load i32, i32* %17
%171 = load i32, i32* %8
%172 = icmp sle i32 %170, %171
br i1 %172, label %177, label %173
173: ; preds = %169, %159
%174 = load i32, i32* %16
%175 = load i32, i32* %17
%176 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0), i32 %174, i32 %175)
br label %177
177: ; preds = %173, %169
store i32 1, i32* %18
br label %178
178: ; preds = %223, %177
%179 = load i32, i32* %18
%180 = load i32, i32* %17
%181 = icmp sle i32 %179, %180
br i1 %181, label %182, label %226
182: ; preds = %178
%183 = load i32*, i32** %20
%184 = load i32, i32* %18
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds i32, i32* %183, i64 %185
%187 = load i32, i32* %186
store i32 %187, i32* %15
%188 = load i32, i32* %15
%189 = icmp sle i32 1, %188
br i1 %189, label %190, label %194
190: ; preds = %182
%191 = load i32, i32* %15
%192 = load i32, i32* %8
%193 = icmp sle i32 %191, %192
br i1 %193, label %198, label %194
194: ; preds = %190, %182
%195 = load i32, i32* %15
%196 = load i32, i32* %16
%197 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i32 %195, i32 %196)
br label %198
198: ; preds = %194, %190
%199 = load double*, double** %12
%200 = load i32, i32* %15
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds double, double* %199, i64 %201
%203 = load double, double* %202
%204 = load double*, double** %23
%205 = load i32, i32* %18
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds double, double* %204, i64 %206
%208 = load double, double* %207
%209 = call double @llvm.fabs.f64(double %208)
%210 = fmul double %203, %209
%211 = load double*, double** %13
%212 = load i32, i32* %16
%213 = sext i32 %212 to i64
%214 = getelementptr inbounds double, double* %211, i64 %213
%215 = load double, double* %214
%216 = fmul double %210, %215
store double %216, double* %22
%217 = load double, double* %21
%218 = load double, double* %22
%219 = fcmp olt double %217, %218
br i1 %219, label %220, label %222
220: ; preds = %198
%221 = load double, double* %22
store double %221, double* %21
br label %222
222: ; preds = %220, %198
br label %223
223: ; preds = %222
%224 = load i32, i32* %18
%225 = add nsw i32 %224, 1
store i32 %225, i32* %18
br label %178
226: ; preds = %178
%227 = load double, double* %21
%228 = fcmp une double %227, 0.000000e+00
br i1 %228, label %229, label %237
229: ; preds = %226
%230 = load double, double* %21
%231 = load double*, double** %13
%232 = load i32, i32* %16
%233 = sext i32 %232 to i64
%234 = getelementptr inbounds double, double* %231, i64 %233
%235 = load double, double* %234
%236 = fdiv double %235, %230
store double %236, double* %234
br label %237
237: ; preds = %229, %226
br label %238
238: ; preds = %237
%239 = load i32, i32* %16
%240 = add nsw i32 %239, 1
store i32 %240, i32* %16
br label %155
241: ; preds = %155
br label %242
242: ; preds = %241, %153
br label %243
243: ; preds = %242
%244 = load i32, i32* %19
%245 = add nsw i32 %244, 1
store i32 %245, i32* %19
br label %60
246: ; preds = %60
%247 = load i32*, i32** %20
%248 = call i32 (i32*, ...) bitcast (i32 (...)* @glp_lib_ufree to i32 (i32*, ...)*)(i32* %247)
%249 = load double*, double** %23
%250 = call i32 (double*, ...) bitcast (i32 (...)* @glp_lib_ufree to i32 (double*, ...)*)(double* %249)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"eq_scal: m = %d; n = %d; invalid parameters\00"
@.str.1 = [46 x i8] c"eq_scal: i = %d; len = %d; invalid row length\00"
@.str.2 = [46 x i8] c"eq_scal: i = %d; j = %d; invalid column index\00"
@.str.3 = [49 x i8] c"eq_scal: j = %d; len = %d; invalid column length\00"
@.str.4 = [43 x i8] c"eq_scal: i = %d; j = %d; invalid row index\00"
define void @eq_scal(i32 %0, i32 %1, i8* %2, i32 (i8*, i32, i32*, double*)* nocapture %3, double* nocapture %4, double* nocapture %5, i32 %6) {
%8 = icmp sgt i32 %0, 0
%9 = icmp sgt i32 %1, 0
%10 = and i1 %8, %9
br i1 %10, label %13, label %11
11: ; preds = %7
%12 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
br label %13
13: ; preds = %7, %11
%14 = icmp slt i32 %0, %1
%15 = select i1 %14, i32 %1, i32 %0
%16 = add nsw i32 %15, 1
%17 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @glp_lib_ucalloc to i32 (i32, i64, ...)*)(i32 %16, i64 4)
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
%20 = tail call i32 (i32, i64, ...) bitcast (i32 (...)* @glp_lib_ucalloc to i32 (i32, i64, ...)*)(i32 %16, i64 8)
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to double*
%23 = icmp slt i32 %1, 1
%24 = icmp slt i32 %0, 1
%25 = add i32 %1, 1
%26 = add i32 %0, 1
%27 = zext i32 %25 to i64
%28 = zext i32 %26 to i64
br label %29
29: ; preds = %13, %134
%30 = phi i1 [ true, %13 ], [ false, %134 ]
%31 = phi i32 [ 0, %13 ], [ 1, %134 ]
%32 = icmp eq i32 %31, %6
br i1 %32, label %34, label %33
33: ; preds = %29
br i1 %23, label %134, label %83
34: ; preds = %29
br i1 %24, label %134, label %35
35: ; preds = %34, %80
%36 = phi i64 [ %81, %80 ], [ 1, %34 ]
%37 = trunc i64 %36 to i32
%38 = tail call i32 %3(i8* %2, i32 %37, i32* %19, double* %22)
%39 = icmp slt i32 %38, 0
%40 = icmp sgt i32 %38, %1
%41 = or i1 %39, %40
br i1 %41, label %42, label %44
42: ; preds = %35
%43 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i32 %37, i32 %38)
br label %44
44: ; preds = %35, %42
%45 = icmp slt i32 %38, 1
br i1 %45, label %80, label %46
46: ; preds = %44
%47 = getelementptr inbounds double, double* %4, i64 %36
%48 = add nuw i32 %38, 1
%49 = zext i32 %48 to i64
br label %50
50: ; preds = %46, %60
%51 = phi i64 [ 1, %46 ], [ %72, %60 ]
%52 = phi double [ 0.000000e+00, %46 ], [ %71, %60 ]
%53 = getelementptr inbounds i32, i32* %19, i64 %51
%54 = load i32, i32* %53
%55 = icmp slt i32 %54, 1
%56 = icmp sgt i32 %54, %1
%57 = or i1 %55, %56
br i1 %57, label %58, label %60
58: ; preds = %50
%59 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i32 %37, i32 %54)
br label %60
60: ; preds = %50, %58
%61 = load double, double* %47
%62 = getelementptr inbounds double, double* %22, i64 %51
%63 = load double, double* %62
%64 = tail call double @llvm.fabs.f64(double %63)
%65 = fmul double %61, %64
%66 = sext i32 %54 to i64
%67 = getelementptr inbounds double, double* %5, i64 %66
%68 = load double, double* %67
%69 = fmul double %68, %65
%70 = fcmp olt double %52, %69
%71 = select i1 %70, double %69, double %52
%72 = add nuw nsw i64 %51, 1
%73 = icmp eq i64 %72, %49
br i1 %73, label %74, label %50
74: ; preds = %60
%75 = fcmp une double %71, 0.000000e+00
br i1 %75, label %76, label %80
76: ; preds = %74
%77 = getelementptr inbounds double, double* %4, i64 %36
%78 = load double, double* %77
%79 = fdiv double %78, %71
store double %79, double* %77
br label %80
80: ; preds = %44, %74, %76
%81 = add nuw nsw i64 %36, 1
%82 = icmp eq i64 %81, %28
br i1 %82, label %134, label %35
83: ; preds = %33, %131
%84 = phi i64 [ %132, %131 ], [ 1, %33 ]
%85 = trunc i64 %84 to i32
%86 = sub i32 0, %85
%87 = tail call i32 %3(i8* %2, i32 %86, i32* %19, double* %22)
%88 = icmp slt i32 %87, 0
%89 = icmp sgt i32 %87, %0
%90 = or i1 %88, %89
br i1 %90, label %91, label %94
91: ; preds = %83
%92 = trunc i64 %84 to i32
%93 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0), i32 %92, i32 %87)
br label %94
94: ; preds = %83, %91
%95 = icmp slt i32 %87, 1
br i1 %95, label %131, label %96
96: ; preds = %94
%97 = getelementptr inbounds double, double* %5, i64 %84
%98 = add nuw i32 %87, 1
%99 = zext i32 %98 to i64
%100 = trunc i64 %84 to i32
br label %101
101: ; preds = %96, %111
%102 = phi i64 [ 1, %96 ], [ %123, %111 ]
%103 = phi double [ 0.000000e+00, %96 ], [ %122, %111 ]
%104 = getelementptr inbounds i32, i32* %19, i64 %102
%105 = load i32, i32* %104
%106 = icmp slt i32 %105, 1
%107 = icmp sgt i32 %105, %0
%108 = or i1 %106, %107
br i1 %108, label %109, label %111
109: ; preds = %101
%110 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @glp_lib_fault to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.4, i64 0, i64 0), i32 %105, i32 %100)
br label %111
111: ; preds = %101, %109
%112 = sext i32 %105 to i64
%113 = getelementptr inbounds double, double* %4, i64 %112
%114 = load double, double* %113
%115 = getelementptr inbounds double, double* %22, i64 %102
%116 = load double, double* %115
%117 = tail call double @llvm.fabs.f64(double %116)
%118 = fmul double %114, %117
%119 = load double, double* %97
%120 = fmul double %119, %118
%121 = fcmp olt double %103, %120
%122 = select i1 %121, double %120, double %103
%123 = add nuw nsw i64 %102, 1
%124 = icmp eq i64 %123, %99
br i1 %124, label %125, label %101
125: ; preds = %111
%126 = fcmp une double %122, 0.000000e+00
br i1 %126, label %127, label %131
127: ; preds = %125
%128 = getelementptr inbounds double, double* %5, i64 %84
%129 = load double, double* %128
%130 = fdiv double %129, %122
store double %130, double* %128
br label %131
131: ; preds = %94, %125, %127
%132 = add nuw nsw i64 %84, 1
%133 = icmp eq i64 %132, %27
br i1 %133, label %134, label %83
134: ; preds = %131, %80, %33, %34
br i1 %30, label %29, label %135
135: ; preds = %134
%136 = tail call i32 (i32*, ...) bitcast (i32 (...)* @glp_lib_ufree to i32 (i32*, ...)*)(i32* %19)
%137 = tail call i32 (double*, ...) bitcast (i32 (...)* @glp_lib_ufree to i32 (double*, ...)*)(double* %22)
ret void
}