#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 linsolvx(int nDim, double *pfMatr, double *pfVect, double *pfSolution) {
  double fMaxElem;
  double fAcc;
  int i, j, k, m;
  for (k = 0; k < (nDim - 1); k++) {
    fMaxElem = fabs(pfMatr[k * nDim + k]);
    m = k;
    for (i = k + 1; i < nDim; i++) {
      if (fMaxElem < fabs(pfMatr[i * nDim + k])) {
        fMaxElem = pfMatr[i * nDim + k];
        m = i;
      }
    }
    if (m != k) {
      for (i = k; i < nDim; i++) {
        fAcc = pfMatr[k * nDim + i];
        pfMatr[k * nDim + i] = pfMatr[m * nDim + i];
        pfMatr[m * nDim + i] = fAcc;
      }
      fAcc = pfVect[k];
      pfVect[k] = pfVect[m];
      pfVect[m] = fAcc;
    }
    if (pfMatr[k * nDim + k] == 0.)
      return 1;
    for (j = (k + 1); j < nDim; j++) {
      fAcc = -pfMatr[j * nDim + k] / pfMatr[k * nDim + k];
      for (i = k; i < nDim; i++) {
        pfMatr[j * nDim + i] =
            pfMatr[j * nDim + i] + fAcc * pfMatr[k * nDim + i];
      }
      pfVect[j] = pfVect[j] + fAcc * pfVect[k];
    }
  }
  for (k = (nDim - 1); k >= 0; k--) {
    pfSolution[k] = pfVect[k];
    for (i = (k + 1); i < nDim; i++) {
      pfSolution[k] -= (pfMatr[k * nDim + i] * pfSolution[i]);
    }
    pfSolution[k] = pfSolution[k] / pfMatr[k * nDim + k];
  }
  return 0;
}


x86 assembly (clang, -O0):
<linsolvx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13f2 <linsolvx+0x2f2>
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xeb8(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11d0 <linsolvx+0xd0>
movsd  -0x28(%rbp),%xmm1
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movaps 0xe72(%rip),%xmm2
pand   %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jbe    11bd <linsolvx+0xbd>
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x40(%rbp)
jmp    11c2 <linsolvx+0xc2>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1160 <linsolvx+0x60>
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
je     129c <linsolvx+0x19c>
mov    -0x3c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    125e <linsolvx+0x15e>
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11e2 <linsolvx+0xe2>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    12d1 <linsolvx+0x1d1>
jp     12d1 <linsolvx+0x1d1>
movl   $0x1,-0x4(%rbp)
jmp    14db <linsolvx+0x3db>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    13df <linsolvx+0x2df>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    139d <linsolvx+0x29d>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x30(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1334 <linsolvx+0x234>
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x38(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12da <linsolvx+0x1da>
jmp    13e4 <linsolvx+0x2e4>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    111a <linsolvx+0x1a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jl     14d4 <linsolvx+0x3d4>
mov    -0x18(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1496 <linsolvx+0x396>
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x34(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0x20(%rbp),%rax
movslq -0x3c(%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    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1428 <linsolvx+0x328>
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x3c(%rbp),%ecx
imul   -0x8(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3c(%rbp)
jmp    13fb <linsolvx+0x2fb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linsolvx>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x60,%rsp
mov    %rcx,0x8(%rsp)
mov    %rdx,-0x68(%rsp)
mov    %rsi,-0x80(%rsp)
mov    %edi,%r9d
cmp    $0x2,%edi
jl     1719 <linsolvx+0x619>
lea    -0x1(%r9),%eax
mov    %rax,0x20(%rsp)
mov    %r9d,%eax
lea    0x0(,%rax,8),%rdx
lea    0x8(,%rax,8),%rdi
lea    (%rax,%rax,1),%rcx
mov    %rcx,0x10(%rsp)
mov    %rax,%rcx
neg    %rcx
mov    %rcx,-0x10(%rsp)
mov    -0x80(%rsp),%rcx
lea    (%rcx,%rax,8),%r8
lea    -0x4(%rax),%r14
lea    0x30(%rcx),%rbp
lea    0x10(%rcx),%rbx
lea    0x8(%rcx),%r10
lea    (%rcx,%rax,8),%rcx
add    $0x10,%rcx
mov    %rcx,-0x50(%rsp)
mov    $0x1,%r11d
xor    %esi,%esi
movapd 0xe71(%rip),%xmm0
xorpd  %xmm8,%xmm8
movapd 0xe74(%rip),%xmm2
mov    %rax,-0x58(%rsp)
mov    %r10,(%rsp)
mov    %rbx,-0x60(%rsp)
mov    %r8,-0x48(%rsp)
mov    %r8,%r15
mov    %r9,0x28(%rsp)
mov    %rdx,0x58(%rsp)
mov    %rdi,0x18(%rsp)
jmp    1228 <linsolvx+0x128>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    -0x30(%rsp),%r11
add    $0x1,%r11
mov    0x18(%rsp),%rdi
mov    0x38(%rsp),%r15
add    %rdi,%r15
mov    0x30(%rsp),%r14
add    $0xffffffffffffffff,%r14
mov    -0x40(%rsp),%rbp
add    %rdi,%rbp
addq   $0x8,-0x60(%rsp)
add    %rdx,%r10
addq   $0xffffffffffffffff,-0x58(%rsp)
add    %rdi,-0x50(%rsp)
add    %rdi,%rbx
add    %rdx,-0x48(%rsp)
mov    -0x38(%rsp),%rsi
cmp    0x20(%rsp),%rsi
mov    0x28(%rsp),%r9
je     1719 <linsolvx+0x619>
mov    %rbp,-0x40(%rsp)
imul   %rsi,%rdi
mov    %rdi,-0x18(%rsp)
mov    %rsi,%rcx
imul   %rax,%rcx
mov    %rcx,%rdi
mov    %rcx,-0x70(%rsp)
lea    (%rcx,%rax,1),%r8
mov    %esi,%edi
imul   %r9d,%edi
movslq %edi,%rdi
add    %rsi,%rdi
mov    -0x80(%rsp),%rcx
mov    %rdi,-0x8(%rsp)
movsd  (%rcx,%rdi,8),%xmm4
lea    0x1(%rsi),%r13
cmp    %rax,%r13
mov    %r11,-0x30(%rsp)
jae    12d0 <linsolvx+0x1d0>
movapd %xmm4,%xmm5
andpd  %xmm0,%xmm5
mov    %r15,%rbp
mov    %r11,%rdi
mov    %esi,%r11d
movapd %xmm5,%xmm3
nopw   0x0(%rax,%rax,1)
movsd  0x0(%rbp),%xmm6
movapd %xmm6,%xmm7
andpd  %xmm0,%xmm7
ucomisd %xmm5,%xmm7
cmpltsd %xmm7,%xmm3
andpd  %xmm3,%xmm6
andnpd %xmm5,%xmm3
cmova  %edi,%r11d
orpd   %xmm6,%xmm3
add    $0x1,%rdi
add    %rdx,%rbp
movapd %xmm3,%xmm5
cmp    %rdi,%rax
jne    1290 <linsolvx+0x190>
jmp    12d3 <linsolvx+0x1d3>
nopl   0x0(%rax,%rax,1)
mov    %esi,%r11d
mov    %rax,%rdi
sub    %rsi,%rdi
mov    %rdi,-0x78(%rsp)
mov    -0x18(%rsp),%rdi
add    %rcx,%rdi
mov    %rdi,-0x28(%rsp)
lea    (%rcx,%r8,8),%rdi
mov    %rdi,-0x20(%rsp)
mov    %r11d,%edi
cmp    %rdi,%rsi
mov    %r15,0x38(%rsp)
mov    %r13,-0x38(%rsp)
je     1525 <linsolvx+0x425>
cmp    %rax,%rsi
jae    14fb <linsolvx+0x3fb>
mov    %r11d,%edi
imul   %r9d,%edi
movslq %edi,%r8
mov    %rsi,%r12
cmpq   $0x4,-0x78(%rsp)
jb     1470 <linsolvx+0x370>
mov    -0x78(%rsp),%rdi
lea    (%rcx,%rdi,8),%rbp
lea    (%rsi,%r8,1),%rdi
lea    0x0(%rbp,%rdi,8),%rbp
cmp    %rbp,-0x28(%rsp)
jae    1357 <linsolvx+0x257>
lea    (%rcx,%rdi,8),%rdi
mov    %rsi,%r12
cmp    -0x20(%rsp),%rdi
jb     1470 <linsolvx+0x370>
mov    -0x78(%rsp),%rdi
add    $0xfffffffffffffffc,%rdi
mov    %rdi,%r15
shr    $0x2,%r15
add    $0x1,%r15
cmp    $0x4,%rdi
jae    1378 <linsolvx+0x278>
xor    %ebp,%ebp
jmp    1408 <linsolvx+0x308>
mov    %r14,%r12
shr    $0x2,%r12
add    $0x1,%r12
and    $0xfffffffffffffffe,%r12
mov    -0x60(%rsp),%rdi
lea    (%rdi,%r8,8),%r13
xor    %ebp,%ebp
mov    -0x40(%rsp),%rdi
nopw   0x0(%rax,%rax,1)
movups -0x30(%rdi,%rbp,8),%xmm3
movups -0x20(%rdi,%rbp,8),%xmm4
movups -0x10(%r13,%rbp,8),%xmm5
movups 0x0(%r13,%rbp,8),%xmm6
movups %xmm5,-0x30(%rdi,%rbp,8)
movups %xmm6,-0x20(%rdi,%rbp,8)
movups %xmm3,-0x10(%r13,%rbp,8)
movups %xmm4,0x0(%r13,%rbp,8)
movupd -0x10(%rdi,%rbp,8),%xmm3
movupd (%rdi,%rbp,8),%xmm4
movupd 0x10(%r13,%rbp,8),%xmm5
movupd 0x20(%r13,%rbp,8),%xmm6
movupd %xmm5,-0x10(%rdi,%rbp,8)
movupd %xmm6,(%rdi,%rbp,8)
movupd %xmm3,0x10(%r13,%rbp,8)
movupd %xmm4,0x20(%r13,%rbp,8)
add    $0x8,%rbp
add    $0xfffffffffffffffe,%r12
jne    13a0 <linsolvx+0x2a0>
mov    -0x78(%rsp),%r12
and    $0xfffffffffffffffc,%r12
test   $0x1,%r15b
je     1457 <linsolvx+0x357>
add    %rsi,%rbp
mov    -0x70(%rsp),%rcx
lea    (%rcx,%rbp,1),%rdi
mov    -0x80(%rsp),%rcx
movupd (%rcx,%rdi,8),%xmm3
movupd 0x10(%rcx,%rdi,8),%xmm4
add    %r8,%rbp
movupd (%rcx,%rbp,8),%xmm5
movupd 0x10(%rcx,%rbp,8),%xmm6
movupd %xmm5,(%rcx,%rdi,8)
movupd %xmm6,0x10(%rcx,%rdi,8)
movupd %xmm3,(%rcx,%rbp,8)
movupd %xmm4,0x10(%rcx,%rbp,8)
cmp    %r12,-0x78(%rsp)
mov    -0x38(%rsp),%r13
je     14fb <linsolvx+0x3fb>
add    %rsi,%r12
nopw   0x0(%rax,%rax,1)
mov    %eax,%ebp
sub    %r12d,%ebp
mov    %r12,%rdi
test   $0x1,%bpl
je     14a9 <linsolvx+0x3a9>
mov    -0x70(%rsp),%rcx
lea    (%r12,%rcx,1),%rdi
mov    -0x80(%rsp),%rcx
movsd  (%rcx,%rdi,8),%xmm3
lea    (%r12,%r8,1),%rbp
movsd  (%rcx,%rbp,8),%xmm4
movsd  %xmm4,(%rcx,%rdi,8)
movsd  %xmm3,(%rcx,%rbp,8)
lea    0x1(%r12),%rdi
not    %r12
cmp    -0x10(%rsp),%r12
je     14fb <linsolvx+0x3fb>
mov    (%rsp),%rbp
lea    0x0(%rbp,%r8,8),%rbp
nopl   0x0(%rax)
movsd  -0x8(%r10,%rdi,8),%xmm3
movsd  -0x8(%rbp,%rdi,8),%xmm4
movsd  %xmm4,-0x8(%r10,%rdi,8)
movsd  %xmm3,-0x8(%rbp,%rdi,8)
movsd  (%r10,%rdi,8),%xmm3
movsd  0x0(%rbp,%rdi,8),%xmm4
movsd  %xmm4,(%r10,%rdi,8)
movsd  %xmm3,0x0(%rbp,%rdi,8)
add    $0x2,%rdi
cmp    %rdi,%rax
jne    14c0 <linsolvx+0x3c0>
mov    -0x68(%rsp),%rbp
movsd  0x0(%rbp,%rsi,8),%xmm3
movslq %r11d,%rdi
movsd  0x0(%rbp,%rdi,8),%xmm4
movsd  %xmm4,0x0(%rbp,%rsi,8)
movsd  %xmm3,0x0(%rbp,%rdi,8)
mov    -0x8(%rsp),%rdi
movsd  (%rcx,%rdi,8),%xmm4
ucomisd %xmm8,%xmm4
jne    1532 <linsolvx+0x432>
jnp    1829 <linsolvx+0x729>
mov    %r14,0x30(%rsp)
cmp    %rax,%r13
jae    11d0 <linsolvx+0xd0>
mov    -0x58(%rsp),%rbp
and    $0xfffffffffffffffc,%rbp
mov    0x10(%rsp),%rdx
mov    -0x70(%rsp),%rcx
add    %rdx,%rcx
mov    %rcx,0x50(%rsp)
mov    -0x80(%rsp),%rcx
mov    -0x78(%rsp),%rdx
and    $0xfffffffffffffffc,%rdx
mov    %rdx,0x48(%rsp)
add    %rsi,%rdx
mov    %rdx,0x40(%rsp)
mov    -0x48(%rsp),%r12
mov    -0x50(%rsp),%r13
xor    %r15d,%r15d
mov    -0x30(%rsp),%r11
nopl   0x0(%rax,%rax,1)
mov    %r11,%r8
imul   %rax,%r8
lea    (%r8,%rsi,1),%rdi
movsd  (%rcx,%rdi,8),%xmm3
xorpd  %xmm2,%xmm3
divsd  %xmm4,%xmm3
mov    %rsi,%r9
cmpq   $0x4,-0x78(%rsp)
jb     1650 <linsolvx+0x550>
mov    %r15,%rdi
imul   %rax,%rdi
lea    (%rdi,%rax,1),%rdx
lea    (%rcx,%rdx,8),%rdx
add    -0x18(%rsp),%rdx
cmp    -0x20(%rsp),%rdx
jae    15e5 <linsolvx+0x4e5>
add    0x50(%rsp),%rdi
lea    (%rcx,%rdi,8),%rdx
mov    %rsi,%r9
cmp    %rdx,-0x28(%rsp)
jb     1650 <linsolvx+0x550>
movapd %xmm3,%xmm4
unpcklpd %xmm3,%xmm4
xor    %edi,%edi
nop
movupd -0x10(%r13,%rdi,8),%xmm5
movupd 0x0(%r13,%rdi,8),%xmm6
movupd -0x10(%rbx,%rdi,8),%xmm7
movupd (%rbx,%rdi,8),%xmm1
mulpd  %xmm4,%xmm7
addpd  %xmm5,%xmm7
mulpd  %xmm4,%xmm1
addpd  %xmm6,%xmm1
movupd %xmm7,-0x10(%r13,%rdi,8)
movupd %xmm1,0x0(%r13,%rdi,8)
add    $0x4,%rdi
cmp    %rdi,%rbp
jne    15f0 <linsolvx+0x4f0>
mov    0x40(%rsp),%r9
mov    0x48(%rsp),%rdx
cmp    %rdx,-0x78(%rsp)
je     16d8 <linsolvx+0x5d8>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %eax,%edx
sub    %r9d,%edx
mov    %r9,%r14
test   $0x1,%dl
je     1687 <linsolvx+0x587>
add    %r9,%r8
mov    -0x70(%rsp),%rcx
lea    (%r9,%rcx,1),%rdx
mov    -0x80(%rsp),%rcx
movsd  (%rcx,%rdx,8),%xmm1
mulsd  %xmm3,%xmm1
addsd  (%rcx,%r8,8),%xmm1
movsd  %xmm1,(%rcx,%r8,8)
lea    0x1(%r9),%r14
not    %r9
cmp    -0x10(%rsp),%r9
je     16d8 <linsolvx+0x5d8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  -0x8(%r10,%r14,8),%xmm1
mulsd  %xmm3,%xmm1
addsd  (%r12,%r14,8),%xmm1
movsd  %xmm1,(%r12,%r14,8)
movsd  (%r10,%r14,8),%xmm1
mulsd  %xmm3,%xmm1
addsd  0x8(%r12,%r14,8),%xmm1
movsd  %xmm1,0x8(%r12,%r14,8)
add    $0x2,%r14
cmp    %r14,%rax
jne    16a0 <linsolvx+0x5a0>
mov    -0x68(%rsp),%rdx
mulsd  (%rdx,%rsi,8),%xmm3
addsd  (%rdx,%r11,8),%xmm3
movsd  %xmm3,(%rdx,%r11,8)
add    $0x1,%r11
cmp    %rax,%r11
mov    0x58(%rsp),%rdx
je     11d0 <linsolvx+0xd0>
mov    -0x8(%rsp),%rdi
movsd  (%rcx,%rdi,8),%xmm4
add    $0x1,%r15
add    %rdx,%r13
add    %rdx,%r12
jmp    1590 <linsolvx+0x490>
test   %r9d,%r9d
jle    1825 <linsolvx+0x725>
mov    %r9d,%ebp
lea    -0x1(%rbp),%rax
imul   %rbp,%rax
mov    -0x80(%rsp),%rcx
lea    (%rcx,%rax,8),%rdi
add    $0x8,%rdi
lea    0x0(,%rbp,8),%r8
neg    %r8
xor    %r9d,%r9d
mov    %rbp,%rax
mov    0x8(%rsp),%rdx
mov    -0x80(%rsp),%rsi
jmp    1784 <linsolvx+0x684>
nopw   0x0(%rax,%rax,1)
mov    -0x80(%rsp),%rcx
add    %rax,%r11
divsd  (%rcx,%r11,8),%xmm0
movsd  %xmm0,(%rdx,%rax,8)
add    $0x1,%r9d
add    %r8,%rdi
cmp    $0x1,%r10
jle    1825 <linsolvx+0x725>
mov    %rax,%r10
add    $0xffffffffffffffff,%rax
mov    -0x68(%rsp),%rcx
movsd  -0x8(%rcx,%r10,8),%xmm0
movsd  %xmm0,-0x8(%rdx,%r10,8)
mov    %rax,%r11
imul   %rbp,%r11
cmp    %rbp,%r10
jge    1760 <linsolvx+0x660>
test   $0x1,%r9b
jne    17c0 <linsolvx+0x6c0>
mov    %r10,%rbx
mov    -0x80(%rsp),%rcx
cmp    $0x1,%r9d
jne    17f0 <linsolvx+0x6f0>
jmp    1765 <linsolvx+0x665>
lea    (%r10,%r11,1),%rcx
movsd  (%rsi,%rcx,8),%xmm1
mov    %rsi,%rcx
mulsd  (%rdx,%r10,8),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rdx,%rax,8)
lea    0x1(%r10),%rbx
cmp    $0x1,%r9d
je     1765 <linsolvx+0x665>
cs nopw 0x0(%rax,%rax,1)
nop
movsd  -0x8(%rdi,%rbx,8),%xmm1
mulsd  (%rdx,%rbx,8),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rdx,%rax,8)
movsd  (%rdi,%rbx,8),%xmm1
mulsd  0x8(%rdx,%rbx,8),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rdx,%rax,8)
add    $0x2,%rbx
cmp    %ebx,%ebp
jne    17f0 <linsolvx+0x6f0>
jmp    1765 <linsolvx+0x665>
xor    %eax,%eax
jmp    182e <linsolvx+0x72e>
mov    $0x1,%eax
add    $0x60,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @linsolvx(i32 %0, double* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
%11 = alloca double
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 %0, i32* %6
store double* %1, double** %7
store double* %2, double** %8
store double* %3, double** %9
store i32 0, i32* %14
br label %16
16: ; preds = %234, %4
%17 = load i32, i32* %14
%18 = load i32, i32* %6
%19 = sub nsw i32 %18, 1
%20 = icmp slt i32 %17, %19
br i1 %20, label %21, label %237
21: ; preds = %16
%22 = load double*, double** %7
%23 = load i32, i32* %14
%24 = load i32, i32* %6
%25 = mul nsw i32 %23, %24
%26 = load i32, i32* %14
%27 = add nsw i32 %25, %26
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds double, double* %22, i64 %28
%30 = load double, double* %29
%31 = call double @llvm.fabs.f64(double %30)
store double %31, double* %10
%32 = load i32, i32* %14
store i32 %32, i32* %15
%33 = load i32, i32* %14
%34 = add nsw i32 %33, 1
store i32 %34, i32* %12
br label %35
35: ; preds = %64, %21
%36 = load i32, i32* %12
%37 = load i32, i32* %6
%38 = icmp slt i32 %36, %37
br i1 %38, label %39, label %67
39: ; preds = %35
%40 = load double, double* %10
%41 = load double*, double** %7
%42 = load i32, i32* %12
%43 = load i32, i32* %6
%44 = mul nsw i32 %42, %43
%45 = load i32, i32* %14
%46 = add nsw i32 %44, %45
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %41, i64 %47
%49 = load double, double* %48
%50 = call double @llvm.fabs.f64(double %49)
%51 = fcmp olt double %40, %50
br i1 %51, label %52, label %63
52: ; preds = %39
%53 = load double*, double** %7
%54 = load i32, i32* %12
%55 = load i32, i32* %6
%56 = mul nsw i32 %54, %55
%57 = load i32, i32* %14
%58 = add nsw i32 %56, %57
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds double, double* %53, i64 %59
%61 = load double, double* %60
store double %61, double* %10
%62 = load i32, i32* %12
store i32 %62, i32* %15
br label %63
63: ; preds = %52, %39
br label %64
64: ; preds = %63
%65 = load i32, i32* %12
%66 = add nsw i32 %65, 1
store i32 %66, i32* %12
br label %35
67: ; preds = %35
%68 = load i32, i32* %15
%69 = load i32, i32* %14
%70 = icmp ne i32 %68, %69
br i1 %70, label %71, label %136
71: ; preds = %67
%72 = load i32, i32* %14
store i32 %72, i32* %12
br label %73
73: ; preds = %113, %71
%74 = load i32, i32* %12
%75 = load i32, i32* %6
%76 = icmp slt i32 %74, %75
br i1 %76, label %77, label %116
77: ; preds = %73
%78 = load double*, double** %7
%79 = load i32, i32* %14
%80 = load i32, i32* %6
%81 = mul nsw i32 %79, %80
%82 = load i32, i32* %12
%83 = add nsw i32 %81, %82
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %78, i64 %84
%86 = load double, double* %85
store double %86, double* %11
%87 = load double*, double** %7
%88 = load i32, i32* %15
%89 = load i32, i32* %6
%90 = mul nsw i32 %88, %89
%91 = load i32, i32* %12
%92 = add nsw i32 %90, %91
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %87, i64 %93
%95 = load double, double* %94
%96 = load double*, double** %7
%97 = load i32, i32* %14
%98 = load i32, i32* %6
%99 = mul nsw i32 %97, %98
%100 = load i32, i32* %12
%101 = add nsw i32 %99, %100
%102 = sext i32 %101 to i64
%103 = getelementptr inbounds double, double* %96, i64 %102
store double %95, double* %103
%104 = load double, double* %11
%105 = load double*, double** %7
%106 = load i32, i32* %15
%107 = load i32, i32* %6
%108 = mul nsw i32 %106, %107
%109 = load i32, i32* %12
%110 = add nsw i32 %108, %109
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %105, i64 %111
store double %104, double* %112
br label %113
113: ; preds = %77
%114 = load i32, i32* %12
%115 = add nsw i32 %114, 1
store i32 %115, i32* %12
br label %73
116: ; preds = %73
%117 = load double*, double** %8
%118 = load i32, i32* %14
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds double, double* %117, i64 %119
%121 = load double, double* %120
store double %121, double* %11
%122 = load double*, double** %8
%123 = load i32, i32* %15
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds double, double* %122, i64 %124
%126 = load double, double* %125
%127 = load double*, double** %8
%128 = load i32, i32* %14
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds double, double* %127, i64 %129
store double %126, double* %130
%131 = load double, double* %11
%132 = load double*, double** %8
%133 = load i32, i32* %15
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds double, double* %132, i64 %134
store double %131, double* %135
br label %136
136: ; preds = %116, %67
%137 = load double*, double** %7
%138 = load i32, i32* %14
%139 = load i32, i32* %6
%140 = mul nsw i32 %138, %139
%141 = load i32, i32* %14
%142 = add nsw i32 %140, %141
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds double, double* %137, i64 %143
%145 = load double, double* %144
%146 = fcmp oeq double %145, 0.000000e+00
br i1 %146, label %147, label %148
147: ; preds = %136
store i32 1, i32* %5
br label %308
148: ; preds = %136
%149 = load i32, i32* %14
%150 = add nsw i32 %149, 1
store i32 %150, i32* %13
br label %151
151: ; preds = %230, %148
%152 = load i32, i32* %13
%153 = load i32, i32* %6
%154 = icmp slt i32 %152, %153
br i1 %154, label %155, label %233
155: ; preds = %151
%156 = load double*, double** %7
%157 = load i32, i32* %13
%158 = load i32, i32* %6
%159 = mul nsw i32 %157, %158
%160 = load i32, i32* %14
%161 = add nsw i32 %159, %160
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds double, double* %156, i64 %162
%164 = load double, double* %163
%165 = fneg double %164
%166 = load double*, double** %7
%167 = load i32, i32* %14
%168 = load i32, i32* %6
%169 = mul nsw i32 %167, %168
%170 = load i32, i32* %14
%171 = add nsw i32 %169, %170
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %166, i64 %172
%174 = load double, double* %173
%175 = fdiv double %165, %174
store double %175, double* %11
%176 = load i32, i32* %14
store i32 %176, i32* %12
br label %177
177: ; preds = %210, %155
%178 = load i32, i32* %12
%179 = load i32, i32* %6
%180 = icmp slt i32 %178, %179
br i1 %180, label %181, label %213
181: ; preds = %177
%182 = load double*, double** %7
%183 = load i32, i32* %13
%184 = load i32, i32* %6
%185 = mul nsw i32 %183, %184
%186 = load i32, i32* %12
%187 = add nsw i32 %185, %186
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds double, double* %182, i64 %188
%190 = load double, double* %189
%191 = load double, double* %11
%192 = load double*, double** %7
%193 = load i32, i32* %14
%194 = load i32, i32* %6
%195 = mul nsw i32 %193, %194
%196 = load i32, i32* %12
%197 = add nsw i32 %195, %196
%198 = sext i32 %197 to i64
%199 = getelementptr inbounds double, double* %192, i64 %198
%200 = load double, double* %199
%201 = call double @llvm.fmuladd.f64(double %191, double %200, double %190)
%202 = load double*, double** %7
%203 = load i32, i32* %13
%204 = load i32, i32* %6
%205 = mul nsw i32 %203, %204
%206 = load i32, i32* %12
%207 = add nsw i32 %205, %206
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %202, i64 %208
store double %201, double* %209
br label %210
210: ; preds = %181
%211 = load i32, i32* %12
%212 = add nsw i32 %211, 1
store i32 %212, i32* %12
br label %177
213: ; preds = %177
%214 = load double*, double** %8
%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 double, double* %11
%220 = load double*, double** %8
%221 = load i32, i32* %14
%222 = sext i32 %221 to i64
%223 = getelementptr inbounds double, double* %220, i64 %222
%224 = load double, double* %223
%225 = call double @llvm.fmuladd.f64(double %219, double %224, double %218)
%226 = load double*, double** %8
%227 = load i32, i32* %13
%228 = sext i32 %227 to i64
%229 = getelementptr inbounds double, double* %226, i64 %228
store double %225, double* %229
br label %230
230: ; preds = %213
%231 = load i32, i32* %13
%232 = add nsw i32 %231, 1
store i32 %232, i32* %13
br label %151
233: ; preds = %151
br label %234
234: ; preds = %233
%235 = load i32, i32* %14
%236 = add nsw i32 %235, 1
store i32 %236, i32* %14
br label %16
237: ; preds = %16
%238 = load i32, i32* %6
%239 = sub nsw i32 %238, 1
store i32 %239, i32* %14
br label %240
240: ; preds = %304, %237
%241 = load i32, i32* %14
%242 = icmp sge i32 %241, 0
br i1 %242, label %243, label %307
243: ; preds = %240
%244 = load double*, double** %8
%245 = load i32, i32* %14
%246 = sext i32 %245 to i64
%247 = getelementptr inbounds double, double* %244, i64 %246
%248 = load double, double* %247
%249 = load double*, double** %9
%250 = load i32, i32* %14
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds double, double* %249, i64 %251
store double %248, double* %252
%253 = load i32, i32* %14
%254 = add nsw i32 %253, 1
store i32 %254, i32* %12
br label %255
255: ; preds = %281, %243
%256 = load i32, i32* %12
%257 = load i32, i32* %6
%258 = icmp slt i32 %256, %257
br i1 %258, label %259, label %284
259: ; preds = %255
%260 = load double*, double** %7
%261 = load i32, i32* %14
%262 = load i32, i32* %6
%263 = mul nsw i32 %261, %262
%264 = load i32, i32* %12
%265 = add nsw i32 %263, %264
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds double, double* %260, i64 %266
%268 = load double, double* %267
%269 = load double*, double** %9
%270 = load i32, i32* %12
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds double, double* %269, i64 %271
%273 = load double, double* %272
%274 = load double*, double** %9
%275 = load i32, i32* %14
%276 = sext i32 %275 to i64
%277 = getelementptr inbounds double, double* %274, i64 %276
%278 = load double, double* %277
%279 = fneg double %268
%280 = call double @llvm.fmuladd.f64(double %279, double %273, double %278)
store double %280, double* %277
br label %281
281: ; preds = %259
%282 = load i32, i32* %12
%283 = add nsw i32 %282, 1
store i32 %283, i32* %12
br label %255
284: ; preds = %255
%285 = load double*, double** %9
%286 = load i32, i32* %14
%287 = sext i32 %286 to i64
%288 = getelementptr inbounds double, double* %285, i64 %287
%289 = load double, double* %288
%290 = load double*, double** %7
%291 = load i32, i32* %14
%292 = load i32, i32* %6
%293 = mul nsw i32 %291, %292
%294 = load i32, i32* %14
%295 = add nsw i32 %293, %294
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds double, double* %290, i64 %296
%298 = load double, double* %297
%299 = fdiv double %289, %298
%300 = load double*, double** %9
%301 = load i32, i32* %14
%302 = sext i32 %301 to i64
%303 = getelementptr inbounds double, double* %300, i64 %302
store double %299, double* %303
br label %304
304: ; preds = %284
%305 = load i32, i32* %14
%306 = add nsw i32 %305, -1
store i32 %306, i32* %14
br label %240
307: ; preds = %240
store i32 0, i32* %5
br label %308
308: ; preds = %307, %147
%309 = load i32, i32* %5
ret i32 %309
}

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