#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 **MatrixInver(double **, int, int);
double **MatrixMulti(double **, double **, int, int, int);
double **MatrixOpp(double **, int);
scalar_t__ malloc(int);
double **zeros(int, int);
int /*<<< orphan*/ zerosfree(double **, int);
double *LMLE(double *P, double *L, int n) {
  double **A = zeros(n, 2);
  double **A1 = zeros(2, 2);
  double **A2 = zeros(2, 2);
  double **A3 = zeros(2, n);
  double **AT = zeros(2, n);
  double **b = zeros(n, 1);
  double **X = zeros(2, 1);
  int i, j, k;
  double xk, xj, yk, yj, lj, lk;
  for (i = 0; i < n; i++) {
    j = i;
    k = (i + 1) % n;
    xk = *(P + 2 * k);
    xj = *(P + 2 * j);
    yk = *(P + 2 * k + 1);
    yj = *(P + 2 * j + 1);
    lk = *(L + k);
    lj = *(L + j);
    A[i][0] = 2 * (xk - xj);
    A[i][1] = 2 * (yk - yj);
    b[i][0] = lj * lj - lk * lk + xk * xk - xj * xj + yk * yk - yj * yj;
  }
  AT = MatrixInver(A, n, 2);
  A1 = MatrixMulti(AT, A, 2, n, 2);
  A2 = MatrixOpp(A1, 2);
  A3 = MatrixMulti(A2, AT, 2, 2, n);
  X = MatrixMulti(A3, b, 2, n, 1);
  double *P0 = (double *)malloc(2 * sizeof(double));
  P0[0] = X[0][0];
  P0[1] = X[1][0];
  zerosfree(A, n);
  A = NULL;
  zerosfree(A1, 2);
  A1 = NULL;
  zerosfree(A2, 2);
  A2 = NULL;
  zerosfree(A3, 2);
  A3 = NULL;
  zerosfree(AT, 2);
  AT = NULL;
  zerosfree(b, 2);
  b = NULL;
  zerosfree(X, 2);
  X = NULL;
  return P0;
}


x86 assembly (clang, -O0):
<LMLE>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x2,%esi
call   1080 <zeros@plt>
mov    %rax,-0x20(%rbp)
mov    $0x2,%esi
mov    %esi,%edi
call   1080 <zeros@plt>
mov    %rax,-0x28(%rbp)
mov    $0x2,%esi
mov    %esi,%edi
call   1080 <zeros@plt>
mov    %rax,-0x30(%rbp)
mov    -0x14(%rbp),%esi
mov    $0x2,%edi
call   1080 <zeros@plt>
mov    %rax,-0x38(%rbp)
mov    -0x14(%rbp),%esi
mov    $0x2,%edi
call   1080 <zeros@plt>
mov    %rax,-0x40(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x1,%esi
call   1080 <zeros@plt>
mov    %rax,-0x48(%rbp)
mov    $0x2,%edi
mov    $0x1,%esi
call   1080 <zeros@plt>
mov    %rax,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13bb <LMLE+0x25b>
mov    -0x54(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
cltd
idivl  -0x14(%rbp)
mov    %edx,-0x5c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x5c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x58(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  0x8(%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x5c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x10(%rbp),%rax
movslq -0x58(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x68(%rbp),%xmm1
subsd  -0x70(%rbp),%xmm1
movsd  0xd53(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  %xmm0,(%rax)
movsd  -0x78(%rbp),%xmm1
subsd  -0x80(%rbp),%xmm1
movsd  0xd2d(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  %xmm0,(%rax)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11f4 <LMLE+0x94>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x2,%edx
call   1040 <MatrixInver@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    $0x2,%r8d
mov    %r8d,%edx
call   1070 <MatrixMulti@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x2,%esi
call   1030 <MatrixOpp@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x14(%rbp),%r8d
mov    $0x2,%ecx
mov    %ecx,%edx
call   1070 <MatrixMulti@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    $0x2,%edx
mov    $0x1,%r8d
call   1070 <MatrixMulti@plt>
mov    %rax,-0x50(%rbp)
mov    $0x10,%edi
call   1050 <malloc@plt>
mov    %rax,-0x98(%rbp)
mov    -0x50(%rbp),%rax
mov    (%rax),%rax
movsd  (%rax),%xmm0
mov    -0x98(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x50(%rbp),%rax
mov    0x8(%rax),%rax
movsd  (%rax),%xmm0
mov    -0x98(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1060 <zerosfree@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x28(%rbp),%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x30(%rbp),%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
movq   $0x0,-0x30(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
movq   $0x0,-0x38(%rbp)
mov    -0x40(%rbp),%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
movq   $0x0,-0x40(%rbp)
mov    -0x48(%rbp),%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
movq   $0x0,-0x48(%rbp)
mov    -0x50(%rbp),%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
movq   $0x0,-0x50(%rbp)
mov    -0x98(%rbp),%rax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LMLE>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r14d
mov    %rsi,%r13
mov    %rdi,%rbx
mov    %edx,%edi
mov    $0x2,%esi
call   1080 <zeros@plt>
mov    %rax,%r12
mov    $0x2,%edi
mov    $0x2,%esi
call   1080 <zeros@plt>
mov    $0x2,%edi
mov    $0x2,%esi
call   1080 <zeros@plt>
mov    $0x2,%edi
mov    %r14d,%esi
call   1080 <zeros@plt>
mov    $0x2,%edi
mov    %r14d,%esi
call   1080 <zeros@plt>
mov    $0x1,%ebp
mov    %r14d,%edi
mov    $0x1,%esi
call   1080 <zeros@plt>
mov    %rax,%r15
mov    $0x2,%edi
mov    $0x1,%esi
call   1080 <zeros@plt>
test   %r14d,%r14d
jle    128c <LMLE+0x12c>
mov    %r14d,%eax
lea    -0x8(,%rax,8),%rcx
ff
shl    $0x3,%rax
xor    %r8d,%r8d
xor    %esi,%esi
nop
cmp    %rsi,%rcx
mov    %ebp,%edi
cmove  %r8d,%edi
lea    (%rdi,%rdi,1),%edx
movupd (%rbx,%rdx,8),%xmm0
movupd (%rbx,%rsi,2),%xmm1
movsd  0x0(%r13,%rdi,8),%xmm2
movsd  0x0(%r13,%rsi,1),%xmm3
mov    (%r12,%rsi,1),%rdx
movapd %xmm0,%xmm4
subpd  %xmm1,%xmm4
addpd  %xmm4,%xmm4
movupd %xmm4,(%rdx)
mulsd  %xmm2,%xmm2
mulsd  %xmm3,%xmm3
subsd  %xmm2,%xmm3
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm3
subsd  %xmm3,%xmm2
unpckhpd %xmm0,%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
unpckhpd %xmm1,%xmm1
mulsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    (%r15,%rsi,1),%rdx
movsd  %xmm0,(%rdx)
add    $0x8,%rsi
add    $0x1,%ebp
cmp    %rsi,%rax
jne    1200 <LMLE+0xa0>
mov    %r12,%rdi
mov    %r14d,%esi
mov    $0x2,%edx
call   1040 <MatrixInver@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rax,0x10(%rsp)
mov    %r12,%rsi
mov    $0x2,%edx
mov    %r14d,%ecx
mov    $0x2,%r8d
call   1070 <MatrixMulti@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
mov    $0x2,%esi
call   1030 <MatrixOpp@plt>
mov    %rax,(%rsp)
mov    %rax,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
mov    $0x2,%ecx
mov    %r14d,%r8d
call   1070 <MatrixMulti@plt>
mov    %rax,%r13
mov    %rax,%rdi
mov    %r15,%rsi
mov    $0x2,%edx
mov    %r14d,%ecx
mov    $0x1,%r8d
call   1070 <MatrixMulti@plt>
mov    %rax,%rbx
mov    $0x10,%edi
call   1050 <malloc@plt>
mov    %rax,%rbp
mov    (%rbx),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,0x0(%rbp)
mov    0x8(%rbx),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,0x8(%rbp)
mov    %r12,%rdi
mov    %r14d,%esi
call   1060 <zerosfree@plt>
mov    0x8(%rsp),%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
mov    (%rsp),%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
mov    %r13,%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
mov    0x10(%rsp),%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
mov    %r15,%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1060 <zerosfree@plt>
mov    %rbp,%rax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define double* @LMLE(double* nocapture %0, double* nocapture %1, i32 %2) {
%4 = tail call double** @zeros(i32 %2, i32 2)
%5 = tail call double** @zeros(i32 2, i32 2)
%6 = tail call double** @zeros(i32 2, i32 2)
%7 = tail call double** @zeros(i32 2, i32 %2)
%8 = tail call double** @zeros(i32 2, i32 %2)
%9 = tail call double** @zeros(i32 %2, i32 1)
%10 = tail call double** @zeros(i32 2, i32 1)
%11 = icmp sgt i32 %2, 0
br i1 %11, label %12, label %55
12: ; preds = %3
%13 = zext i32 %2 to i64
br label %14
14: ; preds = %12, %14
%15 = phi i64 [ 0, %12 ], [ %16, %14 ]
%16 = add nuw nsw i64 %15, 1
%17 = icmp eq i64 %16, %13
%18 = trunc i64 %16 to i32
%19 = select i1 %17, i32 0, i32 %18
%20 = shl nuw nsw i32 %19, 1
%21 = zext i32 %20 to i64
%22 = getelementptr inbounds double, double* %0, i64 %21
%23 = shl nuw nsw i64 %15, 1
%24 = getelementptr inbounds double, double* %0, i64 %23
%25 = bitcast double* %22 to <2 x double>*
%26 = load <2 x double>, <2 x double>* %25
%27 = bitcast double* %24 to <2 x double>*
%28 = load <2 x double>, <2 x double>* %27
%29 = zext i32 %19 to i64
%30 = getelementptr inbounds double, double* %1, i64 %29
%31 = load double, double* %30
%32 = getelementptr inbounds double, double* %1, i64 %15
%33 = load double, double* %32
%34 = getelementptr inbounds double*, double** %4, i64 %15
%35 = bitcast double** %34 to <2 x double>**
%36 = load <2 x double>*, <2 x double>** %35
%37 = fsub <2 x double> %26, %28
%38 = fmul <2 x double> %37, <double 2.000000e+00, double 2.000000e+00>
store <2 x double> %38, <2 x double>* %36
%39 = fneg double %31
%40 = fmul double %31, %39
%41 = tail call double @llvm.fmuladd.f64(double %33, double %33, double %40)
%42 = extractelement <2 x double> %26, i64 0
%43 = tail call double @llvm.fmuladd.f64(double %42, double %42, double %41)
%44 = extractelement <2 x double> %28, i64 0
%45 = fneg double %44
%46 = tail call double @llvm.fmuladd.f64(double %45, double %44, double %43)
%47 = extractelement <2 x double> %26, i64 1
%48 = tail call double @llvm.fmuladd.f64(double %47, double %47, double %46)
%49 = extractelement <2 x double> %28, i64 1
%50 = fneg double %49
%51 = tail call double @llvm.fmuladd.f64(double %50, double %49, double %48)
%52 = getelementptr inbounds double*, double** %9, i64 %15
%53 = load double*, double** %52
store double %51, double* %53
%54 = icmp eq i64 %16, %13
br i1 %54, label %55, label %14
55: ; preds = %14, %3
%56 = tail call double** @MatrixInver(double** %4, i32 %2, i32 2)
%57 = tail call double** @MatrixMulti(double** %56, double** %4, i32 2, i32 %2, i32 2)
%58 = tail call double** @MatrixOpp(double** %57, i32 2)
%59 = tail call double** @MatrixMulti(double** %58, double** %56, i32 2, i32 2, i32 %2)
%60 = tail call double** @MatrixMulti(double** %59, double** %9, i32 2, i32 %2, i32 1)
%61 = tail call i64 @malloc(i32 16)
%62 = inttoptr i64 %61 to double*
%63 = load double*, double** %60
%64 = load double, double* %63
store double %64, double* %62
%65 = getelementptr inbounds double*, double** %60, i64 1
%66 = load double*, double** %65
%67 = load double, double* %66
%68 = getelementptr inbounds double, double* %62, i64 1
store double %67, double* %68
%69 = tail call i32 @zerosfree(double** %4, i32 %2)
%70 = tail call i32 @zerosfree(double** %57, i32 2)
%71 = tail call i32 @zerosfree(double** %58, i32 2)
%72 = tail call i32 @zerosfree(double** %59, i32 2)
%73 = tail call i32 @zerosfree(double** %56, i32 2)
%74 = tail call i32 @zerosfree(double** %9, i32 2)
%75 = tail call i32 @zerosfree(double** %60, i32 2)
ret double* %62
}