#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__ calloc(int, int);
int /*<<< orphan*/ fatalx(char *, ...);
int /*<<< orphan*/ free(double *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ printmat(double *, int, int);
double conchi(double *a, int m, int n) {
  double *rsum, *csum, ee, tot = 0, chsq = 0, y;
  int i, j, k;
  if ((rsum = (double *)calloc((m), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", m);
  if ((csum = (double *)calloc((n), sizeof(double))) == NULL)
    fatalx("Unable to allocate %d unit(s) for item \n", n);
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      k = i * n + j;
      rsum[i] += a[k];
      csum[j] += a[k];
      tot += a[k];
    }
  }
  if (tot < 0.001)
    fatalx("(conchi) no data\n");
  for (i = 0; i < m; i++) {
    for (j = 0; j < n; j++) {
      k = i * n + j;
      ee = rsum[i] * csum[j] / tot;
      if (ee < 1.0e-12) {
        printf("bad conchi\n");
        printmat(a, m, n);
        fatalx("(conchi) zero row or column sum\n");
      }
      y = a[k] - ee;
      chsq += (y * y) / ee;
    }
  }
  free(rsum);
  free(csum);
  return chsq;
}


x86 assembly (clang, -O0):
<conchi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    119e <conchi+0x4e>
mov    -0xc(%rbp),%esi
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1040 <fatalx@plt>
mov    -0x10(%rbp),%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    11ca <conchi+0x7a>
mov    -0x10(%rbp),%esi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1040 <fatalx@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1273 <conchi+0x123>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1260 <conchi+0x110>
mov    -0x44(%rbp),%eax
imul   -0x10(%rbp),%eax
add    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    11e4 <conchi+0x94>
jmp    1265 <conchi+0x115>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11d1 <conchi+0x81>
movsd  0xd85(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1294 <conchi+0x144>
lea    0xdac(%rip),%rdi
mov    $0x0,%al
call   1040 <fatalx@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1378 <conchi+0x228>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1365 <conchi+0x215>
mov    -0x44(%rbp),%eax
imul   -0x10(%rbp),%eax
add    -0x48(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xd15(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1327 <conchi+0x1d7>
lea    0xd46(%rip),%rdi
call   1060 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1050 <printmat@plt>
lea    0xd37(%rip),%rdi
mov    $0x0,%al
call   1040 <fatalx@plt>
mov    -0x8(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12ae <conchi+0x15e>
jmp    136a <conchi+0x21a>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    129b <conchi+0x14b>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x38(%rbp),%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conchi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %edx,%r12d
mov    %rdi,0x10(%rsp)
mov    %esi,(%rsp)
mov    %esi,%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    118e <conchi+0x3e>
lea    0xe8c(%rip),%rdi
mov    (%rsp),%esi
xor    %eax,%eax
call   1040 <fatalx@plt>
mov    %r12d,%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    11b4 <conchi+0x64>
lea    0xe66(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <fatalx@plt>
movslq %r12d,%r15
mov    (%rsp),%eax
mov    %eax,%r13d
mov    %r12d,%r14d
test   %eax,%eax
jle    133d <conchi+0x1ed>
lea    0x0(,%r15,8),%rax
xorpd  %xmm1,%xmm1
xor    %ecx,%ecx
mov    0x10(%rsp),%rdx
jmp    11ec <conchi+0x9c>
nopl   (%rax)
add    $0x1,%rcx
add    %rax,%rdx
cmp    %r13,%rcx
je     1230 <conchi+0xe0>
test   %r12d,%r12d
jle    11e0 <conchi+0x90>
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rdx,%rsi,8),%xmm0
addsd  0x0(%rbp,%rcx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,8)
movsd  (%rdx,%rsi,8),%xmm0
addsd  (%rbx,%rsi,8),%xmm0
movsd  %xmm0,(%rbx,%rsi,8)
addsd  (%rdx,%rsi,8),%xmm1
add    $0x1,%rsi
cmp    %rsi,%r14
jne    1200 <conchi+0xb0>
jmp    11e0 <conchi+0x90>
movsd  0xdc8(%rip),%xmm0
ucomisd %xmm1,%xmm0
ja     1341 <conchi+0x1f1>
cmpl   $0x0,(%rsp)
jle    1365 <conchi+0x215>
mov    %r13,0x20(%rsp)
shl    $0x3,%r15
mov    %r15,0x28(%rsp)
xorpd  %xmm2,%xmm2
movsd  0xda2(%rip),%xmm3
mov    0x10(%rsp),%r13
xor    %r15d,%r15d
mov    %r12d,0x4(%rsp)
movsd  %xmm1,0x8(%rsp)
jmp    1299 <conchi+0x149>
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
add    0x28(%rsp),%r13
cmp    0x20(%rsp),%r15
mov    0x4(%rsp),%r12d
je     1369 <conchi+0x219>
test   %r12d,%r12d
jle    1280 <conchi+0x130>
xor    %r12d,%r12d
jmp    12d0 <conchi+0x180>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  0x0(%r13,%r12,8),%xmm0
subsd  %xmm4,%xmm0
mulsd  %xmm0,%xmm0
divsd  %xmm4,%xmm0
addsd  %xmm0,%xmm2
add    $0x1,%r12
cmp    %r12,%r14
je     1280 <conchi+0x130>
movsd  0x0(%rbp,%r15,8),%xmm4
mulsd  (%rbx,%r12,8),%xmm4
divsd  %xmm1,%xmm4
ucomisd %xmm4,%xmm3
jbe    12b0 <conchi+0x160>
lea    0xd7e(%rip),%rdi
movsd  %xmm2,0x18(%rsp)
movsd  %xmm4,0x30(%rsp)
call   1050 <puts@plt>
mov    0x10(%rsp),%rdi
mov    (%rsp),%esi
mov    0x4(%rsp),%edx
call   1060 <printmat@plt>
lea    0xd34(%rip),%rdi
xor    %eax,%eax
call   1040 <fatalx@plt>
movsd  0x30(%rsp),%xmm4
movsd  0xcdc(%rip),%xmm3
movsd  0x18(%rsp),%xmm2
movsd  0x8(%rsp),%xmm1
jmp    12b0 <conchi+0x160>
xorpd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
lea    0xceb(%rip),%rdi
xor    %eax,%eax
call   1040 <fatalx@plt>
movsd  0x8(%rsp),%xmm1
cmpl   $0x0,(%rsp)
jg     124c <conchi+0xfc>
xorpd  %xmm2,%xmm2
movsd  %xmm2,0x18(%rsp)
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
movsd  0x18(%rsp),%xmm0
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Unable to allocate %d unit(s) for item \0A\00"
@.str.1 = [18 x i8] c"(conchi) no data\0A\00"
@.str.2 = [12 x i8] c"bad conchi\0A\00"
@.str.3 = [33 x i8] c"(conchi) zero row or column sum\0A\00"
define double @conchi(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %11
%16 = load i32, i32* %5
%17 = call i64 @calloc(i32 %16, i32 8)
%18 = inttoptr i64 %17 to double*
store double* %18, double** %7
%19 = icmp eq double* %18, null
br i1 %19, label %20, label %23
20: ; preds = %3
%21 = load i32, i32* %5
%22 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %20, %3
%24 = load i32, i32* %6
%25 = call i64 @calloc(i32 %24, i32 8)
%26 = inttoptr i64 %25 to double*
store double* %26, double** %8
%27 = icmp eq double* %26, null
br i1 %27, label %28, label %31
28: ; preds = %23
%29 = load i32, i32* %6
%30 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %29)
br label %31
31: ; preds = %28, %23
store i32 0, i32* %13
br label %32
32: ; preds = %80, %31
%33 = load i32, i32* %13
%34 = load i32, i32* %5
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %83
36: ; preds = %32
store i32 0, i32* %14
br label %37
37: ; preds = %76, %36
%38 = load i32, i32* %14
%39 = load i32, i32* %6
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %79
41: ; preds = %37
%42 = load i32, i32* %13
%43 = load i32, i32* %6
%44 = mul nsw i32 %42, %43
%45 = load i32, i32* %14
%46 = add nsw i32 %44, %45
store i32 %46, i32* %15
%47 = load double*, double** %4
%48 = load i32, i32* %15
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %47, i64 %49
%51 = load double, double* %50
%52 = load double*, double** %7
%53 = load i32, i32* %13
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds double, double* %52, i64 %54
%56 = load double, double* %55
%57 = fadd double %56, %51
store double %57, double* %55
%58 = load double*, double** %4
%59 = load i32, i32* %15
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
%62 = load double, double* %61
%63 = load double*, double** %8
%64 = load i32, i32* %14
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
%67 = load double, double* %66
%68 = fadd double %67, %62
store double %68, double* %66
%69 = load double*, double** %4
%70 = load i32, i32* %15
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %69, i64 %71
%73 = load double, double* %72
%74 = load double, double* %10
%75 = fadd double %74, %73
store double %75, double* %10
br label %76
76: ; preds = %41
%77 = load i32, i32* %14
%78 = add nsw i32 %77, 1
store i32 %78, i32* %14
br label %37
79: ; preds = %37
br label %80
80: ; preds = %79
%81 = load i32, i32* %13
%82 = add nsw i32 %81, 1
store i32 %82, i32* %13
br label %32
83: ; preds = %32
%84 = load double, double* %10
%85 = fcmp olt double %84, 1.000000e-03
br i1 %85, label %86, label %88
86: ; preds = %83
%87 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %88
88: ; preds = %86, %83
store i32 0, i32* %13
br label %89
89: ; preds = %145, %88
%90 = load i32, i32* %13
%91 = load i32, i32* %5
%92 = icmp slt i32 %90, %91
br i1 %92, label %93, label %148
93: ; preds = %89
store i32 0, i32* %14
br label %94
94: ; preds = %141, %93
%95 = load i32, i32* %14
%96 = load i32, i32* %6
%97 = icmp slt i32 %95, %96
br i1 %97, label %98, label %144
98: ; preds = %94
%99 = load i32, i32* %13
%100 = load i32, i32* %6
%101 = mul nsw i32 %99, %100
%102 = load i32, i32* %14
%103 = add nsw i32 %101, %102
store i32 %103, i32* %15
%104 = load double*, double** %7
%105 = load i32, i32* %13
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds double, double* %104, i64 %106
%108 = load double, double* %107
%109 = load double*, double** %8
%110 = load i32, i32* %14
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %109, i64 %111
%113 = load double, double* %112
%114 = fmul double %108, %113
%115 = load double, double* %10
%116 = fdiv double %114, %115
store double %116, double* %9
%117 = load double, double* %9
%118 = fcmp olt double %117, 0x3D719799812DEA11
br i1 %118, label %119, label %126
119: ; preds = %98
%120 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%121 = load double*, double** %4
%122 = load i32, i32* %5
%123 = load i32, i32* %6
%124 = call i32 @printmat(double* %121, i32 %122, i32 %123)
%125 = call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %126
126: ; preds = %119, %98
%127 = load double*, double** %4
%128 = load i32, i32* %15
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %127, i64 %129
%131 = load double, double* %130
%132 = load double, double* %9
%133 = fsub double %131, %132
store double %133, double* %12
%134 = load double, double* %12
%135 = load double, double* %12
%136 = fmul double %134, %135
%137 = load double, double* %9
%138 = fdiv double %136, %137
%139 = load double, double* %11
%140 = fadd double %139, %138
store double %140, double* %11
br label %141
141: ; preds = %126
%142 = load i32, i32* %14
%143 = add nsw i32 %142, 1
store i32 %143, i32* %14
br label %94
144: ; preds = %94
br label %145
145: ; preds = %144
%146 = load i32, i32* %13
%147 = add nsw i32 %146, 1
store i32 %147, i32* %13
br label %89
148: ; preds = %89
%149 = load double*, double** %7
%150 = call i32 @free(double* %149)
%151 = load double*, double** %8
%152 = call i32 @free(double* %151)
%153 = load double, double* %11
ret double %153
}

LLVM IR (-O2):
@.str = [41 x i8] c"Unable to allocate %d unit(s) for item \0A\00"
@.str.1 = [18 x i8] c"(conchi) no data\0A\00"
@.str.3 = [33 x i8] c"(conchi) zero row or column sum\0A\00"
@str = [11 x i8] c"bad conchi\00"
define double @conchi(double* %0, i32 %1, i32 %2) {
%4 = tail call i64 @calloc(i32 %1, i32 8)
%5 = inttoptr i64 %4 to double*
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %9
9: ; preds = %7, %3
%10 = tail call i64 @calloc(i32 %2, i32 8)
%11 = inttoptr i64 %10 to double*
%12 = icmp eq i64 %10, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %15
15: ; preds = %13, %9
%16 = icmp sgt i32 %1, 0
br i1 %16, label %17, label %50
17: ; preds = %15
%18 = icmp sgt i32 %2, 0
%19 = sext i32 %2 to i64
%20 = zext i32 %1 to i64
%21 = zext i32 %2 to i64
br label %22
22: ; preds = %17, %44
%23 = phi i64 [ 0, %17 ], [ %46, %44 ]
%24 = phi double [ 0.000000e+00, %17 ], [ %45, %44 ]
br i1 %18, label %25, label %44
25: ; preds = %22
%26 = mul nsw i64 %23, %19
%27 = getelementptr inbounds double, double* %5, i64 %23
br label %28
28: ; preds = %25, %28
%29 = phi i64 [ 0, %25 ], [ %42, %28 ]
%30 = phi double [ %24, %25 ], [ %41, %28 ]
%31 = add nsw i64 %29, %26
%32 = getelementptr inbounds double, double* %0, i64 %31
%33 = load double, double* %32
%34 = load double, double* %27
%35 = fadd double %33, %34
store double %35, double* %27
%36 = load double, double* %32
%37 = getelementptr inbounds double, double* %11, i64 %29
%38 = load double, double* %37
%39 = fadd double %36, %38
store double %39, double* %37
%40 = load double, double* %32
%41 = fadd double %30, %40
%42 = add nuw nsw i64 %29, 1
%43 = icmp eq i64 %42, %21
br i1 %43, label %44, label %28
44: ; preds = %28, %22
%45 = phi double [ %24, %22 ], [ %41, %28 ]
%46 = add nuw nsw i64 %23, 1
%47 = icmp eq i64 %46, %20
br i1 %47, label %48, label %22
48: ; preds = %44
%49 = fcmp olt double %45, 1.000000e-03
br i1 %49, label %50, label %53
50: ; preds = %15, %48
%51 = phi double [ %45, %48 ], [ 0.000000e+00, %15 ]
%52 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %53
53: ; preds = %50, %48
%54 = phi double [ %51, %50 ], [ %45, %48 ]
br i1 %16, label %55, label %93
55: ; preds = %53
%56 = icmp sgt i32 %2, 0
%57 = sext i32 %2 to i64
%58 = zext i32 %1 to i64
%59 = zext i32 %2 to i64
br label %60
60: ; preds = %55, %89
%61 = phi i64 [ 0, %55 ], [ %91, %89 ]
%62 = phi double [ 0.000000e+00, %55 ], [ %90, %89 ]
br i1 %56, label %63, label %89
63: ; preds = %60
%64 = mul nsw i64 %61, %57
%65 = getelementptr inbounds double, double* %5, i64 %61
br label %66
66: ; preds = %63, %80
%67 = phi i64 [ 0, %63 ], [ %87, %80 ]
%68 = phi double [ %62, %63 ], [ %86, %80 ]
%69 = add nsw i64 %67, %64
%70 = load double, double* %65
%71 = getelementptr inbounds double, double* %11, i64 %67
%72 = load double, double* %71
%73 = fmul double %70, %72
%74 = fdiv double %73, %54
%75 = fcmp olt double %74, 0x3D719799812DEA11
br i1 %75, label %76, label %80
76: ; preds = %66
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%78 = tail call i32 @printmat(double* %0, i32 %1, i32 %2)
%79 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %80
80: ; preds = %76, %66
%81 = getelementptr inbounds double, double* %0, i64 %69
%82 = load double, double* %81
%83 = fsub double %82, %74
%84 = fmul double %83, %83
%85 = fdiv double %84, %74
%86 = fadd double %68, %85
%87 = add nuw nsw i64 %67, 1
%88 = icmp eq i64 %87, %59
br i1 %88, label %89, label %66
89: ; preds = %80, %60
%90 = phi double [ %62, %60 ], [ %86, %80 ]
%91 = add nuw nsw i64 %61, 1
%92 = icmp eq i64 %91, %58
br i1 %92, label %93, label %60
93: ; preds = %89, %53
%94 = phi double [ 0.000000e+00, %53 ], [ %90, %89 ]
%95 = tail call i32 @free(double* %5)
%96 = tail call i32 @free(double* %11)
ret double %94
}