void solve_gauss_jordan(double **M, int n, int m) {
  int i, j, k;
  double factor;
  for (i = 0; i < n - 1; i++) {
    double fac = M[i][i];
    for (j = 0; j < m; j++)
      M[i][j] /= fac;
    for (j = i + 1; j < n; j++) {
      fac = M[j][i];
      for (k = i; k < m; k++)
        M[j][k] = M[j][k] - fac * M[i][k];
    }
  }
  factor = M[n - 1][n - 1];
  for (j = 0; j < m; j++)
    M[n - 1][j] /= factor;
  for (i = n - 1; i > 0; --i) {
    for (j = 0; j < i; j++) {
      double fac = M[j][i];
      for (k = i - 1; k < m; k++)
        M[j][k] = M[j][k] - fac * M[i][k];
    }
  }
  for (i = 0; i < n; i++) {
    M[i][n] = M[i][n] / M[i][i];
    M[i][n + 1] = M[i][n + 1] / M[i][i];
  }
}


x86 assembly (clang, -O0):
<solve_gauss_jordan>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    125c <solve_gauss_jordan+0x15c>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1184 <solve_gauss_jordan+0x84>
movsd  -0x30(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1147 <solve_gauss_jordan+0x47>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1249 <solve_gauss_jordan+0x149>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1236 <solve_gauss_jordan+0x136>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b9 <solve_gauss_jordan+0xb9>
jmp    123b <solve_gauss_jordan+0x13b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    118d <solve_gauss_jordan+0x8d>
jmp    124e <solve_gauss_jordan+0x14e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <solve_gauss_jordan+0x15>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    12c9 <solve_gauss_jordan+0x1c9>
movsd  -0x28(%rbp),%xmm1
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1287 <solve_gauss_jordan+0x187>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    13b5 <solve_gauss_jordan+0x2b5>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    13a2 <solve_gauss_jordan+0x2a2>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    138f <solve_gauss_jordan+0x28f>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x38(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1312 <solve_gauss_jordan+0x212>
jmp    1394 <solve_gauss_jordan+0x294>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    12e3 <solve_gauss_jordan+0x1e3>
jmp    13a7 <solve_gauss_jordan+0x2a7>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    12d2 <solve_gauss_jordan+0x1d2>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    145e <solve_gauss_jordan+0x35e>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0xc(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    13bc <solve_gauss_jordan+0x2bc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_gauss_jordan>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    -0x1(%rsi),%eax
mov    %eax,-0x64(%rsp)
mov    %esi,%r9d
mov    %edx,-0x80(%rsp)
mov    %edx,%r12d
mov    %rsi,-0x58(%rsp)
cmp    $0x2,%esi
mov    %rdi,-0x8(%rsp)
mov    %r9,-0x40(%rsp)
jl     150b <solve_gauss_jordan+0x40b>
movslq -0x80(%rsp),%r8
mov    -0x64(%rsp),%eax
mov    %rax,-0x48(%rsp)
mov    %r12d,%eax
and    $0xfffffffe,%eax
mov    %rax,0x18(%rsp)
add    $0xfffffffffffffffe,%rax
mov    %rax,0x10(%rsp)
mov    %rax,%rcx
shr    %rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x8(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,(%rsp)
mov    %r12,%r11
neg    %r11
lea    -0x5(%r12),%rax
mov    $0x1,%ecx
mov    %rcx,-0x70(%rsp)
mov    $0x7,%ecx
mov    %rcx,-0x78(%rsp)
xor    %r15d,%r15d
movapd 0xe63(%rip),%xmm0
mov    %r11,-0x50(%rsp)
jmp    11d8 <solve_gauss_jordan+0xd8>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addq   $0x1,-0x70(%rsp)
addq   $0x1,-0x78(%rsp)
add    $0xffffffffffffffff,%rdi
mov    %rdi,%rax
mov    -0x18(%rsp),%r15
cmp    -0x48(%rsp),%r15
mov    -0x8(%rsp),%rdi
je     150b <solve_gauss_jordan+0x40b>
mov    (%rdi,%r15,8),%r14
cmpl   $0x0,-0x80(%rsp)
mov    %rax,%rdi
jle    1289 <solve_gauss_jordan+0x189>
movsd  (%r14,%r15,8),%xmm1
cmpl   $0x1,-0x80(%rsp)
jne    1200 <solve_gauss_jordan+0x100>
xor    %eax,%eax
jmp    1270 <solve_gauss_jordan+0x170>
nopl   0x0(%rax,%rax,1)
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
cmpq   $0x0,0x10(%rsp)
je     14f9 <solve_gauss_jordan+0x3f9>
mov    (%rsp),%rdx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movupd (%r14,%rax,8),%xmm3
movupd 0x10(%r14,%rax,8),%xmm4
divpd  %xmm2,%xmm3
movupd %xmm3,(%r14,%rax,8)
divpd  %xmm2,%xmm4
movupd %xmm4,0x10(%r14,%rax,8)
add    $0x4,%rax
add    $0xfffffffffffffffe,%rdx
jne    1220 <solve_gauss_jordan+0x120>
testb  $0x1,0x8(%rsp)
je     1263 <solve_gauss_jordan+0x163>
movupd (%r14,%rax,8),%xmm3
divpd  %xmm2,%xmm3
movupd %xmm3,(%r14,%rax,8)
mov    0x18(%rsp),%rcx
mov    %rcx,%rax
cmp    %r12,%rcx
je     1289 <solve_gauss_jordan+0x189>
movsd  (%r14,%rax,8),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,(%r14,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    1270 <solve_gauss_jordan+0x170>
lea    0x1(%r15),%rax
mov    %rax,-0x18(%rsp)
cmp    %r9,%rax
jae    11b0 <solve_gauss_jordan+0xb0>
mov    %rdi,%rax
shr    $0x2,%rax
add    $0x1,%rax
mov    %r15,%r10
not    %r10
lea    (%r10,%r12,1),%rcx
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x20(%rsp)
shr    $0x2,%rcx
and    $0xfffffffffffffffe,%rax
mov    %rax,0x20(%rsp)
add    %r12,%r10
add    $0x1,%rcx
mov    %rcx,-0x28(%rsp)
mov    -0x70(%rsp),%rbp
lea    (%r14,%rbp,8),%rax
mov    %rax,-0x60(%rsp)
lea    (%r14,%r12,8),%rax
mov    %rax,-0x10(%rsp)
lea    0x1(%r15),%r13
mov    %r10,%rax
and    $0xfffffffffffffffc,%rax
mov    %rax,-0x30(%rsp)
add    %r15,%rax
add    $0x1,%rax
mov    %rax,-0x38(%rsp)
mov    -0x78(%rsp),%rax
lea    (%r14,%rax,8),%rsi
jmp    131d <solve_gauss_jordan+0x21d>
add    $0x1,%rbp
cmp    %r9,%rbp
je     11b0 <solve_gauss_jordan+0xb0>
cmp    %r8,%r15
jge    1310 <solve_gauss_jordan+0x210>
mov    -0x8(%rsp),%rax
mov    (%rax,%rbp,8),%rdx
movsd  (%rdx,%r15,8),%xmm1
movsd  (%r14,%r15,8),%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm1,%xmm3
subsd  %xmm2,%xmm3
movsd  %xmm3,(%rdx,%r15,8)
cmp    %r12,%r13
je     1310 <solve_gauss_jordan+0x210>
xorpd  %xmm0,%xmm1
mov    %r13,%rax
cmp    $0x4,%r10
jb     1480 <solve_gauss_jordan+0x380>
mov    -0x70(%rsp),%rax
lea    (%rdx,%rax,8),%rax
cmp    -0x10(%rsp),%rax
jae    1381 <solve_gauss_jordan+0x281>
lea    (%rdx,%r12,8),%rbx
mov    %r13,%rax
cmp    %rbx,-0x60(%rsp)
jb     1480 <solve_gauss_jordan+0x380>
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
cmpq   $0x4,-0x20(%rsp)
jae    1398 <solve_gauss_jordan+0x298>
xor    %ebx,%ebx
jmp    1427 <solve_gauss_jordan+0x327>
mov    -0x78(%rsp),%rax
lea    (%rdx,%rax,8),%r11
mov    0x20(%rsp),%r9
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movupd -0x30(%rsi,%rbx,8),%xmm3
movupd -0x20(%rsi,%rbx,8),%xmm4
mulpd  %xmm2,%xmm3
movupd -0x30(%r11,%rbx,8),%xmm5
addpd  %xmm3,%xmm5
movupd -0x20(%r11,%rbx,8),%xmm3
movupd -0x10(%r11,%rbx,8),%xmm6
movupd (%r11,%rbx,8),%xmm7
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
movupd %xmm5,-0x30(%r11,%rbx,8)
movupd %xmm4,-0x20(%r11,%rbx,8)
movupd -0x10(%rsi,%rbx,8),%xmm3
movupd (%rsi,%rbx,8),%xmm4
mulpd  %xmm2,%xmm3
addpd  %xmm6,%xmm3
mulpd  %xmm2,%xmm4
addpd  %xmm7,%xmm4
movupd %xmm3,-0x10(%r11,%rbx,8)
movupd %xmm4,(%r11,%rbx,8)
add    $0x8,%rbx
add    $0xfffffffffffffffe,%r9
jne    13b0 <solve_gauss_jordan+0x2b0>
testb  $0x1,-0x28(%rsp)
mov    -0x40(%rsp),%r9
mov    -0x50(%rsp),%r11
je     146e <solve_gauss_jordan+0x36e>
add    %r13,%rbx
movupd (%rdx,%rbx,8),%xmm3
movupd 0x10(%rdx,%rbx,8),%xmm4
movupd (%r14,%rbx,8),%xmm5
movupd 0x10(%r14,%rbx,8),%xmm6
mulpd  %xmm2,%xmm5
addpd  %xmm3,%xmm5
mulpd  %xmm2,%xmm6
addpd  %xmm4,%xmm6
movupd %xmm5,(%rdx,%rbx,8)
movupd %xmm6,0x10(%rdx,%rbx,8)
mov    -0x38(%rsp),%rax
cmp    -0x30(%rsp),%r10
je     1310 <solve_gauss_jordan+0x210>
xchg   %ax,%ax
mov    %r12d,%ecx
sub    %eax,%ecx
mov    %rax,%rbx
test   $0x1,%cl
je     14a5 <solve_gauss_jordan+0x3a5>
movsd  (%r14,%rax,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%rdx,%rax,8),%xmm2
movsd  %xmm2,(%rdx,%rax,8)
lea    0x1(%rax),%rbx
not    %rax
cmp    %r11,%rax
je     1310 <solve_gauss_jordan+0x210>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rbx,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%rdx,%rbx,8),%xmm2
movsd  %xmm2,(%rdx,%rbx,8)
movsd  0x8(%r14,%rbx,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  0x8(%rdx,%rbx,8),%xmm2
movsd  %xmm2,0x8(%rdx,%rbx,8)
add    $0x2,%rbx
cmp    %rbx,%r12
jne    14c0 <solve_gauss_jordan+0x3c0>
jmp    1310 <solve_gauss_jordan+0x210>
xor    %eax,%eax
testb  $0x1,0x8(%rsp)
jne    1253 <solve_gauss_jordan+0x153>
jmp    1263 <solve_gauss_jordan+0x163>
cmpl   $0x0,-0x80(%rsp)
jle    15b7 <solve_gauss_jordan+0x4b7>
movslq -0x64(%rsp),%rcx
mov    (%rdi,%rcx,8),%rax
movsd  (%rax,%rcx,8),%xmm0
cmpl   $0x1,-0x80(%rsp)
jne    152f <solve_gauss_jordan+0x42f>
xor    %edx,%edx
jmp    15a0 <solve_gauss_jordan+0x4a0>
mov    %r12d,%edx
and    $0xfffffffe,%edx
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x2(%rdx),%rcx
mov    %rcx,%rbx
shr    %rbx
add    $0x1,%rbx
test   %rcx,%rcx
je     18ba <solve_gauss_jordan+0x7ba>
mov    %rbx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ebp,%ebp
nopl   (%rax)
movupd (%rax,%rbp,8),%xmm2
movupd 0x10(%rax,%rbp,8),%xmm3
divpd  %xmm1,%xmm2
movupd %xmm2,(%rax,%rbp,8)
divpd  %xmm1,%xmm3
movupd %xmm3,0x10(%rax,%rbp,8)
add    $0x4,%rbp
add    $0xfffffffffffffffe,%rsi
jne    1560 <solve_gauss_jordan+0x460>
test   $0x1,%bl
je     159b <solve_gauss_jordan+0x49b>
movupd (%rax,%rbp,8),%xmm2
divpd  %xmm1,%xmm2
movupd %xmm2,(%rax,%rbp,8)
cmp    %r12,%rdx
je     15b7 <solve_gauss_jordan+0x4b7>
movsd  (%rax,%rdx,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rax,%rdx,8)
add    $0x1,%rdx
cmp    %rdx,%r12
jne    15a0 <solve_gauss_jordan+0x4a0>
cmpl   $0x2,-0x58(%rsp)
jl     1864 <solve_gauss_jordan+0x764>
mov    -0x58(%rsp),%rax
lea    -0x2(%rax),%ebx
movslq -0x80(%rsp),%rcx
lea    0x1(%rbx),%rax
lea    0x6(%rbx),%rdx
mov    %rdx,-0x60(%rsp)
mov    $0xfffffffffffffffc,%rdx
sub    %rbx,%rdx
xor    %esi,%esi
movapd 0xa10(%rip),%xmm0
mov    %rax,-0x50(%rsp)
mov    %rax,%rbp
mov    -0x40(%rsp),%r9
mov    %rbx,-0x48(%rsp)
jmp    1644 <solve_gauss_jordan+0x544>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0xffffffffffffffff,%rbx
mov    -0x28(%rsp),%rsi
add    $0x1,%rsi
addq   $0xffffffffffffffff,-0x60(%rsp)
mov    -0x30(%rsp),%rbp
add    $0xffffffffffffffff,%rbp
mov    -0x20(%rsp),%rdx
add    $0x1,%rdx
cmpq   $0x2,-0x38(%rsp)
mov    %rax,%r9
jle    1864 <solve_gauss_jordan+0x764>
cmp    %rcx,%rbp
mov    %rcx,%rax
mov    %rbp,-0x30(%rsp)
cmovg  %rbp,%rax
mov    %rdx,-0x20(%rsp)
add    %rdx,%rax
shr    $0x2,%rax
add    $0x1,%rax
and    $0xfffffffffffffffe,%rax
mov    %rax,-0x80(%rsp)
mov    -0x50(%rsp),%r14
sub    %rsi,%r14
cmp    %rcx,%r14
mov    %rcx,%r8
cmovg  %r14,%r8
mov    %rsi,-0x28(%rsp)
mov    %rsi,%rax
sub    -0x48(%rsp),%rax
lea    (%r8,%rax,1),%rdx
add    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x70(%rsp)
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rsp)
cmp    %rcx,%r14
cmovle %rcx,%r14
add    %rax,%r14
mov    %r9,-0x38(%rsp)
lea    -0x1(%r9),%rax
mov    %r14,%rdx
and    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x78(%rsp)
add    %rbx,%rdx
mov    %rdx,-0x18(%rsp)
xor    %r11d,%r11d
jmp    16ed <solve_gauss_jordan+0x5ed>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r11
cmp    %rax,%r11
je     1610 <solve_gauss_jordan+0x510>
cmp    %rcx,%rax
jg     16e0 <solve_gauss_jordan+0x5e0>
mov    (%rdi,%r11,8),%r9
mov    (%rdi,%rax,8),%r10
movsd  (%r9,%rax,8),%xmm1
xorpd  %xmm0,%xmm1
mov    %rbx,%rsi
cmp    $0x4,%r14
jb     1840 <solve_gauss_jordan+0x740>
lea    (%r9,%rbx,8),%rsi
lea    (%r10,%r8,8),%rbp
cmp    %rbp,%rsi
jae    1732 <solve_gauss_jordan+0x632>
lea    (%r9,%r8,8),%rbp
lea    (%r10,%rbx,8),%rdx
mov    %rbx,%rsi
cmp    %rbp,%rdx
jb     1840 <solve_gauss_jordan+0x740>
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
cmpq   $0x4,-0x70(%rsp)
jae    174a <solve_gauss_jordan+0x64a>
xor    %r15d,%r15d
jmp    17dd <solve_gauss_jordan+0x6dd>
mov    -0x60(%rsp),%rdx
lea    (%r10,%rdx,8),%r12
lea    (%r9,%rdx,8),%r13
mov    -0x80(%rsp),%rsi
xor    %r15d,%r15d
nop
movupd -0x30(%r12,%r15,8),%xmm3
movupd -0x20(%r12,%r15,8),%xmm4
mulpd  %xmm2,%xmm3
movupd -0x30(%r13,%r15,8),%xmm5
addpd  %xmm3,%xmm5
movupd -0x20(%r13,%r15,8),%xmm3
movupd -0x10(%r13,%r15,8),%xmm6
movupd 0x0(%r13,%r15,8),%xmm7
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
movupd %xmm5,-0x30(%r13,%r15,8)
movupd %xmm4,-0x20(%r13,%r15,8)
movupd -0x10(%r12,%r15,8),%xmm3
movupd (%r12,%r15,8),%xmm4
mulpd  %xmm2,%xmm3
addpd  %xmm6,%xmm3
mulpd  %xmm2,%xmm4
addpd  %xmm7,%xmm4
movupd %xmm3,-0x10(%r13,%r15,8)
movupd %xmm4,0x0(%r13,%r15,8)
add    $0x8,%r15
add    $0xfffffffffffffffe,%rsi
jne    1760 <solve_gauss_jordan+0x660>
testb  $0x1,-0x10(%rsp)
mov    -0x8(%rsp),%rdi
je     1823 <solve_gauss_jordan+0x723>
add    %rbx,%r15
movupd (%r9,%r15,8),%xmm3
movupd 0x10(%r9,%r15,8),%xmm4
movupd (%r10,%r15,8),%xmm5
movupd 0x10(%r10,%r15,8),%xmm6
mulpd  %xmm2,%xmm5
addpd  %xmm3,%xmm5
mulpd  %xmm2,%xmm6
addpd  %xmm4,%xmm6
movupd %xmm5,(%r9,%r15,8)
movupd %xmm6,0x10(%r9,%r15,8)
mov    -0x18(%rsp),%rsi
cmp    -0x78(%rsp),%r14
je     16e0 <solve_gauss_jordan+0x5e0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%r10,%rsi,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%r9,%rsi,8),%xmm2
movsd  %xmm2,(%r9,%rsi,8)
add    $0x1,%rsi
cmp    %rcx,%rsi
jl     1840 <solve_gauss_jordan+0x740>
jmp    16e0 <solve_gauss_jordan+0x5e0>
mov    -0x58(%rsp),%rdx
test   %edx,%edx
mov    -0x40(%rsp),%rsi
jle    18ab <solve_gauss_jordan+0x7ab>
add    $0x1,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    (%rdi,%rax,8),%rcx
movsd  (%rcx,%rsi,8),%xmm0
divsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rsi,8)
movsd  (%rcx,%rdx,8),%xmm0
divsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rdx,8)
add    $0x1,%rax
cmp    %rax,%rsi
jne    1880 <solve_gauss_jordan+0x780>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebp,%ebp
test   $0x1,%bl
jne    158d <solve_gauss_jordan+0x48d>
jmp    159b <solve_gauss_jordan+0x49b>

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

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