#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*/ clapack_dsyevd_simple(char, unsigned char, int, double *,
                                         int, double *, int *);
int /*<<< orphan*/ clapack_dsyrk(unsigned char, char, int, int, double,
                                 double *, int, double, double *, int);
int /*<<< orphan*/ free(double *);
scalar_t__ malloc(int);
double sqrt(double);
int dinvsafe(double *a, int n, double thresh) {
  double *myeigs = (double *)malloc(sizeof(double) * n);
  double *mytmp = (double *)malloc(sizeof(double) * n * n);
  for (int i = 0; i < n * n; i++)
    mytmp[i] = a[i];
  int info;
  clapack_dsyevd_simple('V', 'U', n, mytmp, n, myeigs, &info);
  double max_eig = myeigs[0];
  for (int i = 1; i < n; i++)
    if (myeigs[i] > max_eig)
      max_eig = myeigs[i];
  int i_am_sketchy = 0;
  for (int i = 0; i < n; i++) {
    if (myeigs[i] < thresh * max_eig) {
      i_am_sketchy = 1;
      myeigs[i] = 0;
    } else
      myeigs[i] = 1.0 / sqrt(myeigs[i]);
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++)
      mytmp[i * n + j] *= myeigs[i];
  }
  clapack_dsyrk('U', 'N', n, n, 1.0, mytmp, n, 0.0, a, n);
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      a[i * n + j] = a[j * n + i];
    }
  free(myeigs);
  free(mytmp);
  return i_am_sketchy;
}


x86 assembly (clang, -O0):
<dinvsafe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
movslq -0xc(%rbp),%rcx
imul   %rcx,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jge    11d3 <dinvsafe+0x83>
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1199 <dinvsafe+0x49>
mov    -0xc(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    -0xc(%rbp),%r8d
mov    -0x20(%rbp),%r9
mov    $0x56,%edi
mov    $0x55,%esi
lea    -0x30(%rbp),%rax
mov    %rax,(%rsp)
call   1040 <clapack_dsyevd_simple@plt>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1256 <dinvsafe+0x106>
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    1243 <dinvsafe+0xf3>
mov    -0x20(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1248 <dinvsafe+0xf8>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    120d <dinvsafe+0xbd>
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12ee <dinvsafe+0x19e>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12ad <dinvsafe+0x15d>
movl   $0x1,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
jmp    12db <dinvsafe+0x18b>
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xd36(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x44(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    12e0 <dinvsafe+0x190>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1264 <dinvsafe+0x114>
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    135d <dinvsafe+0x20d>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    134a <dinvsafe+0x1fa>
mov    -0x20(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x28(%rbp),%rax
mov    -0x48(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x4c(%rbp),%ecx
movslq %ecx,%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1308 <dinvsafe+0x1b8>
jmp    134f <dinvsafe+0x1ff>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12f5 <dinvsafe+0x1a5>
mov    -0xc(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0xc(%rbp),%r9d
mov    -0x8(%rbp),%r10
mov    -0xc(%rbp),%eax
mov    $0x55,%edi
mov    $0x4e,%esi
movsd  0xc7c(%rip),%xmm0
xorps  %xmm1,%xmm1
mov    %r10,(%rsp)
mov    %eax,0x8(%rsp)
call   1070 <clapack_dsyrk@plt>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1409 <dinvsafe+0x2b9>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    13f6 <dinvsafe+0x2a6>
mov    -0x8(%rbp),%rax
mov    -0x54(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x50(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x50(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x54(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    13b0 <dinvsafe+0x260>
jmp    13fb <dinvsafe+0x2ab>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    139b <dinvsafe+0x24b>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dinvsafe>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movsd  %xmm0,0x10(%rsp)
mov    %esi,%r12d
mov    %rdi,%r15
lea    0x0(,%r12,8),%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
imul   %r12d,%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
mov    %r12,0x8(%rsp)
mov    %r12d,%ecx
imul   %r12d,%ecx
test   %ecx,%ecx
je     1316 <dinvsafe+0x1c6>
mov    %ecx,%eax
cmp    $0x4,%ecx
jb     11bb <dinvsafe+0x6b>
lea    (%r15,%rax,8),%rcx
cmp    %rcx,%r14
jae    1234 <dinvsafe+0xe4>
lea    (%r14,%rax,8),%rcx
cmp    %r15,%rcx
jbe    1234 <dinvsafe+0xe4>
xor    %ecx,%ecx
mov    %rcx,%rdx
not    %rdx
add    %rax,%rdx
mov    %rax,%rsi
and    $0x3,%rsi
je     11e6 <dinvsafe+0x96>
nop
movsd  (%r15,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
add    $0x1,%rcx
add    $0xffffffffffffffff,%rsi
jne    11d0 <dinvsafe+0x80>
cmp    $0x3,%rdx
jb     1316 <dinvsafe+0x1c6>
movsd  (%r15,%rcx,8),%xmm0
movsd  %xmm0,(%r14,%rcx,8)
movsd  0x8(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x8(%r14,%rcx,8)
movsd  0x10(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x10(%r14,%rcx,8)
movsd  0x18(%r15,%rcx,8),%xmm0
movsd  %xmm0,0x18(%r14,%rcx,8)
add    $0x4,%rcx
cmp    %rcx,%rax
jne    11f0 <dinvsafe+0xa0>
jmp    1316 <dinvsafe+0x1c6>
mov    %eax,%ecx
and    $0xfffffffc,%ecx
lea    -0x4(%rcx),%rdi
mov    %rdi,%rsi
shr    $0x2,%rsi
add    $0x1,%rsi
mov    %esi,%edx
and    $0x3,%edx
cmp    $0xc,%rdi
jae    1257 <dinvsafe+0x107>
xor    %edi,%edi
jmp    12ca <dinvsafe+0x17a>
and    $0xfffffffffffffffc,%rsi
xor    %edi,%edi
nopl   (%rax)
movups (%r15,%rdi,8),%xmm0
movups 0x10(%r15,%rdi,8),%xmm1
movups %xmm0,(%r14,%rdi,8)
movups %xmm1,0x10(%r14,%rdi,8)
movups 0x20(%r15,%rdi,8),%xmm0
movups 0x30(%r15,%rdi,8),%xmm1
movups %xmm0,0x20(%r14,%rdi,8)
movups %xmm1,0x30(%r14,%rdi,8)
movups 0x40(%r15,%rdi,8),%xmm0
movups 0x50(%r15,%rdi,8),%xmm1
movups %xmm0,0x40(%r14,%rdi,8)
movups %xmm1,0x50(%r14,%rdi,8)
movups 0x60(%r15,%rdi,8),%xmm0
movupd 0x70(%r15,%rdi,8),%xmm1
movups %xmm0,0x60(%r14,%rdi,8)
movupd %xmm1,0x70(%r14,%rdi,8)
add    $0x10,%rdi
add    $0xfffffffffffffffc,%rsi
jne    1260 <dinvsafe+0x110>
test   %rdx,%rdx
je     130d <dinvsafe+0x1bd>
lea    (%r14,%rdi,8),%rsi
add    $0x10,%rsi
lea    (%r15,%rdi,8),%rdi
add    $0x10,%rdi
shl    $0x5,%rdx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
movups -0x10(%rdi,%rbp,1),%xmm0
movupd (%rdi,%rbp,1),%xmm1
movups %xmm0,-0x10(%rsi,%rbp,1)
movupd %xmm1,(%rsi,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%rdx
jne    12f0 <dinvsafe+0x1a0>
cmp    %rax,%rcx
jne    11bd <dinvsafe+0x6d>
sub    $0x8,%rsp
lea    0x2c(%rsp),%rax
mov    $0x56,%edi
mov    $0x55,%esi
mov    0x10(%rsp),%r12
mov    %r12d,%edx
mov    %r14,%rcx
mov    %r12d,%r8d
mov    %rbx,%r9
push   %rax
call   1040 <clapack_dsyevd_simple@plt>
add    $0x10,%rsp
movsd  (%rbx),%xmm0
mov    %r12d,%ebp
movapd %xmm0,%xmm2
cmp    $0x2,%r12d
jl     13f6 <dinvsafe+0x2a6>
lea    -0x1(%rbp),%rdx
lea    -0x2(%rbp),%rcx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    1377 <dinvsafe+0x227>
mov    $0x1,%ecx
movapd %xmm0,%xmm1
jmp    13c5 <dinvsafe+0x275>
and    $0xfffffffffffffffc,%rdx
xor    %ecx,%ecx
movapd %xmm0,%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x8(%rbx,%rcx,8),%xmm2
maxsd  %xmm1,%xmm2
movsd  0x10(%rbx,%rcx,8),%xmm1
maxsd  %xmm2,%xmm1
movsd  0x18(%rbx,%rcx,8),%xmm2
maxsd  %xmm1,%xmm2
movsd  0x20(%rbx,%rcx,8),%xmm1
maxsd  %xmm2,%xmm1
add    $0x4,%rcx
cmp    %rcx,%rdx
jne    1390 <dinvsafe+0x240>
add    $0x1,%rcx
movapd %xmm1,%xmm2
test   %rax,%rax
je     13f6 <dinvsafe+0x2a6>
lea    (%rbx,%rcx,8),%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rcx,%rdx,8),%xmm2
maxsd  %xmm1,%xmm2
add    $0x1,%rdx
movapd %xmm2,%xmm1
cmp    %rdx,%rax
jne    13e0 <dinvsafe+0x290>
cmpl   $0x0,0x8(%rsp)
jle    16f8 <dinvsafe+0x5a8>
mulsd  0x10(%rsp),%xmm2
xor    %r13d,%r13d
mov    $0x1,%r12d
xorpd  %xmm3,%xmm3
movsd  0xbe4(%rip),%xmm4
movsd  %xmm2,0x10(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%eax
ucomisd %xmm0,%xmm2
xorpd  %xmm1,%xmm1
ja     1472 <dinvsafe+0x322>
ucomisd %xmm3,%xmm0
jb     1450 <dinvsafe+0x300>
sqrtsd %xmm0,%xmm0
jmp    1467 <dinvsafe+0x317>
nopl   0x0(%rax,%rax,1)
call   1060 <sqrt@plt>
movsd  0xba3(%rip),%xmm4
xorpd  %xmm3,%xmm3
movsd  0x10(%rsp),%xmm2
movapd %xmm4,%xmm1
divsd  %xmm0,%xmm1
mov    %r13d,%eax
movsd  %xmm1,-0x8(%rbx,%r12,8)
cmp    %r12,%rbp
je     148d <dinvsafe+0x33d>
movsd  (%rbx,%r12,8),%xmm0
add    $0x1,%r12
mov    %eax,%r13d
jmp    1430 <dinvsafe+0x2e0>
cmpl   $0x0,0x8(%rsp)
jle    1702 <dinvsafe+0x5b2>
mov    %eax,0x4(%rsp)
mov    %ebp,%r11d
and    $0xfffffffc,%r11d
lea    -0x4(%r11),%r10
mov    %r10,0x10(%rsp)
shr    $0x2,%r10
add    $0x1,%r10
movabs $0x7ffffffffffffffc,%rax
ff ff 7f
or     $0x2,%rax
and    %r10,%rax
mov    %rax,0x18(%rsp)
mov    %rbp,%r12
neg    %r12
lea    0x30(%r14),%rcx
lea    0x0(,%rbp,8),%r13
xor    %edx,%edx
mov    %r14,%rax
jmp    1503 <dinvsafe+0x3b3>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%rdx
add    %r13,%rcx
add    %r13,%rax
cmp    %rbp,%rdx
je     1657 <dinvsafe+0x507>
mov    %rdx,%r8
imul   %rbp,%r8
cmpl   $0x4,0x8(%rsp)
jb     1539 <dinvsafe+0x3e9>
mov    %rdx,%rsi
imul   %rbp,%rsi
lea    (%rbx,%rdx,8),%rdi
add    $0x8,%rdi
lea    (%r14,%rsi,8),%r9
cmp    %rdi,%r9
jae    15a0 <dinvsafe+0x450>
lea    (%rbx,%rdx,8),%rdi
add    %rbp,%rsi
lea    (%r14,%rsi,8),%rsi
cmp    %rsi,%rdi
jae    15a0 <dinvsafe+0x450>
xor    %edi,%edi
mov    %rdi,%rsi
test   $0x1,%bpl
je     155f <dinvsafe+0x40f>
movsd  (%rbx,%rdx,8),%xmm0
add    %rdi,%r8
mulsd  (%r14,%r8,8),%xmm0
movsd  %xmm0,(%r14,%r8,8)
mov    %rdi,%rsi
or     $0x1,%rsi
not    %rdi
cmp    %r12,%rdi
je     14f0 <dinvsafe+0x3a0>
nopw   0x0(%rax,%rax,1)
movsd  (%rbx,%rdx,8),%xmm0
mulsd  (%rax,%rsi,8),%xmm0
movsd  %xmm0,(%rax,%rsi,8)
movsd  (%rbx,%rdx,8),%xmm0
mulsd  0x8(%rax,%rsi,8),%xmm0
movsd  %xmm0,0x8(%rax,%rsi,8)
add    $0x2,%rsi
cmp    %rsi,%rbp
jne    1570 <dinvsafe+0x420>
jmp    14f0 <dinvsafe+0x3a0>
xchg   %ax,%ax
cmpq   $0x0,0x10(%rsp)
je     164d <dinvsafe+0x4fd>
movsd  (%rbx,%rdx,8),%xmm0
unpcklpd %xmm0,%xmm0
mov    0x18(%rsp),%rsi
xor    %edi,%edi
nopl   0x0(%rax)
movupd -0x30(%rcx,%rdi,8),%xmm1
movupd -0x20(%rcx,%rdi,8),%xmm2
movupd -0x10(%rcx,%rdi,8),%xmm3
movupd (%rcx,%rdi,8),%xmm4
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,-0x30(%rcx,%rdi,8)
movupd %xmm2,-0x20(%rcx,%rdi,8)
mulpd  %xmm0,%xmm3
mulpd  %xmm0,%xmm4
movupd %xmm3,-0x10(%rcx,%rdi,8)
movupd %xmm4,(%rcx,%rdi,8)
add    $0x8,%rdi
add    $0xfffffffffffffffe,%rsi
jne    15c0 <dinvsafe+0x470>
test   $0x1,%r10b
je     163c <dinvsafe+0x4ec>
movsd  (%rbx,%rdx,8),%xmm0
unpcklpd %xmm0,%xmm0
add    %r8,%rdi
movupd (%r14,%rdi,8),%xmm1
movupd 0x10(%r14,%rdi,8),%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd %xmm1,(%r14,%rdi,8)
movupd %xmm2,0x10(%r14,%rdi,8)
mov    %r11,%rdi
cmp    %rbp,%r11
je     14f0 <dinvsafe+0x3a0>
jmp    153b <dinvsafe+0x3eb>
xor    %edi,%edi
test   $0x1,%r10b
jne    160e <dinvsafe+0x4be>
jmp    163c <dinvsafe+0x4ec>
movsd  0x9a1(%rip),%xmm0
xorpd  %xmm1,%xmm1
mov    $0x55,%edi
mov    $0x4e,%esi
mov    0x8(%rsp),%r12
mov    %r12d,%edx
mov    %r12d,%ecx
mov    %r14,%r8
mov    %r12d,%r9d
push   %r12
push   %r15
call   1070 <clapack_dsyrk@plt>
add    $0x10,%rsp
test   %r12d,%r12d
jle    1735 <dinvsafe+0x5e5>
lea    0x0(,%rbp,8),%rax
lea    0x8(,%rbp,8),%r8
lea    (%r15,%rbp,8),%rcx
add    $0x8,%r15
lea    -0x1(%rbp),%rsi
xor    %r9d,%r9d
jmp    16cf <dinvsafe+0x57f>
cs nopw 0x0(%rax,%rax,1)
nop
add    %r8,%r15
add    %r8,%rcx
add    $0xffffffffffffffff,%rsi
cmp    %rbp,%r9
je     1735 <dinvsafe+0x5e5>
add    $0x1,%r9
cmp    %rbp,%r9
jae    16c0 <dinvsafe+0x570>
mov    %rcx,%rdx
xor    %edi,%edi
nopl   (%rax)
movsd  (%rdx),%xmm0
movsd  %xmm0,(%r15,%rdi,8)
add    $0x1,%rdi
add    %rax,%rdx
cmp    %rdi,%rsi
jne    16e0 <dinvsafe+0x590>
jmp    16c0 <dinvsafe+0x570>
movl   $0x0,0x4(%rsp)
jmp    1706 <dinvsafe+0x5b6>
mov    %eax,0x4(%rsp)
movsd  0x8f2(%rip),%xmm0
xorpd  %xmm1,%xmm1
mov    $0x55,%edi
mov    $0x4e,%esi
mov    0x8(%rsp),%rcx
mov    %ecx,%edx
mov    %r14,%r8
mov    %ecx,%r9d
push   %rcx
push   %r15
call   1070 <clapack_dsyrk@plt>
add    $0x10,%rsp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x4(%rsp),%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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