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


x86 assembly (clang, -O0):
<xtinvAy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x1c(%rbp),%esi
mov    $0x1,%edi
call   1060 <dvector@plt>
mov    %rax,-0x30(%rbp)
mov    -0x1c(%rbp),%esi
mov    $0x1,%edi
call   1060 <dvector@plt>
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%esi
mov    $0x1,%edi
call   1060 <dvector@plt>
mov    %rax,-0x40(%rbp)
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     11e6 <xtinvAy+0x96>
mov    -0x38(%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    11ac <xtinvAy+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x38(%rbp),%r8
mov    $0x1,%r9d
xor    %eax,%eax
lea    -0x58(%rbp),%rax
movl   $0x0,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <ldl_dcmp@plt>
movl   $0x1,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     13fc <xtinvAy+0x2ac>
movl   $0x1,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     126c <xtinvAy+0x11c>
mov    -0x18(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1230 <xtinvAy+0xe0>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x38(%rbp),%r8
xor    %r9d,%r9d
lea    -0x58(%rbp),%rax
movl   $0x1,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <ldl_dcmp@plt>
cmpl   $0x0,0x10(%rbp)
je     12b8 <xtinvAy+0x168>
mov    0x2d38(%rip),%rax
mov    (%rax),%edi
lea    0xd57(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x58(%rbp)
movsd  0xd39(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x30(%rbp),%rdx
mov    -0x40(%rbp),%rcx
mov    -0x38(%rbp),%r8
lea    -0x48(%rbp),%r9
lea    -0x58(%rbp),%rax
mov    %rax,(%rsp)
call   1030 <ldl_mprove@plt>
cmpl   $0x0,0x10(%rbp)
je     1316 <xtinvAy+0x1c6>
mov    0x2cdf(%rip),%rax
mov    (%rax),%edi
movsd  -0x48(%rbp),%xmm0
lea    0xd18(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
jmp    131b <xtinvAy+0x1cb>
cmpl   $0x0,-0x58(%rbp)
jne    12cc <xtinvAy+0x17c>
cmpl   $0x0,0x10(%rbp)
je     1346 <xtinvAy+0x1f6>
mov    0x2caa(%rip),%rax
mov    (%rax),%edi
lea    0xcee(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jg     13e9 <xtinvAy+0x299>
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jg     13d6 <xtinvAy+0x286>
mov    -0x8(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x50(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1378 <xtinvAy+0x228>
jmp    13db <xtinvAy+0x28b>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    134d <xtinvAy+0x1fd>
jmp    13ee <xtinvAy+0x29e>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    121d <xtinvAy+0xcd>
mov    -0x30(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    $0x1,%esi
call   1070 <free_dvector@plt>
mov    -0x38(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    $0x1,%esi
call   1070 <free_dvector@plt>
mov    -0x40(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    $0x1,%esi
call   1070 <free_dvector@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtinvAy>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9,0x50(%rsp)
mov    %r8d,%r14d
mov    %ecx,%r12d
mov    %rdx,0x20(%rsp)
mov    %rsi,0x10(%rsp)
mov    %rdi,%rbp
mov    $0x1,%edi
mov    %ecx,%esi
call   1060 <dvector@plt>
mov    %rax,%rbx
mov    $0x1,%edi
mov    %r12d,%esi
call   1060 <dvector@plt>
mov    %rax,%r15
mov    $0x1,%edi
mov    %r12d,%esi
call   1060 <dvector@plt>
mov    %rax,%r13
test   %r12d,%r12d
jle    135f <xtinvAy+0x20f>
mov    %r12d,%r8d
lea    0x1(%r8),%r9
mov    $0x1,%ecx
cmp    $0x4,%r12d
jb     12db <xtinvAy+0x18b>
lea    0x8(%r15),%rdx
lea    (%rbx,%r9,8),%rdi
cmp    %rdi,%rdx
jae    11e5 <xtinvAy+0x95>
lea    (%r15,%r9,8),%rdx
mov    %rbx,%rdi
add    $0x8,%rdi
cmp    %rdx,%rdi
jb     12db <xtinvAy+0x18b>
mov    %r8d,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0xc,%rdi
jae    120c <xtinvAy+0xbc>
xor    %edi,%edi
jmp    1292 <xtinvAy+0x142>
and    $0xfffffffffffffffc,%rdx
xor    %edi,%edi
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
movupd %xmm0,0x8(%r15,%rdi,8)
movupd %xmm0,0x18(%r15,%rdi,8)
movupd %xmm0,0x8(%rbx,%rdi,8)
movupd %xmm0,0x18(%rbx,%rdi,8)
movupd %xmm0,0x28(%r15,%rdi,8)
movupd %xmm0,0x38(%r15,%rdi,8)
movupd %xmm0,0x28(%rbx,%rdi,8)
movupd %xmm0,0x38(%rbx,%rdi,8)
movupd %xmm0,0x48(%r15,%rdi,8)
movupd %xmm0,0x58(%r15,%rdi,8)
movupd %xmm0,0x48(%rbx,%rdi,8)
movupd %xmm0,0x58(%rbx,%rdi,8)
movupd %xmm0,0x68(%r15,%rdi,8)
movupd %xmm0,0x78(%r15,%rdi,8)
movupd %xmm0,0x68(%rbx,%rdi,8)
movupd %xmm0,0x78(%rbx,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rdx
jne    1220 <xtinvAy+0xd0>
test   %rax,%rax
je     12ce <xtinvAy+0x17e>
xorpd  %xmm0,%xmm0
nopl   0x0(%rax,%rax,1)
lea    0x0(,%rdi,8),%rdx
or     $0x8,%rdx
movupd %xmm0,(%r15,%rdx,1)
movupd %xmm0,0x10(%r15,%rdx,1)
movupd %xmm0,(%rbx,%rdx,1)
movupd %xmm0,0x10(%rbx,%rdx,1)
add    $0x4,%rdi
add    $0xffffffffffffffff,%rax
jne    12a0 <xtinvAy+0x150>
cmp    %rcx,%r8
je     135f <xtinvAy+0x20f>
or     $0x1,%rcx
mov    %r9d,%edi
sub    %ecx,%edi
mov    %rcx,%rdx
not    %rdx
add    %r9,%rdx
and    $0x3,%rdi
je     130a <xtinvAy+0x1ba>
nop
movq   $0x0,(%r15,%rcx,8)
movq   $0x0,(%rbx,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rdi
jne    12f0 <xtinvAy+0x1a0>
cmp    $0x3,%rdx
jb     135f <xtinvAy+0x20f>
movq   $0x0,(%r15,%rcx,8)
movq   $0x0,(%rbx,%rcx,8)
movq   $0x0,0x8(%r15,%rcx,8)
movq   $0x0,0x8(%rbx,%rcx,8)
movq   $0x0,0x10(%r15,%rcx,8)
movq   $0x0,0x10(%rbx,%rcx,8)
movq   $0x0,0x18(%r15,%rcx,8)
movq   $0x0,0x18(%rbx,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%r9
jne    1310 <xtinvAy+0x1c0>
lea    0x4(%rsp),%rax
mov    0x10(%rsp),%rdi
mov    %r12d,%esi
mov    %rbx,0x8(%rsp)
mov    %rbx,%rdx
mov    %r13,%rcx
mov    %r15,%r8
mov    %r12,0x18(%rsp)
mov    $0x1,%r9d
push   %rax
push   $0x0
call   1050 <ldl_dcmp@plt>
mov    0x28(%rsp),%r8
add    $0x10,%rsp
mov    %r14,%rbx
test   %ebx,%ebx
jle    164c <xtinvAy+0x4fc>
lea    0x1(%r8),%r9d
add    $0x1,%ebx
lea    -0x1(%r9),%r10
add    $0xfffffffffffffffe,%r9
mov    %r10d,%edi
and    $0x3,%edi
mov    %r10,%r11
and    $0xfffffffffffffffc,%r11
mov    %r10,%r14
and    $0xfffffffffffffffe,%r14
neg    %r14
mov    $0x1,%r12d
mov    %r9,0x48(%rsp)
mov    %r10,0x40(%rsp)
mov    %rdi,0x38(%rsp)
mov    %r11,0x30(%rsp)
jmp    1402 <xtinvAy+0x2b2>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r12
cmp    %rbx,%r12
mov    0x38(%rsp),%rdi
je     164c <xtinvAy+0x4fc>
test   %r8d,%r8d
jle    14a8 <xtinvAy+0x358>
mov    $0x1,%eax
cmp    $0x3,%r9
jb     1475 <xtinvAy+0x325>
xor    %eax,%eax
mov    0x20(%rsp),%rdx
nopl   (%rax)
mov    0x8(%rdx,%rax,8),%rcx
movsd  (%rcx,%r12,8),%xmm0
movsd  %xmm0,0x8(%r13,%rax,8)
mov    0x10(%rdx,%rax,8),%rcx
movsd  (%rcx,%r12,8),%xmm0
movsd  %xmm0,0x10(%r13,%rax,8)
mov    0x18(%rdx,%rax,8),%rcx
movsd  (%rcx,%r12,8),%xmm0
movsd  %xmm0,0x18(%r13,%rax,8)
mov    0x20(%rdx,%rax,8),%rcx
movsd  (%rcx,%r12,8),%xmm0
movsd  %xmm0,0x20(%r13,%rax,8)
add    $0x4,%rax
cmp    %rax,%r11
jne    1420 <xtinvAy+0x2d0>
add    $0x1,%rax
test   %rdi,%rdi
je     14a8 <xtinvAy+0x358>
lea    0x0(,%rax,8),%rcx
add    %r13,%rcx
mov    0x20(%rsp),%rdx
lea    (%rdx,%rax,8),%rax
xor    %edx,%edx
mov    (%rax,%rdx,8),%rsi
movsd  (%rsi,%r12,8),%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%rdi
jne    1490 <xtinvAy+0x340>
mov    0x10(%rsp),%rdi
mov    %r8d,%esi
mov    0x8(%rsp),%rdx
mov    %r13,%rcx
mov    %r15,%r8
xor    %r9d,%r9d
lea    0x4(%rsp),%rax
push   %rax
push   $0x1
call   1050 <ldl_dcmp@plt>
add    $0x10,%rsp
cmpl   $0x0,0x90(%rsp)
je     14f0 <xtinvAy+0x3a0>
mov    0x2b00(%rip),%rax
mov    (%rax),%edi
lea    0xb17(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
movl   $0x1,0x4(%rsp)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x28(%rsp)
jmp    1517 <xtinvAy+0x3c7>
nopl   0x0(%rax)
cmpl   $0x0,0x4(%rsp)
je     1589 <xtinvAy+0x439>
sub    $0x8,%rsp
mov    0x18(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r13,%rcx
mov    %r15,%r8
lea    0x30(%rsp),%r9
lea    0xc(%rsp),%rax
push   %rax
call   1030 <ldl_mprove@plt>
add    $0x10,%rsp
cmpl   $0x0,0x90(%rsp)
je     1510 <xtinvAy+0x3c0>
mov    0x2a8b(%rip),%rax
mov    (%rax),%edi
movsd  0x28(%rsp),%xmm0
lea    0xabb(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
cmpl   $0x0,0x4(%rsp)
jne    1517 <xtinvAy+0x3c7>
mov    0x2a67(%rip),%rax
mov    (%rax),%edi
lea    0xaa3(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    $0x1,%eax
mov    0x50(%rsp),%rdi
mov    0x18(%rsp),%r8
mov    0x48(%rsp),%r9
mov    0x40(%rsp),%r10
mov    0x30(%rsp),%r11
jmp    15bd <xtinvAy+0x46d>
nopl   0x0(%rax)
add    $0x1,%rax
cmp    %rbx,%rax
je     13f0 <xtinvAy+0x2a0>
mov    (%rdi,%rax,8),%rcx
movq   $0x0,(%rcx,%r12,8)
test   %r8d,%r8d
jle    15b0 <xtinvAy+0x460>
mov    $0x1,%edx
xorpd  %xmm0,%xmm0
test   %r9,%r9
je     1627 <xtinvAy+0x4d7>
nopl   0x0(%rax)
mov    0x0(%rbp,%rdx,8),%rsi
movsd  (%rsi,%rax,8),%xmm1
mulsd  (%r15,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%r12,8)
mov    0x8(%rbp,%rdx,8),%rsi
movsd  (%rsi,%rax,8),%xmm0
mulsd  0x8(%r15,%rdx,8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx,%r12,8)
lea    (%r14,%rdx,1),%rsi
add    $0x2,%rsi
add    $0x2,%rdx
cmp    $0x1,%rsi
jne    15e0 <xtinvAy+0x490>
test   $0x1,%r10b
je     15b0 <xtinvAy+0x460>
mov    0x0(%rbp,%rdx,8),%rsi
movsd  (%rsi,%rax,8),%xmm1
mulsd  (%r15,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%r12,8)
jmp    15b0 <xtinvAy+0x460>
mov    0x8(%rsp),%rdi
mov    $0x1,%esi
mov    %r8d,%edx
mov    %r8,%rbx
call   1070 <free_dvector@plt>
mov    %r15,%rdi
mov    $0x1,%esi
mov    %ebx,%edx
call   1070 <free_dvector@plt>
mov    %r13,%rdi
mov    $0x1,%esi
mov    %ebx,%edx
call   1070 <free_dvector@plt>
add    $0x58,%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 @xtinvAy(double** %0, double** %1, double** %2, i32 %3, i32 %4, double** %5, i32 %6) {
%8 = alloca double**
%9 = alloca double**
%10 = alloca double**
%11 = alloca i32
%12 = alloca i32
%13 = alloca double**
%14 = alloca i32
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store double** %0, double*** %8
store double** %1, double*** %9
store double** %2, double*** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store double** %5, double*** %13
store i32 %6, i32* %14
%23 = load i32, i32* %11
%24 = call double* @dvector(i32 1, i32 %23)
store double* %24, double** %15
%25 = load i32, i32* %11
%26 = call double* @dvector(i32 1, i32 %25)
store double* %26, double** %16
%27 = load i32, i32* %11
%28 = call double* @dvector(i32 1, i32 %27)
store double* %28, double** %17
store i32 1, i32* %19
br label %29
29: ; preds = %42, %7
%30 = load i32, i32* %19
%31 = load i32, i32* %11
%32 = icmp sle i32 %30, %31
br i1 %32, label %33, label %45
33: ; preds = %29
%34 = load double*, double** %16
%35 = load i32, i32* %19
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %34, i64 %36
store double 0.000000e+00, double* %37
%38 = load double*, double** %15
%39 = load i32, i32* %19
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
store double 0.000000e+00, double* %41
br label %42
42: ; preds = %33
%43 = load i32, i32* %19
%44 = add nsw i32 %43, 1
store i32 %44, i32* %19
br label %29
45: ; preds = %29
%46 = load double**, double*** %9
%47 = load i32, i32* %11
%48 = load double*, double** %15
%49 = load double*, double** %17
%50 = load double*, double** %16
%51 = call i32 @ldl_dcmp(double** %46, i32 %47, double* %48, double* %49, double* %50, i32 1, i32 0, i32* %22)
store i32 1, i32* %20
br label %52
52: ; preds = %165, %45
%53 = load i32, i32* %20
%54 = load i32, i32* %12
%55 = icmp sle i32 %53, %54
br i1 %55, label %56, label %168
56: ; preds = %52
store i32 1, i32* %21
br label %57
57: ; preds = %75, %56
%58 = load i32, i32* %21
%59 = load i32, i32* %11
%60 = icmp sle i32 %58, %59
br i1 %60, label %61, label %78
61: ; preds = %57
%62 = load double**, double*** %10
%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** %17
%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*** %9
%80 = load i32, i32* %11
%81 = load double*, double** %15
%82 = load double*, double** %17
%83 = load double*, double** %16
%84 = call i32 @ldl_dcmp(double** %79, i32 %80, double* %81, double* %82, double* %83, i32 0, i32 1, i32* %22)
%85 = load i32, i32* %14
%86 = icmp ne i32 %85, 0
br i1 %86, label %87, label %90
87: ; preds = %78
%88 = load i32, i32* @stdout
%89 = call i32 (i32, i8*, ...) @fprintf(i32 %88, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %90
90: ; preds = %87, %78
store i32 1, i32* %22
store double 1.000000e+00, double* %18
br label %91
91: ; preds = %105, %90
%92 = load double**, double*** %9
%93 = load i32, i32* %11
%94 = load double*, double** %15
%95 = load double*, double** %17
%96 = load double*, double** %16
%97 = call i32 @ldl_mprove(double** %92, i32 %93, double* %94, double* %95, double* %96, double* %18, i32* %22)
%98 = load i32, i32* %14
%99 = icmp ne i32 %98, 0
br i1 %99, label %100, label %104
100: ; preds = %91
%101 = load i32, i32* @stdout
%102 = load double, double* %18
%103 = call i32 (i32, i8*, ...) @fprintf(i32 %101, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %102)
br label %104
104: ; preds = %100, %91
br label %105
105: ; preds = %104
%106 = load i32, i32* %22
%107 = icmp ne i32 %106, 0
br i1 %107, label %91, label %108
108: ; preds = %105
%109 = load i32, i32* %14
%110 = icmp ne i32 %109, 0
br i1 %110, label %111, label %114
111: ; preds = %108
%112 = load i32, i32* @stdout
%113 = call i32 (i32, i8*, ...) @fprintf(i32 %112, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %114
114: ; preds = %111, %108
store i32 1, i32* %19
br label %115
115: ; preds = %161, %114
%116 = load i32, i32* %19
%117 = load i32, i32* %12
%118 = icmp sle i32 %116, %117
br i1 %118, label %119, label %164
119: ; preds = %115
%120 = load double**, double*** %13
%121 = load i32, i32* %19
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double*, double** %120, i64 %122
%124 = load double*, double** %123
%125 = load i32, i32* %20
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double, double* %124, i64 %126
store double 0.000000e+00, double* %127
store i32 1, i32* %21
br label %128
128: ; preds = %157, %119
%129 = load i32, i32* %21
%130 = load i32, i32* %11
%131 = icmp sle i32 %129, %130
br i1 %131, label %132, label %160
132: ; preds = %128
%133 = load double**, double*** %8
%134 = load i32, i32* %21
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double*, double** %133, i64 %135
%137 = load double*, double** %136
%138 = load i32, i32* %19
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double, double* %137, i64 %139
%141 = load double, double* %140
%142 = load double*, double** %16
%143 = load i32, i32* %21
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double, double* %142, i64 %144
%146 = load double, double* %145
%147 = load double**, double*** %13
%148 = load i32, i32* %19
%149 = sext i32 %148 to i64
%150 = getelementptr inbounds double*, double** %147, i64 %149
%151 = load double*, double** %150
%152 = load i32, i32* %20
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %151, i64 %153
%155 = load double, double* %154
%156 = call double @llvm.fmuladd.f64(double %141, double %146, double %155)
store double %156, double* %154
br label %157
157: ; preds = %132
%158 = load i32, i32* %21
%159 = add nsw i32 %158, 1
store i32 %159, i32* %21
br label %128
160: ; preds = %128
br label %161
161: ; preds = %160
%162 = load i32, i32* %19
%163 = add nsw i32 %162, 1
store i32 %163, i32* %19
br label %115
164: ; preds = %115
br label %165
165: ; preds = %164
%166 = load i32, i32* %20
%167 = add nsw i32 %166, 1
store i32 %167, i32* %20
br label %52
168: ; preds = %52
%169 = load double*, double** %15
%170 = load i32, i32* %11
%171 = call i32 @free_dvector(double* %169, i32 1, i32 %170)
%172 = load double*, double** %16
%173 = load i32, i32* %11
%174 = call i32 @free_dvector(double* %172, i32 1, i32 %173)
%175 = load double*, double** %17
%176 = load i32, i32* %11
%177 = call i32 @free_dvector(double* %175, i32 1, i32 %176)
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 @xtinvAy(double** nocapture %0, double** %1, double** nocapture %2, i32 %3, i32 %4, double** nocapture %5, i32 %6) {
%8 = alloca double
%9 = alloca i32
%10 = bitcast double* %8 to i8*
%11 = bitcast i32* %9 to i8*
%12 = tail call double* @dvector(i32 1, i32 %3)
%13 = tail call double* @dvector(i32 1, i32 %3)
%14 = tail call double* @dvector(i32 1, i32 %3)
%15 = icmp slt i32 %3, 1
br i1 %15, label %134, label %16
16: ; preds = %7
%17 = add nuw i32 %3, 1
%18 = zext i32 %17 to i64
%19 = add nsw i64 %18, -1
%20 = icmp ult i64 %19, 4
br i1 %20, label %101, label %21
21: ; preds = %16
%22 = getelementptr double, double* %13, i64 1
%23 = getelementptr double, double* %13, i64 %18
%24 = getelementptr double, double* %12, i64 1
%25 = getelementptr double, double* %12, i64 %18
%26 = icmp ult double* %22, %25
%27 = icmp ult double* %24, %23
%28 = and i1 %26, %27
br i1 %28, label %101, label %29
29: ; preds = %21
%30 = and i64 %19, -4
%31 = or i64 %30, 1
%32 = add nsw i64 %30, -4
%33 = lshr exact i64 %32, 2
%34 = add nuw nsw i64 %33, 1
%35 = and i64 %34, 3
%36 = icmp ult i64 %32, 12
br i1 %36, label %81, label %37
37: ; preds = %29
%38 = and i64 %34, 9223372036854775804
br label %39
39: ; preds = %39, %37
%40 = phi i64 [ 0, %37 ], [ %78, %39 ]
%41 = phi i64 [ 0, %37 ], [ %79, %39 ]
%42 = or i64 %40, 1
%43 = getelementptr inbounds double, double* %13, i64 %42
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %44
%45 = getelementptr inbounds double, double* %43, i64 2
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %46
%47 = getelementptr inbounds double, double* %12, i64 %42
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %48
%49 = getelementptr inbounds double, double* %47, i64 2
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %50
%51 = or i64 %40, 5
%52 = getelementptr inbounds double, double* %13, i64 %51
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %53
%54 = getelementptr inbounds double, double* %52, i64 2
%55 = bitcast double* %54 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %55
%56 = getelementptr inbounds double, double* %12, i64 %51
%57 = bitcast double* %56 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %57
%58 = getelementptr inbounds double, double* %56, i64 2
%59 = bitcast double* %58 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %59
%60 = or i64 %40, 9
%61 = getelementptr inbounds double, double* %13, i64 %60
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %62
%63 = getelementptr inbounds double, double* %61, i64 2
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %64
%65 = getelementptr inbounds double, double* %12, i64 %60
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %66
%67 = getelementptr inbounds double, double* %65, i64 2
%68 = bitcast double* %67 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %68
%69 = or i64 %40, 13
%70 = getelementptr inbounds double, double* %13, i64 %69
%71 = bitcast double* %70 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %71
%72 = getelementptr inbounds double, double* %70, i64 2
%73 = bitcast double* %72 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %73
%74 = getelementptr inbounds double, double* %12, i64 %69
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %75
%76 = getelementptr inbounds double, double* %74, i64 2
%77 = bitcast double* %76 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %77
%78 = add nuw i64 %40, 16
%79 = add nuw i64 %41, 4
%80 = icmp eq i64 %79, %38
br i1 %80, label %81, label %39
81: ; preds = %39, %29
%82 = phi i64 [ 0, %29 ], [ %78, %39 ]
%83 = icmp eq i64 %35, 0
br i1 %83, label %99, label %84
84: ; preds = %81, %84
%85 = phi i64 [ %96, %84 ], [ %82, %81 ]
%86 = phi i64 [ %97, %84 ], [ 0, %81 ]
%87 = or i64 %85, 1
%88 = getelementptr inbounds double, double* %13, i64 %87
%89 = bitcast double* %88 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %89
%90 = getelementptr inbounds double, double* %88, i64 2
%91 = bitcast double* %90 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %91
%92 = getelementptr inbounds double, double* %12, i64 %87
%93 = bitcast double* %92 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %93
%94 = getelementptr inbounds double, double* %92, i64 2
%95 = bitcast double* %94 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %95
%96 = add nuw i64 %85, 4
%97 = add i64 %86, 1
%98 = icmp eq i64 %97, %35
br i1 %98, label %99, label %84
99: ; preds = %84, %81
%100 = icmp eq i64 %19, %30
br i1 %100, label %134, label %101
101: ; preds = %21, %16, %99
%102 = phi i64 [ 1, %21 ], [ 1, %16 ], [ %31, %99 ]
%103 = sub nsw i64 %18, %102
%104 = xor i64 %102, -1
%105 = add nsw i64 %104, %18
%106 = and i64 %103, 3
%107 = icmp eq i64 %106, 0
br i1 %107, label %116, label %108
108: ; preds = %101, %108
%109 = phi i64 [ %113, %108 ], [ %102, %101 ]
%110 = phi i64 [ %114, %108 ], [ 0, %101 ]
%111 = getelementptr inbounds double, double* %13, i64 %109
store double 0.000000e+00, double* %111
%112 = getelementptr inbounds double, double* %12, i64 %109
store double 0.000000e+00, double* %112
%113 = add nuw nsw i64 %109, 1
%114 = add i64 %110, 1
%115 = icmp eq i64 %114, %106
br i1 %115, label %116, label %108
116: ; preds = %108, %101
%117 = phi i64 [ %102, %101 ], [ %113, %108 ]
%118 = icmp ult i64 %105, 3
br i1 %118, label %134, label %119
119: ; preds = %116, %119
%120 = phi i64 [ %132, %119 ], [ %117, %116 ]
%121 = getelementptr inbounds double, double* %13, i64 %120
store double 0.000000e+00, double* %121
%122 = getelementptr inbounds double, double* %12, i64 %120
store double 0.000000e+00, double* %122
%123 = add nuw nsw i64 %120, 1
%124 = getelementptr inbounds double, double* %13, i64 %123
store double 0.000000e+00, double* %124
%125 = getelementptr inbounds double, double* %12, i64 %123
store double 0.000000e+00, double* %125
%126 = add nuw nsw i64 %120, 2
%127 = getelementptr inbounds double, double* %13, i64 %126
store double 0.000000e+00, double* %127
%128 = getelementptr inbounds double, double* %12, i64 %126
store double 0.000000e+00, double* %128
%129 = add nuw nsw i64 %120, 3
%130 = getelementptr inbounds double, double* %13, i64 %129
store double 0.000000e+00, double* %130
%131 = getelementptr inbounds double, double* %12, i64 %129
store double 0.000000e+00, double* %131
%132 = add nuw nsw i64 %120, 4
%133 = icmp eq i64 %132, %18
br i1 %133, label %134, label %119
134: ; preds = %116, %119, %99, %7
%135 = call i32 @ldl_dcmp(double** %1, i32 %3, double* %12, double* %14, double* %13, i32 1, i32 0, i32* %9)
%136 = icmp slt i32 %4, 1
br i1 %136, label %265, label %137
137: ; preds = %134
%138 = icmp eq i32 %6, 0
%139 = add i32 %3, 1
%140 = add nuw i32 %4, 1
%141 = zext i32 %140 to i64
%142 = zext i32 %139 to i64
%143 = add nsw i64 %142, -1
%144 = add nsw i64 %142, -2
%145 = and i64 %143, 3
%146 = icmp ult i64 %144, 3
%147 = and i64 %143, -4
%148 = icmp eq i64 %145, 0
%149 = and i64 %143, 1
%150 = icmp eq i64 %144, 0
%151 = and i64 %143, -2
%152 = icmp eq i64 %149, 0
br label %153
153: ; preds = %137, %262
%154 = phi i64 [ 1, %137 ], [ %263, %262 ]
br i1 %15, label %198, label %155
155: ; preds = %153
br i1 %146, label %185, label %156
156: ; preds = %155, %156
%157 = phi i64 [ %182, %156 ], [ 1, %155 ]
%158 = phi i64 [ %183, %156 ], [ 0, %155 ]
%159 = getelementptr inbounds double*, double** %2, i64 %157
%160 = load double*, double** %159
%161 = getelementptr inbounds double, double* %160, i64 %154
%162 = load double, double* %161
%163 = getelementptr inbounds double, double* %14, i64 %157
store double %162, double* %163
%164 = add nuw nsw i64 %157, 1
%165 = getelementptr inbounds double*, double** %2, i64 %164
%166 = load double*, double** %165
%167 = getelementptr inbounds double, double* %166, i64 %154
%168 = load double, double* %167
%169 = getelementptr inbounds double, double* %14, i64 %164
store double %168, double* %169
%170 = add nuw nsw i64 %157, 2
%171 = getelementptr inbounds double*, double** %2, i64 %170
%172 = load double*, double** %171
%173 = getelementptr inbounds double, double* %172, i64 %154
%174 = load double, double* %173
%175 = getelementptr inbounds double, double* %14, i64 %170
store double %174, double* %175
%176 = add nuw nsw i64 %157, 3
%177 = getelementptr inbounds double*, double** %2, i64 %176
%178 = load double*, double** %177
%179 = getelementptr inbounds double, double* %178, i64 %154
%180 = load double, double* %179
%181 = getelementptr inbounds double, double* %14, i64 %176
store double %180, double* %181
%182 = add nuw nsw i64 %157, 4
%183 = add i64 %158, 4
%184 = icmp eq i64 %183, %147
br i1 %184, label %185, label %156
185: ; preds = %156, %155
%186 = phi i64 [ 1, %155 ], [ %182, %156 ]
br i1 %148, label %198, label %187
187: ; preds = %185, %187
%188 = phi i64 [ %195, %187 ], [ %186, %185 ]
%189 = phi i64 [ %196, %187 ], [ 0, %185 ]
%190 = getelementptr inbounds double*, double** %2, i64 %188
%191 = load double*, double** %190
%192 = getelementptr inbounds double, double* %191, i64 %154
%193 = load double, double* %192
%194 = getelementptr inbounds double, double* %14, i64 %188
store double %193, double* %194
%195 = add nuw nsw i64 %188, 1
%196 = add i64 %189, 1
%197 = icmp eq i64 %196, %145
br i1 %197, label %198, label %187
198: ; preds = %185, %187, %153
%199 = call i32 @ldl_dcmp(double** %1, i32 %3, double* %12, double* %14, double* %13, i32 0, i32 1, i32* %9)
br i1 %138, label %203, label %200
200: ; preds = %198
%201 = load i32, i32* @stdout
%202 = call i32 (i32, i8*, ...) @fprintf(i32 %201, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
br label %203
203: ; preds = %200, %198
store i32 1, i32* %9
store double 1.000000e+00, double* %8
br label %204
204: ; preds = %209, %203
%205 = call i32 @ldl_mprove(double** %1, i32 %3, double* %12, double* %14, double* %13, double* %8, i32* %9)
br i1 %138, label %206, label %210
206: ; preds = %204
%207 = load i32, i32* %9
%208 = icmp eq i32 %207, 0
br i1 %208, label %219, label %209
209: ; preds = %206, %210
br label %204
210: ; preds = %204
%211 = load i32, i32* @stdout
%212 = load double, double* %8
%213 = call i32 (i32, i8*, ...) @fprintf(i32 %211, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %212)
%214 = load i32, i32* %9
%215 = icmp eq i32 %214, 0
br i1 %215, label %216, label %209
216: ; preds = %210
%217 = load i32, i32* @stdout
%218 = call i32 (i32, i8*, ...) @fprintf(i32 %217, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %219
219: ; preds = %206, %216
br label %220
220: ; preds = %219, %259
%221 = phi i64 [ %260, %259 ], [ 1, %219 ]
%222 = getelementptr inbounds double*, double** %5, i64 %221
%223 = load double*, double** %222
%224 = getelementptr inbounds double, double* %223, i64 %154
store double 0.000000e+00, double* %224
br i1 %15, label %259, label %225
225: ; preds = %220
br i1 %150, label %248, label %226
226: ; preds = %225, %226
%227 = phi double [ %244, %226 ], [ 0.000000e+00, %225 ]
%228 = phi i64 [ %245, %226 ], [ 1, %225 ]
%229 = phi i64 [ %246, %226 ], [ 0, %225 ]
%230 = getelementptr inbounds double*, double** %0, i64 %228
%231 = load double*, double** %230
%232 = getelementptr inbounds double, double* %231, i64 %221
%233 = load double, double* %232
%234 = getelementptr inbounds double, double* %13, i64 %228
%235 = load double, double* %234
%236 = call double @llvm.fmuladd.f64(double %233, double %235, double %227)
store double %236, double* %224
%237 = add nuw nsw i64 %228, 1
%238 = getelementptr inbounds double*, double** %0, i64 %237
%239 = load double*, double** %238
%240 = getelementptr inbounds double, double* %239, i64 %221
%241 = load double, double* %240
%242 = getelementptr inbounds double, double* %13, i64 %237
%243 = load double, double* %242
%244 = call double @llvm.fmuladd.f64(double %241, double %243, double %236)
store double %244, double* %224
%245 = add nuw nsw i64 %228, 2
%246 = add i64 %229, 2
%247 = icmp eq i64 %246, %151
br i1 %247, label %248, label %226
248: ; preds = %226, %225
%249 = phi double [ 0.000000e+00, %225 ], [ %244, %226 ]
%250 = phi i64 [ 1, %225 ], [ %245, %226 ]
br i1 %152, label %259, label %251
251: ; preds = %248
%252 = getelementptr inbounds double*, double** %0, i64 %250
%253 = load double*, double** %252
%254 = getelementptr inbounds double, double* %253, i64 %221
%255 = load double, double* %254
%256 = getelementptr inbounds double, double* %13, i64 %250
%257 = load double, double* %256
%258 = call double @llvm.fmuladd.f64(double %255, double %257, double %249)
store double %258, double* %224
br label %259
259: ; preds = %251, %248, %220
%260 = add nuw nsw i64 %221, 1
%261 = icmp eq i64 %260, %141
br i1 %261, label %262, label %220
262: ; preds = %259
%263 = add nuw nsw i64 %154, 1
%264 = icmp eq i64 %263, %141
br i1 %264, label %265, label %153
265: ; preds = %262, %134
%266 = call i32 @free_dvector(double* %12, i32 1, i32 %3)
%267 = call i32 @free_dvector(double* %13, i32 1, i32 %3)
%268 = call i32 @free_dvector(double* %14, i32 1, i32 %3)
ret void
}