#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_8(double *A) {
  const int n = 4 + 0 * 40 + 8 * 4;
  const int lda = 4 + 0 * 40 + 8 * 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_8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x24,-0x14(%rbp)
movl   $0x24,-0x18(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x24,-0x30(%rbp)
jge    133e <dpotrf_codegen_8+0x22e>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x24,-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_8+0xb9>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x24,-0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x24,-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_8+0x4c>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jb     11fc <dpotrf_codegen_8+0xec>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x24,-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_8+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   $0x24,-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_8+0x1c9>
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
imul   $0x24,-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   $0x24,-0x2c(%rbp)
jge    12c6 <dpotrf_codegen_8+0x1b6>
movsd  -0x28(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   $0x24,-0x34(%rbp),%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   $0x24,-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_8+0x14b>
jmp    12cb <dpotrf_codegen_8+0x1bb>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    122c <dpotrf_codegen_8+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   $0x24,-0x2c(%rbp)
jge    132b <dpotrf_codegen_8+0x21b>
movsd  -0x20(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   $0x24,-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_8+0x1e4>
jmp    1330 <dpotrf_codegen_8+0x220>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1131 <dpotrf_codegen_8+0x21>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dpotrf_codegen_8>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rdi,%r12
lea    0x8(%rdi),%rax
mov    %rax,0x30(%rsp)
lea    0x120(%rdi),%rax
mov    %rax,0x28(%rsp)
lea    0x18(%rdi),%rax
mov    %rax,0x20(%rsp)
lea    0x38(%rdi),%r15
mov    $0x1,%r14d
mov    $0x1f,%r13d
xor    %ebp,%ebp
xorpd  %xmm6,%xmm6
movapd 0xea3(%rip),%xmm7
xor    %ebx,%ebx
jmp    1192 <dpotrf_codegen_8+0x82>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r14
add    $0x1,%rbp
add    $0xffffffffffffffff,%r13
add    $0x8,%r15
mov    0x10(%rsp),%rax
mov    %rax,%rbx
cmp    $0x24,%rax
je     164d <dpotrf_codegen_8+0x53d>
lea    0x0(,%rbx,4),%rax
lea    (%rax,%rax,8),%rax
mov    %rax,0x8(%rsp)
lea    (%rbx,%rbx,8),%rax
lea    (%rbx,%rax,4),%rsi
movsd  (%r12,%rsi,8),%xmm0
test   %rbx,%rbx
je     11c0 <dpotrf_codegen_8+0xb0>
cmp    $0x1,%rbx
jne    11e0 <dpotrf_codegen_8+0xd0>
xor    %eax,%eax
jmp    121c <dpotrf_codegen_8+0x10c>
ucomisd %xmm0,%xmm6
jae    1651 <dpotrf_codegen_8+0x541>
ucomisd %xmm6,%xmm0
jb     1501 <dpotrf_codegen_8+0x3f1>
sqrtsd %xmm0,%xmm0
jmp    1518 <dpotrf_codegen_8+0x408>
nopl   (%rax)
mov    %rbx,%rcx
and    $0xfffffffffffffffe,%rcx
lea    (%r12,%rbx,8),%rdx
xor    %eax,%eax
nopl   (%rax)
movsd  (%rdx),%xmm1
movsd  0x120(%rdx),%xmm2
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm2
subsd  %xmm2,%xmm0
add    $0x2,%rax
add    $0x240,%rdx
cmp    %rax,%rcx
jne    11f0 <dpotrf_codegen_8+0xe0>
test   $0x1,%bl
je     1237 <dpotrf_codegen_8+0x127>
lea    (%rax,%rax,8),%rax
lea    (%rbx,%rax,4),%rax
movsd  (%r12,%rax,8),%xmm1
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
ucomisd %xmm0,%xmm6
jae    1651 <dpotrf_codegen_8+0x541>
ucomisd %xmm6,%xmm0
mov    %rbp,0x18(%rsp)
jb     1260 <dpotrf_codegen_8+0x150>
sqrtsd %xmm0,%xmm0
jmp    1277 <dpotrf_codegen_8+0x167>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rsi,%rbp
call   1030 <sqrt@plt>
mov    %rbp,%rsi
movapd 0xd8d(%rip),%xmm7
xorpd  %xmm6,%xmm6
movsd  %xmm0,(%r12,%rsi,8)
test   %rbx,%rbx
je     14f0 <dpotrf_codegen_8+0x3e0>
mov    %r13,0x38(%rsp)
mov    %r14,0x40(%rsp)
mov    %r15,0x48(%rsp)
imul   $0x128,%rbx,%rcx
mov    0x30(%rsp),%rax
lea    (%rax,%rcx,1),%r9
mov    0x28(%rsp),%rax
mov    0x8(%rsp),%rdx
lea    (%rax,%rdx,8),%rax
mov    %rax,0x70(%rsp)
lea    0x1(%rbx),%rax
mov    %rax,0x10(%rsp)
mov    $0x23,%edi
sub    %rbx,%rdi
mov    $0x21,%esi
sub    %rbx,%rsi
mov    %rsi,0x68(%rsp)
shr    %rsi
add    $0x1,%rsi
mov    %rdi,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x60(%rsp)
add    %rbx,%rax
mov    %rax,0x58(%rsp)
mov    %rsi,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x50(%rsp)
mov    0x20(%rsp),%rax
add    %rax,%rcx
lea    (%rax,%rbx,8),%r10
lea    (%r12,%rdx,8),%r11
mov    %r12,%r14
xor    %r8d,%r8d
jmp    133b <dpotrf_codegen_8+0x22b>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r8
add    $0x120,%r10
add    $0x120,%r14
cmp    %rbx,%r8
je     14d0 <dpotrf_codegen_8+0x3c0>
cmp    $0x22,%rbx
ja     1320 <dpotrf_codegen_8+0x210>
lea    0x0(,%r8,4),%rax
lea    (%rax,%rax,8),%r13
lea    (%rbx,%r13,1),%rax
movsd  (%r12,%rax,8),%xmm1
xorpd  %xmm7,%xmm1
mov    %rbx,%rbp
cmp    $0x2,%rdi
jb     1440 <dpotrf_codegen_8+0x330>
lea    (%r12,%r13,8),%rax
add    $0x120,%rax
cmp    %rax,%r9
jae    1391 <dpotrf_codegen_8+0x281>
mov    0x10(%rsp),%rax
add    %r13,%rax
lea    (%r12,%rax,8),%rax
mov    %rbx,%rbp
cmp    0x70(%rsp),%rax
jb     1440 <dpotrf_codegen_8+0x330>
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
cmpq   $0x2,0x68(%rsp)
jae    13a5 <dpotrf_codegen_8+0x295>
xor    %ebp,%ebp
jmp    13ed <dpotrf_codegen_8+0x2dd>
mov    0x50(%rsp),%rax
xor    %ebp,%ebp
nopl   0x0(%rax)
movupd -0x10(%r10,%rbp,8),%xmm3
mulpd  %xmm2,%xmm3
movupd -0x10(%rcx,%rbp,8),%xmm4
addpd  %xmm3,%xmm4
movupd (%rcx,%rbp,8),%xmm3
movupd %xmm4,-0x10(%rcx,%rbp,8)
movupd (%r10,%rbp,8),%xmm4
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
movupd %xmm4,(%rcx,%rbp,8)
add    $0x4,%rbp
add    $0xfffffffffffffffe,%rax
jne    13b0 <dpotrf_codegen_8+0x2a0>
test   $0x1,%sil
je     1425 <dpotrf_codegen_8+0x315>
add    %rbx,%rbp
lea    0x1(,%rbp,1),%rax
add    %r13,%rax
movupd (%r12,%rax,8),%xmm3
mov    0x8(%rsp),%rax
lea    0x1(%rax,%rbp,1),%rax
movupd (%r12,%rax,8),%xmm4
mulpd  %xmm3,%xmm2
addpd  %xmm4,%xmm2
movupd %xmm2,(%r12,%rax,8)
mov    0x58(%rsp),%rbp
cmp    0x60(%rsp),%rdi
je     1320 <dpotrf_codegen_8+0x210>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x1,%eax
sub    %ebp,%eax
mov    %rbp,%r15
test   $0x1,%al
je     147d <dpotrf_codegen_8+0x36d>
lea    0x1(%rbp),%r15
lea    0x1(,%r13,1),%rax
add    %rbp,%rax
mov    0x8(%rsp),%rdx
lea    0x1(%rbp,%rdx,1),%rdx
movsd  (%r12,%rax,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%r12,%rdx,8),%xmm2
movsd  %xmm2,(%r12,%rdx,8)
cmp    $0x22,%rbp
je     1320 <dpotrf_codegen_8+0x210>
add    $0x2,%r15
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%r14,%r15,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  -0x8(%r11,%r15,8),%xmm2
movsd  %xmm2,-0x8(%r11,%r15,8)
movsd  (%r14,%r15,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%r11,%r15,8),%xmm2
movsd  %xmm2,(%r11,%r15,8)
add    $0x2,%r15
cmp    $0x25,%r15
jne    1490 <dpotrf_codegen_8+0x380>
jmp    1320 <dpotrf_codegen_8+0x210>
xchg   %ax,%ax
cmp    $0x22,%rbx
mov    0x48(%rsp),%r15
mov    0x40(%rsp),%r14
mov    0x38(%rsp),%r13
mov    0x18(%rsp),%rbp
ja     1170 <dpotrf_codegen_8+0x60>
jmp    1528 <dpotrf_codegen_8+0x418>
mov    $0x1,%eax
mov    %rax,0x10(%rsp)
mov    0x18(%rsp),%rbp
jmp    1528 <dpotrf_codegen_8+0x418>
mov    %rsi,%rbx
call   1030 <sqrt@plt>
mov    %rbx,%rsi
movapd 0xaec(%rip),%xmm7
xorpd  %xmm6,%xmm6
movsd  %xmm0,(%r12,%rsi,8)
mov    $0x1,%eax
mov    %rax,0x10(%rsp)
mov    $0x23,%eax
sub    %rbp,%rax
movsd  0xad8(%rip),%xmm1
divsd  %xmm0,%xmm1
mov    %r14,%rsi
cmp    $0x4,%rax
jb     161a <dpotrf_codegen_8+0x50a>
mov    $0x1f,%edx
sub    %rbp,%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
cmp    $0x4,%rdx
jae    156e <dpotrf_codegen_8+0x45e>
xor    %edx,%edx
jmp    15d8 <dpotrf_codegen_8+0x4c8>
mov    %r13,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
and    $0xfffffffffffffffe,%rsi
mov    0x8(%rsp),%rdx
lea    (%r15,%rdx,8),%rdi
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
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    1590 <dpotrf_codegen_8+0x480>
mov    %rax,%rsi
and    $0xfffffffffffffffc,%rsi
test   $0x1,%cl
je     160e <dpotrf_codegen_8+0x4fe>
add    %r14,%rdx
add    0x8(%rsp),%rdx
movupd (%r12,%rdx,8),%xmm2
movupd 0x10(%r12,%rdx,8),%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,(%r12,%rdx,8)
movupd %xmm3,0x10(%r12,%rdx,8)
cmp    %rsi,%rax
je     1170 <dpotrf_codegen_8+0x60>
add    %r14,%rsi
mov    0x8(%rsp),%rax
lea    (%r12,%rax,8),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rax,%rsi,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rsi,8)
add    $0x1,%rsi
cmp    $0x24,%rsi
jne    1630 <dpotrf_codegen_8+0x520>
jmp    1170 <dpotrf_codegen_8+0x60>
xor    %ebx,%ebx
jmp    1657 <dpotrf_codegen_8+0x547>
movsd  %xmm0,(%r12,%rsi,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_8(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 36, i32* %4
store i32 36, i32* %5
store i32 0, i32* %9
br label %11
11: ; preds = %142, %1
%12 = load i32, i32* %9
%13 = icmp slt i32 %12, 36
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 36, %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 36, %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 36, %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 36, %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 36, %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 36, %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, 36
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 36, %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 36, %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, 36
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 36, %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_8(double* nocapture %0) {
%2 = getelementptr double, double* %0, i64 1
%3 = getelementptr double, double* %0, i64 36
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, 36
%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 31, %10
%14 = lshr i64 %13, 2
%15 = add nuw nsw i64 %14, 1
%16 = sub i64 35, %10
%17 = mul i64 %12, 36
%18 = mul nuw nsw i64 %12, 37
%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, 36
%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, 36
%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, 36
%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, 35
%73 = mul i64 %12, 37
%74 = getelementptr double, double* %2, i64 %73
%75 = getelementptr double, double* %3, i64 %17
%76 = add i64 %12, 1
%77 = sub i64 35, %12
%78 = sub i64 33, %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, 36
%92 = add i64 %76, %91
%93 = getelementptr double, double* %0, i64 %92
%94 = add i64 %91, 36
%95 = getelementptr double, double* %0, i64 %94
%96 = mul nuw nsw i64 %90, 36
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, 34
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, 35
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, 35
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, 36
br i1 %272, label %4, label %265
273: ; preds = %4, %66
%274 = phi i32 [ %68, %66 ], [ 0, %4 ]
ret i32 %274
}