#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double fabs(double);
int /*<<< orphan*/ free(double *);
double l2norm(double *, int);
scalar_t__ malloc(int);
int /*<<< orphan*/ mmult(double *, double *, double *, int, int, int);
int /*<<< orphan*/ msub(double *, double *, double *, int, int);
int /*<<< orphan*/ qrupdate(double *, int, double *, double *);
double sqrt(double);
void bfgs_factored(double *H, int N, double eps, double *xi, double *xf,
                   double *jac, double *jacf) {
  int i, j, supd, ct;
  double sn, yn, fd, yt, jacm, alpha, temp3;
  double *sk, *yk, *temp, *temp2, *t, *u;
  sk = (double *)malloc(sizeof(double) * N);
  yk = (double *)malloc(sizeof(double) * N);
  temp = (double *)malloc(sizeof(double) * 1);
  temp2 = (double *)malloc(sizeof(double) * 1);
  t = (double *)malloc(sizeof(double) * N);
  u = (double *)malloc(sizeof(double) * N);
  msub(xf, xi, sk, 1, N);
  msub(jacf, jac, yk, 1, N);
  sn = l2norm(sk, N);
  yn = l2norm(yk, N);
  fd = sqrt(eps);
  mmult(yk, sk, temp, 1, N, 1);
  if (temp[0] >= fd * sn * yn) {
    for (i = 0; i < N; ++i) {
      t[i] = 0.0;
      for (j = i; j < N; ++j) {
        ct = j * N;
        t[i] += H[ct + i] * sk[j];
      }
    }
    mmult(t, t, temp2, 1, N, 1);
    alpha = sqrt(temp[0] / temp2[0]);
    supd = 1;
    for (i = 0; i < N; ++i) {
      temp3 = 0.0;
      ct = i * N;
      for (j = 0; j < i + 1; ++j) {
        temp3 += H[ct + j] * t[j];
      }
      yt = fabs(yk[i] - temp3);
      if (jac[i] > jacf[i]) {
        jacm = jac[i];
      } else {
        jacm = jacf[i];
      }
      if (yt >= fd * jacm) {
        supd = 0;
      }
      u[i] = yk[i] - alpha * temp3;
    }
    if (supd == 0) {
      temp3 = 1.0 / sqrt(temp[0] * temp2[0]);
      for (i = 0; i < N; ++i) {
        t[i] *= temp3;
      }
      for (i = 1; i < N; ++i) {
        ct = i * N;
        for (j = 0; j < i; ++j) {
          H[j * N + i] = H[ct + j];
        }
      }
      qrupdate(H, N, t, u);
      for (i = 1; i < N; ++i) {
        ct = i * N;
        for (j = 0; j < i; ++j) {
          H[ct + j] = H[j * N + i];
        }
      }
    }
  }
  free(sk);
  free(yk);
  free(temp);
  free(temp2);
  free(t);
  free(u);
}


x86 assembly (clang, -O0):
<bfgs_factored>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x88(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x90(%rbp)
mov    $0x8,%edi
call   1080 <malloc@plt>
mov    %rax,-0x98(%rbp)
mov    $0x8,%edi
call   1080 <malloc@plt>
mov    %rax,-0xa0(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0xa8(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0xb0(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x88(%rbp),%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%ecx
call   1070 <msub@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x90(%rbp),%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%ecx
call   1070 <msub@plt>
mov    -0x88(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <l2norm@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0x90(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <l2norm@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1090 <sqrt@plt>
movsd  %xmm0,-0x60(%rbp)
mov    -0x90(%rbp),%rdi
mov    -0x88(%rbp),%rsi
mov    -0x98(%rbp),%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1060 <mmult@plt>
mov    -0x98(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  -0x58(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jb     16ab <bfgs_factored+0x53b>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    136f <bfgs_factored+0x1ff>
mov    -0xa8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    135c <bfgs_factored+0x1ec>
mov    -0x40(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x88(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
mov    -0xa8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    12f9 <bfgs_factored+0x189>
jmp    1361 <bfgs_factored+0x1f1>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12d4 <bfgs_factored+0x164>
mov    -0xa8(%rbp),%rdi
mov    -0xa8(%rbp),%rsi
mov    -0xa0(%rbp),%rdx
mov    -0xc(%rbp),%r8d
mov    $0x1,%r9d
mov    %r9d,%ecx
call   1060 <mmult@plt>
mov    -0x98(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0xa0(%rbp),%rax
divsd  (%rax),%xmm0
call   1090 <sqrt@plt>
movsd  %xmm0,-0x78(%rbp)
movl   $0x1,-0x44(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1521 <bfgs_factored+0x3b1>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x3c(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    -0x3c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    143c <bfgs_factored+0x2cc>
mov    -0x8(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0xa8(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    13e9 <bfgs_factored+0x279>
mov    -0x90(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x80(%rbp),%xmm0
movaps 0xbb8(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
ucomisd (%rax,%rcx,8),%xmm0
jbe    1498 <bfgs_factored+0x328>
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
jmp    14aa <bfgs_factored+0x33a>
mov    -0x38(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
ucomisd %xmm1,%xmm0
jb     14ca <bfgs_factored+0x35a>
movl   $0x0,-0x44(%rbp)
mov    -0x90(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0xb0(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    13c4 <bfgs_factored+0x254>
cmpl   $0x0,-0x44(%rbp)
jne    16a6 <bfgs_factored+0x536>
mov    -0x98(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0xa0(%rbp),%rax
mulsd  (%rax),%xmm0
call   1090 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xaaf(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1595 <bfgs_factored+0x425>
movsd  -0x80(%rbp),%xmm0
mov    -0xa8(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1561 <bfgs_factored+0x3f1>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    160e <bfgs_factored+0x49e>
mov    -0x3c(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    15fb <bfgs_factored+0x48b>
mov    -0x8(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    15b9 <bfgs_factored+0x449>
jmp    1600 <bfgs_factored+0x490>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    159c <bfgs_factored+0x42c>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0xa8(%rbp),%rdx
mov    -0xb0(%rbp),%rcx
call   1050 <qrupdate@plt>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    16a1 <bfgs_factored+0x531>
mov    -0x3c(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    168e <bfgs_factored+0x51e>
mov    -0x8(%rbp),%rax
mov    -0x40(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    -0x3c(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x48(%rbp),%ecx
add    -0x40(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    164c <bfgs_factored+0x4dc>
jmp    1693 <bfgs_factored+0x523>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    162f <bfgs_factored+0x4bf>
jmp    16a6 <bfgs_factored+0x536>
jmp    16ab <bfgs_factored+0x53b>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa0(%rbp),%rdi
call   1030 <free@plt>
mov    -0xa8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xb0(%rbp),%rdi
call   1030 <free@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfgs_factored>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r9,%r14
mov    %r8,0x38(%rsp)
mov    %rcx,0x10(%rsp)
mov    %rdx,0x20(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %esi,%r15d
mov    %rdi,(%rsp)
lea    0x0(,%r15,8),%r13d
mov    %r13d,%edi
call   1080 <malloc@plt>
mov    %rax,%r12
mov    %r13d,%edi
call   1080 <malloc@plt>
mov    %rax,%rbp
mov    $0x8,%edi
call   1080 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    $0x8,%edi
call   1080 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    %r13d,%edi
call   1080 <malloc@plt>
mov    %rax,%rbx
mov    %r13d,%edi
mov    %r12,%r13
call   1080 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    0x10(%rsp),%rdi
mov    0x20(%rsp),%rsi
mov    %r12,%rdx
mov    $0x1,%ecx
mov    %r15d,%r8d
call   1070 <msub@plt>
mov    %r14,0x40(%rsp)
mov    %r14,%rdi
mov    0x38(%rsp),%rsi
mov    %rbp,%rdx
mov    $0x1,%ecx
mov    %r15d,%r8d
call   1070 <msub@plt>
mov    %r12,%rdi
mov    %r15d,%esi
call   1040 <l2norm@plt>
movsd  %xmm0,0x50(%rsp)
mov    %rbp,0x20(%rsp)
mov    %rbp,%rdi
mov    %r15,0x10(%rsp)
mov    %r15d,%esi
call   1040 <l2norm@plt>
movsd  %xmm0,0x48(%rsp)
xorpd  %xmm0,%xmm0
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
movapd %xmm1,%xmm0
jb     1271 <bfgs_factored+0x101>
sqrtsd %xmm0,%xmm0
jmp    1276 <bfgs_factored+0x106>
call   1090 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
mov    0x20(%rsp),%rdi
mov    %r13,%rsi
mov    0x28(%rsp),%rbp
mov    %rbp,%rdx
mov    $0x1,%ecx
mov    0x10(%rsp),%r15
mov    %r15d,%r8d
mov    $0x1,%r9d
call   1060 <mmult@plt>
movsd  0x0(%rbp),%xmm0
movsd  0x50(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x48(%rsp),%xmm2
mulsd  %xmm1,%xmm2
ucomisd %xmm2,%xmm0
jb     16ff <bfgs_factored+0x58f>
mov    %r15d,%r12d
test   %r15d,%r15d
jle    1353 <bfgs_factored+0x1e3>
lea    0x0(,%r12,8),%rax
lea    0x8(,%r12,8),%r10
xor    %edx,%edx
mov    %r12,%rsi
mov    %r13,%rdi
mov    (%rsp),%r9
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movq   $0x0,(%rbx,%rdx,8)
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
mov    %r9,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp),%xmm1
mulsd  (%rdi,%rcx,8),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%rdx,8)
add    %rax,%rbp
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1320 <bfgs_factored+0x1b0>
add    $0x1,%rdx
add    %r10,%r9
add    $0x8,%rdi
add    $0xffffffffffffffff,%rsi
cmp    %r12,%rdx
jne    1300 <bfgs_factored+0x190>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    0x30(%rsp),%rbp
mov    %rbp,%rdx
mov    $0x1,%ecx
mov    %r15d,%r8d
mov    $0x1,%r9d
call   1060 <mmult@plt>
mov    0x28(%rsp),%rax
movsd  (%rax),%xmm0
divsd  0x0(%rbp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1392 <bfgs_factored+0x222>
sqrtsd %xmm0,%xmm0
jmp    1397 <bfgs_factored+0x227>
call   1090 <sqrt@plt>
mov    0x10(%rsp),%rax
movsd  0x8(%rsp),%xmm6
test   %eax,%eax
jle    16ff <bfgs_factored+0x58f>
mov    %r13,0x8(%rsp)
xorpd  0xc49(%rip),%xmm0
mov    (%rsp),%r11
lea    0x18(%r11),%rax
lea    0x0(,%r12,8),%r9
mov    $0x1,%r10d
mov    $0x1,%r13d
xor    %r8d,%r8d
movapd 0xc32(%rip),%xmm1
xor    %ebp,%ebp
mov    0x40(%rsp),%r14
mov    0x38(%rsp),%r15
jmp    144a <bfgs_factored+0x2da>
nopl   0x0(%rax)
mov    0x20(%rsp),%rcx
movsd  (%rcx,%rbp,8),%xmm3
movapd %xmm3,%xmm4
subsd  %xmm2,%xmm4
movsd  (%r15,%rbp,8),%xmm5
maxsd  (%r14,%rbp,8),%xmm5
mulsd  %xmm0,%xmm2
addsd  %xmm3,%xmm2
mov    0x18(%rsp),%rcx
movsd  %xmm2,(%rcx,%rbp,8)
lea    0x1(%rbp),%rcx
andpd  %xmm1,%xmm4
mulsd  %xmm6,%xmm5
ucomisd %xmm5,%xmm4
cmovae %r8d,%r10d
add    $0x1,%r13
add    %r9,%rax
add    %r9,%r11
mov    %rcx,%rbp
cmp    %r12,%rcx
je     14fc <bfgs_factored+0x38c>
cmp    $0x3,%rbp
jae    1460 <bfgs_factored+0x2f0>
xorpd  %xmm2,%xmm2
xor    %edx,%edx
jmp    14b7 <bfgs_factored+0x347>
nopl   0x0(%rax,%rax,1)
mov    %r13,%rsi
and    $0xfffffffffffffffc,%rsi
xorpd  %xmm2,%xmm2
xor    %edx,%edx
nopl   (%rax)
movsd  -0x18(%rax,%rdx,8),%xmm3
movsd  -0x10(%rax,%rdx,8),%xmm4
mulsd  (%rbx,%rdx,8),%xmm3
mulsd  0x8(%rbx,%rdx,8),%xmm4
addsd  %xmm2,%xmm3
movsd  -0x8(%rax,%rdx,8),%xmm5
mulsd  0x10(%rbx,%rdx,8),%xmm5
addsd  %xmm3,%xmm4
movsd  (%rax,%rdx,8),%xmm2
mulsd  0x18(%rbx,%rdx,8),%xmm2
addsd  %xmm4,%xmm5
addsd  %xmm5,%xmm2
add    $0x4,%rdx
cmp    %rdx,%rsi
jne    1470 <bfgs_factored+0x300>
test   $0x3,%r13b
je     13f0 <bfgs_factored+0x280>
mov    %r13d,%esi
and    $0x3,%esi
lea    (%rbx,%rdx,8),%rdi
lea    (%r11,%rdx,8),%rdx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rdx,%rcx,8),%xmm3
mulsd  (%rdi,%rcx,8),%xmm3
addsd  %xmm3,%xmm2
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    14e0 <bfgs_factored+0x370>
jmp    13f0 <bfgs_factored+0x280>
test   %r10d,%r10d
mov    0x8(%rsp),%r13
jne    16ff <bfgs_factored+0x58f>
mov    0x28(%rsp),%rax
movsd  (%rax),%xmm0
mov    0x30(%rsp),%rax
mulsd  (%rax),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     152c <bfgs_factored+0x3bc>
sqrtsd %xmm0,%xmm0
jmp    1531 <bfgs_factored+0x3c1>
call   1090 <sqrt@plt>
mov    0x10(%rsp),%rsi
test   %esi,%esi
jle    16ee <bfgs_factored+0x57e>
movsd  0xada(%rip),%xmm1
divsd  %xmm0,%xmm1
cmp    $0x4,%esi
jae    1556 <bfgs_factored+0x3e6>
xor    %eax,%eax
jmp    1610 <bfgs_factored+0x4a0>
mov    %r12d,%eax
and    $0xfffffffc,%eax
movapd %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     15da <bfgs_factored+0x46a>
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movupd (%rbx,%rcx,8),%xmm2
movupd 0x10(%rbx,%rcx,8),%xmm3
movupd 0x20(%rbx,%rcx,8),%xmm4
movupd 0x30(%rbx,%rcx,8),%xmm5
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,(%rbx,%rcx,8)
movupd %xmm3,0x10(%rbx,%rcx,8)
mulpd  %xmm0,%xmm4
mulpd  %xmm0,%xmm5
movupd %xmm4,0x20(%rbx,%rcx,8)
movupd %xmm5,0x30(%rbx,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rdi
jne    1590 <bfgs_factored+0x420>
jmp    15dc <bfgs_factored+0x46c>
xor    %ecx,%ecx
test   $0x1,%dl
je     15ff <bfgs_factored+0x48f>
movupd (%rbx,%rcx,8),%xmm2
movupd 0x10(%rbx,%rcx,8),%xmm3
mulpd  %xmm0,%xmm2
mulpd  %xmm0,%xmm3
movupd %xmm2,(%rbx,%rcx,8)
movupd %xmm3,0x10(%rbx,%rcx,8)
cmp    %r12,%rax
je     1627 <bfgs_factored+0x4b7>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rbx,%rax,8),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    1610 <bfgs_factored+0x4a0>
cmp    $0x1,%esi
jle    16ee <bfgs_factored+0x57e>
mov    (%rsp),%rdx
lea    (%rdx,%r12,8),%rax
add    $0x8,%rax
lea    0x0(,%r12,8),%rcx
lea    0x8(%rdx),%r8
mov    %r12,%r11
shl    $0x4,%r11
mov    $0x1,%r10d
xor    %r9d,%r9d
jmp    1678 <bfgs_factored+0x508>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r10
add    $0x1,%r9
add    %rcx,%rax
add    $0x8,%r8
cmp    %r12,%r10
je     1745 <bfgs_factored+0x5d5>
test   %r9,%r9
je     16c0 <bfgs_factored+0x550>
mov    %r10,%rdi
and    $0xfffffffffffffffe,%rdi
mov    %r8,%rbp
xor    %edx,%edx
nopl   0x0(%rax)
movsd  -0x8(%rax,%rdx,8),%xmm0
movsd  %xmm0,0x0(%rbp)
movsd  (%rax,%rdx,8),%xmm0
movsd  %xmm0,0x0(%rbp,%rcx,1)
add    $0x2,%rdx
add    %r11,%rbp
cmp    %rdx,%rdi
jne    1690 <bfgs_factored+0x520>
test   $0x1,%r10b
je     1660 <bfgs_factored+0x4f0>
jmp    16c8 <bfgs_factored+0x558>
nopw   0x0(%rax,%rax,1)
xor    %edx,%edx
test   $0x1,%r10b
je     1660 <bfgs_factored+0x4f0>
mov    %r10,%rdi
imul   %r12,%rdi
add    %rdx,%rdi
mov    (%rsp),%rbp
movsd  0x0(%rbp,%rdi,8),%xmm0
imul   %r12,%rdx
add    %r10,%rdx
movsd  %xmm0,0x0(%rbp,%rdx,8)
jmp    1660 <bfgs_factored+0x4f0>
mov    (%rsp),%rdi
mov    %rbx,%rdx
mov    0x18(%rsp),%rcx
call   1050 <qrupdate@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
mov    (%rsp),%rdi
mov    %rbx,%rdx
mov    0x18(%rsp),%rcx
mov    %rsi,%rbp
call   1050 <qrupdate@plt>
cmp    $0x2,%ebp
jl     16ff <bfgs_factored+0x58f>
mov    (%rsp),%rcx
lea    (%rcx,%r12,8),%rax
add    $0x8,%rax
mov    %r12,%r11
shl    $0x4,%r11
lea    0x0(,%r12,8),%r8
lea    0x8(%rcx),%rsi
mov    $0x1,%r10d
xor    %r9d,%r9d
mov    %rax,%rdx
mov    (%rsp),%r14
jmp    17ac <bfgs_factored+0x63c>
nop
add    $0x1,%r10
add    $0x1,%r9
add    $0x8,%rdx
add    %r8,%rax
add    $0x8,%rsi
cmp    %r12,%r10
je     16ff <bfgs_factored+0x58f>
test   %r9,%r9
je     17f0 <bfgs_factored+0x680>
mov    %r10,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %ecx,%ecx
xor    %ebp,%ebp
nopl   0x0(%rax)
movsd  (%rsi,%rcx,1),%xmm0
movsd  %xmm0,-0x8(%rax,%rbp,8)
movsd  (%rdx,%rcx,1),%xmm0
movsd  %xmm0,(%rax,%rbp,8)
add    $0x2,%rbp
add    %r11,%rcx
cmp    %rbp,%rdi
jne    17c0 <bfgs_factored+0x650>
test   $0x1,%r10b
je     1790 <bfgs_factored+0x620>
jmp    17f8 <bfgs_factored+0x688>
nopl   0x0(%rax)
xor    %ebp,%ebp
test   $0x1,%r10b
je     1790 <bfgs_factored+0x620>
mov    %r10,%rcx
imul   %r12,%rcx
mov    %rbp,%rdi
imul   %r12,%rdi
add    %r10,%rdi
movsd  (%r14,%rdi,8),%xmm0
add    %rbp,%rcx
movsd  %xmm0,(%r14,%rcx,8)
jmp    1790 <bfgs_factored+0x620>

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

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