#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ pow(double, int);
double sqrt(double);
void chol3(double dest[], double src[][3]) {
  int i = 0, j = 0, k = 0, n = 3;
  double tmparr[3][3] = {0};
  double sum1 = 0.0;
  double sum2 = 0.0;
  double sum3 = 0.0;
  tmparr[0][0] = sqrt(src[0][0]);
  for (j = 1; j <= n - 1; j++)
    tmparr[j][0] = src[j][0] / tmparr[0][0];
  for (i = 1; i <= (n - 2); i++) {
    for (k = 0; k <= (i - 1); k++)
      sum1 += pow(tmparr[i][k], 2);
    tmparr[i][i] = sqrt(src[i][i] - sum1);
    for (j = (i + 1); j <= (n - 1); j++) {
      for (k = 0; k <= (i - 1); k++)
        sum2 += tmparr[j][k] * tmparr[i][k];
      tmparr[j][i] = (src[j][i] - sum2) / tmparr[i][i];
    }
  }
  for (k = 0; k <= (n - 2); k++)
    sum3 += pow(tmparr[n - 1][k], 2);
  tmparr[n - 1][n - 1] = sqrt(src[n - 1][n - 1] - sum3);
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      dest[i * 3 + j] = tmparr[i][j];
    }
  }
}


x86 assembly (clang, -O0):
<chol3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x3,-0x20(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x48,%edx
call   1030 <memset@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x70(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     11ed <chol3+0xbd>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  (%rax),%xmm0
divsd  -0x70(%rbp),%xmm0
movslq -0x18(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a3 <chol3+0x73>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     1386 <chol3+0x256>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     125c <chol3+0x12c>
movslq -0x14(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    120c <chol3+0xdc>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x78(%rbp),%xmm0
call   1050 <sqrt@plt>
movslq -0x14(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1373 <chol3+0x243>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1318 <chol3+0x1e8>
movslq -0x18(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movslq -0x14(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12b7 <chol3+0x187>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x80(%rbp),%xmm0
movslq -0x14(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movslq -0x18(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    129f <chol3+0x16f>
jmp    1378 <chol3+0x248>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11f4 <chol3+0xc4>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x2,%ecx
cmp    %ecx,%eax
jg     13e8 <chol3+0x2b8>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    138d <chol3+0x25d>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x88(%rbp),%xmm0
ff
call   1050 <sqrt@plt>
mov    -0x20(%rbp),%eax
sub    $0x1,%eax
movslq %eax,%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    14a7 <chol3+0x377>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    1494 <chol3+0x364>
movslq -0x14(%rbp),%rcx
lea    -0x70(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
imul   $0x3,-0x14(%rbp),%ecx
add    -0x18(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1451 <chol3+0x321>
jmp    1499 <chol3+0x369>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1440 <chol3+0x310>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chol3>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rsi),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1141 <chol3+0x21>
sqrtsd %xmm0,%xmm0
jmp    1146 <chol3+0x26>
call   1040 <sqrt@plt>
movsd  0x18(%r14),%xmm2
movsd  0x30(%r14),%xmm1
divsd  %xmm0,%xmm2
movsd  %xmm0,0x30(%rsp)
divsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movapd %xmm2,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
movsd  0x20(%r14),%xmm0
subsd  %xmm1,%xmm0
ucomisd 0xe6c(%rip),%xmm0
jb     119f <chol3+0x7f>
xorps  %xmm2,%xmm2
sqrtsd %xmm0,%xmm2
jmp    11a8 <chol3+0x88>
call   1040 <sqrt@plt>
movapd %xmm0,%xmm2
movsd  0x38(%r14),%xmm4
movsd  0x18(%rsp),%xmm0
movapd %xmm0,%xmm1
mulsd  0x10(%rsp),%xmm1
xorpd  %xmm3,%xmm3
addsd  %xmm3,%xmm1
subsd  %xmm1,%xmm4
movsd  %xmm2,0x28(%rsp)
divsd  %xmm2,%xmm4
movsd  %xmm4,0x8(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
addsd  0x20(%rsp),%xmm1
movsd  0x40(%r14),%xmm0
subsd  %xmm1,%xmm0
ucomisd 0xdde(%rip),%xmm0
jb     122a <chol3+0x10a>
sqrtsd %xmm0,%xmm0
jmp    122f <chol3+0x10f>
call   1040 <sqrt@plt>
movsd  0x30(%rsp),%xmm1
movsd  %xmm1,(%rbx)
xorps  %xmm1,%xmm1
movups %xmm1,0x8(%rbx)
movsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x18(%rbx)
movsd  0x28(%rsp),%xmm1
movsd  %xmm1,0x20(%rbx)
movq   $0x0,0x28(%rbx)
movsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x30(%rbx)
movsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x38(%rbx)
movsd  %xmm0,0x40(%rbx)
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @chol3(double* nocapture writeonly %0, [3 x double]* nocapture %1) {
%3 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
%4 = load double, double* %3
%5 = tail call double @sqrt(double %4)
%6 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 0
%7 = load double, double* %6
%8 = fdiv double %7, %5
%9 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 0
%10 = load double, double* %9
%11 = fdiv double %10, %5
%12 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 1, i64 1
%13 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 1
%14 = tail call i64 @pow(double %8, i32 2)
%15 = sitofp i64 %14 to double
%16 = load double, double* %12
%17 = fsub double %16, %15
%18 = tail call double @sqrt(double %17)
%19 = load double, double* %13
%20 = tail call double @llvm.fmuladd.f64(double %11, double %8, double 0.000000e+00)
%21 = fsub double %19, %20
%22 = fdiv double %21, %18
%23 = tail call i64 @pow(double %11, i32 2)
%24 = sitofp i64 %23 to double
%25 = tail call i64 @pow(double %22, i32 2)
%26 = sitofp i64 %25 to double
%27 = fadd double %24, %26
%28 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 2, i64 2
%29 = load double, double* %28
%30 = fsub double %29, %27
%31 = tail call double @sqrt(double %30)
store double %5, double* %0
%32 = getelementptr inbounds double, double* %0, i64 1
%33 = bitcast double* %32 to i8*
%34 = getelementptr inbounds double, double* %0, i64 3
store double %8, double* %34
%35 = getelementptr inbounds double, double* %0, i64 4
store double %18, double* %35
%36 = getelementptr inbounds double, double* %0, i64 5
store double 0.000000e+00, double* %36
%37 = getelementptr inbounds double, double* %0, i64 6
store double %11, double* %37
%38 = getelementptr inbounds double, double* %0, i64 7
store double %22, double* %38
%39 = getelementptr inbounds double, double* %0, i64 8
store double %31, double* %39
ret void
}