#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 */
float **convert_matrix(float *, int, int, int, int);
int /*<<< orphan*/ free_convert_matrix(float **, int, int, int, int);
int /*<<< orphan*/ free_ivector(int *, int, int);
int /*<<< orphan*/ free_matrix(float **, int, int, int, int);
int /*<<< orphan*/ free_vector(float *, int, int);
int *ivector(int, int);
int /*<<< orphan*/ lubksb(float **, int, int *, float *);
int /*<<< orphan*/ ludcmp(float **, int, int *, float *);
float **matrix(int, int, int, int);
int /*<<< orphan*/ mprove(float **, float **, int, int *, float *, float *);
int /*<<< orphan*/ printf(char *, ...);
double ran3(long *);
float *vector(int, int);
int main(void) {
  int i, j, *indx;
  long idum = (-13);
  float d, *x, **a, **aa;
  static float ainit[5][5] = {1.0, 2.0, 3.0, 4.0, 5.0, 2.0, 3.0, 4.0, 5.0,
                              1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 4.0, 5.0, 1.0,
                              2.0, 3.0, 5.0, 1.0, 2.0, 3.0, 4.0};
  static float b[5 + 1] = {0.0, 1.0, 1.0, 1.0, 1.0, 1.0};
  indx = ivector(1, 5);
  x = vector(1, 5);
  a = convert_matrix(&ainit[0][0], 1, 5, 1, 5);
  aa = matrix(1, 5, 1, 5);
  for (i = 1; i <= 5; i++) {
    x[i] = b[i];
    for (j = 1; j <= 5; j++)
      aa[i][j] = a[i][j];
  }
  ludcmp(aa, 5, indx, &d);
  lubksb(aa, 5, indx, x);
  printf("\nSolution vector for the equations:\n");
  for (i = 1; i <= 5; i++)
    printf("%12.6f", x[i]);
  printf("\n");
  for (i = 1; i <= 5; i++)
    x[i] *= (1.0 + 0.2 * ran3(&idum));
  printf("\nSolution vector with noise added:\n");
  for (i = 1; i <= 5; i++)
    printf("%12.6f", x[i]);
  printf("\n");
  mprove(a, aa, 5, indx, b, x);
  printf("\nSolution vector recovered by mprove:\n");
  for (i = 1; i <= 5; i++)
    printf("%12.6f", x[i]);
  printf("\n");
  free_matrix(aa, 1, 5, 1, 5);
  free_convert_matrix(a, 1, 5, 1, 5);
  free_vector(x, 1, 5);
  free_ivector(indx, 1, 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0xfffffffffffffff3,-0x20(%rbp)
ff
mov    $0x1,%edi
mov    $0x5,%esi
call   10e0 <ivector@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
mov    $0x5,%esi
call   10a0 <vector@plt>
mov    %rax,-0x30(%rbp)
lea    0x2e7c(%rip),%rdi
mov    $0x1,%ecx
mov    $0x5,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   10f0 <convert_matrix@plt>
mov    %rax,-0x38(%rbp)
mov    $0x1,%edx
mov    $0x5,%ecx
mov    %edx,%edi
mov    %ecx,%esi
call   1090 <matrix@plt>
mov    %rax,-0x40(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     12ce <main+0xfe>
movslq -0x8(%rbp),%rcx
lea    0x2ea0(%rip),%rax
movss  (%rax,%rcx,4),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
movl   $0x1,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jg     12bb <main+0xeb>
mov    -0x38(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x8(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1279 <main+0xa9>
jmp    12c0 <main+0xf0>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    124b <main+0x7b>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x5,%esi
lea    -0x24(%rbp),%rcx
call   1030 <ludcmp@plt>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    $0x5,%esi
call   1080 <lubksb@plt>
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     1346 <main+0x176>
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd04(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    130f <main+0x13f>
lea    0xd11(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     13b5 <main+0x1e5>
lea    -0x20(%rbp),%rdi
call   10d0 <ran3@plt>
movaps %xmm0,%xmm1
movsd  0xc87(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xc83(%rip),%xmm0
addsd  %xmm0,%xmm1
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    135b <main+0x18b>
lea    0xc80(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     1401 <main+0x231>
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc49(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    13ca <main+0x1fa>
lea    0xc56(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x30(%rbp),%r9
mov    $0x5,%edx
lea    0x2cd5(%rip),%r8
call   10b0 <mprove@plt>
lea    0xc29(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     147c <main+0x2ac>
mov    -0x30(%rbp),%rax
movslq -0x8(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbce(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1445 <main+0x275>
lea    0xbdb(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x40(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x5,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1050 <free_matrix@plt>
mov    -0x38(%rbp),%rdi
mov    $0x1,%ecx
mov    $0x5,%r8d
mov    %ecx,%esi
mov    %r8d,%edx
call   1040 <free_convert_matrix@plt>
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1070 <free_vector@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   10c0 <free_ivector@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movq   $0xfffffffffffffff3,0x8(%rsp)
ff ff
mov    $0x1,%edi
mov    $0x5,%esi
call   1100 <ivector@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    $0x5,%esi
call   10c0 <vector@plt>
mov    %rax,%rbx
lea    0x2e6e(%rip),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
mov    $0x1,%ecx
mov    $0x5,%r8d
call   1110 <convert_matrix@plt>
mov    %rax,%r15
mov    $0x1,%edi
mov    $0x5,%esi
mov    $0x1,%edx
mov    $0x5,%ecx
call   10b0 <matrix@plt>
mov    %rax,%r12
movss  0x2ea1(%rip),%xmm0
movss  %xmm0,0x4(%rbx)
mov    0x8(%r15),%rax
mov    0x8(%r12),%rcx
movss  0x4(%rax),%xmm0
movss  %xmm0,0x4(%rcx)
movss  0x8(%rax),%xmm0
movss  %xmm0,0x8(%rcx)
movss  0xc(%rax),%xmm0
movss  %xmm0,0xc(%rcx)
movss  0x10(%rax),%xmm0
movss  %xmm0,0x10(%rcx)
movss  0x14(%rax),%xmm0
movss  %xmm0,0x14(%rcx)
movss  0x2e5d(%rip),%xmm0
movss  %xmm0,0x8(%rbx)
mov    0x10(%r15),%rax
mov    0x10(%r12),%rcx
movss  0x4(%rax),%xmm0
movss  %xmm0,0x4(%rcx)
movss  0x8(%rax),%xmm0
movss  %xmm0,0x8(%rcx)
movss  0xc(%rax),%xmm0
movss  %xmm0,0xc(%rcx)
movss  0x10(%rax),%xmm0
movss  %xmm0,0x10(%rcx)
movss  0x14(%rax),%xmm0
movss  %xmm0,0x14(%rcx)
movss  0x2e19(%rip),%xmm0
movss  %xmm0,0xc(%rbx)
mov    0x18(%r15),%rax
mov    0x18(%r12),%rcx
movss  0x4(%rax),%xmm0
movss  %xmm0,0x4(%rcx)
movss  0x8(%rax),%xmm0
movss  %xmm0,0x8(%rcx)
movss  0xc(%rax),%xmm0
movss  %xmm0,0xc(%rcx)
movss  0x10(%rax),%xmm0
movss  %xmm0,0x10(%rcx)
movss  0x14(%rax),%xmm0
movss  %xmm0,0x14(%rcx)
movss  0x2dd5(%rip),%xmm0
movss  %xmm0,0x10(%rbx)
mov    0x20(%r15),%rax
mov    0x20(%r12),%rcx
movss  0x4(%rax),%xmm0
movss  %xmm0,0x4(%rcx)
movss  0x8(%rax),%xmm0
movss  %xmm0,0x8(%rcx)
movss  0xc(%rax),%xmm0
movss  %xmm0,0xc(%rcx)
movss  0x10(%rax),%xmm0
movss  %xmm0,0x10(%rcx)
movss  0x14(%rax),%xmm0
movss  %xmm0,0x14(%rcx)
movss  0x2d91(%rip),%xmm0
movss  %xmm0,0x14(%rbx)
mov    0x28(%r15),%rax
mov    0x28(%r12),%rcx
movss  0x4(%rax),%xmm0
movss  %xmm0,0x4(%rcx)
movss  0x8(%rax),%xmm0
movss  %xmm0,0x8(%rcx)
movss  0xc(%rax),%xmm0
movss  %xmm0,0xc(%rcx)
movss  0x10(%rax),%xmm0
movss  %xmm0,0x10(%rcx)
movss  0x14(%rax),%xmm0
movss  %xmm0,0x14(%rcx)
lea    0x14(%rsp),%rcx
mov    %r12,%rdi
mov    $0x5,%esi
mov    %r14,%rdx
call   1040 <ludcmp@plt>
mov    %r12,%rdi
mov    $0x5,%esi
mov    %r14,%rdx
mov    %rbx,%rcx
call   10a0 <lubksb@plt>
lea    0xc15(%rip),%rdi
call   1060 <puts@plt>
movss  0x4(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xbf9(%rip),%rbp
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0xc(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0x10(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0x14(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x8(%rsp),%r13
mov    %r13,%rdi
call   10f0 <ran3@plt>
mulsd  0xb74(%rip),%xmm0
addsd  0xb74(%rip),%xmm0
movss  0x4(%rbx),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x4(%rbx)
mov    %r13,%rdi
call   10f0 <ran3@plt>
mulsd  0xb43(%rip),%xmm0
addsd  0xb43(%rip),%xmm0
movss  0x8(%rbx),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x8(%rbx)
mov    %r13,%rdi
call   10f0 <ran3@plt>
mulsd  0xb12(%rip),%xmm0
addsd  0xb12(%rip),%xmm0
movss  0xc(%rbx),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0xc(%rbx)
mov    %r13,%rdi
call   10f0 <ran3@plt>
mulsd  0xae1(%rip),%xmm0
addsd  0xae1(%rip),%xmm0
movss  0x10(%rbx),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x10(%rbx)
mov    %r13,%rdi
call   10f0 <ran3@plt>
mulsd  0xab0(%rip),%xmm0
addsd  0xab0(%rip),%xmm0
movss  0x14(%rbx),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x14(%rbx)
lea    0xac3(%rip),%rdi
call   1060 <puts@plt>
movss  0x4(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0xc(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0x10(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0x14(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x5,%edx
mov    %r14,%rcx
lea    0x2b15(%rip),%r8
mov    %rbx,%r9
call   10d0 <mprove@plt>
lea    0xa54(%rip),%rdi
call   1060 <puts@plt>
movss  0x4(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0xc(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0x10(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
movss  0x14(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r12,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
mov    $0x1,%ecx
mov    $0x5,%r8d
call   1070 <free_matrix@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
mov    $0x1,%ecx
mov    $0x5,%r8d
call   1050 <free_convert_matrix@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1090 <free_vector@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   10e0 <free_ivector@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@main.ainit = internal global [5 x [5 x float]] [[5 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00], [5 x float] [float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 1.000000e+00], [5 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00], [5 x float] [float 4.000000e+00, float 5.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00], [5 x float] [float 5.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00]]
@main.b = internal global [6 x float] [float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@.str = [37 x i8] c"\0ASolution vector for the equations:\0A\00"
@.str.1 = [7 x i8] c"%12.6f\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [36 x i8] c"\0ASolution vector with noise added:\0A\00"
@.str.4 = [39 x i8] c"\0ASolution vector recovered by mprove:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i64
%6 = alloca float
%7 = alloca float*
%8 = alloca float**
%9 = alloca float**
store i32 0, i32* %1
store i64 -13, i64* %5
%10 = call i32* @ivector(i32 1, i32 5)
store i32* %10, i32** %4
%11 = call float* @vector(i32 1, i32 5)
store float* %11, float** %7
%12 = call float** @convert_matrix(float* getelementptr inbounds ([5 x [5 x float]], [5 x [5 x float]]* @main.ainit, i64 0, i64 0, i64 0), i32 1, i32 5, i32 1, i32 5)
store float** %12, float*** %8
%13 = call float** @matrix(i32 1, i32 5, i32 1, i32 5)
store float** %13, float*** %9
store i32 1, i32* %2
br label %14
14: ; preds = %51, %0
%15 = load i32, i32* %2
%16 = icmp sle i32 %15, 5
br i1 %16, label %17, label %54
17: ; preds = %14
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [6 x float], [6 x float]* @main.b, i64 0, i64 %19
%21 = load float, float* %20
%22 = load float*, float** %7
%23 = load i32, i32* %2
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds float, float* %22, i64 %24
store float %21, float* %25
store i32 1, i32* %3
br label %26
26: ; preds = %47, %17
%27 = load i32, i32* %3
%28 = icmp sle i32 %27, 5
br i1 %28, label %29, label %50
29: ; preds = %26
%30 = load float**, float*** %8
%31 = load i32, i32* %2
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds float*, float** %30, i64 %32
%34 = load float*, float** %33
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds float, float* %34, i64 %36
%38 = load float, float* %37
%39 = load float**, float*** %9
%40 = load i32, i32* %2
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds float*, float** %39, i64 %41
%43 = load float*, float** %42
%44 = load i32, i32* %3
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds float, float* %43, i64 %45
store float %38, float* %46
br label %47
47: ; preds = %29
%48 = load i32, i32* %3
%49 = add nsw i32 %48, 1
store i32 %49, i32* %3
br label %26
50: ; preds = %26
br label %51
51: ; preds = %50
%52 = load i32, i32* %2
%53 = add nsw i32 %52, 1
store i32 %53, i32* %2
br label %14
54: ; preds = %14
%55 = load float**, float*** %9
%56 = load i32*, i32** %4
%57 = call i32 @ludcmp(float** %55, i32 5, i32* %56, float* %6)
%58 = load float**, float*** %9
%59 = load i32*, i32** %4
%60 = load float*, float** %7
%61 = call i32 @lubksb(float** %58, i32 5, i32* %59, float* %60)
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %2
br label %63
63: ; preds = %74, %54
%64 = load i32, i32* %2
%65 = icmp sle i32 %64, 5
br i1 %65, label %66, label %77
66: ; preds = %63
%67 = load float*, float** %7
%68 = load i32, i32* %2
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds float, float* %67, i64 %69
%71 = load float, float* %70
%72 = fpext float %71 to double
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %72)
br label %74
74: ; preds = %66
%75 = load i32, i32* %2
%76 = add nsw i32 %75, 1
store i32 %76, i32* %2
br label %63
77: ; preds = %63
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32 1, i32* %2
br label %79
79: ; preds = %93, %77
%80 = load i32, i32* %2
%81 = icmp sle i32 %80, 5
br i1 %81, label %82, label %96
82: ; preds = %79
%83 = call double @ran3(i64* %5)
%84 = call double @llvm.fmuladd.f64(double 2.000000e-01, double %83, double 1.000000e+00)
%85 = load float*, float** %7
%86 = load i32, i32* %2
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds float, float* %85, i64 %87
%89 = load float, float* %88
%90 = fpext float %89 to double
%91 = fmul double %90, %84
%92 = fptrunc double %91 to float
store float %92, float* %88
br label %93
93: ; preds = %82
%94 = load i32, i32* %2
%95 = add nsw i32 %94, 1
store i32 %95, i32* %2
br label %79
96: ; preds = %79
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0))
store i32 1, i32* %2
br label %98
98: ; preds = %109, %96
%99 = load i32, i32* %2
%100 = icmp sle i32 %99, 5
br i1 %100, label %101, label %112
101: ; preds = %98
%102 = load float*, float** %7
%103 = load i32, i32* %2
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds float, float* %102, i64 %104
%106 = load float, float* %105
%107 = fpext float %106 to double
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %107)
br label %109
109: ; preds = %101
%110 = load i32, i32* %2
%111 = add nsw i32 %110, 1
store i32 %111, i32* %2
br label %98
112: ; preds = %98
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%114 = load float**, float*** %8
%115 = load float**, float*** %9
%116 = load i32*, i32** %4
%117 = load float*, float** %7
%118 = call i32 @mprove(float** %114, float** %115, i32 5, i32* %116, float* getelementptr inbounds ([6 x float], [6 x float]* @main.b, i64 0, i64 0), float* %117)
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %2
br label %120
120: ; preds = %131, %112
%121 = load i32, i32* %2
%122 = icmp sle i32 %121, 5
br i1 %122, label %123, label %134
123: ; preds = %120
%124 = load float*, float** %7
%125 = load i32, i32* %2
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds float, float* %124, i64 %126
%128 = load float, float* %127
%129 = fpext float %128 to double
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %129)
br label %131
131: ; preds = %123
%132 = load i32, i32* %2
%133 = add nsw i32 %132, 1
store i32 %133, i32* %2
br label %120
134: ; preds = %120
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%136 = load float**, float*** %9
%137 = call i32 @free_matrix(float** %136, i32 1, i32 5, i32 1, i32 5)
%138 = load float**, float*** %8
%139 = call i32 @free_convert_matrix(float** %138, i32 1, i32 5, i32 1, i32 5)
%140 = load float*, float** %7
%141 = call i32 @free_vector(float* %140, i32 1, i32 5)
%142 = load i32*, i32** %4
%143 = call i32 @free_ivector(i32* %142, i32 1, i32 5)
ret i32 0
}

LLVM IR (-O2):
@main.ainit = internal global [5 x [5 x float]] [[5 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00], [5 x float] [float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 1.000000e+00], [5 x float] [float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00], [5 x float] [float 4.000000e+00, float 5.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00], [5 x float] [float 5.000000e+00, float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00]]
@main.b = internal global [6 x float] [float 0.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00]
@.str.1 = [7 x i8] c"%12.6f\00"
@str = [36 x i8] c"\0ASolution vector for the equations:\00"
@str.5 = [35 x i8] c"\0ASolution vector with noise added:\00"
@str.6 = [38 x i8] c"\0ASolution vector recovered by mprove:\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca float
%3 = bitcast i64* %1 to i8*
store i64 -13, i64* %1
%4 = bitcast float* %2 to i8*
%5 = tail call i32* @ivector(i32 1, i32 5)
%6 = tail call float* @vector(i32 1, i32 5)
%7 = tail call float** @convert_matrix(float* getelementptr inbounds ([5 x [5 x float]], [5 x [5 x float]]* @main.ainit, i64 0, i64 0, i64 0), i32 1, i32 5, i32 1, i32 5)
%8 = tail call float** @matrix(i32 1, i32 5, i32 1, i32 5)
%9 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @main.b, i64 0, i64 1)
%10 = getelementptr inbounds float, float* %6, i64 1
store float %9, float* %10
%11 = getelementptr inbounds float*, float** %7, i64 1
%12 = load float*, float** %11
%13 = getelementptr inbounds float*, float** %8, i64 1
%14 = load float*, float** %13
%15 = getelementptr inbounds float, float* %12, i64 1
%16 = load float, float* %15
%17 = getelementptr inbounds float, float* %14, i64 1
store float %16, float* %17
%18 = getelementptr inbounds float, float* %12, i64 2
%19 = load float, float* %18
%20 = getelementptr inbounds float, float* %14, i64 2
store float %19, float* %20
%21 = getelementptr inbounds float, float* %12, i64 3
%22 = load float, float* %21
%23 = getelementptr inbounds float, float* %14, i64 3
store float %22, float* %23
%24 = getelementptr inbounds float, float* %12, i64 4
%25 = load float, float* %24
%26 = getelementptr inbounds float, float* %14, i64 4
store float %25, float* %26
%27 = getelementptr inbounds float, float* %12, i64 5
%28 = load float, float* %27
%29 = getelementptr inbounds float, float* %14, i64 5
store float %28, float* %29
%30 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @main.b, i64 0, i64 2)
%31 = getelementptr inbounds float, float* %6, i64 2
store float %30, float* %31
%32 = getelementptr inbounds float*, float** %7, i64 2
%33 = load float*, float** %32
%34 = getelementptr inbounds float*, float** %8, i64 2
%35 = load float*, float** %34
%36 = getelementptr inbounds float, float* %33, i64 1
%37 = load float, float* %36
%38 = getelementptr inbounds float, float* %35, i64 1
store float %37, float* %38
%39 = getelementptr inbounds float, float* %33, i64 2
%40 = load float, float* %39
%41 = getelementptr inbounds float, float* %35, i64 2
store float %40, float* %41
%42 = getelementptr inbounds float, float* %33, i64 3
%43 = load float, float* %42
%44 = getelementptr inbounds float, float* %35, i64 3
store float %43, float* %44
%45 = getelementptr inbounds float, float* %33, i64 4
%46 = load float, float* %45
%47 = getelementptr inbounds float, float* %35, i64 4
store float %46, float* %47
%48 = getelementptr inbounds float, float* %33, i64 5
%49 = load float, float* %48
%50 = getelementptr inbounds float, float* %35, i64 5
store float %49, float* %50
%51 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @main.b, i64 0, i64 3)
%52 = getelementptr inbounds float, float* %6, i64 3
store float %51, float* %52
%53 = getelementptr inbounds float*, float** %7, i64 3
%54 = load float*, float** %53
%55 = getelementptr inbounds float*, float** %8, i64 3
%56 = load float*, float** %55
%57 = getelementptr inbounds float, float* %54, i64 1
%58 = load float, float* %57
%59 = getelementptr inbounds float, float* %56, i64 1
store float %58, float* %59
%60 = getelementptr inbounds float, float* %54, i64 2
%61 = load float, float* %60
%62 = getelementptr inbounds float, float* %56, i64 2
store float %61, float* %62
%63 = getelementptr inbounds float, float* %54, i64 3
%64 = load float, float* %63
%65 = getelementptr inbounds float, float* %56, i64 3
store float %64, float* %65
%66 = getelementptr inbounds float, float* %54, i64 4
%67 = load float, float* %66
%68 = getelementptr inbounds float, float* %56, i64 4
store float %67, float* %68
%69 = getelementptr inbounds float, float* %54, i64 5
%70 = load float, float* %69
%71 = getelementptr inbounds float, float* %56, i64 5
store float %70, float* %71
%72 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @main.b, i64 0, i64 4)
%73 = getelementptr inbounds float, float* %6, i64 4
store float %72, float* %73
%74 = getelementptr inbounds float*, float** %7, i64 4
%75 = load float*, float** %74
%76 = getelementptr inbounds float*, float** %8, i64 4
%77 = load float*, float** %76
%78 = getelementptr inbounds float, float* %75, i64 1
%79 = load float, float* %78
%80 = getelementptr inbounds float, float* %77, i64 1
store float %79, float* %80
%81 = getelementptr inbounds float, float* %75, i64 2
%82 = load float, float* %81
%83 = getelementptr inbounds float, float* %77, i64 2
store float %82, float* %83
%84 = getelementptr inbounds float, float* %75, i64 3
%85 = load float, float* %84
%86 = getelementptr inbounds float, float* %77, i64 3
store float %85, float* %86
%87 = getelementptr inbounds float, float* %75, i64 4
%88 = load float, float* %87
%89 = getelementptr inbounds float, float* %77, i64 4
store float %88, float* %89
%90 = getelementptr inbounds float, float* %75, i64 5
%91 = load float, float* %90
%92 = getelementptr inbounds float, float* %77, i64 5
store float %91, float* %92
%93 = load float, float* getelementptr inbounds ([6 x float], [6 x float]* @main.b, i64 0, i64 5)
%94 = getelementptr inbounds float, float* %6, i64 5
store float %93, float* %94
%95 = getelementptr inbounds float*, float** %7, i64 5
%96 = load float*, float** %95
%97 = getelementptr inbounds float*, float** %8, i64 5
%98 = load float*, float** %97
%99 = getelementptr inbounds float, float* %96, i64 1
%100 = load float, float* %99
%101 = getelementptr inbounds float, float* %98, i64 1
store float %100, float* %101
%102 = getelementptr inbounds float, float* %96, i64 2
%103 = load float, float* %102
%104 = getelementptr inbounds float, float* %98, i64 2
store float %103, float* %104
%105 = getelementptr inbounds float, float* %96, i64 3
%106 = load float, float* %105
%107 = getelementptr inbounds float, float* %98, i64 3
store float %106, float* %107
%108 = getelementptr inbounds float, float* %96, i64 4
%109 = load float, float* %108
%110 = getelementptr inbounds float, float* %98, i64 4
store float %109, float* %110
%111 = getelementptr inbounds float, float* %96, i64 5
%112 = load float, float* %111
%113 = getelementptr inbounds float, float* %98, i64 5
store float %112, float* %113
%114 = call i32 @ludcmp(float** %8, i32 5, i32* %5, float* %2)
%115 = call i32 @lubksb(float** %8, i32 5, i32* %5, float* %6)
%116 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%117 = load float, float* %10
%118 = fpext float %117 to double
%119 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %118)
%120 = load float, float* %31
%121 = fpext float %120 to double
%122 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %121)
%123 = load float, float* %52
%124 = fpext float %123 to double
%125 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %124)
%126 = load float, float* %73
%127 = fpext float %126 to double
%128 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %127)
%129 = load float, float* %94
%130 = fpext float %129 to double
%131 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %130)
%132 = call i32 @putchar(i32 10)
%133 = call double @ran3(i64* %1)
%134 = call double @llvm.fmuladd.f64(double %133, double 2.000000e-01, double 1.000000e+00)
%135 = load float, float* %10
%136 = fpext float %135 to double
%137 = fmul double %134, %136
%138 = fptrunc double %137 to float
store float %138, float* %10
%139 = call double @ran3(i64* %1)
%140 = call double @llvm.fmuladd.f64(double %139, double 2.000000e-01, double 1.000000e+00)
%141 = load float, float* %31
%142 = fpext float %141 to double
%143 = fmul double %140, %142
%144 = fptrunc double %143 to float
store float %144, float* %31
%145 = call double @ran3(i64* %1)
%146 = call double @llvm.fmuladd.f64(double %145, double 2.000000e-01, double 1.000000e+00)
%147 = load float, float* %52
%148 = fpext float %147 to double
%149 = fmul double %146, %148
%150 = fptrunc double %149 to float
store float %150, float* %52
%151 = call double @ran3(i64* %1)
%152 = call double @llvm.fmuladd.f64(double %151, double 2.000000e-01, double 1.000000e+00)
%153 = load float, float* %73
%154 = fpext float %153 to double
%155 = fmul double %152, %154
%156 = fptrunc double %155 to float
store float %156, float* %73
%157 = call double @ran3(i64* %1)
%158 = call double @llvm.fmuladd.f64(double %157, double 2.000000e-01, double 1.000000e+00)
%159 = load float, float* %94
%160 = fpext float %159 to double
%161 = fmul double %158, %160
%162 = fptrunc double %161 to float
store float %162, float* %94
%163 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.5, i64 0, i64 0))
%164 = load float, float* %10
%165 = fpext float %164 to double
%166 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %165)
%167 = load float, float* %31
%168 = fpext float %167 to double
%169 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %168)
%170 = load float, float* %52
%171 = fpext float %170 to double
%172 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %171)
%173 = load float, float* %73
%174 = fpext float %173 to double
%175 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %174)
%176 = load float, float* %94
%177 = fpext float %176 to double
%178 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %177)
%179 = call i32 @putchar(i32 10)
%180 = call i32 @mprove(float** %7, float** %8, i32 5, i32* %5, float* getelementptr inbounds ([6 x float], [6 x float]* @main.b, i64 0, i64 0), float* %6)
%181 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.6, i64 0, i64 0))
%182 = load float, float* %10
%183 = fpext float %182 to double
%184 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %183)
%185 = load float, float* %31
%186 = fpext float %185 to double
%187 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %186)
%188 = load float, float* %52
%189 = fpext float %188 to double
%190 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %189)
%191 = load float, float* %73
%192 = fpext float %191 to double
%193 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %192)
%194 = load float, float* %94
%195 = fpext float %194 to double
%196 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %195)
%197 = call i32 @putchar(i32 10)
%198 = call i32 @free_matrix(float** %8, i32 1, i32 5, i32 1, i32 5)
%199 = call i32 @free_convert_matrix(float** %7, i32 1, i32 5, i32 1, i32 5)
%200 = call i32 @free_vector(float* %6, i32 1, i32 5)
%201 = call i32 @free_ivector(i32* %5, i32 1, i32 5)
ret i32 0
}