#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 fmatfit(float **atoms1, float **atoms2, float **R, float *V, int nats,
              int entry) {
  double cma[3], cmb[3];
  double umat[3][3];
  double xasq, xbsq, xni, t, rtsum, rmse;
  double r[3][3];
  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 < 3; ++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)atoms2[j][k];
      }
      t = (double)atoms1[j][i];
      cma[i] += t;
      xasq += t * t;
      t = (double)atoms2[j][i];
      cmb[i] += t;
      xbsq += t * t;
    }
  }
  for (i = 0; i < 3; ++i) {
    xasq -= cma[i] * cma[i] * xni;
    xbsq -= cmb[i] * cmb[i] * xni;
    for (j = 0; j < 3; ++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 < 3; ++i) {
    t = 0.0;
    for (j = 0; j < 3; ++j) {
      t += ((double)R[i][j]) * cmb[j];
    }
    V[i] = (float)(cma[i] - t) * xni;
  }
  return rmse;
}


x86 assembly (clang, -O0):
<fmatfit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
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,-0x150(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
cvtsi2sdl -0x150(%rbp),%xmm1
ff
movsd  0xe8e(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movl   $0x0,-0x144(%rbp)
cmpl   $0x3,-0x144(%rbp)
jge    13b5 <fmatfit+0x295>
movslq -0x144(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp,%rax,8)
movslq -0x144(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp,%rax,8)
movl   $0x0,-0x148(%rbp)
cmpl   $0x3,-0x148(%rbp)
jge    1204 <fmatfit+0xe4>
movslq -0x148(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x144(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    11bf <fmatfit+0x9f>
movl   $0x0,-0x148(%rbp)
mov    -0x148(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    139c <fmatfit+0x27c>
movl   $0x0,-0x14c(%rbp)
cmpl   $0x3,-0x14c(%rbp)
jge    12b4 <fmatfit+0x194>
mov    -0x10(%rbp),%rax
movslq -0x148(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x144(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x148(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x14c(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
cvtss2sd %xmm1,%xmm2
movslq -0x14c(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x144(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14c(%rbp)
jmp    1227 <fmatfit+0x107>
mov    -0x10(%rbp),%rax
movslq -0x148(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x144(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movslq -0x144(%rbp),%rax
addsd  -0x50(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x50(%rbp,%rax,8)
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0xc8(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x18(%rbp),%rax
movslq -0x148(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x144(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movslq -0x144(%rbp),%rax
addsd  -0x70(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x70(%rbp,%rax,8)
movsd  -0xe0(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0xd0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    120e <fmatfit+0xee>
jmp    13a1 <fmatfit+0x281>
mov    -0x144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x144(%rbp)
jmp    1188 <fmatfit+0x68>
movl   $0x0,-0x144(%rbp)
cmpl   $0x3,-0x144(%rbp)
jge    1561 <fmatfit+0x441>
movslq -0x144(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
movslq -0x144(%rbp),%rax
mulsd  -0x50(%rbp,%rax,8),%xmm0
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0xc8(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movslq -0x144(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm0
movslq -0x144(%rbp),%rax
mulsd  -0x70(%rbp,%rax,8),%xmm0
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0xd0(%rbp),%xmm1
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movl   $0x0,-0x148(%rbp)
cmpl   $0x3,-0x148(%rbp)
jge    1548 <fmatfit+0x428>
movslq -0x148(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x144(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movslq -0x144(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
movslq -0x148(%rbp),%rax
mulsd  -0x70(%rbp,%rax,8),%xmm0
movsd  -0xd8(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
movslq -0x148(%rbp),%rcx
lea    -0xc0(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x144(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movslq -0x144(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x148(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    1478 <fmatfit+0x358>
jmp    154d <fmatfit+0x42d>
mov    -0x144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x144(%rbp)
jmp    13bf <fmatfit+0x29f>
movslq -0x30(%rbp),%rax
mov    %rax,-0x158(%rbp)
lea    -0xc0(%rbp),%rdi
lea    -0x140(%rbp),%rdx
lea    -0xe8(%rbp),%rsi
lea    -0x158(%rbp),%rcx
call   1030 <qkfit@plt>
mov    -0x158(%rbp),%rax
mov    %eax,-0x30(%rbp)
movsd  -0xc8(%rbp),%xmm0
ff
addsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm2
ff
movsd  0xa51(%rip),%xmm1
mulsd  -0xe8(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
xorps  %xmm0,%xmm0
ucomisd -0xf0(%rbp),%xmm0
ff
jbe    1602 <fmatfit+0x4e2>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
call   1040 <sqrt@plt>
movsd  %xmm0,-0xf0(%rbp)
ff
movl   $0x0,-0x144(%rbp)
cmpl   $0x3,-0x144(%rbp)
jge    16b2 <fmatfit+0x592>
movl   $0x0,-0x148(%rbp)
cmpl   $0x3,-0x148(%rbp)
jge    1699 <fmatfit+0x579>
movslq -0x148(%rbp),%rcx
lea    -0x140(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x144(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x20(%rbp),%rax
movslq -0x144(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x148(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    1638 <fmatfit+0x518>
jmp    169e <fmatfit+0x57e>
mov    -0x144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x144(%rbp)
jmp    1621 <fmatfit+0x501>
cmpl   $0x0,-0x30(%rbp)
jne    16d2 <fmatfit+0x5b2>
movsd  -0xf0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    17c1 <fmatfit+0x6a1>
movl   $0x0,-0x144(%rbp)
cmpl   $0x3,-0x144(%rbp)
jge    17b0 <fmatfit+0x690>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movl   $0x0,-0x148(%rbp)
cmpl   $0x3,-0x148(%rbp)
jge    1763 <fmatfit+0x643>
mov    -0x20(%rbp),%rax
movslq -0x144(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x148(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
cvtss2sd %xmm0,%xmm0
movslq -0x148(%rbp),%rax
movsd  -0x70(%rbp,%rax,8),%xmm2
movsd  -0xe0(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x148(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x148(%rbp)
jmp    16fe <fmatfit+0x5de>
movslq -0x144(%rbp),%rax
movsd  -0x50(%rbp,%rax,8),%xmm0
subsd  -0xe0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
mov    -0x28(%rbp),%rax
movslq -0x144(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x144(%rbp)
jmp    16dc <fmatfit+0x5bc>
movsd  -0xf0(%rbp),%xmm0
ff
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmatfit>:
push   %r15
push   %r14
push   %rbx
sub    $0x120,%rsp
cvtsi2sd %r8d,%xmm1
mov    %rcx,%r14
mov    %rdx,%r15
mov    %r8d,%r10d
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
jmp    115e <fmatfit+0x3e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rcx
cmp    $0x3,%rcx
je     1237 <fmatfit+0x117>
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    1150 <fmatfit+0x30>
xorpd  %xmm2,%xmm2
xorpd  %xmm3,%xmm3
xor    %edx,%edx
xorpd  %xmm4,%xmm4
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movapd %xmm0,%xmm5
mov    (%rdi,%rdx,8),%rbx
mov    (%rsi,%rdx,8),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rax,%rcx,4),%xmm6
movss  (%rbx,%rcx,4),%xmm7
unpcklps %xmm6,%xmm7
cvtps2pd %xmm7,%xmm6
mulsd  %xmm6,%xmm0
addsd  %xmm0,%xmm3
cvtps2pd 0x4(%rax),%xmm0
movapd %xmm6,%xmm7
unpcklpd %xmm6,%xmm7
mulpd  %xmm0,%xmm7
addpd  %xmm7,%xmm4
addpd  %xmm6,%xmm2
mulpd  %xmm6,%xmm6
movapd %xmm6,%xmm0
addpd  %xmm5,%xmm0
add    $0x1,%rdx
cmp    %rdx,%r10
jne    11b0 <fmatfit+0x90>
addpd  %xmm5,%xmm6
movsd  %xmm3,0x50(%rsp,%rcx,8)
movlpd %xmm4,0x68(%rsp,%rcx,8)
movhpd %xmm4,0x80(%rsp,%rcx,8)
movlpd %xmm2,0x30(%rsp,%rcx,8)
movhpd %xmm2,0x10(%rsp,%rcx,8)
movapd %xmm6,%xmm0
jmp    1150 <fmatfit+0x30>
movsd  0xdc0(%rip),%xmm12
divsd  %xmm1,%xmm12
xorpd  %xmm1,%xmm1
movapd %xmm1,0xd0(%rsp)
movapd %xmm1,0xc0(%rsp)
movapd %xmm1,0xb0(%rsp)
movapd %xmm1,0xa0(%rsp)
movapd 0x30(%rsp),%xmm4
movapd 0xd95(%rip),%xmm1
movapd 0x10(%rsp),%xmm11
movapd %xmm4,%xmm9
movsd  0x20(%rsp),%xmm8
movapd %xmm4,%xmm10
movapd %xmm11,%xmm3
unpcklpd %xmm11,%xmm3
mulpd  %xmm4,%xmm3
movapd %xmm8,%xmm5
unpcklpd %xmm8,%xmm5
mulpd  %xmm4,%xmm5
xorpd  %xmm1,%xmm4
movapd %xmm11,%xmm2
xorpd  %xmm1,%xmm2
unpcklpd %xmm11,%xmm9
movapd %xmm4,%xmm7
unpcklpd %xmm2,%xmm7
mulpd  %xmm9,%xmm7
movapd %xmm12,%xmm2
unpcklpd %xmm12,%xmm2
mulpd  %xmm2,%xmm7
addpd  %xmm0,%xmm7
movapd %xmm11,%xmm9
unpckhpd %xmm11,%xmm9
movapd %xmm9,%xmm0
xorpd  %xmm1,%xmm0
movapd %xmm4,%xmm6
shufpd $0x1,%xmm0,%xmm6
movq   $0x0,0xe0(%rsp)
unpckhpd %xmm11,%xmm10
mulpd  %xmm10,%xmm6
mulpd  %xmm2,%xmm3
movapd 0x50(%rsp),%xmm0
subpd  %xmm3,%xmm0
movapd 0x80(%rsp),%xmm3
mulpd  %xmm2,%xmm0
movapd %xmm0,0x50(%rsp)
mulpd  %xmm2,%xmm5
subpd  %xmm5,%xmm3
mulpd  %xmm2,%xmm3
movapd %xmm3,0x80(%rsp)
mulpd  %xmm2,%xmm6
addpd  %xmm7,%xmm6
movsd  0x40(%rsp),%xmm0
movapd %xmm0,0x100(%rsp)
unpcklpd %xmm8,%xmm0
xorpd  %xmm0,%xmm1
movapd %xmm1,%xmm3
unpcklpd %xmm4,%xmm3
mulpd  %xmm11,%xmm3
mulpd  %xmm2,%xmm3
addpd  0x60(%rsp),%xmm3
mulpd  %xmm0,%xmm0
mulpd  %xmm2,%xmm3
movapd %xmm3,0x60(%rsp)
shufpd $0x1,%xmm1,%xmm4
mulpd  %xmm9,%xmm4
mulpd  %xmm2,%xmm4
addpd  0x70(%rsp),%xmm4
mulpd  %xmm2,%xmm4
movapd %xmm4,0x70(%rsp)
mulsd  %xmm8,%xmm1
movapd %xmm12,0xf0(%rsp)
mulsd  %xmm12,%xmm1
addsd  0x90(%rsp),%xmm1
mulsd  %xmm12,%xmm1
movsd  %xmm1,0x90(%rsp)
mulpd  %xmm2,%xmm0
subpd  %xmm0,%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     1454 <fmatfit+0x334>
sqrtsd %xmm0,%xmm0
jmp    1459 <fmatfit+0x339>
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     1631 <fmatfit+0x511>
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 @fmatfit(float** %0, float** %1, float** %2, float* %3, i32 %4, i32 %5) {
%7 = alloca float
%8 = alloca float**
%9 = alloca float**
%10 = alloca float**
%11 = alloca float*
%12 = alloca i32
%13 = alloca i32
%14 = alloca [3 x double]
%15 = alloca [3 x double]
%16 = alloca [3 x [3 x double]]
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca [3 x [3 x double]]
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i64
store float** %0, float*** %8
store float** %1, float*** %9
store float** %2, float*** %10
store float* %3, float** %11
store i32 %4, i32* %12
store i32 %5, i32* %13
%29 = load i32, i32* %12
store i32 %29, i32* %27
store double 0.000000e+00, double* %17
store double 0.000000e+00, double* %18
%30 = load i32, i32* %27
%31 = sitofp i32 %30 to double
%32 = fdiv double 1.000000e+00, %31
store double %32, double* %19
store i32 0, i32* %24
br label %33
33: ; preds = %142, %6
%34 = load i32, i32* %24
%35 = icmp slt i32 %34, 3
br i1 %35, label %36, label %145
36: ; preds = %33
%37 = load i32, i32* %24
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %38
store double 0.000000e+00, double* %39
%40 = load i32, i32* %24
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 %41
store double 0.000000e+00, double* %42
store i32 0, i32* %25
br label %43
43: ; preds = %53, %36
%44 = load i32, i32* %25
%45 = icmp slt i32 %44, 3
br i1 %45, label %46, label %56
46: ; preds = %43
%47 = load i32, i32* %25
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i64 0, i64 %48
%50 = load i32, i32* %24
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [3 x double], [3 x double]* %49, i64 0, i64 %51
store double 0.000000e+00, double* %52
br label %53
53: ; preds = %46
%54 = load i32, i32* %25
%55 = add nsw i32 %54, 1
store i32 %55, i32* %25
br label %43
56: ; preds = %43
store i32 0, i32* %25
br label %57
57: ; preds = %138, %56
%58 = load i32, i32* %25
%59 = load i32, i32* %12
%60 = icmp slt i32 %58, %59
br i1 %60, label %61, label %141
61: ; preds = %57
store i32 0, i32* %26
br label %62
62: ; preds = %94, %61
%63 = load i32, i32* %26
%64 = icmp slt i32 %63, 3
br i1 %64, label %65, label %97
65: ; preds = %62
%66 = load float**, float*** %8
%67 = load i32, i32* %25
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds float*, float** %66, i64 %68
%70 = load float*, float** %69
%71 = load i32, i32* %24
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds float, float* %70, i64 %72
%74 = load float, float* %73
%75 = fpext float %74 to double
%76 = load float**, float*** %9
%77 = load i32, i32* %25
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds float*, float** %76, i64 %78
%80 = load float*, float** %79
%81 = load i32, i32* %26
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds float, float* %80, i64 %82
%84 = load float, float* %83
%85 = fpext float %84 to double
%86 = load i32, i32* %26
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i64 0, i64 %87
%89 = load i32, i32* %24
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds [3 x double], [3 x double]* %88, i64 0, i64 %90
%92 = load double, double* %91
%93 = call double @llvm.fmuladd.f64(double %75, double %85, double %92)
store double %93, double* %91
br label %94
94: ; preds = %65
%95 = load i32, i32* %26
%96 = add nsw i32 %95, 1
store i32 %96, i32* %26
br label %62
97: ; preds = %62
%98 = load float**, float*** %8
%99 = load i32, i32* %25
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds float*, float** %98, i64 %100
%102 = load float*, float** %101
%103 = load i32, i32* %24
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds float, float* %102, i64 %104
%106 = load float, float* %105
%107 = fpext float %106 to double
store double %107, double* %20
%108 = load double, double* %20
%109 = load i32, i32* %24
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 %110
%112 = load double, double* %111
%113 = fadd double %112, %108
store double %113, double* %111
%114 = load double, double* %20
%115 = load double, double* %20
%116 = load double, double* %17
%117 = call double @llvm.fmuladd.f64(double %114, double %115, double %116)
store double %117, double* %17
%118 = load float**, float*** %9
%119 = load i32, i32* %25
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds float*, float** %118, i64 %120
%122 = load float*, float** %121
%123 = load i32, i32* %24
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds float, float* %122, i64 %124
%126 = load float, float* %125
%127 = fpext float %126 to double
store double %127, double* %20
%128 = load double, double* %20
%129 = load i32, i32* %24
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %130
%132 = load double, double* %131
%133 = fadd double %132, %128
store double %133, double* %131
%134 = load double, double* %20
%135 = load double, double* %20
%136 = load double, double* %18
%137 = call double @llvm.fmuladd.f64(double %134, double %135, double %136)
store double %137, double* %18
br label %138
138: ; preds = %97
%139 = load i32, i32* %25
%140 = add nsw i32 %139, 1
store i32 %140, i32* %25
br label %57
141: ; preds = %57
br label %142
142: ; preds = %141
%143 = load i32, i32* %24
%144 = add nsw i32 %143, 1
store i32 %144, i32* %24
br label %33
145: ; preds = %33
store i32 0, i32* %24
br label %146
146: ; preds = %217, %145
%147 = load i32, i32* %24
%148 = icmp slt i32 %147, 3
br i1 %148, label %149, label %220
149: ; preds = %146
%150 = load i32, i32* %24
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 %151
%153 = load double, double* %152
%154 = load i32, i32* %24
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 %155
%157 = load double, double* %156
%158 = fmul double %153, %157
%159 = load double, double* %19
%160 = load double, double* %17
%161 = fneg double %158
%162 = call double @llvm.fmuladd.f64(double %161, double %159, double %160)
store double %162, double* %17
%163 = load i32, i32* %24
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %164
%166 = load double, double* %165
%167 = load i32, i32* %24
%168 = sext i32 %167 to i64
%169 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %168
%170 = load double, double* %169
%171 = fmul double %166, %170
%172 = load double, double* %19
%173 = load double, double* %18
%174 = fneg double %171
%175 = call double @llvm.fmuladd.f64(double %174, double %172, double %173)
store double %175, double* %18
store i32 0, i32* %25
br label %176
176: ; preds = %213, %149
%177 = load i32, i32* %25
%178 = icmp slt i32 %177, 3
br i1 %178, label %179, label %216
179: ; preds = %176
%180 = load i32, i32* %25
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i64 0, i64 %181
%183 = load i32, i32* %24
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds [3 x double], [3 x double]* %182, i64 0, i64 %184
%186 = load double, double* %185
%187 = load i32, i32* %24
%188 = sext i32 %187 to i64
%189 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 %188
%190 = load double, double* %189
%191 = load i32, i32* %25
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %192
%194 = load double, double* %193
%195 = fmul double %190, %194
%196 = load double, double* %19
%197 = fneg double %195
%198 = call double @llvm.fmuladd.f64(double %197, double %196, double %186)
%199 = load double, double* %19
%200 = fmul double %198, %199
%201 = load i32, i32* %25
%202 = sext i32 %201 to i64
%203 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i64 0, i64 %202
%204 = load i32, i32* %24
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds [3 x double], [3 x double]* %203, i64 0, i64 %205
store double %200, double* %206
%207 = load i32, i32* %24
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %23, i64 0, i64 %208
%210 = load i32, i32* %25
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds [3 x double], [3 x double]* %209, i64 0, i64 %211
store double 0.000000e+00, double* %212
br label %213
213: ; preds = %179
%214 = load i32, i32* %25
%215 = add nsw i32 %214, 1
store i32 %215, i32* %25
br label %176
216: ; preds = %176
br label %217
217: ; preds = %216
%218 = load i32, i32* %24
%219 = add nsw i32 %218, 1
store i32 %219, i32* %24
br label %146
220: ; preds = %146
%221 = load i32, i32* %13
%222 = sext i32 %221 to i64
store i64 %222, i64* %28
%223 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %16, i64 0, i64 0
%224 = getelementptr inbounds [3 x double], [3 x double]* %223, i64 0, i64 0
%225 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %23, i64 0, i64 0
%226 = getelementptr inbounds [3 x double], [3 x double]* %225, i64 0, i64 0
%227 = call i32 @qkfit(double* %224, double* %21, double* %226, i64* %28)
%228 = load i64, i64* %28
%229 = trunc i64 %228 to i32
store i32 %229, i32* %13
%230 = load double, double* %17
%231 = load double, double* %18
%232 = fadd double %230, %231
%233 = load double, double* %19
%234 = load double, double* %21
%235 = fmul double 2.000000e+00, %234
%236 = fneg double %235
%237 = call double @llvm.fmuladd.f64(double %232, double %233, double %236)
store double %237, double* %22
%238 = load double, double* %22
%239 = fcmp olt double %238, 0.000000e+00
br i1 %239, label %240, label %241
240: ; preds = %220
store double 0.000000e+00, double* %22
br label %241
241: ; preds = %240, %220
%242 = load double, double* %22
%243 = call double @sqrt(double %242)
store double %243, double* %22
store i32 0, i32* %24
br label %244
244: ; preds = %272, %241
%245 = load i32, i32* %24
%246 = icmp slt i32 %245, 3
br i1 %246, label %247, label %275
247: ; preds = %244
store i32 0, i32* %25
br label %248
248: ; preds = %268, %247
%249 = load i32, i32* %25
%250 = icmp slt i32 %249, 3
br i1 %250, label %251, label %271
251: ; preds = %248
%252 = load i32, i32* %25
%253 = sext i32 %252 to i64
%254 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %23, i64 0, i64 %253
%255 = load i32, i32* %24
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds [3 x double], [3 x double]* %254, i64 0, i64 %256
%258 = load double, double* %257
%259 = fptrunc double %258 to float
%260 = load float**, float*** %10
%261 = load i32, i32* %24
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds float*, float** %260, i64 %262
%264 = load float*, float** %263
%265 = load i32, i32* %25
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds float, float* %264, i64 %266
store float %259, float* %267
br label %268
268: ; preds = %251
%269 = load i32, i32* %25
%270 = add nsw i32 %269, 1
store i32 %270, i32* %25
br label %248
271: ; preds = %248
br label %272
272: ; preds = %271
%273 = load i32, i32* %24
%274 = add nsw i32 %273, 1
store i32 %274, i32* %24
br label %244
275: ; preds = %244
%276 = load i32, i32* %13
%277 = icmp ne i32 %276, 0
br i1 %277, label %281, label %278
278: ; preds = %275
%279 = load double, double* %22
%280 = fptrunc double %279 to float
store float %280, float* %7
br label %331
281: ; preds = %275
store i32 0, i32* %24
br label %282
282: ; preds = %325, %281
%283 = load i32, i32* %24
%284 = icmp slt i32 %283, 3
br i1 %284, label %285, label %328
285: ; preds = %282
store double 0.000000e+00, double* %20
store i32 0, i32* %25
br label %286
286: ; preds = %306, %285
%287 = load i32, i32* %25
%288 = icmp slt i32 %287, 3
br i1 %288, label %289, label %309
289: ; preds = %286
%290 = load float**, float*** %10
%291 = load i32, i32* %24
%292 = sext i32 %291 to i64
%293 = getelementptr inbounds float*, float** %290, i64 %292
%294 = load float*, float** %293
%295 = load i32, i32* %25
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds float, float* %294, i64 %296
%298 = load float, float* %297
%299 = fpext float %298 to double
%300 = load i32, i32* %25
%301 = sext i32 %300 to i64
%302 = getelementptr inbounds [3 x double], [3 x double]* %15, i64 0, i64 %301
%303 = load double, double* %302
%304 = load double, double* %20
%305 = call double @llvm.fmuladd.f64(double %299, double %303, double %304)
store double %305, double* %20
br label %306
306: ; preds = %289
%307 = load i32, i32* %25
%308 = add nsw i32 %307, 1
store i32 %308, i32* %25
br label %286
309: ; preds = %286
%310 = load i32, i32* %24
%311 = sext i32 %310 to i64
%312 = getelementptr inbounds [3 x double], [3 x double]* %14, i64 0, i64 %311
%313 = load double, double* %312
%314 = load double, double* %20
%315 = fsub double %313, %314
%316 = fptrunc double %315 to float
%317 = fpext float %316 to double
%318 = load double, double* %19
%319 = fmul double %317, %318
%320 = fptrunc double %319 to float
%321 = load float*, float** %11
%322 = load i32, i32* %24
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds float, float* %321, i64 %323
store float %320, float* %324
br label %325
325: ; preds = %309
%326 = load i32, i32* %24
%327 = add nsw i32 %326, 1
store i32 %327, i32* %24
br label %282
328: ; preds = %282
%329 = load double, double* %22
%330 = fptrunc double %329 to float
store float %330, float* %7
br label %331
331: ; preds = %328, %278
%332 = load float, float* %7
ret float %332
}

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