#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 sqrt(double);
int dpotrf_codegen_6(double *A) {
  const int n = 4 + 0 * 40 + 6 * 4;
  const int lda = 4 + 0 * 40 + 6 * 4;
  double a_jj, temp;
  int ii, jj, kk;
  for (jj = 0; jj < n; jj++) {
    a_jj = A[jj + lda * jj];
    for (kk = 0; kk < jj; kk++) {
      a_jj -= A[jj + lda * kk] * A[jj + lda * kk];
    }
    if (a_jj <= 0) {
      A[jj + lda * jj] = a_jj;
      return jj;
    }
    a_jj = sqrt(a_jj);
    A[jj + lda * jj] = a_jj;
    for (kk = 0; kk < jj; kk++) {
      temp = A[jj + lda * kk];
      for (ii = jj + 1; ii < n; ii++) {
        A[ii + lda * jj] -= temp * A[ii + lda * kk];
      }
    }
    a_jj = 1.0 / a_jj;
    for (ii = jj + 1; ii < n; ii++) {
      A[ii + lda * jj] *= a_jj;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<dpotrf_codegen_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x1c,-0x14(%rbp)
movl   $0x1c,-0x18(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x1c,-0x30(%rbp)
jge    133e <dpotrf_codegen_6+0x22e>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x1c,-0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    11c9 <dpotrf_codegen_6+0xb9>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x1c,-0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x1c,-0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x20(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    115c <dpotrf_codegen_6+0x4c>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     11fc <dpotrf_codegen_6+0xec>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x1c,-0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1345 <dpotrf_codegen_6+0x235>
movsd  -0x20(%rbp),%xmm0
call   1030 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x1c,-0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x30(%rbp),%eax
jge    12d9 <dpotrf_codegen_6+0x1c9>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x1c,-0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x1c,-0x2c(%rbp)
jge    12c6 <dpotrf_codegen_6+0x1b6>
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   $0x1c,-0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   $0x1c,-0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%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    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    125b <dpotrf_codegen_6+0x14b>
jmp    12cb <dpotrf_codegen_6+0x1bb>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    122c <dpotrf_codegen_6+0x11c>
movsd  0xd1f(%rip),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x1c,-0x2c(%rbp)
jge    132b <dpotrf_codegen_6+0x21b>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   $0x1c,-0x30(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12f4 <dpotrf_codegen_6+0x1e4>
jmp    1330 <dpotrf_codegen_6+0x220>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1131 <dpotrf_codegen_6+0x21>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpotrf_codegen_6>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rdi,%r13
lea    0x8(%rdi),%rax
mov    %rax,0x38(%rsp)
lea    0xe0(%rdi),%rax
mov    %rax,0x30(%rsp)
lea    0x18(%rdi),%rax
mov    %rax,0x28(%rsp)
lea    0x38(%rdi),%rbp
mov    $0x1,%r15d
mov    $0x17,%r12d
xor    %r8d,%r8d
xorpd  %xmm6,%xmm6
movapd 0xea2(%rip),%xmm7
xor    %ebx,%ebx
jmp    1192 <dpotrf_codegen_6+0x82>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%r15
add    $0x1,%r8
add    $0xffffffffffffffff,%r12
add    $0x8,%rbp
mov    0x10(%rsp),%rax
mov    %rax,%rbx
cmp    $0x1c,%rax
je     167d <dpotrf_codegen_6+0x56d>
lea    (%rbx,%rbx,8),%rax
lea    (%rax,%rax,2),%rax
add    %rbx,%rax
mov    %rax,0x8(%rsp)
lea    (%rbx,%rax,1),%r14
movsd  0x0(%r13,%r14,8),%xmm0
test   %rbx,%rbx
je     11c0 <dpotrf_codegen_6+0xb0>
cmp    $0x1,%rbx
jne    11e0 <dpotrf_codegen_6+0xd0>
xor    %eax,%eax
jmp    122c <dpotrf_codegen_6+0x11c>
nopl   0x0(%rax)
ucomisd %xmm0,%xmm6
jae    1681 <dpotrf_codegen_6+0x571>
ucomisd %xmm6,%xmm0
jb     1526 <dpotrf_codegen_6+0x416>
sqrtsd %xmm0,%xmm0
jmp    153d <dpotrf_codegen_6+0x42d>
nopl   (%rax)
mov    %rbx,%rcx
and    $0xfffffffffffffffe,%rcx
lea    0x0(,%rbx,8),%rdx
add    %r13,%rdx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rdx),%xmm1
movsd  0xe0(%rdx),%xmm2
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm2
subsd  %xmm2,%xmm0
add    $0x2,%rax
add    $0x1c0,%rdx
cmp    %rax,%rcx
jne    1200 <dpotrf_codegen_6+0xf0>
test   $0x1,%bl
je     124e <dpotrf_codegen_6+0x13e>
lea    (%rax,%rax,8),%rcx
lea    (%rcx,%rcx,2),%rcx
add    %rax,%rcx
add    %rbx,%rcx
movsd  0x0(%r13,%rcx,8),%xmm1
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
ucomisd %xmm0,%xmm6
jae    1681 <dpotrf_codegen_6+0x571>
ucomisd %xmm6,%xmm0
mov    %r12,0x20(%rsp)
mov    %r8,0x18(%rsp)
jb     1270 <dpotrf_codegen_6+0x160>
sqrtsd %xmm0,%xmm0
jmp    1281 <dpotrf_codegen_6+0x171>
xchg   %ax,%ax
call   1030 <sqrt@plt>
movapd 0xd83(%rip),%xmm7
xorpd  %xmm6,%xmm6
movsd  %xmm0,0x0(%r13,%r14,8)
test   %rbx,%rbx
je     1510 <dpotrf_codegen_6+0x400>
mov    %r15,0x48(%rsp)
mov    %rbp,0x40(%rsp)
imul   $0xe8,%rbx,%rcx
mov    0x38(%rsp),%rax
add    %rcx,%rax
mov    %rax,0x70(%rsp)
mov    0x30(%rsp),%rax
mov    0x8(%rsp),%rdx
lea    (%rax,%rdx,8),%rax
mov    %rax,0x68(%rsp)
lea    0x1(%rbx),%rax
mov    %rax,0x10(%rsp)
mov    $0x1b,%edi
sub    %rbx,%rdi
mov    $0x19,%r10d
sub    %rbx,%r10
mov    %r10,0x60(%rsp)
shr    %r10
add    $0x1,%r10
mov    %rdi,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,%rbp
add    %rbx,%rax
mov    %rax,0x58(%rsp)
mov    %r10,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x50(%rsp)
mov    0x28(%rsp),%rax
add    %rax,%rcx
lea    (%rax,%rbx,8),%r11
lea    0x0(,%rdx,8),%r12
add    %r13,%r12
mov    %r13,%r14
xor    %r8d,%r8d
jmp    134b <dpotrf_codegen_6+0x23b>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r8
add    $0xe0,%r11
add    $0xe0,%r14
cmp    %rbx,%r8
je     14f0 <dpotrf_codegen_6+0x3e0>
cmp    $0x1a,%rbx
ja     1330 <dpotrf_codegen_6+0x220>
lea    (%r8,%r8,8),%rax
lea    (%rax,%rax,2),%r15
add    %r8,%r15
lea    (%r15,%rbx,1),%rax
movsd  0x0(%r13,%rax,8),%xmm1
xorpd  %xmm7,%xmm1
mov    %rbx,%rax
cmp    $0x2,%rdi
jb     1460 <dpotrf_codegen_6+0x350>
lea    0xe0(,%r15,8),%rax
add    %r13,%rax
cmp    %rax,0x70(%rsp)
jae    13ab <dpotrf_codegen_6+0x29b>
mov    0x10(%rsp),%rax
add    %r15,%rax
lea    0x0(,%rax,8),%rdx
add    %r13,%rdx
mov    %rbx,%rax
cmp    0x68(%rsp),%rdx
jb     1460 <dpotrf_codegen_6+0x350>
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
cmpq   $0x2,0x60(%rsp)
jae    13bf <dpotrf_codegen_6+0x2af>
xor    %eax,%eax
jmp    140d <dpotrf_codegen_6+0x2fd>
mov    0x50(%rsp),%rdx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movupd -0x10(%r11,%rax,8),%xmm3
mulpd  %xmm2,%xmm3
movupd -0x10(%rcx,%rax,8),%xmm4
addpd  %xmm3,%xmm4
movupd (%rcx,%rax,8),%xmm3
movupd %xmm4,-0x10(%rcx,%rax,8)
movupd (%r11,%rax,8),%xmm4
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
movupd %xmm4,(%rcx,%rax,8)
add    $0x4,%rax
add    $0xfffffffffffffffe,%rdx
jne    13d0 <dpotrf_codegen_6+0x2c0>
test   $0x1,%r10b
je     1445 <dpotrf_codegen_6+0x335>
add    %rbx,%rax
lea    (%r15,%rax,1),%rdx
add    $0x1,%rdx
movupd 0x0(%r13,%rdx,8),%xmm3
mov    0x8(%rsp),%rdx
lea    0x1(%rdx,%rax,1),%rax
movupd 0x0(%r13,%rax,8),%xmm4
mulpd  %xmm3,%xmm2
addpd  %xmm4,%xmm2
movupd %xmm2,0x0(%r13,%rax,8)
mov    0x58(%rsp),%rax
cmp    %rbp,%rdi
je     1330 <dpotrf_codegen_6+0x220>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x1,%edx
sub    %eax,%edx
mov    %rax,%r9
test   $0x1,%dl
je     149e <dpotrf_codegen_6+0x38e>
lea    0x1(%rax),%r9
lea    (%rax,%r15,1),%rdx
add    $0x1,%rdx
mov    0x8(%rsp),%rsi
lea    0x1(%rax,%rsi,1),%rsi
movsd  0x0(%r13,%rdx,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x0(%r13,%rsi,8),%xmm2
movsd  %xmm2,0x0(%r13,%rsi,8)
cmp    $0x1a,%rax
je     1330 <dpotrf_codegen_6+0x220>
add    $0x2,%r9
nopl   0x0(%rax)
movsd  -0x8(%r14,%r9,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  -0x8(%r12,%r9,8),%xmm2
movsd  %xmm2,-0x8(%r12,%r9,8)
movsd  (%r14,%r9,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%r12,%r9,8),%xmm2
movsd  %xmm2,(%r12,%r9,8)
add    $0x2,%r9
cmp    $0x1d,%r9
jne    14b0 <dpotrf_codegen_6+0x3a0>
jmp    1330 <dpotrf_codegen_6+0x220>
xchg   %ax,%ax
cmp    $0x1a,%rbx
mov    0x40(%rsp),%rbp
mov    0x48(%rsp),%r15
mov    0x20(%rsp),%r12
mov    0x18(%rsp),%r8
ja     1170 <dpotrf_codegen_6+0x60>
jmp    154e <dpotrf_codegen_6+0x43e>
mov    $0x1,%eax
mov    %rax,0x10(%rsp)
mov    0x20(%rsp),%r12
mov    0x18(%rsp),%r8
jmp    154e <dpotrf_codegen_6+0x43e>
mov    %r8,%rbx
call   1030 <sqrt@plt>
movapd 0xaca(%rip),%xmm7
xorpd  %xmm6,%xmm6
mov    %rbx,%r8
movsd  %xmm0,0x0(%r13,%r14,8)
mov    $0x1,%eax
mov    %rax,0x10(%rsp)
mov    $0x1b,%eax
sub    %r8,%rax
movsd  0xab2(%rip),%xmm1
divsd  %xmm0,%xmm1
mov    %r15,%rsi
cmp    $0x4,%rax
jb     164c <dpotrf_codegen_6+0x53c>
mov    $0x17,%edx
sub    %r8,%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
cmp    $0x4,%rdx
jae    1594 <dpotrf_codegen_6+0x484>
xor    %edx,%edx
jmp    1608 <dpotrf_codegen_6+0x4f8>
mov    %r12,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
and    $0xfffffffffffffffe,%rsi
mov    0x8(%rsp),%rdx
lea    0x0(,%rdx,8),%rdi
add    %rbp,%rdi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nop
movupd -0x30(%rdi,%rdx,8),%xmm2
movupd -0x20(%rdi,%rdx,8),%xmm3
movupd -0x10(%rdi,%rdx,8),%xmm4
movupd (%rdi,%rdx,8),%xmm5
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,-0x30(%rdi,%rdx,8)
movupd %xmm3,-0x20(%rdi,%rdx,8)
mulpd  %xmm0,%xmm4
mulpd  %xmm0,%xmm5
movupd %xmm4,-0x10(%rdi,%rdx,8)
movupd %xmm5,(%rdi,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    15c0 <dpotrf_codegen_6+0x4b0>
mov    %rax,%rsi
and    $0xfffffffffffffffc,%rsi
test   $0x1,%cl
je     1640 <dpotrf_codegen_6+0x530>
add    %r15,%rdx
add    0x8(%rsp),%rdx
movupd 0x0(%r13,%rdx,8),%xmm2
movupd 0x10(%r13,%rdx,8),%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,0x0(%r13,%rdx,8)
movupd %xmm3,0x10(%r13,%rdx,8)
cmp    %rsi,%rax
je     1170 <dpotrf_codegen_6+0x60>
add    %r15,%rsi
mov    0x8(%rsp),%rax
lea    0x0(,%rax,8),%rax
add    %r13,%rax
nopl   0x0(%rax)
movsd  (%rax,%rsi,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rsi,8)
add    $0x1,%rsi
cmp    $0x1c,%rsi
jne    1660 <dpotrf_codegen_6+0x550>
jmp    1170 <dpotrf_codegen_6+0x60>
xor    %ebx,%ebx
jmp    1688 <dpotrf_codegen_6+0x578>
movsd  %xmm0,0x0(%r13,%r14,8)
mov    %ebx,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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