#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ error1(char *);
double fabs(double);
void ludcmp(double **a, int n, int *indx, double *d) {
  int i, imax = 0, j, k;
  double big, dum, sum, temp;
  double vv[n];
  *d = 1.0;
  for (i = 0; i < n; i++) {
    big = 0.0;
    for (j = 0; j < n; j++)
      if ((temp = fabs((*((double *)a + i * n + j)))) > big)
        big = temp;
    if (big == 0.0)
      error1("Singular matrix in routine ludcmp");
    vv[i] = 1.0 / big;
  }
  for (j = 0; j < n; j++) {
    for (i = 0; i < j; i++) {
      sum = (*((double *)a + i * n + j));
      for (k = 0; k < i; k++)
        sum -= (*((double *)a + i * n + k)) * (*((double *)a + k * n + j));
      (*((double *)a + i * n + j)) = sum;
    }
    big = 0.0;
    for (i = j; i < n; i++) {
      sum = (*((double *)a + i * n + j));
      for (k = 0; k < j; k++)
        sum -= (*((double *)a + i * n + k)) * (*((double *)a + k * n + j));
      (*((double *)a + i * n + j)) = sum;
      if ((dum = vv[i] * fabs(sum)) >= big) {
        big = dum;
        imax = i;
      }
    }
    if (j != imax) {
      for (k = 0; k < n; k++) {
        dum = (*((double *)a + imax * n + k));
        (*((double *)a + imax * n + k)) = (*((double *)a + j * n + k));
        (*((double *)a + j * n + k)) = dum;
      }
      *d = -(*d);
      vv[imax] = vv[j];
    }
    indx[j] = imax;
    if (fabs((*((double *)a + j * n + j))) < 0.00000000000000000001)
      ((*((double *)a + j * n + j))) = 0.00000000000000000001;
    if (j != (n - 1)) {
      dum = 1.0 / (*((double *)a + j * n + j));
      for (i = j + 1; i < n; i++)
        (*((double *)a + i * n + j)) *= dum;
    }
  }
}


x86 assembly (clang, -O0):
<ludcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x58(%rbp)
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x68(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x60(%rbp)
mov    -0x20(%rbp),%rax
movsd  0xe9f(%rip),%xmm0
movsd  %xmm0,(%rax)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1235 <ludcmp+0x125>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11e9 <ludcmp+0xd9>
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe58(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
ucomisd -0x38(%rbp),%xmm0
jbe    11d6 <ludcmp+0xc6>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    11db <ludcmp+0xcb>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1187 <ludcmp+0x77>
movsd  -0x38(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    120d <ludcmp+0xfd>
jp     120d <ludcmp+0xfd>
lea    0xe18(%rip),%rdi
call   1030 <error1@plt>
mov    -0x68(%rbp),%rax
movsd  0xde7(%rip),%xmm0
divsd  -0x38(%rbp),%xmm0
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    116c <ludcmp+0x5c>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1669 <ludcmp+0x559>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1335 <ludcmp+0x225>
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1304 <ludcmp+0x1f4>
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1285 <ludcmp+0x175>
movsd  -0x48(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    124f <ludcmp+0x13f>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    146f <ludcmp+0x35f>
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13f8 <ludcmp+0x2e8>
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x48(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1379 <ludcmp+0x269>
mov    -0x68(%rbp),%rax
movsd  -0x48(%rbp),%xmm0
mov    -0x8(%rbp),%rcx
mov    -0x24(%rbp),%edx
imul   -0xc(%rbp),%edx
movslq %edx,%rdx
shl    $0x3,%rdx
add    %rdx,%rcx
movslq -0x2c(%rbp),%rdx
movsd  %xmm0,(%rcx,%rdx,8)
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x48(%rbp),%xmm1
movaps 0xbdc(%rip),%xmm2
pand   %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
ucomisd -0x38(%rbp),%xmm0
jb     145c <ludcmp+0x34c>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    1461 <ludcmp+0x351>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1343 <ludcmp+0x233>
mov    -0x2c(%rbp),%eax
cmp    -0x28(%rbp),%eax
je     155b <ludcmp+0x44b>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    151e <ludcmp+0x40e>
mov    -0x8(%rbp),%rax
mov    -0x28(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x28(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1482 <ludcmp+0x372>
mov    -0x68(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsd  (%rcx),%xmm0
movq   %xmm0,%rcx
movabs $0x8000000000000000,%rdx
xor    %rdx,%rcx
movq   %rcx,%xmm0
mov    -0x20(%rbp),%rcx
movsd  %xmm0,(%rcx)
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%edx
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xa82(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xa6e(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    15ca <ludcmp+0x4ba>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  0xa43(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     1656 <ludcmp+0x546>
mov    -0x8(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  0xa04(%rip),%xmm0
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1651 <ludcmp+0x541>
movsd  -0x40(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x24(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    160f <ludcmp+0x4ff>
jmp    1656 <ludcmp+0x546>
jmp    165b <ludcmp+0x54b>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    123c <ludcmp+0x12c>
mov    -0x58(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ludcmp>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %rdx,-0xb8(%rbp)
mov    %esi,%eax
mov    %rsp,%rdx
mov    %rax,-0x30(%rbp)
lea    0xf(,%rax,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdx
mov    %rdx,-0x58(%rbp)
mov    %rdx,%rsp
movabs $0x3ff0000000000000,%rax
mov    %rcx,-0xb0(%rbp)
mov    %rax,(%rcx)
mov    %rsi,-0x40(%rbp)
test   %esi,%esi
jle    1851 <ludcmp+0x741>
mov    -0x30(%rbp),%rax
lea    -0x1(%rax),%rcx
mov    %rcx,-0x50(%rbp)
mov    %eax,%r14d
and    $0x3,%r14d
mov    %eax,%r12d
and    $0xfffffffc,%r12d
mov    %rdi,%r15
lea    0x18(%rdi),%r13
lea    0x0(,%rax,8),%rcx
mov    %rcx,-0x48(%rbp)
xor    %ebx,%ebx
movapd 0xe5f(%rip),%xmm6
movapd 0xe57(%rip),%xmm5
mov    %rdi,-0x38(%rbp)
mov    %rax,%rdx
jmp    11ec <ludcmp+0xdc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0xe58(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x58(%rbp),%rax
movsd  %xmm0,(%rax,%rbx,8)
add    $0x1,%rbx
mov    -0x48(%rbp),%rax
add    %rax,%r13
add    %rax,%r15
cmp    %rdx,%rbx
je     12cd <ludcmp+0x1bd>
cmpq   $0x3,-0x50(%rbp)
jae    1200 <ludcmp+0xf0>
xor    %eax,%eax
xorpd  %xmm0,%xmm0
jmp    1259 <ludcmp+0x149>
nopl   0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movsd  -0x18(%r13,%rax,8),%xmm2
movsd  -0x10(%r13,%rax,8),%xmm3
movsd  -0x8(%r13,%rax,8),%xmm4
movsd  0x0(%r13,%rax,8),%xmm0
andpd  %xmm5,%xmm2
maxsd  %xmm1,%xmm2
andpd  %xmm5,%xmm3
maxsd  %xmm2,%xmm3
andpd  %xmm5,%xmm4
maxsd  %xmm3,%xmm4
andpd  %xmm5,%xmm0
maxsd  %xmm4,%xmm0
add    $0x4,%rax
movapd %xmm0,%xmm1
cmp    %rax,%r12
jne    1210 <ludcmp+0x100>
movapd %xmm0,%xmm1
test   %r14,%r14
je     128a <ludcmp+0x17a>
lea    (%r15,%rax,8),%rax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movsd  (%rax,%rcx,8),%xmm1
andpd  %xmm6,%xmm1
maxsd  %xmm0,%xmm1
add    $0x1,%rcx
movapd %xmm1,%xmm0
cmp    %rcx,%r14
jne    1270 <ludcmp+0x160>
ucomisd 0xd9e(%rip),%xmm1
jne    11c0 <ludcmp+0xb0>
jp     11c0 <ludcmp+0xb0>
lea    0xd93(%rip),%rdi
movapd %xmm1,-0x70(%rbp)
call   1030 <error1@plt>
movapd -0x70(%rbp),%xmm1
movapd 0xd44(%rip),%xmm5
movapd 0xd3c(%rip),%xmm6
mov    -0x30(%rbp),%rdx
jmp    11c0 <ludcmp+0xb0>
cmpl   $0x0,-0x40(%rbp)
mov    -0x38(%rbp),%r13
jle    1851 <ludcmp+0x741>
mov    -0x40(%rbp),%rax
add    $0xffffffff,%eax
mov    %rax,-0x50(%rbp)
mov    -0x30(%rbp),%rax
lea    0x0(,%rax,8),%rcx
add    %r13,%rcx
mov    %rcx,-0xa0(%rbp)
mov    %eax,%ecx
and    $0xfffffffc,%ecx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x98(%rbp)
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %eax,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,-0x88(%rbp)
mov    %rdx,%rcx
mov    %rdx,-0x90(%rbp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,-0x80(%rbp)
mov    %eax,%ecx
and    $0x3,%ecx
lea    0x8(%r13),%rdx
mov    %rdx,-0x70(%rbp)
lea    0x0(,%rax,8),%rsi
mov    %rax,%r15
shl    $0x4,%r15
lea    0x30(%r13),%rdx
mov    %rdx,-0x78(%rbp)
lea    0x18(%r13),%rdx
mov    %rdx,-0xa8(%rbp)
lea    0x0(,%rax,8),%r9
add    %r13,%r9
movsd  0xcb1(%rip),%xmm0
movapd 0xc91(%rip),%xmm1
xor    %r14d,%r14d
mov    $0x1,%r10d
xor    %r11d,%r11d
mov    %rcx,-0x48(%rbp)
jmp    13ba <ludcmp+0x2aa>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
mov    %r14,%rax
add    $0x1,%r10
add    %rsi,%r9
mov    %rax,%r14
cmp    %rdi,%rax
je     1851 <ludcmp+0x741>
test   %r14,%r14
mov    -0x30(%rbp),%rdi
je     1480 <ludcmp+0x370>
lea    0x0(,%r14,8),%r8
add    %r13,%r8
mov    -0x70(%rbp),%rcx
xor    %edx,%edx
jmp    13f6 <ludcmp+0x2e6>
nopw   0x0(%rax,%rax,1)
movsd  %xmm2,(%r12,%r14,8)
add    $0x1,%rdx
add    %rsi,%rcx
cmp    %r14,%rdx
je     1480 <ludcmp+0x370>
mov    %rdx,%rax
imul   %rdi,%rax
lea    0x0(,%rax,8),%r12
add    %r13,%r12
movsd  (%r12,%r14,8),%xmm2
test   %rdx,%rdx
je     13e0 <ludcmp+0x2d0>
cmp    $0x1,%rdx
jne    1420 <ludcmp+0x310>
xor    %eax,%eax
jmp    1458 <ludcmp+0x348>
nopl   (%rax)
mov    %rdx,%rbx
and    $0xfffffffffffffffe,%rbx
mov    %r8,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsd  -0x8(%rcx,%rax,8),%xmm3
mulsd  (%rdi),%xmm3
movsd  (%rcx,%rax,8),%xmm4
subsd  %xmm3,%xmm2
mulsd  (%rdi,%rsi,1),%xmm4
subsd  %xmm4,%xmm2
add    $0x2,%rax
add    %r15,%rdi
cmp    %rax,%rbx
jne    1430 <ludcmp+0x320>
test   $0x1,%dl
mov    -0x30(%rbp),%rdi
je     13e0 <ludcmp+0x2d0>
movsd  (%r12,%rax,8),%xmm3
imul   %rdi,%rax
mulsd  (%r8,%rax,8),%xmm3
subsd  %xmm3,%xmm2
jmp    13e0 <ludcmp+0x2d0>
xchg   %ax,%ax
lea    0x0(,%r14,8),%rcx
add    %r13,%rcx
mov    %r14,%rax
and    $0xfffffffffffffffe,%rax
mov    %rdi,%r8
imul   %r14,%r8
mov    -0x70(%rbp),%rdx
lea    (%rdx,%r8,8),%rbx
xorpd  %xmm2,%xmm2
mov    %r14,%r13
jmp    14fd <ludcmp+0x3ed>
nopw   0x0(%rax,%rax,1)
mov    -0x30(%rbp),%rdi
movsd  %xmm3,(%rdx,%r14,8)
andpd  %xmm6,%xmm3
mov    -0x58(%rbp),%rdx
mulsd  (%rdx,%r13,8),%xmm3
ucomisd %xmm2,%xmm3
movapd %xmm2,%xmm4
cmpnlesd %xmm3,%xmm4
movapd %xmm4,%xmm5
andnpd %xmm3,%xmm5
andpd  %xmm2,%xmm4
cmovae %r13d,%r11d
orpd   %xmm5,%xmm4
add    $0x1,%r13
add    %rsi,%rbx
movapd %xmm4,%xmm2
cmp    %rdi,%r13
je     15a0 <ludcmp+0x490>
mov    %r13,%rdx
imul   %rdi,%rdx
mov    -0x38(%rbp),%rdi
lea    (%rdi,%rdx,8),%rdx
movsd  (%rdx,%r14,8),%xmm3
test   %r14,%r14
je     14b0 <ludcmp+0x3a0>
cmp    $0x1,%r14
jne    1530 <ludcmp+0x420>
xor    %r12d,%r12d
jmp    156a <ludcmp+0x45a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rcx,%rdi
xor    %r12d,%r12d
cs nopw 0x0(%rax,%rax,1)
movsd  -0x8(%rbx,%r12,8),%xmm4
mulsd  (%rdi),%xmm4
movsd  (%rbx,%r12,8),%xmm5
subsd  %xmm4,%xmm3
mulsd  (%rdi,%rsi,1),%xmm5
subsd  %xmm5,%xmm3
add    $0x2,%r12
add    %r15,%rdi
cmp    %r12,%rax
jne    1540 <ludcmp+0x430>
test   $0x1,%r14b
mov    -0x30(%rbp),%rdi
je     14b4 <ludcmp+0x3a4>
movsd  (%rdx,%r12,8),%xmm4
imul   %rdi,%r12
mulsd  (%rcx,%r12,8),%xmm4
subsd  %xmm4,%xmm3
jmp    14b4 <ludcmp+0x3a4>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r11d,%eax
cmp    %rax,%r14
je     17b5 <ludcmp+0x6a5>
mov    %r11d,%eax
mov    -0x40(%rbp),%rcx
imul   %ecx,%eax
movslq %eax,%r12
mov    -0x38(%rbp),%rdx
lea    (%rdx,%r12,8),%r13
lea    (%rdx,%r8,8),%rbx
cmp    $0x4,%ecx
jb     15f6 <ludcmp+0x4e6>
lea    0x8(,%r14,8),%rax
imul   %rdi,%rax
add    %rdx,%rax
cmp    %r13,%rax
jbe    16ba <ludcmp+0x5aa>
mov    -0xa0(%rbp),%rax
lea    (%rax,%r12,8),%rax
cmp    %rax,%rbx
jae    16ba <ludcmp+0x5aa>
xor    %edx,%edx
mov    %rdx,%rax
not    %rax
add    %rdi,%rax
mov    -0x48(%rbp),%rcx
test   %rcx,%rcx
je     1632 <ludcmp+0x522>
nopw   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rdx,8),%xmm2
movsd  (%rbx,%rdx,8),%xmm3
movsd  %xmm3,0x0(%r13,%rdx,8)
movsd  %xmm2,(%rbx,%rdx,8)
add    $0x1,%rdx
add    $0xffffffffffffffff,%rcx
jne    1610 <ludcmp+0x500>
cmp    $0x3,%rax
jb     1790 <ludcmp+0x680>
mov    -0xa8(%rbp),%rcx
lea    (%rcx,%r8,8),%rax
lea    (%rcx,%r12,8),%rcx
nopl   0x0(%rax,%rax,1)
movsd  -0x18(%rcx,%rdx,8),%xmm2
movsd  -0x18(%rax,%rdx,8),%xmm3
movsd  %xmm3,-0x18(%rcx,%rdx,8)
movsd  %xmm2,-0x18(%rax,%rdx,8)
movsd  -0x10(%rcx,%rdx,8),%xmm2
movsd  -0x10(%rax,%rdx,8),%xmm3
movsd  %xmm3,-0x10(%rcx,%rdx,8)
movsd  %xmm2,-0x10(%rax,%rdx,8)
movsd  -0x8(%rcx,%rdx,8),%xmm2
movsd  -0x8(%rax,%rdx,8),%xmm3
movsd  %xmm3,-0x8(%rcx,%rdx,8)
movsd  %xmm2,-0x8(%rax,%rdx,8)
movsd  (%rcx,%rdx,8),%xmm2
movsd  (%rax,%rdx,8),%xmm3
movsd  %xmm3,(%rcx,%rdx,8)
movsd  %xmm2,(%rax,%rdx,8)
add    $0x4,%rdx
cmp    %rdx,%rdi
jne    1650 <ludcmp+0x540>
jmp    1790 <ludcmp+0x680>
cmpq   $0x0,-0x98(%rbp)
je     183d <ludcmp+0x72d>
mov    -0x78(%rbp),%rax
lea    (%rax,%r12,8),%rcx
lea    (%rax,%r8,8),%rax
mov    -0x80(%rbp),%rdi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movups -0x30(%rcx,%rdx,8),%xmm2
movups -0x20(%rcx,%rdx,8),%xmm3
movups -0x30(%rax,%rdx,8),%xmm4
movups -0x20(%rax,%rdx,8),%xmm5
movups %xmm4,-0x30(%rcx,%rdx,8)
movups %xmm5,-0x20(%rcx,%rdx,8)
movups %xmm2,-0x30(%rax,%rdx,8)
movups %xmm3,-0x20(%rax,%rdx,8)
movupd -0x10(%rcx,%rdx,8),%xmm2
movupd (%rcx,%rdx,8),%xmm3
movupd -0x10(%rax,%rdx,8),%xmm4
movupd (%rax,%rdx,8),%xmm5
movupd %xmm4,-0x10(%rcx,%rdx,8)
movupd %xmm5,(%rcx,%rdx,8)
movupd %xmm2,-0x10(%rax,%rdx,8)
movupd %xmm3,(%rax,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    16e0 <ludcmp+0x5d0>
testb  $0x1,-0x90(%rbp)
je     1779 <ludcmp+0x669>
movupd 0x0(%r13,%rdx,8),%xmm2
movupd 0x10(%r13,%rdx,8),%xmm3
movupd (%rbx,%rdx,8),%xmm4
movupd 0x10(%rbx,%rdx,8),%xmm5
movupd %xmm4,0x0(%r13,%rdx,8)
movupd %xmm5,0x10(%r13,%rdx,8)
movupd %xmm2,(%rbx,%rdx,8)
movupd %xmm3,0x10(%rbx,%rdx,8)
mov    -0x88(%rbp),%rax
mov    %rax,%rdx
mov    -0x30(%rbp),%rdi
cmp    %rdi,%rax
jne    15f8 <ludcmp+0x4e8>
mov    -0xb0(%rbp),%rax
movsd  (%rax),%xmm2
xorpd  %xmm1,%xmm2
movlpd %xmm2,(%rax)
mov    -0x58(%rbp),%rcx
movsd  (%rcx,%r14,8),%xmm2
movslq %r11d,%rax
movsd  %xmm2,(%rcx,%rax,8)
mov    -0xb8(%rbp),%rax
mov    %r11d,(%rax,%r14,4)
mov    -0x38(%rbp),%r13
lea    0x0(,%r8,8),%rax
add    %r13,%rax
movsd  (%rax,%r14,8),%xmm3
movapd %xmm3,%xmm2
andpd  %xmm6,%xmm2
ucomisd %xmm2,%xmm0
jbe    17f5 <ludcmp+0x6e5>
movabs $0x3bc79ca10c924223,%rcx
9c c7 3b
mov    %rcx,(%rax,%r14,8)
movapd %xmm0,%xmm3
cmp    -0x50(%rbp),%r14
je     13a0 <ludcmp+0x290>
lea    0x1(%r14),%rax
cmp    %rdi,%rax
jge    13a7 <ludcmp+0x297>
movsd  0x80c(%rip),%xmm2
divsd  %xmm3,%xmm2
lea    (%r9,%r14,8),%rcx
mov    %rdi,%rdx
nop
movsd  (%rcx),%xmm3
mulsd  %xmm2,%xmm3
movsd  %xmm3,(%rcx)
add    %rsi,%rcx
add    $0xffffffffffffffff,%rdx
cmp    %rdx,%r10
jne    1820 <ludcmp+0x710>
jmp    13a7 <ludcmp+0x297>
xor    %edx,%edx
testb  $0x1,-0x90(%rbp)
jne    1747 <ludcmp+0x637>
jmp    1779 <ludcmp+0x669>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Singular matrix in routine ludcmp\00"
define void @ludcmp(double** %0, i32 %1, i32* %2, double* %3) {
%5 = alloca double**
%6 = alloca i32
%7 = alloca i32*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca i8*
%18 = alloca i64
store double** %0, double*** %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store double* %3, double** %8
store i32 0, i32* %10
%19 = load i32, i32* %6
%20 = zext i32 %19 to i64
%21 = call i8* @llvm.stacksave()
store i8* %21, i8** %17
%22 = alloca double, i64 %20
store i64 %20, i64* %18
%23 = load double*, double** %8
store double 1.000000e+00, double* %23
store i32 0, i32* %9
br label %24
24: ; preds = %65, %4
%25 = load i32, i32* %9
%26 = load i32, i32* %6
%27 = icmp slt i32 %25, %26
br i1 %27, label %28, label %68
28: ; preds = %24
store double 0.000000e+00, double* %13
store i32 0, i32* %11
br label %29
29: ; preds = %51, %28
%30 = load i32, i32* %11
%31 = load i32, i32* %6
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %54
33: ; preds = %29
%34 = load double**, double*** %5
%35 = bitcast double** %34 to double*
%36 = load i32, i32* %9
%37 = load i32, i32* %6
%38 = mul nsw i32 %36, %37
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %35, i64 %39
%41 = load i32, i32* %11
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
%44 = load double, double* %43
%45 = call double @llvm.fabs.f64(double %44)
store double %45, double* %16
%46 = load double, double* %13
%47 = fcmp ogt double %45, %46
br i1 %47, label %48, label %50
48: ; preds = %33
%49 = load double, double* %16
store double %49, double* %13
br label %50
50: ; preds = %48, %33
br label %51
51: ; preds = %50
%52 = load i32, i32* %11
%53 = add nsw i32 %52, 1
store i32 %53, i32* %11
br label %29
54: ; preds = %29
%55 = load double, double* %13
%56 = fcmp oeq double %55, 0.000000e+00
br i1 %56, label %57, label %59
57: ; preds = %54
%58 = call i32 @error1(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %59
59: ; preds = %57, %54
%60 = load double, double* %13
%61 = fdiv double 1.000000e+00, %60
%62 = load i32, i32* %9
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %22, i64 %63
store double %61, double* %64
br label %65
65: ; preds = %59
%66 = load i32, i32* %9
%67 = add nsw i32 %66, 1
store i32 %67, i32* %9
br label %24
68: ; preds = %24
store i32 0, i32* %11
br label %69
69: ; preds = %358, %68
%70 = load i32, i32* %11
%71 = load i32, i32* %6
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %361
73: ; preds = %69
store i32 0, i32* %9
br label %74
74: ; preds = %135, %73
%75 = load i32, i32* %9
%76 = load i32, i32* %11
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %138
78: ; preds = %74
%79 = load double**, double*** %5
%80 = bitcast double** %79 to double*
%81 = load i32, i32* %9
%82 = load i32, i32* %6
%83 = mul nsw i32 %81, %82
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %80, i64 %84
%86 = load i32, i32* %11
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %85, i64 %87
%89 = load double, double* %88
store double %89, double* %15
store i32 0, i32* %12
br label %90
90: ; preds = %120, %78
%91 = load i32, i32* %12
%92 = load i32, i32* %9
%93 = icmp slt i32 %91, %92
br i1 %93, label %94, label %123
94: ; preds = %90
%95 = load double**, double*** %5
%96 = bitcast double** %95 to double*
%97 = load i32, i32* %9
%98 = load i32, i32* %6
%99 = mul nsw i32 %97, %98
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds double, double* %96, i64 %100
%102 = load i32, i32* %12
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %101, i64 %103
%105 = load double, double* %104
%106 = load double**, double*** %5
%107 = bitcast double** %106 to double*
%108 = load i32, i32* %12
%109 = load i32, i32* %6
%110 = mul nsw i32 %108, %109
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %107, i64 %111
%113 = load i32, i32* %11
%114 = sext i32 %113 to i64
%115 = getelementptr inbounds double, double* %112, i64 %114
%116 = load double, double* %115
%117 = load double, double* %15
%118 = fneg double %105
%119 = call double @llvm.fmuladd.f64(double %118, double %116, double %117)
store double %119, double* %15
br label %120
120: ; preds = %94
%121 = load i32, i32* %12
%122 = add nsw i32 %121, 1
store i32 %122, i32* %12
br label %90
123: ; preds = %90
%124 = load double, double* %15
%125 = load double**, double*** %5
%126 = bitcast double** %125 to double*
%127 = load i32, i32* %9
%128 = load i32, i32* %6
%129 = mul nsw i32 %127, %128
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds double, double* %126, i64 %130
%132 = load i32, i32* %11
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double, double* %131, i64 %133
store double %124, double* %134
br label %135
135: ; preds = %123
%136 = load i32, i32* %9
%137 = add nsw i32 %136, 1
store i32 %137, i32* %9
br label %74
138: ; preds = %74
store double 0.000000e+00, double* %13
%139 = load i32, i32* %11
store i32 %139, i32* %9
br label %140
140: ; preds = %214, %138
%141 = load i32, i32* %9
%142 = load i32, i32* %6
%143 = icmp slt i32 %141, %142
br i1 %143, label %144, label %217
144: ; preds = %140
%145 = load double**, double*** %5
%146 = bitcast double** %145 to double*
%147 = load i32, i32* %9
%148 = load i32, i32* %6
%149 = mul nsw i32 %147, %148
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds double, double* %146, i64 %150
%152 = load i32, i32* %11
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %151, i64 %153
%155 = load double, double* %154
store double %155, double* %15
store i32 0, i32* %12
br label %156
156: ; preds = %186, %144
%157 = load i32, i32* %12
%158 = load i32, i32* %11
%159 = icmp slt i32 %157, %158
br i1 %159, label %160, label %189
160: ; preds = %156
%161 = load double**, double*** %5
%162 = bitcast double** %161 to double*
%163 = load i32, i32* %9
%164 = load i32, i32* %6
%165 = mul nsw i32 %163, %164
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds double, double* %162, i64 %166
%168 = load i32, i32* %12
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds double, double* %167, i64 %169
%171 = load double, double* %170
%172 = load double**, double*** %5
%173 = bitcast double** %172 to double*
%174 = load i32, i32* %12
%175 = load i32, i32* %6
%176 = mul nsw i32 %174, %175
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds double, double* %173, i64 %177
%179 = load i32, i32* %11
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double, double* %178, i64 %180
%182 = load double, double* %181
%183 = load double, double* %15
%184 = fneg double %171
%185 = call double @llvm.fmuladd.f64(double %184, double %182, double %183)
store double %185, double* %15
br label %186
186: ; preds = %160
%187 = load i32, i32* %12
%188 = add nsw i32 %187, 1
store i32 %188, i32* %12
br label %156
189: ; preds = %156
%190 = load double, double* %15
%191 = load double**, double*** %5
%192 = bitcast double** %191 to double*
%193 = load i32, i32* %9
%194 = load i32, i32* %6
%195 = mul nsw i32 %193, %194
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds double, double* %192, i64 %196
%198 = load i32, i32* %11
%199 = sext i32 %198 to i64
%200 = getelementptr inbounds double, double* %197, i64 %199
store double %190, double* %200
%201 = load i32, i32* %9
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double, double* %22, i64 %202
%204 = load double, double* %203
%205 = load double, double* %15
%206 = call double @llvm.fabs.f64(double %205)
%207 = fmul double %204, %206
store double %207, double* %14
%208 = load double, double* %13
%209 = fcmp oge double %207, %208
br i1 %209, label %210, label %213
210: ; preds = %189
%211 = load double, double* %14
store double %211, double* %13
%212 = load i32, i32* %9
store i32 %212, i32* %10
br label %213
213: ; preds = %210, %189
br label %214
214: ; preds = %213
%215 = load i32, i32* %9
%216 = add nsw i32 %215, 1
store i32 %216, i32* %9
br label %140
217: ; preds = %140
%218 = load i32, i32* %11
%219 = load i32, i32* %10
%220 = icmp ne i32 %218, %219
br i1 %220, label %221, label %285
221: ; preds = %217
store i32 0, i32* %12
br label %222
222: ; preds = %270, %221
%223 = load i32, i32* %12
%224 = load i32, i32* %6
%225 = icmp slt i32 %223, %224
br i1 %225, label %226, label %273
226: ; preds = %222
%227 = load double**, double*** %5
%228 = bitcast double** %227 to double*
%229 = load i32, i32* %10
%230 = load i32, i32* %6
%231 = mul nsw i32 %229, %230
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds double, double* %228, i64 %232
%234 = load i32, i32* %12
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds double, double* %233, i64 %235
%237 = load double, double* %236
store double %237, double* %14
%238 = load double**, double*** %5
%239 = bitcast double** %238 to double*
%240 = load i32, i32* %11
%241 = load i32, i32* %6
%242 = mul nsw i32 %240, %241
%243 = sext i32 %242 to i64
%244 = getelementptr inbounds double, double* %239, i64 %243
%245 = load i32, i32* %12
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds double, double* %244, i64 %246
%248 = load double, double* %247
%249 = load double**, double*** %5
%250 = bitcast double** %249 to double*
%251 = load i32, i32* %10
%252 = load i32, i32* %6
%253 = mul nsw i32 %251, %252
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds double, double* %250, i64 %254
%256 = load i32, i32* %12
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds double, double* %255, i64 %257
store double %248, double* %258
%259 = load double, double* %14
%260 = load double**, double*** %5
%261 = bitcast double** %260 to double*
%262 = load i32, i32* %11
%263 = load i32, i32* %6
%264 = mul nsw i32 %262, %263
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds double, double* %261, i64 %265
%267 = load i32, i32* %12
%268 = sext i32 %267 to i64
%269 = getelementptr inbounds double, double* %266, i64 %268
store double %259, double* %269
br label %270
270: ; preds = %226
%271 = load i32, i32* %12
%272 = add nsw i32 %271, 1
store i32 %272, i32* %12
br label %222
273: ; preds = %222
%274 = load double*, double** %8
%275 = load double, double* %274
%276 = fneg double %275
%277 = load double*, double** %8
store double %276, double* %277
%278 = load i32, i32* %11
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds double, double* %22, i64 %279
%281 = load double, double* %280
%282 = load i32, i32* %10
%283 = sext i32 %282 to i64
%284 = getelementptr inbounds double, double* %22, i64 %283
store double %281, double* %284
br label %285
285: ; preds = %273, %217
%286 = load i32, i32* %10
%287 = load i32*, i32** %7
%288 = load i32, i32* %11
%289 = sext i32 %288 to i64
%290 = getelementptr inbounds i32, i32* %287, i64 %289
store i32 %286, i32* %290
%291 = load double**, double*** %5
%292 = bitcast double** %291 to double*
%293 = load i32, i32* %11
%294 = load i32, i32* %6
%295 = mul nsw i32 %293, %294
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds double, double* %292, i64 %296
%298 = load i32, i32* %11
%299 = sext i32 %298 to i64
%300 = getelementptr inbounds double, double* %297, i64 %299
%301 = load double, double* %300
%302 = call double @llvm.fabs.f64(double %301)
%303 = fcmp olt double %302, 0x3BC79CA10C924223
br i1 %303, label %304, label %315
304: ; preds = %285
%305 = load double**, double*** %5
%306 = bitcast double** %305 to double*
%307 = load i32, i32* %11
%308 = load i32, i32* %6
%309 = mul nsw i32 %307, %308
%310 = sext i32 %309 to i64
%311 = getelementptr inbounds double, double* %306, i64 %310
%312 = load i32, i32* %11
%313 = sext i32 %312 to i64
%314 = getelementptr inbounds double, double* %311, i64 %313
store double 0x3BC79CA10C924223, double* %314
br label %315
315: ; preds = %304, %285
%316 = load i32, i32* %11
%317 = load i32, i32* %6
%318 = sub nsw i32 %317, 1
%319 = icmp ne i32 %316, %318
br i1 %319, label %320, label %357
320: ; preds = %315
%321 = load double**, double*** %5
%322 = bitcast double** %321 to double*
%323 = load i32, i32* %11
%324 = load i32, i32* %6
%325 = mul nsw i32 %323, %324
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds double, double* %322, i64 %326
%328 = load i32, i32* %11
%329 = sext i32 %328 to i64
%330 = getelementptr inbounds double, double* %327, i64 %329
%331 = load double, double* %330
%332 = fdiv double 1.000000e+00, %331
store double %332, double* %14
%333 = load i32, i32* %11
%334 = add nsw i32 %333, 1
store i32 %334, i32* %9
br label %335
335: ; preds = %353, %320
%336 = load i32, i32* %9
%337 = load i32, i32* %6
%338 = icmp slt i32 %336, %337
br i1 %338, label %339, label %356
339: ; preds = %335
%340 = load double, double* %14
%341 = load double**, double*** %5
%342 = bitcast double** %341 to double*
%343 = load i32, i32* %9
%344 = load i32, i32* %6
%345 = mul nsw i32 %343, %344
%346 = sext i32 %345 to i64
%347 = getelementptr inbounds double, double* %342, i64 %346
%348 = load i32, i32* %11
%349 = sext i32 %348 to i64
%350 = getelementptr inbounds double, double* %347, i64 %349
%351 = load double, double* %350
%352 = fmul double %351, %340
store double %352, double* %350
br label %353
353: ; preds = %339
%354 = load i32, i32* %9
%355 = add nsw i32 %354, 1
store i32 %355, i32* %9
br label %335
356: ; preds = %335
br label %357
357: ; preds = %356, %315
br label %358
358: ; preds = %357
%359 = load i32, i32* %11
%360 = add nsw i32 %359, 1
store i32 %360, i32* %11
br label %69
361: ; preds = %69
%362 = load i8*, i8** %17
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"Singular matrix in routine ludcmp\00"
define void @ludcmp(double** nocapture %0, i32 %1, i32* nocapture writeonly %2, double* nocapture %3) {
%5 = bitcast double** %0 to i8*
%6 = zext i32 %1 to i64
%7 = alloca double, i64 %6
store double 1.000000e+00, double* %3
%8 = icmp sgt i32 %1, 0
br i1 %8, label %9, label %403
9: ; preds = %4
%10 = zext i32 %1 to i64
%11 = add nsw i64 %6, -1
%12 = and i64 %6, 3
%13 = icmp ult i64 %11, 3
%14 = and i64 %6, 4294967292
%15 = icmp eq i64 %12, 0
br label %16
16: ; preds = %95, %9
%17 = phi i64 [ 0, %9 ], [ %98, %95 ]
%18 = mul nsw i64 %17, %10
%19 = getelementptr inbounds double*, double** %0, i64 %18
br i1 %13, label %73, label %39
20: ; preds = %95
br i1 %8, label %21, label %403
21: ; preds = %20
%22 = add nsw i32 %1, -1
%23 = zext i32 %1 to i64
%24 = zext i32 %22 to i64
%25 = getelementptr double*, double** %0, i64 %6
%26 = and i64 %23, 4294967292
%27 = add nsw i64 %26, -4
%28 = lshr exact i64 %27, 2
%29 = add nuw nsw i64 %28, 1
%30 = icmp ult i32 %1, 4
%31 = and i64 %6, 4294967292
%32 = and i64 %29, 1
%33 = icmp eq i64 %27, 0
%34 = and i64 %29, 9223372036854775806
%35 = icmp eq i64 %32, 0
%36 = icmp eq i64 %31, %6
%37 = and i64 %23, 3
%38 = icmp eq i64 %37, 0
br label %100
39: ; preds = %16, %39
%40 = phi i64 [ %70, %39 ], [ 0, %16 ]
%41 = phi double [ %69, %39 ], [ 0.000000e+00, %16 ]
%42 = phi i64 [ %71, %39 ], [ 0, %16 ]
%43 = getelementptr inbounds double*, double** %19, i64 %40
%44 = bitcast double** %43 to double*
%45 = load double, double* %44
%46 = tail call double @llvm.fabs.f64(double %45)
%47 = fcmp ogt double %46, %41
%48 = select i1 %47, double %46, double %41
%49 = or i64 %40, 1
%50 = getelementptr inbounds double*, double** %19, i64 %49
%51 = bitcast double** %50 to double*
%52 = load double, double* %51
%53 = tail call double @llvm.fabs.f64(double %52)
%54 = fcmp ogt double %53, %48
%55 = select i1 %54, double %53, double %48
%56 = or i64 %40, 2
%57 = getelementptr inbounds double*, double** %19, i64 %56
%58 = bitcast double** %57 to double*
%59 = load double, double* %58
%60 = tail call double @llvm.fabs.f64(double %59)
%61 = fcmp ogt double %60, %55
%62 = select i1 %61, double %60, double %55
%63 = or i64 %40, 3
%64 = getelementptr inbounds double*, double** %19, i64 %63
%65 = bitcast double** %64 to double*
%66 = load double, double* %65
%67 = tail call double @llvm.fabs.f64(double %66)
%68 = fcmp ogt double %67, %62
%69 = select i1 %68, double %67, double %62
%70 = add nuw nsw i64 %40, 4
%71 = add i64 %42, 4
%72 = icmp eq i64 %71, %14
br i1 %72, label %73, label %39
73: ; preds = %39, %16
%74 = phi double [ undef, %16 ], [ %69, %39 ]
%75 = phi i64 [ 0, %16 ], [ %70, %39 ]
%76 = phi double [ 0.000000e+00, %16 ], [ %69, %39 ]
br i1 %15, label %90, label %77
77: ; preds = %73, %77
%78 = phi i64 [ %87, %77 ], [ %75, %73 ]
%79 = phi double [ %86, %77 ], [ %76, %73 ]
%80 = phi i64 [ %88, %77 ], [ 0, %73 ]
%81 = getelementptr inbounds double*, double** %19, i64 %78
%82 = bitcast double** %81 to double*
%83 = load double, double* %82
%84 = tail call double @llvm.fabs.f64(double %83)
%85 = fcmp ogt double %84, %79
%86 = select i1 %85, double %84, double %79
%87 = add nuw nsw i64 %78, 1
%88 = add i64 %80, 1
%89 = icmp eq i64 %88, %12
br i1 %89, label %90, label %77
90: ; preds = %77, %73
%91 = phi double [ %74, %73 ], [ %86, %77 ]
%92 = fcmp oeq double %91, 0.000000e+00
br i1 %92, label %93, label %95
93: ; preds = %90
%94 = tail call i32 @error1(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %95
95: ; preds = %93, %90
%96 = fdiv double 1.000000e+00, %91
%97 = getelementptr inbounds double, double* %7, i64 %17
store double %96, double* %97
%98 = add nuw nsw i64 %17, 1
%99 = icmp eq i64 %98, %6
br i1 %99, label %20, label %16
100: ; preds = %21, %399
%101 = phi i64 [ 1, %21 ], [ %401, %399 ]
%102 = phi i64 [ 0, %21 ], [ %400, %399 ]
%103 = phi i32 [ 0, %21 ], [ %230, %399 ]
%104 = icmp eq i64 %102, 0
br i1 %104, label %107, label %105
105: ; preds = %100
%106 = getelementptr inbounds double*, double** %0, i64 %102
br label %113
107: ; preds = %167, %100
%108 = getelementptr inbounds double*, double** %0, i64 %102
%109 = and i64 %102, 1
%110 = icmp eq i64 %102, 1
%111 = and i64 %102, -2
%112 = icmp eq i64 %109, 0
br label %171
113: ; preds = %105, %167
%114 = phi i64 [ 0, %105 ], [ %169, %167 ]
%115 = mul nsw i64 %114, %23
%116 = getelementptr inbounds double*, double** %0, i64 %115
%117 = getelementptr inbounds double*, double** %116, i64 %102
%118 = bitcast double** %117 to double*
%119 = load double, double* %118
%120 = icmp eq i64 %114, 0
br i1 %120, label %167, label %121
121: ; preds = %113
%122 = and i64 %114, 1
%123 = icmp eq i64 %114, 1
br i1 %123, label %152, label %124
124: ; preds = %121
%125 = and i64 %114, 9223372036854775806
br label %126
126: ; preds = %126, %124
%127 = phi i64 [ 0, %124 ], [ %149, %126 ]
%128 = phi double [ %119, %124 ], [ %148, %126 ]
%129 = phi i64 [ 0, %124 ], [ %150, %126 ]
%130 = getelementptr inbounds double*, double** %116, i64 %127
%131 = bitcast double** %130 to double*
%132 = load double, double* %131
%133 = mul nsw i64 %127, %23
%134 = getelementptr inbounds double*, double** %106, i64 %133
%135 = bitcast double** %134 to double*
%136 = load double, double* %135
%137 = fneg double %132
%138 = tail call double @llvm.fmuladd.f64(double %137, double %136, double %128)
%139 = or i64 %127, 1
%140 = getelementptr inbounds double*, double** %116, i64 %139
%141 = bitcast double** %140 to double*
%142 = load double, double* %141
%143 = mul nsw i64 %139, %23
%144 = getelementptr inbounds double*, double** %106, i64 %143
%145 = bitcast double** %144 to double*
%146 = load double, double* %145
%147 = fneg double %142
%148 = tail call double @llvm.fmuladd.f64(double %147, double %146, double %138)
%149 = add nuw nsw i64 %127, 2
%150 = add i64 %129, 2
%151 = icmp eq i64 %150, %125
br i1 %151, label %152, label %126
152: ; preds = %126, %121
%153 = phi double [ undef, %121 ], [ %148, %126 ]
%154 = phi i64 [ 0, %121 ], [ %149, %126 ]
%155 = phi double [ %119, %121 ], [ %148, %126 ]
%156 = icmp eq i64 %122, 0
br i1 %156, label %167, label %157
157: ; preds = %152
%158 = getelementptr inbounds double*, double** %116, i64 %154
%159 = bitcast double** %158 to double*
%160 = load double, double* %159
%161 = mul nsw i64 %154, %23
%162 = getelementptr inbounds double*, double** %106, i64 %161
%163 = bitcast double** %162 to double*
%164 = load double, double* %163
%165 = fneg double %160
%166 = tail call double @llvm.fmuladd.f64(double %165, double %164, double %155)
br label %167
167: ; preds = %157, %152, %113
%168 = phi double [ %119, %113 ], [ %153, %152 ], [ %166, %157 ]
store double %168, double* %118
%169 = add nuw nsw i64 %114, 1
%170 = icmp eq i64 %169, %102
br i1 %170, label %107, label %113
171: ; preds = %107, %221
%172 = phi i64 [ %102, %107 ], [ %231, %221 ]
%173 = phi i32 [ %103, %107 ], [ %230, %221 ]
%174 = phi double [ 0.000000e+00, %107 ], [ %228, %221 ]
%175 = mul nsw i64 %172, %23
%176 = getelementptr inbounds double*, double** %0, i64 %175
%177 = getelementptr inbounds double*, double** %176, i64 %102
%178 = bitcast double** %177 to double*
%179 = load double, double* %178
br i1 %104, label %221, label %180
180: ; preds = %171
br i1 %110, label %207, label %181
181: ; preds = %180, %181
%182 = phi i64 [ %204, %181 ], [ 0, %180 ]
%183 = phi double [ %203, %181 ], [ %179, %180 ]
%184 = phi i64 [ %205, %181 ], [ 0, %180 ]
%185 = getelementptr inbounds double*, double** %176, i64 %182
%186 = bitcast double** %185 to double*
%187 = load double, double* %186
%188 = mul nsw i64 %182, %23
%189 = getelementptr inbounds double*, double** %108, i64 %188
%190 = bitcast double** %189 to double*
%191 = load double, double* %190
%192 = fneg double %187
%193 = tail call double @llvm.fmuladd.f64(double %192, double %191, double %183)
%194 = or i64 %182, 1
%195 = getelementptr inbounds double*, double** %176, i64 %194
%196 = bitcast double** %195 to double*
%197 = load double, double* %196
%198 = mul nsw i64 %194, %23
%199 = getelementptr inbounds double*, double** %108, i64 %198
%200 = bitcast double** %199 to double*
%201 = load double, double* %200
%202 = fneg double %197
%203 = tail call double @llvm.fmuladd.f64(double %202, double %201, double %193)
%204 = add nuw nsw i64 %182, 2
%205 = add i64 %184, 2
%206 = icmp eq i64 %205, %111
br i1 %206, label %207, label %181
207: ; preds = %181, %180
%208 = phi double [ undef, %180 ], [ %203, %181 ]
%209 = phi i64 [ 0, %180 ], [ %204, %181 ]
%210 = phi double [ %179, %180 ], [ %203, %181 ]
br i1 %112, label %221, label %211
211: ; preds = %207
%212 = getelementptr inbounds double*, double** %176, i64 %209
%213 = bitcast double** %212 to double*
%214 = load double, double* %213
%215 = mul nsw i64 %209, %23
%216 = getelementptr inbounds double*, double** %108, i64 %215
%217 = bitcast double** %216 to double*
%218 = load double, double* %217
%219 = fneg double %214
%220 = tail call double @llvm.fmuladd.f64(double %219, double %218, double %210)
br label %221
221: ; preds = %211, %207, %171
%222 = phi double [ %179, %171 ], [ %208, %207 ], [ %220, %211 ]
store double %222, double* %178
%223 = getelementptr inbounds double, double* %7, i64 %172
%224 = load double, double* %223
%225 = tail call double @llvm.fabs.f64(double %222)
%226 = fmul double %225, %224
%227 = fcmp ult double %226, %174
%228 = select i1 %227, double %174, double %226
%229 = trunc i64 %172 to i32
%230 = select i1 %227, i32 %173, i32 %229
%231 = add nuw nsw i64 %172, 1
%232 = icmp eq i64 %231, %6
br i1 %232, label %233, label %171
233: ; preds = %221
%234 = zext i32 %230 to i64
%235 = icmp eq i64 %102, %234
br i1 %235, label %369, label %236
236: ; preds = %233
%237 = mul nsw i32 %230, %1
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds double*, double** %0, i64 %238
%240 = mul nsw i64 %102, %23
%241 = getelementptr inbounds double*, double** %0, i64 %240
br i1 %30, label %312, label %242
242: ; preds = %236
%243 = bitcast double** %239 to i8*
%244 = getelementptr double*, double** %25, i64 %238
%245 = shl i64 %102, 3
%246 = add i64 %245, 8
%247 = mul i64 %246, %6
%248 = getelementptr i8, i8* %5, i64 %247
%249 = icmp ugt i8* %248, %243
%250 = icmp ult double** %241, %244
%251 = and i1 %249, %250
br i1 %251, label %312, label %252
252: ; preds = %242
br i1 %33, label %292, label %253
253: ; preds = %252, %253
%254 = phi i64 [ %289, %253 ], [ 0, %252 ]
%255 = phi i64 [ %290, %253 ], [ 0, %252 ]
%256 = getelementptr inbounds double*, double** %239, i64 %254
%257 = bitcast double** %256 to <2 x double>*
%258 = load <2 x double>, <2 x double>* %257
%259 = getelementptr inbounds double*, double** %256, i64 2
%260 = bitcast double** %259 to <2 x double>*
%261 = load <2 x double>, <2 x double>* %260
%262 = getelementptr inbounds double*, double** %241, i64 %254
%263 = bitcast double** %262 to <2 x double>*
%264 = load <2 x double>, <2 x double>* %263
%265 = getelementptr inbounds double*, double** %262, i64 2
%266 = bitcast double** %265 to <2 x double>*
%267 = load <2 x double>, <2 x double>* %266
%268 = bitcast double** %256 to <2 x double>*
store <2 x double> %264, <2 x double>* %268
%269 = bitcast double** %259 to <2 x double>*
store <2 x double> %267, <2 x double>* %269
%270 = bitcast double** %262 to <2 x double>*
store <2 x double> %258, <2 x double>* %270
%271 = bitcast double** %265 to <2 x double>*
store <2 x double> %261, <2 x double>* %271
%272 = or i64 %254, 4
%273 = getelementptr inbounds double*, double** %239, i64 %272
%274 = bitcast double** %273 to <2 x double>*
%275 = load <2 x double>, <2 x double>* %274
%276 = getelementptr inbounds double*, double** %273, i64 2
%277 = bitcast double** %276 to <2 x double>*
%278 = load <2 x double>, <2 x double>* %277
%279 = getelementptr inbounds double*, double** %241, i64 %272
%280 = bitcast double** %279 to <2 x double>*
%281 = load <2 x double>, <2 x double>* %280
%282 = getelementptr inbounds double*, double** %279, i64 2
%283 = bitcast double** %282 to <2 x double>*
%284 = load <2 x double>, <2 x double>* %283
%285 = bitcast double** %273 to <2 x double>*
store <2 x double> %281, <2 x double>* %285
%286 = bitcast double** %276 to <2 x double>*
store <2 x double> %284, <2 x double>* %286
%287 = bitcast double** %279 to <2 x double>*
store <2 x double> %275, <2 x double>* %287
%288 = bitcast double** %282 to <2 x double>*
store <2 x double> %278, <2 x double>* %288
%289 = add nuw i64 %254, 8
%290 = add i64 %255, 2
%291 = icmp eq i64 %290, %34
br i1 %291, label %292, label %253
292: ; preds = %253, %252
%293 = phi i64 [ 0, %252 ], [ %289, %253 ]
br i1 %35, label %311, label %294
294: ; preds = %292
%295 = getelementptr inbounds double*, double** %239, i64 %293
%296 = bitcast double** %295 to <2 x double>*
%297 = load <2 x double>, <2 x double>* %296
%298 = getelementptr inbounds double*, double** %295, i64 2
%299 = bitcast double** %298 to <2 x double>*
%300 = load <2 x double>, <2 x double>* %299
%301 = getelementptr inbounds double*, double** %241, i64 %293
%302 = bitcast double** %301 to <2 x double>*
%303 = load <2 x double>, <2 x double>* %302
%304 = getelementptr inbounds double*, double** %301, i64 2
%305 = bitcast double** %304 to <2 x double>*
%306 = load <2 x double>, <2 x double>* %305
%307 = bitcast double** %295 to <2 x double>*
store <2 x double> %303, <2 x double>* %307
%308 = bitcast double** %298 to <2 x double>*
store <2 x double> %306, <2 x double>* %308
%309 = bitcast double** %301 to <2 x double>*
store <2 x double> %297, <2 x double>* %309
%310 = bitcast double** %304 to <2 x double>*
store <2 x double> %300, <2 x double>* %310
br label %311
311: ; preds = %292, %294
br i1 %36, label %362, label %312
312: ; preds = %242, %236, %311
%313 = phi i64 [ 0, %242 ], [ 0, %236 ], [ %31, %311 ]
%314 = xor i64 %313, -1
%315 = add nsw i64 %314, %23
br i1 %38, label %328, label %316
316: ; preds = %312, %316
%317 = phi i64 [ %325, %316 ], [ %313, %312 ]
%318 = phi i64 [ %326, %316 ], [ 0, %312 ]
%319 = getelementptr inbounds double*, double** %239, i64 %317
%320 = bitcast double** %319 to double*
%321 = load double, double* %320
%322 = getelementptr inbounds double*, double** %241, i64 %317
%323 = bitcast double** %322 to double*
%324 = load double, double* %323
store double %324, double* %320
store double %321, double* %323
%325 = add nuw nsw i64 %317, 1
%326 = add i64 %318, 1
%327 = icmp eq i64 %326, %37
br i1 %327, label %328, label %316
328: ; preds = %316, %312
%329 = phi i64 [ %313, %312 ], [ %325, %316 ]
%330 = icmp ult i64 %315, 3
br i1 %330, label %362, label %331
331: ; preds = %328, %331
%332 = phi i64 [ %360, %331 ], [ %329, %328 ]
%333 = getelementptr inbounds double*, double** %239, i64 %332
%334 = bitcast double** %333 to double*
%335 = load double, double* %334
%336 = getelementptr inbounds double*, double** %241, i64 %332
%337 = bitcast double** %336 to double*
%338 = load double, double* %337
store double %338, double* %334
store double %335, double* %337
%339 = add nuw nsw i64 %332, 1
%340 = getelementptr inbounds double*, double** %239, i64 %339
%341 = bitcast double** %340 to double*
%342 = load double, double* %341
%343 = getelementptr inbounds double*, double** %241, i64 %339
%344 = bitcast double** %343 to double*
%345 = load double, double* %344
store double %345, double* %341
store double %342, double* %344
%346 = add nuw nsw i64 %332, 2
%347 = getelementptr inbounds double*, double** %239, i64 %346
%348 = bitcast double** %347 to double*
%349 = load double, double* %348
%350 = getelementptr inbounds double*, double** %241, i64 %346
%351 = bitcast double** %350 to double*
%352 = load double, double* %351
store double %352, double* %348
store double %349, double* %351
%353 = add nuw nsw i64 %332, 3
%354 = getelementptr inbounds double*, double** %239, i64 %353
%355 = bitcast double** %354 to double*
%356 = load double, double* %355
%357 = getelementptr inbounds double*, double** %241, i64 %353
%358 = bitcast double** %357 to double*
%359 = load double, double* %358
store double %359, double* %355
store double %356, double* %358
%360 = add nuw nsw i64 %332, 4
%361 = icmp eq i64 %360, %6
br i1 %361, label %362, label %331
362: ; preds = %328, %331, %311
%363 = load double, double* %3
%364 = fneg double %363
store double %364, double* %3
%365 = getelementptr inbounds double, double* %7, i64 %102
%366 = load double, double* %365
%367 = sext i32 %230 to i64
%368 = getelementptr inbounds double, double* %7, i64 %367
store double %366, double* %368
br label %369
369: ; preds = %362, %233
%370 = getelementptr inbounds i32, i32* %2, i64 %102
store i32 %230, i32* %370
%371 = mul nsw i64 %102, %23
%372 = getelementptr inbounds double*, double** %0, i64 %371
%373 = getelementptr inbounds double*, double** %372, i64 %102
%374 = bitcast double** %373 to double*
%375 = load double, double* %374
%376 = tail call double @llvm.fabs.f64(double %375)
%377 = fcmp olt double %376, 0x3BC79CA10C924223
br i1 %377, label %378, label %379
378: ; preds = %369
store double 0x3BC79CA10C924223, double* %374
br label %379
379: ; preds = %378, %369
%380 = phi double [ 0x3BC79CA10C924223, %378 ], [ %375, %369 ]
%381 = icmp eq i64 %102, %24
br i1 %381, label %382, label %384
382: ; preds = %379
%383 = add nuw nsw i64 %102, 1
br label %399
384: ; preds = %379
%385 = fdiv double 1.000000e+00, %380
%386 = add nuw nsw i64 %102, 1
%387 = icmp slt i64 %386, %23
br i1 %387, label %388, label %399
388: ; preds = %384
%389 = getelementptr inbounds double*, double** %0, i64 %102
br label %390
390: ; preds = %388, %390
%391 = phi i64 [ %101, %388 ], [ %397, %390 ]
%392 = mul nsw i64 %391, %23
%393 = getelementptr inbounds double*, double** %389, i64 %392
%394 = bitcast double** %393 to double*
%395 = load double, double* %394
%396 = fmul double %385, %395
store double %396, double* %394
%397 = add nuw nsw i64 %391, 1
%398 = icmp eq i64 %397, %6
br i1 %398, label %399, label %390
399: ; preds = %390, %382, %384
%400 = phi i64 [ %383, %382 ], [ %386, %384 ], [ %386, %390 ]
%401 = add nuw nsw i64 %101, 1
%402 = icmp eq i64 %400, %6
br i1 %402, label %403, label %100
403: ; preds = %399, %4, %20
ret void
}