#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 */
scalar_t__ fabs(double);
long int denseGETRF(double **a, const size_t m, const size_t n, long int *p) {
  long int i, j;
  long int l;
  double *col_j, *col_k;
  double temp, mult, a_kj;
  for (long int k = 0; k < n; k++) {
    col_k = a[k];
    l = k;
    for (i = k + 1; i < m; i++)
      if (fabs(col_k[i]) > fabs(col_k[l]))
        l = i;
    p[k] = l;
    if (col_k[l] == 0.0)
      return (k + 1);
    if (l != k) {
      for (i = 0; i < n; i++) {
        temp = a[i][l];
        a[i][l] = a[i][k];
        a[i][k] = temp;
      }
    }
    mult = 1.0 / col_k[k];
    for (i = k + 1; i < m; i++)
      col_k[i] *= mult;
    for (j = k + 1; j < n; j++) {
      col_j = a[j];
      a_kj = col_j[k];
      if (a_kj != 0.0) {
        for (i = k + 1; i < m; i++)
          col_j[i] -= a_kj * col_k[i];
      }
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<denseGETRF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
movq   $0x0,-0x70(%rbp)
mov    -0x70(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    13f6 <denseGETRF+0x2e6>
mov    -0x10(%rbp),%rax
mov    -0x70(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x50(%rbp)
mov    -0x70(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    11c9 <denseGETRF+0xb9>
mov    -0x50(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <fabs@plt>
mov    %rax,-0x78(%rbp)
mov    -0x50(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0x78(%rbp),%rax
cmp    %rcx,%rax
jle    11b3 <denseGETRF+0xa3>
mov    -0x30(%rbp),%rax
mov    %rax,-0x40(%rbp)
jmp    11b8 <denseGETRF+0xa8>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1165 <denseGETRF+0x55>
mov    -0x40(%rbp),%rdx
mov    -0x28(%rbp),%rax
mov    -0x70(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x50(%rbp),%rax
mov    -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    120a <denseGETRF+0xfa>
jp     120a <denseGETRF+0xfa>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    13fe <denseGETRF+0x2ee>
mov    -0x40(%rbp),%rax
cmp    -0x70(%rbp),%rax
je     12a2 <denseGETRF+0x192>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    129d <denseGETRF+0x18d>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x70(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1220 <denseGETRF+0x110>
jmp    12a2 <denseGETRF+0x192>
mov    -0x50(%rbp),%rax
mov    -0x70(%rbp),%rcx
movsd  0xd4e(%rip),%xmm0
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    12fe <denseGETRF+0x1ee>
movsd  -0x60(%rbp),%xmm0
mov    -0x50(%rbp),%rax
mov    -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    12c8 <denseGETRF+0x1b8>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    13e0 <denseGETRF+0x2d0>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1357 <denseGETRF+0x247>
jp     1357 <denseGETRF+0x247>
jmp    13ca <denseGETRF+0x2ba>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    13c5 <denseGETRF+0x2b5>
movsd  -0x68(%rbp),%xmm0
mov    -0x50(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x48(%rbp),%rax
mov    -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1363 <denseGETRF+0x253>
jmp    13ca <denseGETRF+0x2ba>
jmp    13cf <denseGETRF+0x2bf>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    130a <denseGETRF+0x1fa>
jmp    13e5 <denseGETRF+0x2d5>
mov    -0x70(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x70(%rbp)
jmp    1133 <denseGETRF+0x23>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<denseGETRF>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rcx,0x50(%rsp)
test   %rdx,%rdx
je     1594 <denseGETRF+0x484>
mov    %rsi,%r12
lea    -0x1(%rsi),%rax
mov    %rax,0x40(%rsp)
mov    %rdx,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x38(%rsp)
lea    -0x5(%rsi),%rax
mov    %rax,0x20(%rsp)
mov    $0x7,%eax
mov    %rax,0x8(%rsp)
xor    %eax,%eax
mov    %rdx,0x48(%rsp)
mov    %rdi,0x28(%rsp)
jmp    1185 <denseGETRF+0x75>
cs nopw 0x0(%rax,%rax,1)
nop
addq   $0x1,0x8(%rsp)
addq   $0xffffffffffffffff,0x20(%rsp)
cmp    %rdx,%rax
je     1594 <denseGETRF+0x484>
mov    %rax,%rbx
add    $0x1,%rax
mov    (%rdi,%rbx,8),%r15
mov    %rbx,0x18(%rsp)
mov    %rax,0x10(%rsp)
cmp    %r12,%rax
jae    11f0 <denseGETRF+0xe0>
mov    0x10(%rsp),%r14
mov    0x18(%rsp),%r13
jmp    11bc <denseGETRF+0xac>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
mov    %rbx,%r13
cmp    %r12,%r14
jae    11f0 <denseGETRF+0xe0>
movsd  (%r15,%r14,8),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rbp
movsd  (%r15,%r13,8),%xmm0
call   1030 <fabs@plt>
mov    %r14,%rbx
cmp    %rax,%rbp
jg     11b0 <denseGETRF+0xa0>
mov    %r13,%rbx
jmp    11b0 <denseGETRF+0xa0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x50(%rsp),%rax
mov    0x18(%rsp),%r9
mov    %rbx,(%rax,%r9,8)
movsd  (%r15,%rbx,8),%xmm0
xorpd  %xmm8,%xmm8
ucomisd %xmm8,%xmm0
jne    1216 <denseGETRF+0x106>
jnp    1598 <denseGETRF+0x488>
mov    0x40(%rsp),%r14
sub    %r9,%r14
mov    0x20(%rsp),%r11
shr    $0x2,%r11
lea    -0x4(%r14),%rax
add    $0x1,%r11
mov    %rax,0x30(%rsp)
mov    %rax,%r8
shr    $0x2,%r8
cmp    %r9,%rbx
mov    0x48(%rsp),%rdx
mov    0x28(%rsp),%rdi
mov    0x10(%rsp),%rax
je     12bd <denseGETRF+0x1ad>
xor    %ecx,%ecx
cmp    $0x1,%rdx
je     129e <denseGETRF+0x18e>
mov    0x38(%rsp),%rbp
nopl   0x0(%rax)
mov    (%rdi,%rcx,8),%rsi
movsd  (%rsi,%rbx,8),%xmm0
movsd  (%rsi,%r9,8),%xmm1
movsd  %xmm1,(%rsi,%rbx,8)
movsd  %xmm0,(%rsi,%r9,8)
mov    0x8(%rdi,%rcx,8),%rsi
movsd  (%rsi,%rbx,8),%xmm0
movsd  (%rsi,%r9,8),%xmm1
movsd  %xmm1,(%rsi,%rbx,8)
movsd  %xmm0,(%rsi,%r9,8)
add    $0x2,%rcx
cmp    %rcx,%rbp
jne    1260 <denseGETRF+0x150>
test   $0x1,%dl
je     12bd <denseGETRF+0x1ad>
mov    (%rdi,%rcx,8),%rcx
movsd  (%rcx,%rbx,8),%xmm0
movsd  (%rcx,%r9,8),%xmm1
movsd  %xmm1,(%rcx,%rbx,8)
movsd  %xmm0,(%rcx,%r9,8)
and    $0xfffffffffffffffe,%r11
add    $0x1,%r8
cmp    %r12,%rax
movapd 0xd40(%rip),%xmm7
jae    13c9 <denseGETRF+0x2b9>
movsd  0xd22(%rip),%xmm0
divsd  (%r15,%r9,8),%xmm0
mov    %rax,%rsi
cmp    $0x4,%r14
jb     13b0 <denseGETRF+0x2a0>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmpq   $0x4,0x30(%rsp)
jae    1305 <denseGETRF+0x1f5>
xor    %ebp,%ebp
jmp    1368 <denseGETRF+0x258>
mov    0x8(%rsp),%rcx
lea    (%r15,%rcx,8),%rcx
mov    %r11,%rsi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movupd -0x30(%rcx,%rbp,8),%xmm2
movupd -0x20(%rcx,%rbp,8),%xmm3
movupd -0x10(%rcx,%rbp,8),%xmm4
movupd (%rcx,%rbp,8),%xmm5
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,-0x30(%rcx,%rbp,8)
movupd %xmm3,-0x20(%rcx,%rbp,8)
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,-0x10(%rcx,%rbp,8)
movupd %xmm5,(%rcx,%rbp,8)
add    $0x8,%rbp
add    $0xfffffffffffffffe,%rsi
jne    1320 <denseGETRF+0x210>
mov    %r14,%rsi
and    $0xfffffffffffffffc,%rsi
test   $0x1,%r8b
je     139a <denseGETRF+0x28a>
add    %rax,%rbp
movupd (%r15,%rbp,8),%xmm2
movupd 0x10(%r15,%rbp,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%r15,%rbp,8)
movupd %xmm3,0x10(%r15,%rbp,8)
cmp    %rsi,%r14
je     13c9 <denseGETRF+0x2b9>
add    %rax,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r15,%rsi,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%rsi,8)
add    $0x1,%rsi
cmp    %r12,%rsi
jb     13b0 <denseGETRF+0x2a0>
cmp    %rdx,%rax
jae    1170 <denseGETRF+0x60>
lea    (%r15,%rax,8),%rcx
mov    %rcx,0x70(%rsp)
lea    (%r15,%r12,8),%r13
mov    %r14,%rcx
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x60(%rsp)
add    %rax,%rcx
mov    %rcx,0x58(%rsp)
mov    0x8(%rsp),%rcx
lea    (%r15,%rcx,8),%rbx
mov    %rax,%rsi
mov    %r8,0x68(%rsp)
jmp    141d <denseGETRF+0x30d>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rsi
cmp    %rdx,%rsi
jae    1170 <denseGETRF+0x60>
mov    (%rdi,%rsi,8),%r8
movsd  (%r8,%r9,8),%xmm0
ucomisd %xmm8,%xmm0
jne    1430 <denseGETRF+0x320>
jnp    1410 <denseGETRF+0x300>
cmp    %r12,%rax
jae    1410 <denseGETRF+0x300>
xorpd  %xmm7,%xmm0
mov    %rax,%rcx
cmp    $0x4,%r14
jb     1570 <denseGETRF+0x460>
lea    (%r8,%rax,8),%rcx
cmp    %r13,%rcx
jae    1461 <denseGETRF+0x351>
lea    (%r8,%r12,8),%rbp
mov    %rax,%rcx
cmp    %rbp,0x70(%rsp)
jb     1570 <denseGETRF+0x460>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmpq   $0x4,0x30(%rsp)
jae    1479 <denseGETRF+0x369>
xor    %r9d,%r9d
jmp    150b <denseGETRF+0x3fb>
mov    0x8(%rsp),%rcx
lea    (%r8,%rcx,8),%r10
mov    %r11,%rcx
xor    %r9d,%r9d
nopl   0x0(%rax,%rax,1)
movupd -0x30(%rbx,%r9,8),%xmm2
movupd -0x20(%rbx,%r9,8),%xmm3
mulpd  %xmm1,%xmm2
movupd -0x30(%r10,%r9,8),%xmm4
addpd  %xmm2,%xmm4
movupd -0x20(%r10,%r9,8),%xmm2
movupd -0x10(%r10,%r9,8),%xmm5
movupd (%r10,%r9,8),%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm4,-0x30(%r10,%r9,8)
movupd %xmm3,-0x20(%r10,%r9,8)
movupd -0x10(%rbx,%r9,8),%xmm2
movupd (%rbx,%r9,8),%xmm3
mulpd  %xmm1,%xmm2
addpd  %xmm5,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm6,%xmm3
movupd %xmm2,-0x10(%r10,%r9,8)
movupd %xmm3,(%r10,%r9,8)
add    $0x8,%r9
add    $0xfffffffffffffffe,%rcx
jne    1490 <denseGETRF+0x380>
testb  $0x1,0x68(%rsp)
mov    0x10(%rsp),%rax
je     1551 <denseGETRF+0x441>
add    %rax,%r9
movupd (%r15,%r9,8),%xmm2
movupd 0x10(%r15,%r9,8),%xmm3
movupd (%r8,%r9,8),%xmm4
movupd 0x10(%r8,%r9,8),%xmm5
mulpd  %xmm1,%xmm2
addpd  %xmm4,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm2,(%r8,%r9,8)
movupd %xmm3,0x10(%r8,%r9,8)
mov    0x58(%rsp),%rcx
cmp    0x60(%rsp),%r14
mov    0x28(%rsp),%rdi
mov    0x18(%rsp),%r9
je     1410 <denseGETRF+0x300>
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%r8,%rcx,8),%xmm1
movsd  %xmm1,(%r8,%rcx,8)
add    $0x1,%rcx
cmp    %r12,%rcx
jb     1570 <denseGETRF+0x460>
jmp    1410 <denseGETRF+0x300>
xor    %eax,%eax
jmp    159d <denseGETRF+0x48d>
mov    0x10(%rsp),%rax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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