#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*/ qkfit(double *, double *, double *, long *);
double sqrt(double);
float matfit(int **atoms1, int **atoms2, float **R, float *V, int nats,
             int entry, int PRECISION) {
  double cma[3], cmb[3];
  double umat[3][3];
  double r[3][3];
  double xasq, xbsq, xni, t, rtsum, rmse;
  float distance;
  int i, j, k, xn;
  long long_entry;
  xn = nats;
  xasq = 0.0;
  xbsq = 0.0;
  xni = 1.0 / ((double)xn);
  for (i = 0; i < 3; ++i) {
    cma[i] = cmb[i] = 0.0;
    for (j = 0; j <= 2; ++j)
      umat[j][i] = 0.0;
    for (j = 0; j < nats; ++j) {
      for (k = 0; k < 3; ++k) {
        umat[k][i] += (double)atoms1[j][i] / (double)PRECISION *
                      (double)atoms2[j][k] / (double)PRECISION;
      }
      t = (double)atoms1[j][i] / (double)PRECISION;
      cma[i] += t;
      xasq += t * t;
      t = (double)atoms2[j][i] / (double)PRECISION;
      cmb[i] += t;
      xbsq += t * t;
    }
  }
  for (i = 0; i <= 2; ++i) {
    xasq -= cma[i] * cma[i] * xni;
    xbsq -= cmb[i] * cmb[i] * xni;
    for (j = 0; j <= 2; ++j) {
      umat[j][i] = (umat[j][i] - cma[i] * cmb[j] * xni) * xni;
      r[i][j] = 0.0;
    }
  }
  long_entry = entry;
  qkfit(&umat[0][0], &rtsum, &r[0][0], &long_entry);
  entry = (int)long_entry;
  rmse = (xasq + xbsq) * xni - 2.0 * rtsum;
  if (rmse < 0.0)
    rmse = 0.0;
  rmse = sqrt(rmse);
  for (i = 0; i < 3; ++i) {
    for (j = 0; j < 3; ++j) {
      R[i][j] = (float)r[j][i];
    }
  }
  if (!entry)
    return rmse;
  for (i = 0; i <= 2; ++i) {
    t = 0.0;
    for (j = 0; j <= 2; ++j)
      t += ((double)R[i][j]) * cmb[j];
    V[i] = (float)(cma[i] - t) * xni;
  }
  return rmse;
}


x86 assembly (clang, -O0):
<matfit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x154(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
cvtsi2sdl -0x154(%rbp),%xmm1
ff
movsd  0xe8b(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movl   $0x0,-0x148(%rbp)
cmpl   $0x3,-0x148(%rbp)
jge    13c8 <matfit+0x2a8>
movslq -0x148(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp,%rax,8)
movslq -0x148(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp,%rax,8)
movl   $0x0,-0x14c(%rbp)
cmpl   $0x2,-0x14c(%rbp)
jg     1207 <matfit+0xe7>
movslq -0x14c(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x148(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    11c2 <matfit+0xa2>
movl   $0x0,-0x14c(%rbp)
mov    -0x14c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    13af <matfit+0x28f>
movl   $0x0,-0x150(%rbp)
cmpl   $0x3,-0x150(%rbp)
jge    12bd <matfit+0x19d>
mov    -0x10(%rbp),%rax
movslq -0x14c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x148(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
cvtsi2sdl 0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x14c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x150(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl 0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movslq -0x150(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x148(%rbp),%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x150(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x150(%rbp)
jmp    122a <matfit+0x10a>
mov    -0x10(%rbp),%rax
movslq -0x14c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x148(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
cvtsi2sdl 0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movslq -0x148(%rbp),%rax
addsd  -0x50(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x50(%rbp,%rax,8)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x130(%rbp),%xmm2
ff
movsd  -0x118(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x14c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x148(%rbp),%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
cvtsi2sdl 0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x130(%rbp),%xmm0
ff
movslq -0x148(%rbp),%rax
addsd  -0x70(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x70(%rbp,%rax,8)
movsd  -0x130(%rbp),%xmm0
ff
movsd  -0x130(%rbp),%xmm2
ff
movsd  -0x120(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    1211 <matfit+0xf1>
jmp    13b4 <matfit+0x294>
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    118b <matfit+0x6b>
movl   $0x0,-0x148(%rbp)
cmpl   $0x2,-0x148(%rbp)
jg     1574 <matfit+0x454>
movslq -0x148(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
movslq -0x148(%rbp),%rax
mulsd  -0x50(%rbp,%rax,8),%xmm0
movsd  -0x128(%rbp),%xmm2
movsd  -0x118(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movslq -0x148(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
movslq -0x148(%rbp),%rax
mulsd  -0x70(%rbp,%rax,8),%xmm0
movsd  -0x128(%rbp),%xmm2
ff
movsd  -0x120(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movl   $0x0,-0x14c(%rbp)
cmpl   $0x2,-0x14c(%rbp)
jg     155b <matfit+0x43b>
movslq -0x14c(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x148(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movslq -0x148(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
movslq -0x14c(%rbp),%rax
mulsd  -0x70(%rbp,%rax,8),%xmm0
movsd  -0x128(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x128(%rbp),%xmm0
ff
movslq -0x14c(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x148(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x148(%rbp),%rcx
lea    -0x110(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x14c(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    148b <matfit+0x36b>
jmp    1560 <matfit+0x440>
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    13d2 <matfit+0x2b2>
movslq -0x30(%rbp),%rax
mov    %rax,-0x160(%rbp)
lea    -0xc0(%rbp),%rdi
lea    -0x110(%rbp),%rdx
lea    -0x138(%rbp),%rsi
lea    -0x160(%rbp),%rcx
call   1030 <qkfit@plt>
mov    -0x160(%rbp),%rax
mov    %eax,-0x30(%rbp)
movsd  -0x118(%rbp),%xmm0
ff
addsd  -0x120(%rbp),%xmm0
ff
movsd  -0x128(%rbp),%xmm2
ff
movsd  0xa3e(%rip),%xmm1
mulsd  -0x138(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0x140(%rbp),%xmm0
ff
jbe    1615 <matfit+0x4f5>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x140(%rbp),%xmm0
ff
call   1040 <sqrt@plt>
movsd  %xmm0,-0x140(%rbp)
ff
movl   $0x0,-0x148(%rbp)
cmpl   $0x3,-0x148(%rbp)
jge    16c5 <matfit+0x5a5>
movl   $0x0,-0x14c(%rbp)
cmpl   $0x3,-0x14c(%rbp)
jge    16ac <matfit+0x58c>
movslq -0x14c(%rbp),%rcx
lea    -0x110(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x148(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x148(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    164b <matfit+0x52b>
jmp    16b1 <matfit+0x591>
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    1634 <matfit+0x514>
cmpl   $0x0,-0x30(%rbp)
jne    16e5 <matfit+0x5c5>
movsd  -0x140(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    17d4 <matfit+0x6b4>
movl   $0x0,-0x148(%rbp)
cmpl   $0x2,-0x148(%rbp)
jg     17c3 <matfit+0x6a3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movl   $0x0,-0x14c(%rbp)
cmpl   $0x2,-0x14c(%rbp)
jg     1776 <matfit+0x656>
mov    -0x20(%rbp),%rax
movslq -0x148(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movslq -0x14c(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm2
movsd  -0x130(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    1711 <matfit+0x5f1>
movslq -0x148(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
subsd  -0x130(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0x128(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x148(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    16ef <matfit+0x5cf>
movsd  -0x140(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matfit>:
push   %r15
push   %r14
push   %rbx
sub    $0x120,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
cvtsi2sd %r8d,%xmm8
cvtsi2sdl 0x140(%rsp),%xmm10
mov    %r8d,%r10d
movapd %xmm10,%xmm9
unpcklpd %xmm10,%xmm9
xorpd  %xmm3,%xmm3
xor    %ecx,%ecx
jmp    116e <matfit+0x4e>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rcx
cmp    $0x3,%rcx
je     127c <matfit+0x15c>
movq   $0x0,0x10(%rsp,%rcx,8)
movq   $0x0,0x30(%rsp,%rcx,8)
movq   $0x0,0x50(%rsp,%rcx,8)
movq   $0x0,0x68(%rsp,%rcx,8)
movq   $0x0,0x80(%rsp,%rcx,8)
test   %r8d,%r8d
jle    1160 <matfit+0x40>
xorpd  %xmm12,%xmm12
xorpd  %xmm5,%xmm5
xorpd  %xmm7,%xmm7
xor    %edx,%edx
xorpd  %xmm6,%xmm6
xorpd  %xmm1,%xmm1
nopw   0x0(%rax,%rax,1)
mov    (%rdi,%rdx,8),%rbx
mov    (%rsi,%rdx,8),%rax
movss  (%rbx,%rcx,4),%xmm0
movss  (%rax,%rcx,4),%xmm2
unpcklps %xmm0,%xmm2
cvtdq2pd %xmm2,%xmm0
movapd %xmm3,%xmm11
divpd  %xmm9,%xmm0
xorps  %xmm3,%xmm3
cvtsi2sdl (%rax),%xmm3
movapd %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
xorps  %xmm4,%xmm4
cvtsi2sdl 0x4(%rax),%xmm4
mulsd  %xmm2,%xmm3
divsd  %xmm10,%xmm3
mulsd  %xmm2,%xmm4
divsd  %xmm10,%xmm4
addsd  %xmm3,%xmm7
xorps  %xmm3,%xmm3
cvtsi2sdl 0x8(%rax),%xmm3
mulsd  %xmm2,%xmm3
addsd  %xmm4,%xmm5
divsd  %xmm10,%xmm3
addsd  %xmm2,%xmm1
addsd  %xmm0,%xmm6
addsd  %xmm3,%xmm12
mulpd  %xmm0,%xmm0
movapd %xmm0,%xmm3
addpd  %xmm11,%xmm3
add    $0x1,%rdx
cmp    %rdx,%r10
jne    11c0 <matfit+0xa0>
addpd  %xmm11,%xmm0
movsd  %xmm7,0x50(%rsp,%rcx,8)
movsd  %xmm5,0x68(%rsp,%rcx,8)
movsd  %xmm12,0x80(%rsp,%rcx,8)
movsd  %xmm1,0x30(%rsp,%rcx,8)
movsd  %xmm6,0x10(%rsp,%rcx,8)
movapd %xmm0,%xmm3
jmp    1160 <matfit+0x40>
movsd  0xd7b(%rip),%xmm12
divsd  %xmm8,%xmm12
xorpd  %xmm0,%xmm0
movapd %xmm0,0xd0(%rsp)
movapd %xmm0,0xc0(%rsp)
movapd %xmm0,0xb0(%rsp)
movapd %xmm0,0xa0(%rsp)
movq   $0x0,0xe0(%rsp)
movapd 0x30(%rsp),%xmm4
movapd 0xd44(%rip),%xmm1
movapd 0x10(%rsp),%xmm11
movapd %xmm11,%xmm9
unpcklpd %xmm4,%xmm9
movsd  0x20(%rsp),%xmm8
movapd %xmm11,%xmm10
unpckhpd %xmm4,%xmm10
movapd %xmm11,%xmm7
unpcklpd %xmm11,%xmm7
mulpd  %xmm4,%xmm7
movapd %xmm8,%xmm2
unpcklpd %xmm8,%xmm2
mulpd  %xmm4,%xmm2
movapd %xmm4,%xmm5
xorpd  %xmm1,%xmm5
movapd %xmm11,%xmm0
xorpd  %xmm1,%xmm0
unpcklpd %xmm5,%xmm0
mulpd  %xmm9,%xmm0
movapd %xmm12,%xmm4
unpcklpd %xmm12,%xmm4
mulpd  %xmm4,%xmm0
addpd  %xmm3,%xmm0
movapd %xmm11,%xmm9
unpckhpd %xmm11,%xmm9
movapd %xmm9,%xmm6
xorpd  %xmm1,%xmm6
shufpd $0x2,%xmm5,%xmm6
mulpd  %xmm10,%xmm6
mulpd  %xmm4,%xmm7
movapd 0x50(%rsp),%xmm3
subpd  %xmm7,%xmm3
movapd 0x80(%rsp),%xmm7
mulpd  %xmm4,%xmm3
movapd %xmm3,0x50(%rsp)
mulpd  %xmm4,%xmm2
subpd  %xmm2,%xmm7
mulpd  %xmm4,%xmm7
movapd %xmm7,0x80(%rsp)
mulpd  %xmm4,%xmm6
addpd  %xmm0,%xmm6
movsd  0x40(%rsp),%xmm0
movapd %xmm8,%xmm3
movapd %xmm0,0x100(%rsp)
unpcklpd %xmm0,%xmm3
xorpd  %xmm3,%xmm1
mulpd  %xmm3,%xmm3
movapd %xmm1,%xmm0
shufpd $0x1,%xmm5,%xmm0
mulpd  %xmm11,%xmm0
mulpd  %xmm4,%xmm0
addpd  0x60(%rsp),%xmm0
pshufd $0xee,%xmm1,%xmm2
mulpd  %xmm4,%xmm0
movapd %xmm0,0x60(%rsp)
movhlps %xmm5,%xmm1
mulpd  %xmm9,%xmm1
mulpd  %xmm4,%xmm1
addpd  0x70(%rsp),%xmm1
mulpd  %xmm4,%xmm1
movapd %xmm1,0x70(%rsp)
mulsd  %xmm8,%xmm2
movapd %xmm12,0xf0(%rsp)
mulsd  %xmm12,%xmm2
addsd  0x90(%rsp),%xmm2
mulsd  %xmm12,%xmm2
movsd  %xmm2,0x90(%rsp)
mulpd  %xmm4,%xmm3
subpd  %xmm3,%xmm6
movapd %xmm6,0x110(%rsp)
movslq %r9d,%rax
mov    %rax,0x8(%rsp)
lea    0x50(%rsp),%rdi
lea    0x48(%rsp),%rsi
lea    0xa0(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <qkfit@plt>
mov    0x8(%rsp),%rbx
movapd 0x110(%rsp),%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movsd  0x48(%rsp),%xmm0
mulsd  0xf0(%rsp),%xmm1
addsd  %xmm0,%xmm0
subsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
xorpd  %xmm0,%xmm0
maxsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
jb     149d <matfit+0x37d>
sqrtsd %xmm0,%xmm0
jmp    14a2 <matfit+0x382>
call   1040 <sqrt@plt>
mov    (%r15),%rdx
movsd  0xa0(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,(%rdx)
movsd  0xb8(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x4(%rdx)
movsd  0xd0(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x8(%rdx)
mov    0x8(%r15),%rcx
movsd  0xa8(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,(%rcx)
movsd  0xc0(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x4(%rcx)
movsd  0xd8(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x8(%rcx)
mov    0x10(%r15),%rax
movsd  0xb0(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,(%rax)
movsd  0xc8(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x4(%rax)
movsd  0xe0(%rsp),%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x8(%rax)
test   %ebx,%ebx
je     167a <matfit+0x55a>
movss  (%rdx),%xmm1
movss  0x4(%rdx),%xmm4
cvtss2sd %xmm1,%xmm5
movsd  0x10(%rsp),%xmm2
movsd  0x18(%rsp),%xmm1
mulsd  %xmm2,%xmm5
xorpd  %xmm3,%xmm3
addsd  %xmm3,%xmm5
cvtss2sd %xmm4,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm5,%xmm6
movss  0x8(%rdx),%xmm4
xorps  %xmm5,%xmm5
cvtss2sd %xmm4,%xmm5
movsd  0x20(%rsp),%xmm4
mulsd  %xmm4,%xmm5
addsd  %xmm6,%xmm5
movsd  0x30(%rsp),%xmm6
subsd  %xmm5,%xmm6
xorps  %xmm5,%xmm5
cvtsd2ss %xmm6,%xmm5
cvtss2sd %xmm5,%xmm5
movapd 0xf0(%rsp),%xmm7
mulsd  %xmm7,%xmm5
cvtsd2ss %xmm5,%xmm5
movss  %xmm5,(%r14)
movss  (%rcx),%xmm5
movss  0x4(%rcx),%xmm6
cvtss2sd %xmm5,%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm3,%xmm5
cvtss2sd %xmm6,%xmm6
mulsd  %xmm1,%xmm6
addsd  %xmm5,%xmm6
movss  0x8(%rcx),%xmm5
cvtss2sd %xmm5,%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm6,%xmm5
movsd  0x38(%rsp),%xmm6
subsd  %xmm5,%xmm6
xorps  %xmm5,%xmm5
cvtsd2ss %xmm6,%xmm5
cvtss2sd %xmm5,%xmm5
mulsd  %xmm7,%xmm5
cvtsd2ss %xmm5,%xmm5
movss  %xmm5,0x4(%r14)
movss  (%rax),%xmm5
movss  0x4(%rax),%xmm6
cvtss2sd %xmm5,%xmm5
mulsd  %xmm2,%xmm5
addsd  %xmm3,%xmm5
xorps  %xmm2,%xmm2
cvtss2sd %xmm6,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm5,%xmm2
movss  0x8(%rax),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm4,%xmm1
addsd  %xmm2,%xmm1
movapd 0x100(%rsp),%xmm2
subsd  %xmm1,%xmm2
xorps  %xmm1,%xmm1
cvtsd2ss %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm7,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,0x8(%r14)
cvtsd2ss %xmm0,%xmm0
add    $0x120,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

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