#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 */
double *dvector(int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free_dvector(double *, int, int);
int /*<<< orphan*/ ldl_dcmp(double **, int, double *, double *, double *, int,
                            int, int *);
int /*<<< orphan*/ ldl_mprove(double **, int, double *, double *, double *,
                              double *, int *);
int /*<<< orphan*/ stdout;
void invAB(double **A, double **B, int n, int m, double **AiB, int *ok,
           int verbose) {
  double *diag, *b, *x, error;
  int i, j, k;
  diag = dvector(1, n);
  x = dvector(1, n);
  b = dvector(1, n);
  for (i = 1; i <= n; i++)
    diag[i] = x[i] = 0.0;
  ldl_dcmp(A, n, diag, b, x, 1, 0, ok);
  for (j = 1; j <= m; j++) {
    for (k = 1; k <= n; k++)
      b[k] = B[k][j];
    ldl_dcmp(A, n, diag, b, x, 0, 1, ok);
    if (verbose)
      fprintf(stdout, "    LDL' RMS matrix precision:");
    error = *ok = 1;
    do {
      ldl_mprove(A, n, diag, b, x, &error, ok);
      if (verbose)
        fprintf(stdout, "%9.2e", error);
    } while (*ok);
    if (verbose)
      fprintf(stdout, "\n");
    for (i = 1; i <= n; i++)
      AiB[i][j] = x[i];
  }
  free_dvector(diag, 1, n);
  free_dvector(x, 1, n);
  free_dvector(b, 1, n);
}


x86 assembly (clang, -O0):
<invAB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x14(%rbp),%esi
mov    $0x1,%edi
call   1060 <dvector@plt>
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%esi
mov    $0x1,%edi
call   1060 <dvector@plt>
mov    %rax,-0x40(%rbp)
mov    -0x14(%rbp),%esi
mov    $0x1,%edi
call   1060 <dvector@plt>
mov    %rax,-0x38(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11e5 <invAB+0x95>
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
movslq -0x4c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11ab <invAB+0x5b>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x28(%rbp),%rax
mov    $0x1,%r9d
xor    %r10d,%r10d
movl   $0x0,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <ldl_dcmp@plt>
movl   $0x1,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     13a2 <invAB+0x252>
movl   $0x1,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     126c <invAB+0x11c>
mov    -0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1230 <invAB+0xe0>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x28(%rbp),%rax
xor    %r9d,%r9d
movl   $0x1,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <ldl_dcmp@plt>
cmpl   $0x0,0x10(%rbp)
je     12b8 <invAB+0x168>
mov    0x2d38(%rip),%rax
mov    (%rax),%edi
lea    0xd57(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
movsd  0xd36(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x40(%rbp),%r8
mov    -0x28(%rbp),%rax
lea    -0x48(%rbp),%r9
mov    %rax,(%rsp)
call   1030 <ldl_mprove@plt>
cmpl   $0x0,0x10(%rbp)
je     1319 <invAB+0x1c9>
mov    0x2cdc(%rip),%rax
mov    (%rax),%edi
movsd  -0x48(%rbp),%xmm0
lea    0xd15(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
jmp    131e <invAB+0x1ce>
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
jne    12cf <invAB+0x17f>
cmpl   $0x0,0x10(%rbp)
je     134c <invAB+0x1fc>
mov    0x2ca4(%rip),%rax
mov    (%rax),%edi
lea    0xce8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     138f <invAB+0x23f>
mov    -0x40(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1353 <invAB+0x203>
jmp    1394 <invAB+0x244>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    121d <invAB+0xcd>
mov    -0x30(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x1,%esi
call   1070 <free_dvector@plt>
mov    -0x40(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x1,%esi
call   1070 <free_dvector@plt>
mov    -0x38(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x1,%esi
call   1070 <free_dvector@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invAB>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r9,%rbx
mov    %r8,0x28(%rsp)
mov    %rcx,0x8(%rsp)
mov    %edx,%r15d
mov    %rsi,0x20(%rsp)
mov    %rdi,0x10(%rsp)
mov    $0x1,%edi
mov    %edx,%esi
call   1060 <dvector@plt>
mov    %rax,%r12
mov    $0x1,%edi
mov    %r15d,%esi
call   1060 <dvector@plt>
mov    %rax,%rbp
mov    $0x1,%edi
mov    %r15d,%esi
call   1060 <dvector@plt>
mov    %rax,%r14
mov    %r15,(%rsp)
test   %r15d,%r15d
jle    1370 <invAB+0x220>
mov    (%rsp),%rdx
mov    %edx,%r8d
lea    0x1(%r8),%rax
mov    $0x1,%ecx
cmp    $0x4,%edx
jb     12d8 <invAB+0x188>
lea    0x8(%rbp),%rdx
lea    (%r12,%rax,8),%rsi
cmp    %rsi,%rdx
jae    11f5 <invAB+0xa5>
lea    0x0(,%rax,8),%rdx
add    %rbp,%rdx
mov    %r12,%rsi
add    $0x8,%rsi
cmp    %rdx,%rsi
jb     12d8 <invAB+0x188>
mov    %r8d,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0xc,%rdi
jae    1219 <invAB+0xc9>
xor    %edi,%edi
jmp    1292 <invAB+0x142>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
xorps  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups %xmm0,0x8(%rbp,%rdi,8)
movups %xmm0,0x18(%rbp,%rdi,8)
movups %xmm0,0x8(%r12,%rdi,8)
movups %xmm0,0x18(%r12,%rdi,8)
movups %xmm0,0x28(%rbp,%rdi,8)
movups %xmm0,0x38(%rbp,%rdi,8)
movups %xmm0,0x28(%r12,%rdi,8)
movups %xmm0,0x38(%r12,%rdi,8)
movups %xmm0,0x48(%rbp,%rdi,8)
movups %xmm0,0x58(%rbp,%rdi,8)
movups %xmm0,0x48(%r12,%rdi,8)
movups %xmm0,0x58(%r12,%rdi,8)
movups %xmm0,0x68(%rbp,%rdi,8)
movups %xmm0,0x78(%rbp,%rdi,8)
movups %xmm0,0x68(%r12,%rdi,8)
movups %xmm0,0x78(%r12,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1230 <invAB+0xe0>
test   %rdx,%rdx
je     12cb <invAB+0x17b>
xorps  %xmm0,%xmm0
nopw   0x0(%rax,%rax,1)
lea    0x0(,%rdi,8),%rsi
or     $0x8,%rsi
movups %xmm0,0x0(%rbp,%rsi,1)
movups %xmm0,0x10(%rbp,%rsi,1)
movups %xmm0,(%r12,%rsi,1)
movups %xmm0,0x10(%r12,%rsi,1)
add    $0x4,%rdi
add    $0xffffffffffffffff,%rdx
jne    12a0 <invAB+0x150>
cmp    %rcx,%r8
je     1370 <invAB+0x220>
or     $0x1,%rcx
mov    %eax,%esi
sub    %ecx,%esi
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
and    $0x3,%rsi
je     130b <invAB+0x1bb>
nopl   0x0(%rax,%rax,1)
movq   $0x0,0x0(%rbp,%rcx,8)
movq   $0x0,(%r12,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    12f0 <invAB+0x1a0>
cmp    $0x3,%rdx
jb     1370 <invAB+0x220>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movq   $0x0,0x0(%rbp,%rcx,8)
movq   $0x0,(%r12,%rcx,8)
movq   $0x0,0x8(%rbp,%rcx,8)
movq   $0x0,0x8(%r12,%rcx,8)
movq   $0x0,0x10(%rbp,%rcx,8)
movq   $0x0,0x10(%r12,%rcx,8)
movq   $0x0,0x18(%rbp,%rcx,8)
movq   $0x0,0x18(%r12,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    1320 <invAB+0x1d0>
mov    0x10(%rsp),%rdi
mov    (%rsp),%rsi
mov    %r12,%r13
mov    %r12,%rdx
mov    %r14,%rcx
mov    %rbp,%r8
mov    $0x1,%r9d
push   %rbx
push   $0x0
call   1050 <ldl_dcmp@plt>
add    $0x10,%rsp
cmpl   $0x0,0x8(%rsp)
jle    165d <invAB+0x50d>
mov    (%rsp),%rax
lea    0x1(%rax),%ecx
mov    0x8(%rsp),%rax
add    $0x1,%eax
mov    %rax,0x8(%rsp)
lea    -0x1(%rcx),%rax
add    $0xfffffffffffffffe,%rcx
mov    %rcx,0x30(%rsp)
mov    %eax,%r12d
and    $0x3,%r12d
mov    %rax,%rcx
mov    %rax,0x40(%rsp)
and    $0xfffffffffffffffc,%rax
mov    %rax,0x18(%rsp)
mov    $0x1,%r15d
jmp    13ff <invAB+0x2af>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r15
cmp    0x8(%rsp),%r15
je     165d <invAB+0x50d>
cmpl   $0x0,(%rsp)
jle    14b8 <invAB+0x368>
mov    $0x1,%eax
cmpq   $0x3,0x30(%rsp)
jb     1485 <invAB+0x335>
xor    %eax,%eax
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x8(%rdx,%rax,8),%rcx
movsd  (%rcx,%r15,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
mov    0x10(%rdx,%rax,8),%rcx
movsd  (%rcx,%r15,8),%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
mov    0x18(%rdx,%rax,8),%rcx
movsd  (%rcx,%r15,8),%xmm0
movsd  %xmm0,0x18(%r14,%rax,8)
mov    0x20(%rdx,%rax,8),%rcx
movsd  (%rcx,%r15,8),%xmm0
movsd  %xmm0,0x20(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%rsi
jne    1430 <invAB+0x2e0>
add    $0x1,%rax
test   %r12,%r12
je     14b8 <invAB+0x368>
lea    (%r14,%rax,8),%rcx
mov    0x20(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
nopl   0x0(%rax)
mov    (%rax,%rdx,8),%rsi
movsd  (%rsi,%r15,8),%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r12
jne    14a0 <invAB+0x350>
mov    0x10(%rsp),%rdi
mov    (%rsp),%rsi
mov    %r13,%rdx
mov    %r14,%rcx
mov    %rbp,%r8
xor    %r9d,%r9d
push   %rbx
push   $0x1
call   1050 <ldl_dcmp@plt>
add    $0x10,%rsp
cmpl   $0x0,0x80(%rsp)
je     14fa <invAB+0x3aa>
mov    0x2af6(%rip),%rax
mov    (%rax),%edi
lea    0xb0d(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
movl   $0x1,(%rbx)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x38(%rsp)
jmp    1525 <invAB+0x3d5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,(%rbx)
je     158e <invAB+0x43e>
sub    $0x8,%rsp
mov    0x18(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    %r13,%rdx
mov    %r14,%rcx
mov    %rbp,%r8
lea    0x40(%rsp),%r9
push   %rbx
call   1030 <ldl_mprove@plt>
add    $0x10,%rsp
cmpl   $0x0,0x80(%rsp)
je     1520 <invAB+0x3d0>
mov    0x2a84(%rip),%rax
mov    (%rax),%edi
movsd  0x38(%rsp),%xmm0
lea    0xab4(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
cmpl   $0x0,(%rbx)
jne    1525 <invAB+0x3d5>
mov    0x2a62(%rip),%rax
mov    (%rax),%edi
lea    0xa9e(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
cmpl   $0x0,(%rsp)
jle    13f0 <invAB+0x2a0>
mov    $0x1,%eax
cmpq   $0x3,0x30(%rsp)
jb     1611 <invAB+0x4c1>
xor    %eax,%eax
mov    0x28(%rsp),%rdx
mov    0x18(%rsp),%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rbp,%rax,8),%xmm0
mov    0x8(%rdx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r15,8)
movsd  0x10(%rbp,%rax,8),%xmm0
mov    0x10(%rdx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r15,8)
movsd  0x18(%rbp,%rax,8),%xmm0
mov    0x18(%rdx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r15,8)
movsd  0x20(%rbp,%rax,8),%xmm0
mov    0x20(%rdx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r15,8)
add    $0x4,%rax
cmp    %rax,%rsi
jne    15c0 <invAB+0x470>
add    $0x1,%rax
testb  $0x3,0x40(%rsp)
je     13f0 <invAB+0x2a0>
mov    0x28(%rsp),%rcx
lea    (%rcx,%rax,8),%rcx
lea    0x0(,%rax,8),%rax
add    %rbp,%rax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rax,%rdx,8),%xmm0
mov    (%rcx,%rdx,8),%rsi
movsd  %xmm0,(%rsi,%r15,8)
add    $0x1,%rdx
cmp    %rdx,%r12
jne    1640 <invAB+0x4f0>
jmp    13f0 <invAB+0x2a0>
mov    %r13,%rdi
mov    $0x1,%esi
mov    (%rsp),%rbx
mov    %ebx,%edx
call   1070 <free_dvector@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    %ebx,%edx
call   1070 <free_dvector@plt>
mov    %r14,%rdi
mov    $0x1,%esi
mov    %ebx,%edx
call   1070 <free_dvector@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [31 x i8] c" LDL' RMS matrix precision:\00"
@.str.1 = [6 x i8] c"%9.2e\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @invAB(double** %0, double** %1, i32 %2, i32 %3, double** %4, i32* %5, i32 %6) {
%8 = alloca double**
%9 = alloca double**
%10 = alloca i32
%11 = alloca i32
%12 = alloca double**
%13 = alloca i32*
%14 = alloca i32
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
store double** %0, double*** %8
store double** %1, double*** %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double** %4, double*** %12
store i32* %5, i32** %13
store i32 %6, i32* %14
%22 = load i32, i32* %10
%23 = call double* @dvector(i32 1, i32 %22)
store double* %23, double** %15
%24 = load i32, i32* %10
%25 = call double* @dvector(i32 1, i32 %24)
store double* %25, double** %17
%26 = load i32, i32* %10
%27 = call double* @dvector(i32 1, i32 %26)
store double* %27, double** %16
store i32 1, i32* %19
br label %28
28: ; preds = %41, %7
%29 = load i32, i32* %19
%30 = load i32, i32* %10
%31 = icmp sle i32 %29, %30
br i1 %31, label %32, label %44
32: ; preds = %28
%33 = load double*, double** %17
%34 = load i32, i32* %19
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double, double* %33, i64 %35
store double 0.000000e+00, double* %36
%37 = load double*, double** %15
%38 = load i32, i32* %19
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %37, i64 %39
store double 0.000000e+00, double* %40
br label %41
41: ; preds = %32
%42 = load i32, i32* %19
%43 = add nsw i32 %42, 1
store i32 %43, i32* %19
br label %28
44: ; preds = %28
%45 = load double**, double*** %8
%46 = load i32, i32* %10
%47 = load double*, double** %15
%48 = load double*, double** %16
%49 = load double*, double** %17
%50 = load i32*, i32** %13
%51 = call i32 @ldl_dcmp(double** %45, i32 %46, double* %47, double* %48, double* %49, i32 1, i32 0, i32* %50)
store i32 1, i32* %20
br label %52
52: ; preds = %141, %44
%53 = load i32, i32* %20
%54 = load i32, i32* %11
%55 = icmp sle i32 %53, %54
br i1 %55, label %56, label %144
56: ; preds = %52
store i32 1, i32* %21
br label %57
57: ; preds = %75, %56
%58 = load i32, i32* %21
%59 = load i32, i32* %10
%60 = icmp sle i32 %58, %59
br i1 %60, label %61, label %78
61: ; preds = %57
%62 = load double**, double*** %9
%63 = load i32, i32* %21
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double*, double** %62, i64 %64
%66 = load double*, double** %65
%67 = load i32, i32* %20
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double, double* %66, i64 %68
%70 = load double, double* %69
%71 = load double*, double** %16
%72 = load i32, i32* %21
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double, double* %71, i64 %73
store double %70, double* %74
br label %75
75: ; preds = %61
%76 = load i32, i32* %21
%77 = add nsw i32 %76, 1
store i32 %77, i32* %21
br label %57
78: ; preds = %57
%79 = load double**, double*** %8
%80 = load i32, i32* %10
%81 = load double*, double** %15
%82 = load double*, double** %16
%83 = load double*, double** %17
%84 = load i32*, i32** %13
%85 = call i32 @ldl_dcmp(double** %79, i32 %80, double* %81, double* %82, double* %83, i32 0, i32 1, i32* %84)
%86 = load i32, i32* %14
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %91
88: ; preds = %78
%89 = load i32, i32* @stdout
%90 = call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %91
91: ; preds = %88, %78
%92 = load i32*, i32** %13
store i32 1, i32* %92
store double 1.000000e+00, double* %18
br label %93
93: ; preds = %108, %91
%94 = load double**, double*** %8
%95 = load i32, i32* %10
%96 = load double*, double** %15
%97 = load double*, double** %16
%98 = load double*, double** %17
%99 = load i32*, i32** %13
%100 = call i32 @ldl_mprove(double** %94, i32 %95, double* %96, double* %97, double* %98, double* %18, i32* %99)
%101 = load i32, i32* %14
%102 = icmp ne i32 %101, 0
br i1 %102, label %103, label %107
103: ; preds = %93
%104 = load i32, i32* @stdout
%105 = load double, double* %18
%106 = call i32 (i32, i8*, ...) @fprintf(i32 %104, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %105)
br label %107
107: ; preds = %103, %93
br label %108
108: ; preds = %107
%109 = load i32*, i32** %13
%110 = load i32, i32* %109
%111 = icmp ne i32 %110, 0
br i1 %111, label %93, label %112
112: ; preds = %108
%113 = load i32, i32* %14
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %118
115: ; preds = %112
%116 = load i32, i32* @stdout
%117 = call i32 (i32, i8*, ...) @fprintf(i32 %116, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %118
118: ; preds = %115, %112
store i32 1, i32* %19
br label %119
119: ; preds = %137, %118
%120 = load i32, i32* %19
%121 = load i32, i32* %10
%122 = icmp sle i32 %120, %121
br i1 %122, label %123, label %140
123: ; preds = %119
%124 = load double*, double** %17
%125 = load i32, i32* %19
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double, double* %124, i64 %126
%128 = load double, double* %127
%129 = load double**, double*** %12
%130 = load i32, i32* %19
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double*, double** %129, i64 %131
%133 = load double*, double** %132
%134 = load i32, i32* %20
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %133, i64 %135
store double %128, double* %136
br label %137
137: ; preds = %123
%138 = load i32, i32* %19
%139 = add nsw i32 %138, 1
store i32 %139, i32* %19
br label %119
140: ; preds = %119
br label %141
141: ; preds = %140
%142 = load i32, i32* %20
%143 = add nsw i32 %142, 1
store i32 %143, i32* %20
br label %52
144: ; preds = %52
%145 = load double*, double** %15
%146 = load i32, i32* %10
%147 = call i32 @free_dvector(double* %145, i32 1, i32 %146)
%148 = load double*, double** %17
%149 = load i32, i32* %10
%150 = call i32 @free_dvector(double* %148, i32 1, i32 %149)
%151 = load double*, double** %16
%152 = load i32, i32* %10
%153 = call i32 @free_dvector(double* %151, i32 1, i32 %152)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [31 x i8] c" LDL' RMS matrix precision:\00"
@.str.1 = [6 x i8] c"%9.2e\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @invAB(double** %0, double** nocapture %1, i32 %2, i32 %3, double** nocapture %4, i32* %5, i32 %6) {
%8 = alloca double
%9 = bitcast double* %8 to i8*
%10 = tail call double* @dvector(i32 1, i32 %2)
%11 = tail call double* @dvector(i32 1, i32 %2)
%12 = tail call double* @dvector(i32 1, i32 %2)
%13 = icmp slt i32 %2, 1
br i1 %13, label %132, label %14
14: ; preds = %7
%15 = add nuw i32 %2, 1
%16 = zext i32 %15 to i64
%17 = add nsw i64 %16, -1
%18 = icmp ult i64 %17, 4
br i1 %18, label %99, label %19
19: ; preds = %14
%20 = getelementptr double, double* %11, i64 1
%21 = getelementptr double, double* %11, i64 %16
%22 = getelementptr double, double* %10, i64 1
%23 = getelementptr double, double* %10, i64 %16
%24 = icmp ult double* %20, %23
%25 = icmp ult double* %22, %21
%26 = and i1 %24, %25
br i1 %26, label %99, label %27
27: ; preds = %19
%28 = and i64 %17, -4
%29 = or i64 %28, 1
%30 = add nsw i64 %28, -4
%31 = lshr exact i64 %30, 2
%32 = add nuw nsw i64 %31, 1
%33 = and i64 %32, 3
%34 = icmp ult i64 %30, 12
br i1 %34, label %79, label %35
35: ; preds = %27
%36 = and i64 %32, 9223372036854775804
br label %37
37: ; preds = %37, %35
%38 = phi i64 [ 0, %35 ], [ %76, %37 ]
%39 = phi i64 [ 0, %35 ], [ %77, %37 ]
%40 = or i64 %38, 1
%41 = getelementptr inbounds double, double* %11, i64 %40
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %42
%43 = getelementptr inbounds double, double* %41, i64 2
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %44
%45 = getelementptr inbounds double, double* %10, i64 %40
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %46
%47 = getelementptr inbounds double, double* %45, i64 2
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %48
%49 = or i64 %38, 5
%50 = getelementptr inbounds double, double* %11, i64 %49
%51 = bitcast double* %50 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %51
%52 = getelementptr inbounds double, double* %50, i64 2
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %53
%54 = getelementptr inbounds double, double* %10, i64 %49
%55 = bitcast double* %54 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %55
%56 = getelementptr inbounds double, double* %54, i64 2
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %57
%58 = or i64 %38, 9
%59 = getelementptr inbounds double, double* %11, i64 %58
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %60
%61 = getelementptr inbounds double, double* %59, i64 2
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %62
%63 = getelementptr inbounds double, double* %10, i64 %58
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %64
%65 = getelementptr inbounds double, double* %63, i64 2
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %66
%67 = or i64 %38, 13
%68 = getelementptr inbounds double, double* %11, i64 %67
%69 = bitcast double* %68 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %69
%70 = getelementptr inbounds double, double* %68, i64 2
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %71
%72 = getelementptr inbounds double, double* %10, i64 %67
%73 = bitcast double* %72 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %73
%74 = getelementptr inbounds double, double* %72, i64 2
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %75
%76 = add nuw i64 %38, 16
%77 = add nuw i64 %39, 4
%78 = icmp eq i64 %77, %36
br i1 %78, label %79, label %37
79: ; preds = %37, %27
%80 = phi i64 [ 0, %27 ], [ %76, %37 ]
%81 = icmp eq i64 %33, 0
br i1 %81, label %97, label %82
82: ; preds = %79, %82
%83 = phi i64 [ %94, %82 ], [ %80, %79 ]
%84 = phi i64 [ %95, %82 ], [ 0, %79 ]
%85 = or i64 %83, 1
%86 = getelementptr inbounds double, double* %11, i64 %85
%87 = bitcast double* %86 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %87
%88 = getelementptr inbounds double, double* %86, i64 2
%89 = bitcast double* %88 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %89
%90 = getelementptr inbounds double, double* %10, i64 %85
%91 = bitcast double* %90 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %91
%92 = getelementptr inbounds double, double* %90, i64 2
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %93
%94 = add nuw i64 %83, 4
%95 = add i64 %84, 1
%96 = icmp eq i64 %95, %33
br i1 %96, label %97, label %82
97: ; preds = %82, %79
%98 = icmp eq i64 %17, %28
br i1 %98, label %132, label %99
99: ; preds = %19, %14, %97
%100 = phi i64 [ 1, %19 ], [ 1, %14 ], [ %29, %97 ]
%101 = sub nsw i64 %16, %100
%102 = xor i64 %100, -1
%103 = add nsw i64 %102, %16
%104 = and i64 %101, 3
%105 = icmp eq i64 %104, 0
br i1 %105, label %114, label %106
106: ; preds = %99, %106
%107 = phi i64 [ %111, %106 ], [ %100, %99 ]
%108 = phi i64 [ %112, %106 ], [ 0, %99 ]
%109 = getelementptr inbounds double, double* %11, i64 %107
store double 0.000000e+00, double* %109
%110 = getelementptr inbounds double, double* %10, i64 %107
store double 0.000000e+00, double* %110
%111 = add nuw nsw i64 %107, 1
%112 = add i64 %108, 1
%113 = icmp eq i64 %112, %104
br i1 %113, label %114, label %106
114: ; preds = %106, %99
%115 = phi i64 [ %100, %99 ], [ %111, %106 ]
%116 = icmp ult i64 %103, 3
br i1 %116, label %132, label %117
117: ; preds = %114, %117
%118 = phi i64 [ %130, %117 ], [ %115, %114 ]
%119 = getelementptr inbounds double, double* %11, i64 %118
store double 0.000000e+00, double* %119
%120 = getelementptr inbounds double, double* %10, i64 %118
store double 0.000000e+00, double* %120
%121 = add nuw nsw i64 %118, 1
%122 = getelementptr inbounds double, double* %11, i64 %121
store double 0.000000e+00, double* %122
%123 = getelementptr inbounds double, double* %10, i64 %121
store double 0.000000e+00, double* %123
%124 = add nuw nsw i64 %118, 2
%125 = getelementptr inbounds double, double* %11, i64 %124
store double 0.000000e+00, double* %125
%126 = getelementptr inbounds double, double* %10, i64 %124
store double 0.000000e+00, double* %126
%127 = add nuw nsw i64 %118, 3
%128 = getelementptr inbounds double, double* %11, i64 %127
store double 0.000000e+00, double* %128
%129 = getelementptr inbounds double, double* %10, i64 %127
store double 0.000000e+00, double* %129
%130 = add nuw nsw i64 %118, 4
%131 = icmp eq i64 %130, %16
br i1 %131, label %132, label %117
132: ; preds = %114, %117, %97, %7
%133 = tail call i32 @ldl_dcmp(double** %0, i32 %2, double* %10, double* %12, double* %11, i32 1, i32 0, i32* %5)
%134 = icmp slt i32 %3, 1
br i1 %134, label %264, label %135
135: ; preds = %132
%136 = icmp eq i32 %6, 0
%137 = add i32 %2, 1
%138 = add nuw i32 %3, 1
%139 = zext i32 %138 to i64
%140 = zext i32 %137 to i64
%141 = add nsw i64 %140, -1
%142 = add nsw i64 %140, -2
%143 = and i64 %141, 3
%144 = icmp ult i64 %142, 3
%145 = and i64 %141, -4
%146 = icmp eq i64 %143, 0
%147 = and i64 %141, 3
%148 = icmp ult i64 %142, 3
%149 = and i64 %141, -4
%150 = icmp eq i64 %147, 0
br label %151
151: ; preds = %135, %261
%152 = phi i64 [ 1, %135 ], [ %262, %261 ]
br i1 %13, label %196, label %153
153: ; preds = %151
br i1 %144, label %183, label %154
154: ; preds = %153, %154
%155 = phi i64 [ %180, %154 ], [ 1, %153 ]
%156 = phi i64 [ %181, %154 ], [ 0, %153 ]
%157 = getelementptr inbounds double*, double** %1, i64 %155
%158 = load double*, double** %157
%159 = getelementptr inbounds double, double* %158, i64 %152
%160 = load double, double* %159
%161 = getelementptr inbounds double, double* %12, i64 %155
store double %160, double* %161
%162 = add nuw nsw i64 %155, 1
%163 = getelementptr inbounds double*, double** %1, i64 %162
%164 = load double*, double** %163
%165 = getelementptr inbounds double, double* %164, i64 %152
%166 = load double, double* %165
%167 = getelementptr inbounds double, double* %12, i64 %162
store double %166, double* %167
%168 = add nuw nsw i64 %155, 2
%169 = getelementptr inbounds double*, double** %1, i64 %168
%170 = load double*, double** %169
%171 = getelementptr inbounds double, double* %170, i64 %152
%172 = load double, double* %171
%173 = getelementptr inbounds double, double* %12, i64 %168
store double %172, double* %173
%174 = add nuw nsw i64 %155, 3
%175 = getelementptr inbounds double*, double** %1, i64 %174
%176 = load double*, double** %175
%177 = getelementptr inbounds double, double* %176, i64 %152
%178 = load double, double* %177
%179 = getelementptr inbounds double, double* %12, i64 %174
store double %178, double* %179
%180 = add nuw nsw i64 %155, 4
%181 = add i64 %156, 4
%182 = icmp eq i64 %181, %145
br i1 %182, label %183, label %154
183: ; preds = %154, %153
%184 = phi i64 [ 1, %153 ], [ %180, %154 ]
br i1 %146, label %196, label %185
185: ; preds = %183, %185
%186 = phi i64 [ %193, %185 ], [ %184, %183 ]
%187 = phi i64 [ %194, %185 ], [ 0, %183 ]
%188 = getelementptr inbounds double*, double** %1, i64 %186
%189 = load double*, double** %188
%190 = getelementptr inbounds double, double* %189, i64 %152
%191 = load double, double* %190
%192 = getelementptr inbounds double, double* %12, i64 %186
store double %191, double* %192
%193 = add nuw nsw i64 %186, 1
%194 = add i64 %187, 1
%195 = icmp eq i64 %194, %143
br i1 %195, label %196, label %185
196: ; preds = %183, %185, %151
%197 = call i32 @ldl_dcmp(double** %0, i32 %2, double* %10, double* %12, double* %11, i32 0, i32 1, i32* %5)
br i1 %136, label %201, label %198
198: ; preds = %196
%199 = load i32, i32* @stdout
%200 = call i32 (i32, i8*, ...) @fprintf(i32 %199, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %201
201: ; preds = %198, %196
store i32 1, i32* %5
store double 1.000000e+00, double* %8
br label %202
202: ; preds = %207, %201
%203 = call i32 @ldl_mprove(double** %0, i32 %2, double* %10, double* %12, double* %11, double* %8, i32* %5)
br i1 %136, label %204, label %208
204: ; preds = %202
%205 = load i32, i32* %5
%206 = icmp eq i32 %205, 0
br i1 %206, label %217, label %207
207: ; preds = %204, %208
br label %202
208: ; preds = %202
%209 = load i32, i32* @stdout
%210 = load double, double* %8
%211 = call i32 (i32, i8*, ...) @fprintf(i32 %209, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %210)
%212 = load i32, i32* %5
%213 = icmp eq i32 %212, 0
br i1 %213, label %214, label %207
214: ; preds = %208
%215 = load i32, i32* @stdout
%216 = call i32 (i32, i8*, ...) @fprintf(i32 %215, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %217
217: ; preds = %204, %214
br i1 %13, label %261, label %218
218: ; preds = %217
br i1 %148, label %248, label %219
219: ; preds = %218, %219
%220 = phi i64 [ %245, %219 ], [ 1, %218 ]
%221 = phi i64 [ %246, %219 ], [ 0, %218 ]
%222 = getelementptr inbounds double, double* %11, i64 %220
%223 = load double, double* %222
%224 = getelementptr inbounds double*, double** %4, i64 %220
%225 = load double*, double** %224
%226 = getelementptr inbounds double, double* %225, i64 %152
store double %223, double* %226
%227 = add nuw nsw i64 %220, 1
%228 = getelementptr inbounds double, double* %11, i64 %227
%229 = load double, double* %228
%230 = getelementptr inbounds double*, double** %4, i64 %227
%231 = load double*, double** %230
%232 = getelementptr inbounds double, double* %231, i64 %152
store double %229, double* %232
%233 = add nuw nsw i64 %220, 2
%234 = getelementptr inbounds double, double* %11, i64 %233
%235 = load double, double* %234
%236 = getelementptr inbounds double*, double** %4, i64 %233
%237 = load double*, double** %236
%238 = getelementptr inbounds double, double* %237, i64 %152
store double %235, double* %238
%239 = add nuw nsw i64 %220, 3
%240 = getelementptr inbounds double, double* %11, i64 %239
%241 = load double, double* %240
%242 = getelementptr inbounds double*, double** %4, i64 %239
%243 = load double*, double** %242
%244 = getelementptr inbounds double, double* %243, i64 %152
store double %241, double* %244
%245 = add nuw nsw i64 %220, 4
%246 = add i64 %221, 4
%247 = icmp eq i64 %246, %149
br i1 %247, label %248, label %219
248: ; preds = %219, %218
%249 = phi i64 [ 1, %218 ], [ %245, %219 ]
br i1 %150, label %261, label %250
250: ; preds = %248, %250
%251 = phi i64 [ %258, %250 ], [ %249, %248 ]
%252 = phi i64 [ %259, %250 ], [ 0, %248 ]
%253 = getelementptr inbounds double, double* %11, i64 %251
%254 = load double, double* %253
%255 = getelementptr inbounds double*, double** %4, i64 %251
%256 = load double*, double** %255
%257 = getelementptr inbounds double, double* %256, i64 %152
store double %254, double* %257
%258 = add nuw nsw i64 %251, 1
%259 = add i64 %252, 1
%260 = icmp eq i64 %259, %147
br i1 %260, label %261, label %250
261: ; preds = %248, %250, %217
%262 = add nuw nsw i64 %152, 1
%263 = icmp eq i64 %262, %139
br i1 %263, label %264, label %151
264: ; preds = %261, %132
%265 = call i32 @free_dvector(double* %10, i32 1, i32 %2)
%266 = call i32 @free_dvector(double* %11, i32 1, i32 %2)
%267 = call i32 @free_dvector(double* %12, i32 1, i32 %2)
ret void
}