// File: /workspace/github_c_makefile_star2_O3/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, %r10
movq 0x290(%rsp), %rdi
movl $0x1, %eax
movl %eax, 0x1c(%rsp)
movl %eax, 0x2c(%rsp)
movq %r9, %rax
orq %rdi, %rax
setne 0xf(%rsp)
testl %esi, %esi
jle 0x24048
movq %r9, %r12
movq %r8, %rbx
movq %rcx, %r13
movq 0x38(%r10), %rcx
movq 0x40(%r10), %rax
movq %rax, 0xa8(%rsp)
movq 0x48(%r10), %rax
movq %rax, 0xa0(%rsp)
movsd 0x8(%r10), %xmm1
movsd 0x10(%r10), %xmm10
mulsd %xmm1, %xmm1
movapd %xmm10, %xmm2
mulsd %xmm10, %xmm2
movslq 0x30(%r10), %r11
movslq %edx, %rdx
movq %r11, %rax
imulq %rdx, %rax
shlq $0x3, %rax
movq 0x50(%r10), %r14
addq %rax, %r14
movq %r14, 0x80(%rsp)
addq 0x58(%r10), %rax
movq %rax, 0x88(%rsp)
movq 0x20(%r10), %rax
movq %rdx, 0x130(%rsp)
cvtsi2sdl (%rax,%rdx,4), %xmm0
movsd 0xcae66(%rip), %xmm4    # 0xee260
addsd %xmm0, %xmm4
mulsd %xmm0, %xmm4
movsd (%rcx), %xmm5
movq %rcx, 0x128(%rsp)
movsd -0x8(%rcx,%r11,8), %xmm0
decq %r11
movq %r11, 0x90(%rsp)
cvtsi2sdl (%r10), %xmm3
movsd %xmm3, 0x78(%rsp)
movsd %xmm1, 0x98(%rsp)
subsd %xmm1, %xmm3
movsd %xmm3, 0x30(%rsp)
movsd 0xcb8ba(%rip), %xmm1    # 0xeed00
addsd %xmm4, %xmm1
movsd %xmm1, 0x70(%rsp)
movsd 0xcdfe0(%rip), %xmm1    # 0xf1438
addsd %xmm4, %xmm1
movsd %xmm1, 0x68(%rsp)
movsd 0xcadf6(%rip), %xmm1    # 0xee260
addsd %xmm4, %xmm1
mulsd 0xcdff2(%rip), %xmm1    # 0xf1468
movsd %xmm1, 0x60(%rsp)
movsd %xmm4, 0x38(%rsp)
movapd %xmm4, %xmm1
addsd %xmm4, %xmm1
movsd %xmm1, 0x58(%rsp)
movl %esi, %r15d
movapd %xmm2, 0x110(%rsp)
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
movapd %xmm2, 0x100(%rsp)
movapd %xmm10, %xmm1
unpcklpd %xmm10, %xmm1           # xmm1 = xmm1[0],xmm10[0]
movapd %xmm1, 0xf0(%rsp)
xorpd %xmm1, %xmm1
movapd %xmm1, 0x200(%rsp)
xorpd %xmm1, %xmm1
movsd %xmm1, 0x50(%rsp)
movl $0x0, %r14d
movl $0x0, %ebp
movsd %xmm5, 0xb0(%rsp)
movsd %xmm5, 0xc0(%rsp)
movsd %xmm5, 0xb8(%rsp)
movsd %xmm0, 0x138(%rsp)
movapd %xmm0, %xmm12
xorpd %xmm7, %xmm7
xorpd %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
xorpd %xmm2, %xmm2
movsd %xmm0, 0x48(%rsp)
xorpd %xmm14, %xmm14
xorpd %xmm15, %xmm15
movapd %xmm0, 0x1f0(%rsp)
movapd %xmm0, 0x180(%rsp)
movapd %xmm0, 0x1a0(%rsp)
movapd %xmm0, 0x1e0(%rsp)
movapd %xmm0, 0x160(%rsp)
movapd %xmm0, 0x190(%rsp)
movapd %xmm0, 0x1d0(%rsp)
movapd %xmm0, 0x150(%rsp)
movapd %xmm0, 0x170(%rsp)
movapd %xmm0, 0xe0(%rsp)
movapd %xmm0, 0xd0(%rsp)
xorpd %xmm11, %xmm11
xorpd %xmm0, %xmm0
movapd %xmm0, 0x1c0(%rsp)
movapd %xmm0, 0x1b0(%rsp)
movapd %xmm10, 0x210(%rsp)
movsd (%r13,%r14,8), %xmm0
movsd %xmm0, 0xc8(%rsp)
cmpl $0x1, (%r10)
jne 0x236a2
movq 0x20(%r10), %rax
movq %r14, 0x148(%rsp)
movq 0x130(%rsp), %rcx
movl (%rax,%rcx,4), %edi
movsd 0x8(%r10), %xmm0
addsd 0xcaca8(%rip), %xmm0    # 0xee298
cvttsd2si %xmm0, %esi
leaq 0xc8(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
leaq 0x2c(%rsp), %r8
movl %ebp, %r14d
movq %r10, %rbp
movapd %xmm15, 0x240(%rsp)
movapd %xmm11, 0x230(%rsp)
movsd %xmm7, 0x20(%rsp)
movsd %xmm2, 0x10(%rsp)
movapd %xmm14, 0x220(%rsp)
movsd %xmm12, 0x140(%rsp)
callq 0x2405c
movsd 0x140(%rsp), %xmm12
movapd 0x220(%rsp), %xmm14
movsd 0x10(%rsp), %xmm2
movsd 0x20(%rsp), %xmm7
movapd 0x230(%rsp), %xmm11
movapd 0x240(%rsp), %xmm15
movapd 0x210(%rsp), %xmm10
movq %rbp, %r10
movl %r14d, %ebp
movq 0x290(%rsp), %rdi
movq 0x148(%rsp), %r14
movsd 0xc8(%rsp), %xmm0
movsd 0xc0(%rsp), %xmm1
ucomisd %xmm0, %xmm1
ja 0x236dc
ucomisd 0x138(%rsp), %xmm0
ja 0x236dc
ucomisd 0xb8(%rsp), %xmm0
ja 0x23708
ucomisd %xmm0, %xmm12
ja 0x23708
movapd %xmm14, %xmm3
movapd %xmm7, %xmm1
jmp 0x23e82
testq %rbx, %rbx
je 0x236e9
movq $0x0, (%rbx,%r14,8)
testq %r12, %r12
je 0x236f6
movq $0x0, (%r12,%r14,8)
xorpd %xmm0, %xmm0
testq %rdi, %rdi
jne 0x2402b
jmp 0x2403c
ucomisd 0xb0(%rsp), %xmm0
ja 0x2373e
ucomisd %xmm0, %xmm12
ja 0x2373e
movsd %xmm2, 0x10(%rsp)
incl %ebp
movapd 0xe0(%rsp), %xmm1
movapd %xmm1, 0xd0(%rsp)
movapd %xmm11, %xmm15
jmp 0x238b6
movapd %xmm0, %xmm1
subsd 0xc0(%rsp), %xmm1
divsd %xmm10, %xmm1
cvttsd2si %xmm1, %ebp
testl %ebp, %ebp
movl $0x0, %eax
cmovlel %eax, %ebp
incl %ebp
movq 0x90(%rsp), %rax
cmpl %ebp, %eax
cmovll %eax, %ebp
movslq %ebp, %rax
movq 0xa0(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm1
movq 0xa8(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm2
mulsd %xmm2, %xmm2
movq 0x80(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm7
movq 0x88(%rsp), %rcx
movsd -0x8(%rcx,%rax,8), %xmm6
movapd %xmm6, %xmm14
mulsd 0xcbfa6(%rip), %xmm14   # 0xef760
movsd 0x38(%rsp), %xmm3
divsd %xmm2, %xmm3
subsd 0x98(%rsp), %xmm3
addsd 0x78(%rsp), %xmm3
mulsd %xmm7, %xmm3
mulsd %xmm1, %xmm14
addsd %xmm3, %xmm14
cmpb $0x0, 0xf(%rsp)
movsd %xmm6, 0x10(%rsp)
je 0x238b6
movapd %xmm1, %xmm3
movsd 0xcbf62(%rip), %xmm5    # 0xef760
mulsd %xmm5, %xmm3
movapd %xmm7, %xmm4
mulsd %xmm5, %xmm4
mulsd 0x38(%rsp), %xmm4
mulsd %xmm1, %xmm4
divsd %xmm2, %xmm4
movapd %xmm3, %xmm5
mulsd %xmm14, %xmm5
addsd %xmm4, %xmm5
movsd 0x70(%rsp), %xmm15
divsd %xmm2, %xmm15
addsd 0x30(%rsp), %xmm15
mulsd %xmm6, %xmm15
addsd %xmm5, %xmm15
testq %rdi, %rdi
je 0x238b6
movsd 0x68(%rsp), %xmm4
divsd %xmm2, %xmm4
addsd 0x30(%rsp), %xmm4
mulsd %xmm14, %xmm4
mulsd %xmm15, %xmm3
addsd %xmm4, %xmm3
movsd 0x60(%rsp), %xmm4
mulsd %xmm1, %xmm4
divsd %xmm2, %xmm4
mulsd %xmm6, %xmm4
addsd %xmm3, %xmm4
movsd 0x58(%rsp), %xmm3
divsd %xmm2, %xmm3
movapd %xmm1, %xmm6
addsd %xmm1, %xmm6
movsd 0xca9cb(%rip), %xmm5    # 0xee260
divsd %xmm2, %xmm5
mulsd %xmm1, %xmm6
addsd %xmm5, %xmm6
mulsd %xmm3, %xmm6
mulsd %xmm7, %xmm6
addsd %xmm4, %xmm6
movapd %xmm6, 0xd0(%rsp)
movsd %xmm7, 0x20(%rsp)
cmpl $0x2, %ebp
movl $0x1, %eax
cmovgel %ebp, %eax
movslq %ebp, %rcx
leal 0x1(%rcx), %edx
movq 0x90(%rsp), %rsi
cmpl %edx, %esi
cmovll %esi, %edx
movq 0xa0(%rsp), %rsi
movsd (%rsi,%rcx,8), %xmm4
movq 0xa8(%rsp), %rsi
movsd (%rsi,%rcx,8), %xmm5
mulsd %xmm5, %xmm5
movq 0x80(%rsp), %rsi
movsd (%rsi,%rcx,8), %xmm1
movq 0x88(%rsp), %rsi
movsd (%rsi,%rcx,8), %xmm2
movapd %xmm2, %xmm3
mulsd 0xcbe42(%rip), %xmm3    # 0xef760
movsd 0x38(%rsp), %xmm6
divsd %xmm5, %xmm6
subsd 0x98(%rsp), %xmm6
addsd 0x78(%rsp), %xmm6
mulsd %xmm1, %xmm6
mulsd %xmm4, %xmm3
addsd %xmm6, %xmm3
cmpb $0x0, 0xf(%rsp)
je 0x23a2c
movapd %xmm4, %xmm6
movsd 0xcbe05(%rip), %xmm8    # 0xef760
mulsd %xmm8, %xmm6
movapd %xmm1, %xmm7
mulsd %xmm8, %xmm7
mulsd 0x38(%rsp), %xmm7
mulsd %xmm4, %xmm7
divsd %xmm5, %xmm7
movapd %xmm6, %xmm8
mulsd %xmm3, %xmm8
addsd %xmm7, %xmm8
movsd 0x70(%rsp), %xmm9
divsd %xmm5, %xmm9
addsd 0x30(%rsp), %xmm9
mulsd %xmm2, %xmm9
addsd %xmm8, %xmm9
testq %rdi, %rdi
je 0x23a27
movsd 0x68(%rsp), %xmm7
divsd %xmm5, %xmm7
addsd 0x30(%rsp), %xmm7
mulsd %xmm3, %xmm7
movapd %xmm9, %xmm11
mulsd %xmm9, %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 0xca863(%rip), %xmm8    # 0xee260
divsd %xmm5, %xmm8
mulsd %xmm4, %xmm9
addsd %xmm8, %xmm9
mulsd %xmm6, %xmm9
mulsd %xmm1, %xmm9
addsd %xmm7, %xmm9
movapd %xmm9, 0xe0(%rsp)
jmp 0x23a2c
movapd %xmm9, %xmm11
testq %rbx, %rbx
movapd %xmm15, %xmm13
je 0x23b8e
movapd %xmm3, %xmm5
movsd 0xcb289(%rip), %xmm9    # 0xeecd0
mulsd %xmm9, %xmm5
movapd %xmm2, %xmm6
mulsd 0xcd9e0(%rip), %xmm6    # 0xf1438
movapd %xmm14, %xmm12
movsd 0x10(%rsp), %xmm14
movapd %xmm14, %xmm4
mulsd 0xcbbff(%rip), %xmm4    # 0xef670
addsd %xmm6, %xmm4
movapd 0xca7b2(%rip), %xmm15   # 0xee230
xorpd %xmm15, %xmm4
movapd %xmm2, %xmm6
mulsd 0xcbcd9(%rip), %xmm6    # 0xef768
movapd %xmm14, %xmm7
mulsd 0xcd9d4(%rip), %xmm7    # 0xf1470
addsd %xmm6, %xmm7
movapd %xmm3, %xmm8
xorpd %xmm15, %xmm8
movapd %xmm13, %xmm15
unpcklpd %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0]
movapd %xmm12, %xmm6
mulsd 0xcd9b8(%rip), %xmm6    # 0xf1478
addsd %xmm5, %xmm6
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
movapd %xmm12, %xmm7
unpcklpd %xmm12, %xmm7           # xmm7 = xmm7[0],xmm12[0]
mulpd 0xcdd85(%rip), %xmm7    # 0xf1860
addpd %xmm5, %xmm7
movsd 0x20(%rsp), %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 0xcdd5d(%rip), %xmm4    # 0xf1870
addpd %xmm7, %xmm4
movapd %xmm4, 0x1b0(%rsp)
movapd %xmm14, %xmm4
addsd %xmm2, %xmm4
mulsd 0xcd94f(%rip), %xmm4    # 0xf1480
mulsd %xmm10, %xmm4
movapd 0x110(%rsp), %xmm5
mulsd %xmm5, %xmm6
addsd %xmm4, %xmm6
movapd %xmm10, %xmm4
mulsd %xmm14, %xmm4
movapd %xmm12, %xmm14
movapd %xmm4, 0x170(%rsp)
mulsd 0xcbb00(%rip), %xmm8    # 0xef668
addsd %xmm6, %xmm8
movapd %xmm8, 0x1d0(%rsp)
movapd %xmm12, %xmm4
mulsd %xmm9, %xmm4
mulsd %xmm5, %xmm4
movapd %xmm4, 0x150(%rsp)
testq %r12, %r12
je 0x23cdb
movapd %xmm11, %xmm8
movapd %xmm11, %xmm5
movsd 0xcb126(%rip), %xmm9    # 0xeecd0
mulsd %xmm9, %xmm5
movapd %xmm3, %xmm6
mulsd 0xcd87d(%rip), %xmm6    # 0xf1438
movapd %xmm14, %xmm4
mulsd 0xcbaa8(%rip), %xmm4    # 0xef670
addsd %xmm6, %xmm4
movapd 0xca65b(%rip), %xmm15   # 0xee230
xorpd %xmm15, %xmm4
movapd %xmm3, %xmm6
mulsd 0xcbb82(%rip), %xmm6    # 0xef768
movapd %xmm14, %xmm7
mulsd 0xcd87d(%rip), %xmm7    # 0xf1470
addsd %xmm6, %xmm7
xorpd %xmm15, %xmm8
movapd %xmm13, %xmm15
unpcklpd %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0]
movapd %xmm13, %xmm6
mulsd 0xcd866(%rip), %xmm6    # 0xf1478
addsd %xmm5, %xmm6
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
movapd %xmm13, %xmm7
unpcklpd %xmm13, %xmm7           # xmm7 = xmm7[0],xmm13[0]
mulpd 0xcdc33(%rip), %xmm7    # 0xf1860
addpd %xmm5, %xmm7
movsd 0x10(%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 0xcdc0b(%rip), %xmm4    # 0xf1870
addpd %xmm7, %xmm4
movapd %xmm4, 0x200(%rsp)
movapd %xmm14, %xmm4
addsd %xmm3, %xmm4
mulsd 0xcd7fd(%rip), %xmm4    # 0xf1480
mulsd %xmm10, %xmm4
movapd 0x110(%rsp), %xmm5
mulsd %xmm5, %xmm6
addsd %xmm4, %xmm6
movapd %xmm10, %xmm4
mulsd %xmm14, %xmm4
movapd %xmm4, 0x190(%rsp)
mulsd 0xcb9b3(%rip), %xmm8    # 0xef668
addsd %xmm6, %xmm8
movapd %xmm8, 0x1e0(%rsp)
movapd %xmm13, %xmm4
mulsd %xmm9, %xmm4
mulsd %xmm5, %xmm4
movapd %xmm4, 0x160(%rsp)
movq 0x128(%rsp), %rsi
movsd -0x8(%rsi,%rax,8), %xmm12
movsd (%rsi,%rcx,8), %xmm4
movsd %xmm4, 0xb8(%rsp)
movslq %edx, %rax
movsd (%rsi,%rax,8), %xmm4
movsd %xmm4, 0xb0(%rsp)
testq %rdi, %rdi
je 0x23e63
movapd 0xe0(%rsp), %xmm8
movapd %xmm8, %xmm5
movsd 0xcafa6(%rip), %xmm9    # 0xeecd0
mulsd %xmm9, %xmm5
movapd %xmm11, %xmm6
mulsd 0xcd6fc(%rip), %xmm6    # 0xf1438
movapd %xmm15, %xmm4
mulsd 0xcb927(%rip), %xmm4    # 0xef670
addsd %xmm6, %xmm4
movapd 0xca4da(%rip), %xmm15   # 0xee230
xorpd %xmm15, %xmm4
movapd %xmm11, %xmm6
mulsd 0xcba00(%rip), %xmm6    # 0xef768
movapd %xmm13, %xmm7
mulsd 0xcd6fb(%rip), %xmm7    # 0xf1470
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 0xcd6da(%rip), %xmm6    # 0xf1478
addsd %xmm5, %xmm6
unpcklpd %xmm8, %xmm5            # xmm5 = xmm5[0],xmm8[0]
movapd %xmm13, %xmm7
unpcklpd %xmm13, %xmm7           # xmm7 = xmm7[0],xmm13[0]
mulpd 0xcdaa7(%rip), %xmm7    # 0xf1860
addpd %xmm5, %xmm7
movapd %xmm14, %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 0xcda81(%rip), %xmm4    # 0xf1870
addpd %xmm7, %xmm4
movapd %xmm4, 0x1c0(%rsp)
movapd %xmm15, %xmm4
addsd %xmm11, %xmm4
mulsd 0xcd672(%rip), %xmm4    # 0xf1480
mulsd %xmm10, %xmm4
movapd 0x110(%rsp), %xmm5
mulsd %xmm5, %xmm6
addsd %xmm4, %xmm6
movapd %xmm10, %xmm4
mulsd %xmm15, %xmm4
movapd %xmm4, 0x1a0(%rsp)
mulsd 0xcb828(%rip), %xmm8    # 0xef668
addsd %xmm6, %xmm8
movapd %xmm8, 0x1f0(%rsp)
mulsd %xmm9, %xmm13
mulsd %xmm5, %xmm13
movapd %xmm13, 0x180(%rsp)
movsd %xmm14, 0x48(%rsp)
movsd 0x10(%rsp), %xmm4
movsd %xmm4, 0x40(%rsp)
movsd 0x20(%rsp), %xmm4
movsd %xmm4, 0x50(%rsp)
subsd %xmm12, %xmm0
divsd %xmm10, %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 0x23f36
movapd 0x170(%rsp), %xmm8
mulsd %xmm0, %xmm8
addsd 0x50(%rsp), %xmm8
movapd 0x150(%rsp), %xmm9
mulsd %xmm6, %xmm9
addsd %xmm8, %xmm9
movapd 0x1b0(%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 0x1d0(%rsp), %xmm8
mulsd %xmm4, %xmm8
addsd %xmm9, %xmm8
xorps %xmm9, %xmm9
cvtsi2sdl 0x1c(%rsp), %xmm9
mulsd %xmm8, %xmm9
movsd %xmm9, (%rbx,%r14,8)
testq %r12, %r12
je 0x23fca
movapd 0x190(%rsp), %xmm8
mulsd %xmm0, %xmm8
addsd 0x40(%rsp), %xmm8
movapd 0x160(%rsp), %xmm9
mulsd %xmm6, %xmm9
addsd %xmm8, %xmm9
movapd %xmm15, %xmm13
movapd 0x200(%rsp), %xmm15
movapd %xmm15, %xmm8
mulsd %xmm5, %xmm8
addsd %xmm9, %xmm8
movapd %xmm15, %xmm9
movapd %xmm13, %xmm15
unpckhpd %xmm9, %xmm9            # xmm9 = xmm9[1,1]
mulsd %xmm7, %xmm9
addsd %xmm8, %xmm9
movapd 0x1e0(%rsp), %xmm8
mulsd %xmm4, %xmm8
addsd %xmm9, %xmm8
xorps %xmm9, %xmm9
cvtsi2sdl 0x2c(%rsp), %xmm9
mulsd %xmm8, %xmm9
movsd %xmm9, (%r12,%r14,8)
testq %rdi, %rdi
je 0x24033
mulsd 0x1a0(%rsp), %xmm0
addsd 0x48(%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 0x1f0(%rsp), %xmm4
addsd %xmm0, %xmm4
xorps %xmm0, %xmm0
cvtsi2sdl 0x1c(%rsp), %xmm0
mulsd %xmm4, %xmm0
movapd %xmm3, %xmm14
movapd %xmm1, %xmm7
movsd %xmm0, (%rdi,%r14,8)
jmp 0x2403c
movapd %xmm3, %xmm14
movapd %xmm1, %xmm7
incq %r14
cmpq %r14, %r15
jne 0x235b1
xorl %eax, %eax
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq