// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x228, %rsp            # imm = 0x228
movq 0x230(%rsp), %rax
movq %rdi, 0x220(%rsp)
movl %esi, 0x21c(%rsp)
movl %edx, 0x218(%rsp)
movq %rcx, 0x210(%rsp)
movq %r8, 0x208(%rsp)
movq %r9, 0x200(%rsp)
movl $0x1, 0x1fc(%rsp)
movl $0x1, 0x1f8(%rsp)
movl $0x1, 0x1f4(%rsp)
movl $0x1, 0x1f0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1e8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1e0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1d8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1d0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1c8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x1c0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x188(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x180(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x178(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x170(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x158(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x150(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x148(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x140(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x138(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x130(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x128(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x120(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x118(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x110(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x108(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x100(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xf8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xf0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xe8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xe0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xd8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xd0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0xc8(%rsp)
movl $0x0, 0x4c(%rsp)
movl $0x1, 0x34(%rsp)
movl $0x1, 0x30(%rsp)
cmpq $0x0, 0x208(%rsp)
jne 0x40565
movl $0x0, 0x1fc(%rsp)
jmp 0x40570
movl $0x1, 0x1fc(%rsp)
cmpq $0x0, 0x200(%rsp)
jne 0x40588
movl $0x0, 0x1f8(%rsp)
jmp 0x40593
movl $0x1, 0x1f8(%rsp)
cmpq $0x0, 0x230(%rsp)
jne 0x405ab
movl $0x0, 0x1f4(%rsp)
jmp 0x405b6
movl $0x1, 0x1f4(%rsp)
cmpl $0x1, 0x1f8(%rsp)
je 0x405ca
cmpl $0x1, 0x1f4(%rsp)
jne 0x405d7
movl $0x1, 0x1f0(%rsp)
jmp 0x405e2
movl $0x0, 0x1f0(%rsp)
movq 0x220(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0x220(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0xa8(%rsp)
movq 0x220(%rsp), %rax
movq 0x48(%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x220(%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0xc0(%rsp), %xmm0
mulsd 0xc0(%rsp), %xmm0
movsd %xmm0, 0xb8(%rsp)
movq 0x220(%rsp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x88(%rsp), %xmm0
mulsd 0x88(%rsp), %xmm0
movsd %xmm0, 0x80(%rsp)
movq 0x220(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x5c(%rsp)
movq 0x220(%rsp), %rax
movl 0x30(%rax), %eax
movl %eax, 0x50(%rsp)
movq 0x220(%rsp), %rax
movq 0x50(%rax), %rax
movl 0x218(%rsp), %ecx
imull 0x50(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
movq 0x220(%rsp), %rax
movq 0x58(%rax), %rax
movl 0x218(%rsp), %ecx
imull 0x50(%rsp), %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movq 0x220(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x218(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x58(%rsp)
cvtsi2sdl 0x58(%rsp), %xmm0
cvtsi2sdl 0x58(%rsp), %xmm1
movsd 0x191b2e(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0xb0(%rsp), %rax
movsd (%rax), %xmm0
movsd %xmm0, 0x98(%rsp)
movq 0xb0(%rsp), %rax
movl 0x50(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x90(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x68(%rsp)
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movl $0x0, 0x54(%rsp)
movl 0x54(%rsp), %eax
cmpl 0x21c(%rsp), %eax
jge 0x41988
movq 0x210(%rsp), %rax
movslq 0x54(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1b8(%rsp)
movq 0x220(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x40812
movq 0x220(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x218(%rsp), %rcx
movl (%rax,%rcx,4), %edi
movq 0x220(%rsp), %rax
movsd 0x191a8e(%rip), %xmm0   # 0x1d2280
addsd 0x8(%rax), %xmm0
cvttsd2si %xmm0, %esi
leaq 0x1b8(%rsp), %rdx
leaq 0x34(%rsp), %rcx
leaq 0x30(%rsp), %r8
callq 0x419a0
movsd 0x1b8(%rsp), %xmm1
movsd 0x98(%rsp), %xmm0
ucomisd %xmm1, %xmm0
ja 0x4083e
movsd 0x1b8(%rsp), %xmm0
ucomisd 0x90(%rsp), %xmm0
jbe 0x408a0
cmpl $0x1, 0x1fc(%rsp)
jne 0x4085d
movq 0x208(%rsp), %rax
movslq 0x54(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, 0x1f8(%rsp)
jne 0x4087c
movq 0x200(%rsp), %rax
movslq 0x54(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, 0x1f4(%rsp)
jne 0x4089b
movq 0x230(%rsp), %rax
movslq 0x54(%rsp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x41978
movsd 0x1b8(%rsp), %xmm0
ucomisd 0x68(%rsp), %xmm0
ja 0x408ca
movsd 0x1b8(%rsp), %xmm1
movsd 0x70(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x416ca
movsd 0x1b8(%rsp), %xmm0
ucomisd 0x60(%rsp), %xmm0
ja 0x408f4
movsd 0x1b8(%rsp), %xmm1
movsd 0x70(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x40c20
movsd 0x1b8(%rsp), %xmm0
subsd 0x98(%rsp), %xmm0
divsd 0x88(%rsp), %xmm0
cvttsd2si %xmm0, %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
movl $0x1, %eax
cmpl 0x4c(%rsp), %eax
jge 0x4092f
movl 0x4c(%rsp), %eax
movl %eax, 0x2c(%rsp)
jmp 0x4093a
movl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x4093a
movl 0x2c(%rsp), %eax
movl %eax, 0x4c(%rsp)
movl 0x50(%rsp), %eax
subl $0x1, %eax
cmpl 0x4c(%rsp), %eax
jge 0x4095c
movl 0x50(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x40964
movl 0x4c(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x28(%rsp), %eax
movl %eax, 0x4c(%rsp)
movq 0xa0(%rsp), %rax
movl 0x4c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x188(%rsp)
movq 0xa8(%rsp), %rax
movl 0x4c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x178(%rsp)
movsd 0x178(%rsp), %xmm0
mulsd 0x178(%rsp), %xmm0
movsd %xmm0, 0x168(%rsp)
movq 0x40(%rsp), %rax
movl 0x4c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1e8(%rsp)
movq 0x38(%rsp), %rax
movl 0x4c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1d8(%rsp)
movsd 0x192d77(%rip), %xmm0   # 0x1d3780
mulsd 0x1d8(%rsp), %xmm0
movsd 0x188(%rsp), %xmm2
movsd 0x1e8(%rsp), %xmm1
movsd 0x78(%rsp), %xmm3
divsd 0x168(%rsp), %xmm3
subsd 0xb8(%rsp), %xmm3
cvtsi2sdl 0x5c(%rsp), %xmm4
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1c8(%rsp)
cmpl $0x1, 0x1f0(%rsp)
jne 0x40b0f
movsd 0x192d0f(%rip), %xmm1   # 0x1d3780
mulsd 0x188(%rsp), %xmm1
movsd 0x1c8(%rsp), %xmm2
movsd 0x1921f5(%rip), %xmm0   # 0x1d2c80
mulsd 0x1e8(%rsp), %xmm0
mulsd 0x78(%rsp), %xmm0
mulsd 0x188(%rsp), %xmm0
divsd 0x168(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1d8(%rsp), %xmm0
cvtsi2sdl 0x5c(%rsp), %xmm2
subsd 0xb8(%rsp), %xmm2
movsd 0x192195(%rip), %xmm3   # 0x1d2c80
addsd 0x78(%rsp), %xmm3
divsd 0x168(%rsp), %xmm3
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x158(%rsp)
cmpl $0x1, 0x1f4(%rsp)
jne 0x40c1b
movsd 0x192c5b(%rip), %xmm0   # 0x1d3780
mulsd 0x188(%rsp), %xmm0
movsd 0x158(%rsp), %xmm2
movsd 0x1c8(%rsp), %xmm1
cvtsi2sdl 0x5c(%rsp), %xmm3
subsd 0xb8(%rsp), %xmm3
movsd 0x194971(%rip), %xmm4   # 0x1d54c8
addsd 0x78(%rsp), %xmm4
divsd 0x168(%rsp), %xmm4
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x1d8(%rsp), %xmm1
movsd 0x1916c1(%rip), %xmm3   # 0x1d2248
addsd 0x78(%rsp), %xmm3
movsd 0x19492b(%rip), %xmm2   # 0x1d54c0
mulsd %xmm3, %xmm2
mulsd 0x188(%rsp), %xmm2
divsd 0x168(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1e8(%rsp), %xmm0
movsd 0x1920bc(%rip), %xmm2   # 0x1d2c80
mulsd 0x78(%rsp), %xmm2
divsd 0x168(%rsp), %xmm2
movsd 0x1920a5(%rip), %xmm3   # 0x1d2c80
mulsd 0x188(%rsp), %xmm3
movsd 0x188(%rsp), %xmm5
movsd 0x191653(%rip), %xmm4   # 0x1d2248
divsd 0x168(%rsp), %xmm4
mulsd %xmm5, %xmm3
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x148(%rsp)
jmp 0x40ca9
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4c(%rsp)
movsd 0x1e0(%rsp), %xmm0
movsd %xmm0, 0x1e8(%rsp)
movsd 0x1d0(%rsp), %xmm0
movsd %xmm0, 0x1d8(%rsp)
movsd 0x1c0(%rsp), %xmm0
movsd %xmm0, 0x1c8(%rsp)
movsd 0x150(%rsp), %xmm0
movsd %xmm0, 0x158(%rsp)
movsd 0x140(%rsp), %xmm0
movsd %xmm0, 0x148(%rsp)
movsd 0x170(%rsp), %xmm0
movsd %xmm0, 0x178(%rsp)
movsd 0x180(%rsp), %xmm0
movsd %xmm0, 0x188(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
movl 0x4c(%rsp), %ecx
subl $0x1, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jge 0x40cd0
movl 0x4c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x40cd8
xorl %eax, %eax
movl %eax, 0x1c(%rsp)
jmp 0x40cd8
movq 0x20(%rsp), %rax
movl 0x1c(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0xb0(%rsp), %rax
movslq 0x4c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x50(%rsp), %eax
subl $0x1, %eax
movl 0x4c(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x40d33
movl 0x50(%rsp), %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x40d3e
movl 0x4c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %rax
movl 0xc(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0xa0(%rsp), %rax
movslq 0x4c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x180(%rsp)
movq 0xa8(%rsp), %rax
movslq 0x4c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x170(%rsp)
movsd 0x170(%rsp), %xmm0
mulsd 0x170(%rsp), %xmm0
movsd %xmm0, 0x160(%rsp)
movq 0x40(%rsp), %rax
movslq 0x4c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1e0(%rsp)
movq 0x38(%rsp), %rax
movslq 0x4c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x1d0(%rsp)
movsd 0x1929a2(%rip), %xmm0   # 0x1d3780
mulsd 0x1d0(%rsp), %xmm0
movsd 0x180(%rsp), %xmm2
movsd 0x1e0(%rsp), %xmm1
movsd 0x78(%rsp), %xmm3
divsd 0x160(%rsp), %xmm3
subsd 0xb8(%rsp), %xmm3
cvtsi2sdl 0x5c(%rsp), %xmm4
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x1c0(%rsp)
cmpl $0x1, 0x1f0(%rsp)
jne 0x40ee4
movsd 0x19293a(%rip), %xmm1   # 0x1d3780
mulsd 0x180(%rsp), %xmm1
movsd 0x1c0(%rsp), %xmm2
movsd 0x191e20(%rip), %xmm0   # 0x1d2c80
mulsd 0x1e0(%rsp), %xmm0
mulsd 0x78(%rsp), %xmm0
mulsd 0x180(%rsp), %xmm0
divsd 0x160(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1d0(%rsp), %xmm0
cvtsi2sdl 0x5c(%rsp), %xmm2
subsd 0xb8(%rsp), %xmm2
movsd 0x191dc0(%rip), %xmm3   # 0x1d2c80
addsd 0x78(%rsp), %xmm3
divsd 0x160(%rsp), %xmm3
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x150(%rsp)
cmpl $0x1, 0x1f4(%rsp)
jne 0x40ff0
movsd 0x192886(%rip), %xmm0   # 0x1d3780
mulsd 0x180(%rsp), %xmm0
movsd 0x150(%rsp), %xmm2
movsd 0x1c0(%rsp), %xmm1
cvtsi2sdl 0x5c(%rsp), %xmm3
subsd 0xb8(%rsp), %xmm3
movsd 0x19459c(%rip), %xmm4   # 0x1d54c8
addsd 0x78(%rsp), %xmm4
divsd 0x160(%rsp), %xmm4
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x1d0(%rsp), %xmm1
movsd 0x1912ec(%rip), %xmm3   # 0x1d2248
addsd 0x78(%rsp), %xmm3
movsd 0x194556(%rip), %xmm2   # 0x1d54c0
mulsd %xmm3, %xmm2
mulsd 0x180(%rsp), %xmm2
divsd 0x160(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1e0(%rsp), %xmm0
movsd 0x191ce7(%rip), %xmm2   # 0x1d2c80
mulsd 0x78(%rsp), %xmm2
divsd 0x160(%rsp), %xmm2
movsd 0x191cd0(%rip), %xmm3   # 0x1d2c80
mulsd 0x180(%rsp), %xmm3
movsd 0x180(%rsp), %xmm5
movsd 0x19127e(%rip), %xmm4   # 0x1d2248
divsd 0x160(%rsp), %xmm4
mulsd %xmm5, %xmm3
addsd %xmm4, %xmm3
mulsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x140(%rsp)
cmpl $0x1, 0x1fc(%rsp)
jne 0x41238
movsd 0x1d8(%rsp), %xmm0
mulsd 0x88(%rsp), %xmm0
movsd %xmm0, 0x138(%rsp)
movsd 0x191c67(%rip), %xmm0   # 0x1d2c88
mulsd 0x1c8(%rsp), %xmm0
mulsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
movsd 0x1c8(%rsp), %xmm1
movsd 0x191c3b(%rip), %xmm0   # 0x1d2c88
mulsd 0x1c0(%rsp), %xmm0
movsd 0x19448a(%rip), %xmm2   # 0x1d54e8
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x1d8(%rsp), %xmm0
movsd 0x194448(%rip), %xmm3   # 0x1d54c8
mulsd 0x1d0(%rsp), %xmm3
movsd 0x1925f7(%rip), %xmm4   # 0x1d3688
mulsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd 0x88(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1e8(%rsp), %xmm0
subsd 0x1e0(%rsp), %xmm0
movsd 0x194405(%rip), %xmm2   # 0x1d54e0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x128(%rsp)
movsd 0x1c8(%rsp), %xmm1
movsd 0x1c0(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x191b33(%rip), %xmm2   # 0x1d2c50
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x1d8(%rsp), %xmm0
movsd 0x192649(%rip), %xmm3   # 0x1d3788
mulsd 0x1d0(%rsp), %xmm3
movsd 0x194388(%rip), %xmm4   # 0x1d54d8
mulsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd 0x88(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1e8(%rsp), %xmm0
subsd 0x1e0(%rsp), %xmm0
movsd 0x193e05(%rip), %xmm2   # 0x1d4f88
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x120(%rsp)
movsd 0x1c8(%rsp), %xmm1
movsd 0x191ae3(%rip), %xmm0   # 0x1d2c88
mulsd 0x1c0(%rsp), %xmm0
movsd 0x1924ea(%rip), %xmm2   # 0x1d36a0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x1d8(%rsp), %xmm3
addsd 0x1d0(%rsp), %xmm3
movsd 0x1924b7(%rip), %xmm0   # 0x1d3698
mulsd %xmm3, %xmm0
mulsd 0x88(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1e8(%rsp), %xmm0
subsd 0x1e0(%rsp), %xmm0
movsd 0x1942a9(%rip), %xmm2   # 0x1d54d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x118(%rsp)
cmpl $0x1, 0x1f8(%rsp)
jne 0x41480
movsd 0x1c8(%rsp), %xmm0
mulsd 0x88(%rsp), %xmm0
movsd %xmm0, 0x110(%rsp)
movsd 0x191a1f(%rip), %xmm0   # 0x1d2c88
mulsd 0x158(%rsp), %xmm0
mulsd 0x80(%rsp), %xmm0
movsd %xmm0, 0x108(%rsp)
movsd 0x158(%rsp), %xmm1
movsd 0x1919f3(%rip), %xmm0   # 0x1d2c88
mulsd 0x150(%rsp), %xmm0
movsd 0x194242(%rip), %xmm2   # 0x1d54e8
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x1c8(%rsp), %xmm0
movsd 0x194200(%rip), %xmm3   # 0x1d54c8
mulsd 0x1c0(%rsp), %xmm3
movsd 0x1923af(%rip), %xmm4   # 0x1d3688
mulsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd 0x88(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1d8(%rsp), %xmm0
subsd 0x1d0(%rsp), %xmm0
movsd 0x1941bd(%rip), %xmm2   # 0x1d54e0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x100(%rsp)
movsd 0x158(%rsp), %xmm1
movsd 0x150(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x1918eb(%rip), %xmm2   # 0x1d2c50
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x1c8(%rsp), %xmm0
movsd 0x192401(%rip), %xmm3   # 0x1d3788
mulsd 0x1c0(%rsp), %xmm3
movsd 0x194140(%rip), %xmm4   # 0x1d54d8
mulsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd 0x88(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1d8(%rsp), %xmm0
subsd 0x1d0(%rsp), %xmm0
movsd 0x193bbd(%rip), %xmm2   # 0x1d4f88
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xf8(%rsp)
movsd 0x158(%rsp), %xmm1
movsd 0x19189b(%rip), %xmm0   # 0x1d2c88
mulsd 0x150(%rsp), %xmm0
movsd 0x1922a2(%rip), %xmm2   # 0x1d36a0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x1c8(%rsp), %xmm3
addsd 0x1c0(%rsp), %xmm3
movsd 0x19226f(%rip), %xmm0   # 0x1d3698
mulsd %xmm3, %xmm0
mulsd 0x88(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1d8(%rsp), %xmm0
subsd 0x1d0(%rsp), %xmm0
movsd 0x194061(%rip), %xmm2   # 0x1d54d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xf0(%rsp)
cmpl $0x1, 0x1f4(%rsp)
jne 0x416c8
movsd 0x158(%rsp), %xmm0
mulsd 0x88(%rsp), %xmm0
movsd %xmm0, 0xe8(%rsp)
movsd 0x1917d7(%rip), %xmm0   # 0x1d2c88
mulsd 0x148(%rsp), %xmm0
mulsd 0x80(%rsp), %xmm0
movsd %xmm0, 0xe0(%rsp)
movsd 0x148(%rsp), %xmm1
movsd 0x1917ab(%rip), %xmm0   # 0x1d2c88
mulsd 0x140(%rsp), %xmm0
movsd 0x193ffa(%rip), %xmm2   # 0x1d54e8
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x158(%rsp), %xmm0
movsd 0x193fb8(%rip), %xmm3   # 0x1d54c8
mulsd 0x150(%rsp), %xmm3
movsd 0x192167(%rip), %xmm4   # 0x1d3688
mulsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd 0x88(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1c8(%rsp), %xmm0
subsd 0x1c0(%rsp), %xmm0
movsd 0x193f75(%rip), %xmm2   # 0x1d54e0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xd8(%rsp)
movsd 0x148(%rsp), %xmm1
movsd 0x140(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x1916a3(%rip), %xmm2   # 0x1d2c50
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x158(%rsp), %xmm0
movsd 0x1921b9(%rip), %xmm3   # 0x1d3788
mulsd 0x150(%rsp), %xmm3
movsd 0x193ef8(%rip), %xmm4   # 0x1d54d8
mulsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd 0x88(%rsp), %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1c8(%rsp), %xmm0
subsd 0x1c0(%rsp), %xmm0
movsd 0x193975(%rip), %xmm2   # 0x1d4f88
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0x148(%rsp), %xmm1
movsd 0x191653(%rip), %xmm0   # 0x1d2c88
mulsd 0x140(%rsp), %xmm0
movsd 0x19205a(%rip), %xmm2   # 0x1d36a0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x80(%rsp), %xmm2
movsd 0x158(%rsp), %xmm3
addsd 0x150(%rsp), %xmm3
movsd 0x192027(%rip), %xmm0   # 0x1d3698
mulsd %xmm3, %xmm0
mulsd 0x88(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x1c8(%rsp), %xmm0
subsd 0x1c0(%rsp), %xmm0
movsd 0x193e19(%rip), %xmm2   # 0x1d54d0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xc8(%rsp)
jmp 0x416ca
movsd 0x1b8(%rsp), %xmm0
subsd 0x70(%rsp), %xmm0
divsd 0x88(%rsp), %xmm0
movsd %xmm0, 0x1b0(%rsp)
movsd 0x1b0(%rsp), %xmm0
mulsd 0x1b0(%rsp), %xmm0
movsd %xmm0, 0x1a8(%rsp)
movsd 0x1a8(%rsp), %xmm0
mulsd 0x1b0(%rsp), %xmm0
movsd %xmm0, 0x1a0(%rsp)
movsd 0x1a8(%rsp), %xmm0
mulsd 0x1a8(%rsp), %xmm0
movsd %xmm0, 0x198(%rsp)
movsd 0x1a8(%rsp), %xmm0
mulsd 0x1a0(%rsp), %xmm0
movsd %xmm0, 0x190(%rsp)
cmpl $0x1, 0x1fc(%rsp)
jne 0x4180c
movsd 0x1e8(%rsp), %xmm1
movsd 0x138(%rsp), %xmm0
movsd 0x1b0(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x130(%rsp), %xmm1
movsd 0x1a8(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x128(%rsp), %xmm0
movsd 0x1a0(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x120(%rsp), %xmm1
movsd 0x198(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x118(%rsp), %xmm0
movsd 0x190(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsi2sdl 0x34(%rsp), %xmm1
mulsd %xmm1, %xmm0
movq 0x208(%rsp), %rax
movslq 0x54(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, 0x1f8(%rsp)
jne 0x418c1
movsd 0x1d8(%rsp), %xmm1
movsd 0x110(%rsp), %xmm0
movsd 0x1b0(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0x108(%rsp), %xmm1
movsd 0x1a8(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0x100(%rsp), %xmm0
movsd 0x1a0(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0xf8(%rsp), %xmm1
movsd 0x198(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0xf0(%rsp), %xmm0
movsd 0x190(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsi2sdl 0x30(%rsp), %xmm1
mulsd %xmm1, %xmm0
movq 0x200(%rsp), %rax
movslq 0x54(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
cmpl $0x1, 0x1f4(%rsp)
jne 0x41976
movsd 0x1c8(%rsp), %xmm1
movsd 0xe8(%rsp), %xmm0
movsd 0x1b0(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0xe0(%rsp), %xmm1
movsd 0x1a8(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0xd8(%rsp), %xmm0
movsd 0x1a0(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd 0xd0(%rsp), %xmm1
movsd 0x198(%rsp), %xmm2
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd 0xc8(%rsp), %xmm0
movsd 0x190(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsi2sdl 0x34(%rsp), %xmm1
mulsd %xmm1, %xmm0
movq 0x230(%rsp), %rax
movslq 0x54(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
jmp 0x41978
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
jmp 0x40792
xorl %eax, %eax
addq $0x228, %rsp            # imm = 0x228
retq
nopw %cs:(%rax,%rax)