#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 */
int /*<<< orphan*/ free(double *);
double *mat(int, int);
int /*<<< orphan*/ matcpy(double *, double const *, int, int);
int matinv(double *, int);
int /*<<< orphan*/ matmul(char *, int, int, int, double, double *,
                          double const *, double, double *);
extern int smoother(const double *xf, const double *Qf, const double *xb,
                    const double *Qb, int n, double *xs, double *Qs) {
  double *invQf = mat(n, n), *invQb = mat(n, n), *xx = mat(n, 1);
  int i, info = -1;
  if (!invQf || !invQb || !xx) {
    return info;
  }
  matcpy(invQf, Qf, n, n);
  matcpy(invQb, Qb, n, n);
  if (!matinv(invQf, n) && !matinv(invQb, n)) {
    for (i = 0; i < n * n; ++i) {
      Qs[i] = invQf[i] + invQb[i];
    }
    if (!(info = matinv(Qs, n))) {
      matmul("NN", n, 1, n, 1.0, invQf, xf, 0.0, xx);
      matmul("NN", n, 1, n, 1.0, invQb, xb, 1.0, xx);
      matmul("NN", n, 1, n, 1.0, Qs, xx, 0.0, xs);
    }
  }
  free(invQf);
  free(invQb);
  free(xx);
  return info;
}


x86 assembly (clang, -O0):
<smoother>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1040 <mat@plt>
mov    %rax,-0x40(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x2c(%rbp),%esi
call   1040 <mat@plt>
mov    %rax,-0x48(%rbp)
mov    -0x2c(%rbp),%edi
mov    $0x1,%esi
call   1040 <mat@plt>
mov    %rax,-0x50(%rbp)
movl   $0xffffffff,-0x58(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     11cb <smoother+0x7b>
cmpq   $0x0,-0x48(%rbp)
je     11cb <smoother+0x7b>
cmpq   $0x0,-0x50(%rbp)
jne    11d6 <smoother+0x86>
mov    -0x58(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1348 <smoother+0x1f8>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x2c(%rbp),%ecx
call   1070 <matcpy@plt>
mov    -0x48(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%edx
mov    -0x2c(%rbp),%ecx
call   1070 <matcpy@plt>
mov    -0x40(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1050 <matinv@plt>
cmp    $0x0,%eax
jne    1327 <smoother+0x1d7>
mov    -0x48(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1050 <matinv@plt>
cmp    $0x0,%eax
jne    1327 <smoother+0x1d7>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    -0x2c(%rbp),%ecx
imul   -0x2c(%rbp),%ecx
cmp    %ecx,%eax
jge    1274 <smoother+0x124>
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x48(%rbp),%rax
movslq -0x54(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
mov    0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    122d <smoother+0xdd>
mov    0x10(%rbp),%rdi
mov    -0x2c(%rbp),%esi
call   1050 <matinv@plt>
mov    %eax,-0x58(%rbp)
cmp    $0x0,%eax
jne    1322 <smoother+0x1d2>
mov    -0x2c(%rbp),%esi
mov    -0x2c(%rbp),%ecx
mov    -0x40(%rbp),%r8
mov    -0x10(%rbp),%r9
mov    -0x50(%rbp),%rax
lea    0xd63(%rip),%rdi
mov    $0x1,%edx
movsd  0xd4e(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    %rax,(%rsp)
call   1060 <matmul@plt>
mov    -0x2c(%rbp),%esi
mov    -0x2c(%rbp),%ecx
mov    -0x48(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x50(%rbp),%rax
lea    0xd31(%rip),%rdi
mov    $0x1,%edx
movsd  0xd1c(%rip),%xmm1
movaps %xmm1,%xmm0
mov    %rax,(%rsp)
call   1060 <matmul@plt>
mov    -0x2c(%rbp),%esi
mov    -0x2c(%rbp),%ecx
mov    0x10(%rbp),%r8
mov    -0x50(%rbp),%r9
mov    -0x38(%rbp),%rax
lea    0xcff(%rip),%rdi
mov    $0x1,%edx
movsd  0xcea(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    %rax,(%rsp)
call   1060 <matmul@plt>
jmp    1327 <smoother+0x1d7>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smoother>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,0x20(%rsp)
mov    %r8d,%ebx
mov    %rcx,%rbp
mov    %rdx,0x18(%rsp)
mov    %rsi,%r12
mov    %rdi,0x10(%rsp)
mov    %r8d,%edi
mov    %r8d,%esi
call   1040 <mat@plt>
mov    %rax,%r14
mov    %ebx,%edi
mov    %ebx,%esi
call   1040 <mat@plt>
mov    %rax,%r15
mov    %ebx,%edi
mov    $0x1,%esi
call   1040 <mat@plt>
mov    $0xffffffff,%r13d
test   %r14,%r14
je     1495 <smoother+0x345>
test   %r15,%r15
je     1495 <smoother+0x345>
test   %rax,%rax
je     1495 <smoother+0x345>
mov    %rax,0x8(%rsp)
mov    %r14,%rdi
mov    %r12,%rsi
mov    %ebx,%edx
mov    %ebx,%ecx
call   1070 <matcpy@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %ebx,%edx
mov    %ebx,%ecx
call   1070 <matcpy@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <matinv@plt>
mov    $0xffffffff,%r13d
test   %eax,%eax
jne    147b <smoother+0x32b>
mov    %r15,%rdi
mov    %ebx,%esi
call   1050 <matinv@plt>
test   %eax,%eax
jne    147b <smoother+0x32b>
mov    0x60(%rsp),%rbp
mov    %ebx,%ecx
imul   %ebx,%ecx
test   %ecx,%ecx
je     13d9 <smoother+0x289>
mov    %ecx,%eax
cmp    $0x4,%ecx
jae    12cc <smoother+0x17c>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
mov    %rax,%rsi
and    $0x3,%rsi
je     125c <smoother+0x10c>
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rcx,8),%xmm0
addsd  (%r15,%rcx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    1240 <smoother+0xf0>
cmp    $0x3,%rdx
jb     13d9 <smoother+0x289>
cs nopw 0x0(%rax,%rax,1)
movsd  (%r14,%rcx,8),%xmm0
addsd  (%r15,%rcx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,8)
movsd  0x8(%r14,%rcx,8),%xmm0
addsd  0x8(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rcx,8)
movsd  0x10(%r14,%rcx,8),%xmm0
addsd  0x10(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x10(%rbp,%rcx,8)
movsd  0x18(%r14,%rcx,8),%xmm0
addsd  0x18(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x18(%rbp,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    1270 <smoother+0x120>
jmp    13d9 <smoother+0x289>
lea    0x0(,%rax,8),%rcx
add    %rbp,%rcx
lea    (%r14,%rax,8),%rdx
lea    (%r15,%rax,8),%rsi
cmp    %rbp,%rdx
seta   %dil
cmp    %rcx,%r14
setb   %r8b
cmp    %rbp,%rsi
seta   %dl
cmp    %rcx,%r15
setb   %sil
xor    %ecx,%ecx
test   %r8b,%dil
jne    1229 <smoother+0xd9>
and    %sil,%dl
jne    1229 <smoother+0xd9>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdx
mov    %rdx,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
test   %rdx,%rdx
je     139a <smoother+0x24a>
mov    %rsi,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %edx,%edx
movupd (%r14,%rdx,8),%xmm0
movupd 0x10(%r14,%rdx,8),%xmm1
movupd (%r15,%rdx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%r15,%rdx,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,0x0(%rbp,%rdx,8)
movupd %xmm0,0x10(%rbp,%rdx,8)
movupd 0x20(%r14,%rdx,8),%xmm0
movupd 0x30(%r14,%rdx,8),%xmm1
movupd 0x20(%r15,%rdx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x30(%r15,%rdx,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,0x20(%rbp,%rdx,8)
movupd %xmm0,0x30(%rbp,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rdi
jne    1330 <smoother+0x1e0>
jmp    139c <smoother+0x24c>
xor    %edx,%edx
test   $0x1,%sil
je     13d0 <smoother+0x280>
movupd (%r14,%rdx,8),%xmm0
movupd 0x10(%r14,%rdx,8),%xmm1
movupd (%r15,%rdx,8),%xmm2
addpd  %xmm0,%xmm2
movupd 0x10(%r15,%rdx,8),%xmm0
addpd  %xmm1,%xmm0
movupd %xmm2,0x0(%rbp,%rdx,8)
movupd %xmm0,0x10(%rbp,%rdx,8)
cmp    %rax,%rcx
jne    1229 <smoother+0xd9>
mov    %rbp,%rdi
mov    %ebx,%esi
call   1050 <matinv@plt>
mov    %eax,%r13d
test   %eax,%eax
jne    147b <smoother+0x32b>
mov    0x8(%rsp),%r13
mov    %r13,(%rsp)
lea    0xc0a(%rip),%r12
movsd  0xbfa(%rip),%xmm0
xorpd  %xmm1,%xmm1
mov    %r12,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
mov    %ebx,%ecx
mov    %r14,%r8
mov    0x10(%rsp),%r9
call   1060 <matmul@plt>
mov    %r13,(%rsp)
mov    %r12,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
mov    %ebx,%ecx
movsd  0xbc5(%rip),%xmm0
mov    %r15,%r8
mov    0x18(%rsp),%r9
movapd %xmm0,%xmm1
call   1060 <matmul@plt>
mov    0x20(%rsp),%rax
mov    %rax,(%rsp)
xorpd  %xmm1,%xmm1
mov    %r12,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
mov    %ebx,%ecx
movsd  0xb93(%rip),%xmm0
mov    %rbp,%r8
mov    %r13,%r9
call   1060 <matmul@plt>
xor    %r13d,%r13d
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %r13d,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"NN\00"
define i32 @smoother(double* %0, double* %1, double* %2, double* %3, i32 %4, double* %5, double* %6) {
%8 = alloca i32
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca i32
%20 = alloca i32
store double* %0, double** %9
store double* %1, double** %10
store double* %2, double** %11
store double* %3, double** %12
store i32 %4, i32* %13
store double* %5, double** %14
store double* %6, double** %15
%21 = load i32, i32* %13
%22 = load i32, i32* %13
%23 = call double* @mat(i32 %21, i32 %22)
store double* %23, double** %16
%24 = load i32, i32* %13
%25 = load i32, i32* %13
%26 = call double* @mat(i32 %24, i32 %25)
store double* %26, double** %17
%27 = load i32, i32* %13
%28 = call double* @mat(i32 %27, i32 1)
store double* %28, double** %18
store i32 -1, i32* %20
%29 = load double*, double** %16
%30 = icmp ne double* %29, null
br i1 %30, label %31, label %37
31: ; preds = %7
%32 = load double*, double** %17
%33 = icmp ne double* %32, null
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load double*, double** %18
%36 = icmp ne double* %35, null
br i1 %36, label %39, label %37
37: ; preds = %34, %31, %7
%38 = load i32, i32* %20
store i32 %38, i32* %8
br label %118
39: ; preds = %34
%40 = load double*, double** %16
%41 = load double*, double** %10
%42 = load i32, i32* %13
%43 = load i32, i32* %13
%44 = call i32 @matcpy(double* %40, double* %41, i32 %42, i32 %43)
%45 = load double*, double** %17
%46 = load double*, double** %12
%47 = load i32, i32* %13
%48 = load i32, i32* %13
%49 = call i32 @matcpy(double* %45, double* %46, i32 %47, i32 %48)
%50 = load double*, double** %16
%51 = load i32, i32* %13
%52 = call i32 @matinv(double* %50, i32 %51)
%53 = icmp ne i32 %52, 0
br i1 %53, label %110, label %54
54: ; preds = %39
%55 = load double*, double** %17
%56 = load i32, i32* %13
%57 = call i32 @matinv(double* %55, i32 %56)
%58 = icmp ne i32 %57, 0
br i1 %58, label %110, label %59
59: ; preds = %54
store i32 0, i32* %19
br label %60
60: ; preds = %82, %59
%61 = load i32, i32* %19
%62 = load i32, i32* %13
%63 = load i32, i32* %13
%64 = mul nsw i32 %62, %63
%65 = icmp slt i32 %61, %64
br i1 %65, label %66, label %85
66: ; preds = %60
%67 = load double*, double** %16
%68 = load i32, i32* %19
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %67, i64 %69
%71 = load double, double* %70
%72 = load double*, double** %17
%73 = load i32, i32* %19
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
%76 = load double, double* %75
%77 = fadd double %71, %76
%78 = load double*, double** %15
%79 = load i32, i32* %19
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds double, double* %78, i64 %80
store double %77, double* %81
br label %82
82: ; preds = %66
%83 = load i32, i32* %19
%84 = add nsw i32 %83, 1
store i32 %84, i32* %19
br label %60
85: ; preds = %60
%86 = load double*, double** %15
%87 = load i32, i32* %13
%88 = call i32 @matinv(double* %86, i32 %87)
store i32 %88, i32* %20
%89 = icmp ne i32 %88, 0
br i1 %89, label %109, label %90
90: ; preds = %85
%91 = load i32, i32* %13
%92 = load i32, i32* %13
%93 = load double*, double** %16
%94 = load double*, double** %9
%95 = load double*, double** %18
%96 = call i32 @matmul(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %91, i32 1, i32 %92, double 1.000000e+00, double* %93, double* %94, double 0.000000e+00, double* %95)
%97 = load i32, i32* %13
%98 = load i32, i32* %13
%99 = load double*, double** %17
%100 = load double*, double** %11
%101 = load double*, double** %18
%102 = call i32 @matmul(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %97, i32 1, i32 %98, double 1.000000e+00, double* %99, double* %100, double 1.000000e+00, double* %101)
%103 = load i32, i32* %13
%104 = load i32, i32* %13
%105 = load double*, double** %15
%106 = load double*, double** %18
%107 = load double*, double** %14
%108 = call i32 @matmul(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %103, i32 1, i32 %104, double 1.000000e+00, double* %105, double* %106, double 0.000000e+00, double* %107)
br label %109
109: ; preds = %90, %85
br label %110
110: ; preds = %109, %54, %39
%111 = load double*, double** %16
%112 = call i32 @free(double* %111)
%113 = load double*, double** %17
%114 = call i32 @free(double* %113)
%115 = load double*, double** %18
%116 = call i32 @free(double* %115)
%117 = load i32, i32* %20
store i32 %117, i32* %8
br label %118
118: ; preds = %110, %37
%119 = load i32, i32* %8
ret i32 %119
}

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