#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*/ exit(int);
double pow(double, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sparse(double *, int *, int *, int, int *, int *, double *,
                          int, int, double *, int *, int *, int);
int /*<<< orphan*/ sprnvc(int, int, double *, int *, int *, int *);
int /*<<< orphan*/ vecset(int, double *, int *, int *, int, double);
void makea(int n, int nz, double a[], int colidx[], int rowstr[], int nonzer,
           int firstrow, int lastrow, int firstcol, int lastcol, double rcond,
           int arow[], int acol[], double aelt[], double v[], int iv[],
           double shift) {
  int i, nnza, iouter, ivelt, ivelt1, irow, nzv;
  double size, ratio, scale;
  int jcol;
  size = 1.0;
  ratio = pow(rcond, (1.0 / (double)n));
  nnza = 0;
#pragma omp parallel for
  for (i = 1; i <= n; i++) {
    colidx[n + i] = 0;
  }
  for (iouter = 1; iouter <= n; iouter++) {
    nzv = nonzer;
    sprnvc(n, nzv, v, iv, &(colidx[0]), &(colidx[n]));
    vecset(n, v, iv, &nzv, iouter, 0.5);
    for (ivelt = 1; ivelt <= nzv; ivelt++) {
      jcol = iv[ivelt];
      if (jcol >= firstcol && jcol <= lastcol) {
        scale = size * v[ivelt];
        for (ivelt1 = 1; ivelt1 <= nzv; ivelt1++) {
          irow = iv[ivelt1];
          if (irow >= firstrow && irow <= lastrow) {
            nnza = nnza + 1;
            if (nnza > nz) {
              printf("Space for matrix elements exceeded in"
                     " makea\n");
              printf("nnza, nzmax = %d, %d\n", nnza, nz);
              printf("iouter = %d\n", iouter);
              exit(1);
            }
            acol[nnza] = jcol;
            arow[nnza] = irow;
            aelt[nnza] = v[ivelt1] * scale;
          }
        }
      }
    }
    size = size * ratio;
  }
  for (i = firstrow; i <= lastrow; i++) {
    if (i >= firstcol && i <= lastcol) {
      iouter = n + i;
      nnza = nnza + 1;
      if (nnza > nz) {
        printf("Space for matrix elements exceeded in makea\n");
        printf("nnza, nzmax = %d, %d\n", nnza, nz);
        printf("iouter = %d\n", iouter);
        exit(1);
      }
      acol[nnza] = i;
      arow[nnza] = i;
      aelt[nnza] = rcond - shift;
    }
  }
  sparse(a, colidx, rowstr, n, arow, acol, aelt, firstrow, lastrow, v, &(iv[0]),
         &(iv[n]), nnza);
}


x86 assembly (clang, -O0):
<makea>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xb0,%rsp
mov    0x50(%rbp),%rax
mov    0x48(%rbp),%rax
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x24(%rbp)
mov    %esi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9d,-0x44(%rbp)
movsd  %xmm0,-0x50(%rbp)
movsd  %xmm1,-0x58(%rbp)
movsd  0xe46(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
cvtsi2sdl -0x24(%rbp),%xmm2
movsd  0xe2f(%rip),%xmm1
divsd  %xmm2,%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x60(%rbp)
movl   $0x1,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     121e <makea+0xbe>
mov    -0x38(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    -0x5c(%rbp),%ecx
movslq %ecx,%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    11f0 <makea+0x90>
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     13f0 <makea+0x290>
mov    -0x44(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x74(%rbp),%esi
mov    0x48(%rbp),%rdx
mov    0x50(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    -0x38(%rbp),%r9
movslq -0x24(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r9
call   1050 <sprnvc@plt>
mov    -0x24(%rbp),%edi
mov    0x48(%rbp),%rsi
mov    0x50(%rbp),%rdx
mov    -0x64(%rbp),%r8d
lea    -0x74(%rbp),%rcx
movsd  0xd90(%rip),%xmm0
call   1030 <vecset@plt>
movl   $0x1,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x74(%rbp),%eax
jg     13d0 <makea+0x270>
mov    0x50(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x94(%rbp)
mov    -0x94(%rbp),%eax
cmp    0x20(%rbp),%eax
jl     13bd <makea+0x25d>
mov    -0x94(%rbp),%eax
cmp    0x28(%rbp),%eax
jg     13bd <makea+0x25d>
movsd  -0x80(%rbp),%xmm0
mov    0x48(%rbp),%rax
movslq -0x68(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movl   $0x1,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x74(%rbp),%eax
jg     13b8 <makea+0x258>
mov    0x50(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    0x10(%rbp),%eax
jl     13a5 <makea+0x245>
mov    -0x70(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     13a5 <makea+0x245>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    1364 <makea+0x204>
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x60(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xcfb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x64(%rbp),%esi
lea    0xd00(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x94(%rbp),%edx
mov    0x38(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x70(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    0x48(%rbp),%rax
movslq -0x6c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mov    0x40(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    13aa <makea+0x24a>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    12e0 <makea+0x180>
jmp    13bd <makea+0x25d>
jmp    13c2 <makea+0x262>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1284 <makea+0x124>
movsd  -0x80(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x80(%rbp)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1225 <makea+0xc5>
mov    0x10(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    0x18(%rbp),%eax
jg     14bb <makea+0x35b>
mov    -0x5c(%rbp),%eax
cmp    0x20(%rbp),%eax
jl     14a8 <makea+0x348>
mov    -0x5c(%rbp),%eax
cmp    0x28(%rbp),%eax
jg     14a8 <makea+0x348>
mov    -0x24(%rbp),%eax
add    -0x5c(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x28(%rbp),%eax
jle    1475 <makea+0x315>
lea    0xbd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x60(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xbea(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x64(%rbp),%esi
lea    0xbef(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    -0x5c(%rbp),%edx
mov    0x38(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x5c(%rbp),%edx
mov    0x30(%rbp),%rax
movslq -0x60(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movsd  -0x50(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
mov    0x40(%rbp),%rax
movslq -0x60(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    14ad <makea+0x34d>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    13f6 <makea+0x296>
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x40(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x30(%rbp),%r8
mov    0x38(%rbp),%r9
mov    0x40(%rbp),%r12
mov    0x10(%rbp),%r15d
mov    0x18(%rbp),%r14d
mov    0x48(%rbp),%rbx
mov    0x50(%rbp),%r11
mov    0x50(%rbp),%r10
movslq -0x24(%rbp),%rax
shl    $0x2,%rax
add    %rax,%r10
mov    -0x60(%rbp),%eax
mov    %r12,(%rsp)
mov    %r15d,0x8(%rsp)
mov    %r14d,0x10(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %eax,0x30(%rsp)
call   1060 <sparse@plt>
add    $0xb0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<makea>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
movsd  %xmm1,0x30(%rsp)
mov    %r9d,0x24(%rsp)
mov    %r8,0x48(%rsp)
mov    %rcx,%rbx
mov    %rdx,0x40(%rsp)
mov    %esi,0x10(%rsp)
mov    %edi,%ebp
mov    0xe0(%rsp),%r13
mov    0xa0(%rsp),%r12d
cvtsi2sd %edi,%xmm2
movsd  0xe38(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
divsd  %xmm2,%xmm1
movsd  %xmm0,0x38(%rsp)
call   1090 <pow@plt>
movsd  %xmm0,0x60(%rsp)
mov    %rbp,0x8(%rsp)
test   %ebp,%ebp
jle    1395 <makea+0x215>
mov    0x8(%rsp),%rcx
lea    0x1(%rcx),%eax
cltq
lea    (%rbx,%rax,4),%rdi
mov    %ecx,%r15d
lea    0x0(,%r15,4),%rdx
xor    %r14d,%r14d
xor    %esi,%esi
call   1060 <memset@plt>
lea    (%rbx,%r15,4),%rax
mov    %rax,0x58(%rsp)
mov    $0x1,%ebp
mov    0xd8(%rsp),%r10
mov    %rbx,0x50(%rsp)
jmp    1269 <makea+0xe9>
mov    %r14d,%r15d
mov    0xd8(%rsp),%r10
movsd  0x18(%rsp),%xmm2
mulsd  0x60(%rsp),%xmm2
movsd  %xmm2,0x18(%rsp)
mov    0x28(%rsp),%rcx
lea    0x1(%rcx),%eax
mov    %r15d,%r14d
cmp    0x8(%rsp),%ecx
mov    %eax,%ebp
mov    0x50(%rsp),%rbx
je     13a0 <makea+0x220>
mov    0x24(%rsp),%esi
mov    %esi,0x14(%rsp)
mov    0x8(%rsp),%r15
mov    %r15d,%edi
mov    %r10,%rdx
mov    %r13,%rcx
mov    %rbx,%r8
mov    0x58(%rsp),%r9
mov    %r10,%rbx
call   1070 <sprnvc@plt>
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
lea    0x14(%rsp),%rcx
mov    %rbp,0x28(%rsp)
mov    %ebp,%r8d
movsd  0xd5b(%rip),%xmm0
call   1040 <vecset@plt>
mov    0x14(%rsp),%eax
test   %eax,%eax
jle    1230 <makea+0xb0>
add    $0x1,%rax
mov    $0x1,%r8d
mov    0xd0(%rsp),%r9
mov    0x10(%rsp),%r11d
mov    0xd8(%rsp),%r10
movsd  0x18(%rsp),%xmm2
jmp    1303 <makea+0x183>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14d,%r15d
add    $0x1,%r8
mov    %r15d,%r14d
cmp    %rax,%r8
je     1241 <makea+0xc1>
mov    0x0(%r13,%r8,4),%edx
cmp    0xb0(%rsp),%edx
jl     12f0 <makea+0x170>
cmp    0xb8(%rsp),%edx
jg     12f0 <makea+0x170>
movsd  (%r10,%r8,8),%xmm0
mulsd  %xmm2,%xmm0
mov    $0x1,%esi
mov    0xa8(%rsp),%ebx
jmp    134f <makea+0x1cf>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14d,%r15d
add    $0x1,%rsi
mov    %r15d,%r14d
cmp    %rsi,%rax
je     12f3 <makea+0x173>
mov    0x0(%r13,%rsi,4),%edi
cmp    %r12d,%edi
jl     1340 <makea+0x1c0>
cmp    %ebx,%edi
jg     1340 <makea+0x1c0>
lea    0x1(%r14),%r15d
cmp    %r11d,%r14d
jge    148c <makea+0x30c>
movslq %r15d,%rbp
mov    0xc8(%rsp),%rcx
mov    %edx,(%rcx,%rbp,4)
mov    0xc0(%rsp),%rcx
mov    %edi,(%rcx,%rbp,4)
movsd  (%r10,%rsi,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r9,%rbp,8)
jmp    1343 <makea+0x1c3>
xor    %r15d,%r15d
mov    0xd8(%rsp),%r10
mov    %rbx,%rsi
mov    0xa8(%rsp),%ebx
mov    %rbx,%r11
cmp    %r11d,%r12d
jle    1411 <makea+0x291>
mov    %r15d,%r14d
mov    0xd0(%rsp),%rbx
mov    0x8(%rsp),%rcx
movslq %ecx,%rax
lea    0x0(,%rax,4),%rax
add    %r13,%rax
sub    $0x8,%rsp
mov    0x48(%rsp),%rdi
mov    0x50(%rsp),%rdx
mov    0xc8(%rsp),%r8
mov    0xd0(%rsp),%r9
push   %r14
push   %rax
push   %r13
push   %r10
push   %r11
push   %r12
push   %rbx
call   1080 <sparse@plt>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movsd  0x38(%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
lea    0x1(%r11),%ecx
mov    %r12d,%eax
mov    0xd0(%rsp),%rbx
mov    0x10(%rsp),%ebp
jmp    1451 <makea+0x2d1>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15d,%r14d
add    $0x1,%eax
mov    %r14d,%r15d
cmp    %eax,%ecx
je     13bd <makea+0x23d>
cmp    0xb0(%rsp),%eax
jl     1440 <makea+0x2c0>
cmp    0xb8(%rsp),%eax
jg     1440 <makea+0x2c0>
lea    0x1(%r15),%r14d
cmp    %ebp,%r15d
jge    14cb <makea+0x34b>
movslq %r14d,%rdx
mov    0xc8(%rsp),%rdi
mov    %eax,(%rdi,%rdx,4)
mov    0xc0(%rsp),%rdi
mov    %eax,(%rdi,%rdx,4)
movsd  %xmm0,(%rbx,%rdx,8)
jmp    1443 <makea+0x2c3>
lea    0xba0(%rip),%rdi
mov    %r11d,%ebx
call   1030 <puts@plt>
lea    0xb6e(%rip),%rdi
mov    %r15d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xb71(%rip),%rdi
mov    0x28(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>
mov    0x8(%rsp),%rbx
add    %eax,%ebx
lea    0xb5a(%rip),%rdi
call   1030 <puts@plt>
lea    0xb2b(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xb2e(%rip),%rdi
mov    %ebx,%esi
jmp    14ba <makea+0x33a>

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

LLVM IR (-O2):
@.str.1 = [22 x i8] c"nnza, nzmax = %d, %d\0A\00"
@.str.2 = [13 x i8] c"iouter = %d\0A\00"
@str.3 = [44 x i8] c"Space for matrix elements exceeded in makea\00"
define void @makea(i32 %0, i32 %1, double* %2, i32* %3, i32* %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, double %10, i32* %11, i32* %12, double* %13, double* %14, i32* %15, double %16) {
%18 = alloca i32
%19 = bitcast i32* %18 to i8*
%20 = sitofp i32 %0 to double
%21 = fdiv double 1.000000e+00, %20
%22 = tail call double @pow(double %10, double %21)
%23 = icmp slt i32 %0, 1
br i1 %23, label %33, label %24
24: ; preds = %17
%25 = add nuw i32 %0, 1
%26 = sext i32 %25 to i64
%27 = getelementptr i32, i32* %3, i64 %26
%28 = bitcast i32* %27 to i8*
%29 = zext i32 %0 to i64
%30 = shl nuw nsw i64 %29, 2
%31 = zext i32 %0 to i64
%32 = getelementptr inbounds i32, i32* %3, i64 %31
br label %38
33: ; preds = %93, %17
%34 = phi i32 [ 0, %17 ], [ %94, %93 ]
%35 = icmp sgt i32 %6, %7
br i1 %35, label %122, label %36
36: ; preds = %33
%37 = fsub double %10, %16
br label %98
38: ; preds = %24, %93
%39 = phi i32 [ 0, %24 ], [ %94, %93 ]
%40 = phi i32 [ 1, %24 ], [ %96, %93 ]
%41 = phi double [ 1.000000e+00, %24 ], [ %95, %93 ]
store i32 %5, i32* %18
%42 = call i32 @sprnvc(i32 %0, i32 %5, double* %14, i32* %15, i32* %3, i32* %32)
%43 = call i32 @vecset(i32 %0, double* %14, i32* %15, i32* %18, i32 %40, double 5.000000e-01)
%44 = load i32, i32* %18
%45 = icmp slt i32 %44, 1
br i1 %45, label %93, label %46
46: ; preds = %38
%47 = add nuw i32 %44, 1
%48 = zext i32 %47 to i64
br label %49
49: ; preds = %46, %89
%50 = phi i64 [ 1, %46 ], [ %91, %89 ]
%51 = phi i32 [ %39, %46 ], [ %90, %89 ]
%52 = getelementptr inbounds i32, i32* %15, i64 %50
%53 = load i32, i32* %52
%54 = icmp slt i32 %53, %8
%55 = icmp sgt i32 %53, %9
%56 = or i1 %54, %55
br i1 %56, label %89, label %57
57: ; preds = %49
%58 = getelementptr inbounds double, double* %14, i64 %50
%59 = load double, double* %58
%60 = fmul double %41, %59
br label %61
61: ; preds = %57, %85
%62 = phi i64 [ 1, %57 ], [ %87, %85 ]
%63 = phi i32 [ %51, %57 ], [ %86, %85 ]
%64 = getelementptr inbounds i32, i32* %15, i64 %62
%65 = load i32, i32* %64
%66 = icmp slt i32 %65, %6
%67 = icmp sgt i32 %65, %7
%68 = or i1 %66, %67
br i1 %68, label %85, label %69
69: ; preds = %61
%70 = add nsw i32 %63, 1
%71 = icmp slt i32 %63, %1
br i1 %71, label %77, label %72
72: ; preds = %69
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.3, i64 0, i64 0))
%74 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %70, i32 %1)
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %40)
%76 = call i32 @exit(i32 1)
unreachable
77: ; preds = %69
%78 = sext i32 %70 to i64
%79 = getelementptr inbounds i32, i32* %12, i64 %78
store i32 %53, i32* %79
%80 = getelementptr inbounds i32, i32* %11, i64 %78
store i32 %65, i32* %80
%81 = getelementptr inbounds double, double* %14, i64 %62
%82 = load double, double* %81
%83 = fmul double %60, %82
%84 = getelementptr inbounds double, double* %13, i64 %78
store double %83, double* %84
br label %85
85: ; preds = %61, %77
%86 = phi i32 [ %70, %77 ], [ %63, %61 ]
%87 = add nuw nsw i64 %62, 1
%88 = icmp eq i64 %87, %48
br i1 %88, label %89, label %61
89: ; preds = %85, %49
%90 = phi i32 [ %51, %49 ], [ %86, %85 ]
%91 = add nuw nsw i64 %50, 1
%92 = icmp eq i64 %91, %48
br i1 %92, label %93, label %49
93: ; preds = %89, %38
%94 = phi i32 [ %39, %38 ], [ %90, %89 ]
%95 = fmul double %22, %41
%96 = add nuw i32 %40, 1
%97 = icmp eq i32 %40, %0
br i1 %97, label %33, label %38
98: ; preds = %36, %118
%99 = phi i32 [ %6, %36 ], [ %120, %118 ]
%100 = phi i32 [ %34, %36 ], [ %119, %118 ]
%101 = icmp slt i32 %99, %8
%102 = icmp sgt i32 %99, %9
%103 = or i1 %101, %102
br i1 %103, label %118, label %104
104: ; preds = %98
%105 = add nsw i32 %100, 1
%106 = icmp slt i32 %100, %1
br i1 %106, label %113, label %107
107: ; preds = %104
%108 = add nsw i32 %99, %0
%109 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.3, i64 0, i64 0))
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %105, i32 %1)
%111 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 %108)
%112 = call i32 @exit(i32 1)
unreachable
113: ; preds = %104
%114 = sext i32 %105 to i64
%115 = getelementptr inbounds i32, i32* %12, i64 %114
store i32 %99, i32* %115
%116 = getelementptr inbounds i32, i32* %11, i64 %114
store i32 %99, i32* %116
%117 = getelementptr inbounds double, double* %13, i64 %114
store double %37, double* %117
br label %118
118: ; preds = %98, %113
%119 = phi i32 [ %105, %113 ], [ %100, %98 ]
%120 = add i32 %99, 1
%121 = icmp eq i32 %99, %7
br i1 %121, label %122, label %98
122: ; preds = %118, %33
%123 = phi i32 [ %34, %33 ], [ %119, %118 ]
%124 = sext i32 %0 to i64
%125 = getelementptr inbounds i32, i32* %15, i64 %124
%126 = call i32 @sparse(double* %2, i32* %3, i32* %4, i32 %0, i32* %11, i32* %12, double* %13, i32 %6, i32 %7, double* %14, i32* %15, i32* %125, i32 %123)
ret void
}