#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*/ stderr;
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);
  if (*ok < 0) {
    fprintf(stderr, " Make sure that all six");
    fprintf(stderr, " rigid body translations are restrained!\n");
  }
  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>
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
jge    1251 <invAB+0x101>
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
lea    0xdd5(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2d9f(%rip),%rax
mov    (%rax),%edi
lea    0xdd6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     13dd <invAB+0x28d>
movl   $0x1,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     12a7 <invAB+0x157>
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    126b <invAB+0x11b>
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     12f3 <invAB+0x1a3>
mov    0x2cf5(%rip),%rax
mov    (%rax),%edi
lea    0xd5e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
movsd  0xcfb(%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     1354 <invAB+0x204>
mov    0x2c99(%rip),%rax
mov    (%rax),%edi
movsd  -0x48(%rbp),%xmm0
lea    0xd1c(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
jmp    1359 <invAB+0x209>
mov    -0x28(%rbp),%rax
cmpl   $0x0,(%rax)
jne    130a <invAB+0x1ba>
cmpl   $0x0,0x10(%rbp)
je     1387 <invAB+0x237>
mov    0x2c61(%rip),%rax
mov    (%rax),%edi
lea    0xcc8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x1,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     13ca <invAB+0x27a>
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    138e <invAB+0x23e>
jmp    13cf <invAB+0x27f>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    1258 <invAB+0x108>
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,%r15
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,(%rbx)
jns    13c7 <invAB+0x277>
mov    0x2c3d(%rip),%r12
mov    (%r12),%edi
lea    0xc52(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%edi
lea    0xc58(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
cmpl   $0x0,0x8(%rsp)
jle    168d <invAB+0x53d>
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,%r13d
jmp    142f <invAB+0x2df>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%r13
cmp    0x8(%rsp),%r13
je     168d <invAB+0x53d>
cmpl   $0x0,(%rsp)
jle    14e8 <invAB+0x398>
mov    $0x1,%eax
cmpq   $0x3,0x30(%rsp)
jb     14b5 <invAB+0x365>
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,%r13,8),%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
mov    0x10(%rdx,%rax,8),%rcx
movsd  (%rcx,%r13,8),%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
mov    0x18(%rdx,%rax,8),%rcx
movsd  (%rcx,%r13,8),%xmm0
movsd  %xmm0,0x18(%r14,%rax,8)
mov    0x20(%rdx,%rax,8),%rcx
movsd  (%rcx,%r13,8),%xmm0
movsd  %xmm0,0x20(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%rsi
jne    1460 <invAB+0x310>
add    $0x1,%rax
test   %r12,%r12
je     14e8 <invAB+0x398>
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,%r13,8),%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r12
jne    14d0 <invAB+0x380>
mov    0x10(%rsp),%rdi
mov    (%rsp),%rsi
mov    %r15,%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     152a <invAB+0x3da>
mov    0x2abe(%rip),%rax
mov    (%rax),%edi
lea    0xb1f(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
movl   $0x1,(%rbx)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x38(%rsp)
jmp    1555 <invAB+0x405>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpl   $0x0,(%rbx)
je     15be <invAB+0x46e>
sub    $0x8,%rsp
mov    0x18(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    %r15,%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     1550 <invAB+0x400>
mov    0x2a4c(%rip),%rax
mov    (%rax),%edi
movsd  0x38(%rsp),%xmm0
lea    0xac6(%rip),%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
cmpl   $0x0,(%rbx)
jne    1555 <invAB+0x405>
mov    0x2a2a(%rip),%rax
mov    (%rax),%edi
lea    0xa89(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
cmpl   $0x0,(%rsp)
jle    1420 <invAB+0x2d0>
mov    $0x1,%eax
cmpq   $0x3,0x30(%rsp)
jb     1641 <invAB+0x4f1>
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,%r13,8)
movsd  0x10(%rbp,%rax,8),%xmm0
mov    0x10(%rdx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r13,8)
movsd  0x18(%rbp,%rax,8),%xmm0
mov    0x18(%rdx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r13,8)
movsd  0x20(%rbp,%rax,8),%xmm0
mov    0x20(%rdx,%rax,8),%rcx
movsd  %xmm0,(%rcx,%r13,8)
add    $0x4,%rax
cmp    %rax,%rsi
jne    15f0 <invAB+0x4a0>
add    $0x1,%rax
testb  $0x3,0x40(%rsp)
je     1420 <invAB+0x2d0>
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,%r13,8)
add    $0x1,%rdx
cmp    %rdx,%r12
jne    1670 <invAB+0x520>
jmp    1420 <invAB+0x2d0>
mov    %r15,%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):
@stderr = global i32 0
@.str = [24 x i8] c" Make sure that all six\00"
@.str.1 = [42 x i8] c" rigid body translations are restrained!\0A\00"
@stdout = global i32 0
@.str.2 = [31 x i8] c" LDL' RMS matrix precision:\00"
@.str.3 = [6 x i8] c"%9.2e\00"
@.str.4 = [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)
%52 = load i32*, i32** %13
%53 = load i32, i32* %52
%54 = icmp slt i32 %53, 0
br i1 %54, label %55, label %60
55: ; preds = %44
%56 = load i32, i32* @stderr
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%58 = load i32, i32* @stderr
%59 = call i32 (i32, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %60
60: ; preds = %55, %44
store i32 1, i32* %20
br label %61
61: ; preds = %150, %60
%62 = load i32, i32* %20
%63 = load i32, i32* %11
%64 = icmp sle i32 %62, %63
br i1 %64, label %65, label %153
65: ; preds = %61
store i32 1, i32* %21
br label %66
66: ; preds = %84, %65
%67 = load i32, i32* %21
%68 = load i32, i32* %10
%69 = icmp sle i32 %67, %68
br i1 %69, label %70, label %87
70: ; preds = %66
%71 = load double**, double*** %9
%72 = load i32, i32* %21
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double*, double** %71, i64 %73
%75 = load double*, double** %74
%76 = load i32, i32* %20
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds double, double* %75, i64 %77
%79 = load double, double* %78
%80 = load double*, double** %16
%81 = load i32, i32* %21
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds double, double* %80, i64 %82
store double %79, double* %83
br label %84
84: ; preds = %70
%85 = load i32, i32* %21
%86 = add nsw i32 %85, 1
store i32 %86, i32* %21
br label %66
87: ; preds = %66
%88 = load double**, double*** %8
%89 = load i32, i32* %10
%90 = load double*, double** %15
%91 = load double*, double** %16
%92 = load double*, double** %17
%93 = load i32*, i32** %13
%94 = call i32 @ldl_dcmp(double** %88, i32 %89, double* %90, double* %91, double* %92, i32 0, i32 1, i32* %93)
%95 = load i32, i32* %14
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %100
97: ; preds = %87
%98 = load i32, i32* @stdout
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %100
100: ; preds = %97, %87
%101 = load i32*, i32** %13
store i32 1, i32* %101
store double 1.000000e+00, double* %18
br label %102
102: ; preds = %117, %100
%103 = load double**, double*** %8
%104 = load i32, i32* %10
%105 = load double*, double** %15
%106 = load double*, double** %16
%107 = load double*, double** %17
%108 = load i32*, i32** %13
%109 = call i32 @ldl_mprove(double** %103, i32 %104, double* %105, double* %106, double* %107, double* %18, i32* %108)
%110 = load i32, i32* %14
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %116
112: ; preds = %102
%113 = load i32, i32* @stdout
%114 = load double, double* %18
%115 = call i32 (i32, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %114)
br label %116
116: ; preds = %112, %102
br label %117
117: ; preds = %116
%118 = load i32*, i32** %13
%119 = load i32, i32* %118
%120 = icmp ne i32 %119, 0
br i1 %120, label %102, label %121
121: ; preds = %117
%122 = load i32, i32* %14
%123 = icmp ne i32 %122, 0
br i1 %123, label %124, label %127
124: ; preds = %121
%125 = load i32, i32* @stdout
%126 = call i32 (i32, i8*, ...) @fprintf(i32 %125, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %127
127: ; preds = %124, %121
store i32 1, i32* %19
br label %128
128: ; preds = %146, %127
%129 = load i32, i32* %19
%130 = load i32, i32* %10
%131 = icmp sle i32 %129, %130
br i1 %131, label %132, label %149
132: ; preds = %128
%133 = load double*, double** %17
%134 = load i32, i32* %19
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %133, i64 %135
%137 = load double, double* %136
%138 = load double**, double*** %12
%139 = load i32, i32* %19
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double*, double** %138, i64 %140
%142 = load double*, double** %141
%143 = load i32, i32* %20
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double, double* %142, i64 %144
store double %137, double* %145
br label %146
146: ; preds = %132
%147 = load i32, i32* %19
%148 = add nsw i32 %147, 1
store i32 %148, i32* %19
br label %128
149: ; preds = %128
br label %150
150: ; preds = %149
%151 = load i32, i32* %20
%152 = add nsw i32 %151, 1
store i32 %152, i32* %20
br label %61
153: ; preds = %61
%154 = load double*, double** %15
%155 = load i32, i32* %10
%156 = call i32 @free_dvector(double* %154, i32 1, i32 %155)
%157 = load double*, double** %17
%158 = load i32, i32* %10
%159 = call i32 @free_dvector(double* %157, i32 1, i32 %158)
%160 = load double*, double** %16
%161 = load i32, i32* %10
%162 = call i32 @free_dvector(double* %160, i32 1, i32 %161)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c" Make sure that all six\00"
@.str.1 = [42 x i8] c" rigid body translations are restrained!\0A\00"
@stdout = global i32 0
@.str.2 = [31 x i8] c" LDL' RMS matrix precision:\00"
@.str.3 = [6 x i8] c"%9.2e\00"
@.str.4 = [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 = load i32, i32* %5
%135 = icmp slt i32 %134, 0
br i1 %135, label %136, label %141
136: ; preds = %132
%137 = load i32, i32* @stderr
%138 = tail call i32 (i32, i8*, ...) @fprintf(i32 %137, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%139 = load i32, i32* @stderr
%140 = tail call i32 (i32, i8*, ...) @fprintf(i32 %139, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
br label %141
141: ; preds = %136, %132
%142 = icmp slt i32 %3, 1
br i1 %142, label %272, label %143
143: ; preds = %141
%144 = icmp eq i32 %6, 0
%145 = add i32 %2, 1
%146 = add nuw i32 %3, 1
%147 = zext i32 %146 to i64
%148 = zext i32 %145 to i64
%149 = add nsw i64 %148, -1
%150 = add nsw i64 %148, -2
%151 = and i64 %149, 3
%152 = icmp ult i64 %150, 3
%153 = and i64 %149, -4
%154 = icmp eq i64 %151, 0
%155 = and i64 %149, 3
%156 = icmp ult i64 %150, 3
%157 = and i64 %149, -4
%158 = icmp eq i64 %155, 0
br label %159
159: ; preds = %143, %269
%160 = phi i64 [ 1, %143 ], [ %270, %269 ]
br i1 %13, label %204, label %161
161: ; preds = %159
br i1 %152, label %191, label %162
162: ; preds = %161, %162
%163 = phi i64 [ %188, %162 ], [ 1, %161 ]
%164 = phi i64 [ %189, %162 ], [ 0, %161 ]
%165 = getelementptr inbounds double*, double** %1, i64 %163
%166 = load double*, double** %165
%167 = getelementptr inbounds double, double* %166, i64 %160
%168 = load double, double* %167
%169 = getelementptr inbounds double, double* %12, i64 %163
store double %168, double* %169
%170 = add nuw nsw i64 %163, 1
%171 = getelementptr inbounds double*, double** %1, i64 %170
%172 = load double*, double** %171
%173 = getelementptr inbounds double, double* %172, i64 %160
%174 = load double, double* %173
%175 = getelementptr inbounds double, double* %12, i64 %170
store double %174, double* %175
%176 = add nuw nsw i64 %163, 2
%177 = getelementptr inbounds double*, double** %1, i64 %176
%178 = load double*, double** %177
%179 = getelementptr inbounds double, double* %178, i64 %160
%180 = load double, double* %179
%181 = getelementptr inbounds double, double* %12, i64 %176
store double %180, double* %181
%182 = add nuw nsw i64 %163, 3
%183 = getelementptr inbounds double*, double** %1, i64 %182
%184 = load double*, double** %183
%185 = getelementptr inbounds double, double* %184, i64 %160
%186 = load double, double* %185
%187 = getelementptr inbounds double, double* %12, i64 %182
store double %186, double* %187
%188 = add nuw nsw i64 %163, 4
%189 = add i64 %164, 4
%190 = icmp eq i64 %189, %153
br i1 %190, label %191, label %162
191: ; preds = %162, %161
%192 = phi i64 [ 1, %161 ], [ %188, %162 ]
br i1 %154, label %204, label %193
193: ; preds = %191, %193
%194 = phi i64 [ %201, %193 ], [ %192, %191 ]
%195 = phi i64 [ %202, %193 ], [ 0, %191 ]
%196 = getelementptr inbounds double*, double** %1, i64 %194
%197 = load double*, double** %196
%198 = getelementptr inbounds double, double* %197, i64 %160
%199 = load double, double* %198
%200 = getelementptr inbounds double, double* %12, i64 %194
store double %199, double* %200
%201 = add nuw nsw i64 %194, 1
%202 = add i64 %195, 1
%203 = icmp eq i64 %202, %151
br i1 %203, label %204, label %193
204: ; preds = %191, %193, %159
%205 = call i32 @ldl_dcmp(double** %0, i32 %2, double* %10, double* %12, double* %11, i32 0, i32 1, i32* %5)
br i1 %144, label %209, label %206
206: ; preds = %204
%207 = load i32, i32* @stdout
%208 = call i32 (i32, i8*, ...) @fprintf(i32 %207, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %209
209: ; preds = %206, %204
store i32 1, i32* %5
store double 1.000000e+00, double* %8
br label %210
210: ; preds = %215, %209
%211 = call i32 @ldl_mprove(double** %0, i32 %2, double* %10, double* %12, double* %11, double* %8, i32* %5)
br i1 %144, label %212, label %216
212: ; preds = %210
%213 = load i32, i32* %5
%214 = icmp eq i32 %213, 0
br i1 %214, label %225, label %215
215: ; preds = %212, %216
br label %210
216: ; preds = %210
%217 = load i32, i32* @stdout
%218 = load double, double* %8
%219 = call i32 (i32, i8*, ...) @fprintf(i32 %217, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), double %218)
%220 = load i32, i32* %5
%221 = icmp eq i32 %220, 0
br i1 %221, label %222, label %215
222: ; preds = %216
%223 = load i32, i32* @stdout
%224 = call i32 (i32, i8*, ...) @fprintf(i32 %223, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %225
225: ; preds = %212, %222
br i1 %13, label %269, label %226
226: ; preds = %225
br i1 %156, label %256, label %227
227: ; preds = %226, %227
%228 = phi i64 [ %253, %227 ], [ 1, %226 ]
%229 = phi i64 [ %254, %227 ], [ 0, %226 ]
%230 = getelementptr inbounds double, double* %11, i64 %228
%231 = load double, double* %230
%232 = getelementptr inbounds double*, double** %4, i64 %228
%233 = load double*, double** %232
%234 = getelementptr inbounds double, double* %233, i64 %160
store double %231, double* %234
%235 = add nuw nsw i64 %228, 1
%236 = getelementptr inbounds double, double* %11, i64 %235
%237 = load double, double* %236
%238 = getelementptr inbounds double*, double** %4, i64 %235
%239 = load double*, double** %238
%240 = getelementptr inbounds double, double* %239, i64 %160
store double %237, double* %240
%241 = add nuw nsw i64 %228, 2
%242 = getelementptr inbounds double, double* %11, i64 %241
%243 = load double, double* %242
%244 = getelementptr inbounds double*, double** %4, i64 %241
%245 = load double*, double** %244
%246 = getelementptr inbounds double, double* %245, i64 %160
store double %243, double* %246
%247 = add nuw nsw i64 %228, 3
%248 = getelementptr inbounds double, double* %11, i64 %247
%249 = load double, double* %248
%250 = getelementptr inbounds double*, double** %4, i64 %247
%251 = load double*, double** %250
%252 = getelementptr inbounds double, double* %251, i64 %160
store double %249, double* %252
%253 = add nuw nsw i64 %228, 4
%254 = add i64 %229, 4
%255 = icmp eq i64 %254, %157
br i1 %255, label %256, label %227
256: ; preds = %227, %226
%257 = phi i64 [ 1, %226 ], [ %253, %227 ]
br i1 %158, label %269, label %258
258: ; preds = %256, %258
%259 = phi i64 [ %266, %258 ], [ %257, %256 ]
%260 = phi i64 [ %267, %258 ], [ 0, %256 ]
%261 = getelementptr inbounds double, double* %11, i64 %259
%262 = load double, double* %261
%263 = getelementptr inbounds double*, double** %4, i64 %259
%264 = load double*, double** %263
%265 = getelementptr inbounds double, double* %264, i64 %160
store double %262, double* %265
%266 = add nuw nsw i64 %259, 1
%267 = add i64 %260, 1
%268 = icmp eq i64 %267, %155
br i1 %268, label %269, label %258
269: ; preds = %256, %258, %225
%270 = add nuw nsw i64 %160, 1
%271 = icmp eq i64 %270, %147
br i1 %271, label %272, label %159
272: ; preds = %269, %141
%273 = call i32 @free_dvector(double* %10, i32 1, i32 %2)
%274 = call i32 @free_dvector(double* %11, i32 1, i32 %2)
%275 = call i32 @free_dvector(double* %12, i32 1, i32 %2)
ret void
}