#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 fabs(double);
int /*<<< orphan*/ lu_pivot(double **, double *, double *, int, int);
void lu_decompose(double **a, int n, double *O, double *S) {
  int i, j, k;
  double factor;
  for (i = 0; i < n; i++) {
    O[i] = i;
    S[i] = fabs(a[i][0]);
    for (j = 1; j < n; j++) {
      if (fabs(a[i][j]) > S[i])
        S[i] = fabs(a[i][j]);
    }
  }
  for (k = 0; k < n - 1; k++) {
    lu_pivot(a, O, S, n, k);
    for (i = k + 1; i < n; i++) {
      factor = a[i][k] / a[k][k];
      a[i][k] = factor;
      for (j = k + 1; j < n; j++) {
        a[i][j] = a[i][j] - factor * a[k][j];
      }
    }
  }
}


x86 assembly (clang, -O0):
<lu_decompose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    120d <lu_decompose+0xfd>
cvtsi2sdl -0x24(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  (%rax),%xmm0
movaps 0xe9d(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11fa <lu_decompose+0xea>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe5d(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    11e7 <lu_decompose+0xd7>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe2a(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    11ec <lu_decompose+0xdc>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    117b <lu_decompose+0x6b>
jmp    11ff <lu_decompose+0xef>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112e <lu_decompose+0x1e>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1347 <lu_decompose+0x237>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
call   1030 <lu_pivot@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1334 <lu_decompose+0x224>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1321 <lu_decompose+0x211>
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
mov    -0x8(%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
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12a4 <lu_decompose+0x194>
jmp    1326 <lu_decompose+0x216>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1246 <lu_decompose+0x136>
jmp    1339 <lu_decompose+0x229>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1214 <lu_decompose+0x104>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lu_decompose>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
test   %esi,%esi
jle    152b <lu_decompose+0x41b>
mov    %rcx,%r9
mov    %rdx,%r8
mov    %esi,%ecx
mov    %esi,%r14d
lea    -0x1(%r14),%rax
mov    %rax,%rdx
mov    %rax,0x18(%rsp)
and    $0xfffffffffffffffe,%rax
neg    %rax
xor    %ebx,%ebx
movapd 0xeaf(%rip),%xmm0
jmp    116d <lu_decompose+0x5d>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rbx
cmp    %r14,%rbx
je     1227 <lu_decompose+0x117>
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd  %xmm1,(%r8,%rbx,8)
mov    (%rdi,%rbx,8),%rdx
movsd  (%rdx),%xmm1
andpd  %xmm0,%xmm1
movlpd %xmm1,(%r9,%rbx,8)
cmp    $0x1,%ecx
je     11c0 <lu_decompose+0xb0>
mov    $0x1,%esi
cmp    $0x2,%ecx
jne    11d0 <lu_decompose+0xc0>
testb  $0x1,0x18(%rsp)
je     1160 <lu_decompose+0x50>
movsd  (%rdx,%rsi,8),%xmm2
andpd  %xmm0,%xmm2
ucomisd %xmm1,%xmm2
jbe    1160 <lu_decompose+0x50>
movsd  %xmm2,(%r9,%rbx,8)
jmp    1160 <lu_decompose+0x50>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    %r14,%rbx
jne    116d <lu_decompose+0x5d>
jmp    152b <lu_decompose+0x41b>
xchg   %ax,%ax
mov    $0x1,%esi
jmp    11f2 <lu_decompose+0xe2>
nopw   0x0(%rax,%rax,1)
lea    (%rax,%rsi,1),%rbp
add    $0x2,%rbp
add    $0x2,%rsi
cmp    $0x1,%rbp
je     119b <lu_decompose+0x8b>
movsd  (%rdx,%rsi,8),%xmm2
andpd  %xmm0,%xmm2
ucomisd %xmm1,%xmm2
jbe    120b <lu_decompose+0xfb>
movsd  %xmm2,(%r9,%rbx,8)
movapd %xmm2,%xmm1
movsd  0x8(%rdx,%rsi,8),%xmm2
andpd  %xmm0,%xmm2
ucomisd %xmm1,%xmm2
jbe    11e0 <lu_decompose+0xd0>
movsd  %xmm2,(%r9,%rbx,8)
movapd %xmm2,%xmm1
jmp    11e0 <lu_decompose+0xd0>
cmp    $0x2,%ecx
jl     152b <lu_decompose+0x41b>
lea    -0x1(%rcx),%eax
mov    %rax,0x38(%rsp)
mov    %r14,%r10
neg    %r10
lea    -0x5(%r14),%rax
mov    %rax,0x10(%rsp)
mov    $0x1,%r12d
mov    $0x7,%eax
mov    %rax,0x8(%rsp)
xor    %ebx,%ebx
mov    %r8,0x48(%rsp)
mov    %rcx,0x40(%rsp)
mov    %rdi,0x28(%rsp)
mov    %r10,0x20(%rsp)
mov    %r9,0x30(%rsp)
jmp    12af <lu_decompose+0x19f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r12
addq   $0x1,0x8(%rsp)
addq   $0xffffffffffffffff,0x10(%rsp)
mov    0x50(%rsp),%rbx
cmp    0x38(%rsp),%rbx
mov    0x48(%rsp),%r8
mov    0x40(%rsp),%rcx
mov    0x30(%rsp),%r9
je     152b <lu_decompose+0x41b>
mov    %r8,%rsi
mov    %r9,%rdx
mov    %ebx,%r8d
call   1030 <lu_pivot@plt>
movapd 0xd4b(%rip),%xmm7
mov    0x20(%rsp),%r10
mov    0x28(%rsp),%rdi
lea    0x1(%rbx),%rax
mov    %rax,0x50(%rsp)
cmp    %r14,%rax
jae    1280 <lu_decompose+0x170>
mov    0x10(%rsp),%rax
shr    $0x2,%rax
add    $0x1,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x58(%rsp)
mov    0x18(%rsp),%rax
sub    %rbx,%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,0x78(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
mov    %rax,0x70(%rsp)
mov    %rbx,%r13
not    %r13
add    %r14,%r13
mov    (%rdi,%rbx,8),%rax
lea    (%rax,%r12,8),%rcx
mov    %rcx,0x80(%rsp)
lea    (%rax,%r14,8),%rsi
mov    %r13,%rcx
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x68(%rsp)
add    %r12,%rcx
mov    %rcx,0x60(%rsp)
mov    0x8(%rsp),%rcx
lea    (%rax,%rcx,8),%r8
mov    %r12,%r15
jmp    135d <lu_decompose+0x24d>
add    $0x1,%r15
cmp    %r14,%r15
je     1280 <lu_decompose+0x170>
mov    (%rdi,%r15,8),%r9
movsd  (%r9,%rbx,8),%xmm0
divsd  (%rax,%rbx,8),%xmm0
movsd  %xmm0,(%r9,%rbx,8)
xorpd  %xmm7,%xmm0
mov    %r12,%rdx
cmp    $0x4,%r13
jb     14b0 <lu_decompose+0x3a0>
lea    (%r9,%r12,8),%rcx
cmp    %rsi,%rcx
jae    13a1 <lu_decompose+0x291>
lea    (%r9,%r14,8),%rcx
mov    %r12,%rdx
cmp    %rcx,0x80(%rsp)
jb     14b0 <lu_decompose+0x3a0>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmpq   $0x4,0x78(%rsp)
jae    13b9 <lu_decompose+0x2a9>
xor    %r11d,%r11d
jmp    144b <lu_decompose+0x33b>
mov    0x8(%rsp),%rcx
lea    (%r9,%rcx,8),%r10
mov    0x58(%rsp),%rcx
xor    %r11d,%r11d
nopw   0x0(%rax,%rax,1)
movupd -0x30(%r8,%r11,8),%xmm2
movupd -0x20(%r8,%r11,8),%xmm3
mulpd  %xmm1,%xmm2
movupd -0x30(%r10,%r11,8),%xmm4
addpd  %xmm2,%xmm4
movupd -0x20(%r10,%r11,8),%xmm2
movupd -0x10(%r10,%r11,8),%xmm5
movupd (%r10,%r11,8),%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm4,-0x30(%r10,%r11,8)
movupd %xmm3,-0x20(%r10,%r11,8)
movupd -0x10(%r8,%r11,8),%xmm2
movupd (%r8,%r11,8),%xmm3
mulpd  %xmm1,%xmm2
addpd  %xmm5,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm6,%xmm3
movupd %xmm2,-0x10(%r10,%r11,8)
movupd %xmm3,(%r10,%r11,8)
add    $0x8,%r11
add    $0xfffffffffffffffe,%rcx
jne    13d0 <lu_decompose+0x2c0>
testb  $0x1,0x70(%rsp)
mov    0x28(%rsp),%rdi
mov    0x20(%rsp),%r10
je     1496 <lu_decompose+0x386>
add    %r12,%r11
movupd (%r9,%r11,8),%xmm2
movupd 0x10(%r9,%r11,8),%xmm3
movupd (%rax,%r11,8),%xmm4
movupd 0x10(%rax,%r11,8),%xmm5
mulpd  %xmm1,%xmm4
addpd  %xmm2,%xmm4
mulpd  %xmm1,%xmm5
addpd  %xmm3,%xmm5
movupd %xmm4,(%r9,%r11,8)
movupd %xmm5,0x10(%r9,%r11,8)
mov    0x60(%rsp),%rdx
cmp    0x68(%rsp),%r13
je     1350 <lu_decompose+0x240>
cs nopw 0x0(%rax,%rax,1)
mov    %r14d,%ebp
sub    %edx,%ebp
mov    %rdx,%rcx
test   $0x1,%bpl
je     14d7 <lu_decompose+0x3c7>
movsd  (%rax,%rdx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r9,%rdx,8),%xmm1
movsd  %xmm1,(%r9,%rdx,8)
lea    0x1(%rdx),%rcx
not    %rdx
cmp    %r10,%rdx
je     1350 <lu_decompose+0x240>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r9,%rcx,8),%xmm1
movsd  %xmm1,(%r9,%rcx,8)
movsd  0x8(%rax,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x8(%r9,%rcx,8),%xmm1
movsd  %xmm1,0x8(%r9,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%r14
jne    14f0 <lu_decompose+0x3e0>
jmp    1350 <lu_decompose+0x240>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @lu_decompose(double** %0, i32 %1, double* %2, double* %3) {
%5 = alloca double**
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca double
store double** %0, double*** %5
store i32 %1, i32* %6
store double* %2, double** %7
store double* %3, double** %8
store i32 0, i32* %9
br label %13
13: ; preds = %77, %4
%14 = load i32, i32* %9
%15 = load i32, i32* %6
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %80
17: ; preds = %13
%18 = load i32, i32* %9
%19 = sitofp i32 %18 to double
%20 = load double*, double** %7
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
store double %19, double* %23
%24 = load double**, double*** %5
%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 = getelementptr inbounds double, double* %28, i64 0
%30 = load double, double* %29
%31 = call double @llvm.fabs.f64(double %30)
%32 = load double*, double** %8
%33 = load i32, i32* %9
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double, double* %32, i64 %34
store double %31, double* %35
store i32 1, i32* %10
br label %36
36: ; preds = %73, %17
%37 = load i32, i32* %10
%38 = load i32, i32* %6
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %76
40: ; preds = %36
%41 = load double**, double*** %5
%42 = load i32, i32* %9
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double*, double** %41, i64 %43
%45 = load double*, double** %44
%46 = load i32, i32* %10
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %45, i64 %47
%49 = load double, double* %48
%50 = call double @llvm.fabs.f64(double %49)
%51 = load double*, double** %8
%52 = load i32, i32* %9
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds double, double* %51, i64 %53
%55 = load double, double* %54
%56 = fcmp ogt double %50, %55
br i1 %56, label %57, label %72
57: ; preds = %40
%58 = load double**, double*** %5
%59 = load i32, i32* %9
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double*, double** %58, i64 %60
%62 = load double*, double** %61
%63 = load i32, i32* %10
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %62, i64 %64
%66 = load double, double* %65
%67 = call double @llvm.fabs.f64(double %66)
%68 = load double*, double** %8
%69 = load i32, i32* %9
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %68, i64 %70
store double %67, double* %71
br label %72
72: ; preds = %57, %40
br label %73
73: ; preds = %72
%74 = load i32, i32* %10
%75 = add nsw i32 %74, 1
store i32 %75, i32* %10
br label %36
76: ; preds = %36
br label %77
77: ; preds = %76
%78 = load i32, i32* %9
%79 = add nsw i32 %78, 1
store i32 %79, i32* %9
br label %13
80: ; preds = %13
store i32 0, i32* %11
br label %81
81: ; preds = %172, %80
%82 = load i32, i32* %11
%83 = load i32, i32* %6
%84 = sub nsw i32 %83, 1
%85 = icmp slt i32 %82, %84
br i1 %85, label %86, label %175
86: ; preds = %81
%87 = load double**, double*** %5
%88 = load double*, double** %7
%89 = load double*, double** %8
%90 = load i32, i32* %6
%91 = load i32, i32* %11
%92 = call i32 @lu_pivot(double** %87, double* %88, double* %89, i32 %90, i32 %91)
%93 = load i32, i32* %11
%94 = add nsw i32 %93, 1
store i32 %94, i32* %9
br label %95
95: ; preds = %168, %86
%96 = load i32, i32* %9
%97 = load i32, i32* %6
%98 = icmp slt i32 %96, %97
br i1 %98, label %99, label %171
99: ; preds = %95
%100 = load double**, double*** %5
%101 = load i32, i32* %9
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double*, double** %100, i64 %102
%104 = load double*, double** %103
%105 = load i32, i32* %11
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds double, double* %104, i64 %106
%108 = load double, double* %107
%109 = load double**, double*** %5
%110 = load i32, i32* %11
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double*, double** %109, i64 %111
%113 = load double*, double** %112
%114 = load i32, i32* %11
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %113, i64 %115
%117 = load double, double* %116
%118 = fdiv double %108, %117
store double %118, double* %12
%119 = load double, double* %12
%120 = load double**, double*** %5
%121 = load i32, i32* %9
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds double*, double** %120, i64 %122
%124 = load double*, double** %123
%125 = load i32, i32* %11
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double, double* %124, i64 %126
store double %119, double* %127
%128 = load i32, i32* %11
%129 = add nsw i32 %128, 1
store i32 %129, i32* %10
br label %130
130: ; preds = %164, %99
%131 = load i32, i32* %10
%132 = load i32, i32* %6
%133 = icmp slt i32 %131, %132
br i1 %133, label %134, label %167
134: ; preds = %130
%135 = load double**, double*** %5
%136 = load i32, i32* %9
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double*, double** %135, i64 %137
%139 = load double*, double** %138
%140 = load i32, i32* %10
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds double, double* %139, i64 %141
%143 = load double, double* %142
%144 = load double, double* %12
%145 = load double**, double*** %5
%146 = load i32, i32* %11
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds double*, double** %145, i64 %147
%149 = load double*, double** %148
%150 = load i32, i32* %10
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %149, i64 %151
%153 = load double, double* %152
%154 = fneg double %144
%155 = call double @llvm.fmuladd.f64(double %154, double %153, double %143)
%156 = load double**, double*** %5
%157 = load i32, i32* %9
%158 = sext i32 %157 to i64
%159 = getelementptr inbounds double*, double** %156, i64 %158
%160 = load double*, double** %159
%161 = load i32, i32* %10
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds double, double* %160, i64 %162
store double %155, double* %163
br label %164
164: ; preds = %134
%165 = load i32, i32* %10
%166 = add nsw i32 %165, 1
store i32 %166, i32* %10
br label %130
167: ; preds = %130
br label %168
168: ; preds = %167
%169 = load i32, i32* %9
%170 = add nsw i32 %169, 1
store i32 %170, i32* %9
br label %95
171: ; preds = %95
br label %172
172: ; preds = %171
%173 = load i32, i32* %11
%174 = add nsw i32 %173, 1
store i32 %174, i32* %11
br label %81
175: ; preds = %81
ret void
}

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