void LU(int n, double mat[n][n], double L[n][n], double U[n][n]) {
  int k, i, j;
  for (k = 0; k < n; k++) {
    L[k][k] = 1;
    for (i = k + 1; i < n; i++) {
      L[i][k] = mat[i][k] / mat[k][k];
      for (j = k + 1; j < n; j++)
        mat[i][j] = mat[i][j] - L[i][k] * mat[k][j];
    }
    for (j = k; j < n; j++)
      U[k][j] = mat[k][j];
  }
}


x86 assembly (clang, -O0):
<LU>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x48(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1314 <LU+0x214>
mov    -0x40(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  0xea2(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12a1 <LU+0x1a1>
mov    -0x40(%rbp),%rdx
mov    -0x48(%rbp),%rsi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
imul   %rsi,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   %rsi,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    128e <LU+0x18e>
mov    -0x48(%rbp),%rdx
mov    -0x40(%rbp),%rsi
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
imul   %rsi,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%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    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11dd <LU+0xdd>
jmp    1293 <LU+0x193>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    116c <LU+0x6c>
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1301 <LU+0x201>
mov    -0x38(%rbp),%rdx
mov    -0x48(%rbp),%rsi
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   %rsi,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12a7 <LU+0x1a7>
jmp    1306 <LU+0x206>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    112f <LU+0x2f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LU>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rcx,-0x20(%rsp)
mov    %rdx,-0x38(%rsp)
mov    %rsi,-0x80(%rsp)
test   %edi,%edi
jle    17a1 <LU+0x6a1>
mov    %edi,%eax
lea    0x0(,%rax,8),%rsi
lea    0x8(,%rax,8),%r8
lea    0x2(%rax),%rcx
mov    %rcx,0x78(%rsp)
lea    (%rax,%rax,1),%rcx
mov    %rcx,0x48(%rsp)
lea    0x1(%rax),%rcx
mov    %rcx,0x70(%rsp)
mov    -0x80(%rsp),%rbx
lea    0x10(%rbx),%rcx
mov    %rcx,0x40(%rsp)
lea    -0x2(%rax),%rdx
mov    %rax,%rcx
neg    %rcx
mov    %rcx,0x90(%rsp)
lea    (%rbx,%rax,8),%rcx
add    $0x20,%rcx
mov    %rcx,0x8(%rsp)
lea    0x20(%rbx),%r10
lea    (%rbx,%rax,8),%rcx
mov    %rcx,(%rsp)
mov    -0x20(%rsp),%rdi
lea    0x70(%rdi),%r11
lea    0x70(%rbx),%r14
lea    -0x4(%rax),%r15
movapd 0xe59(%rip),%xmm0
mov    $0x1,%ebp
mov    %rbp,-0x28(%rsp)
xor    %r13d,%r13d
mov    %rdi,%rcx
mov    %rbx,-0x10(%rsp)
mov    %rdi,-0x18(%rsp)
mov    %rbx,%rbp
mov    %rdx,0x38(%rsp)
mov    %rdx,-0x8(%rsp)
mov    %rsi,0x18(%rsp)
mov    %r8,-0x58(%rsp)
jmp    121b <LU+0x11b>
nopw   0x0(%rax,%rax,1)
addq   $0x1,-0x28(%rsp)
addq   $0xffffffffffffffff,-0x8(%rsp)
add    %r8,0x8(%rsp)
add    %r8,%r10
add    %rsi,%rbp
add    %rsi,(%rsp)
add    %r8,%r11
add    %r8,%r14
add    $0xffffffffffffffff,%r15
add    %r8,-0x18(%rsp)
add    %r8,-0x10(%rsp)
add    %rsi,%rcx
cmp    %rax,%r13
je     17a1 <LU+0x6a1>
mov    %rcx,-0x50(%rsp)
mov    %r15,-0x48(%rsp)
mov    %r14,-0x68(%rsp)
mov    %r11,-0x40(%rsp)
mov    %r10,-0x78(%rsp)
mov    %r13,%r12
mov    %rax,%rcx
sub    %r13,%rcx
mov    %rcx,0x10(%rsp)
imul   %r13,%r8
mov    %r8,-0x30(%rsp)
mov    %r13,%rcx
imul   %rax,%rcx
lea    (%rcx,%rax,1),%rdx
mov    %rdx,0x50(%rsp)
mov    -0x80(%rsp),%rdi
lea    (%rdi,%rdx,8),%rdx
mov    %rdx,0x20(%rsp)
mov    -0x38(%rsp),%rdx
lea    (%rdx,%rcx,8),%rdx
movabs $0x3ff0000000000000,%rdi
mov    %rdi,(%rdx,%r13,8)
lea    0x1(%r13),%rdx
mov    %rdx,-0x70(%rsp)
cmp    %rax,%rdx
jae    1550 <LU+0x450>
mov    -0x8(%rsp),%rdx
and    $0xfffffffffffffffc,%rdx
mov    %rdx,0x68(%rsp)
mov    0x38(%rsp),%rbx
sub    %r12,%rbx
mov    0x48(%rsp),%rdx
add    %rcx,%rdx
mov    %rdx,0x88(%rsp)
mov    0x40(%rsp),%rdx
mov    -0x30(%rsp),%rdi
lea    (%rdx,%rdi,1),%rdx
mov    %rdx,0x80(%rsp)
mov    -0x80(%rsp),%rdx
lea    (%rdx,%rcx,8),%rdx
mov    -0x38(%rsp),%rcx
lea    (%rcx,%r12,8),%r15
mov    -0x28(%rsp),%r10
lea    0x1(%r10),%rcx
mov    %rcx,-0x60(%rsp)
mov    %rbx,0x30(%rsp)
mov    %rbx,%rcx
mov    %rdx,%rbx
and    $0xfffffffffffffffc,%rcx
mov    %rcx,0x60(%rsp)
add    %r10,%rcx
add    $0x1,%rcx
mov    %rcx,0x58(%rsp)
mov    (%rsp),%r8
mov    0x8(%rsp),%r13
xor    %edi,%edi
mov    %rdx,0x28(%rsp)
jmp    1337 <LU+0x237>
add    $0x1,%r10
add    $0x1,%rdi
add    %rsi,%r13
add    %rsi,%r8
cmp    %rax,%r10
je     1550 <LU+0x450>
mov    %r10,%r9
imul   %rax,%r9
mov    -0x80(%rsp),%rcx
lea    (%rcx,%r9,8),%r14
movsd  (%r14,%r12,8),%xmm1
divsd  (%rbx,%r12,8),%xmm1
movsd  %xmm1,(%r15,%r9,8)
mov    -0x28(%rsp),%rcx
mulsd  (%rbx,%rcx,8),%xmm1
movsd  (%r14,%rcx,8),%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,(%r14,%rcx,8)
cmp    %rax,-0x60(%rsp)
je     1320 <LU+0x220>
mov    -0x60(%rsp),%rcx
cmpq   $0x4,0x30(%rsp)
jae    1420 <LU+0x320>
mov    %eax,%edx
sub    %ecx,%edx
mov    %rcx,%r11
test   $0x1,%dl
je     13b6 <LU+0x2b6>
movsd  (%r15,%r9,8),%xmm1
mulsd  (%rbx,%rcx,8),%xmm1
movsd  (%r14,%rcx,8),%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,(%r14,%rcx,8)
lea    0x1(%rcx),%r11
not    %rcx
cmp    0x90(%rsp),%rcx
je     1320 <LU+0x220>
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%r9,8),%xmm1
mulsd  0x0(%rbp,%r11,8),%xmm1
movsd  (%r8,%r11,8),%xmm2
subsd  %xmm1,%xmm2
movsd  0x8(%r8,%r11,8),%xmm1
movsd  %xmm2,(%r8,%r11,8)
movsd  (%r15,%r9,8),%xmm2
mulsd  0x8(%rbp,%r11,8),%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%r8,%r11,8)
add    $0x2,%r11
cmp    %r11,%rax
jne    13d0 <LU+0x2d0>
jmp    1320 <LU+0x220>
nopw   0x0(%rax,%rax,1)
mov    %rdi,%rcx
imul   %rax,%rcx
mov    0x78(%rsp),%rdx
add    %rcx,%rdx
mov    -0x80(%rsp),%rsi
lea    (%rsi,%rdx,8),%rdx
mov    %rdx,0xa0(%rsp)
mov    0x88(%rsp),%rdx
add    %rcx,%rdx
mov    %rdx,0x98(%rsp)
lea    (%rcx,%rax,1),%r11
mov    -0x38(%rsp),%rdx
lea    (%rdx,%r11,8),%rbx
mov    -0x30(%rsp),%r11
add    %r11,%rbx
add    0x70(%rsp),%rcx
lea    (%rdx,%rcx,8),%rcx
mov    0xa0(%rsp),%rdx
cmp    %rcx,%rdx
mov    -0x80(%rsp),%rcx
mov    0x98(%rsp),%rsi
lea    (%rcx,%rsi,8),%rcx
setb   %sil
cmp    %rcx,%rbx
lea    (%rdx,%r11,1),%rdx
setb   %bl
cmp    0x20(%rsp),%rdx
setb   %dl
cmp    %rcx,0x80(%rsp)
setb   %r11b
mov    -0x60(%rsp),%rcx
test   %bl,%sil
mov    0x28(%rsp),%rbx
mov    0x18(%rsp),%rsi
jne    138b <LU+0x28b>
mov    -0x60(%rsp),%rcx
and    %r11b,%dl
jne    138b <LU+0x28b>
movsd  (%r15,%r9,8),%xmm1
unpcklpd %xmm1,%xmm1
xorpd  %xmm0,%xmm1
xor    %ecx,%ecx
mov    -0x78(%rsp),%rdx
mov    0x68(%rsp),%rbx
nop
movupd -0x10(%r13,%rcx,8),%xmm2
movupd 0x0(%r13,%rcx,8),%xmm3
movupd -0x10(%rdx,%rcx,8),%xmm4
movupd (%rdx,%rcx,8),%xmm5
mulpd  %xmm1,%xmm4
addpd  %xmm2,%xmm4
mulpd  %xmm1,%xmm5
addpd  %xmm3,%xmm5
movupd %xmm4,-0x10(%r13,%rcx,8)
movupd %xmm5,0x0(%r13,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rbx
jne    14f0 <LU+0x3f0>
mov    0x58(%rsp),%rcx
mov    0x60(%rsp),%rdx
cmp    %rdx,0x30(%rsp)
mov    0x28(%rsp),%rbx
je     1320 <LU+0x220>
jmp    138b <LU+0x28b>
nop
mov    0x10(%rsp),%r9
cmp    $0x4,%r9
jb     158b <LU+0x48b>
mov    -0x20(%rsp),%rdx
mov    -0x30(%rsp),%rdi
lea    (%rdx,%rdi,1),%rcx
cmp    0x20(%rsp),%rcx
jae    1660 <LU+0x560>
mov    0x50(%rsp),%rcx
lea    (%rdx,%rcx,8),%rcx
add    -0x80(%rsp),%rdi
cmp    %rcx,%rdi
jae    1660 <LU+0x560>
mov    -0x58(%rsp),%r8
mov    -0x78(%rsp),%r10
mov    -0x40(%rsp),%r11
mov    -0x48(%rsp),%r15
mov    -0x50(%rsp),%rcx
mov    -0x70(%rsp),%r13
mov    %eax,%edx
sub    %r12d,%edx
mov    %r12,%rdi
not    %rdi
add    %rax,%rdi
and    $0x3,%rdx
je     1600 <LU+0x500>
mov    -0x68(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  0x0(%rbp,%r12,8),%xmm1
movsd  %xmm1,(%rcx,%r12,8)
add    $0x1,%r12
add    $0xffffffffffffffff,%rdx
jne    15d0 <LU+0x4d0>
cmp    $0x3,%rdi
jae    1610 <LU+0x510>
jmp    11e0 <LU+0xe0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    -0x68(%rsp),%r14
cmp    $0x3,%rdi
jb     11e0 <LU+0xe0>
nop
movsd  0x0(%rbp,%r12,8),%xmm1
movsd  %xmm1,(%rcx,%r12,8)
movsd  0x8(%rbp,%r12,8),%xmm1
movsd  %xmm1,0x8(%rcx,%r12,8)
movsd  0x10(%rbp,%r12,8),%xmm1
movsd  %xmm1,0x10(%rcx,%r12,8)
movsd  0x18(%rbp,%r12,8),%xmm1
movsd  %xmm1,0x18(%rcx,%r12,8)
add    $0x4,%r12
cmp    %r12,%rax
jne    1610 <LU+0x510>
jmp    11e0 <LU+0xe0>
cs nopw 0x0(%rax,%rax,1)
nop
mov    -0x48(%rsp),%r15
mov    %r15,%r8
shr    $0x2,%r8
lea    -0x4(%r9),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
cmp    $0xc,%rcx
mov    -0x40(%rsp),%r11
jae    169c <LU+0x59c>
xor    %edi,%edi
mov    -0x78(%rsp),%r10
mov    -0x68(%rsp),%r14
mov    -0x70(%rsp),%r13
jmp    172c <LU+0x62c>
lea    0x1(%r8),%rcx
and    $0xfffffffffffffffc,%rcx
xor    %edi,%edi
mov    -0x78(%rsp),%r10
mov    -0x68(%rsp),%r14
mov    -0x70(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
nop
movups -0x70(%r14,%rdi,8),%xmm1
movups -0x60(%r14,%rdi,8),%xmm2
movups %xmm1,-0x70(%r11,%rdi,8)
movups %xmm2,-0x60(%r11,%rdi,8)
movups -0x50(%r14,%rdi,8),%xmm1
movups -0x40(%r14,%rdi,8),%xmm2
movups %xmm1,-0x50(%r11,%rdi,8)
movups %xmm2,-0x40(%r11,%rdi,8)
movups -0x30(%r14,%rdi,8),%xmm1
movups -0x20(%r14,%rdi,8),%xmm2
movups %xmm1,-0x30(%r11,%rdi,8)
movups %xmm2,-0x20(%r11,%rdi,8)
movupd -0x10(%r14,%rdi,8),%xmm1
movupd (%r14,%rdi,8),%xmm2
movupd %xmm1,-0x10(%r11,%rdi,8)
movupd %xmm2,(%r11,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rcx
jne    16c0 <LU+0x5c0>
and    $0xfffffffffffffffc,%r9
test   $0x3,%dl
je     177f <LU+0x67f>
add    $0x1,%r8b
movzbl %r8b,%ecx
and    $0x3,%ecx
shl    $0x5,%rcx
mov    -0x18(%rsp),%rdx
lea    (%rdx,%rdi,8),%rbx
mov    -0x10(%rsp),%rdx
lea    (%rdx,%rdi,8),%rdi
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movupd (%rdi,%rdx,1),%xmm1
movupd 0x10(%rdi,%rdx,1),%xmm2
movupd %xmm1,(%rbx,%rdx,1)
movupd %xmm2,0x10(%rbx,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rcx
jne    1760 <LU+0x660>
cmp    %r9,0x10(%rsp)
mov    0x18(%rsp),%rsi
mov    -0x58(%rsp),%r8
mov    -0x50(%rsp),%rcx
je     11e0 <LU+0xe0>
add    %r9,%r12
jmp    15a9 <LU+0x4a9>
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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