#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 /*<<< orphan*/ free_intVector(int *, int);
int *intVector(long, long);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ swap(double *, double *);
int Sgaussj(double **a, int n, double **b, int m) {
  int *index_col, *index_row, *index_pivot;
  int col, row;
  double maxElement, temp, pivot_element;
  index_col = intVector((long)1, (long)n);
  index_row = intVector((long)1, (long)n);
  index_pivot = intVector((long)1, (long)n);
  for (int j = 1; j <= n; j++)
    index_pivot[j] = 0;
  for (int i = 1; i <= n; i++) {
    maxElement = 0.0;
    for (int j = 1; j <= n; j++) {
      if (index_pivot[j] != 1)
        for (int k = 1; k <= n; k++) {
          if (index_pivot[k] == 0) {
            if (fabs(a[j][k]) >= maxElement) {
              maxElement = fabs(a[j][k]);
              row = j;
              col = k;
            }
          } else if (index_pivot[k] > 1) {
            printf("gaussj: Singular Matrix when choosing largest element.\n");
            return (1);
          }
        }
    }
    ++(index_pivot[col]);
    if (row != col) {
      for (int l = 1; l <= n; l++)
        swap(&a[row][l], &a[col][l]);
      for (int l = 1; l <= m; l++)
        swap(&b[row][l], &b[col][l]);
    }
    index_row[i] = row;
    index_col[i] = col;
    if (a[col][col] == 0.0) {
      printf("gaussj: Singular Matrix - pivot element is zero.\n");
      return (1);
    }
    pivot_element = 1.0 / a[col][col];
    a[col][col] = 1.0;
    for (int l = 1; l <= n; l++)
      a[col][l] *= pivot_element;
    for (int l = 1; l <= m; l++)
      b[col][l] *= pivot_element;
    for (int j = 1; j <= n; j++) {
      if (j != col) {
        temp = a[j][col];
        a[j][col] = 0.0;
        for (int l = 1; l <= n; l++)
          a[j][l] -= a[col][l] * temp;
        for (int l = 1; l <= m; l++)
          b[j][l] -= b[col][l] * temp;
      }
    }
  }
  for (int l = n; l >= 1; l--) {
    if (index_row[l] != index_col[l])
      for (int k = 1; k <= n; k++)
        swap(&a[k][index_row[l]], &a[k][index_col[l]]);
  }
  free_intVector(index_pivot, 1);
  free_intVector(index_row, 1);
  free_intVector(index_col, 1);
  return (0);
}


x86 assembly (clang, -O0):
<Sgaussj>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movslq -0x14(%rbp),%rsi
mov    $0x1,%edi
call   1050 <intVector@plt>
mov    %rax,-0x30(%rbp)
movslq -0x14(%rbp),%rsi
mov    $0x1,%edi
call   1050 <intVector@plt>
mov    %rax,-0x38(%rbp)
movslq -0x14(%rbp),%rsi
mov    $0x1,%edi
call   1050 <intVector@plt>
mov    %rax,-0x40(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11bf <Sgaussj+0x7f>
mov    -0x40(%rbp),%rax
movslq -0x64(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1196 <Sgaussj+0x56>
movl   $0x1,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1667 <Sgaussj+0x527>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movl   $0x1,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     12df <Sgaussj+0x19f>
mov    -0x40(%rbp),%rax
movslq -0x6c(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
je     12cc <Sgaussj+0x18c>
movl   $0x1,-0x70(%rbp)
mov    -0x70(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     12c7 <Sgaussj+0x187>
mov    -0x40(%rbp),%rax
movslq -0x70(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    1285 <Sgaussj+0x145>
mov    -0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xdd0(%rip),%xmm1
pand   %xmm1,%xmm0
ucomisd -0x50(%rbp),%xmm0
jb     1280 <Sgaussj+0x140>
mov    -0x10(%rbp),%rax
movslq -0x6c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x70(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xda5(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x70(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    12b4 <Sgaussj+0x174>
mov    -0x40(%rbp),%rax
movslq -0x70(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jle    12af <Sgaussj+0x16f>
lea    0xd82(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    176a <Sgaussj+0x62a>
jmp    12b4 <Sgaussj+0x174>
jmp    12b9 <Sgaussj+0x179>
mov    -0x70(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x70(%rbp)
jmp    1206 <Sgaussj+0xc6>
jmp    12cc <Sgaussj+0x18c>
jmp    12d1 <Sgaussj+0x191>
mov    -0x6c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6c(%rbp)
jmp    11e1 <Sgaussj+0xa1>
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x48(%rbp),%eax
cmp    -0x44(%rbp),%eax
je     13a9 <Sgaussj+0x269>
movl   $0x1,-0x74(%rbp)
mov    -0x74(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1350 <Sgaussj+0x210>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x74(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
movslq -0x74(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
call   1060 <swap@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1303 <Sgaussj+0x1c3>
movl   $0x1,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     13a4 <Sgaussj+0x264>
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
movslq -0x78(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
movslq -0x78(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
call   1060 <swap@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    1357 <Sgaussj+0x217>
jmp    13a9 <Sgaussj+0x269>
mov    -0x48(%rbp),%edx
mov    -0x38(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x44(%rbp),%edx
mov    -0x30(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1405 <Sgaussj+0x2c5>
jp     1405 <Sgaussj+0x2c5>
lea    0xc64(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    176a <Sgaussj+0x62a>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movsd  0xbe3(%rip),%xmm0
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movsd  0xbc1(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1484 <Sgaussj+0x344>
movsd  -0x60(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x7c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x7c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x7c(%rbp)
jmp    144b <Sgaussj+0x30b>
movl   $0x1,-0x80(%rbp)
mov    -0x80(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     14c4 <Sgaussj+0x384>
movsd  -0x60(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x80(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x80(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x80(%rbp)
jmp    148b <Sgaussj+0x34b>
movl   $0x1,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     1654 <Sgaussj+0x514>
mov    -0x84(%rbp),%eax
cmp    -0x44(%rbp),%eax
je     163b <Sgaussj+0x4fb>
mov    -0x10(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x88(%rbp)
mov    -0x88(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     15ad <Sgaussj+0x46d>
mov    -0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x58(%rbp),%xmm2
mov    -0x10(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x88(%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    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    152e <Sgaussj+0x3ee>
movl   $0x1,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     1636 <Sgaussj+0x4f6>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x8c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x58(%rbp),%xmm2
mov    -0x20(%rbp),%rax
movslq -0x84(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x8c(%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    -0x8c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c(%rbp)
jmp    15b7 <Sgaussj+0x477>
jmp    163b <Sgaussj+0x4fb>
jmp    1640 <Sgaussj+0x500>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    14ce <Sgaussj+0x38e>
jmp    1659 <Sgaussj+0x519>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    11c6 <Sgaussj+0x86>
mov    -0x14(%rbp),%eax
mov    %eax,-0x90(%rbp)
cmpl   $0x1,-0x90(%rbp)
jl     1739 <Sgaussj+0x5f9>
mov    -0x38(%rbp),%rax
movslq -0x90(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x30(%rbp),%rcx
movslq -0x90(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     1720 <Sgaussj+0x5e0>
movl   $0x1,-0x94(%rbp)
mov    -0x94(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     171b <Sgaussj+0x5db>
mov    -0x10(%rbp),%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x38(%rbp),%rax
movslq -0x90(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rax
movslq -0x94(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x30(%rbp),%rax
movslq -0x90(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
shl    $0x3,%rax
add    %rax,%rsi
call   1060 <swap@plt>
mov    -0x94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x94(%rbp)
jmp    16a9 <Sgaussj+0x569>
jmp    1720 <Sgaussj+0x5e0>
jmp    1725 <Sgaussj+0x5e5>
mov    -0x90(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x90(%rbp)
jmp    1670 <Sgaussj+0x530>
mov    -0x40(%rbp),%rdi
mov    $0x1,%esi
call   1030 <free_intVector@plt>
mov    -0x38(%rbp),%rdi
mov    $0x1,%esi
call   1030 <free_intVector@plt>
mov    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1030 <free_intVector@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sgaussj>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %ecx,%r15d
mov    %rdx,0x58(%rsp)
mov    %esi,%ebx
mov    %rdi,0x8(%rsp)
movslq %esi,%r12
mov    $0x1,%eax
mov    %rax,0x50(%rsp)
mov    $0x1,%edi
mov    %r12,%rsi
call   1060 <intVector@plt>
mov    %rax,%r14
mov    $0x1,%edi
mov    %r12,%rsi
call   1060 <intVector@plt>
mov    %rax,%rbp
mov    $0x1,%edi
mov    %r12,%rsi
call   1060 <intVector@plt>
mov    %rax,%r13
test   %r12d,%r12d
jle    19b0 <Sgaussj+0x860>
mov    %r14,0x88(%rsp)
mov    %rbp,0x80(%rsp)
mov    %r13,%rdi
add    $0x4,%rdi
mov    %rbx,0x18(%rsp)
mov    %ebx,%r12d
lea    0x0(,%r12,4),%rdx
xor    %esi,%esi
call   1050 <memset@plt>
lea    0x1(%r12),%rbp
mov    %r15,%r14
add    $0x1,%r15d
lea    -0x1(%r15),%rax
lea    -0x4(%r12),%r8
mov    %r8,%rdi
shr    $0x2,%rdi
add    $0x1,%rdi
lea    -0x5(%r15),%r10
mov    %r10,%rbx
shr    $0x2,%rbx
add    $0x1,%rbx
mov    %r12d,%ecx
and    $0xfffffffc,%ecx
mov    %rcx,0x98(%rsp)
lea    0x1(%rcx),%r9
mov    %rdi,%rsi
and    $0xfffffffffffffffe,%rsi
mov    %rax,0x20(%rsp)
and    $0xfffffffffffffffc,%rax
mov    %rax,0x48(%rsp)
add    $0x1,%rax
mov    %rax,0x90(%rsp)
mov    %rbx,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,0xb0(%rsp)
mov    %r12,%rax
not    %rax
mov    %rax,0xd0(%rsp)
mov    %r15,%rax
neg    %rax
mov    %rax,0xc8(%rsp)
movapd 0xd87(%rip),%xmm2
lea    0x8(,%r12,8),%rax
mov    %rax,0xc0(%rsp)
lea    0x0(,%r15,8),%rax
mov    %rax,0xb8(%rsp)
mov    0x8(%rsp),%r11
mov    $0x1,%eax
xorpd  %xmm0,%xmm0
jmp    12b9 <Sgaussj+0x169>
nopl   0x0(%rax)
add    $0x1,%rax
cmp    %rbp,%rax
je     1310 <Sgaussj+0x1c0>
cmpl   $0x1,0x0(%r13,%rax,4)
je     12b0 <Sgaussj+0x160>
mov    $0x1,%ecx
jmp    12e2 <Sgaussj+0x192>
nopl   0x0(%rax,%rax,1)
cmp    $0x1,%edx
jg     1913 <Sgaussj+0x7c3>
add    $0x1,%rcx
cmp    %rcx,%rbp
je     12b0 <Sgaussj+0x160>
mov    0x0(%r13,%rcx,4),%edx
test   %edx,%edx
jne    12d0 <Sgaussj+0x180>
mov    (%r11,%rax,8),%rdx
movsd  (%rdx,%rcx,8),%xmm1
andpd  %xmm2,%xmm1
ucomisd %xmm0,%xmm1
jb     12d9 <Sgaussj+0x189>
mov    %eax,%edx
mov    %eax,0x4(%rsp)
movapd %xmm1,%xmm0
mov    %ecx,%edx
mov    %ecx,0x14(%rsp)
jmp    12d9 <Sgaussj+0x189>
mov    %r15,0xa0(%rsp)
mov    %rsi,0x60(%rsp)
mov    %r9,0x40(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r10,0x70(%rsp)
mov    %rdi,0x38(%rsp)
mov    %r8,0x78(%rsp)
mov    %r12,0xa8(%rsp)
mov    %r14,0x68(%rsp)
movslq 0x14(%rsp),%rsi
addl   $0x1,0x0(%r13,%rsi,4)
cmp    %esi,0x4(%rsp)
mov    %rsi,0x28(%rsp)
je     13d1 <Sgaussj+0x281>
movslq 0x4(%rsp),%r14
mov    $0x8,%ebx
mov    0x8(%rsp),%r12
mov    0xc0(%rsp),%r15
mov    (%r12,%r14,8),%rdi
add    %rbx,%rdi
mov    (%r12,%rsi,8),%rsi
add    %rbx,%rsi
call   1070 <swap@plt>
mov    0x28(%rsp),%rsi
add    $0x8,%rbx
cmp    %rbx,%r15
jne    1370 <Sgaussj+0x220>
cmpl   $0x0,0x68(%rsp)
mov    0x58(%rsp),%r12
mov    0xb8(%rsp),%r15
jle    13d1 <Sgaussj+0x281>
mov    $0x8,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r12,%r14,8),%rdi
add    %rbx,%rdi
mov    (%r12,%rsi,8),%rsi
add    %rbx,%rsi
call   1070 <swap@plt>
mov    0x28(%rsp),%rsi
add    $0x8,%rbx
cmp    %rbx,%r15
jne    13b0 <Sgaussj+0x260>
mov    0x80(%rsp),%rax
mov    0x50(%rsp),%rcx
mov    0x4(%rsp),%edx
mov    %edx,(%rax,%rcx,4)
mov    0x88(%rsp),%r14
mov    %esi,(%r14,%rcx,4)
mov    0x8(%rsp),%r11
mov    (%r11,%rsi,8),%rax
movsd  (%rax,%rsi,8),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    140f <Sgaussj+0x2bf>
jnp    19eb <Sgaussj+0x89b>
movsd  0xbf9(%rip),%xmm0
divsd  %xmm1,%xmm0
movabs $0x3ff0000000000000,%rcx
mov    %rcx,(%rax,%rsi,8)
mov    $0x1,%ecx
mov    0xa8(%rsp),%r12
cmp    $0x4,%r12d
mov    0x68(%rsp),%r14
mov    0x78(%rsp),%rdx
mov    0x70(%rsp),%r8
mov    0x40(%rsp),%rbx
mov    0xa0(%rsp),%r15
jb     1510 <Sgaussj+0x3c0>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmp    $0x4,%rdx
jae    1473 <Sgaussj+0x323>
xor    %ecx,%ecx
mov    0x38(%rsp),%rdi
jmp    14ca <Sgaussj+0x37a>
mov    0x60(%rsp),%rdx
xor    %ecx,%ecx
mov    0x38(%rsp),%rdi
nop
movupd 0x8(%rax,%rcx,8),%xmm2
movupd 0x18(%rax,%rcx,8),%xmm3
movupd 0x28(%rax,%rcx,8),%xmm4
movupd 0x38(%rax,%rcx,8),%xmm5
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x8(%rax,%rcx,8)
movupd %xmm3,0x18(%rax,%rcx,8)
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,0x28(%rax,%rcx,8)
movupd %xmm5,0x38(%rax,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rdx
jne    1480 <Sgaussj+0x330>
test   $0x1,%dil
je     14f6 <Sgaussj+0x3a6>
shl    $0x3,%rcx
or     $0x8,%rcx
movupd (%rax,%rcx,1),%xmm2
movupd 0x10(%rax,%rcx,1),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rax,%rcx,1)
movupd %xmm3,0x10(%rax,%rcx,1)
mov    %rbx,%rcx
cmp    0x98(%rsp),%r12
je     1527 <Sgaussj+0x3d7>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rbp
jne    1510 <Sgaussj+0x3c0>
test   %r14d,%r14d
jle    1627 <Sgaussj+0x4d7>
mov    0x58(%rsp),%rcx
mov    (%rcx,%rsi,8),%rcx
mov    $0x1,%edx
cmpq   $0x4,0x20(%rsp)
jb     1610 <Sgaussj+0x4c0>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
cmp    $0x4,%r8
jae    1566 <Sgaussj+0x416>
xor    %edx,%edx
mov    0x30(%rsp),%rdi
mov    0x48(%rsp),%rbx
jmp    15ca <Sgaussj+0x47a>
mov    0xb0(%rsp),%rsi
xor    %edx,%edx
mov    0x30(%rsp),%rdi
mov    0x48(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
movupd 0x8(%rcx,%rdx,8),%xmm2
movupd 0x18(%rcx,%rdx,8),%xmm3
movupd 0x28(%rcx,%rdx,8),%xmm4
movupd 0x38(%rcx,%rdx,8),%xmm5
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x8(%rcx,%rdx,8)
movupd %xmm3,0x18(%rcx,%rdx,8)
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,0x28(%rcx,%rdx,8)
movupd %xmm5,0x38(%rcx,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    1580 <Sgaussj+0x430>
test   $0x1,%dil
je     15f6 <Sgaussj+0x4a6>
shl    $0x3,%rdx
or     $0x8,%rdx
movupd (%rcx,%rdx,1),%xmm2
movupd 0x10(%rcx,%rdx,1),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%rcx,%rdx,1)
movupd %xmm3,0x10(%rcx,%rdx,1)
mov    0x90(%rsp),%rdx
cmp    %rbx,0x20(%rsp)
je     1627 <Sgaussj+0x4d7>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rcx,%rdx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rcx,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r15
jne    1610 <Sgaussj+0x4c0>
mov    0x14(%rsp),%r10d
lea    0x8(%rax),%r8
lea    (%rax,%rbp,8),%r9
mov    $0x1,%edi
jmp    164d <Sgaussj+0x4fd>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdi
cmp    %rbp,%rdi
je     18af <Sgaussj+0x75f>
cmp    %r10,%rdi
je     1640 <Sgaussj+0x4f0>
mov    (%r11,%rdi,8),%rdx
mov    0x28(%rsp),%rcx
movsd  (%rdx,%rcx,8),%xmm0
movq   $0x0,(%rdx,%rcx,8)
mov    $0x1,%ecx
cmp    $0x4,%r12d
jb     16f0 <Sgaussj+0x5a0>
lea    0x8(%rdx),%rsi
cmp    %r9,%rsi
jae    1689 <Sgaussj+0x539>
lea    (%rdx,%rbp,8),%rsi
cmp    %rsi,%r8
jb     16f0 <Sgaussj+0x5a0>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
xor    %ecx,%ecx
mov    0x98(%rsp),%rsi
nopl   0x0(%rax,%rax,1)
movupd 0x8(%rax,%rcx,8),%xmm2
movupd 0x18(%rax,%rcx,8),%xmm3
movupd 0x8(%rdx,%rcx,8),%xmm4
movupd 0x18(%rdx,%rcx,8),%xmm5
mulpd  %xmm1,%xmm2
subpd  %xmm2,%xmm4
mulpd  %xmm1,%xmm3
subpd  %xmm3,%xmm5
movupd %xmm4,0x8(%rdx,%rcx,8)
movupd %xmm5,0x18(%rdx,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rsi
jne    16a0 <Sgaussj+0x550>
mov    0x40(%rsp),%rcx
cmp    %rsi,%r12
je     176a <Sgaussj+0x61a>
nopl   0x0(%rax,%rax,1)
mov    %rcx,%rsi
test   $0x1,%bpl
jne    1714 <Sgaussj+0x5c4>
movsd  (%rdx,%rcx,8),%xmm1
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,(%rdx,%rcx,8)
lea    0x1(%rcx),%rsi
not    %rcx
cmp    0xd0(%rsp),%rcx
je     176a <Sgaussj+0x61a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rax,%rsi,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  (%rdx,%rsi,8),%xmm2
subsd  %xmm1,%xmm2
movsd  0x8(%rdx,%rsi,8),%xmm1
movsd  %xmm2,(%rdx,%rsi,8)
movsd  0x8(%rax,%rsi,8),%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rdx,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%rbp
jne    1730 <Sgaussj+0x5e0>
test   %r14d,%r14d
jle    1640 <Sgaussj+0x4f0>
mov    0x58(%rsp),%rcx
mov    0x28(%rsp),%rdx
mov    (%rcx,%rdx,8),%rdx
mov    (%rcx,%rdi,8),%rsi
mov    $0x1,%ebx
cmpq   $0x4,0x20(%rsp)
jb     1830 <Sgaussj+0x6e0>
lea    0x8(%rsi),%r11
lea    (%rdx,%r15,8),%rcx
cmp    %rcx,%r11
mov    0x8(%rsp),%r11
jae    17ba <Sgaussj+0x66a>
lea    (%rsi,%r15,8),%r11
lea    0x8(%rdx),%rcx
cmp    %r11,%rcx
mov    0x8(%rsp),%r11
jb     1830 <Sgaussj+0x6e0>
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
xor    %ecx,%ecx
mov    0x48(%rsp),%rbx
nopl   0x0(%rax)
movupd 0x8(%rdx,%rcx,8),%xmm2
movupd 0x18(%rdx,%rcx,8),%xmm3
movupd 0x8(%rsi,%rcx,8),%xmm4
movupd 0x18(%rsi,%rcx,8),%xmm5
mulpd  %xmm1,%xmm2
subpd  %xmm2,%xmm4
mulpd  %xmm1,%xmm3
subpd  %xmm3,%xmm5
movupd %xmm4,0x8(%rsi,%rcx,8)
movupd %xmm5,0x18(%rsi,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rbx
jne    17d0 <Sgaussj+0x680>
mov    %rbx,%rcx
mov    0x90(%rsp),%rbx
cmp    %rcx,0x20(%rsp)
je     1640 <Sgaussj+0x4f0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rcx
test   $0x1,%r15b
jne    1854 <Sgaussj+0x704>
movsd  (%rsi,%rbx,8),%xmm1
movsd  (%rdx,%rbx,8),%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,(%rsi,%rbx,8)
lea    0x1(%rbx),%rcx
not    %rbx
cmp    0xc8(%rsp),%rbx
je     1640 <Sgaussj+0x4f0>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rdx,%rcx,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  (%rsi,%rcx,8),%xmm2
subsd  %xmm1,%xmm2
movsd  0x8(%rsi,%rcx,8),%xmm1
movsd  %xmm2,(%rsi,%rcx,8)
movsd  0x8(%rdx,%rcx,8),%xmm2
mulsd  %xmm0,%xmm2
subsd  %xmm2,%xmm1
movsd  %xmm1,0x8(%rsi,%rcx,8)
add    $0x2,%rcx
cmp    %rcx,%r15
jne    1870 <Sgaussj+0x720>
jmp    1640 <Sgaussj+0x4f0>
mov    0x50(%rsp),%rax
add    $0x1,%rax
mov    %rax,0x50(%rsp)
cmp    %rbp,%rax
mov    0x78(%rsp),%r8
mov    0x38(%rsp),%rdi
mov    0x70(%rsp),%r10
mov    0x30(%rsp),%rbx
mov    0x40(%rsp),%r9
mov    0x60(%rsp),%rsi
movapd 0x71a(%rip),%xmm2
jne    129e <Sgaussj+0x14e>
mov    0x18(%rsp),%rdx
test   %edx,%edx
mov    0x80(%rsp),%rbp
mov    0x88(%rsp),%r14
jle    19b0 <Sgaussj+0x860>
add    $0x1,%edx
mov    %rdx,0x18(%rsp)
jmp    193a <Sgaussj+0x7ea>
lea    0x72f(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
jmp    19d9 <Sgaussj+0x889>
lea    -0x1(%r12),%rax
cmp    $0x1,%r12
mov    %rax,%r12
mov    %rsi,%rbp
jle    19b0 <Sgaussj+0x860>
movslq 0x0(%rbp,%r12,4),%rax
movslq (%r14,%r12,4),%rcx
cmp    %ecx,%eax
mov    %rbp,%rsi
mov    0x8(%rsp),%rbp
je     1929 <Sgaussj+0x7d9>
mov    0x8(%rbp),%rdx
lea    (%rdx,%rax,8),%rdi
mov    %rsi,%r15
lea    (%rdx,%rcx,8),%rsi
call   1070 <swap@plt>
mov    %r15,%rsi
mov    0x18(%rsp),%rdx
cmp    $0x2,%edx
je     1929 <Sgaussj+0x7d9>
mov    $0x2,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movslq (%rsi,%r12,4),%rax
movslq (%r14,%r12,4),%rcx
mov    0x0(%rbp,%rbx,8),%rdx
lea    (%rdx,%rax,8),%rdi
lea    (%rdx,%rcx,8),%rsi
call   1070 <swap@plt>
mov    %r15,%rsi
mov    0x18(%rsp),%rdx
add    $0x1,%rbx
cmp    %rbx,%rdx
jne    1980 <Sgaussj+0x830>
jmp    1929 <Sgaussj+0x7d9>
mov    %r13,%rdi
mov    $0x1,%esi
call   1040 <free_intVector@plt>
mov    %rbp,%rdi
mov    $0x1,%esi
call   1040 <free_intVector@plt>
mov    %r14,%rdi
mov    $0x1,%esi
call   1040 <free_intVector@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x626(%rip),%rdi
jmp    191a <Sgaussj+0x7ca>

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

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