#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 fabs(double);
int gauss_pivot(double **, int, double *, double *, int);
int /*<<< orphan*/ shError(char *, ...);
int /*<<< orphan*/ shFree(double *);
scalar_t__ shMalloc(int);
int gauss_matrix(double **matrix, int num, double *vector) {
  int i, j, k;
  double *biggest_val;
  double *solution_vector;
  double factor;
  double sum;
  biggest_val = (double *)shMalloc(num * sizeof(double));
  solution_vector = (double *)shMalloc(num * sizeof(double));
  for (i = 0; i < num; i++) {
    biggest_val[i] = fabs(matrix[i][0]);
    for (j = 1; j < num; j++) {
      if (fabs(matrix[i][j]) > biggest_val[i]) {
        biggest_val[i] = fabs(matrix[i][j]);
      }
    }
    if (biggest_val[i] == 0.0) {
      shError("gauss_matrix: biggest val in row %d is zero", i);
      shFree(biggest_val);
      shFree(solution_vector);
      return (1);
    }
  }
  for (i = 0; i < num - 1; i++) {
    if (gauss_pivot(matrix, num, vector, biggest_val, i) == 1) {
      shError("gauss_matrix: singular matrix");
      shFree(biggest_val);
      shFree(solution_vector);
      return (1);
    }
    if (fabs(matrix[i][i] / biggest_val[i]) < 1.0e-12) {
      shError("gauss_matrix: Y: row %d has tiny value %f / %f", i, matrix[i][i],
              biggest_val[i]);
      shFree(biggest_val);
      shFree(solution_vector);
      return (1);
    }
    for (j = i + 1; j < num; j++) {
      factor = matrix[j][i] / matrix[i][i];
      for (k = i + 1; k < num; k++) {
        matrix[j][k] -= factor * matrix[i][k];
      }
      vector[j] -= factor * vector[i];
    }
  }
  if (fabs(matrix[num - 1][num - 1] / biggest_val[num - 1]) < 1.0e-12) {
    shError("gauss_matrix: Z: row %d has tiny value %f / %f", num,
            matrix[num - 1][num - 1], biggest_val[num - 1]);
    shFree(biggest_val);
    shFree(solution_vector);
    return (1);
  }
  solution_vector[num - 1] = vector[num - 1] / matrix[num - 1][num - 1];
  for (i = num - 2; i >= 0; i--) {
    sum = 0.0;
    for (j = i + 1; j < num; j++) {
      sum += matrix[i][j] * solution_vector[j];
    }
    solution_vector[i] = (vector[i] - sum) / matrix[i][i];
  }
  for (i = 0; i < num; i++) {
    vector[i] = solution_vector[i];
  }
  shFree(solution_vector);
  shFree(biggest_val);
  return (0);
}


x86 assembly (clang, -O0):
<gauss_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <shMalloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <shMalloc@plt>
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    129c <gauss_matrix+0x15c>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsd  (%rax),%xmm0
movaps 0xe6d(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    123a <gauss_matrix+0xfa>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe2d(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1227 <gauss_matrix+0xe7>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xdfa(%rip),%xmm1
pand   %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    122c <gauss_matrix+0xec>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11bb <gauss_matrix+0x7b>
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1289 <gauss_matrix+0x149>
jp     1289 <gauss_matrix+0x149>
mov    -0x24(%rbp),%esi
lea    0xdbc(%rip),%rdi
mov    $0x0,%al
call   1030 <shError@plt>
mov    -0x38(%rbp),%rdi
call   1050 <shFree@plt>
mov    -0x40(%rbp),%rdi
call   1050 <shFree@plt>
movl   $0x1,-0x4(%rbp)
jmp    16a8 <gauss_matrix+0x568>
jmp    128e <gauss_matrix+0x14e>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1180 <gauss_matrix+0x40>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14af <gauss_matrix+0x36f>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x38(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1040 <gauss_pivot@plt>
cmp    $0x1,%eax
jne    1301 <gauss_matrix+0x1c1>
lea    0xd70(%rip),%rdi
mov    $0x0,%al
call   1030 <shError@plt>
mov    -0x38(%rbp),%rdi
call   1050 <shFree@plt>
mov    -0x40(%rbp),%rdi
call   1050 <shFree@plt>
movl   $0x1,-0x4(%rbp)
jmp    16a8 <gauss_matrix+0x568>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm1
movaps 0xce6(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xcca(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1391 <gauss_matrix+0x251>
mov    -0x24(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0xcfe(%rip),%rdi
mov    $0x2,%al
call   1030 <shError@plt>
mov    -0x38(%rbp),%rdi
call   1050 <shFree@plt>
mov    -0x40(%rbp),%rdi
call   1050 <shFree@plt>
movl   $0x1,-0x4(%rbp)
jmp    16a8 <gauss_matrix+0x568>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    149c <gauss_matrix+0x35c>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x24(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    144b <gauss_matrix+0x30b>
movsd  -0x48(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13de <gauss_matrix+0x29e>
movsd  -0x48(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movq   %xmm0,%rdx
movabs $0x8000000000000000,%rsi
xor    %rsi,%rdx
movq   %rdx,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    139a <gauss_matrix+0x25a>
jmp    14a1 <gauss_matrix+0x361>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12a3 <gauss_matrix+0x163>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x38(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm1
movaps 0xb29(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xb0d(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    155d <gauss_matrix+0x41d>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
lea    0xb61(%rip),%rdi
mov    $0x2,%al
call   1030 <shError@plt>
mov    -0x38(%rbp),%rdi
call   1050 <shFree@plt>
mov    -0x40(%rbp),%rdi
call   1050 <shFree@plt>
movl   $0x1,-0x4(%rbp)
jmp    16a8 <gauss_matrix+0x568>
mov    -0x20(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     1654 <gauss_matrix+0x514>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1612 <gauss_matrix+0x4d2>
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    15c4 <gauss_matrix+0x484>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x50(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x24(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x40(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    15a9 <gauss_matrix+0x469>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    168f <gauss_matrix+0x54f>
mov    -0x40(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    165b <gauss_matrix+0x51b>
mov    -0x40(%rbp),%rdi
call   1050 <shFree@plt>
mov    -0x38(%rbp),%rdi
call   1050 <shFree@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gauss_matrix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
mov    %rdx,0x8(%rsp)
mov    %esi,%ebx
mov    %rdi,0x10(%rsp)
lea    0x0(,%rbx,8),%ebp
mov    %ebp,%edi
call   1060 <shMalloc@plt>
mov    %rax,%r14
mov    %ebp,%edi
call   1060 <shMalloc@plt>
mov    %rbx,%r8
mov    %rax,%r13
test   %r8d,%r8d
jle    1277 <gauss_matrix+0x137>
mov    %r8d,%r12d
lea    -0x1(%r12),%r9
mov    %r9,%rax
and    $0xfffffffffffffffe,%rax
neg    %rax
xor    %esi,%esi
movapd 0xe60(%rip),%xmm3
xorpd  %xmm0,%xmm0
mov    0x8(%rsp),%rdx
mov    0x10(%rsp),%rdi
xchg   %ax,%ax
mov    (%rdi,%rsi,8),%rcx
movsd  (%rcx),%xmm1
andpd  %xmm3,%xmm1
movlpd %xmm1,(%r14,%rsi,8)
cmp    $0x1,%r8d
je     1200 <gauss_matrix+0xc0>
mov    $0x1,%ebp
cmp    $0x2,%r8d
jne    1220 <gauss_matrix+0xe0>
test   $0x1,%r9b
je     1200 <gauss_matrix+0xc0>
movsd  (%rcx,%rbp,8),%xmm2
andpd  %xmm3,%xmm2
ucomisd %xmm1,%xmm2
jbe    1200 <gauss_matrix+0xc0>
movsd  %xmm2,(%r14,%rsi,8)
movapd %xmm2,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
ucomisd %xmm0,%xmm1
jne    120c <gauss_matrix+0xcc>
jnp    128c <gauss_matrix+0x14c>
add    $0x1,%rsi
cmp    %r12,%rsi
jne    11b0 <gauss_matrix+0x70>
jmp    129f <gauss_matrix+0x15f>
nopw   0x0(%rax,%rax,1)
mov    $0x1,%ebp
jmp    1242 <gauss_matrix+0x102>
nopw   0x0(%rax,%rax,1)
lea    (%rax,%rbp,1),%rbx
add    $0x2,%rbx
add    $0x2,%rbp
cmp    $0x1,%rbx
je     11d3 <gauss_matrix+0x93>
movsd  (%rcx,%rbp,8),%xmm2
andpd  %xmm3,%xmm2
ucomisd %xmm1,%xmm2
jbe    125b <gauss_matrix+0x11b>
movsd  %xmm2,(%r14,%rsi,8)
movapd %xmm2,%xmm1
movsd  0x8(%rcx,%rbp,8),%xmm2
andpd  %xmm3,%xmm2
ucomisd %xmm1,%xmm2
jbe    1230 <gauss_matrix+0xf0>
movsd  %xmm2,(%r14,%rsi,8)
movapd %xmm2,%xmm1
jmp    1230 <gauss_matrix+0xf0>
lea    -0x1(%r8),%ecx
xor    %esi,%esi
mov    0x8(%rsp),%rdx
mov    0x10(%rsp),%rdi
jmp    1666 <gauss_matrix+0x526>
lea    0xd95(%rip),%rdi
xor    %eax,%eax
call   1030 <shError@plt>
jmp    16a7 <gauss_matrix+0x567>
lea    -0x1(%r8),%ecx
cmp    $0x2,%r8d
setge  %al
jl     161e <gauss_matrix+0x4de>
mov    %eax,0x2c(%rsp)
mov    %r9,0x38(%rsp)
mov    %r13,0x18(%rsp)
mov    %ecx,0x28(%rsp)
mov    %ecx,%eax
mov    %rax,0x48(%rsp)
mov    %r12,%rax
neg    %rax
mov    %rax,0x40(%rsp)
lea    -0x5(%r12),%rax
mov    %rax,0x30(%rsp)
mov    $0x1,%r15d
mov    $0x7,%eax
mov    %rax,0x20(%rsp)
xor    %ebp,%ebp
mov    %r14,0x58(%rsp)
mov    %r8,0x50(%rsp)
jmp    132a <gauss_matrix+0x1ea>
nopl   0x0(%rax)
add    $0x1,%r15
addq   $0x1,0x20(%rsp)
addq   $0xffffffffffffffff,0x30(%rsp)
mov    0x60(%rsp),%rbp
cmp    0x48(%rsp),%rbp
mov    0x58(%rsp),%r14
mov    0x50(%rsp),%r8
je     1659 <gauss_matrix+0x519>
mov    %r8d,%esi
mov    %r14,%rcx
mov    %ebp,%r8d
mov    %rdi,%r13
call   1040 <gauss_pivot@plt>
cmp    $0x1,%eax
je     1622 <gauss_matrix+0x4e2>
mov    0x0(%r13,%rbp,8),%rcx
movsd  (%rcx,%rbp,8),%xmm0
movsd  (%r14,%rbp,8),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
movapd 0xc9c(%rip),%xmm3
andpd  %xmm3,%xmm2
movsd  0xcb0(%rip),%xmm3
ucomisd %xmm2,%xmm3
ja     1632 <gauss_matrix+0x4f2>
mov    %r13,%rdi
lea    0x1(%rbp),%rax
mov    %rax,0x60(%rsp)
cmp    %r12,%rax
mov    0x8(%rsp),%rdx
mov    0x40(%rsp),%r14
movapd 0xc75(%rip),%xmm7
jae    1300 <gauss_matrix+0x1c0>
mov    0x30(%rsp),%rax
shr    $0x2,%rax
add    $0x1,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0x68(%rsp)
mov    0x38(%rsp),%rax
sub    %rbp,%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,0x98(%rsp)
shr    $0x2,%rax
add    $0x1,%rax
mov    %rax,0x90(%rsp)
mov    %rbp,%r10
not    %r10
add    %r12,%r10
lea    (%rcx,%r15,8),%rax
mov    %rax,0xa0(%rsp)
lea    (%rcx,%r12,8),%r11
mov    %r10,%rax
and    $0xfffffffffffffffc,%rax
mov    %rax,0x78(%rsp)
add    %r15,%rax
mov    %rax,0x70(%rsp)
mov    0x20(%rsp),%rax
lea    (%rcx,%rax,8),%r8
mov    %r15,%r13
mov    %r10,0x88(%rsp)
mov    %r11,0x80(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    (%rdi,%r13,8),%r9
movsd  (%r9,%rbp,8),%xmm1
xorpd  %xmm7,%xmm1
divsd  %xmm0,%xmm1
mov    %r15,%rax
cmp    $0x4,%r10
jb     1590 <gauss_matrix+0x450>
lea    (%r9,%r15,8),%rax
cmp    %r11,%rax
jae    146d <gauss_matrix+0x32d>
lea    (%r9,%r12,8),%rsi
mov    %r15,%rax
cmp    %rsi,0xa0(%rsp)
jb     1590 <gauss_matrix+0x450>
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
cmpq   $0x4,0x98(%rsp)
jae    1488 <gauss_matrix+0x348>
xor    %r11d,%r11d
jmp    151b <gauss_matrix+0x3db>
mov    0x20(%rsp),%rax
lea    (%r9,%rax,8),%r10
mov    0x68(%rsp),%rdx
xor    %r11d,%r11d
nopl   0x0(%rax)
movupd -0x30(%r8,%r11,8),%xmm2
movupd -0x20(%r8,%r11,8),%xmm3
mulpd  %xmm0,%xmm2
movupd -0x30(%r10,%r11,8),%xmm4
addpd  %xmm2,%xmm4
movupd -0x20(%r10,%r11,8),%xmm2
movupd -0x10(%r10,%r11,8),%xmm5
movupd (%r10,%r11,8),%xmm6
mulpd  %xmm0,%xmm3
addpd  %xmm2,%xmm3
movupd %xmm4,-0x30(%r10,%r11,8)
movupd %xmm3,-0x20(%r10,%r11,8)
movupd -0x10(%r8,%r11,8),%xmm2
movupd (%r8,%r11,8),%xmm3
mulpd  %xmm0,%xmm2
addpd  %xmm5,%xmm2
mulpd  %xmm0,%xmm3
addpd  %xmm6,%xmm3
movupd %xmm2,-0x10(%r10,%r11,8)
movupd %xmm3,(%r10,%r11,8)
add    $0x8,%r11
add    $0xfffffffffffffffe,%rdx
jne    14a0 <gauss_matrix+0x360>
testb  $0x1,0x90(%rsp)
01
mov    0x8(%rsp),%rdx
mov    0x10(%rsp),%rdi
je     1569 <gauss_matrix+0x429>
add    %r15,%r11
movupd (%rcx,%r11,8),%xmm2
movupd 0x10(%rcx,%r11,8),%xmm3
movupd (%r9,%r11,8),%xmm4
movupd 0x10(%r9,%r11,8),%xmm5
mulpd  %xmm0,%xmm2
addpd  %xmm4,%xmm2
mulpd  %xmm0,%xmm3
addpd  %xmm5,%xmm3
movupd %xmm2,(%r9,%r11,8)
movupd %xmm3,0x10(%r9,%r11,8)
mov    0x70(%rsp),%rax
mov    0x88(%rsp),%r10
cmp    0x78(%rsp),%r10
mov    0x80(%rsp),%r11
je     15f6 <gauss_matrix+0x4b6>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r12d,%ebx
sub    %eax,%ebx
mov    %rax,%rsi
test   $0x1,%bl
je     15b6 <gauss_matrix+0x476>
movsd  (%rcx,%rax,8),%xmm0
mulsd  %xmm1,%xmm0
addsd  (%r9,%rax,8),%xmm0
movsd  %xmm0,(%r9,%rax,8)
lea    0x1(%rax),%rsi
not    %rax
cmp    %r14,%rax
je     15f6 <gauss_matrix+0x4b6>
xchg   %ax,%ax
movsd  (%rcx,%rsi,8),%xmm0
mulsd  %xmm1,%xmm0
addsd  (%r9,%rsi,8),%xmm0
movsd  %xmm0,(%r9,%rsi,8)
movsd  0x8(%rcx,%rsi,8),%xmm0
mulsd  %xmm1,%xmm0
addsd  0x8(%r9,%rsi,8),%xmm0
movsd  %xmm0,0x8(%r9,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%r12
jne    15c0 <gauss_matrix+0x480>
mulsd  (%rdx,%rbp,8),%xmm1
addsd  (%rdx,%r13,8),%xmm1
movsd  %xmm1,(%rdx,%r13,8)
add    $0x1,%r13
cmp    %r12,%r13
je     1300 <gauss_matrix+0x1c0>
movsd  (%rcx,%rbp,8),%xmm0
jmp    1430 <gauss_matrix+0x2f0>
xor    %esi,%esi
jmp    1666 <gauss_matrix+0x526>
lea    0xa2b(%rip),%rdi
xor    %eax,%eax
call   1030 <shError@plt>
jmp    1642 <gauss_matrix+0x502>
lea    0xa39(%rip),%rdi
mov    %ebp,%esi
mov    $0x2,%al
call   1030 <shError@plt>
mov    %r14,%rdi
call   1050 <shFree@plt>
mov    $0x1,%ebp
mov    0x18(%rsp),%r14
jmp    19c2 <gauss_matrix+0x882>
mov    0x18(%rsp),%r13
mov    0x2c(%rsp),%esi
mov    0x28(%rsp),%ecx
movslq %ecx,%rax
mov    (%rdi,%rax,8),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  (%r14,%rax,8),%xmm1
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm2
andpd  0x978(%rip),%xmm2
movsd  0x990(%rip),%xmm3
ucomisd %xmm2,%xmm3
jbe    16bc <gauss_matrix+0x57c>
lea    0xa04(%rip),%rdi
mov    %r8d,%esi
mov    $0x2,%al
call   1030 <shError@plt>
mov    %r14,%rdi
call   1050 <shFree@plt>
mov    $0x1,%ebp
mov    %r13,%r14
jmp    19c2 <gauss_matrix+0x882>
movsd  (%rdx,%rax,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rax,8)
mov    %r8,%rbx
mov    %r8d,%r9d
test   %sil,%sil
je     1811 <gauss_matrix+0x6d1>
mov    %rbx,%rcx
lea    -0x2(%rbx),%eax
movslq %ecx,%r8
movslq %eax,%rbp
mov    $0x1,%r11d
sub    %r8,%r11
lea    -0x1(%r8),%r15
lea    -0x8(,%r8,8),%rdi
ff
add    %r13,%rdi
xor    %r12d,%r12d
mov    $0x1,%al
mov    %r8,%r10
jmp    174c <gauss_matrix+0x60c>
nopl   0x0(%rax)
mov    0x8(%rsp),%rcx
movsd  (%rcx,%rbp,8),%xmm1
subsd  %xmm0,%xmm1
divsd  (%rdx,%rbp,8),%xmm1
movsd  %xmm1,0x0(%r13,%rbp,8)
lea    -0x1(%rbp),%rcx
add    $0x1,%r12d
add    $0x1,%r11
add    $0xfffffffffffffff8,%rdi
add    $0xffffffffffffffff,%r15
add    $0x1,%al
test   %rbp,%rbp
mov    %rcx,%rbp
jle    1811 <gauss_matrix+0x6d1>
movzbl %al,%eax
and    $0x3,%eax
add    $0xffffffffffffffff,%r10
lea    0x1(%rbp),%rcx
mov    0x10(%rsp),%rdx
mov    (%rdx,%rbp,8),%rdx
xorpd  %xmm0,%xmm0
cmp    %r8,%rcx
jge    1710 <gauss_matrix+0x5d0>
lea    0x1(%r12),%ecx
test   $0x3,%cl
je     17a4 <gauss_matrix+0x664>
lea    (%rdx,%r15,8),%rcx
xorpd  %xmm0,%xmm0
xor    %esi,%esi
movsd  (%rcx,%rsi,8),%xmm1
mulsd  (%rdi,%rsi,8),%xmm1
addsd  %xmm1,%xmm0
add    $0x1,%rsi
cmp    %esi,%eax
jne    1780 <gauss_matrix+0x640>
sub    %r11,%rsi
cmp    $0x3,%r12d
jae    17c0 <gauss_matrix+0x680>
jmp    1710 <gauss_matrix+0x5d0>
xorpd  %xmm0,%xmm0
mov    %r10,%rsi
cmp    $0x3,%r12d
jb     1710 <gauss_matrix+0x5d0>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdx,%rsi,8),%xmm1
movsd  0x8(%rdx,%rsi,8),%xmm2
mulsd  0x0(%r13,%rsi,8),%xmm1
mulsd  0x8(%r13,%rsi,8),%xmm2
addsd  %xmm0,%xmm1
movsd  0x10(%rdx,%rsi,8),%xmm3
mulsd  0x10(%r13,%rsi,8),%xmm3
addsd  %xmm1,%xmm2
movsd  0x18(%rdx,%rsi,8),%xmm0
mulsd  0x18(%r13,%rsi,8),%xmm0
addsd  %xmm2,%xmm3
addsd  %xmm3,%xmm0
add    $0x4,%rsi
cmp    %esi,%r9d
jne    17c0 <gauss_matrix+0x680>
jmp    1710 <gauss_matrix+0x5d0>
test   %ebx,%ebx
mov    0x8(%rsp),%rbp
jle    19b8 <gauss_matrix+0x878>
cmp    $0x4,%ebx
jb     184b <gauss_matrix+0x70b>
lea    0x0(,%r9,8),%rax
add    %r13,%rax
cmp    %rbp,%rax
jbe    18d2 <gauss_matrix+0x792>
lea    0x0(,%r9,8),%rax
add    %rbp,%rax
cmp    %rax,%r13
jae    18d2 <gauss_matrix+0x792>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r9,%rcx
mov    %r9,%rdx
and    $0x3,%rdx
je     1877 <gauss_matrix+0x737>
nop
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1860 <gauss_matrix+0x720>
cmp    $0x3,%rcx
jb     19b8 <gauss_matrix+0x878>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm0
movsd  %xmm0,0x8(%rbp,%rax,8)
movsd  0x10(%r13,%rax,8),%xmm0
movsd  %xmm0,0x10(%rbp,%rax,8)
movsd  0x18(%r13,%rax,8),%xmm0
movsd  %xmm0,0x18(%rbp,%rax,8)
add    $0x4,%rax
cmp    %rax,%r9
jne    1890 <gauss_matrix+0x750>
jmp    19b8 <gauss_matrix+0x878>
mov    %r9d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0xc,%rsi
jae    18f6 <gauss_matrix+0x7b6>
xor    %esi,%esi
jmp    1966 <gauss_matrix+0x826>
and    $0xfffffffffffffffc,%rdx
xor    %esi,%esi
nopl   0x0(%rax)
movups 0x0(%r13,%rsi,8),%xmm0
movups 0x10(%r13,%rsi,8),%xmm1
movups %xmm0,0x0(%rbp,%rsi,8)
movups %xmm1,0x10(%rbp,%rsi,8)
movups 0x20(%r13,%rsi,8),%xmm0
movups 0x30(%r13,%rsi,8),%xmm1
movups %xmm0,0x20(%rbp,%rsi,8)
movups %xmm1,0x30(%rbp,%rsi,8)
movups 0x40(%r13,%rsi,8),%xmm0
movups 0x50(%r13,%rsi,8),%xmm1
movups %xmm0,0x40(%rbp,%rsi,8)
movups %xmm1,0x50(%rbp,%rsi,8)
movupd 0x60(%r13,%rsi,8),%xmm0
movupd 0x70(%r13,%rsi,8),%xmm1
movupd %xmm0,0x60(%rbp,%rsi,8)
movupd %xmm1,0x70(%rbp,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdx
jne    1900 <gauss_matrix+0x7c0>
test   %rcx,%rcx
je     19af <gauss_matrix+0x86f>
lea    0x10(,%rsi,8),%rdx
add    %rbp,%rdx
lea    0x10(,%rsi,8),%rsi
add    %r13,%rsi
shl    $0x5,%rcx
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movupd -0x10(%rsi,%rdi,1),%xmm0
movupd (%rsi,%rdi,1),%xmm1
movupd %xmm0,-0x10(%rdx,%rdi,1)
movupd %xmm1,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    1990 <gauss_matrix+0x850>
cmp    %r9,%rax
jne    184d <gauss_matrix+0x70d>
mov    %r13,%rdi
call   1050 <shFree@plt>
xor    %ebp,%ebp
mov    %r14,%rdi
call   1050 <shFree@plt>
mov    %ebp,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [44 x i8] c"gauss_matrix: biggest val in row %d is zero\00"
@.str.1 = [30 x i8] c"gauss_matrix: singular matrix\00"
@.str.2 = [47 x i8] c"gauss_matrix: Y: row %d has tiny value %f / %f\00"
@.str.3 = [47 x i8] c"gauss_matrix: Z: row %d has tiny value %f / %f\00"
define i32 @gauss_matrix(double** %0, i32 %1, double* %2) {
%4 = alloca i32
%5 = alloca double**
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca double*
%13 = alloca double
%14 = alloca double
store double** %0, double*** %5
store i32 %1, i32* %6
store double* %2, double** %7
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = mul i64 %16, 8
%18 = trunc i64 %17 to i32
%19 = call i64 @shMalloc(i32 %18)
%20 = inttoptr i64 %19 to double*
store double* %20, double** %11
%21 = load i32, i32* %6
%22 = sext i32 %21 to i64
%23 = mul i64 %22, 8
%24 = trunc i64 %23 to i32
%25 = call i64 @shMalloc(i32 %24)
%26 = inttoptr i64 %25 to double*
store double* %26, double** %12
store i32 0, i32* %8
br label %27
27: ; preds = %99, %3
%28 = load i32, i32* %8
%29 = load i32, i32* %6
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %102
31: ; preds = %27
%32 = load double**, double*** %5
%33 = load i32, i32* %8
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds double*, double** %32, i64 %34
%36 = load double*, double** %35
%37 = getelementptr inbounds double, double* %36, i64 0
%38 = load double, double* %37
%39 = call double @llvm.fabs.f64(double %38)
%40 = load double*, double** %11
%41 = load i32, i32* %8
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
store double %39, double* %43
store i32 1, i32* %9
br label %44
44: ; preds = %81, %31
%45 = load i32, i32* %9
%46 = load i32, i32* %6
%47 = icmp slt i32 %45, %46
br i1 %47, label %48, label %84
48: ; preds = %44
%49 = load double**, double*** %5
%50 = load i32, i32* %8
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double*, double** %49, i64 %51
%53 = load double*, double** %52
%54 = load i32, i32* %9
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds double, double* %53, i64 %55
%57 = load double, double* %56
%58 = call double @llvm.fabs.f64(double %57)
%59 = load double*, double** %11
%60 = load i32, i32* %8
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds double, double* %59, i64 %61
%63 = load double, double* %62
%64 = fcmp ogt double %58, %63
br i1 %64, label %65, label %80
65: ; preds = %48
%66 = load double**, double*** %5
%67 = load i32, i32* %8
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds double*, double** %66, i64 %68
%70 = load double*, double** %69
%71 = load i32, i32* %9
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds double, double* %70, i64 %72
%74 = load double, double* %73
%75 = call double @llvm.fabs.f64(double %74)
%76 = load double*, double** %11
%77 = load i32, i32* %8
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds double, double* %76, i64 %78
store double %75, double* %79
br label %80
80: ; preds = %65, %48
br label %81
81: ; preds = %80
%82 = load i32, i32* %9
%83 = add nsw i32 %82, 1
store i32 %83, i32* %9
br label %44
84: ; preds = %44
%85 = load double*, double** %11
%86 = load i32, i32* %8
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds double, double* %85, i64 %87
%89 = load double, double* %88
%90 = fcmp oeq double %89, 0.000000e+00
br i1 %90, label %91, label %98
91: ; preds = %84
%92 = load i32, i32* %8
%93 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %92)
%94 = load double*, double** %11
%95 = call i32 @shFree(double* %94)
%96 = load double*, double** %12
%97 = call i32 @shFree(double* %96)
store i32 1, i32* %4
br label %389
98: ; preds = %84
br label %99
99: ; preds = %98
%100 = load i32, i32* %8
%101 = add nsw i32 %100, 1
store i32 %101, i32* %8
br label %27
102: ; preds = %27
store i32 0, i32* %8
br label %103
103: ; preds = %237, %102
%104 = load i32, i32* %8
%105 = load i32, i32* %6
%106 = sub nsw i32 %105, 1
%107 = icmp slt i32 %104, %106
br i1 %107, label %108, label %240
108: ; preds = %103
%109 = load double**, double*** %5
%110 = load i32, i32* %6
%111 = load double*, double** %7
%112 = load double*, double** %11
%113 = load i32, i32* %8
%114 = call i32 @gauss_pivot(double** %109, i32 %110, double* %111, double* %112, i32 %113)
%115 = icmp eq i32 %114, 1
br i1 %115, label %116, label %122
116: ; preds = %108
%117 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%118 = load double*, double** %11
%119 = call i32 @shFree(double* %118)
%120 = load double*, double** %12
%121 = call i32 @shFree(double* %120)
store i32 1, i32* %4
br label %389
122: ; preds = %108
%123 = load double**, double*** %5
%124 = load i32, i32* %8
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double*, double** %123, i64 %125
%127 = load double*, double** %126
%128 = load i32, i32* %8
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %127, i64 %129
%131 = load double, double* %130
%132 = load double*, double** %11
%133 = load i32, i32* %8
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds double, double* %132, i64 %134
%136 = load double, double* %135
%137 = fdiv double %131, %136
%138 = call double @llvm.fabs.f64(double %137)
%139 = fcmp olt double %138, 0x3D719799812DEA11
br i1 %139, label %140, label %161
140: ; preds = %122
%141 = load i32, i32* %8
%142 = load double**, double*** %5
%143 = load i32, i32* %8
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds double*, double** %142, i64 %144
%146 = load double*, double** %145
%147 = load i32, i32* %8
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %146, i64 %148
%150 = load double, double* %149
%151 = load double*, double** %11
%152 = load i32, i32* %8
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %151, i64 %153
%155 = load double, double* %154
%156 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %141, double %150, double %155)
%157 = load double*, double** %11
%158 = call i32 @shFree(double* %157)
%159 = load double*, double** %12
%160 = call i32 @shFree(double* %159)
store i32 1, i32* %4
br label %389
161: ; preds = %122
%162 = load i32, i32* %8
%163 = add nsw i32 %162, 1
store i32 %163, i32* %9
br label %164
164: ; preds = %233, %161
%165 = load i32, i32* %9
%166 = load i32, i32* %6
%167 = icmp slt i32 %165, %166
br i1 %167, label %168, label %236
168: ; preds = %164
%169 = load double**, double*** %5
%170 = load i32, i32* %9
%171 = sext i32 %170 to i64
%172 = getelementptr inbounds double*, double** %169, i64 %171
%173 = load double*, double** %172
%174 = load i32, i32* %8
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds double, double* %173, i64 %175
%177 = load double, double* %176
%178 = load double**, double*** %5
%179 = load i32, i32* %8
%180 = sext i32 %179 to i64
%181 = getelementptr inbounds double*, double** %178, i64 %180
%182 = load double*, double** %181
%183 = load i32, i32* %8
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds double, double* %182, i64 %184
%186 = load double, double* %185
%187 = fdiv double %177, %186
store double %187, double* %13
%188 = load i32, i32* %8
%189 = add nsw i32 %188, 1
store i32 %189, i32* %10
br label %190
190: ; preds = %216, %168
%191 = load i32, i32* %10
%192 = load i32, i32* %6
%193 = icmp slt i32 %191, %192
br i1 %193, label %194, label %219
194: ; preds = %190
%195 = load double, double* %13
%196 = load double**, double*** %5
%197 = load i32, i32* %8
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds double*, double** %196, i64 %198
%200 = load double*, double** %199
%201 = load i32, i32* %10
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds double, double* %200, i64 %202
%204 = load double, double* %203
%205 = load double**, double*** %5
%206 = load i32, i32* %9
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds double*, double** %205, i64 %207
%209 = load double*, double** %208
%210 = load i32, i32* %10
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double, double* %209, i64 %211
%213 = load double, double* %212
%214 = fneg double %195
%215 = call double @llvm.fmuladd.f64(double %214, double %204, double %213)
store double %215, double* %212
br label %216
216: ; preds = %194
%217 = load i32, i32* %10
%218 = add nsw i32 %217, 1
store i32 %218, i32* %10
br label %190
219: ; preds = %190
%220 = load double, double* %13
%221 = load double*, double** %7
%222 = load i32, i32* %8
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds double, double* %221, i64 %223
%225 = load double, double* %224
%226 = load double*, double** %7
%227 = load i32, i32* %9
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds double, double* %226, i64 %228
%230 = load double, double* %229
%231 = fneg double %220
%232 = call double @llvm.fmuladd.f64(double %231, double %225, double %230)
store double %232, double* %229
br label %233
233: ; preds = %219
%234 = load i32, i32* %9
%235 = add nsw i32 %234, 1
store i32 %235, i32* %9
br label %164
236: ; preds = %164
br label %237
237: ; preds = %236
%238 = load i32, i32* %8
%239 = add nsw i32 %238, 1
store i32 %239, i32* %8
br label %103
240: ; preds = %103
%241 = load double**, double*** %5
%242 = load i32, i32* %6
%243 = sub nsw i32 %242, 1
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds double*, double** %241, i64 %244
%246 = load double*, double** %245
%247 = load i32, i32* %6
%248 = sub nsw i32 %247, 1
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds double, double* %246, i64 %249
%251 = load double, double* %250
%252 = load double*, double** %11
%253 = load i32, i32* %6
%254 = sub nsw i32 %253, 1
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds double, double* %252, i64 %255
%257 = load double, double* %256
%258 = fdiv double %251, %257
%259 = call double @llvm.fabs.f64(double %258)
%260 = fcmp olt double %259, 0x3D719799812DEA11
br i1 %260, label %261, label %285
261: ; preds = %240
%262 = load i32, i32* %6
%263 = load double**, double*** %5
%264 = load i32, i32* %6
%265 = sub nsw i32 %264, 1
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds double*, double** %263, i64 %266
%268 = load double*, double** %267
%269 = load i32, i32* %6
%270 = sub nsw i32 %269, 1
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds double, double* %268, i64 %271
%273 = load double, double* %272
%274 = load double*, double** %11
%275 = load i32, i32* %6
%276 = sub nsw i32 %275, 1
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds double, double* %274, i64 %277
%279 = load double, double* %278
%280 = call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i32 %262, double %273, double %279)
%281 = load double*, double** %11
%282 = call i32 @shFree(double* %281)
%283 = load double*, double** %12
%284 = call i32 @shFree(double* %283)
store i32 1, i32* %4
br label %389
285: ; preds = %240
%286 = load double*, double** %7
%287 = load i32, i32* %6
%288 = sub nsw i32 %287, 1
%289 = sext i32 %288 to i64
%290 = getelementptr inbounds double, double* %286, i64 %289
%291 = load double, double* %290
%292 = load double**, double*** %5
%293 = load i32, i32* %6
%294 = sub nsw i32 %293, 1
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds double*, double** %292, i64 %295
%297 = load double*, double** %296
%298 = load i32, i32* %6
%299 = sub nsw i32 %298, 1
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds double, double* %297, i64 %300
%302 = load double, double* %301
%303 = fdiv double %291, %302
%304 = load double*, double** %12
%305 = load i32, i32* %6
%306 = sub nsw i32 %305, 1
%307 = sext i32 %306 to i64
%308 = getelementptr inbounds double, double* %304, i64 %307
store double %303, double* %308
%309 = load i32, i32* %6
%310 = sub nsw i32 %309, 2
store i32 %310, i32* %8
br label %311
311: ; preds = %363, %285
%312 = load i32, i32* %8
%313 = icmp sge i32 %312, 0
br i1 %313, label %314, label %366
314: ; preds = %311
store double 0.000000e+00, double* %14
%315 = load i32, i32* %8
%316 = add nsw i32 %315, 1
store i32 %316, i32* %9
br label %317
317: ; preds = %338, %314
%318 = load i32, i32* %9
%319 = load i32, i32* %6
%320 = icmp slt i32 %318, %319
br i1 %320, label %321, label %341
321: ; preds = %317
%322 = load double**, double*** %5
%323 = load i32, i32* %8
%324 = sext i32 %323 to i64
%325 = getelementptr inbounds double*, double** %322, i64 %324
%326 = load double*, double** %325
%327 = load i32, i32* %9
%328 = sext i32 %327 to i64
%329 = getelementptr inbounds double, double* %326, i64 %328
%330 = load double, double* %329
%331 = load double*, double** %12
%332 = load i32, i32* %9
%333 = sext i32 %332 to i64
%334 = getelementptr inbounds double, double* %331, i64 %333
%335 = load double, double* %334
%336 = load double, double* %14
%337 = call double @llvm.fmuladd.f64(double %330, double %335, double %336)
store double %337, double* %14
br label %338
338: ; preds = %321
%339 = load i32, i32* %9
%340 = add nsw i32 %339, 1
store i32 %340, i32* %9
br label %317
341: ; preds = %317
%342 = load double*, double** %7
%343 = load i32, i32* %8
%344 = sext i32 %343 to i64
%345 = getelementptr inbounds double, double* %342, i64 %344
%346 = load double, double* %345
%347 = load double, double* %14
%348 = fsub double %346, %347
%349 = load double**, double*** %5
%350 = load i32, i32* %8
%351 = sext i32 %350 to i64
%352 = getelementptr inbounds double*, double** %349, i64 %351
%353 = load double*, double** %352
%354 = load i32, i32* %8
%355 = sext i32 %354 to i64
%356 = getelementptr inbounds double, double* %353, i64 %355
%357 = load double, double* %356
%358 = fdiv double %348, %357
%359 = load double*, double** %12
%360 = load i32, i32* %8
%361 = sext i32 %360 to i64
%362 = getelementptr inbounds double, double* %359, i64 %361
store double %358, double* %362
br label %363
363: ; preds = %341
%364 = load i32, i32* %8
%365 = add nsw i32 %364, -1
store i32 %365, i32* %8
br label %311
366: ; preds = %311
store i32 0, i32* %8
br label %367
367: ; preds = %381, %366
%368 = load i32, i32* %8
%369 = load i32, i32* %6
%370 = icmp slt i32 %368, %369
br i1 %370, label %371, label %384
371: ; preds = %367
%372 = load double*, double** %12
%373 = load i32, i32* %8
%374 = sext i32 %373 to i64
%375 = getelementptr inbounds double, double* %372, i64 %374
%376 = load double, double* %375
%377 = load double*, double** %7
%378 = load i32, i32* %8
%379 = sext i32 %378 to i64
%380 = getelementptr inbounds double, double* %377, i64 %379
store double %376, double* %380
br label %381
381: ; preds = %371
%382 = load i32, i32* %8
%383 = add nsw i32 %382, 1
store i32 %383, i32* %8
br label %367
384: ; preds = %367
%385 = load double*, double** %12
%386 = call i32 @shFree(double* %385)
%387 = load double*, double** %11
%388 = call i32 @shFree(double* %387)
store i32 0, i32* %4
br label %389
389: ; preds = %384, %261, %140, %116, %91
%390 = load i32, i32* %4
ret i32 %390
}

LLVM IR (-O2):
@.str = [44 x i8] c"gauss_matrix: biggest val in row %d is zero\00"
@.str.1 = [30 x i8] c"gauss_matrix: singular matrix\00"
@.str.2 = [47 x i8] c"gauss_matrix: Y: row %d has tiny value %f / %f\00"
@.str.3 = [47 x i8] c"gauss_matrix: Z: row %d has tiny value %f / %f\00"
define i32 @gauss_matrix(double** %0, i32 %1, double* %2) {
%4 = shl i32 %1, 3
%5 = tail call i64 @shMalloc(i32 %4)
%6 = inttoptr i64 %5 to double*
%7 = tail call i64 @shMalloc(i32 %4)
%8 = inttoptr i64 %7 to double*
%9 = inttoptr i64 %7 to i8*
%10 = icmp sgt i32 %1, 0
br i1 %10, label %13, label %11
11: ; preds = %3
%12 = add i32 %1, -1
br label %246
13: ; preds = %3
%14 = zext i32 %1 to i64
%15 = add nsw i64 %14, -1
%16 = and i64 %15, 1
%17 = icmp eq i32 %1, 2
%18 = and i64 %15, -2
%19 = icmp eq i64 %16, 0
br label %28
20: ; preds = %74
%21 = add i32 %1, -1
%22 = icmp sgt i32 %1, 1
br i1 %22, label %23, label %246
23: ; preds = %20
%24 = zext i32 %1 to i64
%25 = zext i32 %21 to i64
%26 = zext i32 %1 to i64
%27 = sub nsw i64 0, %14
br label %80
28: ; preds = %13, %74
%29 = phi i64 [ 0, %13 ], [ %75, %74 ]
%30 = getelementptr inbounds double*, double** %0, i64 %29
%31 = load double*, double** %30
%32 = load double, double* %31
%33 = tail call double @llvm.fabs.f64(double %32)
%34 = getelementptr inbounds double, double* %6, i64 %29
store double %33, double* %34
switch i32 %1, label %35 [
i32 1, label %67
i32 2, label %57
]
35: ; preds = %28, %52
%36 = phi double [ %53, %52 ], [ %33, %28 ]
%37 = phi i64 [ %54, %52 ], [ 1, %28 ]
%38 = phi i64 [ %55, %52 ], [ 0, %28 ]
%39 = getelementptr inbounds double, double* %31, i64 %37
%40 = load double, double* %39
%41 = tail call double @llvm.fabs.f64(double %40)
%42 = fcmp ogt double %41, %36
br i1 %42, label %43, label %44
43: ; preds = %35
store double %41, double* %34
br label %44
44: ; preds = %35, %43
%45 = phi double [ %36, %35 ], [ %41, %43 ]
%46 = add nuw nsw i64 %37, 1
%47 = getelementptr inbounds double, double* %31, i64 %46
%48 = load double, double* %47
%49 = tail call double @llvm.fabs.f64(double %48)
%50 = fcmp ogt double %49, %45
br i1 %50, label %51, label %52
51: ; preds = %44
store double %49, double* %34
br label %52
52: ; preds = %51, %44
%53 = phi double [ %45, %44 ], [ %49, %51 ]
%54 = add nuw nsw i64 %37, 2
%55 = add i64 %38, 2
%56 = icmp eq i64 %55, %18
br i1 %56, label %57, label %35
57: ; preds = %52, %28
%58 = phi double [ undef, %28 ], [ %53, %52 ]
%59 = phi double [ %33, %28 ], [ %53, %52 ]
%60 = phi i64 [ 1, %28 ], [ %54, %52 ]
br i1 %19, label %67, label %61
61: ; preds = %57
%62 = getelementptr inbounds double, double* %31, i64 %60
%63 = load double, double* %62
%64 = tail call double @llvm.fabs.f64(double %63)
%65 = fcmp ogt double %64, %59
br i1 %65, label %66, label %67
66: ; preds = %61
store double %64, double* %34
br label %67
67: ; preds = %57, %66, %61, %28
%68 = phi double [ %33, %28 ], [ %58, %57 ], [ %59, %61 ], [ %64, %66 ]
%69 = fcmp oeq double %68, 0.000000e+00
br i1 %69, label %70, label %74
70: ; preds = %67
%71 = trunc i64 %29 to i32
%72 = tail call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %71)
%73 = tail call i32 @shFree(double* %6)
br label %471
74: ; preds = %67
%75 = add nuw nsw i64 %29, 1
%76 = icmp eq i64 %75, %14
br i1 %76, label %20, label %28
77: ; preds = %237, %109
%78 = add nuw nsw i64 %82, 1
%79 = icmp eq i64 %110, %25
br i1 %79, label %246, label %80
80: ; preds = %23, %77
%81 = phi i64 [ 0, %23 ], [ %110, %77 ]
%82 = phi i64 [ 1, %23 ], [ %78, %77 ]
%83 = sub i64 %15, %81
%84 = add i64 %83, -4
%85 = lshr i64 %84, 2
%86 = add nuw nsw i64 %85, 1
%87 = xor i64 %81, -1
%88 = add nsw i64 %87, %14
%89 = trunc i64 %81 to i32
%90 = tail call i32 @gauss_pivot(double** %0, i32 %1, double* %2, double* %6, i32 %89)
%91 = icmp eq i32 %90, 1
br i1 %91, label %92, label %95
92: ; preds = %80
%93 = tail call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%94 = tail call i32 @shFree(double* %6)
br label %471
95: ; preds = %80
%96 = getelementptr inbounds double*, double** %0, i64 %81
%97 = load double*, double** %96
%98 = getelementptr inbounds double, double* %97, i64 %81
%99 = load double, double* %98
%100 = getelementptr inbounds double, double* %6, i64 %81
%101 = load double, double* %100
%102 = fdiv double %99, %101
%103 = tail call double @llvm.fabs.f64(double %102)
%104 = fcmp olt double %103, 0x3D719799812DEA11
br i1 %104, label %105, label %109
105: ; preds = %95
%106 = trunc i64 %81 to i32
%107 = tail call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %106, double %99, double %101)
%108 = tail call i32 @shFree(double* %6)
br label %471
109: ; preds = %95
%110 = add nuw nsw i64 %81, 1
%111 = icmp ult i64 %110, %24
br i1 %111, label %112, label %77
112: ; preds = %109
%113 = getelementptr inbounds double, double* %2, i64 %81
%114 = getelementptr double, double* %97, i64 %82
%115 = getelementptr double, double* %97, i64 %14
%116 = icmp ult i64 %88, 4
%117 = and i64 %88, -4
%118 = add i64 %82, %117
%119 = and i64 %86, 1
%120 = icmp ult i64 %84, 4
%121 = and i64 %86, 9223372036854775806
%122 = icmp eq i64 %119, 0
%123 = icmp eq i64 %88, %117
br label %124
124: ; preds = %112, %244
%125 = phi double [ %99, %112 ], [ %245, %244 ]
%126 = phi i64 [ %82, %112 ], [ %242, %244 ]
%127 = getelementptr inbounds double*, double** %0, i64 %126
%128 = load double*, double** %127
%129 = getelementptr inbounds double, double* %128, i64 %81
%130 = load double, double* %129
%131 = fneg double %130
%132 = fdiv double %131, %125
br i1 %116, label %206, label %133
133: ; preds = %124
%134 = getelementptr double, double* %128, i64 %82
%135 = getelementptr double, double* %128, i64 %14
%136 = icmp ult double* %134, %115
%137 = icmp ult double* %114, %135
%138 = and i1 %136, %137
br i1 %138, label %206, label %139
139: ; preds = %133
%140 = insertelement <2 x double> poison, double %132, i64 0
%141 = shufflevector <2 x double> %140, <2 x double> poison, <2 x i32> zeroinitializer
%142 = insertelement <2 x double> poison, double %132, i64 0
%143 = shufflevector <2 x double> %142, <2 x double> poison, <2 x i32> zeroinitializer
br i1 %120, label %185, label %144
144: ; preds = %139, %144
%145 = phi i64 [ %182, %144 ], [ 0, %139 ]
%146 = phi i64 [ %183, %144 ], [ 0, %139 ]
%147 = add i64 %82, %145
%148 = getelementptr inbounds double, double* %97, i64 %147
%149 = bitcast double* %148 to <2 x double>*
%150 = load <2 x double>, <2 x double>* %149
%151 = getelementptr inbounds double, double* %148, i64 2
%152 = bitcast double* %151 to <2 x double>*
%153 = load <2 x double>, <2 x double>* %152
%154 = getelementptr inbounds double, double* %128, i64 %147
%155 = bitcast double* %154 to <2 x double>*
%156 = load <2 x double>, <2 x double>* %155
%157 = getelementptr inbounds double, double* %154, i64 2
%158 = bitcast double* %157 to <2 x double>*
%159 = load <2 x double>, <2 x double>* %158
%160 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %141, <2 x double> %150, <2 x double> %156)
%161 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %143, <2 x double> %153, <2 x double> %159)
%162 = bitcast double* %154 to <2 x double>*
store <2 x double> %160, <2 x double>* %162
%163 = bitcast double* %157 to <2 x double>*
store <2 x double> %161, <2 x double>* %163
%164 = or i64 %145, 4
%165 = add i64 %82, %164
%166 = getelementptr inbounds double, double* %97, i64 %165
%167 = bitcast double* %166 to <2 x double>*
%168 = load <2 x double>, <2 x double>* %167
%169 = getelementptr inbounds double, double* %166, i64 2
%170 = bitcast double* %169 to <2 x double>*
%171 = load <2 x double>, <2 x double>* %170
%172 = getelementptr inbounds double, double* %128, i64 %165
%173 = bitcast double* %172 to <2 x double>*
%174 = load <2 x double>, <2 x double>* %173
%175 = getelementptr inbounds double, double* %172, i64 2
%176 = bitcast double* %175 to <2 x double>*
%177 = load <2 x double>, <2 x double>* %176
%178 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %141, <2 x double> %168, <2 x double> %174)
%179 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %143, <2 x double> %171, <2 x double> %177)
%180 = bitcast double* %172 to <2 x double>*
store <2 x double> %178, <2 x double>* %180
%181 = bitcast double* %175 to <2 x double>*
store <2 x double> %179, <2 x double>* %181
%182 = add nuw i64 %145, 8
%183 = add i64 %146, 2
%184 = icmp eq i64 %183, %121
br i1 %184, label %185, label %144
185: ; preds = %144, %139
%186 = phi i64 [ 0, %139 ], [ %182, %144 ]
br i1 %122, label %205, label %187
187: ; preds = %185
%188 = add i64 %82, %186
%189 = getelementptr inbounds double, double* %97, i64 %188
%190 = bitcast double* %189 to <2 x double>*
%191 = load <2 x double>, <2 x double>* %190
%192 = getelementptr inbounds double, double* %189, i64 2
%193 = bitcast double* %192 to <2 x double>*
%194 = load <2 x double>, <2 x double>* %193
%195 = getelementptr inbounds double, double* %128, i64 %188
%196 = bitcast double* %195 to <2 x double>*
%197 = load <2 x double>, <2 x double>* %196
%198 = getelementptr inbounds double, double* %195, i64 2
%199 = bitcast double* %198 to <2 x double>*
%200 = load <2 x double>, <2 x double>* %199
%201 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %141, <2 x double> %191, <2 x double> %197)
%202 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %143, <2 x double> %194, <2 x double> %200)
%203 = bitcast double* %195 to <2 x double>*
store <2 x double> %201, <2 x double>* %203
%204 = bitcast double* %198 to <2 x double>*
store <2 x double> %202, <2 x double>* %204
br label %205
205: ; preds = %185, %187
br i1 %123, label %237, label %206
206: ; preds = %133, %124, %205
%207 = phi i64 [ %82, %133 ], [ %82, %124 ], [ %118, %205 ]
%208 = sub i64 %14, %207
%209 = xor i64 %207, -1
%210 = and i64 %208, 1
%211 = icmp eq i64 %210, 0
br i1 %211, label %219, label %212
212: ; preds = %206
%213 = getelementptr inbounds double, double* %97, i64 %207
%214 = load double, double* %213
%215 = getelementptr inbounds double, double* %128, i64 %207
%216 = load double, double* %215
%217 = tail call double @llvm.fmuladd.f64(double %132, double %214, double %216)
store double %217, double* %215
%218 = add nuw nsw i64 %207, 1
br label %219
219: ; preds = %212, %206
%220 = phi i64 [ %207, %206 ], [ %218, %212 ]
%221 = icmp eq i64 %209, %27
br i1 %221, label %237, label %222
222: ; preds = %219, %222
%223 = phi i64 [ %235, %222 ], [ %220, %219 ]
%224 = getelementptr inbounds double, double* %97, i64 %223
%225 = load double, double* %224
%226 = getelementptr inbounds double, double* %128, i64 %223
%227 = load double, double* %226
%228 = tail call double @llvm.fmuladd.f64(double %132, double %225, double %227)
store double %228, double* %226
%229 = add nuw nsw i64 %223, 1
%230 = getelementptr inbounds double, double* %97, i64 %229
%231 = load double, double* %230
%232 = getelementptr inbounds double, double* %128, i64 %229
%233 = load double, double* %232
%234 = tail call double @llvm.fmuladd.f64(double %132, double %231, double %233)
store double %234, double* %232
%235 = add nuw nsw i64 %223, 2
%236 = icmp eq i64 %235, %26
br i1 %236, label %237, label %222
237: ; preds = %219, %222, %205
%238 = load double, double* %113
%239 = getelementptr inbounds double, double* %2, i64 %126
%240 = load double, double* %239
%241 = tail call double @llvm.fmuladd.f64(double %132, double %238, double %240)
store double %241, double* %239
%242 = add nuw nsw i64 %126, 1
%243 = icmp eq i64 %242, %26
br i1 %243, label %77, label %244
244: ; preds = %237
%245 = load double, double* %98
br label %124
246: ; preds = %77, %11, %20
%247 = phi i1 [ false, %11 ], [ false, %20 ], [ %22, %77 ]
%248 = phi i32 [ %12, %11 ], [ %21, %20 ], [ %21, %77 ]
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds double*, double** %0, i64 %249
%251 = load double*, double** %250
%252 = getelementptr inbounds double, double* %251, i64 %249
%253 = load double, double* %252
%254 = getelementptr inbounds double, double* %6, i64 %249
%255 = load double, double* %254
%256 = fdiv double %253, %255
%257 = tail call double @llvm.fabs.f64(double %256)
%258 = fcmp olt double %257, 0x3D719799812DEA11
br i1 %258, label %259, label %262
259: ; preds = %246
%260 = tail call i32 (i8*, ...) @shError(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i32 %1, double %253, double %255)
%261 = tail call i32 @shFree(double* %6)
br label %471
262: ; preds = %246
%263 = getelementptr inbounds double, double* %2, i64 %249
%264 = load double, double* %263
%265 = fdiv double %264, %253
%266 = getelementptr inbounds double, double* %8, i64 %249
store double %265, double* %266
br i1 %247, label %267, label %301
267: ; preds = %262
%268 = add i32 %1, -2
%269 = sext i32 %1 to i64
%270 = sext i32 %268 to i64
br label %271
271: ; preds = %267, %438
%272 = phi i32 [ 0, %267 ], [ %449, %438 ]
%273 = phi i64 [ %270, %267 ], [ %447, %438 ]
%274 = phi i64 [ %269, %267 ], [ %275, %438 ]
%275 = add nsw i64 %274, -1
%276 = add nsw i64 %273, 1
%277 = icmp slt i64 %276, %269
%278 = getelementptr inbounds double*, double** %0, i64 %273
%279 = load double*, double** %278
br i1 %277, label %280, label %438
280: ; preds = %271
%281 = add i32 %272, 1
%282 = and i32 %281, 3
%283 = icmp eq i32 %282, 0
br i1 %283, label %296, label %284
284: ; preds = %280, %284
%285 = phi i64 [ %293, %284 ], [ %275, %280 ]
%286 = phi double [ %292, %284 ], [ 0.000000e+00, %280 ]
%287 = phi i32 [ %294, %284 ], [ 0, %280 ]
%288 = getelementptr inbounds double, double* %279, i64 %285
%289 = load double, double* %288
%290 = getelementptr inbounds double, double* %8, i64 %285
%291 = load double, double* %290
%292 = tail call double @llvm.fmuladd.f64(double %289, double %291, double %286)
%293 = add nsw i64 %285, 1
%294 = add i32 %287, 1
%295 = icmp eq i32 %294, %282
br i1 %295, label %296, label %284
296: ; preds = %284, %280
%297 = phi double [ undef, %280 ], [ %292, %284 ]
%298 = phi i64 [ %275, %280 ], [ %293, %284 ]
%299 = phi double [ 0.000000e+00, %280 ], [ %292, %284 ]
%300 = icmp ult i32 %272, 3
br i1 %300, label %438, label %409
301: ; preds = %438, %262
br i1 %10, label %302, label %469
302: ; preds = %301
%303 = zext i32 %1 to i64
%304 = icmp ult i32 %1, 4
br i1 %304, label %391, label %305
305: ; preds = %302
%306 = getelementptr double, double* %2, i64 %303
%307 = bitcast double* %306 to i8*
%308 = getelementptr double, double* %8, i64 %303
%309 = icmp ugt double* %308, %2
%310 = icmp ult i8* %9, %307
%311 = and i1 %309, %310
br i1 %311, label %391, label %312
312: ; preds = %305
%313 = and i64 %303, 4294967292
%314 = add nsw i64 %313, -4
%315 = lshr exact i64 %314, 2
%316 = add nuw nsw i64 %315, 1
%317 = and i64 %316, 3
%318 = icmp ult i64 %314, 12
br i1 %318, label %370, label %319
319: ; preds = %312
%320 = and i64 %316, 9223372036854775804
br label %321
321: ; preds = %321, %319
%322 = phi i64 [ 0, %319 ], [ %367, %321 ]
%323 = phi i64 [ 0, %319 ], [ %368, %321 ]
%324 = getelementptr inbounds double, double* %8, i64 %322
%325 = bitcast double* %324 to <2 x double>*
%326 = load <2 x double>, <2 x double>* %325
%327 = getelementptr inbounds double, double* %324, i64 2
%328 = bitcast double* %327 to <2 x double>*
%329 = load <2 x double>, <2 x double>* %328
%330 = getelementptr inbounds double, double* %2, i64 %322
%331 = bitcast double* %330 to <2 x double>*
store <2 x double> %326, <2 x double>* %331
%332 = getelementptr inbounds double, double* %330, i64 2
%333 = bitcast double* %332 to <2 x double>*
store <2 x double> %329, <2 x double>* %333
%334 = or i64 %322, 4
%335 = getelementptr inbounds double, double* %8, i64 %334
%336 = bitcast double* %335 to <2 x double>*
%337 = load <2 x double>, <2 x double>* %336
%338 = getelementptr inbounds double, double* %335, i64 2
%339 = bitcast double* %338 to <2 x double>*
%340 = load <2 x double>, <2 x double>* %339
%341 = getelementptr inbounds double, double* %2, i64 %334
%342 = bitcast double* %341 to <2 x double>*
store <2 x double> %337, <2 x double>* %342
%343 = getelementptr inbounds double, double* %341, i64 2
%344 = bitcast double* %343 to <2 x double>*
store <2 x double> %340, <2 x double>* %344
%345 = or i64 %322, 8
%346 = getelementptr inbounds double, double* %8, i64 %345
%347 = bitcast double* %346 to <2 x double>*
%348 = load <2 x double>, <2 x double>* %347
%349 = getelementptr inbounds double, double* %346, i64 2
%350 = bitcast double* %349 to <2 x double>*
%351 = load <2 x double>, <2 x double>* %350
%352 = getelementptr inbounds double, double* %2, i64 %345
%353 = bitcast double* %352 to <2 x double>*
store <2 x double> %348, <2 x double>* %353
%354 = getelementptr inbounds double, double* %352, i64 2
%355 = bitcast double* %354 to <2 x double>*
store <2 x double> %351, <2 x double>* %355
%356 = or i64 %322, 12
%357 = getelementptr inbounds double, double* %8, i64 %356
%358 = bitcast double* %357 to <2 x double>*
%359 = load <2 x double>, <2 x double>* %358
%360 = getelementptr inbounds double, double* %357, i64 2
%361 = bitcast double* %360 to <2 x double>*
%362 = load <2 x double>, <2 x double>* %361
%363 = getelementptr inbounds double, double* %2, i64 %356
%364 = bitcast double* %363 to <2 x double>*
store <2 x double> %359, <2 x double>* %364
%365 = getelementptr inbounds double, double* %363, i64 2
%366 = bitcast double* %365 to <2 x double>*
store <2 x double> %362, <2 x double>* %366
%367 = add nuw i64 %322, 16
%368 = add nuw i64 %323, 4
%369 = icmp eq i64 %368, %320
br i1 %369, label %370, label %321
370: ; preds = %321, %312
%371 = phi i64 [ 0, %312 ], [ %367, %321 ]
%372 = icmp eq i64 %317, 0
br i1 %372, label %389, label %373
373: ; preds = %370, %373
%374 = phi i64 [ %386, %373 ], [ %371, %370 ]
%375 = phi i64 [ %387, %373 ], [ 0, %370 ]
%376 = getelementptr inbounds double, double* %8, i64 %374
%377 = bitcast double* %376 to <2 x double>*
%378 = load <2 x double>, <2 x double>* %377
%379 = getelementptr inbounds double, double* %376, i64 2
%380 = bitcast double* %379 to <2 x double>*
%381 = load <2 x double>, <2 x double>* %380
%382 = getelementptr inbounds double, double* %2, i64 %374
%383 = bitcast double* %382 to <2 x double>*
store <2 x double> %378, <2 x double>* %383
%384 = getelementptr inbounds double, double* %382, i64 2
%385 = bitcast double* %384 to <2 x double>*
store <2 x double> %381, <2 x double>* %385
%386 = add nuw i64 %374, 4
%387 = add i64 %375, 1
%388 = icmp eq i64 %387, %317
br i1 %388, label %389, label %373
389: ; preds = %373, %370
%390 = icmp eq i64 %313, %303
br i1 %390, label %469, label %391
391: ; preds = %305, %302, %389
%392 = phi i64 [ 0, %305 ], [ 0, %302 ], [ %313, %389 ]
%393 = xor i64 %392, -1
%394 = add nsw i64 %393, %303
%395 = and i64 %303, 3
%396 = icmp eq i64 %395, 0
br i1 %396, label %406, label %397
397: ; preds = %391, %397
%398 = phi i64 [ %403, %397 ], [ %392, %391 ]
%399 = phi i64 [ %404, %397 ], [ 0, %391 ]
%400 = getelementptr inbounds double, double* %8, i64 %398
%401 = load double, double* %400
%402 = getelementptr inbounds double, double* %2, i64 %398
store double %401, double* %402
%403 = add nuw nsw i64 %398, 1
%404 = add i64 %399, 1
%405 = icmp eq i64 %404, %395
br i1 %405, label %406, label %397
406: ; preds = %397, %391
%407 = phi i64 [ %392, %391 ], [ %403, %397 ]
%408 = icmp ult i64 %394, 3
br i1 %408, label %469, label %450
409: ; preds = %296, %409
%410 = phi i64 [ %435, %409 ], [ %298, %296 ]
%411 = phi double [ %434, %409 ], [ %299, %296 ]
%412 = getelementptr inbounds double, double* %279, i64 %410
%413 = load double, double* %412
%414 = getelementptr inbounds double, double* %8, i64 %410
%415 = load double, double* %414
%416 = tail call double @llvm.fmuladd.f64(double %413, double %415, double %411)
%417 = add nsw i64 %410, 1
%418 = getelementptr inbounds double, double* %279, i64 %417
%419 = load double, double* %418
%420 = getelementptr inbounds double, double* %8, i64 %417
%421 = load double, double* %420
%422 = tail call double @llvm.fmuladd.f64(double %419, double %421, double %416)
%423 = add nsw i64 %410, 2
%424 = getelementptr inbounds double, double* %279, i64 %423
%425 = load double, double* %424
%426 = getelementptr inbounds double, double* %8, i64 %423
%427 = load double, double* %426
%428 = tail call double @llvm.fmuladd.f64(double %425, double %427, double %422)
%429 = add nsw i64 %410, 3
%430 = getelementptr inbounds double, double* %279, i64 %429
%431 = load double, double* %430
%432 = getelementptr inbounds double, double* %8, i64 %429
%433 = load double, double* %432
%434 = tail call double @llvm.fmuladd.f64(double %431, double %433, double %428)
%435 = add nsw i64 %410, 4
%436 = trunc i64 %435 to i32
%437 = icmp eq i32 %436, %1
br i1 %437, label %438, label %409
438: ; preds = %296, %409, %271
%439 = phi double [ 0.000000e+00, %271 ], [ %297, %296 ], [ %434, %409 ]
%440 = getelementptr inbounds double, double* %2, i64 %273
%441 = load double, double* %440
%442 = fsub double %441, %439
%443 = getelementptr inbounds double, double* %279, i64 %273
%444 = load double, double* %443
%445 = fdiv double %442, %444
%446 = getelementptr inbounds double, double* %8, i64 %273
store double %445, double* %446
%447 = add nsw i64 %273, -1
%448 = icmp sgt i64 %273, 0
%449 = add i32 %272, 1
br i1 %448, label %271, label %301
450: ; preds = %406, %450
%451 = phi i64 [ %467, %450 ], [ %407, %406 ]
%452 = getelementptr inbounds double, double* %8, i64 %451
%453 = load double, double* %452
%454 = getelementptr inbounds double, double* %2, i64 %451
store double %453, double* %454
%455 = add nuw nsw i64 %451, 1
%456 = getelementptr inbounds double, double* %8, i64 %455
%457 = load double, double* %456
%458 = getelementptr inbounds double, double* %2, i64 %455
store double %457, double* %458
%459 = add nuw nsw i64 %451, 2
%460 = getelementptr inbounds double, double* %8, i64 %459
%461 = load double, double* %460
%462 = getelementptr inbounds double, double* %2, i64 %459
store double %461, double* %462
%463 = add nuw nsw i64 %451, 3
%464 = getelementptr inbounds double, double* %8, i64 %463
%465 = load double, double* %464
%466 = getelementptr inbounds double, double* %2, i64 %463
store double %465, double* %466
%467 = add nuw nsw i64 %451, 4
%468 = icmp eq i64 %467, %303
br i1 %468, label %469, label %450
469: ; preds = %406, %450, %389, %301
%470 = tail call i32 @shFree(double* %8)
br label %471
471: ; preds = %469, %259, %105, %92, %70
%472 = phi double* [ %6, %469 ], [ %8, %259 ], [ %8, %105 ], [ %8, %92 ], [ %8, %70 ]
%473 = phi i32 [ 0, %469 ], [ 1, %259 ], [ 1, %105 ], [ 1, %92 ], [ 1, %70 ]
%474 = tail call i32 @shFree(double* %472)
ret i32 %473
}