#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 *calloc(int, int);
double *gauss_eliminate(double **aug, int n) {
  int i, j, k;
  double c, sum = 0.0;
  double *res = calloc(n, sizeof(double));
  for (j = 0; j < n; j++) {
    for (i = 0; i < n; i++) {
      if (i > j) {
        c = aug[i][j] / aug[j][j];
        for (k = 0; k < n + 1; k++)
          aug[i][k] = aug[i][k] - c * aug[j][k];
      }
    }
  }
  res[n - 1] = aug[n - 1][n] / aug[n - 1][n - 1];
  for (i = n - 2; i >= 0; i--) {
    sum = 0;
    for (j = i; j < n; j++)
      sum = sum + aug[i][j] * res[j];
    res[i] = (aug[i][n] - sum) / aug[i][i];
  }
  return res;
}


x86 assembly (clang, -O0):
<gauss_eliminate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    124d <gauss_eliminate+0x13d>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    123a <gauss_eliminate+0x12a>
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1227 <gauss_eliminate+0x117>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    1222 <gauss_eliminate+0x112>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a0 <gauss_eliminate+0x90>
jmp    1227 <gauss_eliminate+0x117>
jmp    122c <gauss_eliminate+0x11c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1152 <gauss_eliminate+0x42>
jmp    123f <gauss_eliminate+0x12f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113f <gauss_eliminate+0x2f>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1351 <gauss_eliminate+0x241>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1307 <gauss_eliminate+0x1f7>
movsd  -0x28(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    12b9 <gauss_eliminate+0x1a9>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x28(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    12a1 <gauss_eliminate+0x191>
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss_eliminate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,%r14d
mov    %rdi,%r12
mov    %esi,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %r14d,%r13d
test   %r14d,%r14d
jle    1331 <gauss_eliminate+0x221>
lea    0x1(%r14),%edx
mov    %edx,%r11d
and    $0xfffffffc,%r11d
lea    -0x4(%r11),%r10
mov    %r10,0x10(%rsp)
shr    $0x2,%r10
add    $0x1,%r10
mov    %r10,%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x8(%rsp)
mov    %rdx,%r15
neg    %r15
xor    %r8d,%r8d
movapd 0xe8b(%rip),%xmm0
jmp    118d <gauss_eliminate+0x7d>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r8
cmp    %r13,%r8
je     1331 <gauss_eliminate+0x221>
xor    %edi,%edi
jmp    11a9 <gauss_eliminate+0x99>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdi
cmp    %r13,%rdi
je     1180 <gauss_eliminate+0x70>
cmp    %r8,%rdi
jbe    11a0 <gauss_eliminate+0x90>
mov    (%r12,%rdi,8),%rbx
mov    (%r12,%r8,8),%rcx
movsd  (%rbx,%r8,8),%xmm1
xorpd  %xmm0,%xmm1
divsd  (%rcx,%r8,8),%xmm1
cmp    $0x3,%r14d
jb     11de <gauss_eliminate+0xce>
lea    (%rcx,%rdx,8),%rsi
cmp    %rsi,%rbx
jae    1247 <gauss_eliminate+0x137>
lea    (%rbx,%rdx,8),%rsi
cmp    %rsi,%rcx
jae    1247 <gauss_eliminate+0x137>
xor    %esi,%esi
mov    %rsi,%rbp
test   $0x1,%dl
je     1202 <gauss_eliminate+0xf2>
movsd  (%rcx,%rsi,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%rbx,%rsi,8),%xmm2
movsd  %xmm2,(%rbx,%rsi,8)
mov    %rsi,%rbp
or     $0x1,%rbp
not    %rsi
cmp    %r15,%rsi
je     11a0 <gauss_eliminate+0x90>
nopw   0x0(%rax,%rax,1)
movsd  (%rcx,%rbp,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%rbx,%rbp,8),%xmm2
movsd  %xmm2,(%rbx,%rbp,8)
movsd  0x8(%rcx,%rbp,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x8(%rbx,%rbp,8),%xmm2
movsd  %xmm2,0x8(%rbx,%rbp,8)
add    $0x2,%rbp
cmp    %rbp,%rdx
jne    1210 <gauss_eliminate+0x100>
jmp    11a0 <gauss_eliminate+0x90>
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
cmpq   $0x0,0x10(%rsp)
je     1327 <gauss_eliminate+0x217>
mov    0x8(%rsp),%r9
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd (%rcx,%rbp,8),%xmm3
movupd 0x10(%rcx,%rbp,8),%xmm4
mulpd  %xmm2,%xmm3
movupd (%rbx,%rbp,8),%xmm5
addpd  %xmm3,%xmm5
movupd 0x10(%rbx,%rbp,8),%xmm3
movupd 0x20(%rbx,%rbp,8),%xmm6
movupd 0x30(%rbx,%rbp,8),%xmm7
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
movupd %xmm5,(%rbx,%rbp,8)
movupd %xmm4,0x10(%rbx,%rbp,8)
movupd 0x20(%rcx,%rbp,8),%xmm3
movupd 0x30(%rcx,%rbp,8),%xmm4
mulpd  %xmm2,%xmm3
addpd  %xmm6,%xmm3
mulpd  %xmm2,%xmm4
addpd  %xmm7,%xmm4
movupd %xmm3,0x20(%rbx,%rbp,8)
movupd %xmm4,0x30(%rbx,%rbp,8)
add    $0x8,%rbp
add    $0xfffffffffffffffe,%r9
jne    1270 <gauss_eliminate+0x160>
test   $0x1,%r10b
je     1316 <gauss_eliminate+0x206>
movupd (%rbx,%rbp,8),%xmm3
movupd 0x10(%rbx,%rbp,8),%xmm4
movupd (%rcx,%rbp,8),%xmm5
movupd 0x10(%rcx,%rbp,8),%xmm6
mulpd  %xmm2,%xmm5
addpd  %xmm3,%xmm5
mulpd  %xmm2,%xmm6
addpd  %xmm4,%xmm6
movupd %xmm5,(%rbx,%rbp,8)
movupd %xmm6,0x10(%rbx,%rbp,8)
mov    %r11,%rsi
cmp    %rdx,%r11
je     11a0 <gauss_eliminate+0x90>
jmp    11e0 <gauss_eliminate+0xd0>
xor    %ebp,%ebp
test   $0x1,%r10b
jne    12e5 <gauss_eliminate+0x1d5>
jmp    1316 <gauss_eliminate+0x206>
movslq %r14d,%r8
mov    -0x8(%r12,%r8,8),%rcx
movsd  (%rcx,%r8,8),%xmm0
divsd  -0x8(%rcx,%r8,8),%xmm0
movsd  %xmm0,-0x8(%rax,%r8,8)
cmp    $0x2,%r14d
jl     145c <gauss_eliminate+0x34c>
add    $0xfffffffe,%r14d
mov    %r14,%rcx
neg    %rcx
lea    (%rax,%r14,8),%rsi
xor    %r9d,%r9d
mov    $0x2,%dil
jmp    13a2 <gauss_eliminate+0x292>
nopl   (%rax)
movsd  (%rdx,%r8,8),%xmm1
subsd  %xmm0,%xmm1
divsd  (%rdx,%r14,8),%xmm1
movsd  %xmm1,(%rax,%r14,8)
lea    -0x1(%r14),%rdx
add    $0x1,%rcx
add    $0xfffffffffffffff8,%rsi
add    $0x1,%dil
test   %r14,%r14
mov    %rdx,%r14
jle    145c <gauss_eliminate+0x34c>
mov    %r9d,%ebp
movzbl %dil,%edi
and    $0x3,%edi
lea    0x1(%rbp),%r9d
mov    (%r12,%r14,8),%rdx
xorpd  %xmm0,%xmm0
cmp    %r8,%r14
jge    1370 <gauss_eliminate+0x260>
add    $0x2,%ebp
test   $0x3,%bpl
je     13f5 <gauss_eliminate+0x2e5>
lea    (%rdx,%r14,8),%rbp
xorpd  %xmm0,%xmm0
xor    %ebx,%ebx
movsd  0x0(%rbp,%rbx,8),%xmm1
mulsd  (%rsi,%rbx,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rbx
cmp    %ebx,%edi
jne    13d0 <gauss_eliminate+0x2c0>
sub    %rcx,%rbx
cmp    $0x3,%r9d
jae    1410 <gauss_eliminate+0x300>
jmp    1370 <gauss_eliminate+0x260>
xorpd  %xmm0,%xmm0
mov    %r14,%rbx
cmp    $0x3,%r9d
jb     1370 <gauss_eliminate+0x260>
cs nopw 0x0(%rax,%rax,1)
movsd  (%rdx,%rbx,8),%xmm1
movsd  0x8(%rdx,%rbx,8),%xmm2
mulsd  (%rax,%rbx,8),%xmm1
mulsd  0x8(%rax,%rbx,8),%xmm2
addsd  %xmm0,%xmm1
movsd  0x10(%rdx,%rbx,8),%xmm3
mulsd  0x10(%rax,%rbx,8),%xmm3
addsd  %xmm1,%xmm2
movsd  0x18(%rdx,%rbx,8),%xmm0
mulsd  0x18(%rax,%rbx,8),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
add    $0x4,%rbx
cmp    %ebx,%r13d
jne    1410 <gauss_eliminate+0x300>
jmp    1370 <gauss_eliminate+0x260>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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