// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../tools/hyperspherical.c
// Function: hyperspherical_Hermite_interpolation_vector
int hyperspherical_Hermite_interpolation_vector(HyperInterpStruct *pHIS,
                                                int nxi,
                                                int lnum,
                                                double *xinterp,
                                                double *Phi,
                                                double *dPhi,
                                                double *d2Phi) {

  /** Hermite interpolation of order 6 for Phi, dPhi, and d2Phi. When xinterp
      is sorted (increasing), computations can be reused. On the other hand,
      for a randomly called value, the routine is not much slower than a
      routine optimised for this case. The more sorted the vector, the faster
      the execution time. For closed case, the interpolation structure only
      covers [safety;pi/2-safety]. The calling routine should respect this.
      if sinK and cosK are not NULL, we will also interpolate them.
  */

  int do_function=_TRUE_, do_first_derivative=_TRUE_;
  int do_second_derivative=_TRUE_, do_first_or_second_derivative=_TRUE_;
  double ym=0, yp=0, dym=0, dyp=0, d2ym=0, d2yp=0, x, z, z2, z3, z4, z5;
  double cotKm=0,cotKp=0,sinKm=0,sinKp=0, sinKm2, sinKp2;
  double d3ym = 0, d3yp=0, d4ym=0, d4yp=0;
  double a1=0, a2=0, a3=0, a4=0, a5=0;
  double b1=0, b2=0, b3=0, b4=0, b5=0;
  double c1=0, c2=0, c3=0, c4=0, c5=0;
  double beta, beta2, *xvec, *sinK, *cotK;
  double xmin, xmax, deltax, deltax2, lxlp1;
  double left_border, right_border, next_border;
  int K, l, j, nx, current_border_idx=0;
  double *Phi_l, *dPhi_l;
  int phisign = 1, dphisign = 1;

  /** Set logical flags. The compiler should probably generate 2^3-1=7
      different functions, according to these flags. If not, maybe I should
      do it.
  */


  if (Phi==NULL)
    do_function = _FALSE_;
  else
    do_function = _TRUE_;
  if (dPhi == NULL)
    do_first_derivative = _FALSE_;
  else
    do_first_derivative = _TRUE_;
  if (d2Phi == NULL)
    do_second_derivative = _FALSE_;
  else
    do_second_derivative = _TRUE_;
  if ((do_first_derivative == _TRUE_)||(do_second_derivative == _TRUE_))
    do_first_or_second_derivative = _TRUE_;
  else
    do_first_or_second_derivative = _FALSE_;

  xvec = pHIS->x;
  sinK = pHIS->sinK;
  cotK = pHIS->cotK;
  beta = pHIS->beta;
  beta2 = beta*beta;
  deltax = pHIS->delta_x;
  deltax2 = deltax*deltax;
  K = pHIS->K;
  nx = pHIS->x_size;
  Phi_l = pHIS->phi+lnum*nx;
  dPhi_l = pHIS->dphi+lnum*nx;
  l = pHIS->l[lnum];
  lxlp1 = l*(l+1.0);
  xmin = xvec[0];
  xmax = xvec[nx-1];

  left_border = xmax;
  right_border = xmin;
  next_border = xmin;

  for (j=0; j<nxi; j++){
    x = xinterp[j];
    //take advantage of periodicity of functions in closed case
    if (pHIS->K==1)
      ClosedModY(pHIS->l[lnum], (int)(pHIS->beta+0.2), &x, &phisign, &dphisign);
    //Loop over output values
    if ((x<xmin)||(x>xmax)){
      //Outside interpolation region, set to zero.
      if (do_function==_TRUE_)
        Phi[j] = 0.0;
      if (do_first_derivative==_TRUE_)
        dPhi[j] = 0.0;
      if (do_second_derivative==_TRUE_)
        d2Phi[j] = 0.0;
      continue;
    }
    if ((x>right_border)||(x<left_border)){
      if ((x>next_border)||(x<left_border)){
        current_border_idx = ((int) ((x-xmin)/deltax))+1;
        current_border_idx = MAX(1,current_border_idx);
        current_border_idx = MIN(nx-1,current_border_idx);
        //printf("Current border index at jump: %d\n",current_border_idx);
        //max operation takes care of case x = xmin,
        //min operation takes care of case x = xmax.
        //Calculate left derivatives:
        cotKm = cotK[current_border_idx-1];
        sinKm = sinK[current_border_idx-1];
        sinKm2 = sinKm*sinKm;
        ym = Phi_l[current_border_idx-1];
        dym = dPhi_l[current_border_idx-1];
        d2ym = -2*dym*cotKm+ym*(lxlp1/sinKm2-beta2+K);
        //printf("%g %g %g %g %g\n",cotKm,sinKm,ym,dym,d2ym);
        if (do_first_or_second_derivative==_TRUE_){
          d3ym = -2*cotKm*d2ym-2*ym*lxlp1*cotKm/sinKm2+
            dym*(K-beta2+(2+lxlp1)/sinKm2);
        }
        if (do_second_derivative==_TRUE_){
          d4ym = -2*cotKm*d3ym + d2ym*(K-beta2+(4+lxlp1)/sinKm2)+
            dym*(-4*(1+lxlp1)*cotKm/sinKm2)+
            ym*(2*lxlp1/sinKm2*(2*cotKm*cotKm+1/sinKm2));
        }
      }
      else{
        //x>current_border but not next border: I have moved to next block.
        current_border_idx++;
        //printf("Current border index at else: %d\n",current_border_idx);
        //Copy former right derivatives to left derivatives.
        ym = yp;
        dym = dyp;
        d2ym = d2yp;
        d3ym = d3yp;
        d4ym = d4yp;
        sinKm = sinKp;
        cotKm = cotKp;
      }
      left_border = xvec[MAX(0,current_border_idx-1)];
      right_border = xvec[current_border_idx];
      next_border = xvec[MIN(nx-1,current_border_idx+1)];
      //Evaluate right derivatives and calculate coefficients:
      cotKp = cotK[current_border_idx];
      sinKp = sinK[current_border_idx];
      sinKp2 = sinKp*sinKp;
      yp = Phi_l[current_border_idx];
      dyp = dPhi_l[current_border_idx];
      d2yp = -2*dyp*cotKp+yp*(lxlp1/sinKp2-beta2+K);
      if (do_first_or_second_derivative == _TRUE_){
        d3yp = -2*cotKp*d2yp-2*yp*lxlp1*cotKp/sinKp2+
          dyp*(K-beta2+(2+lxlp1)/sinKp2);
      }
      if (do_second_derivative == _TRUE_){
        d4yp = -2*cotKp*d3yp + d2yp*(K-beta2+(4+lxlp1)/sinKp2)+
          dyp*(-4*(1+lxlp1)*cotKp/sinKp2)+
          yp*(2*lxlp1/sinKp2*(2*cotKp*cotKp+1/sinKp2));
      }
      if (do_function == _TRUE_){
        a1 = dym*deltax;
        a2 = 0.5*d2ym*deltax2;
        a3 = (-1.5*d2ym+0.5*d2yp)*deltax2-(6*dym+4*dyp)*deltax-10*(ym-yp);
        a4 = (1.5*d2ym-d2yp)*deltax2+(8*dym+7*dyp)*deltax+15*(ym-yp);
        a5 = (-0.5*d2ym+0.5*d2yp)*deltax2-3*(dym+dyp)*deltax-6*(ym-yp);
      }
      if (do_first_derivative==_TRUE_){
        b1 = d2ym*deltax;
        b2 = 0.5*d3ym*deltax2;
        b3 = (-1.5*d3ym+0.5*d3yp)*deltax2-(6*d2ym+4*d2yp)*deltax-10*(dym-dyp);
        b4 = (1.5*d3ym-d3yp)*deltax2+(8*d2ym+7*d2yp)*deltax+15*(dym-dyp);
        b5 = (-0.5*d3ym+0.5*d3yp)*deltax2-3*(d2ym+d2yp)*deltax-6*(dym-dyp);
      }
      if (do_second_derivative==_TRUE_){
        c1 = d3ym*deltax;
        c2 = 0.5*d4ym*deltax2;
        c3 = (-1.5*d4ym+0.5*d4yp)*deltax2-(6*d3ym+4*d3yp)*deltax-10*(d2ym-d2yp);
        c4 = (1.5*d4ym-d4yp)*deltax2+(8*d3ym+7*d3yp)*deltax+15*(d2ym-d2yp);
        c5 = (-0.5*d4ym+0.5*d4yp)*deltax2-3*(d3ym+d3yp)*deltax-6*(d2ym-d2yp);
      }
    }
    //Evaluate polynomial:
    z = (x-left_border)/deltax;
    z2 = z*z;
    z3 = z2*z;
    z4 = z2*z2;
    z5 = z2*z3;
    if (do_function == _TRUE_)
      Phi[j] = (ym+a1*z+a2*z2+a3*z3+a4*z4+a5*z5)*phisign;
    if (do_first_derivative == _TRUE_)
      dPhi[j] = (dym+b1*z+b2*z2+b3*z3+b4*z4+b5*z5)*dphisign;
    if (do_second_derivative == _TRUE_)
      d2Phi[j] = (d2ym+c1*z+c2*z2+c3*z3+c4*z4+c5*z5)*phisign;
    //printf("x = %g, [%g, %g, %g]\n",x,Phi[j],dPhi[j],d2Phi[j]);
  }
  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, 0xe0(%rsp)
movq 0x290(%rsp), %r11
movl $0x1, %eax
movl %eax, 0x10(%rsp)
movl %eax, 0x14(%rsp)
movq %r9, %rax
orq %r11, %rax
setne 0xf(%rsp)
testl %esi, %esi
jle 0x241ad
movq %r8, %r14
movq %rcx, %r12
movq 0xe0(%rsp), %rdi
movq 0x38(%rdi), %rbx
movq 0x40(%rdi), %rax
movq %rax, 0xd0(%rsp)
movq 0x48(%rdi), %rax
movq %rax, 0xc8(%rsp)
movsd 0x8(%rdi), %xmm1
movsd 0x10(%rdi), %xmm6
mulsd %xmm1, %xmm1
movapd %xmm6, %xmm2
movslq 0x30(%rdi), %r10
movslq %edx, %rax
movq %r10, %rcx
imulq %rax, %rcx
shlq $0x3, %rcx
movq 0x50(%rdi), %rdx
addq %rcx, %rdx
movq %rdx, 0xa8(%rsp)
addq 0x58(%rdi), %rcx
movq %rcx, 0xb0(%rsp)
movq 0x20(%rdi), %rcx
movl (%rcx,%rax,4), %eax
movl %eax, 0x48(%rsp)
cvtsi2sd %eax, %xmm0
mulsd %xmm6, %xmm2
movsd 0xcdd18(%rip), %xmm3    # 0xf1260
addsd %xmm0, %xmm3
mulsd %xmm0, %xmm3
movsd (%rbx), %xmm5
movq %rbx, 0x158(%rsp)
movsd -0x8(%rbx,%r10,8), %xmm0
decq %r10
movq %r10, 0xb8(%rsp)
movl (%rdi), %edi
cvtsi2sd %edi, %xmm4
movsd %xmm4, 0xa0(%rsp)
movsd %xmm1, 0xc0(%rsp)
subsd %xmm1, %xmm4
movsd %xmm4, 0x18(%rsp)
movsd 0xce768(%rip), %xmm1    # 0xf1d00
addsd %xmm3, %xmm1
movsd %xmm1, 0x80(%rsp)
movsd 0xd0e7b(%rip), %xmm1    # 0xf4428
addsd %xmm3, %xmm1
movsd %xmm1, 0x98(%rsp)
movsd 0xcdc9e(%rip), %xmm1    # 0xf1260
addsd %xmm3, %xmm1
mulsd 0xd0e8a(%rip), %xmm1    # 0xf4458
movsd %xmm1, 0x90(%rsp)
movsd %xmm3, 0x20(%rsp)
addsd %xmm3, %xmm3
movsd %xmm3, 0x88(%rsp)
movl %esi, %r15d
movapd %xmm2, 0x140(%rsp)
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
movapd %xmm2, 0x130(%rsp)
movapd %xmm6, 0x70(%rsp)
movapd %xmm6, %xmm1
unpcklpd %xmm6, %xmm1            # xmm1 = xmm1[0],xmm6[0]
movapd %xmm1, 0x120(%rsp)
xorpd %xmm1, %xmm1
movapd %xmm1, 0x230(%rsp)
xorpd %xmm1, %xmm1
movsd %xmm1, 0x38(%rsp)
movl $0x0, %r13d
movl $0x0, %ebp
movsd %xmm5, 0xd8(%rsp)
movsd %xmm5, 0xf0(%rsp)
movsd %xmm5, 0xe8(%rsp)
movsd %xmm0, 0x160(%rsp)
movapd %xmm0, %xmm10
xorpd %xmm15, %xmm15
xorpd %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
xorpd %xmm13, %xmm13
movsd %xmm0, 0x30(%rsp)
xorpd %xmm11, %xmm11
movapd %xmm0, 0x50(%rsp)
movapd %xmm0, 0x220(%rsp)
movapd %xmm0, 0x1b0(%rsp)
movapd %xmm0, 0x1d0(%rsp)
movapd %xmm0, 0x210(%rsp)
movapd %xmm0, 0x190(%rsp)
movapd %xmm0, 0x1c0(%rsp)
movapd %xmm0, 0x200(%rsp)
movapd %xmm0, 0x180(%rsp)
movapd %xmm0, 0x1a0(%rsp)
movapd %xmm0, 0x110(%rsp)
movapd %xmm0, 0x100(%rsp)
movapd %xmm0, 0x60(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1f0(%rsp)
movapd %xmm0, 0x1e0(%rsp)
movl %edi, 0x44(%rsp)
movsd (%r12,%r13,8), %xmm0
movsd %xmm0, 0xf8(%rsp)
cmpl $0x1, %edi
jne 0x237c7
movq 0xe0(%rsp), %rax
movsd 0x8(%rax), %xmm0
addsd 0xcdb5e(%rip), %xmm0    # 0xf1298
cvttsd2si %xmm0, %esi
movl 0x48(%rsp), %edi
leaq 0xf8(%rsp), %rdx
leaq 0x10(%rsp), %rcx
leaq 0x14(%rsp), %r8
movl %ebp, 0x4c(%rsp)
movq %r9, %rbp
movq %r14, %rbx
movq %r11, %r14
movsd %xmm15, 0x178(%rsp)
movsd %xmm13, 0x170(%rsp)
movapd %xmm11, 0x240(%rsp)
movsd %xmm10, 0x168(%rsp)
callq 0x241c1
movsd 0x168(%rsp), %xmm10
movapd 0x240(%rsp), %xmm11
movsd 0x170(%rsp), %xmm13
movsd 0x178(%rsp), %xmm15
movq %r14, %r11
movq %rbx, %r14
movq %rbp, %r9
movl 0x4c(%rsp), %ebp
movl 0x44(%rsp), %edi
movsd 0xf8(%rsp), %xmm0
movsd 0xf0(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x23810
ucomisd 0x160(%rsp), %xmm0
ja 0x23810
ucomisd 0xe8(%rsp), %xmm0
ja 0x2383c
ucomisd %xmm0, %xmm10
ja 0x2383c
movapd %xmm11, %xmm3
movapd %xmm13, %xmm2
movapd %xmm15, %xmm1
jmp 0x23fe4
testq %r14, %r14
je 0x2381d
movq $0x0, (%r14,%r13,8)
testq %r9, %r9
je 0x2382a
movq $0x0, (%r9,%r13,8)
xorpd %xmm0, %xmm0
testq %r11, %r11
jne 0x2418a
jmp 0x241a1
ucomisd 0xd8(%rsp), %xmm0
ja 0x23871
ucomisd %xmm0, %xmm10
ja 0x23871
incl %ebp
movaps 0x110(%rsp), %xmm1
movaps %xmm1, 0x100(%rsp)
movapd 0x60(%rsp), %xmm1
movapd %xmm1, 0x50(%rsp)
jmp 0x23a04
movapd %xmm0, %xmm1
subsd 0xf0(%rsp), %xmm1
divsd 0x70(%rsp), %xmm1
cvttsd2si %xmm1, %ebp
testl %ebp, %ebp
movl $0x0, %eax
cmovlel %eax, %ebp
incl %ebp
movq 0xb8(%rsp), %rax
cmpl %ebp, %eax
cmovll %eax, %ebp
movslq %ebp, %rax
movq 0xc8(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm1
movq 0xd0(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm2
mulsd %xmm2, %xmm2
movq 0xa8(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm15
movq 0xb0(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm13
movapd %xmm13, %xmm11
mulsd 0xcee68(%rip), %xmm11   # 0xf2758
movsd 0x20(%rsp), %xmm3
divsd %xmm2, %xmm3
subsd 0xc0(%rsp), %xmm3
addsd 0xa0(%rsp), %xmm3
mulsd %xmm15, %xmm3
mulsd %xmm1, %xmm11
addsd %xmm3, %xmm11
cmpb $0x0, 0xf(%rsp)
je 0x23974
movapd %xmm1, %xmm3
movsd 0xcee2a(%rip), %xmm5    # 0xf2758
mulsd %xmm5, %xmm3
movapd %xmm15, %xmm4
mulsd %xmm5, %xmm4
mulsd 0x20(%rsp), %xmm4
mulsd %xmm1, %xmm4
divsd %xmm2, %xmm4
mulsd %xmm11, %xmm3
addsd %xmm4, %xmm3
movsd 0x80(%rsp), %xmm4
divsd %xmm2, %xmm4
addsd 0x18(%rsp), %xmm4
mulsd %xmm13, %xmm4
addsd %xmm3, %xmm4
movapd %xmm4, 0x50(%rsp)
testq %r11, %r11
je 0x23a04
movapd %xmm1, %xmm3
mulsd 0xcedcf(%rip), %xmm3    # 0xf2758
movsd 0x98(%rsp), %xmm4
divsd %xmm2, %xmm4
addsd 0x18(%rsp), %xmm4
mulsd %xmm11, %xmm4
mulsd 0x50(%rsp), %xmm3
addsd %xmm4, %xmm3
movsd 0x90(%rsp), %xmm4
mulsd %xmm1, %xmm4
divsd %xmm2, %xmm4
mulsd %xmm13, %xmm4
addsd %xmm3, %xmm4
movsd 0x88(%rsp), %xmm3
divsd %xmm2, %xmm3
movapd %xmm1, %xmm6
addsd %xmm1, %xmm6
movsd 0xcd87e(%rip), %xmm5    # 0xf1260
divsd %xmm2, %xmm5
mulsd %xmm1, %xmm6
addsd %xmm5, %xmm6
mulsd %xmm3, %xmm6
mulsd %xmm15, %xmm6
addsd %xmm4, %xmm6
movapd %xmm6, 0x100(%rsp)
cmpl $0x2, %ebp
movl $0x1, %eax
cmovgel %ebp, %eax
movslq %ebp, %rcx
leal 0x1(%rcx), %edx
movq 0xb8(%rsp), %rsi
cmpl %edx, %esi
cmovll %esi, %edx
movq 0xc8(%rsp), %rsi
movsd (%rsi,%rcx,8), %xmm4
movq 0xd0(%rsp), %rsi
movsd (%rsi,%rcx,8), %xmm5
mulsd %xmm5, %xmm5
movq 0xa8(%rsp), %rsi
movsd (%rsi,%rcx,8), %xmm1
movq 0xb0(%rsp), %rsi
movsd (%rsi,%rcx,8), %xmm2
movapd %xmm2, %xmm3
mulsd 0xcecf2(%rip), %xmm3    # 0xf2758
movsd 0x20(%rsp), %xmm6
divsd %xmm5, %xmm6
subsd 0xc0(%rsp), %xmm6
addsd 0xa0(%rsp), %xmm6
mulsd %xmm1, %xmm6
mulsd %xmm4, %xmm3
addsd %xmm6, %xmm3
cmpb $0x0, 0xf(%rsp)
je 0x23ae7
movapd %xmm4, %xmm6
movsd 0xcecb6(%rip), %xmm8    # 0xf2758
mulsd %xmm8, %xmm6
movapd %xmm1, %xmm7
mulsd %xmm8, %xmm7
mulsd 0x20(%rsp), %xmm7
mulsd %xmm4, %xmm7
divsd %xmm5, %xmm7
mulsd %xmm3, %xmm6
addsd %xmm7, %xmm6
movsd 0x80(%rsp), %xmm7
divsd %xmm5, %xmm7
addsd 0x18(%rsp), %xmm7
mulsd %xmm2, %xmm7
addsd %xmm6, %xmm7
movapd %xmm7, 0x60(%rsp)
testq %r11, %r11
je 0x23b7e
movapd %xmm4, %xmm6
mulsd 0xcec5c(%rip), %xmm6    # 0xf2758
movsd 0x98(%rsp), %xmm7
divsd %xmm5, %xmm7
addsd 0x18(%rsp), %xmm7
mulsd %xmm3, %xmm7
mulsd 0x60(%rsp), %xmm6
addsd %xmm7, %xmm6
movsd 0x90(%rsp), %xmm7
mulsd %xmm4, %xmm7
divsd %xmm5, %xmm7
mulsd %xmm2, %xmm7
addsd %xmm6, %xmm7
movsd 0x88(%rsp), %xmm6
divsd %xmm5, %xmm6
movapd %xmm4, %xmm9
addsd %xmm4, %xmm9
movsd 0xcd70a(%rip), %xmm8    # 0xf1260
divsd %xmm5, %xmm8
mulsd %xmm4, %xmm9
addsd %xmm8, %xmm9
mulsd %xmm6, %xmm9
mulsd %xmm1, %xmm9
addsd %xmm7, %xmm9
movapd %xmm9, 0x110(%rsp)
testq %r14, %r14
je 0x23cc7
movapd %xmm3, %xmm5
movsd 0xce13c(%rip), %xmm9    # 0xf1cd0
mulsd %xmm9, %xmm5
movapd %xmm2, %xmm6
mulsd 0xd0883(%rip), %xmm6    # 0xf4428
movapd %xmm13, %xmm4
mulsd 0xceabe(%rip), %xmm4    # 0xf2670
addsd %xmm6, %xmm4
movapd 0xcd671(%rip), %xmm12   # 0xf1230
xorpd %xmm12, %xmm4
movapd %xmm2, %xmm6
mulsd 0xceb90(%rip), %xmm6    # 0xf2760
movapd %xmm13, %xmm7
mulsd 0xd0883(%rip), %xmm7    # 0xf4460
addsd %xmm6, %xmm7
movapd %xmm3, %xmm8
xorpd %xmm12, %xmm8
unpcklpd %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0]
movapd %xmm11, %xmm6
mulsd 0xd086c(%rip), %xmm6    # 0xf4468
addsd %xmm5, %xmm6
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
movapd %xmm11, %xmm7
unpcklpd %xmm11, %xmm7           # xmm7 = xmm7[0],xmm11[0]
mulpd 0xd0c39(%rip), %xmm7    # 0xf4850
addpd %xmm5, %xmm7
movapd %xmm15, %xmm8
subsd %xmm1, %xmm8
mulpd 0x120(%rsp), %xmm4
mulpd 0x130(%rsp), %xmm7
addpd %xmm4, %xmm7
movapd %xmm8, %xmm4
unpcklpd %xmm8, %xmm4            # xmm4 = xmm4[0],xmm8[0]
mulpd 0xd0c13(%rip), %xmm4    # 0xf4860
addpd %xmm7, %xmm4
movapd %xmm4, 0x1e0(%rsp)
movapd %xmm13, %xmm4
addsd %xmm2, %xmm4
mulsd 0xd0805(%rip), %xmm4    # 0xf4470
movapd 0x70(%rsp), %xmm7
mulsd %xmm7, %xmm4
movapd 0x140(%rsp), %xmm5
mulsd %xmm5, %xmm6
addsd %xmm4, %xmm6
movapd %xmm7, %xmm4
mulsd %xmm13, %xmm4
movapd %xmm4, 0x1a0(%rsp)
mulsd 0xce9c7(%rip), %xmm8    # 0xf2668
addsd %xmm6, %xmm8
movapd %xmm8, 0x200(%rsp)
movapd %xmm11, %xmm4
mulsd %xmm9, %xmm4
mulsd %xmm5, %xmm4
movapd %xmm4, 0x180(%rsp)
testq %r9, %r9
je 0x23e17
movapd 0x60(%rsp), %xmm8
movapd %xmm8, %xmm5
movsd 0xcdfeb(%rip), %xmm9    # 0xf1cd0
mulsd %xmm9, %xmm5
movapd %xmm3, %xmm6
mulsd 0xd0732(%rip), %xmm6    # 0xf4428
movapd %xmm11, %xmm4
mulsd 0xce96d(%rip), %xmm4    # 0xf2670
addsd %xmm6, %xmm4
movapd 0xcd520(%rip), %xmm12   # 0xf1230
xorpd %xmm12, %xmm4
movapd %xmm3, %xmm6
mulsd 0xcea3f(%rip), %xmm6    # 0xf2760
movapd %xmm11, %xmm7
mulsd 0xd0732(%rip), %xmm7    # 0xf4460
addsd %xmm6, %xmm7
xorpd %xmm12, %xmm8
unpcklpd %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0]
movapd 0x50(%rsp), %xmm12
movapd %xmm12, %xmm6
mulsd 0xd0719(%rip), %xmm6    # 0xf4468
addsd %xmm5, %xmm6
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
movapd %xmm12, %xmm7
unpcklpd %xmm12, %xmm7           # xmm7 = xmm7[0],xmm12[0]
mulpd 0xd0ae6(%rip), %xmm7    # 0xf4850
addpd %xmm5, %xmm7
movapd %xmm13, %xmm8
subsd %xmm2, %xmm8
mulpd 0x120(%rsp), %xmm4
mulpd 0x130(%rsp), %xmm7
addpd %xmm4, %xmm7
movapd %xmm8, %xmm4
unpcklpd %xmm8, %xmm4            # xmm4 = xmm4[0],xmm8[0]
mulpd 0xd0ac0(%rip), %xmm4    # 0xf4860
addpd %xmm7, %xmm4
movapd %xmm4, 0x230(%rsp)
movapd %xmm11, %xmm4
addsd %xmm3, %xmm4
mulsd 0xd06b2(%rip), %xmm4    # 0xf4470
movapd 0x70(%rsp), %xmm7
mulsd %xmm7, %xmm4
movapd 0x140(%rsp), %xmm5
mulsd %xmm5, %xmm6
addsd %xmm4, %xmm6
movapd %xmm7, %xmm4
mulsd %xmm11, %xmm4
movapd %xmm4, 0x1c0(%rsp)
mulsd 0xce874(%rip), %xmm8    # 0xf2668
addsd %xmm6, %xmm8
movapd %xmm8, 0x210(%rsp)
mulsd %xmm9, %xmm12
mulsd %xmm5, %xmm12
movapd %xmm12, 0x190(%rsp)
movq 0x158(%rsp), %rsi
movsd -0x8(%rsi,%rax,8), %xmm10
movsd (%rsi,%rcx,8), %xmm4
movsd %xmm4, 0xe8(%rsp)
movslq %edx, %rax
movsd (%rsi,%rax,8), %xmm4
movsd %xmm4, 0xd8(%rsp)
testq %r11, %r11
je 0x23fcf
movapd 0x110(%rsp), %xmm8
movapd %xmm8, %xmm5
movsd 0xcde6a(%rip), %xmm9    # 0xf1cd0
mulsd %xmm9, %xmm5
movapd 0x60(%rsp), %xmm14
movapd %xmm14, %xmm6
mulsd 0xd05a9(%rip), %xmm6    # 0xf4428
movapd %xmm10, %xmm9
movapd %xmm13, %xmm10
movapd 0x50(%rsp), %xmm13
movapd %xmm13, %xmm4
mulsd 0xce7d3(%rip), %xmm4    # 0xf2670
addsd %xmm6, %xmm4
movapd 0xcd386(%rip), %xmm12   # 0xf1230
xorpd %xmm12, %xmm4
movapd %xmm14, %xmm6
mulsd 0xce8a4(%rip), %xmm6    # 0xf2760
movapd %xmm13, %xmm7
mulsd 0xd0597(%rip), %xmm7    # 0xf4460
addsd %xmm6, %xmm7
xorpd %xmm12, %xmm8
unpcklpd %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0]
movapd 0x100(%rsp), %xmm12
movapd %xmm12, %xmm6
mulsd 0xd057b(%rip), %xmm6    # 0xf4468
addsd %xmm5, %xmm6
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
movapd %xmm12, %xmm7
unpcklpd %xmm12, %xmm7           # xmm7 = xmm7[0],xmm12[0]
mulpd 0xd0948(%rip), %xmm7    # 0xf4850
addpd %xmm5, %xmm7
movapd %xmm11, %xmm8
subsd %xmm3, %xmm8
mulpd 0x120(%rsp), %xmm4
mulpd 0x130(%rsp), %xmm7
addpd %xmm4, %xmm7
movapd %xmm8, %xmm4
unpcklpd %xmm8, %xmm4            # xmm4 = xmm4[0],xmm8[0]
mulpd 0xd0922(%rip), %xmm4    # 0xf4860
addpd %xmm7, %xmm4
movapd %xmm4, 0x1f0(%rsp)
movapd %xmm13, %xmm4
addsd %xmm14, %xmm4
mulsd 0xd0513(%rip), %xmm4    # 0xf4470
movapd 0x70(%rsp), %xmm7
mulsd %xmm7, %xmm4
movapd 0x140(%rsp), %xmm5
mulsd %xmm5, %xmm6
addsd %xmm4, %xmm6
movapd %xmm7, %xmm4
mulsd %xmm13, %xmm4
movapd %xmm4, 0x1d0(%rsp)
mulsd 0xce6d5(%rip), %xmm8    # 0xf2668
addsd %xmm6, %xmm8
movapd %xmm8, 0x220(%rsp)
mulsd 0xcdd25(%rip), %xmm12   # 0xf1cd0
mulsd %xmm5, %xmm12
movapd %xmm12, 0x1b0(%rsp)
movsd %xmm11, 0x30(%rsp)
movsd %xmm10, 0x28(%rsp)
movapd %xmm9, %xmm10
jmp 0x23fdd
movsd %xmm11, 0x30(%rsp)
movsd %xmm13, 0x28(%rsp)
movsd %xmm15, 0x38(%rsp)
subsd %xmm10, %xmm0
divsd 0x70(%rsp), %xmm0
movapd %xmm0, %xmm6
mulsd %xmm0, %xmm6
movapd %xmm0, %xmm5
mulsd %xmm6, %xmm5
movapd %xmm6, %xmm7
mulsd %xmm6, %xmm7
movapd %xmm6, %xmm4
mulsd %xmm5, %xmm4
testq %r14, %r14
je 0x24099
movapd 0x1a0(%rsp), %xmm8
mulsd %xmm0, %xmm8
addsd 0x38(%rsp), %xmm8
movapd 0x180(%rsp), %xmm9
mulsd %xmm6, %xmm9
addsd %xmm8, %xmm9
movapd 0x1e0(%rsp), %xmm12
movapd %xmm12, %xmm8
mulsd %xmm5, %xmm8
addsd %xmm9, %xmm8
movapd %xmm12, %xmm9
unpckhpd %xmm12, %xmm9           # xmm9 = xmm9[1],xmm12[1]
mulsd %xmm7, %xmm9
addsd %xmm8, %xmm9
movapd 0x200(%rsp), %xmm8
mulsd %xmm4, %xmm8
addsd %xmm9, %xmm8
xorps %xmm9, %xmm9
cvtsi2sdl 0x10(%rsp), %xmm9
mulsd %xmm8, %xmm9
movsd %xmm9, (%r14,%r13,8)
testq %r9, %r9
je 0x24123
movapd 0x1c0(%rsp), %xmm8
mulsd %xmm0, %xmm8
addsd 0x28(%rsp), %xmm8
movapd 0x190(%rsp), %xmm9
mulsd %xmm6, %xmm9
addsd %xmm8, %xmm9
movapd 0x230(%rsp), %xmm12
movapd %xmm12, %xmm8
mulsd %xmm5, %xmm8
addsd %xmm9, %xmm8
movapd %xmm12, %xmm9
unpckhpd %xmm12, %xmm9           # xmm9 = xmm9[1],xmm12[1]
mulsd %xmm7, %xmm9
addsd %xmm8, %xmm9
movapd 0x210(%rsp), %xmm8
mulsd %xmm4, %xmm8
addsd %xmm9, %xmm8
xorps %xmm9, %xmm9
cvtsi2sdl 0x14(%rsp), %xmm9
mulsd %xmm8, %xmm9
movsd %xmm9, (%r9,%r13,8)
testq %r11, %r11
je 0x24192
mulsd 0x1d0(%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
mulsd 0x1b0(%rsp), %xmm6
addsd %xmm0, %xmm6
movapd 0x1f0(%rsp), %xmm0
mulsd %xmm0, %xmm5
addsd %xmm6, %xmm5
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
mulsd %xmm7, %xmm0
addsd %xmm5, %xmm0
mulsd 0x220(%rsp), %xmm4
addsd %xmm0, %xmm4
xorps %xmm0, %xmm0
cvtsi2sdl 0x10(%rsp), %xmm0
mulsd %xmm4, %xmm0
movapd %xmm3, %xmm11
movapd %xmm2, %xmm13
movapd %xmm1, %xmm15
movsd %xmm0, (%r11,%r13,8)
jmp 0x241a1
movapd %xmm3, %xmm11
movapd %xmm2, %xmm13
movapd %xmm1, %xmm15
incq %r13
cmpq %r13, %r15
jne 0x2370d
xorl %eax, %eax
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq