#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*/ matinv(double *, int, int, double *);
int QtoPi(double **Q, double *pi, int n) {
  int i, j;
  double T[20];
  for (i = 0; i < n + 1; i++)
    T[i] = 1;
  for (i = 1; i < n; i++) {
    for (j = 0; j < n; j++) {
      T[i * (n + 1) + j] = Q[j][i];
    }
    T[i * (n + 1) + n] = 0.;
  }
  matinv(T, n, n + 1, pi);
  for (i = 0; i < n; i++) {
    pi[i] = T[i * (n + 1) + n];
  }
  return (0);
}


x86 assembly (clang, -O0):
<QtoPi>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1161 <QtoPi+0x51>
movslq -0x18(%rbp),%rax
movsd  0xeb6(%rip),%xmm0
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112d <QtoPi+0x1d>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ef <QtoPi+0xdf>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11c4 <QtoPi+0xb4>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
add    -0x1c(%rbp),%eax
cltq
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    117b <QtoPi+0x6b>
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
add    -0x14(%rbp),%eax
cltq
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp,%rax,8)
ff ff
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1168 <QtoPi+0x58>
lea    -0xc0(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
mov    -0x10(%rbp),%rcx
call   1030 <matinv@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1250 <QtoPi+0x140>
mov    -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
imul   %ecx,%eax
add    -0x14(%rbp),%eax
cltq
movsd  -0xc0(%rbp,%rax,8),%xmm0
ff ff
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    120f <QtoPi+0xff>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<QtoPi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rsi,%r9
lea    0x1(%rdx),%r10d
test   %edx,%edx
js     1141 <QtoPi+0x31>
mov    %r10d,%eax
cmp    $0x4,%r10d
mov    %r9,0x18(%rsp)
jae    1158 <QtoPi+0x48>
xor    %ecx,%ecx
jmp    1247 <QtoPi+0x137>
lea    0x20(%rsp),%rdi
mov    %edx,%esi
mov    %r10d,%edx
mov    %r9,%rcx
call   1030 <matinv@plt>
jmp    1465 <QtoPi+0x355>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rbp
mov    %rbp,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%r8d
and    $0x7,%r8d
cmp    $0x1c,%rbp
jae    1180 <QtoPi+0x70>
xor    %ebx,%ebx
jmp    1208 <QtoPi+0xf8>
and    $0xfffffffffffffff8,%rsi
xor    %ebx,%ebx
movaps 0xe73(%rip),%xmm0
nopl   (%rax)
movaps %xmm0,0x20(%rsp,%rbx,8)
movaps %xmm0,0x30(%rsp,%rbx,8)
movaps %xmm0,0x40(%rsp,%rbx,8)
movaps %xmm0,0x50(%rsp,%rbx,8)
movaps %xmm0,0x60(%rsp,%rbx,8)
movaps %xmm0,0x70(%rsp,%rbx,8)
movaps %xmm0,0x80(%rsp,%rbx,8)
movaps %xmm0,0x90(%rsp,%rbx,8)
movaps %xmm0,0xa0(%rsp,%rbx,8)
movaps %xmm0,0xb0(%rsp,%rbx,8)
movaps %xmm0,0xc0(%rsp,%rbx,8)
movaps %xmm0,0xd0(%rsp,%rbx,8)
movaps %xmm0,0xe0(%rsp,%rbx,8)
movaps %xmm0,0xf0(%rsp,%rbx,8)
movaps %xmm0,0x100(%rsp,%rbx,8)
movaps %xmm0,0x110(%rsp,%rbx,8)
add    $0x20,%rbx
add    $0xfffffffffffffff8,%rsi
jne    1190 <QtoPi+0x80>
test   %r8,%r8
je     1242 <QtoPi+0x132>
lea    (%rsp,%rbx,8),%rsi
add    $0x30,%rsi
shl    $0x5,%r8
xor    %ebp,%ebp
movaps 0xdde(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movaps %xmm0,-0x10(%rsi,%rbp,1)
movaps %xmm0,(%rsi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%r8
jne    1230 <QtoPi+0x120>
cmp    %rax,%rcx
je     126e <QtoPi+0x15e>
movabs $0x3ff0000000000000,%rsi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rsi,0x20(%rsp,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1260 <QtoPi+0x150>
mov    %r10d,0xc(%rsp)
movslq %r10d,%r12
mov    %edx,%r13d
mov    %rdx,0x10(%rsp)
cmp    $0x2,%edx
jl     137e <QtoPi+0x26e>
lea    -0x1(%r13),%rdx
mov    %r13d,%ecx
and    $0x3,%ecx
mov    %r13d,%r11d
and    $0xfffffffc,%r11d
lea    (%rsp,%r12,8),%rbx
add    $0x38,%rbx
lea    0x0(,%r12,8),%r9
mov    $0x1,%eax
mov    %r12,%r10
jmp    12df <QtoPi+0x1cf>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %r13,%r8
movq   $0x0,0x20(%rsp,%r8,8)
add    $0x1,%rax
add    %r9,%rbx
add    %r12,%r10
cmp    %r13,%rax
je     137e <QtoPi+0x26e>
xor    %esi,%esi
cmp    $0x3,%rdx
jb     133b <QtoPi+0x22b>
nopw   0x0(%rax,%rax,1)
mov    (%rdi,%rsi,8),%rbp
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x18(%rbx,%rsi,8)
mov    0x8(%rdi,%rsi,8),%rbp
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x10(%rbx,%rsi,8)
mov    0x10(%rdi,%rsi,8),%rbp
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x8(%rbx,%rsi,8)
mov    0x18(%rdi,%rsi,8),%rbp
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,(%rbx,%rsi,8)
add    $0x4,%rsi
cmp    %rsi,%r11
jne    12f0 <QtoPi+0x1e0>
mov    %rax,%r8
imul   %r12,%r8
test   %rcx,%rcx
je     12c0 <QtoPi+0x1b0>
lea    (%rsi,%r10,1),%rbp
lea    (%rsp,%rbp,8),%r14
add    $0x20,%r14
lea    (%rdi,%rsi,8),%rsi
xor    %r15d,%r15d
xchg   %ax,%ax
mov    (%rsi,%r15,8),%rbp
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,(%r14,%r15,8)
add    $0x1,%r15
cmp    %r15,%rcx
jne    1360 <QtoPi+0x250>
jmp    12c0 <QtoPi+0x1b0>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    0x10(%rsp),%r14
mov    %r14d,%esi
mov    0xc(%rsp),%edx
mov    0x18(%rsp),%rbp
mov    %rbp,%rcx
call   1030 <matinv@plt>
test   %r14d,%r14d
jle    1465 <QtoPi+0x355>
lea    -0x1(%r13),%rax
mov    %r13d,%r8d
and    $0x3,%r8d
cmp    $0x3,%rax
jae    13bd <QtoPi+0x2ad>
xor    %ecx,%ecx
jmp    1429 <QtoPi+0x319>
mov    %r13d,%r9d
and    $0xfffffffc,%r9d
mov    %r12,%rax
shl    $0x4,%rax
lea    0x0(,%r13,8),%rsi
lea    (%rax,%r13,8),%r10
mov    %r12,%rax
shl    $0x5,%rax
lea    (%r12,%r13,1),%rdx
lea    (%r12,%r12,2),%rcx
lea    (%rsi,%rcx,8),%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsd  (%rbx,%rsi,1),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,8)
movsd  (%rbx,%rdx,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rcx,8)
movsd  (%rbx,%r10,1),%xmm0
movsd  %xmm0,0x10(%rbp,%rcx,8)
movsd  (%rbx,%rdi,1),%xmm0
movsd  %xmm0,0x18(%rbp,%rcx,8)
add    $0x4,%rcx
add    %rax,%rbx
cmp    %rcx,%r9
jne    13f0 <QtoPi+0x2e0>
test   %r8,%r8
je     1465 <QtoPi+0x355>
lea    0x0(,%rcx,8),%rax
add    %rbp,%rax
imul   %r12,%rcx
add    %r13,%rcx
lea    (%rsp,%rcx,8),%rcx
add    $0x20,%rcx
shl    $0x3,%r12
xor    %edx,%edx
xchg   %ax,%ax
movsd  (%rcx),%xmm0
movsd  %xmm0,(%rax,%rdx,8)
add    $0x1,%rdx
add    %r12,%rcx
cmp    %rdx,%r8
jne    1450 <QtoPi+0x340>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @QtoPi(double** %0, double* %1, i32 %2) {
%4 = alloca double**
%5 = alloca double*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [20 x double]
store double** %0, double*** %4
store double* %1, double** %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %10
10: ; preds = %19, %3
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = add nsw i32 %12, 1
%14 = icmp slt i32 %11, %13
br i1 %14, label %15, label %22
15: ; preds = %10
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [20 x double], [20 x double]* %9, i64 0, i64 %17
store double 1.000000e+00, double* %18
br label %19
19: ; preds = %15
%20 = load i32, i32* %7
%21 = add nsw i32 %20, 1
store i32 %21, i32* %7
br label %10
22: ; preds = %10
store i32 1, i32* %7
br label %23
23: ; preds = %62, %22
%24 = load i32, i32* %7
%25 = load i32, i32* %6
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %65
27: ; preds = %23
store i32 0, i32* %8
br label %28
28: ; preds = %50, %27
%29 = load i32, i32* %8
%30 = load i32, i32* %6
%31 = icmp slt i32 %29, %30
br i1 %31, label %32, label %53
32: ; preds = %28
%33 = load double**, double*** %4
%34 = load i32, i32* %8
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds double*, double** %33, i64 %35
%37 = load double*, double** %36
%38 = load i32, i32* %7
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds double, double* %37, i64 %39
%41 = load double, double* %40
%42 = load i32, i32* %7
%43 = load i32, i32* %6
%44 = add nsw i32 %43, 1
%45 = mul nsw i32 %42, %44
%46 = load i32, i32* %8
%47 = add nsw i32 %45, %46
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [20 x double], [20 x double]* %9, i64 0, i64 %48
store double %41, double* %49
br label %50
50: ; preds = %32
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
store i32 %52, i32* %8
br label %28
53: ; preds = %28
%54 = load i32, i32* %7
%55 = load i32, i32* %6
%56 = add nsw i32 %55, 1
%57 = mul nsw i32 %54, %56
%58 = load i32, i32* %6
%59 = add nsw i32 %57, %58
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [20 x double], [20 x double]* %9, i64 0, i64 %60
store double 0.000000e+00, double* %61
br label %62
62: ; preds = %53
%63 = load i32, i32* %7
%64 = add nsw i32 %63, 1
store i32 %64, i32* %7
br label %23
65: ; preds = %23
%66 = getelementptr inbounds [20 x double], [20 x double]* %9, i64 0, i64 0
%67 = load i32, i32* %6
%68 = load i32, i32* %6
%69 = add nsw i32 %68, 1
%70 = load double*, double** %5
%71 = call i32 @matinv(double* %66, i32 %67, i32 %69, double* %70)
store i32 0, i32* %7
br label %72
72: ; preds = %90, %65
%73 = load i32, i32* %7
%74 = load i32, i32* %6
%75 = icmp slt i32 %73, %74
br i1 %75, label %76, label %93
76: ; preds = %72
%77 = load i32, i32* %7
%78 = load i32, i32* %6
%79 = add nsw i32 %78, 1
%80 = mul nsw i32 %77, %79
%81 = load i32, i32* %6
%82 = add nsw i32 %80, %81
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds [20 x double], [20 x double]* %9, i64 0, i64 %83
%85 = load double, double* %84
%86 = load double*, double** %5
%87 = load i32, i32* %7
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds double, double* %86, i64 %88
store double %85, double* %89
br label %90
90: ; preds = %76
%91 = load i32, i32* %7
%92 = add nsw i32 %91, 1
store i32 %92, i32* %7
br label %72
93: ; preds = %72
ret i32 0
}

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