#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*/ swapRows(double **, int, int);
void makeLowerDiag(double aug_matrix[][10 * 10 + 1], int n) {
  int i, j, k;
  double mult;
  double temp;
  int bestrow, tryrow = 0;
  double s[10 * 10];
  for (i = 0; i < n; i++) {
    s[i] = 0.0;
    for (j = 0; j < n; j++) {
      if (fabs(aug_matrix[i][j]) > fabs(s[i]))
        s[i] = fabs(aug_matrix[i][j]);
    }
  }
  for (i = 1; i < n; i++) {
    for (j = i; j < n; j++) {
      bestrow = i - 1;
      for (tryrow = i; tryrow < n; tryrow++) {
        if (fabs(aug_matrix[tryrow][i - 1]) / s[tryrow] >
            fabs(aug_matrix[bestrow][i - 1]) / s[bestrow])
          bestrow = tryrow;
      }
      if (i - 1 != bestrow) {
        swapRows(aug_matrix, i - 1, bestrow);
      }
      mult = aug_matrix[j][i - 1] / aug_matrix[i - 1][i - 1];
      for (k = 0; k < n + 1; k++) {
        aug_matrix[j][k] -= (mult * aug_matrix[i - 1][k]);
      }
    }
  }
}


x86 assembly (clang, -O0):
<makeLowerDiag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x350,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1200 <makeLowerDiag+0xf0>
movslq -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x350(%rbp,%rax,8)
ff ff
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ed <makeLowerDiag+0xdd>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
imul   $0x328,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe7f(%rip),%xmm1
pand   %xmm1,%xmm0
movslq -0x10(%rbp),%rax
movsd  -0x350(%rbp,%rax,8),%xmm1
ff ff
movaps 0xe67(%rip),%xmm2
pand   %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jbe    11da <makeLowerDiag+0xca>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
imul   $0x328,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe37(%rip),%xmm1
pand   %xmm1,%xmm0
movslq -0x10(%rbp),%rax
movsd  %xmm0,-0x350(%rbp,%rax,8)
ff ff
jmp    11df <makeLowerDiag+0xcf>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1153 <makeLowerDiag+0x43>
jmp    11f2 <makeLowerDiag+0xe2>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <makeLowerDiag+0x20>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    13ee <makeLowerDiag+0x2de>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    13db <makeLowerDiag+0x2cb>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12d3 <makeLowerDiag+0x1c3>
mov    -0x8(%rbp),%rax
movslq -0x30(%rbp),%rcx
imul   $0x328,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xd99(%rip),%xmm1
pand   %xmm1,%xmm0
movslq -0x30(%rbp),%rax
divsd  -0x350(%rbp,%rax,8),%xmm0
ff ff
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
imul   $0x328,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movaps 0xd61(%rip),%xmm2
pand   %xmm2,%xmm1
movslq -0x2c(%rbp),%rax
divsd  -0x350(%rbp,%rax,8),%xmm1
ff ff
ucomisd %xmm1,%xmm0
jbe    12c0 <makeLowerDiag+0x1b0>
mov    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    12c5 <makeLowerDiag+0x1b5>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1234 <makeLowerDiag+0x124>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
cmp    -0x2c(%rbp),%eax
je     12f4 <makeLowerDiag+0x1e4>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
sub    $0x1,%esi
mov    -0x2c(%rbp),%edx
call   1030 <swapRows@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x328,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x328,%rcx,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    13c8 <makeLowerDiag+0x2b8>
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x328,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x328,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%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    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1345 <makeLowerDiag+0x235>
jmp    13cd <makeLowerDiag+0x2bd>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1219 <makeLowerDiag+0x109>
jmp    13e0 <makeLowerDiag+0x2d0>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1207 <makeLowerDiag+0xf7>
add    $0x350,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeLowerDiag>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3c8,%rsp
test   %esi,%esi
jle    15f3 <makeLowerDiag+0x4e3>
mov    %esi,%r8d
mov    %rdi,%r14
mov    %esi,%r12d
mov    %r12d,%eax
and    $0xfffffffe,%eax
lea    0x8(%rdi),%rcx
xor    %edx,%edx
movapd 0xeba(%rip),%xmm0
jmp    116d <makeLowerDiag+0x5d>
nopl   0x0(%rax,%rax,1)
movsd  %xmm1,0xa0(%rsp,%rdx,8)
add    $0x1,%rdx
add    $0x328,%rcx
cmp    %r12,%rdx
je     1211 <makeLowerDiag+0x101>
xorpd  %xmm1,%xmm1
xor    %esi,%esi
cmp    $0x1,%r8d
je     11d2 <makeLowerDiag+0xc2>
nopl   0x0(%rax)
movsd  -0x8(%rcx,%rsi,8),%xmm2
movsd  (%rcx,%rsi,8),%xmm3
andpd  %xmm0,%xmm2
movapd %xmm1,%xmm4
andpd  %xmm0,%xmm4
cmpltsd %xmm2,%xmm4
andpd  %xmm4,%xmm2
andnpd %xmm1,%xmm4
orpd   %xmm2,%xmm4
andpd  %xmm0,%xmm3
movapd %xmm4,%xmm1
andpd  %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
movapd %xmm1,%xmm2
andnpd %xmm4,%xmm2
andpd  %xmm3,%xmm1
orpd   %xmm2,%xmm1
add    $0x2,%rsi
cmp    %rsi,%rax
jne    1180 <makeLowerDiag+0x70>
test   $0x1,%r12b
je     1150 <makeLowerDiag+0x40>
imul   $0x328,%rdx,%rdi
add    %r14,%rdi
movsd  (%rdi,%rsi,8),%xmm2
andpd  %xmm0,%xmm2
movapd %xmm1,%xmm3
andpd  %xmm0,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm2
andnpd %xmm1,%xmm3
orpd   %xmm2,%xmm3
movapd %xmm3,%xmm1
jmp    1150 <makeLowerDiag+0x40>
cmp    $0x2,%r8d
jl     15f3 <makeLowerDiag+0x4e3>
lea    0x1(%r8),%r9d
mov    %r9d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x48(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x40(%rsp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x38(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x30(%rsp)
mov    %r9,%rax
neg    %rax
mov    %rax,0x80(%rsp)
lea    0x328(%r14),%r10
lea    0x30(%r14),%r11
lea    0x358(%r14),%rbp
lea    0x330(%r14),%r13
mov    $0x1,%edx
xor    %eax,%eax
movapd 0xd7b(%rip),%xmm7
movapd 0xd82(%rip),%xmm8
mov    %r14,%r15
mov    %r8,0x60(%rsp)
mov    %r9,0x58(%rsp)
jmp    12e3 <makeLowerDiag+0x1d3>
nopl   (%rax)
add    $0x1,%rdx
mov    0x18(%rsp),%rax
add    $0x1,%rax
add    $0x330,%r10
add    $0x328,%r11
mov    0x28(%rsp),%rbp
add    $0x328,%rbp
mov    0x20(%rsp),%r13
add    $0x328,%r13
add    $0x328,%r15
cmp    %r12,%rdx
je     15f3 <makeLowerDiag+0x4e3>
mov    %rax,0x18(%rsp)
imul   $0x328,%rax,%rax
add    %r14,%rax
mov    %rax,0x50(%rsp)
lea    (%rax,%r9,8),%rax
mov    %rax,0x68(%rsp)
lea    -0x1(%rdx),%rbx
imul   $0x328,%rbx,%rax
add    %r14,%rax
mov    %rax,0x10(%rsp)
lea    (%rax,%rdx,8),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,0x88(%rsp)
mov    %r13,0x20(%rsp)
mov    %rbp,0x28(%rsp)
mov    %rdx,%rsi
mov    %r10,0x78(%rsp)
mov    %r11,0x70(%rsp)
mov    %rdx,(%rsp)
jmp    135b <makeLowerDiag+0x24b>
add    $0x1,%rsi
add    $0x328,%rbp
add    $0x328,%r13
cmp    %r12,%rsi
je     12a0 <makeLowerDiag+0x190>
mov    %rsi,0x8(%rsp)
imul   $0x328,%rsi,%rax
add    %r14,%rax
mov    %rax,0x98(%rsp)
lea    (%rax,%r9,8),%rax
mov    %rax,0x90(%rsp)
mov    %r10,%rax
mov    %rdx,%rcx
mov    %ebx,%esi
jmp    13a1 <makeLowerDiag+0x291>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rcx
add    $0x328,%rax
mov    %edx,%esi
cmp    %rcx,%r12
je     13f0 <makeLowerDiag+0x2e0>
movslq %esi,%rdx
imul   $0x328,%rdx,%rdi
add    %r14,%rdi
movsd  (%rax),%xmm0
movhpd (%rdi,%rbx,8),%xmm0
andpd  %xmm7,%xmm0
movsd  0xa0(%rsp,%rcx,8),%xmm1
movhpd 0xa0(%rsp,%rdx,8),%xmm1
divpd  %xmm1,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
ucomisd %xmm1,%xmm0
mov    %ecx,%edx
ja     1390 <makeLowerDiag+0x280>
mov    %esi,%edx
jmp    1390 <makeLowerDiag+0x280>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edx,%eax
cmp    %rax,%rbx
je     1426 <makeLowerDiag+0x316>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <swapRows@plt>
movapd 0xc06(%rip),%xmm8
movapd 0xbee(%rip),%xmm7
mov    0x70(%rsp),%r11
mov    0x78(%rsp),%r10
mov    0x58(%rsp),%r9
mov    0x60(%rsp),%r8
mov    0x98(%rsp),%rdi
movsd  (%rdi,%rbx,8),%xmm0
xorpd  %xmm8,%xmm0
mov    0x88(%rsp),%rax
divsd  (%rax),%xmm0
cmp    $0x3,%r8d
jb     1468 <makeLowerDiag+0x358>
cmp    0x68(%rsp),%rdi
jae    14f0 <makeLowerDiag+0x3e0>
mov    0x90(%rsp),%rax
cmp    %rax,0x50(%rsp)
jae    14f0 <makeLowerDiag+0x3e0>
xor    %ecx,%ecx
mov    (%rsp),%rdx
mov    0x8(%rsp),%rsi
mov    %rcx,%rax
test   $0x1,%r9b
je     149b <makeLowerDiag+0x38b>
mov    0x10(%rsp),%rax
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  (%rdi,%rcx,8),%xmm1
movsd  %xmm1,(%rdi,%rcx,8)
mov    %rcx,%rax
or     $0x1,%rax
not    %rcx
cmp    0x80(%rsp),%rcx
je     1340 <makeLowerDiag+0x230>
nopl   0x0(%rax)
movsd  (%r15,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  -0x8(%r13,%rax,8),%xmm1
movsd  %xmm1,-0x8(%r13,%rax,8)
movsd  0x8(%r15,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
addsd  0x0(%r13,%rax,8),%xmm1
movsd  %xmm1,0x0(%r13,%rax,8)
add    $0x2,%rax
cmp    %rax,%r9
jne    14b0 <makeLowerDiag+0x3a0>
jmp    1340 <makeLowerDiag+0x230>
nop
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmpq   $0x0,0x40(%rsp)
mov    (%rsp),%rdx
mov    0x8(%rsp),%rsi
je     15e8 <makeLowerDiag+0x4d8>
mov    0x30(%rsp),%rcx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd -0x30(%r11,%rax,8),%xmm2
movupd -0x20(%r11,%rax,8),%xmm3
mulpd  %xmm1,%xmm2
movupd -0x30(%rbp,%rax,8),%xmm4
addpd  %xmm2,%xmm4
movupd -0x20(%rbp,%rax,8),%xmm2
movupd -0x10(%rbp,%rax,8),%xmm5
movupd 0x0(%rbp,%rax,8),%xmm6
mulpd  %xmm1,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm4,-0x30(%rbp,%rax,8)
movupd %xmm3,-0x20(%rbp,%rax,8)
movupd -0x10(%r11,%rax,8),%xmm2
movupd (%r11,%rax,8),%xmm3
mulpd  %xmm1,%xmm2
addpd  %xmm5,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm6,%xmm3
movupd %xmm2,-0x10(%rbp,%rax,8)
movupd %xmm3,0x0(%rbp,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1520 <makeLowerDiag+0x410>
testb  $0x1,0x38(%rsp)
je     15d2 <makeLowerDiag+0x4c2>
mov    0x10(%rsp),%rcx
movupd (%rcx,%rax,8),%xmm2
movupd 0x10(%rcx,%rax,8),%xmm3
movupd (%rdi,%rax,8),%xmm4
movupd 0x10(%rdi,%rax,8),%xmm5
mulpd  %xmm1,%xmm2
addpd  %xmm4,%xmm2
mulpd  %xmm1,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm2,(%rdi,%rax,8)
movupd %xmm3,0x10(%rdi,%rax,8)
mov    0x48(%rsp),%rax
mov    %rax,%rcx
cmp    %r9,%rax
je     1340 <makeLowerDiag+0x230>
jmp    1473 <makeLowerDiag+0x363>
xor    %eax,%eax
testb  $0x1,0x38(%rsp)
jne    159c <makeLowerDiag+0x48c>
jmp    15d2 <makeLowerDiag+0x4c2>
add    $0x3c8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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