#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*/ exit(int);
int /*<<< orphan*/ printf(char *);
void paw_lu_decompose(int N, double **c, double **a, double **b) {
  int i;
  int j;
  int k;
  double sum;
  for (j = 0; j <= N - 1; j++) {
    for (i = 0; i <= j; i++) {
      a[i][j] = 0.0;
      b[i][j] = 0.0;
    }
  }
  for (i = 0; i <= N - 1; i++)
    a[i][i] = 1.0;
  for (j = 0; j <= N - 1; j++) {
    for (i = 0; i <= j; i++) {
      sum = c[i][j];
      for (k = 0; k <= i - 1; k++) {
        sum = sum - a[i][k] * b[k][j];
      }
      b[i][j] = sum;
    }
    for (i = j + 1; i <= N - 1; i++) {
      sum = c[i][j];
      for (k = 0; k <= j - 1; k++) {
        sum = sum + a[i][k] * b[k][j];
      }
      if (b[j][j] == 0) {
        printf("error, division by zero in lu decomposition\n");
        exit(1);
      } else {
        a[i][j] = sum / b[j][j];
      }
    }
  }
}


x86 assembly (clang, -O0):
<paw_lu_decompose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     11b3 <paw_lu_decompose+0x93>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     11a0 <paw_lu_decompose+0x80>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1156 <paw_lu_decompose+0x36>
jmp    11a5 <paw_lu_decompose+0x85>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    113e <paw_lu_decompose+0x1e>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     11f6 <paw_lu_decompose+0xd6>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x24(%rbp),%rcx
movsd  0xe1d(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11ba <paw_lu_decompose+0x9a>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1405 <paw_lu_decompose+0x2e5>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     12dc <paw_lu_decompose+0x1bc>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     12b4 <paw_lu_decompose+0x194>
movsd  -0x38(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1242 <paw_lu_decompose+0x122>
movsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1215 <paw_lu_decompose+0xf5>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     13f2 <paw_lu_decompose+0x2d2>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x28(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1372 <paw_lu_decompose+0x252>
movsd  -0x38(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1317 <paw_lu_decompose+0x1f7>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    13b0 <paw_lu_decompose+0x290>
jp     13b0 <paw_lu_decompose+0x290>
lea    0xc67(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
movsd  -0x38(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    13e4 <paw_lu_decompose+0x2c4>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12e5 <paw_lu_decompose+0x1c5>
jmp    13f7 <paw_lu_decompose+0x2d7>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11fd <paw_lu_decompose+0xdd>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paw_lu_decompose>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    145b <paw_lu_decompose+0x33b>
mov    %edi,%r8d
mov    $0x1,%r9d
xor    %ebx,%ebx
jmp    1151 <paw_lu_decompose+0x31>
add    $0x1,%rbx
add    $0x1,%r9
cmp    %r8,%rbx
je     11d6 <paw_lu_decompose+0xb6>
test   %rbx,%rbx
je     11b0 <paw_lu_decompose+0x90>
mov    %r9,%r10
and    $0xfffffffffffffffe,%r10
xor    %eax,%eax
nop
mov    (%rdx,%rax,8),%rbp
movq   $0x0,0x0(%rbp,%rbx,8)
mov    (%rcx,%rax,8),%rbp
movq   $0x0,0x0(%rbp,%rbx,8)
mov    0x8(%rdx,%rax,8),%rbp
movq   $0x0,0x0(%rbp,%rbx,8)
mov    0x8(%rcx,%rax,8),%rbp
movq   $0x0,0x0(%rbp,%rbx,8)
add    $0x2,%rax
cmp    %rax,%r10
jne    1160 <paw_lu_decompose+0x40>
test   $0x1,%r9b
je     1140 <paw_lu_decompose+0x20>
jmp    11b8 <paw_lu_decompose+0x98>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
test   $0x1,%r9b
je     1140 <paw_lu_decompose+0x20>
mov    (%rdx,%rax,8),%rbp
movq   $0x0,0x0(%rbp,%rbx,8)
mov    (%rcx,%rax,8),%rax
movq   $0x0,(%rax,%rbx,8)
jmp    1140 <paw_lu_decompose+0x20>
test   %edi,%edi
jle    145b <paw_lu_decompose+0x33b>
lea    -0x1(%r8),%rbp
mov    %r8d,%eax
and    $0x3,%eax
movabs $0x3ff0000000000000,%r9
cmp    $0x3,%rbp
jae    11fc <paw_lu_decompose+0xdc>
xor    %ebx,%ebx
jmp    1240 <paw_lu_decompose+0x120>
mov    %r8d,%r10d
and    $0xfffffffc,%r10d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rdx,%rbx,8),%rbp
mov    %r9,0x0(%rbp,%rbx,8)
mov    0x8(%rdx,%rbx,8),%rbp
mov    %r9,0x8(%rbp,%rbx,8)
mov    0x10(%rdx,%rbx,8),%rbp
mov    %r9,0x10(%rbp,%rbx,8)
mov    0x18(%rdx,%rbx,8),%rbp
mov    %r9,0x18(%rbp,%rbx,8)
add    $0x4,%rbx
cmp    %rbx,%r10
jne    1210 <paw_lu_decompose+0xf0>
test   %rax,%rax
je     1263 <paw_lu_decompose+0x143>
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rdx,%rbx,8),%rbp
mov    %r9,0x0(%rbp,%rbx,8)
add    $0x1,%rbx
add    $0xffffffffffffffff,%rax
jne    1250 <paw_lu_decompose+0x130>
test   %edi,%edi
jle    145b <paw_lu_decompose+0x33b>
mov    $0x1,%r9d
xor    %r14d,%r14d
xorpd  %xmm0,%xmm0
jmp    128d <paw_lu_decompose+0x16d>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r9
cmp    %r8,%r14
je     145b <paw_lu_decompose+0x33b>
mov    %r14,%r12
mov    %r12d,%r11d
and    $0x3,%r11d
mov    %r14,%r10
and    $0xfffffffffffffffc,%r10
lea    -0x1(%r14),%rax
mov    %rax,(%rsp)
xor    %r14d,%r14d
jmp    12c3 <paw_lu_decompose+0x1a3>
nopl   0x0(%rax,%rax,1)
mov    (%rcx,%r14,8),%rax
movsd  %xmm1,(%rax,%r12,8)
add    $0x1,%r14
cmp    %r9,%r14
je     1340 <paw_lu_decompose+0x220>
mov    (%rsi,%r14,8),%rdi
movsd  (%rdi,%r12,8),%xmm1
test   %r14,%r14
je     12b0 <paw_lu_decompose+0x190>
mov    (%rdx,%r14,8),%rdi
cmp    $0x1,%r14
jne    12e0 <paw_lu_decompose+0x1c0>
xor    %ebx,%ebx
jmp    1322 <paw_lu_decompose+0x202>
mov    %r14,%r15
and    $0xfffffffffffffffe,%r15
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  (%rdi,%rbx,8),%xmm2
movsd  0x8(%rdi,%rbx,8),%xmm3
mov    (%rcx,%rbx,8),%rbp
mov    0x8(%rcx,%rbx,8),%rax
mulsd  0x0(%rbp,%r12,8),%xmm2
mulsd  (%rax,%r12,8),%xmm3
subsd  %xmm2,%xmm1
subsd  %xmm3,%xmm1
add    $0x2,%rbx
cmp    %rbx,%r15
jne    12f0 <paw_lu_decompose+0x1d0>
test   $0x1,%r14b
je     12b0 <paw_lu_decompose+0x190>
movsd  (%rdi,%rbx,8),%xmm2
mov    (%rcx,%rbx,8),%rax
mulsd  (%rax,%r12,8),%xmm2
subsd  %xmm2,%xmm1
jmp    12b0 <paw_lu_decompose+0x190>
lea    0x1(%r12),%r14
cmp    %r8,%r14
jae    1280 <paw_lu_decompose+0x160>
mov    (%rcx,%r12,8),%r15
mov    %r9,%r13
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rsi,%r13,8),%rax
movsd  (%rax,%r12,8),%xmm1
test   %r12,%r12
je     142d <paw_lu_decompose+0x30d>
mov    (%rdx,%r13,8),%rdi
cmpq   $0x3,(%rsp)
jae    1390 <paw_lu_decompose+0x270>
xor    %ebx,%ebx
jmp    13fc <paw_lu_decompose+0x2dc>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rdi,%rbx,8),%xmm2
movsd  0x8(%rdi,%rbx,8),%xmm3
mov    (%rcx,%rbx,8),%rax
mov    0x8(%rcx,%rbx,8),%rbp
mulsd  (%rax,%r12,8),%xmm2
addsd  %xmm1,%xmm2
mulsd  0x0(%rbp,%r12,8),%xmm3
addsd  %xmm2,%xmm3
movsd  0x10(%rdi,%rbx,8),%xmm2
mov    0x10(%rcx,%rbx,8),%rax
mulsd  (%rax,%r12,8),%xmm2
movsd  0x18(%rdi,%rbx,8),%xmm1
mov    0x18(%rcx,%rbx,8),%rax
mulsd  (%rax,%r12,8),%xmm1
addsd  %xmm3,%xmm2
addsd  %xmm2,%xmm1
add    $0x4,%rbx
cmp    %rbx,%r10
jne    13a0 <paw_lu_decompose+0x280>
test   $0x3,%r12b
je     142d <paw_lu_decompose+0x30d>
lea    (%rcx,%rbx,8),%rbp
lea    (%rdi,%rbx,8),%rdi
xor    %ebx,%ebx
nopl   0x0(%rax)
movsd  (%rdi,%rbx,8),%xmm2
mov    0x0(%rbp,%rbx,8),%rax
mulsd  (%rax,%r12,8),%xmm2
addsd  %xmm2,%xmm1
add    $0x1,%rbx
cmp    %rbx,%r11
jne    1410 <paw_lu_decompose+0x2f0>
movsd  (%r15,%r12,8),%xmm2
ucomisd %xmm0,%xmm2
jne    143b <paw_lu_decompose+0x31b>
jnp    146a <paw_lu_decompose+0x34a>
divsd  %xmm2,%xmm1
mov    (%rdx,%r13,8),%rax
movsd  %xmm1,(%rax,%r12,8)
add    $0x1,%r13
cmp    %r8,%r13
jne    1360 <paw_lu_decompose+0x240>
jmp    1280 <paw_lu_decompose+0x160>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xb8f(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"error, division by zero in lu decomposition\0A\00"
define void @paw_lu_decompose(i32 %0, double** %1, double** %2, double** %3) {
%5 = alloca i32
%6 = alloca double**
%7 = alloca double**
%8 = alloca double**
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
store i32 %0, i32* %5
store double** %1, double*** %6
store double** %2, double*** %7
store double** %3, double*** %8
store i32 0, i32* %10
br label %13
13: ; preds = %44, %4
%14 = load i32, i32* %10
%15 = load i32, i32* %5
%16 = sub nsw i32 %15, 1
%17 = icmp sle i32 %14, %16
br i1 %17, label %18, label %47
18: ; preds = %13
store i32 0, i32* %9
br label %19
19: ; preds = %40, %18
%20 = load i32, i32* %9
%21 = load i32, i32* %10
%22 = icmp sle i32 %20, %21
br i1 %22, label %23, label %43
23: ; preds = %19
%24 = load double**, double*** %7
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds double*, double** %24, i64 %26
%28 = load double*, double** %27
%29 = load i32, i32* %10
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %28, i64 %30
store double 0.000000e+00, double* %31
%32 = load double**, double*** %8
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double*, double** %32, i64 %34
%36 = load double*, double** %35
%37 = load i32, i32* %10
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds double, double* %36, i64 %38
store double 0.000000e+00, double* %39
br label %40
40: ; preds = %23
%41 = load i32, i32* %9
%42 = add nsw i32 %41, 1
store i32 %42, i32* %9
br label %19
43: ; preds = %19
br label %44
44: ; preds = %43
%45 = load i32, i32* %10
%46 = add nsw i32 %45, 1
store i32 %46, i32* %10
br label %13
47: ; preds = %13
store i32 0, i32* %9
br label %48
48: ; preds = %62, %47
%49 = load i32, i32* %9
%50 = load i32, i32* %5
%51 = sub nsw i32 %50, 1
%52 = icmp sle i32 %49, %51
br i1 %52, label %53, label %65
53: ; preds = %48
%54 = load double**, double*** %7
%55 = load i32, i32* %9
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double*, double** %54, i64 %56
%58 = load double*, double** %57
%59 = load i32, i32* %9
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
store double 1.000000e+00, double* %61
br label %62
62: ; preds = %53
%63 = load i32, i32* %9
%64 = add nsw i32 %63, 1
store i32 %64, i32* %9
br label %48
65: ; preds = %48
store i32 0, i32* %10
br label %66
66: ; preds = %215, %65
%67 = load i32, i32* %10
%68 = load i32, i32* %5
%69 = sub nsw i32 %68, 1
%70 = icmp sle i32 %67, %69
br i1 %70, label %71, label %218
71: ; preds = %66
store i32 0, i32* %9
br label %72
72: ; preds = %126, %71
%73 = load i32, i32* %9
%74 = load i32, i32* %10
%75 = icmp sle i32 %73, %74
br i1 %75, label %76, label %129
76: ; preds = %72
%77 = load double**, double*** %6
%78 = load i32, i32* %9
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds double*, double** %77, i64 %79
%81 = load double*, double** %80
%82 = load i32, i32* %10
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds double, double* %81, i64 %83
%85 = load double, double* %84
store double %85, double* %12
store i32 0, i32* %11
br label %86
86: ; preds = %113, %76
%87 = load i32, i32* %11
%88 = load i32, i32* %9
%89 = sub nsw i32 %88, 1
%90 = icmp sle i32 %87, %89
br i1 %90, label %91, label %116
91: ; preds = %86
%92 = load double, double* %12
%93 = load double**, double*** %7
%94 = load i32, i32* %9
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds double*, double** %93, i64 %95
%97 = load double*, double** %96
%98 = load i32, i32* %11
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds double, double* %97, i64 %99
%101 = load double, double* %100
%102 = load double**, double*** %8
%103 = load i32, i32* %11
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds double*, double** %102, i64 %104
%106 = load double*, double** %105
%107 = load i32, i32* %10
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %106, i64 %108
%110 = load double, double* %109
%111 = fneg double %101
%112 = call double @llvm.fmuladd.f64(double %111, double %110, double %92)
store double %112, double* %12
br label %113
113: ; preds = %91
%114 = load i32, i32* %11
%115 = add nsw i32 %114, 1
store i32 %115, i32* %11
br label %86
116: ; preds = %86
%117 = load double, double* %12
%118 = load double**, double*** %8
%119 = load i32, i32* %9
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds double*, double** %118, i64 %120
%122 = load double*, double** %121
%123 = load i32, i32* %10
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %122, i64 %124
store double %117, double* %125
br label %126
126: ; preds = %116
%127 = load i32, i32* %9
%128 = add nsw i32 %127, 1
store i32 %128, i32* %9
br label %72
129: ; preds = %72
%130 = load i32, i32* %10
%131 = add nsw i32 %130, 1
store i32 %131, i32* %9
br label %132
132: ; preds = %211, %129
%133 = load i32, i32* %9
%134 = load i32, i32* %5
%135 = sub nsw i32 %134, 1
%136 = icmp sle i32 %133, %135
br i1 %136, label %137, label %214
137: ; preds = %132
%138 = load double**, double*** %6
%139 = load i32, i32* %9
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double*, double** %138, i64 %140
%142 = load double*, double** %141
%143 = load i32, i32* %10
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double, double* %142, i64 %144
%146 = load double, double* %145
store double %146, double* %12
store i32 0, i32* %11
br label %147
147: ; preds = %173, %137
%148 = load i32, i32* %11
%149 = load i32, i32* %10
%150 = sub nsw i32 %149, 1
%151 = icmp sle i32 %148, %150
br i1 %151, label %152, label %176
152: ; preds = %147
%153 = load double, double* %12
%154 = load double**, double*** %7
%155 = load i32, i32* %9
%156 = sext i32 %155 to i64
%157 = getelementptr inbounds double*, double** %154, i64 %156
%158 = load double*, double** %157
%159 = load i32, i32* %11
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %158, i64 %160
%162 = load double, double* %161
%163 = load double**, double*** %8
%164 = load i32, i32* %11
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds double*, double** %163, i64 %165
%167 = load double*, double** %166
%168 = load i32, i32* %10
%169 = sext i32 %168 to i64
%170 = getelementptr inbounds double, double* %167, i64 %169
%171 = load double, double* %170
%172 = call double @llvm.fmuladd.f64(double %162, double %171, double %153)
store double %172, double* %12
br label %173
173: ; preds = %152
%174 = load i32, i32* %11
%175 = add nsw i32 %174, 1
store i32 %175, i32* %11
br label %147
176: ; preds = %147
%177 = load double**, double*** %8
%178 = load i32, i32* %10
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds double*, double** %177, i64 %179
%181 = load double*, double** %180
%182 = load i32, i32* %10
%183 = sext i32 %182 to i64
%184 = getelementptr inbounds double, double* %181, i64 %183
%185 = load double, double* %184
%186 = fcmp oeq double %185, 0.000000e+00
br i1 %186, label %187, label %190
187: ; preds = %176
%188 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%189 = call i32 @exit(i32 1)
unreachable
190: ; preds = %176
%191 = load double, double* %12
%192 = load double**, double*** %8
%193 = load i32, i32* %10
%194 = sext i32 %193 to i64
%195 = getelementptr inbounds double*, double** %192, i64 %194
%196 = load double*, double** %195
%197 = load i32, i32* %10
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds double, double* %196, i64 %198
%200 = load double, double* %199
%201 = fdiv double %191, %200
%202 = load double**, double*** %7
%203 = load i32, i32* %9
%204 = sext i32 %203 to i64
%205 = getelementptr inbounds double*, double** %202, i64 %204
%206 = load double*, double** %205
%207 = load i32, i32* %10
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %206, i64 %208
store double %201, double* %209
br label %210
210: ; preds = %190
br label %211
211: ; preds = %210
%212 = load i32, i32* %9
%213 = add nsw i32 %212, 1
store i32 %213, i32* %9
br label %132
214: ; preds = %132
br label %215
215: ; preds = %214
%216 = load i32, i32* %10
%217 = add nsw i32 %216, 1
store i32 %217, i32* %10
br label %66
218: ; preds = %66
ret void
}

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