// File: /workspace/github_c_makefile_star2_O2/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 $0x278, %rsp            # imm = 0x278
movq %r9, %r13
movq %r8, %rbx
movq %rcx, %r12
movq %rdi, %r10
movq 0x2b0(%rsp), %rdi
pushq $0x1
popq %rax
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0xc(%rsp), %rcx
movl %eax, (%rcx)
movq %r9, %rax
orq %rdi, %rax
setne 0x7(%rsp)
movq 0x38(%r10), %rcx
movsd 0x8(%r10), %xmm1
movsd 0x10(%r10), %xmm7
mulsd %xmm1, %xmm1
movapd %xmm7, %xmm2
mulsd %xmm7, %xmm2
movslq 0x30(%r10), %r11
movslq %edx, %rdx
movq %r11, %r14
imulq %rdx, %r14
shlq $0x3, %r14
movq 0x20(%r10), %rax
movq %rdx, 0x160(%rsp)
cvtsi2sdl (%rax,%rdx,4), %xmm0
movq 0x50(%r10), %rax
addq %r14, %rax
movq %rax, 0x90(%rsp)
addq 0x58(%r10), %r14
movq %r14, 0x98(%rsp)
movsd 0xc426a(%rip), %xmm3    # 0xe5260
movapd %xmm0, %xmm5
addsd %xmm3, %xmm5
mulsd %xmm0, %xmm5
movsd (%rcx), %xmm6
movq %rcx, 0x158(%rsp)
movsd -0x8(%rcx,%r11,8), %xmm0
cvtsi2sdl (%r10), %xmm4
decq %r11
movq %r11, 0xa0(%rsp)
movsd %xmm4, 0x88(%rsp)
movsd %xmm1, 0xa8(%rsp)
subsd %xmm1, %xmm4
movsd %xmm4, 0x10(%rsp)
movsd 0xc4c97(%rip), %xmm1    # 0xe5ce0
addsd %xmm5, %xmm1
movsd %xmm1, 0x70(%rsp)
movsd 0xc739d(%rip), %xmm1    # 0xe83f8
addsd %xmm5, %xmm1
movsd %xmm1, 0x68(%rsp)
movapd %xmm5, %xmm1
addsd %xmm3, %xmm1
mulsd 0xc73b3(%rip), %xmm1    # 0xe8428
movsd %xmm1, 0x60(%rsp)
movsd %xmm5, 0x18(%rsp)
movapd %xmm5, %xmm1
xorl %eax, %eax
testl %esi, %esi
cmovlel %eax, %esi
addsd %xmm5, %xmm1
movsd %xmm1, 0x58(%rsp)
movapd %xmm2, 0x110(%rsp)
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
movapd %xmm2, 0x100(%rsp)
movapd %xmm7, 0x30(%rsp)
movapd %xmm7, %xmm1
unpcklpd %xmm7, %xmm1            # xmm1 = xmm1[0],xmm7[0]
movapd %xmm1, 0xf0(%rsp)
xorpd %xmm1, %xmm1
movapd %xmm1, 0x230(%rsp)
movq 0x40(%r10), %rax
movq %rax, 0x80(%rsp)
movq 0x48(%r10), %rax
movq %rax, 0x78(%rsp)
movl $0x0, %r14d
xorl %r15d, %r15d
xorpd %xmm15, %xmm15
xorpd %xmm1, %xmm1
movapd %xmm1, 0xd0(%rsp)
movapd %xmm1, 0xe0(%rsp)
movapd %xmm1, 0x1f0(%rsp)
movapd %xmm1, 0x1b0(%rsp)
movapd %xmm1, 0x220(%rsp)
movapd %xmm1, 0x1e0(%rsp)
movapd %xmm1, 0x190(%rsp)
movapd %xmm1, 0x210(%rsp)
movapd %xmm1, 0x1d0(%rsp)
movapd %xmm1, 0x180(%rsp)
movapd %xmm1, 0x200(%rsp)
xorpd %xmm7, %xmm7
xorpd %xmm10, %xmm10
movapd %xmm1, 0x140(%rsp)
xorpd %xmm12, %xmm12
movapd %xmm1, 0x130(%rsp)
xorpd %xmm11, %xmm11
movsd %xmm0, 0x168(%rsp)
movapd %xmm0, %xmm14
movsd %xmm6, 0xb8(%rsp)
movsd %xmm6, 0xc0(%rsp)
movsd %xmm6, 0xb0(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x120(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1c0(%rsp)
movapd %xmm0, 0x1a0(%rsp)
cmpq %r14, %rsi
je 0x21caf
movsd (%r12,%r14,8), %xmm0
movsd %xmm0, 0xc8(%rsp)
cmpl $0x1, (%r10)
jne 0x212bc
movq 0x20(%r10), %rax
movq 0x160(%rsp), %rcx
movl (%rax,%rcx,4), %edi
movsd 0x8(%r10), %xmm0
addsd 0xc408e(%rip), %xmm0    # 0xe5298
movq %r14, 0x178(%rsp)
movq %rsi, %r14
cvttsd2si %xmm0, %esi
leaq 0xc8(%rsp), %rdx
leaq 0x8(%rsp), %rcx
leaq 0xc(%rsp), %r8
movq %r10, %rbp
movapd %xmm15, 0x260(%rsp)
movapd %xmm7, 0x20(%rsp)
movapd %xmm11, 0x250(%rsp)
movapd %xmm12, 0x40(%rsp)
movapd %xmm10, 0x240(%rsp)
movsd %xmm14, 0x170(%rsp)
callq 0x21cc3
movsd 0x170(%rsp), %xmm14
movapd 0x240(%rsp), %xmm10
movapd 0x40(%rsp), %xmm12
movapd 0x250(%rsp), %xmm11
movapd 0x20(%rsp), %xmm7
movapd 0x260(%rsp), %xmm15
movq 0x2b0(%rsp), %rdi
movq %rbp, %r10
movq %r14, %rsi
movq 0x178(%rsp), %r14
movsd 0xc8(%rsp), %xmm0
movsd 0xc0(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x21302
ucomisd 0x168(%rsp), %xmm0
ja 0x21302
ucomisd 0xb8(%rsp), %xmm0
ja 0x21329
ucomisd %xmm0, %xmm14
ja 0x21329
movapd %xmm7, 0x20(%rsp)
movapd %xmm10, %xmm3
movapd %xmm12, %xmm2
movapd %xmm11, %xmm1
jmp 0x21adf
testq %rbx, %rbx
je 0x2130c
andq $0x0, (%rbx,%r14,8)
testq %r13, %r13
je 0x21317
andq $0x0, (%r13,%r14,8)
xorpd %xmm0, %xmm0
testq %rdi, %rdi
jne 0x21c8a
jmp 0x21ca7
ucomisd 0xb0(%rsp), %xmm0
ja 0x2135a
ucomisd %xmm0, %xmm14
ja 0x2135a
incl %r15d
movapd 0xe0(%rsp), %xmm1
movapd %xmm1, 0xd0(%rsp)
movapd %xmm15, %xmm7
jmp 0x214d4
movapd %xmm0, %xmm1
subsd 0xc0(%rsp), %xmm1
divsd 0x30(%rsp), %xmm1
cvttsd2si %xmm1, %r15d
testl %r15d, %r15d
movl $0x0, %eax
cmovlel %eax, %r15d
incl %r15d
movq 0xa0(%rsp), %rax
cmpl %r15d, %eax
cmovll %eax, %r15d
movslq %r15d, %rax
movq 0x78(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm1
movq 0x80(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm2
mulsd %xmm2, %xmm2
movq 0x90(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm11
movq 0x98(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm12
movapd %xmm12, %xmm10
mulsd 0xc535c(%rip), %xmm10   # 0xe6738
movsd 0x18(%rsp), %xmm3
divsd %xmm2, %xmm3
subsd 0xa8(%rsp), %xmm3
addsd 0x88(%rsp), %xmm3
mulsd %xmm11, %xmm3
mulsd %xmm1, %xmm10
addsd %xmm3, %xmm10
cmpb $0x0, 0x7(%rsp)
je 0x214d4
movapd %xmm1, %xmm3
movsd 0xc531a(%rip), %xmm5    # 0xe6738
mulsd %xmm5, %xmm3
movapd %xmm11, %xmm4
mulsd %xmm5, %xmm4
mulsd 0x18(%rsp), %xmm4
mulsd %xmm1, %xmm4
divsd %xmm2, %xmm4
movapd %xmm3, %xmm5
mulsd %xmm10, %xmm5
addsd %xmm4, %xmm5
movsd 0x70(%rsp), %xmm7
divsd %xmm2, %xmm7
addsd 0x10(%rsp), %xmm7
mulsd %xmm12, %xmm7
addsd %xmm5, %xmm7
testq %rdi, %rdi
je 0x214d4
movsd 0x68(%rsp), %xmm4
divsd %xmm2, %xmm4
addsd 0x10(%rsp), %xmm4
mulsd %xmm10, %xmm4
mulsd %xmm7, %xmm3
addsd %xmm4, %xmm3
movsd 0x60(%rsp), %xmm4
mulsd %xmm1, %xmm4
divsd %xmm2, %xmm4
mulsd %xmm12, %xmm4
addsd %xmm3, %xmm4
movsd 0x58(%rsp), %xmm3
divsd %xmm2, %xmm3
movapd %xmm1, %xmm6
addsd %xmm1, %xmm6
movsd 0xc3dae(%rip), %xmm5    # 0xe5260
divsd %xmm2, %xmm5
mulsd %xmm1, %xmm6
addsd %xmm5, %xmm6
mulsd %xmm3, %xmm6
mulsd %xmm11, %xmm6
addsd %xmm4, %xmm6
movapd %xmm6, 0xd0(%rsp)
movapd %xmm7, 0x20(%rsp)
cmpl $0x2, %r15d
pushq $0x1
popq %rax
cmovgel %r15d, %eax
movslq %r15d, %rcx
leal 0x1(%rcx), %edx
movq 0xa0(%rsp), %r11
cmpl %edx, %r11d
cmovll %r11d, %edx
movq 0x78(%rsp), %r11
movsd (%r11,%rcx,8), %xmm4
movq 0x80(%rsp), %r11
movsd (%r11,%rcx,8), %xmm5
mulsd %xmm5, %xmm5
movq 0x90(%rsp), %r11
movsd (%r11,%rcx,8), %xmm1
movq 0x98(%rsp), %r11
movsd (%r11,%rcx,8), %xmm2
movapd %xmm2, %xmm3
mulsd 0xc51f9(%rip), %xmm3    # 0xe6738
movsd 0x18(%rsp), %xmm6
divsd %xmm5, %xmm6
subsd 0xa8(%rsp), %xmm6
addsd 0x88(%rsp), %xmm6
mulsd %xmm1, %xmm6
mulsd %xmm4, %xmm3
addsd %xmm6, %xmm3
cmpb $0x0, 0x7(%rsp)
je 0x21644
movapd %xmm4, %xmm6
movsd 0xc51b9(%rip), %xmm8    # 0xe6738
mulsd %xmm8, %xmm6
movapd %xmm1, %xmm7
mulsd %xmm8, %xmm7
mulsd 0x18(%rsp), %xmm7
mulsd %xmm4, %xmm7
divsd %xmm5, %xmm7
movapd %xmm6, %xmm8
mulsd %xmm3, %xmm8
addsd %xmm7, %xmm8
movsd 0x70(%rsp), %xmm15
divsd %xmm5, %xmm15
addsd 0x10(%rsp), %xmm15
mulsd %xmm2, %xmm15
addsd %xmm8, %xmm15
testq %rdi, %rdi
je 0x21644
movsd 0x68(%rsp), %xmm7
divsd %xmm5, %xmm7
addsd 0x10(%rsp), %xmm7
mulsd %xmm3, %xmm7
mulsd %xmm15, %xmm6
addsd %xmm7, %xmm6
movsd 0x60(%rsp), %xmm7
mulsd %xmm4, %xmm7
divsd %xmm5, %xmm7
mulsd %xmm2, %xmm7
addsd %xmm6, %xmm7
movsd 0x58(%rsp), %xmm6
divsd %xmm5, %xmm6
movapd %xmm4, %xmm9
addsd %xmm4, %xmm9
movsd 0xc3c44(%rip), %xmm8    # 0xe5260
divsd %xmm5, %xmm8
mulsd %xmm4, %xmm9
addsd %xmm8, %xmm9
mulsd %xmm6, %xmm9
mulsd %xmm1, %xmm9
addsd %xmm7, %xmm9
movapd %xmm9, 0xe0(%rsp)
testq %rbx, %rbx
movapd %xmm15, %xmm13
je 0x21797
movapd %xmm3, %xmm5
movsd 0xc4651(%rip), %xmm9    # 0xe5cb0
mulsd %xmm9, %xmm5
movapd %xmm2, %xmm6
mulsd 0xc6d88(%rip), %xmm6    # 0xe83f8
movapd %xmm12, %xmm4
mulsd 0xc4fd3(%rip), %xmm4    # 0xe6650
addsd %xmm6, %xmm4
movapd 0xc3ba6(%rip), %xmm15   # 0xe5230
xorpd %xmm15, %xmm4
movapd %xmm2, %xmm6
mulsd 0xc50a5(%rip), %xmm6    # 0xe6740
movapd %xmm12, %xmm7
mulsd 0xc6d88(%rip), %xmm7    # 0xe8430
addsd %xmm6, %xmm7
movapd %xmm3, %xmm8
xorpd %xmm15, %xmm8
movapd %xmm13, %xmm15
unpcklpd %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0]
movapd %xmm10, %xmm6
mulsd 0xc6d6c(%rip), %xmm6    # 0xe8438
addsd %xmm5, %xmm6
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
movapd %xmm10, %xmm7
unpcklpd %xmm10, %xmm7           # xmm7 = xmm7[0],xmm10[0]
mulpd 0xc70f9(%rip), %xmm7    # 0xe87e0
addpd %xmm5, %xmm7
movapd %xmm11, %xmm8
subsd %xmm1, %xmm8
mulpd 0xf0(%rsp), %xmm4
mulpd 0x100(%rsp), %xmm7
addpd %xmm4, %xmm7
movapd %xmm8, %xmm4
unpcklpd %xmm8, %xmm4            # xmm4 = xmm4[0],xmm8[0]
mulpd 0xc70d3(%rip), %xmm4    # 0xe87f0
addpd %xmm7, %xmm4
movapd %xmm4, 0x1a0(%rsp)
movapd %xmm12, %xmm4
addsd %xmm2, %xmm4
mulsd 0xc6d05(%rip), %xmm4    # 0xe8440
movapd 0x30(%rsp), %xmm7
mulsd %xmm7, %xmm4
movapd 0x110(%rsp), %xmm5
mulsd %xmm5, %xmm6
addsd %xmm4, %xmm6
movapd %xmm7, %xmm4
mulsd %xmm12, %xmm4
movapd %xmm4, 0x1f0(%rsp)
mulsd 0xc4ed7(%rip), %xmm8    # 0xe6648
addsd %xmm6, %xmm8
movapd %xmm8, 0x220(%rsp)
movapd %xmm10, %xmm4
mulsd %xmm9, %xmm4
mulsd %xmm5, %xmm4
movapd %xmm4, 0x1b0(%rsp)
movapd %xmm12, 0x40(%rsp)
testq %r13, %r13
je 0x218fd
movapd %xmm15, %xmm5
movsd 0xc44fb(%rip), %xmm9    # 0xe5cb0
mulsd %xmm9, %xmm5
movapd %xmm3, %xmm6
mulsd 0xc6c32(%rip), %xmm6    # 0xe83f8
movapd %xmm10, %xmm4
mulsd 0xc4e7d(%rip), %xmm4    # 0xe6650
addsd %xmm6, %xmm4
movapd 0xc3a50(%rip), %xmm15   # 0xe5230
xorpd %xmm15, %xmm4
movapd %xmm3, %xmm6
mulsd 0xc4f4f(%rip), %xmm6    # 0xe6740
movapd %xmm10, %xmm7
mulsd 0xc6c32(%rip), %xmm7    # 0xe8430
addsd %xmm6, %xmm7
movapd %xmm13, %xmm8
xorpd %xmm15, %xmm8
movapd %xmm13, %xmm15
unpcklpd %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0]
movapd %xmm11, %xmm12
movapd 0x20(%rsp), %xmm11
movapd %xmm11, %xmm6
mulsd 0xc6c0a(%rip), %xmm6    # 0xe8438
addsd %xmm5, %xmm6
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
movapd %xmm11, %xmm7
unpcklpd %xmm11, %xmm7           # xmm7 = xmm7[0],xmm11[0]
mulpd 0xc6f97(%rip), %xmm7    # 0xe87e0
addpd %xmm5, %xmm7
movapd 0x40(%rsp), %xmm8
subsd %xmm2, %xmm8
mulpd 0xf0(%rsp), %xmm4
mulpd 0x100(%rsp), %xmm7
addpd %xmm4, %xmm7
movapd %xmm8, %xmm4
unpcklpd %xmm8, %xmm4            # xmm4 = xmm4[0],xmm8[0]
mulpd 0xc6f6f(%rip), %xmm4    # 0xe87f0
addpd %xmm7, %xmm4
movapd %xmm4, 0x230(%rsp)
movapd %xmm10, %xmm4
addsd %xmm3, %xmm4
mulsd 0xc6ba1(%rip), %xmm4    # 0xe8440
movapd 0x30(%rsp), %xmm7
mulsd %xmm7, %xmm4
movapd 0x110(%rsp), %xmm5
mulsd %xmm5, %xmm6
addsd %xmm4, %xmm6
movapd %xmm7, %xmm4
mulsd %xmm10, %xmm4
movapd %xmm4, 0x1e0(%rsp)
mulsd 0xc4d73(%rip), %xmm8    # 0xe6648
addsd %xmm6, %xmm8
movapd %xmm8, 0x210(%rsp)
mulsd %xmm9, %xmm11
mulsd %xmm5, %xmm11
movapd %xmm11, 0x190(%rsp)
movapd %xmm12, %xmm11
movq 0x158(%rsp), %r11
movsd -0x8(%r11,%rax,8), %xmm14
movsd (%r11,%rcx,8), %xmm4
movsd %xmm4, 0xb8(%rsp)
movslq %edx, %rax
movsd (%r11,%rax,8), %xmm4
movsd %xmm4, 0xb0(%rsp)
testq %rdi, %rdi
je 0x21abc
movapd 0xe0(%rsp), %xmm8
movapd %xmm8, %xmm5
movsd 0xc4362(%rip), %xmm9    # 0xe5cb0
mulsd %xmm9, %xmm5
movapd %xmm15, %xmm6
mulsd 0xc6a98(%rip), %xmm6    # 0xe83f8
movapd %xmm11, %xmm12
movapd 0x20(%rsp), %xmm11
movapd %xmm11, %xmm4
mulsd 0xc4cd7(%rip), %xmm4    # 0xe6650
addsd %xmm6, %xmm4
movapd 0xc38aa(%rip), %xmm15   # 0xe5230
xorpd %xmm15, %xmm4
movapd %xmm13, %xmm6
mulsd 0xc4da8(%rip), %xmm6    # 0xe6740
movapd %xmm11, %xmm7
mulsd 0xc6a8b(%rip), %xmm7    # 0xe8430
addsd %xmm6, %xmm7
xorpd %xmm15, %xmm8
movapd %xmm13, %xmm15
unpcklpd %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0]
movapd 0xd0(%rsp), %xmm13
movapd %xmm13, %xmm6
mulsd 0xc6a6a(%rip), %xmm6    # 0xe8438
addsd %xmm5, %xmm6
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
movapd %xmm13, %xmm7
unpcklpd %xmm13, %xmm7           # xmm7 = xmm7[0],xmm13[0]
mulpd 0xc6df7(%rip), %xmm7    # 0xe87e0
addpd %xmm5, %xmm7
movapd %xmm10, %xmm8
subsd %xmm3, %xmm8
mulpd 0xf0(%rsp), %xmm4
mulpd 0x100(%rsp), %xmm7
addpd %xmm4, %xmm7
movapd %xmm8, %xmm4
unpcklpd %xmm8, %xmm4            # xmm4 = xmm4[0],xmm8[0]
mulpd 0xc6dd1(%rip), %xmm4    # 0xe87f0
addpd %xmm7, %xmm4
movapd %xmm4, 0x1c0(%rsp)
movapd %xmm11, %xmm4
addsd %xmm15, %xmm4
mulsd 0xc6a02(%rip), %xmm4    # 0xe8440
movapd 0x30(%rsp), %xmm7
mulsd %xmm7, %xmm4
movapd 0x110(%rsp), %xmm5
mulsd %xmm5, %xmm6
addsd %xmm4, %xmm6
movapd %xmm7, %xmm4
mulsd %xmm11, %xmm4
movapd %xmm4, 0x1d0(%rsp)
mulsd 0xc4bd4(%rip), %xmm8    # 0xe6648
addsd %xmm6, %xmm8
movapd %xmm8, 0x200(%rsp)
mulsd %xmm9, %xmm13
mulsd %xmm5, %xmm13
movapd %xmm13, 0x180(%rsp)
movapd %xmm10, 0x140(%rsp)
movapd 0x40(%rsp), %xmm4
movapd %xmm4, 0x130(%rsp)
movapd %xmm12, 0x120(%rsp)
jmp 0x21adf
movapd %xmm10, 0x140(%rsp)
movapd 0x40(%rsp), %xmm4
movapd %xmm4, 0x130(%rsp)
movapd %xmm11, 0x120(%rsp)
subsd %xmm14, %xmm0
divsd 0x30(%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 %rbx, %rbx
je 0x21b93
movapd 0x1f0(%rsp), %xmm8
mulsd %xmm0, %xmm8
addsd 0x120(%rsp), %xmm8
movapd 0x1b0(%rsp), %xmm9
mulsd %xmm6, %xmm9
addsd %xmm8, %xmm9
movapd 0x1a0(%rsp), %xmm11
movapd %xmm11, %xmm8
mulsd %xmm5, %xmm8
addsd %xmm9, %xmm8
movapd %xmm11, %xmm9
unpckhpd %xmm11, %xmm9           # xmm9 = xmm9[1],xmm11[1]
mulsd %xmm7, %xmm9
addsd %xmm8, %xmm9
movapd 0x220(%rsp), %xmm8
mulsd %xmm4, %xmm8
addsd %xmm9, %xmm8
cvtsi2sdl 0x8(%rsp), %xmm9
mulsd %xmm8, %xmm9
movsd %xmm9, (%rbx,%r14,8)
testq %r13, %r13
je 0x21c1d
movapd 0x1e0(%rsp), %xmm8
mulsd %xmm0, %xmm8
addsd 0x130(%rsp), %xmm8
movapd 0x190(%rsp), %xmm9
mulsd %xmm6, %xmm9
addsd %xmm8, %xmm9
movapd 0x230(%rsp), %xmm13
movapd %xmm13, %xmm8
mulsd %xmm5, %xmm8
addsd %xmm9, %xmm8
movapd %xmm13, %xmm9
unpckhpd %xmm13, %xmm9           # xmm9 = xmm9[1],xmm13[1]
mulsd %xmm7, %xmm9
addsd %xmm8, %xmm9
movapd 0x210(%rsp), %xmm8
mulsd %xmm4, %xmm8
addsd %xmm9, %xmm8
cvtsi2sdl 0xc(%rsp), %xmm9
mulsd %xmm8, %xmm9
movsd %xmm9, (%r13,%r14,8)
testq %rdi, %rdi
je 0x21c92
mulsd 0x1d0(%rsp), %xmm0
addsd 0x140(%rsp), %xmm0
mulsd 0x180(%rsp), %xmm6
addsd %xmm0, %xmm6
movapd 0x1c0(%rsp), %xmm0
mulsd %xmm0, %xmm5
addsd %xmm6, %xmm5
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
mulsd %xmm7, %xmm0
addsd %xmm5, %xmm0
mulsd 0x200(%rsp), %xmm4
addsd %xmm0, %xmm4
cvtsi2sdl 0x8(%rsp), %xmm0
mulsd %xmm4, %xmm0
movapd %xmm3, %xmm10
movapd %xmm2, %xmm12
movapd %xmm1, %xmm11
movapd 0x20(%rsp), %xmm7
movsd %xmm0, (%rdi,%r14,8)
jmp 0x21ca7
movapd %xmm3, %xmm10
movapd %xmm2, %xmm12
movapd %xmm1, %xmm11
movapd 0x20(%rsp), %xmm7
incq %r14
jmp 0x211cb
xorl %eax, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq