#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 */
int /*<<< orphan*/ error2(char *);
int /*<<< orphan*/ matby(double *, double *, double *, int, int, int);
int matexp(double A[], int n, int nTaylorTerms, int nSquares, double space[]) {
  int it, i, j;
  double *T[3], *B, m1, factor = 1;
  if (nSquares > 31)
    error2("nSquares too large");
  T[0] = A;
  T[1] = space;
  T[2] = T[1] + n * n;
  B = T[2] + n * n;
  m1 = 1.0 / (1 << nSquares);
  for (i = 0; i < n * n; i++)
    B[i] = T[1][i] = A[i] *= m1;
  for (i = 0; i < n; i++)
    A[i * n + i]++;
  for (j = 2, it = 2; j <= nTaylorTerms; j++, it = 3 - it) {
    matby(T[3 - it], B, T[it], n, n, n);
    factor /= j;
    for (i = 0; i < n * n; i++)
      A[i] += T[it][i] * factor;
  }
  for (i = 0, it = 0; i < nSquares; i++, it = 1 - it) {
    matby(T[it], T[it], T[1 - it], n, n, n);
  }
  if (it == 1)
    for (i = 0; i < n * n; i++)
      A[i] = T[1][i];
  return (0);
}


x86 assembly (clang, -O0):
<matexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
movsd  0xebf(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
cmpl   $0x1f,-0x14(%rbp)
jle    115c <matexp+0x3c>
lea    0xeb1(%rip),%rdi
call   1040 <error2@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cvtsi2sd %eax,%xmm1
movsd  0xe4c(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    1215 <matexp+0xf5>
movsd  -0x60(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x48(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x58(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11c4 <matexp+0xa4>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1259 <matexp+0x139>
mov    -0x8(%rbp),%rax
mov    -0x28(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x28(%rbp),%ecx
movslq %ecx,%rcx
movsd  0xdbf(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    121c <matexp+0xfc>
movl   $0x2,-0x2c(%rbp)
movl   $0x2,-0x24(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1328 <matexp+0x208>
mov    $0x3,%eax
sub    -0x24(%rbp),%eax
cltq
mov    -0x50(%rbp,%rax,8),%rdi
mov    -0x58(%rbp),%rsi
movslq -0x24(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rdx
mov    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0xc(%rbp),%r9d
call   1030 <matby@plt>
cvtsi2sdl -0x2c(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    130a <matexp+0x1ea>
movslq -0x24(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x68(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12b9 <matexp+0x199>
jmp    130f <matexp+0x1ef>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    $0x3,%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1267 <matexp+0x147>
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    138c <matexp+0x26c>
movslq -0x24(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rdi
movslq -0x24(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rsi
mov    $0x1,%eax
sub    -0x24(%rbp),%eax
cltq
mov    -0x50(%rbp,%rax,8),%rdx
mov    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    -0xc(%rbp),%r9d
call   1030 <matby@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    $0x1,%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1336 <matexp+0x216>
cmpl   $0x1,-0x24(%rbp)
jne    13dc <matexp+0x2bc>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    13d7 <matexp+0x2b7>
mov    -0x48(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    139d <matexp+0x27d>
jmp    13dc <matexp+0x2bc>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matexp>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r8,%r14
mov    %ecx,%ebp
mov    %edx,0x4(%rsp)
mov    %esi,%r11d
mov    %rdi,%r13
cmp    $0x20,%ecx
mov    %r11,0x18(%rsp)
jl     115b <matexp+0x3b>
lea    0xeb7(%rip),%rdi
call   1040 <error2@plt>
mov    0x18(%rsp),%r11
mov    %r13,0x60(%rsp)
mov    %r14,0x68(%rsp)
mov    %r11d,%r15d
imul   %r15d,%r15d
lea    (%r14,%r15,8),%rdx
mov    $0x1,%eax
mov    %ebp,%ecx
shl    %cl,%eax
mov    %rdx,0x70(%rsp)
mov    %rdx,0x8(%rsp)
lea    (%rdx,%r15,8),%rcx
mov    %rcx,0x10(%rsp)
movsd  0xe6c(%rip),%xmm6
test   %r15d,%r15d
je     13a5 <matexp+0x285>
cvtsi2sd %eax,%xmm1
movapd %xmm6,%xmm0
divsd  %xmm1,%xmm0
cmp    $0x4,%r15d
jae    11b6 <matexp+0x96>
xor    %eax,%eax
jmp    131a <matexp+0x1fa>
lea    0x0(,%r15,8),%rax
add    %r13,%rax
lea    (%r15,%r15,2),%rcx
lea    (%r14,%rcx,8),%rcx
cmp    %r13,%rcx
seta   %bl
cmp    %r13,0x8(%rsp)
setb   %dl
seta   %cl
cmp    %r14,%rax
seta   %sil
xor    %eax,%eax
test   %dl,%bl
jne    131a <matexp+0x1fa>
and    %sil,%cl
jne    131a <matexp+0x1fa>
mov    %r15d,%eax
and    $0xfffffffc,%eax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %ebp,%ebx
test   %rcx,%rcx
je     12c7 <matexp+0x1a7>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
lea    0x30(%r14),%rdi
mov    %r15,%rcx
shl    $0x4,%rcx
lea    (%r14,%rcx,1),%rbp
add    $0x30,%rbp
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movupd 0x0(%r13,%rcx,8),%xmm2
movupd 0x10(%r13,%rcx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x0(%r13,%rcx,8)
movupd %xmm3,0x10(%r13,%rcx,8)
movupd %xmm2,-0x30(%rdi,%rcx,8)
movupd %xmm3,-0x20(%rdi,%rcx,8)
movupd %xmm2,-0x30(%rbp,%rcx,8)
movupd %xmm3,-0x20(%rbp,%rcx,8)
movupd 0x20(%r13,%rcx,8),%xmm2
movupd 0x30(%r13,%rcx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x20(%r13,%rcx,8)
movupd %xmm3,0x30(%r13,%rcx,8)
movupd %xmm2,-0x10(%rdi,%rcx,8)
movupd %xmm3,(%rdi,%rcx,8)
movupd %xmm2,-0x10(%rbp,%rcx,8)
movupd %xmm3,0x0(%rbp,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1240 <matexp+0x120>
jmp    12c9 <matexp+0x1a9>
xor    %ecx,%ecx
test   $0x1,%dl
mov    %ebx,%ebp
je     1311 <matexp+0x1f1>
movupd 0x0(%r13,%rcx,8),%xmm2
movupd 0x10(%r13,%rcx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,0x0(%r13,%rcx,8)
movupd %xmm3,0x10(%r13,%rcx,8)
movupd %xmm2,(%r14,%rcx,8)
movupd %xmm3,0x10(%r14,%rcx,8)
mov    0x10(%rsp),%rdx
movupd %xmm2,(%rdx,%rcx,8)
movupd %xmm3,0x10(%rdx,%rcx,8)
cmp    %r15,%rax
je     13a5 <matexp+0x285>
mov    %rax,%rcx
not    %rcx
test   $0x1,%r15b
je     134c <matexp+0x22c>
movsd  0x0(%r13,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rax,8)
movsd  %xmm1,(%r14,%rax,8)
mov    0x10(%rsp),%rdx
movsd  %xmm1,(%rdx,%rax,8)
or     $0x1,%rax
add    %r15,%rcx
je     13a5 <matexp+0x285>
mov    %r15,%rcx
shl    $0x4,%rcx
add    %r14,%rcx
add    $0x8,%rcx
nop
movsd  0x0(%r13,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rax,8)
movsd  %xmm1,(%r14,%rax,8)
movsd  %xmm1,-0x8(%rcx,%rax,8)
movsd  0x8(%r13,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r13,%rax,8)
movsd  %xmm1,0x8(%r14,%rax,8)
movsd  %xmm1,(%rcx,%rax,8)
add    $0x2,%rax
cmp    %rax,%r15
jne    1360 <matexp+0x240>
mov    %ebp,0x24(%rsp)
test   %r11d,%r11d
jle    1456 <matexp+0x336>
mov    %r11d,%r8d
xor    %eax,%eax
cmp    $0x1,%r11d
je     142e <matexp+0x30e>
lea    (%r11,%r11,1),%r10d
mov    %r8d,%r9d
and    $0xfffffffe,%r9d
neg    %r9
mov    $0x1,%ebp
movsd  0xc28(%rip),%xmm0
xor    %edi,%edi
mov    %r11d,%ecx
xor    %esi,%esi
nop
movslq %ecx,%rcx
lea    (%rcx,%rbp,1),%rbx
cltq
lea    (%rsi,%rax,1),%rdx
movsd  0x0(%r13,%rdx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rdx,8)
movsd  0x0(%r13,%rbx,8),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rbx,8)
add    $0x2,%rsi
add    %r10d,%eax
add    $0x2,%rbp
add    %r10d,%ecx
add    $0xfffffffffffffffe,%rdi
cmp    %rdi,%r9
jne    13e0 <matexp+0x2c0>
neg    %rdi
mov    %rdi,%rax
test   $0x1,%r8b
je     1456 <matexp+0x336>
mov    %eax,%ecx
imul   %r11d,%ecx
movslq %ecx,%rcx
add    %rax,%rcx
movsd  0x0(%r13,%rcx,8),%xmm0
addsd  0xbb1(%rip),%xmm0
movsd  %xmm0,0x0(%r13,%rcx,8)
mov    %r14,0x28(%rsp)
cmpl   $0x2,0x4(%rsp)
jge    1572 <matexp+0x452>
mov    0x24(%rsp),%r12d
test   %r12d,%r12d
jle    18c8 <matexp+0x7a8>
xor    %ebx,%ebx
mov    %r13,%rdi
nopl   0x0(%rax)
mov    %ebx,%ebp
mov    $0x1,%ebx
sub    %ebp,%ebx
mov    0x60(%rsp,%rbx,8),%r14
mov    %rdi,%rsi
mov    %r14,%rdx
mov    %r11d,%ecx
mov    %r11d,%r8d
mov    %r11d,%r9d
call   1030 <matby@plt>
mov    0x18(%rsp),%r11
mov    %r14,%rdi
add    $0xffffffff,%r12d
jne    1480 <matexp+0x360>
test   %ebp,%ebp
mov    0x28(%rsp),%rbp
jne    18c8 <matexp+0x7a8>
test   %r15d,%r15d
je     18c8 <matexp+0x7a8>
cmp    $0x4,%r15d
jb     14eb <matexp+0x3cb>
cmp    %r13,0x8(%rsp)
jbe    17ce <matexp+0x6ae>
lea    0x0(,%r15,8),%rax
add    %r13,%rax
cmp    %rbp,%rax
jbe    17ce <matexp+0x6ae>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %r15,%rcx
mov    %r15,%rdx
and    $0x3,%rdx
je     1517 <matexp+0x3f7>
nop
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1500 <matexp+0x3e0>
cmp    $0x3,%rcx
jb     18c8 <matexp+0x7a8>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
movsd  0x8(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x8(%r13,%rax,8)
movsd  0x10(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x10(%r13,%rax,8)
movsd  0x18(%rbp,%rax,8),%xmm0
movsd  %xmm0,0x18(%r13,%rax,8)
add    $0x4,%rax
cmp    %rax,%r15
jne    1530 <matexp+0x410>
jmp    18c8 <matexp+0x7a8>
lea    0x0(,%r15,8),%rax
add    %r13,%rax
mov    %rax,0x50(%rsp)
mov    %r15d,%eax
and    $0xfffffffc,%eax
mov    %rax,0x48(%rsp)
add    $0xfffffffffffffffc,%rax
mov    %rax,0x40(%rsp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %rcx,%rax
mov    %rcx,0x38(%rsp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,0x30(%rsp)
mov    %r15,%rax
neg    %rax
mov    %rax,0x58(%rsp)
mov    $0x2,%ebp
mov    0x8(%rsp),%rbx
mov    $0x2,%r14d
jmp    15e7 <matexp+0x4c7>
nop
lea    0x1(%r14),%eax
cmp    0x4(%rsp),%r14d
mov    %eax,%r14d
mov    0x18(%rsp),%r11
je     1466 <matexp+0x346>
movapd %xmm6,0x80(%rsp)
mov    %ebp,%eax
mov    %rbx,%r12
mov    $0x3,%ebp
sub    %eax,%ebp
mov    0x60(%rsp,%rbp,8),%rbx
mov    %rbx,%rdi
mov    0x10(%rsp),%rsi
mov    %r12,%rdx
mov    %r11d,%ecx
mov    %r11d,%r8d
mov    %r11d,%r9d
call   1030 <matby@plt>
movapd 0x80(%rsp),%xmm6
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
divsd  %xmm0,%xmm6
test   %r15,%r15
je     15d0 <matexp+0x4b0>
cmp    $0x4,%r15d
jb     1652 <matexp+0x532>
lea    (%r12,%r15,8),%rax
cmp    %r13,%rax
jbe    16cf <matexp+0x5af>
cmp    0x50(%rsp),%r12
jae    16cf <matexp+0x5af>
xor    %ecx,%ecx
mov    %rcx,%rax
test   $0x1,%r15b
je     167c <matexp+0x55c>
movsd  (%r12,%rcx,8),%xmm0
mulsd  %xmm6,%xmm0
addsd  0x0(%r13,%rcx,8),%xmm0
movsd  %xmm0,0x0(%r13,%rcx,8)
mov    %rcx,%rax
or     $0x1,%rax
not    %rcx
cmp    0x58(%rsp),%rcx
je     15d0 <matexp+0x4b0>
nopw   0x0(%rax,%rax,1)
movsd  (%r12,%rax,8),%xmm0
mulsd  %xmm6,%xmm0
addsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm0
mulsd  %xmm6,%xmm0
addsd  0x8(%r13,%rax,8),%xmm0
movsd  %xmm0,0x8(%r13,%rax,8)
add    $0x2,%rax
cmp    %rax,%r15
jne    1690 <matexp+0x570>
jmp    15d0 <matexp+0x4b0>
movapd %xmm6,%xmm0
unpcklpd %xmm6,%xmm0
cmpq   $0x0,0x40(%rsp)
je     17c3 <matexp+0x6a3>
mov    0x30(%rsp),%rcx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movupd (%r12,%rax,8),%xmm1
movupd 0x10(%r12,%rax,8),%xmm2
mulpd  %xmm0,%xmm1
movupd 0x0(%r13,%rax,8),%xmm3
addpd  %xmm1,%xmm3
movupd 0x10(%r13,%rax,8),%xmm1
movupd 0x20(%r13,%rax,8),%xmm4
movupd 0x30(%r13,%rax,8),%xmm5
mulpd  %xmm0,%xmm2
addpd  %xmm1,%xmm2
movupd %xmm3,0x0(%r13,%rax,8)
movupd %xmm2,0x10(%r13,%rax,8)
movupd 0x20(%r12,%rax,8),%xmm1
movupd 0x30(%r12,%rax,8),%xmm2
mulpd  %xmm0,%xmm1
addpd  %xmm4,%xmm1
mulpd  %xmm0,%xmm2
addpd  %xmm5,%xmm2
movupd %xmm1,0x20(%r13,%rax,8)
movupd %xmm2,0x30(%r13,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    16f0 <matexp+0x5d0>
testb  $0x1,0x38(%rsp)
je     17ad <matexp+0x68d>
movupd (%r12,%rax,8),%xmm1
movupd 0x10(%r12,%rax,8),%xmm2
movupd 0x0(%r13,%rax,8),%xmm3
movupd 0x10(%r13,%rax,8),%xmm4
mulpd  %xmm0,%xmm1
addpd  %xmm3,%xmm1
mulpd  %xmm0,%xmm2
addpd  %xmm4,%xmm2
movupd %xmm1,0x0(%r13,%rax,8)
movupd %xmm2,0x10(%r13,%rax,8)
mov    0x48(%rsp),%rax
mov    %rax,%rcx
cmp    %r15,%rax
je     15d0 <matexp+0x4b0>
jmp    1654 <matexp+0x534>
xor    %eax,%eax
testb  $0x1,0x38(%rsp)
jne    1774 <matexp+0x654>
jmp    17ad <matexp+0x68d>
mov    %r15d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rsi
mov    %rsi,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
mov    %edx,%ecx
and    $0x3,%ecx
cmp    $0xc,%rsi
jae    17f5 <matexp+0x6d5>
xor    %esi,%esi
jmp    1876 <matexp+0x756>
movabs $0x7ffffffffffffffe,%rsi
ff ff 7f
add    $0xfffffffffffffffe,%rsi
and    %rsi,%rdx
xor    %esi,%esi
nopl   0x0(%rax,%rax,1)
movups 0x0(%rbp,%rsi,8),%xmm0
movups 0x10(%rbp,%rsi,8),%xmm1
movups %xmm0,0x0(%r13,%rsi,8)
movups %xmm1,0x10(%r13,%rsi,8)
movups 0x20(%rbp,%rsi,8),%xmm0
movups 0x30(%rbp,%rsi,8),%xmm1
movups %xmm0,0x20(%r13,%rsi,8)
movups %xmm1,0x30(%r13,%rsi,8)
movups 0x40(%rbp,%rsi,8),%xmm0
movups 0x50(%rbp,%rsi,8),%xmm1
movups %xmm0,0x40(%r13,%rsi,8)
movups %xmm1,0x50(%r13,%rsi,8)
movupd 0x60(%rbp,%rsi,8),%xmm0
movupd 0x70(%rbp,%rsi,8),%xmm1
movupd %xmm0,0x60(%r13,%rsi,8)
movupd %xmm1,0x70(%r13,%rsi,8)
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdx
jne    1810 <matexp+0x6f0>
test   %rcx,%rcx
je     18bf <matexp+0x79f>
lea    0x10(,%rsi,8),%rdx
add    %r13,%rdx
lea    0x10(,%rsi,8),%rsi
add    %rbp,%rsi
shl    $0x5,%rcx
xor    %edi,%edi
nopw   0x0(%rax,%rax,1)
movupd -0x10(%rsi,%rdi,1),%xmm0
movupd (%rsi,%rdi,1),%xmm1
movupd %xmm0,-0x10(%rdx,%rdi,1)
movupd %xmm1,(%rdx,%rdi,1)
add    $0x20,%rdi
cmp    %rdi,%rcx
jne    18a0 <matexp+0x780>
cmp    %r15,%rax
jne    14ed <matexp+0x3cd>
xor    %eax,%eax
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"nSquares too large\00"
define i32 @matexp(double* %0, i32 %1, i32 %2, i32 %3, double* %4) {
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [3 x double*]
%15 = alloca double*
%16 = alloca double
%17 = alloca double
store double* %0, double** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store double* %4, double** %10
store double 1.000000e+00, double* %17
%18 = load i32, i32* %9
%19 = icmp sgt i32 %18, 31
br i1 %19, label %20, label %22
20: ; preds = %5
%21 = call i32 @error2(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %22
22: ; preds = %20, %5
%23 = load double*, double** %6
%24 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 0
store double* %23, double** %24
%25 = load double*, double** %10
%26 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 1
store double* %25, double** %26
%27 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 1
%28 = load double*, double** %27
%29 = load i32, i32* %7
%30 = load i32, i32* %7
%31 = mul nsw i32 %29, %30
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds double, double* %28, i64 %32
%34 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 2
store double* %33, double** %34
%35 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 2
%36 = load double*, double** %35
%37 = load i32, i32* %7
%38 = load i32, i32* %7
%39 = mul nsw i32 %37, %38
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %36, i64 %40
store double* %41, double** %15
%42 = load i32, i32* %9
%43 = shl i32 1, %42
%44 = sitofp i32 %43 to double
%45 = fdiv double 1.000000e+00, %44
store double %45, double* %16
store i32 0, i32* %12
br label %46
46: ; preds = %69, %22
%47 = load i32, i32* %12
%48 = load i32, i32* %7
%49 = load i32, i32* %7
%50 = mul nsw i32 %48, %49
%51 = icmp slt i32 %47, %50
br i1 %51, label %52, label %72
52: ; preds = %46
%53 = load double, double* %16
%54 = load double*, double** %6
%55 = load i32, i32* %12
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds double, double* %54, i64 %56
%58 = load double, double* %57
%59 = fmul double %58, %53
store double %59, double* %57
%60 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 1
%61 = load double*, double** %60
%62 = load i32, i32* %12
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds double, double* %61, i64 %63
store double %59, double* %64
%65 = load double*, double** %15
%66 = load i32, i32* %12
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds double, double* %65, i64 %67
store double %59, double* %68
br label %69
69: ; preds = %52
%70 = load i32, i32* %12
%71 = add nsw i32 %70, 1
store i32 %71, i32* %12
br label %46
72: ; preds = %46
store i32 0, i32* %12
br label %73
73: ; preds = %88, %72
%74 = load i32, i32* %12
%75 = load i32, i32* %7
%76 = icmp slt i32 %74, %75
br i1 %76, label %77, label %91
77: ; preds = %73
%78 = load double*, double** %6
%79 = load i32, i32* %12
%80 = load i32, i32* %7
%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
%87 = fadd double %86, 1.000000e+00
store double %87, double* %85
br label %88
88: ; preds = %77
%89 = load i32, i32* %12
%90 = add nsw i32 %89, 1
store i32 %90, i32* %12
br label %73
91: ; preds = %73
store i32 2, i32* %13
store i32 2, i32* %11
br label %92
92: ; preds = %141, %91
%93 = load i32, i32* %13
%94 = load i32, i32* %8
%95 = icmp sle i32 %93, %94
br i1 %95, label %96, label %146
96: ; preds = %92
%97 = load i32, i32* %11
%98 = sub nsw i32 3, %97
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 %99
%101 = load double*, double** %100
%102 = load double*, double** %15
%103 = load i32, i32* %11
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 %104
%106 = load double*, double** %105
%107 = load i32, i32* %7
%108 = load i32, i32* %7
%109 = load i32, i32* %7
%110 = call i32 @matby(double* %101, double* %102, double* %106, i32 %107, i32 %108, i32 %109)
%111 = load i32, i32* %13
%112 = sitofp i32 %111 to double
%113 = load double, double* %17
%114 = fdiv double %113, %112
store double %114, double* %17
store i32 0, i32* %12
br label %115
115: ; preds = %137, %96
%116 = load i32, i32* %12
%117 = load i32, i32* %7
%118 = load i32, i32* %7
%119 = mul nsw i32 %117, %118
%120 = icmp slt i32 %116, %119
br i1 %120, label %121, label %140
121: ; preds = %115
%122 = load i32, i32* %11
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 %123
%125 = load double*, double** %124
%126 = load i32, i32* %12
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds double, double* %125, i64 %127
%129 = load double, double* %128
%130 = load double, double* %17
%131 = load double*, double** %6
%132 = load i32, i32* %12
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds double, double* %131, i64 %133
%135 = load double, double* %134
%136 = call double @llvm.fmuladd.f64(double %129, double %130, double %135)
store double %136, double* %134
br label %137
137: ; preds = %121
%138 = load i32, i32* %12
%139 = add nsw i32 %138, 1
store i32 %139, i32* %12
br label %115
140: ; preds = %115
br label %141
141: ; preds = %140
%142 = load i32, i32* %13
%143 = add nsw i32 %142, 1
store i32 %143, i32* %13
%144 = load i32, i32* %11
%145 = sub nsw i32 3, %144
store i32 %145, i32* %11
br label %92
146: ; preds = %92
store i32 0, i32* %12
store i32 0, i32* %11
br label %147
147: ; preds = %169, %146
%148 = load i32, i32* %12
%149 = load i32, i32* %9
%150 = icmp slt i32 %148, %149
br i1 %150, label %151, label %174
151: ; preds = %147
%152 = load i32, i32* %11
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 %153
%155 = load double*, double** %154
%156 = load i32, i32* %11
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 %157
%159 = load double*, double** %158
%160 = load i32, i32* %11
%161 = sub nsw i32 1, %160
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 %162
%164 = load double*, double** %163
%165 = load i32, i32* %7
%166 = load i32, i32* %7
%167 = load i32, i32* %7
%168 = call i32 @matby(double* %155, double* %159, double* %164, i32 %165, i32 %166, i32 %167)
br label %169
169: ; preds = %151
%170 = load i32, i32* %12
%171 = add nsw i32 %170, 1
store i32 %171, i32* %12
%172 = load i32, i32* %11
%173 = sub nsw i32 1, %172
store i32 %173, i32* %11
br label %147
174: ; preds = %147
%175 = load i32, i32* %11
%176 = icmp eq i32 %175, 1
br i1 %176, label %177, label %199
177: ; preds = %174
store i32 0, i32* %12
br label %178
178: ; preds = %195, %177
%179 = load i32, i32* %12
%180 = load i32, i32* %7
%181 = load i32, i32* %7
%182 = mul nsw i32 %180, %181
%183 = icmp slt i32 %179, %182
br i1 %183, label %184, label %198
184: ; preds = %178
%185 = getelementptr inbounds [3 x double*], [3 x double*]* %14, i64 0, i64 1
%186 = load double*, double** %185
%187 = load i32, i32* %12
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds double, double* %186, i64 %188
%190 = load double, double* %189
%191 = load double*, double** %6
%192 = load i32, i32* %12
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds double, double* %191, i64 %193
store double %190, double* %194
br label %195
195: ; preds = %184
%196 = load i32, i32* %12
%197 = add nsw i32 %196, 1
store i32 %197, i32* %12
br label %178
198: ; preds = %178
br label %199
199: ; preds = %198, %174
ret i32 0
}

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