#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 pow(double, int);
double sqrt(double);
void ComputeProperties(int const nVar, int const nScen, double **const X,
                       double const *const P, double **const Moms,
                       double **const Corrs) {
  int i, j, s;
  for (i = 0; i < 4; i++)
    for (j = 0; j < nVar; j++) {
      Moms[i][j] = 0;
      for (s = 0; s < nScen; s++) {
        if (i == 0)
          Moms[i][j] += P[s] * X[j][s];
        else
          Moms[i][j] += P[s] * pow(X[j][s] - Moms[0][j], i + 1);
      }
      if (i == 1)
        Moms[i][j] = sqrt(Moms[i][j]);
      if (i >= 2)
        Moms[i][j] /= pow(Moms[1][j], i + 1);
    }
  for (i = 0; i < nVar; i++) {
    for (j = 0; j < i; j++) {
      Corrs[i][j] = 0;
      for (s = 0; s < nScen; s++) {
        Corrs[i][j] += P[s] * (X[i][s] - Moms[0][i]) * (X[j][s] - Moms[0][j]);
      }
      Corrs[i][j] /= (Moms[1][i] * Moms[1][j]);
      Corrs[j][i] = Corrs[i][j];
    }
    Corrs[i][i] = 1.0;
  }
}


x86 assembly (clang, -O0):
<ComputeProperties>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x4,-0x2c(%rbp)
jge    1305 <ComputeProperties+0x1e5>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12f2 <ComputeProperties+0x1d2>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    125f <ComputeProperties+0x13f>
cmpl   $0x0,-0x2c(%rbp)
jne    11e0 <ComputeProperties+0xc0>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    124c <ComputeProperties+0x12c>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
mov    -0x2c(%rbp),%edi
add    $0x1,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1251 <ComputeProperties+0x131>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1181 <ComputeProperties+0x61>
cmpl   $0x1,-0x2c(%rbp)
jne    1298 <ComputeProperties+0x178>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1040 <sqrt@plt>
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpl   $0x2,-0x2c(%rbp)
jl     12df <ComputeProperties+0x1bf>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x2c(%rbp),%edi
add    $0x1,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    12e4 <ComputeProperties+0x1c4>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1156 <ComputeProperties+0x36>
jmp    12f7 <ComputeProperties+0x1d7>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1145 <ComputeProperties+0x25>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1484 <ComputeProperties+0x364>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    1459 <ComputeProperties+0x339>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13e1 <ComputeProperties+0x2c1>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x2c(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x30(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm2
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    134a <ComputeProperties+0x22a>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm1
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    131f <ComputeProperties+0x1ff>
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  0xb8f(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    130c <ComputeProperties+0x1ec>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComputeProperties>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,0x18(%rsp)
mov    %r8,%r15
mov    %rcx,%rbx
mov    %rdx,0x28(%rsp)
mov    %edi,0x8(%rsp)
mov    %edi,%eax
mov    %rax,0x20(%rsp)
mov    %esi,0xc(%rsp)
mov    %esi,%eax
mov    %rax,0x10(%rsp)
xor    %r13d,%r13d
jmp    116d <ComputeProperties+0x4d>
nopl   0x0(%rax)
mov    %rbp,%r13
cmp    $0x4,%rbp
je     1293 <ComputeProperties+0x173>
cmpl   $0x0,0x8(%rsp)
jle    1280 <ComputeProperties+0x160>
lea    0x1(%r13),%rbp
mov    (%r15,%r13,8),%rax
xor    %r12d,%r12d
jmp    11c0 <ComputeProperties+0xa0>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%r15),%rax
movsd  (%rax,%r12,8),%xmm0
mov    %ebp,%edi
call   1030 <pow@plt>
mov    (%r15,%r13,8),%rax
movsd  (%rax,%r12,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%r12,8)
add    $0x1,%r12
cmp    0x20(%rsp),%r12
je     1160 <ComputeProperties+0x40>
movq   $0x0,(%rax,%r12,8)
cmpl   $0x0,0xc(%rsp)
jle    1240 <ComputeProperties+0x120>
xor    %r14d,%r14d
jmp    11fb <ComputeProperties+0xdb>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mulsd  %xmm0,%xmm1
addsd  (%rax,%r12,8),%xmm1
movsd  %xmm1,(%rax,%r12,8)
add    $0x1,%r14
cmp    %r14,0x10(%rsp)
je     1240 <ComputeProperties+0x120>
movsd  (%rbx,%r14,8),%xmm1
mov    0x28(%rsp),%rcx
mov    (%rcx,%r12,8),%rcx
movsd  (%rcx,%r14,8),%xmm0
test   %r13,%r13
je     11e0 <ComputeProperties+0xc0>
mov    (%r15),%rax
subsd  (%rax,%r12,8),%xmm0
mov    %ebp,%edi
movsd  %xmm1,0x30(%rsp)
call   1030 <pow@plt>
movsd  0x30(%rsp),%xmm1
mov    (%r15,%r13,8),%rax
jmp    11e0 <ComputeProperties+0xc0>
nopw   0x0(%rax,%rax,1)
test   %r13d,%r13d
je     11b5 <ComputeProperties+0x95>
cmp    $0x1,%r13d
jne    1190 <ComputeProperties+0x70>
movsd  (%rax,%r12,8),%xmm0
ucomisd 0xd9f(%rip),%xmm0
jb     1269 <ComputeProperties+0x149>
sqrtsd %xmm0,%xmm0
jmp    126e <ComputeProperties+0x14e>
call   1040 <sqrt@plt>
mov    (%r15,%r13,8),%rax
movsd  %xmm0,(%rax,%r12,8)
jmp    11b5 <ComputeProperties+0x95>
nopl   (%rax)
add    $0x1,%r13
cmp    $0x4,%r13
jne    116d <ComputeProperties+0x4d>
jmp    13e1 <ComputeProperties+0x2c1>
cmpl   $0x0,0x8(%rsp)
jle    13e1 <ComputeProperties+0x2c1>
mov    0x10(%rsp),%r10
and    $0xfffffffe,%r10d
xor    %r11d,%r11d
movabs $0x3ff0000000000000,%r8
mov    0x18(%rsp),%r14
mov    0xc(%rsp),%r12d
jmp    12db <ComputeProperties+0x1bb>
mov    0x18(%rsp),%rax
mov    (%rax),%rsi
mov    %r8,(%rsi,%r11,8)
add    $0x1,%r11
cmp    0x20(%rsp),%r11
je     13e1 <ComputeProperties+0x2c1>
test   %r11,%r11
je     12c0 <ComputeProperties+0x1a0>
mov    (%r14,%r11,8),%rsi
mov    0x8(%r15),%r9
xor    %ebp,%ebp
jmp    131c <ComputeProperties+0x1fc>
nopl   0x0(%rax)
xorpd  %xmm0,%xmm0
movsd  (%r9,%r11,8),%xmm1
mulsd  (%r9,%rbp,8),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rsi,%rbp,8)
mov    (%r14,%rbp,8),%rax
movsd  %xmm0,(%rax,%r11,8)
add    $0x1,%rbp
cmp    %r11,%rbp
je     12c8 <ComputeProperties+0x1a8>
movq   $0x0,(%rsi,%rbp,8)
test   %r12d,%r12d
jle    12f0 <ComputeProperties+0x1d0>
mov    0x28(%rsp),%rcx
mov    (%rcx,%r11,8),%rax
mov    (%r15),%rdx
mov    (%rcx,%rbp,8),%rdi
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
cmp    $0x1,%r12d
je     13aa <ComputeProperties+0x28a>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rax,%rcx,8),%xmm1
subsd  (%rdx,%r11,8),%xmm1
mulsd  (%rbx,%rcx,8),%xmm1
movsd  (%rdi,%rcx,8),%xmm2
subsd  (%rdx,%rbp,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
movsd  %xmm2,(%rsi,%rbp,8)
movsd  0x8(%rax,%rcx,8),%xmm1
subsd  (%rdx,%r11,8),%xmm1
mulsd  0x8(%rbx,%rcx,8),%xmm1
movsd  0x8(%rdi,%rcx,8),%xmm0
subsd  (%rdx,%rbp,8),%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,(%rsi,%rbp,8)
add    $0x2,%rcx
cmp    %rcx,%r10
jne    1350 <ComputeProperties+0x230>
testb  $0x1,0x10(%rsp)
je     12f4 <ComputeProperties+0x1d4>
movsd  (%rax,%rcx,8),%xmm1
subsd  (%rdx,%r11,8),%xmm1
mulsd  (%rbx,%rcx,8),%xmm1
movsd  (%rdi,%rcx,8),%xmm2
subsd  (%rdx,%rbp,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
movsd  %xmm0,(%rsi,%rbp,8)
jmp    12f4 <ComputeProperties+0x1d4>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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