void invmat(int m, int n, double mat[m][n]) {
  if (m == n) {
    double ratio, a, matrix[n][2 * n];
    int i, j, k;
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++)
        matrix[i][j] = mat[i][j];
      for (j = n; j < 2 * n; j++) {
        if (i == (j - n))
          matrix[i][j] = 1.0;
        else
          matrix[i][j] = 0.0;
      }
    }
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++) {
        if (i != j) {
          ratio = matrix[j][i] / matrix[i][i];
          for (k = 0; k < 2 * n; k++) {
            matrix[j][k] -= ratio * matrix[i][k];
          }
        }
      }
    }
    for (i = 0; i < n; i++) {
      a = matrix[i][i];
      for (j = 0; j < 2 * n; j++) {
        matrix[i][j] /= a;
      }
    }
    for (i = 0; i < n; i++) {
      for (j = 0; j < n; j++)
        mat[i][j] = matrix[i][n + j];
    }
  }
}


x86 assembly (clang, -O0):
<invmat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x50(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    14c4 <invmat+0x3c4>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    %ecx,%eax
add    %eax,%eax
mov    %rax,-0x60(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x28(%rbp)
mov    %rcx,%rsi
imul   %rax,%rsi
shl    $0x3,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x58(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x30(%rbp)
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    126b <invmat+0x16b>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11cd <invmat+0xcd>
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rdx
mov    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rcx
movslq -0x3c(%rbp),%rsi
imul   %rdi,%rsi
shl    $0x3,%rsi
add    %rsi,%rcx
movslq -0x40(%rbp),%rsi
movsd  (%rcx,%rsi,8),%xmm0
movslq -0x3c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1173 <invmat+0x73>
mov    -0x8(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    1258 <invmat+0x158>
mov    -0x3c(%rbp),%eax
mov    -0x40(%rbp),%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jne    1222 <invmat+0x122>
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rdx
movslq -0x3c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
movsd  0xde8(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    1245 <invmat+0x145>
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rdx
movslq -0x3c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    124a <invmat+0x14a>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    11d3 <invmat+0xd3>
jmp    125d <invmat+0x15d>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1160 <invmat+0x60>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1392 <invmat+0x292>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    137f <invmat+0x27f>
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
je     136c <invmat+0x26c>
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rdx
movslq -0x40(%rbp),%rsi
imul   %rdx,%rsi
shl    $0x3,%rsi
mov    %rax,%rcx
add    %rsi,%rcx
movslq -0x3c(%rbp),%rsi
movsd  (%rcx,%rsi,8),%xmm0
movslq -0x3c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    1367 <invmat+0x267>
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rdx
movsd  -0x18(%rbp),%xmm0
movslq -0x3c(%rbp),%rsi
imul   %rdx,%rsi
shl    $0x3,%rsi
mov    %rax,%rcx
add    %rsi,%rcx
movslq -0x44(%rbp),%rsi
movsd  (%rcx,%rsi,8),%xmm2
movslq -0x40(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x44(%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    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    12e4 <invmat+0x1e4>
jmp    136c <invmat+0x26c>
jmp    1371 <invmat+0x271>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    1285 <invmat+0x185>
jmp    1384 <invmat+0x284>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1272 <invmat+0x172>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1431 <invmat+0x331>
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rdx
movslq -0x3c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    141e <invmat+0x31e>
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rdx
movsd  -0x20(%rbp),%xmm1
movslq -0x3c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    13d1 <invmat+0x2d1>
jmp    1423 <invmat+0x323>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1399 <invmat+0x299>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14bd <invmat+0x3bd>
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14aa <invmat+0x3aa>
mov    -0x50(%rbp),%rdx
mov    -0x58(%rbp),%rax
mov    -0x60(%rbp),%rsi
movslq -0x3c(%rbp),%rcx
imul   %rsi,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x40(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    144b <invmat+0x34b>
jmp    14af <invmat+0x3af>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1438 <invmat+0x338>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<invmat>:
cmp    %esi,%edi
jne    16f7 <invmat+0x5e7>
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rdx,-0x68(%rbp)
mov    %rsp,-0x78(%rbp)
mov    %esi,%ecx
lea    (%rsi,%rsi,1),%eax
mov    %rax,-0x38(%rbp)
imul   %rcx,%rax
shl    $0x3,%rax
mov    %rsp,%rdx
sub    %rax,%rdx
mov    %rdx,-0x30(%rbp)
mov    %rdx,%rsp
test   %esi,%esi
jle    16e5 <invmat+0x5d5>
lea    0x0(,%rcx,8),%r8
mov    -0x38(%rbp),%rax
movslq %eax,%r9
mov    %r9d,%edx
sub    %ecx,%edx
mov    %rcx,%rdi
not    %rdi
add    %r9,%rdi
mov    %rdi,-0x48(%rbp)
and    $0x3,%edx
mov    %rdx,-0x50(%rbp)
mov    -0x30(%rbp),%r14
lea    (%r14,%rcx,8),%r13
lea    0x0(,%rax,8),%r15
xor    %r12d,%r12d
mov    %rcx,%rbx
mov    %rcx,-0x40(%rbp)
mov    %r8,-0x60(%rbp)
mov    %rsi,-0x70(%rbp)
mov    %r9,-0x58(%rbp)
jmp    11cf <invmat+0xbf>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r12
add    %r15,%r13
add    $0x1,%rbx
add    %r15,%r14
mov    -0x40(%rbp),%rcx
cmp    %rcx,%r12
mov    -0x60(%rbp),%r8
je     12be <invmat+0x1ae>
mov    %r12,%rax
imul   -0x38(%rbp),%rax
mov    -0x30(%rbp),%rdx
lea    (%rdx,%rax,8),%rdi
mov    %r12,%rax
imul   %rcx,%rax
mov    -0x68(%rbp),%rcx
lea    (%rcx,%rax,8),%rsi
mov    %r8,%rdx
call   1030 <memcpy@plt>
movsd  0xe02(%rip),%xmm1
mov    -0x58(%rbp),%r9
mov    -0x70(%rbp),%rsi
cmp    %esi,-0x38(%rbp)
jle    11b0 <invmat+0xa0>
mov    -0x40(%rbp),%rcx
mov    %rcx,%rax
mov    -0x50(%rbp),%rdx
test   %rdx,%rdx
je     1243 <invmat+0x133>
xor    %eax,%eax
jmp    1230 <invmat+0x120>
nop
movsd  %xmm0,0x0(%r13,%rax,8)
add    $0x1,%rax
cmp    %rax,%rdx
je     1240 <invmat+0x130>
movapd %xmm1,%xmm0
cmp    %rax,%r12
je     1220 <invmat+0x110>
xorpd  %xmm0,%xmm0
jmp    1220 <invmat+0x110>
nop
add    %rcx,%rax
cmpq   $0x3,-0x48(%rbp)
jb     11b0 <invmat+0xa0>
lea    -0x1(%rbx),%rcx
lea    -0x3(%rbx),%rdx
lea    -0x2(%rbx),%rdi
jmp    1274 <invmat+0x164>
nopl   0x0(%rax)
movsd  %xmm0,0x18(%r14,%rax,8)
add    $0x4,%rax
cmp    %rax,%r9
je     11b0 <invmat+0xa0>
movapd %xmm1,%xmm0
cmp    %rax,%rbx
je     1281 <invmat+0x171>
xorpd  %xmm0,%xmm0
movsd  %xmm0,(%r14,%rax,8)
movapd %xmm1,%xmm0
cmp    %rax,%rcx
je     1294 <invmat+0x184>
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%r14,%rax,8)
movapd %xmm1,%xmm0
cmp    %rax,%rdi
je     12a8 <invmat+0x198>
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%r14,%rax,8)
movapd %xmm1,%xmm0
cmp    %rax,%rdx
je     1260 <invmat+0x150>
xorpd  %xmm0,%xmm0
jmp    1260 <invmat+0x150>
test   %esi,%esi
jle    16e5 <invmat+0x5d5>
mov    -0x38(%rbp),%rcx
cmp    $0x2,%ecx
mov    $0x1,%eax
cmovge %ecx,%eax
mov    %eax,%ecx
and    $0x7ffffffc,%ecx
mov    %rcx,-0x58(%rbp)
add    $0xfffffffffffffffc,%rcx
mov    %rcx,-0x50(%rbp)
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %rdx,%rcx
mov    %rdx,-0x48(%rbp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,-0x90(%rbp)
mov    %rax,%r12
neg    %r12
mov    -0x30(%rbp),%r14
lea    0x30(%r14),%r9
lea    0x8(%r14),%rcx
mov    %rcx,-0x80(%rbp)
xor    %r13d,%r13d
movapd 0xce9(%rip),%xmm0
mov    %r9,-0x88(%rbp)
jmp    1343 <invmat+0x233>
add    $0x1,%r13
add    %r15,%r9
add    %r15,%r14
cmp    %rdx,%r13
je     150f <invmat+0x3ff>
mov    %r13,%rcx
imul   -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rdx
lea    (%rdx,%rcx,8),%r10
add    %rax,%rcx
lea    (%rdx,%rcx,8),%r8
mov    -0x80(%rbp),%r11
mov    -0x88(%rbp),%rsi
xor    %ecx,%ecx
jmp    1383 <invmat+0x273>
nopl   0x0(%rax)
add    $0x1,%rcx
add    %r15,%rsi
add    %r15,%r11
mov    -0x40(%rbp),%rdx
cmp    %rdx,%rcx
je     1330 <invmat+0x220>
cmp    %rcx,%r13
je     1370 <invmat+0x260>
mov    %rcx,%rdx
imul   -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rdi
lea    (%rdi,%rdx,8),%rbx
movsd  (%rbx,%r13,8),%xmm1
xorpd  %xmm0,%xmm1
divsd  (%r10,%r13,8),%xmm1
cmp    $0x4,%eax
jb     13c2 <invmat+0x2b2>
cmp    %r8,%rbx
jae    142d <invmat+0x31d>
add    %rax,%rdx
mov    -0x30(%rbp),%rdi
lea    (%rdi,%rdx,8),%rdx
cmp    %rdx,%r10
jae    142d <invmat+0x31d>
xor    %edi,%edi
mov    %rdi,%rdx
test   $0x1,%al
je     13e6 <invmat+0x2d6>
movsd  (%r10,%rdi,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%rbx,%rdi,8),%xmm2
movsd  %xmm2,(%rbx,%rdi,8)
mov    %rdi,%rdx
or     $0x1,%rdx
not    %rdi
cmp    %r12,%rdi
je     1370 <invmat+0x260>
xchg   %ax,%ax
movsd  (%r14,%rdx,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  -0x8(%r11,%rdx,8),%xmm2
movsd  %xmm2,-0x8(%r11,%rdx,8)
movsd  0x8(%r14,%rdx,8),%xmm2
mulsd  %xmm1,%xmm2
addsd  (%r11,%rdx,8),%xmm2
movsd  %xmm2,(%r11,%rdx,8)
add    $0x2,%rdx
cmp    %rdx,%rax
jne    13f0 <invmat+0x2e0>
jmp    1370 <invmat+0x260>
movapd %xmm1,%xmm2
unpcklpd %xmm1,%xmm2
cmpq   $0x0,-0x50(%rbp)
je     1505 <invmat+0x3f5>
mov    -0x90(%rbp),%rdx
xor    %edi,%edi
nopl   0x0(%rax)
movupd -0x20(%r9,%rdi,8),%xmm3
movapd -0x30(%r9,%rdi,8),%xmm4
mulpd  %xmm2,%xmm4
addpd  -0x30(%rsi,%rdi,8),%xmm4
mulpd  %xmm2,%xmm3
movupd -0x20(%rsi,%rdi,8),%xmm5
addpd  %xmm3,%xmm5
movupd (%rsi,%rdi,8),%xmm3
movapd %xmm4,-0x30(%rsi,%rdi,8)
movupd %xmm5,-0x20(%rsi,%rdi,8)
movupd (%r9,%rdi,8),%xmm4
movapd -0x10(%r9,%rdi,8),%xmm5
mulpd  %xmm2,%xmm5
addpd  -0x10(%rsi,%rdi,8),%xmm5
mulpd  %xmm2,%xmm4
addpd  %xmm3,%xmm4
movapd %xmm5,-0x10(%rsi,%rdi,8)
movupd %xmm4,(%rsi,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rdx
jne    1450 <invmat+0x340>
testb  $0x1,-0x48(%rbp)
je     14f0 <invmat+0x3e0>
movupd 0x10(%r10,%rdi,8),%xmm3
movupd 0x10(%rbx,%rdi,8),%xmm4
movapd (%r10,%rdi,8),%xmm5
mulpd  %xmm2,%xmm5
addpd  (%rbx,%rdi,8),%xmm5
mulpd  %xmm3,%xmm2
addpd  %xmm4,%xmm2
movapd %xmm5,(%rbx,%rdi,8)
movupd %xmm2,0x10(%rbx,%rdi,8)
mov    -0x58(%rbp),%rdx
mov    %rdx,%rdi
cmp    %rax,%rdx
je     1370 <invmat+0x260>
jmp    13c4 <invmat+0x2b4>
xor    %edi,%edi
testb  $0x1,-0x48(%rbp)
jne    14c1 <invmat+0x3b1>
jmp    14f0 <invmat+0x3e0>
cmpl   $0x0,-0x70(%rbp)
jle    16e5 <invmat+0x5d5>
mov    %eax,%r11d
and    $0x7ffffffe,%r11d
lea    -0x2(%r11),%r9
mov    %r9,%r10
shr    %r10
add    $0x1,%r10
mov    %r10,%r8
and    $0xfffffffffffffffe,%r8
mov    -0x30(%rbp),%rdx
lea    0x10(%rdx),%rbx
xor    %edi,%edi
jmp    1564 <invmat+0x454>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rdi
add    %r15,%rbx
add    %r15,%rdx
cmp    -0x40(%rbp),%rdi
je     1626 <invmat+0x516>
mov    %rdi,%rcx
imul   -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rsi
lea    (%rsi,%rcx,8),%r14
movsd  (%r14,%rdi,8),%xmm0
cmp    $0x2,%eax
jae    1590 <invmat+0x480>
xor    %ecx,%ecx
jmp    1600 <invmat+0x4f0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
test   %r9,%r9
je     161c <invmat+0x50c>
mov    %r8,%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd -0x10(%rbx,%rcx,8),%xmm2
movapd (%rbx,%rcx,8),%xmm3
divpd  %xmm1,%xmm2
movapd %xmm2,-0x10(%rbx,%rcx,8)
divpd  %xmm1,%xmm3
movapd %xmm3,(%rbx,%rcx,8)
add    $0x4,%rcx
add    $0xfffffffffffffffe,%rsi
jne    15b0 <invmat+0x4a0>
test   $0x1,%r10b
je     15ee <invmat+0x4de>
movapd (%r14,%rcx,8),%xmm2
divpd  %xmm1,%xmm2
movapd %xmm2,(%r14,%rcx,8)
mov    %r11,%rcx
cmp    %rax,%r11
je     1550 <invmat+0x440>
nopw   0x0(%rax,%rax,1)
movsd  (%rdx,%rcx,8),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx,%rcx,8)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1600 <invmat+0x4f0>
jmp    1550 <invmat+0x440>
xor    %ecx,%ecx
test   $0x1,%r10b
jne    15de <invmat+0x4ce>
jmp    15ee <invmat+0x4de>
mov    -0x70(%rbp),%rax
test   %eax,%eax
mov    -0x40(%rbp),%r15
jle    16e5 <invmat+0x5d5>
cmp    $0x1,%eax
jne    163f <invmat+0x52f>
xor    %ebx,%ebx
jmp    16b4 <invmat+0x5a4>
mov    %r15d,%eax
and    $0xfffffffe,%eax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%r13
lea    (%r15,%r13,1),%rax
shl    $0x3,%rax
mov    %rax,-0x50(%rbp)
shl    $0x4,%r13
mov    %r13,-0x48(%rbp)
shl    $0x4,%r15
xor    %ebx,%ebx
mov    -0x68(%rbp),%r14
mov    -0x30(%rbp),%r12
mov    -0x60(%rbp),%r13
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    (%r12,%r13,1),%rsi
mov    %r14,%rdi
mov    %r13,%rdx
call   1030 <memcpy@plt>
mov    -0x50(%rbp),%rax
lea    (%r12,%rax,1),%rsi
lea    (%r14,%r13,1),%rdi
mov    %r13,%rdx
call   1030 <memcpy@plt>
add    $0x2,%rbx
add    -0x48(%rbp),%r12
add    %r15,%r14
cmp    %rbx,-0x58(%rbp)
jne    1680 <invmat+0x570>
mov    -0x40(%rbp),%rcx
test   $0x1,%cl
je     16e5 <invmat+0x5d5>
mov    -0x38(%rbp),%rax
imul   %rbx,%rax
add    %rcx,%rax
mov    -0x30(%rbp),%rdx
lea    (%rdx,%rax,8),%rsi
imul   %rbx,%rcx
mov    -0x68(%rbp),%rax
lea    (%rax,%rcx,8),%rdi
mov    -0x60(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x78(%rbp),%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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