#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 sqrt(double);
double z2x2(double *a) {
  double *rsum, *csum, ee, tot = 0, chsq = 0, y, dev00, z;
  int i, j, k, m = 2, n = 2;
  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("(z2x2) 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;
      if (k == 0)
        dev00 = y;
      chsq += (y * y) / ee;
    }
  }
  z = sqrt(chsq + 1.0e-12);
  if (dev00 < 0.0)
    z = -z;
  free(rsum);
  free(csum);
  return z;
}


x86 assembly (clang, -O0):
<z2x2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x2,-0x58(%rbp)
movl   $0x2,-0x5c(%rbp)
mov    -0x58(%rbp),%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    11b6 <z2x2+0x56>
mov    -0x58(%rbp),%esi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1040 <fatalx@plt>
mov    -0x5c(%rbp),%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    11e2 <z2x2+0x82>
mov    -0x5c(%rbp),%esi
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1040 <fatalx@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    128b <z2x2+0x12b>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    1278 <z2x2+0x118>
mov    -0x4c(%rbp),%eax
imul   -0x5c(%rbp),%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x50(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11fc <z2x2+0x9c>
jmp    127d <z2x2+0x11d>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11e9 <z2x2+0x89>
movsd  0xd6d(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    12ac <z2x2+0x14c>
lea    0xd94(%rip),%rdi
mov    $0x0,%al
call   1040 <fatalx@plt>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x58(%rbp),%eax
jge    13a4 <z2x2+0x244>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x5c(%rbp),%eax
jge    1391 <z2x2+0x231>
mov    -0x4c(%rbp),%eax
imul   -0x5c(%rbp),%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x50(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xcfd(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    133f <z2x2+0x1df>
lea    0xd2c(%rip),%rdi
call   1060 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x58(%rbp),%esi
mov    -0x5c(%rbp),%edx
call   1050 <printmat@plt>
lea    0xd1d(%rip),%rdi
mov    $0x0,%al
call   1040 <fatalx@plt>
mov    -0x8(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x0,-0x54(%rbp)
jne    136a <z2x2+0x20a>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    12c6 <z2x2+0x166>
jmp    1396 <z2x2+0x236>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12b3 <z2x2+0x153>
movsd  0xc5c(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x40(%rbp),%xmm0
jbe    13ea <z2x2+0x28a>
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x48(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<z2x2>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    %rdi,%rbx
mov    $0x2,%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1196 <z2x2+0x36>
lea    0xe96(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <fatalx@plt>
mov    $0x2,%edi
mov    $0x8,%esi
call   1070 <calloc@plt>
mov    %rax,%r15
test   %rax,%rax
jne    11c0 <z2x2+0x60>
lea    0xe6c(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <fatalx@plt>
movsd  (%rbx),%xmm0
addsd  (%r14),%xmm0
movsd  %xmm0,(%r14)
movsd  (%rbx),%xmm0
addsd  (%r15),%xmm0
movsd  %xmm0,(%r15)
xorpd  %xmm1,%xmm1
addsd  (%rbx),%xmm1
movsd  0x8(%rbx),%xmm0
addsd  (%r14),%xmm0
movsd  %xmm0,(%r14)
movsd  0x8(%rbx),%xmm0
addsd  0x8(%r15),%xmm0
movsd  %xmm0,0x8(%r15)
addsd  0x8(%rbx),%xmm1
movsd  0x10(%rbx),%xmm0
addsd  0x8(%r14),%xmm0
movsd  %xmm0,0x8(%r14)
movsd  0x10(%rbx),%xmm0
addsd  (%r15),%xmm0
movsd  %xmm0,(%r15)
addsd  0x10(%rbx),%xmm1
movsd  0x18(%rbx),%xmm0
addsd  0x8(%r14),%xmm0
movsd  %xmm0,0x8(%r14)
movsd  0x18(%rbx),%xmm0
addsd  0x8(%r15),%xmm0
movsd  %xmm0,0x8(%r15)
addsd  0x18(%rbx),%xmm1
movsd  0xda3(%rip),%xmm0
ucomisd %xmm1,%xmm0
movsd  %xmm1,0x10(%rsp)
jbe    127d <z2x2+0x11d>
lea    0xdd9(%rip),%rdi
xor    %eax,%eax
call   1040 <fatalx@plt>
movsd  0x10(%rsp),%xmm1
movsd  (%r14),%xmm4
movsd  (%r15),%xmm3
mulsd  %xmm4,%xmm3
divsd  %xmm1,%xmm3
movsd  0xd71(%rip),%xmm7
ucomisd %xmm3,%xmm7
movapd %xmm3,0x20(%rsp)
jbe    12e8 <z2x2+0x188>
lea    0xdd0(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   1060 <printmat@plt>
lea    0xd91(%rip),%rdi
xor    %eax,%eax
call   1040 <fatalx@plt>
movsd  0xd31(%rip),%xmm7
movapd 0x20(%rsp),%xmm3
movsd  0x10(%rsp),%xmm1
movsd  (%r14),%xmm4
mulsd  0x8(%r15),%xmm4
movsd  (%rbx),%xmm2
divsd  %xmm1,%xmm4
ucomisd %xmm4,%xmm7
movapd %xmm2,(%rsp)
movapd %xmm4,0x30(%rsp)
jbe    1352 <z2x2+0x1f2>
lea    0xd6c(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   1060 <printmat@plt>
lea    0xd2d(%rip),%rdi
xor    %eax,%eax
call   1040 <fatalx@plt>
movsd  0xccd(%rip),%xmm7
movapd 0x30(%rsp),%xmm4
movapd 0x20(%rsp),%xmm3
movsd  0x10(%rsp),%xmm1
movapd (%rsp),%xmm2
movsd  0x8(%rbx),%xmm8
movsd  0x8(%r14),%xmm6
movsd  (%r15),%xmm5
mulsd  %xmm6,%xmm5
divsd  %xmm1,%xmm5
ucomisd %xmm5,%xmm7
movapd %xmm5,0x50(%rsp)
movapd %xmm8,0x40(%rsp)
jbe    13dc <z2x2+0x27c>
lea    0xcf5(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   1060 <printmat@plt>
lea    0xcb6(%rip),%rdi
xor    %eax,%eax
call   1040 <fatalx@plt>
movapd 0x40(%rsp),%xmm8
movapd 0x50(%rsp),%xmm5
movsd  0xc49(%rip),%xmm7
movapd 0x30(%rsp),%xmm4
movapd 0x20(%rsp),%xmm3
movsd  0x10(%rsp),%xmm1
movapd (%rsp),%xmm2
movsd  0x8(%r14),%xmm6
subsd  %xmm3,%xmm2
mulsd  0x8(%r15),%xmm6
movsd  0x10(%rbx),%xmm0
divsd  %xmm1,%xmm6
ucomisd %xmm6,%xmm7
movapd %xmm2,(%rsp)
jbe    145c <z2x2+0x2fc>
lea    0xc79(%rip),%rdi
movapd %xmm0,0x10(%rsp)
movapd %xmm6,0x60(%rsp)
call   1050 <puts@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   1060 <printmat@plt>
lea    0xc2e(%rip),%rdi
xor    %eax,%eax
call   1040 <fatalx@plt>
movapd 0x60(%rsp),%xmm6
movapd 0x10(%rsp),%xmm0
movapd 0x40(%rsp),%xmm8
movapd 0x50(%rsp),%xmm5
movapd 0x30(%rsp),%xmm4
movapd 0x20(%rsp),%xmm3
movapd (%rsp),%xmm2
subsd  %xmm4,%xmm8
movapd %xmm2,%xmm7
unpcklpd %xmm8,%xmm7
mulpd  %xmm7,%xmm7
unpcklpd %xmm4,%xmm3
divpd  %xmm3,%xmm7
xorpd  %xmm3,%xmm3
movapd %xmm7,%xmm1
addsd  %xmm3,%xmm1
unpckhpd %xmm7,%xmm7
movhpd 0x18(%rbx),%xmm0
addsd  %xmm1,%xmm7
unpcklpd %xmm6,%xmm5
subpd  %xmm5,%xmm0
mulpd  %xmm0,%xmm0
divpd  %xmm5,%xmm0
addsd  %xmm0,%xmm7
unpckhpd %xmm0,%xmm0
addsd  %xmm7,%xmm0
addsd  0xb55(%rip),%xmm0
ucomisd %xmm3,%xmm0
jb     14bf <z2x2+0x35f>
sqrtsd %xmm0,%xmm0
jmp    14cd <z2x2+0x36d>
call   1080 <sqrt@plt>
xorpd  %xmm3,%xmm3
movapd (%rsp),%xmm2
movapd 0xb3b(%rip),%xmm1
xorpd  %xmm0,%xmm1
cmpltsd %xmm3,%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movapd %xmm2,(%rsp)
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
movaps (%rsp),%xmm0
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Unable to allocate %d unit(s) for item \0A\00"
@.str.1 = [16 x i8] c"(z2x2) 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 @z2x2(double* %0) {
%2 = alloca double*
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store double* %0, double** %2
store double 0.000000e+00, double* %6
store double 0.000000e+00, double* %7
store i32 2, i32* %14
store i32 2, i32* %15
%16 = load i32, i32* %14
%17 = call i64 @calloc(i32 %16, i32 8)
%18 = inttoptr i64 %17 to double*
store double* %18, double** %3
%19 = icmp eq double* %18, null
br i1 %19, label %20, label %23
20: ; preds = %1
%21 = load i32, i32* %14
%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, %1
%24 = load i32, i32* %15
%25 = call i64 @calloc(i32 %24, i32 8)
%26 = inttoptr i64 %25 to double*
store double* %26, double** %4
%27 = icmp eq double* %26, null
br i1 %27, label %28, label %31
28: ; preds = %23
%29 = load i32, i32* %15
%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* %11
br label %32
32: ; preds = %80, %31
%33 = load i32, i32* %11
%34 = load i32, i32* %14
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %83
36: ; preds = %32
store i32 0, i32* %12
br label %37
37: ; preds = %76, %36
%38 = load i32, i32* %12
%39 = load i32, i32* %15
%40 = icmp slt i32 %38, %39
br i1 %40, label %41, label %79
41: ; preds = %37
%42 = load i32, i32* %11
%43 = load i32, i32* %15
%44 = mul nsw i32 %42, %43
%45 = load i32, i32* %12
%46 = add nsw i32 %44, %45
store i32 %46, i32* %13
%47 = load double*, double** %2
%48 = load i32, i32* %13
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %47, i64 %49
%51 = load double, double* %50
%52 = load double*, double** %3
%53 = load i32, i32* %11
%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** %2
%59 = load i32, i32* %13
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds double, double* %58, i64 %60
%62 = load double, double* %61
%63 = load double*, double** %4
%64 = load i32, i32* %12
%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** %2
%70 = load i32, i32* %13
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %69, i64 %71
%73 = load double, double* %72
%74 = load double, double* %6
%75 = fadd double %74, %73
store double %75, double* %6
br label %76
76: ; preds = %41
%77 = load i32, i32* %12
%78 = add nsw i32 %77, 1
store i32 %78, i32* %12
br label %37
79: ; preds = %37
br label %80
80: ; preds = %79
%81 = load i32, i32* %11
%82 = add nsw i32 %81, 1
store i32 %82, i32* %11
br label %32
83: ; preds = %32
%84 = load double, double* %6
%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 ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %88
88: ; preds = %86, %83
store i32 0, i32* %11
br label %89
89: ; preds = %150, %88
%90 = load i32, i32* %11
%91 = load i32, i32* %14
%92 = icmp slt i32 %90, %91
br i1 %92, label %93, label %153
93: ; preds = %89
store i32 0, i32* %12
br label %94
94: ; preds = %146, %93
%95 = load i32, i32* %12
%96 = load i32, i32* %15
%97 = icmp slt i32 %95, %96
br i1 %97, label %98, label %149
98: ; preds = %94
%99 = load i32, i32* %11
%100 = load i32, i32* %15
%101 = mul nsw i32 %99, %100
%102 = load i32, i32* %12
%103 = add nsw i32 %101, %102
store i32 %103, i32* %13
%104 = load double*, double** %3
%105 = load i32, i32* %11
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds double, double* %104, i64 %106
%108 = load double, double* %107
%109 = load double*, double** %4
%110 = load i32, i32* %12
%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* %6
%116 = fdiv double %114, %115
store double %116, double* %5
%117 = load double, double* %5
%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** %2
%122 = load i32, i32* %14
%123 = load i32, i32* %15
%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** %2
%128 = load i32, i32* %13
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %127, i64 %129
%131 = load double, double* %130
%132 = load double, double* %5
%133 = fsub double %131, %132
store double %133, double* %8
%134 = load i32, i32* %13
%135 = icmp eq i32 %134, 0
br i1 %135, label %136, label %138
136: ; preds = %126
%137 = load double, double* %8
store double %137, double* %9
br label %138
138: ; preds = %136, %126
%139 = load double, double* %8
%140 = load double, double* %8
%141 = fmul double %139, %140
%142 = load double, double* %5
%143 = fdiv double %141, %142
%144 = load double, double* %7
%145 = fadd double %144, %143
store double %145, double* %7
br label %146
146: ; preds = %138
%147 = load i32, i32* %12
%148 = add nsw i32 %147, 1
store i32 %148, i32* %12
br label %94
149: ; preds = %94
br label %150
150: ; preds = %149
%151 = load i32, i32* %11
%152 = add nsw i32 %151, 1
store i32 %152, i32* %11
br label %89
153: ; preds = %89
%154 = load double, double* %7
%155 = fadd double %154, 0x3D719799812DEA11
%156 = call double @sqrt(double %155)
store double %156, double* %10
%157 = load double, double* %9
%158 = fcmp olt double %157, 0.000000e+00
br i1 %158, label %159, label %162
159: ; preds = %153
%160 = load double, double* %10
%161 = fneg double %160
store double %161, double* %10
br label %162
162: ; preds = %159, %153
%163 = load double*, double** %3
%164 = call i32 @free(double* %163)
%165 = load double*, double** %4
%166 = call i32 @free(double* %165)
%167 = load double, double* %10
ret double %167
}

LLVM IR (-O2):
@.str = [41 x i8] c"Unable to allocate %d unit(s) for item \0A\00"
@.str.1 = [16 x i8] c"(z2x2) 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 @z2x2(double* %0) {
%2 = tail call i64 @calloc(i32 2, i32 8)
%3 = inttoptr i64 %2 to double*
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 2)
br label %7
7: ; preds = %5, %1
%8 = tail call i64 @calloc(i32 2, i32 8)
%9 = inttoptr i64 %8 to double*
%10 = icmp eq i64 %8, 0
br i1 %10, label %11, label %13
11: ; preds = %7
%12 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 2)
br label %13
13: ; preds = %11, %7
%14 = load double, double* %0
%15 = load double, double* %3
%16 = fadd double %14, %15
store double %16, double* %3
%17 = load double, double* %0
%18 = load double, double* %9
%19 = fadd double %17, %18
store double %19, double* %9
%20 = load double, double* %0
%21 = fadd double %20, 0.000000e+00
%22 = getelementptr inbounds double, double* %0, i64 1
%23 = load double, double* %22
%24 = load double, double* %3
%25 = fadd double %23, %24
store double %25, double* %3
%26 = load double, double* %22
%27 = getelementptr inbounds double, double* %9, i64 1
%28 = load double, double* %27
%29 = fadd double %26, %28
store double %29, double* %27
%30 = load double, double* %22
%31 = fadd double %21, %30
%32 = getelementptr inbounds double, double* %3, i64 1
%33 = getelementptr inbounds double, double* %0, i64 2
%34 = load double, double* %33
%35 = load double, double* %32
%36 = fadd double %34, %35
store double %36, double* %32
%37 = load double, double* %33
%38 = load double, double* %9
%39 = fadd double %37, %38
store double %39, double* %9
%40 = load double, double* %33
%41 = fadd double %31, %40
%42 = getelementptr inbounds double, double* %0, i64 3
%43 = load double, double* %42
%44 = load double, double* %32
%45 = fadd double %43, %44
store double %45, double* %32
%46 = load double, double* %42
%47 = load double, double* %27
%48 = fadd double %46, %47
store double %48, double* %27
%49 = load double, double* %42
%50 = fadd double %41, %49
%51 = fcmp olt double %50, 1.000000e-03
br i1 %51, label %52, label %54
52: ; preds = %13
%53 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %54
54: ; preds = %52, %13
%55 = load double, double* %3
%56 = load double, double* %9
%57 = fmul double %55, %56
%58 = fdiv double %57, %50
%59 = fcmp olt double %58, 0x3D719799812DEA11
br i1 %59, label %60, label %65
60: ; preds = %54
%61 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%62 = tail call i32 @printmat(double* %0, i32 2, i32 2)
%63 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%64 = load double, double* %3
br label %65
65: ; preds = %60, %54
%66 = phi double [ %64, %60 ], [ %55, %54 ]
%67 = load double, double* %0
%68 = fsub double %67, %58
%69 = load double, double* %27
%70 = fmul double %66, %69
%71 = fdiv double %70, %50
%72 = fcmp olt double %71, 0x3D719799812DEA11
br i1 %72, label %73, label %77
73: ; preds = %65
%74 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%75 = tail call i32 @printmat(double* %0, i32 2, i32 2)
%76 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %77
77: ; preds = %73, %65
%78 = load double, double* %22
%79 = load double, double* %32
%80 = load double, double* %9
%81 = fmul double %79, %80
%82 = fdiv double %81, %50
%83 = fcmp olt double %82, 0x3D719799812DEA11
br i1 %83, label %84, label %89
84: ; preds = %77
%85 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%86 = tail call i32 @printmat(double* %0, i32 2, i32 2)
%87 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%88 = load double, double* %32
br label %89
89: ; preds = %84, %77
%90 = phi double [ %88, %84 ], [ %79, %77 ]
%91 = load double, double* %33
%92 = load double, double* %27
%93 = fmul double %90, %92
%94 = fdiv double %93, %50
%95 = fcmp olt double %94, 0x3D719799812DEA11
br i1 %95, label %96, label %100
96: ; preds = %89
%97 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%98 = tail call i32 @printmat(double* %0, i32 2, i32 2)
%99 = tail call i32 (i8*, ...) @fatalx(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %100
100: ; preds = %96, %89
%101 = fsub double %78, %71
%102 = insertelement <2 x double> poison, double %68, i64 0
%103 = insertelement <2 x double> %102, double %101, i64 1
%104 = fmul <2 x double> %103, %103
%105 = insertelement <2 x double> poison, double %58, i64 0
%106 = insertelement <2 x double> %105, double %71, i64 1
%107 = fdiv <2 x double> %104, %106
%108 = extractelement <2 x double> %107, i64 0
%109 = fadd double %108, 0.000000e+00
%110 = extractelement <2 x double> %107, i64 1
%111 = fadd double %109, %110
%112 = load double, double* %42
%113 = insertelement <2 x double> poison, double %91, i64 0
%114 = insertelement <2 x double> %113, double %112, i64 1
%115 = insertelement <2 x double> poison, double %82, i64 0
%116 = insertelement <2 x double> %115, double %94, i64 1
%117 = fsub <2 x double> %114, %116
%118 = fmul <2 x double> %117, %117
%119 = fdiv <2 x double> %118, %116
%120 = extractelement <2 x double> %119, i64 0
%121 = fadd double %111, %120
%122 = extractelement <2 x double> %119, i64 1
%123 = fadd double %121, %122
%124 = fadd double %123, 0x3D719799812DEA11
%125 = tail call double @sqrt(double %124)
%126 = fcmp olt double %68, 0.000000e+00
%127 = fneg double %125
%128 = select i1 %126, double %127, double %125
%129 = tail call i32 @free(double* %3)
%130 = tail call i32 @free(double* %9)
ret double %128
}