// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../tools/hyperspherical.c
// Function: hyperspherical_HIS_create
int hyperspherical_HIS_create(int K,
                              double beta,
                              int nl,
                              int *lvec,
                              double xmin,
                              double xmax,
                              double sampling,
                              int l_WKB,
                              double phiminabs,
                              HyperInterpStruct *pHIS,
                              ErrorMsg error_message){
  /** Allocate storage for Hyperspherical Interpolation Structure (HIS).
      Then, compute the values of Phi and dPhi and complete the interpolation
      structure.
      Change to accomodate shared memory approach: Allocate all memory in a
      single call, and return the pointer as ppHIS. All pointers inside are
      then relative to ppHIS.
  */
  double deltax, beta2, lambda, x, xfwd;
  double *sqrtK, *one_over_sqrtK,*PhiL;
  int j, k, l, nx, lmax, l_recurrence_max;
  int current_chunk, index_x;

  beta2 = beta*beta;
  lmax = lvec[nl-1];
  lambda = 2*_PI_/beta;
  nx = (int) ((xmax-xmin)*sampling/lambda);
  nx = MAX(nx,2);
  deltax = (xmax-xmin)/(nx-1.0);
  //fprintf(stderr,"dx=%e\n",deltax);
  //fprintf(stderr,"%e %e\n",beta,sampling);
  //Set scalar values:
  pHIS->beta = beta;
  pHIS->delta_x = deltax;
  pHIS->l_size = nl;
  pHIS->x_size = nx;
  pHIS->K = K;
  //Set pointervalues in pHIS:

  class_alloc(pHIS->l, sizeof(int)*nl,error_message);
  class_alloc(pHIS->chi_at_phimin,sizeof(double)*nl,error_message);
  class_alloc(pHIS->x,sizeof(double)*nx,error_message);
  class_alloc(pHIS->sinK,sizeof(double)*nx,error_message);
  class_alloc(pHIS->cotK,sizeof(double)*nx,error_message);
  class_alloc(pHIS->phi,sizeof(double)*nx*nl,error_message);
  class_alloc(pHIS->dphi,sizeof(double)*nx*nl,error_message);

  //Order needed for trig interpolation: (We are using Taylor's remainder theorem)
  if (0.5*deltax*deltax < _TRIG_PRECISSION_)
    pHIS->trig_order = 1;
  else if ((pow(deltax,4)/24.0) < _TRIG_PRECISSION_)
    pHIS->trig_order = 3;
  else
    pHIS->trig_order = 5;

  //Copy lvector:
  for (j=0; j<nl; j++){
    pHIS->l[j] = lvec[j];
  }
  //Allocate sqrtK, and PhiL:
  class_alloc(sqrtK,(lmax+3)*sizeof(double),error_message);
  class_alloc(one_over_sqrtK,(lmax+3)*sizeof(double),error_message);
  //class_alloc(PhiL,(lmax+2)*sizeof(double),error_message);

  //Find l_WKB_min, the highest l in lvec where l<l_WKB:
  l_recurrence_max = -10;
  int index_recurrence_max=-10;
  for (k=nl-1; k>=0; k--){
    l = lvec[k];
    if (l<l_WKB){
        l_recurrence_max = l;
        index_recurrence_max = k;
        break;
    }
  }

  //Create xvector and set x, cotK, sinK, sqrtK and fwdidx:
  switch (K){
  case 0:
    xfwd = sqrt(l_recurrence_max*(l_recurrence_max+1.0))/beta;
    for (j=0; j<nx; j++){
      x = xmin + j*deltax;
      pHIS->x[j] = x;
      pHIS->sinK[j] = x;
      pHIS->cotK[j] = 1.0/x;
    }
    for (l=0; l<=(lmax+2); l++){
      sqrtK[l] = beta;
      one_over_sqrtK[l] = 1.0/sqrtK[l];
    }
    break;
  case 1:
    xfwd = asin(sqrt(l_recurrence_max*(l_recurrence_max+1.0))/beta);
    for (j=0; j<nx; j++){
      x = xmin + j*deltax;
      pHIS->x[j] = x;
      pHIS->sinK[j] = sin(x);
      pHIS->cotK[j] = 1.0/tan(x);
    }
    for (l=0; l<=(lmax+2); l++){
      sqrtK[l] = sqrt(beta2-l*l);
      one_over_sqrtK[l] = 1.0/sqrtK[l];
    }
    break;
  case -1:
    xfwd = asinh(sqrt(l_recurrence_max*(l_recurrence_max+1.0))/beta);
    for (j=0; j<nx; j++){
      x = xmin + j*deltax;
      pHIS->x[j] = x;
      pHIS->sinK[j] = sinh(x);
      pHIS->cotK[j] = 1.0/tanh(x);
    }
    for (l=0; l<=(lmax+2); l++){
      sqrtK[l] = sqrt(beta2+l*l);
      one_over_sqrtK[l] = 1.0/sqrtK[l];
    }
    break;
  default:
    return _FAILURE_;
  }

  int xfwdidx = (xfwd-xmin)/deltax;

  //Only work in parallel if K==0
  class_setup_parallel_optional(K == 0);

  //Calculate and assign Phi and dPhi values:
  for (j=0; j<MIN(nx,xfwdidx); j++){
    class_run_parallel_mutable(=,
    class_alloc(PhiL,(lmax+2)*sizeof(double),error_message);
    if ((K == 1) && ((int)(beta+0.2) == (lmax+1))) {
      PhiL[lmax+1] = 0.0;
      lmax--;
    }
    //Use backwards method:
    hyperspherical_backwards_recurrence(K,
                                        MIN(l_recurrence_max,lmax)+1,
                                        beta,
                                        pHIS->x[j],
                                        pHIS->sinK[j],
                                        pHIS->cotK[j],
                                        sqrtK,
                                        one_over_sqrtK,
                                        PhiL);
    //We have now populated PhiL at x, assign Phi and dPhi for all l in lvec:
    for (k=0; k<=index_recurrence_max; k++){
      l = lvec[k];
      pHIS->phi[k*nx+j] = PhiL[l];
      pHIS->dphi[k*nx+j] = l*pHIS->cotK[j]*PhiL[l]-sqrtK[l+1]*PhiL[l+1];
    }
    free(PhiL);
    return _SUCCESS_;
    );
  }

  for (j=xfwdidx; j<nx; j+=_HYPER_CHUNK_){
    class_run_parallel_mutable(=,
    //Use forwards method:
    current_chunk = MIN(_HYPER_CHUNK_,nx-j);
    class_alloc(PhiL,(lmax+2)*sizeof(double)*current_chunk,error_message);
    if ((K == 1) && ((int)(beta+0.2) == (lmax+1))) {
      for(k=0; k<(lmax+2)*current_chunk; k++){
        PhiL[k] = 0.0;
      }
      lmax--;
    }
    hyperspherical_forwards_recurrence_chunk(K,
                                              MIN(l_recurrence_max,lmax)+1,
                                              beta,
                                              pHIS->x+j,
                                              pHIS->sinK+j,
                                              pHIS->cotK+j,
                                              current_chunk,
                                              sqrtK,
                                              one_over_sqrtK,
                                              PhiL);

    //We have now populated PhiL at x, assign Phi and dPhi for all l in lvec:
    for (k=0; k<=index_recurrence_max; k++){
      l = lvec[k];
      for (index_x=0; index_x<current_chunk; index_x++){
        pHIS->phi[k*nx+j+index_x] = PhiL[l*current_chunk+index_x];
        pHIS->dphi[k*nx+j+index_x] = l*pHIS->cotK[j+index_x]*
          PhiL[l*current_chunk+index_x]-
          sqrtK[l+1]*PhiL[(l+1)*current_chunk+index_x];
      }
    }
    free(PhiL);
    return _SUCCESS_;
    );
  }
  class_finish_parallel();

  free(sqrtK);
  free(one_over_sqrtK);

  for (k=0; k<nl; k++){
    hyperspherical_get_xmin_from_approx(K,lvec[k],beta,0.,phiminabs,pHIS->chi_at_phimin+k,NULL);
  }

  //hyperspherical_get_xmin(pHIS,1.e-4,phiminabs,pHIS->chi_at_phimin);

  return _SUCCESS_;
}

// Assembly:
subq $0x4af8, %rsp           # imm = 0x4AF8
movl %edi, 0x4af0(%rsp)
movsd %xmm0, 0x4ae8(%rsp)
movl %esi, 0x4ae4(%rsp)
movq %rdx, 0x4ad8(%rsp)
movsd %xmm1, 0x4ad0(%rsp)
movsd %xmm2, 0x4ac8(%rsp)
movsd %xmm3, 0x4ac0(%rsp)
movl %ecx, 0x4abc(%rsp)
movsd %xmm4, 0x4ab0(%rsp)
movq %r8, 0x4aa8(%rsp)
movq %r9, 0x4aa0(%rsp)
movsd 0x4ae8(%rsp), %xmm0
mulsd 0x4ae8(%rsp), %xmm0
movsd %xmm0, 0x4a90(%rsp)
movq 0x4ad8(%rsp), %rax
movl 0x4ae4(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x4a4c(%rsp)
movsd 0x196b35(%rip), %xmm0   # 0x1d5488
divsd 0x4ae8(%rsp), %xmm0
movsd %xmm0, 0x4a88(%rsp)
movsd 0x4ac8(%rsp), %xmm0
subsd 0x4ad0(%rsp), %xmm0
mulsd 0x4ac0(%rsp), %xmm0
divsd 0x4a88(%rsp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x4a50(%rsp)
cmpl $0x2, 0x4a50(%rsp)
jge 0x3e9a9
movl $0x2, %eax
movl %eax, 0x18(%rsp)
jmp 0x3e9b4
movl 0x4a50(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x4a50(%rsp)
movsd 0x4ac8(%rsp), %xmm0
subsd 0x4ad0(%rsp), %xmm0
cvtsi2sdl 0x4a50(%rsp), %xmm1
movsd 0x193866(%rip), %xmm2   # 0x1d2248
subsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x4a98(%rsp)
movsd 0x4ae8(%rsp), %xmm0
movq 0x4aa8(%rsp), %rax
movsd %xmm0, 0x8(%rax)
movsd 0x4a98(%rsp), %xmm0
movq 0x4aa8(%rsp), %rax
movsd %xmm0, 0x10(%rax)
movl 0x4ae4(%rsp), %ecx
movq 0x4aa8(%rsp), %rax
movl %ecx, 0x1c(%rax)
movl 0x4a50(%rsp), %ecx
movq 0x4aa8(%rsp), %rax
movl %ecx, 0x30(%rax)
movl 0x4af0(%rsp), %ecx
movq 0x4aa8(%rsp), %rax
movl %ecx, (%rax)
movslq 0x4ae4(%rsp), %rdi
shlq $0x2, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x4aa8(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x4aa8(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x3eaf4
movslq 0x4ae4(%rsp), %rax
shlq $0x2, %rax
movl %eax, 0x4a3c(%rsp)
leaq 0x4230(%rsp), %rdi
movl 0x4a3c(%rsp), %ecx
leaq 0x193558(%rip), %rsi    # 0x1d2004
leaq 0x197714(%rip), %rdx    # 0x1d61c7
movb $0x0, %al
callq 0x5b9c0
movq 0x4aa0(%rsp), %rdi
leaq 0x4230(%rsp), %r8
leaq 0x193563(%rip), %rsi    # 0x1d2034
leaq 0x1976f7(%rip), %rdx    # 0x1d61cf
movl $0x32, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movslq 0x4ae4(%rsp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x4aa8(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x4aa8(%rsp), %rax
cmpq $0x0, 0x28(%rax)
jne 0x3eb94
movslq 0x4ae4(%rsp), %rax
shlq $0x3, %rax
movl %eax, 0x422c(%rsp)
leaq 0x3a20(%rsp), %rdi
movl 0x422c(%rsp), %ecx
leaq 0x1934b8(%rip), %rsi    # 0x1d2004
leaq 0x197696(%rip), %rdx    # 0x1d61e9
movb $0x0, %al
callq 0x5b9c0
movq 0x4aa0(%rsp), %rdi
leaq 0x3a20(%rsp), %r8
leaq 0x1934c3(%rip), %rsi    # 0x1d2034
leaq 0x197657(%rip), %rdx    # 0x1d61cf
movl $0x33, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movslq 0x4a50(%rsp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x4aa8(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x4aa8(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x3ec34
movslq 0x4a50(%rsp), %rax
shlq $0x3, %rax
movl %eax, 0x3a1c(%rsp)
leaq 0x3210(%rsp), %rdi
movl 0x3a1c(%rsp), %ecx
leaq 0x193418(%rip), %rsi    # 0x1d2004
leaq 0x19760a(%rip), %rdx    # 0x1d61fd
movb $0x0, %al
callq 0x5b9c0
movq 0x4aa0(%rsp), %rdi
leaq 0x3210(%rsp), %r8
leaq 0x193423(%rip), %rsi    # 0x1d2034
leaq 0x1975b7(%rip), %rdx    # 0x1d61cf
movl $0x34, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movslq 0x4a50(%rsp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x4aa8(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x4aa8(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x3ecd4
movslq 0x4a50(%rsp), %rax
shlq $0x3, %rax
movl %eax, 0x320c(%rsp)
leaq 0x2a00(%rsp), %rdi
movl 0x320c(%rsp), %ecx
leaq 0x193378(%rip), %rsi    # 0x1d2004
leaq 0x197572(%rip), %rdx    # 0x1d6205
movb $0x0, %al
callq 0x5b9c0
movq 0x4aa0(%rsp), %rdi
leaq 0x2a00(%rsp), %r8
leaq 0x193383(%rip), %rsi    # 0x1d2034
leaq 0x197517(%rip), %rdx    # 0x1d61cf
movl $0x35, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movslq 0x4a50(%rsp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x4aa8(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x4aa8(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x3ed74
movslq 0x4a50(%rsp), %rax
shlq $0x3, %rax
movl %eax, 0x29fc(%rsp)
leaq 0x21f0(%rsp), %rdi
movl 0x29fc(%rsp), %ecx
leaq 0x1932d8(%rip), %rsi    # 0x1d2004
leaq 0x1974dd(%rip), %rdx    # 0x1d6210
movb $0x0, %al
callq 0x5b9c0
movq 0x4aa0(%rsp), %rdi
leaq 0x21f0(%rsp), %r8
leaq 0x1932e3(%rip), %rsi    # 0x1d2034
leaq 0x197477(%rip), %rdx    # 0x1d61cf
movl $0x36, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movslq 0x4a50(%rsp), %rdi
shlq $0x3, %rdi
movslq 0x4ae4(%rsp), %rax
imulq %rax, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x4aa8(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x4aa8(%rsp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x3ee2c
movslq 0x4a50(%rsp), %rax
shlq $0x3, %rax
movslq 0x4ae4(%rsp), %rcx
imulq %rcx, %rax
movl %eax, 0x21ec(%rsp)
leaq 0x19e0(%rsp), %rdi
movl 0x21ec(%rsp), %ecx
leaq 0x193220(%rip), %rsi    # 0x1d2004
leaq 0x197430(%rip), %rdx    # 0x1d621b
movb $0x0, %al
callq 0x5b9c0
movq 0x4aa0(%rsp), %rdi
leaq 0x19e0(%rsp), %r8
leaq 0x19322b(%rip), %rsi    # 0x1d2034
leaq 0x1973bf(%rip), %rdx    # 0x1d61cf
movl $0x37, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movslq 0x4a50(%rsp), %rdi
shlq $0x3, %rdi
movslq 0x4ae4(%rsp), %rax
imulq %rax, %rdi
callq 0x8460
movq %rax, %rcx
movq 0x4aa8(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x4aa8(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jne 0x3eee4
movslq 0x4a50(%rsp), %rax
shlq $0x3, %rax
movslq 0x4ae4(%rsp), %rcx
imulq %rcx, %rax
movl %eax, 0x19dc(%rsp)
leaq 0x11d0(%rsp), %rdi
movl 0x19dc(%rsp), %ecx
leaq 0x193168(%rip), %rsi    # 0x1d2004
leaq 0x197382(%rip), %rdx    # 0x1d6225
movb $0x0, %al
callq 0x5b9c0
movq 0x4aa0(%rsp), %rdi
leaq 0x11d0(%rsp), %r8
leaq 0x193173(%rip), %rsi    # 0x1d2034
leaq 0x197307(%rip), %rdx    # 0x1d61cf
movl $0x38, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movsd 0x193d9c(%rip), %xmm1   # 0x1d2c88
mulsd 0x4a98(%rsp), %xmm1
mulsd 0x4a98(%rsp), %xmm1
movsd 0x19658a(%rip), %xmm0   # 0x1d5490
ucomisd %xmm1, %xmm0
jbe 0x3ef1d
movq 0x4aa8(%rsp), %rax
movl $0x1, 0x18(%rax)
jmp 0x3ef6f
movsd 0x4a98(%rsp), %xmm0
movl $0x4, %edi
callq 0x5b970
movaps %xmm0, %xmm1
movsd 0x194755(%rip), %xmm0   # 0x1d3690
divsd %xmm0, %xmm1
movsd 0x196549(%rip), %xmm0   # 0x1d5490
ucomisd %xmm1, %xmm0
jbe 0x3ef5e
movq 0x4aa8(%rsp), %rax
movl $0x3, 0x18(%rax)
jmp 0x3ef6d
movq 0x4aa8(%rsp), %rax
movl $0x5, 0x18(%rax)
jmp 0x3ef6f
movl $0x0, 0x4a5c(%rsp)
movl 0x4a5c(%rsp), %eax
cmpl 0x4ae4(%rsp), %eax
jge 0x3efc7
movq 0x4ad8(%rsp), %rax
movslq 0x4a5c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x4aa8(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x4a5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a5c(%rsp)
jmp 0x3ef7a
movl 0x4a4c(%rsp), %eax
addl $0x3, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x4a70(%rsp)
cmpq $0x0, 0x4a70(%rsp)
jne 0x3f065
movl 0x4a4c(%rsp), %eax
addl $0x3, %eax
cltq
shlq $0x3, %rax
movl %eax, 0x11cc(%rsp)
leaq 0x9c0(%rsp), %rdi
movl 0x11cc(%rsp), %ecx
leaq 0x192fe7(%rip), %rsi    # 0x1d2004
leaq 0x197215(%rip), %rdx    # 0x1d6239
movb $0x0, %al
callq 0x5b9c0
movq 0x4aa0(%rsp), %rdi
leaq 0x9c0(%rsp), %r8
leaq 0x192ff2(%rip), %rsi    # 0x1d2034
leaq 0x197186(%rip), %rdx    # 0x1d61cf
movl $0x47, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movl 0x4a4c(%rsp), %eax
addl $0x3, %eax
movslq %eax, %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, 0x4a68(%rsp)
cmpq $0x0, 0x4a68(%rsp)
jne 0x3f103
movl 0x4a4c(%rsp), %eax
addl $0x3, %eax
cltq
shlq $0x3, %rax
movl %eax, 0x9bc(%rsp)
leaq 0x1b0(%rsp), %rdi
movl 0x9bc(%rsp), %ecx
leaq 0x192f49(%rip), %rsi    # 0x1d2004
leaq 0x19716e(%rip), %rdx    # 0x1d6230
movb $0x0, %al
callq 0x5b9c0
movq 0x4aa0(%rsp), %rdi
leaq 0x1b0(%rsp), %r8
leaq 0x192f54(%rip), %rsi    # 0x1d2034
leaq 0x1970e8(%rip), %rdx    # 0x1d61cf
movl $0x48, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movl $0xfffffff6, 0x4a48(%rsp) # imm = 0xFFFFFFF6
movl $0xfffffff6, 0x1ac(%rsp) # imm = 0xFFFFFFF6
movl 0x4ae4(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x4a58(%rsp)
cmpl $0x0, 0x4a58(%rsp)
jl 0x3f191
movq 0x4ad8(%rsp), %rax
movslq 0x4a58(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x4a54(%rsp)
movl 0x4a54(%rsp), %eax
cmpl 0x4abc(%rsp), %eax
jge 0x3f17c
movl 0x4a54(%rsp), %eax
movl %eax, 0x4a48(%rsp)
movl 0x4a58(%rsp), %eax
movl %eax, 0x1ac(%rsp)
jmp 0x3f191
jmp 0x3f17e
movl 0x4a58(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x4a58(%rsp)
jmp 0x3f12a
movl 0x4af0(%rsp), %eax
movl %eax, 0x14(%rsp)
subl $-0x1, %eax
je 0x3f51c
jmp 0x3f1a7
movl 0x14(%rsp), %eax
testl %eax, %eax
je 0x3f1c3
jmp 0x3f1b1
movl 0x14(%rsp), %eax
subl $0x1, %eax
je 0x3f353
jmp 0x3f6e2
cvtsi2sdl 0x4a48(%rsp), %xmm0
cvtsi2sdl 0x4a48(%rsp), %xmm1
movsd 0x19306b(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x82e0
divsd 0x4ae8(%rsp), %xmm0
movsd %xmm0, 0x4a78(%rsp)
movl $0x0, 0x4a5c(%rsp)
movl 0x4a5c(%rsp), %eax
cmpl 0x4a50(%rsp), %eax
jge 0x3f2cb
movsd 0x4ad0(%rsp), %xmm1
cvtsi2sdl 0x4a5c(%rsp), %xmm0
movsd 0x4a98(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x4a80(%rsp)
movsd 0x4a80(%rsp), %xmm0
movq 0x4aa8(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x4a80(%rsp), %xmm0
movq 0x4aa8(%rsp), %rax
movq 0x40(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x192fb5(%rip), %xmm0   # 0x1d2248
divsd 0x4a80(%rsp), %xmm0
movq 0x4aa8(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x4a5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a5c(%rsp)
jmp 0x3f207
movl $0x0, 0x4a54(%rsp)
movl 0x4a54(%rsp), %eax
movl 0x4a4c(%rsp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jg 0x3f34e
movsd 0x4ae8(%rsp), %xmm0
movq 0x4a70(%rsp), %rax
movslq 0x4a54(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x4a70(%rsp), %rax
movslq 0x4a54(%rsp), %rcx
movsd 0x192f27(%rip), %xmm0   # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movq 0x4a68(%rsp), %rax
movslq 0x4a54(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x4a54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a54(%rsp)
jmp 0x3f2d6
jmp 0x3f6f2
cvtsi2sdl 0x4a48(%rsp), %xmm0
cvtsi2sdl 0x4a48(%rsp), %xmm1
movsd 0x192edb(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x82e0
divsd 0x4ae8(%rsp), %xmm0
callq 0x8590
movsd %xmm0, 0x4a78(%rsp)
movl $0x0, 0x4a5c(%rsp)
movl 0x4a5c(%rsp), %eax
cmpl 0x4a50(%rsp), %eax
jge 0x3f471
movsd 0x4ad0(%rsp), %xmm1
cvtsi2sdl 0x4a5c(%rsp), %xmm0
movsd 0x4a98(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x4a80(%rsp)
movsd 0x4a80(%rsp), %xmm0
movq 0x4aa8(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x4a80(%rsp), %xmm0
callq 0x80a0
movq 0x4aa8(%rsp), %rax
movq 0x40(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x4a80(%rsp), %xmm0
callq 0x8220
movaps %xmm0, %xmm1
movsd 0x192e0a(%rip), %xmm0   # 0x1d2248
divsd %xmm1, %xmm0
movq 0x4aa8(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x4a5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a5c(%rsp)
jmp 0x3f39c
movl $0x0, 0x4a54(%rsp)
movl 0x4a54(%rsp), %eax
movl 0x4a4c(%rsp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jg 0x3f517
movsd 0x4a90(%rsp), %xmm0
movl 0x4a54(%rsp), %eax
imull 0x4a54(%rsp), %eax
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
callq 0x82e0
movq 0x4a70(%rsp), %rax
movslq 0x4a54(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x4a70(%rsp), %rax
movslq 0x4a54(%rsp), %rcx
movsd 0x192d61(%rip), %xmm0   # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movq 0x4a68(%rsp), %rax
movslq 0x4a54(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x4a54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a54(%rsp)
jmp 0x3f47c
jmp 0x3f6f2
cvtsi2sdl 0x4a48(%rsp), %xmm0
cvtsi2sdl 0x4a48(%rsp), %xmm1
movsd 0x192d12(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
callq 0x82e0
divsd 0x4ae8(%rsp), %xmm0
callq 0x8480
movsd %xmm0, 0x4a78(%rsp)
movl $0x0, 0x4a5c(%rsp)
movl 0x4a5c(%rsp), %eax
cmpl 0x4a50(%rsp), %eax
jge 0x3f63a
movsd 0x4ad0(%rsp), %xmm1
cvtsi2sdl 0x4a5c(%rsp), %xmm0
movsd 0x4a98(%rsp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x4a80(%rsp)
movsd 0x4a80(%rsp), %xmm0
movq 0x4aa8(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x4a80(%rsp), %xmm0
callq 0x8390
movq 0x4aa8(%rsp), %rax
movq 0x40(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x4a80(%rsp), %xmm0
callq 0x80d0
movaps %xmm0, %xmm1
movsd 0x192c41(%rip), %xmm0   # 0x1d2248
divsd %xmm1, %xmm0
movq 0x4aa8(%rsp), %rax
movq 0x48(%rax), %rax
movslq 0x4a5c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x4a5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a5c(%rsp)
jmp 0x3f565
movl $0x0, 0x4a54(%rsp)
movl 0x4a54(%rsp), %eax
movl 0x4a4c(%rsp), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jg 0x3f6e0
movsd 0x4a90(%rsp), %xmm0
movl 0x4a54(%rsp), %eax
imull 0x4a54(%rsp), %eax
cvtsi2sd %eax, %xmm1
addsd %xmm1, %xmm0
callq 0x82e0
movq 0x4a70(%rsp), %rax
movslq 0x4a54(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x4a70(%rsp), %rax
movslq 0x4a54(%rsp), %rcx
movsd 0x192b98(%rip), %xmm0   # 0x1d2248
divsd (%rax,%rcx,8), %xmm0
movq 0x4a68(%rsp), %rax
movslq 0x4a54(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x4a54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a54(%rsp)
jmp 0x3f645
jmp 0x3f6f2
movl $0x1, 0x4af4(%rsp)
jmp 0x3fc16
movsd 0x4a78(%rsp), %xmm0
subsd 0x4ad0(%rsp), %xmm0
divsd 0x4a98(%rsp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x1a8(%rsp)
cmpl $0x0, 0x4af0(%rsp)
jne 0x3f72d
callq 0x2edc0
movl %eax, 0x10(%rsp)
jmp 0x3f738
movl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x3f738
movl 0x10(%rsp), %esi
leaq 0x168(%rsp), %rdi
callq 0x2ef50
leaq 0x150(%rsp), %rdi
callq 0x2f070
movl $0x0, 0x4a5c(%rsp)
movl 0x4a5c(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x4a50(%rsp), %eax
cmpl 0x1a8(%rsp), %eax
jge 0x3f789
movl 0x4a50(%rsp), %eax
movl %eax, 0x8(%rsp)
jmp 0x3f794
movl 0x1a8(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0xc(%rsp), %eax
movl 0x8(%rsp), %ecx
cmpl %ecx, %eax
jge 0x3f91e
movq 0x4a60(%rsp), %rax
movq %rax, 0xd0(%rsp)
movl 0x4a4c(%rsp), %eax
movl %eax, 0xd8(%rsp)
movq 0x4aa0(%rsp), %rax
movq %rax, 0xe0(%rsp)
movl 0x4af0(%rsp), %eax
movl %eax, 0xe8(%rsp)
movsd 0x4ae8(%rsp), %xmm0
movsd %xmm0, 0xf0(%rsp)
movl 0x4a48(%rsp), %eax
movl %eax, 0xf8(%rsp)
movq 0x4aa8(%rsp), %rax
movq %rax, 0x100(%rsp)
movl 0x4a5c(%rsp), %eax
movl %eax, 0x108(%rsp)
movq 0x4a70(%rsp), %rax
movq %rax, 0x110(%rsp)
movq 0x4a68(%rsp), %rax
movq %rax, 0x118(%rsp)
movl 0x4a58(%rsp), %eax
movl %eax, 0x120(%rsp)
movl 0x1ac(%rsp), %eax
movl %eax, 0x124(%rsp)
movl 0x4a54(%rsp), %eax
movl %eax, 0x128(%rsp)
movq 0x4ad8(%rsp), %rax
movq %rax, 0x130(%rsp)
movl 0x4a50(%rsp), %eax
movl %eax, 0x138(%rsp)
leaq 0x140(%rsp), %rdi
leaq 0x168(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0x3fc40
jmp 0x3f8a5
leaq 0x150(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x2f080
jmp 0x3f8bc
leaq 0x140(%rsp), %rdi
callq 0x2f0b0
movl 0x4a5c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a5c(%rsp)
jmp 0x3f761
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x3fbfa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x2f0b0
jmp 0x3fbfa
movl 0x1a8(%rsp), %eax
movl %eax, 0x4a5c(%rsp)
movl 0x4a5c(%rsp), %eax
cmpl 0x4a50(%rsp), %eax
jge 0x3fa9c
movl 0x4a44(%rsp), %eax
movl %eax, 0x40(%rsp)
movl 0x4a50(%rsp), %eax
movl %eax, 0x44(%rsp)
movl 0x4a5c(%rsp), %eax
movl %eax, 0x48(%rsp)
movq 0x4a60(%rsp), %rax
movq %rax, 0x50(%rsp)
movl 0x4a4c(%rsp), %eax
movl %eax, 0x58(%rsp)
movq 0x4aa0(%rsp), %rax
movq %rax, 0x60(%rsp)
movl 0x4af0(%rsp), %eax
movl %eax, 0x68(%rsp)
movsd 0x4ae8(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movl 0x4a58(%rsp), %eax
movl %eax, 0x78(%rsp)
movl 0x4a48(%rsp), %eax
movl %eax, 0x7c(%rsp)
movq 0x4aa8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x4a70(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x4a68(%rsp), %rax
movq %rax, 0x90(%rsp)
movl 0x1ac(%rsp), %eax
movl %eax, 0x98(%rsp)
movl 0x4a54(%rsp), %eax
movl %eax, 0x9c(%rsp)
movq 0x4ad8(%rsp), %rax
movq %rax, 0xa0(%rsp)
movl 0x4a40(%rsp), %eax
movl %eax, 0xa8(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x168(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x3fe00
jmp 0x3fa3c
leaq 0x150(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x2f080
jmp 0x3fa53
leaq 0xb0(%rsp), %rdi
callq 0x2f0b0
movl 0x4a5c(%rsp), %eax
addl $0x10, %eax
movl %eax, 0x4a5c(%rsp)
jmp 0x3f92c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x2f0b0
jmp 0x3fbfa
leaq 0x150(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2f0c0
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x2f0f0
movq %rax, 0x28(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x2f120
testb $0x1, %al
jne 0x3fadc
jmp 0x3fb2a
leaq 0x30(%rsp), %rdi
callq 0x2f160
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x2f170
movl %eax, 0x4(%rsp)
jmp 0x3fafb
movl 0x4(%rsp), %eax
cmpl $0x0, %eax
je 0x3fb1c
movl $0x1, 0x4af4(%rsp)
movl $0x1, 0x1c(%rsp)
jmp 0x3fbde
jmp 0x3fb1e
leaq 0x30(%rsp), %rdi
callq 0x2f1f0
jmp 0x3fac7
leaq 0x150(%rsp), %rdi
callq 0x2f210
movq 0x4a70(%rsp), %rdi
callq 0x8420
movq 0x4a68(%rsp), %rdi
callq 0x8420
movl $0x0, 0x4a58(%rsp)
movl 0x4a58(%rsp), %eax
cmpl 0x4ae4(%rsp), %eax
jge 0x3fbcb
movl 0x4af0(%rsp), %edi
movq 0x4ad8(%rsp), %rax
movslq 0x4a58(%rsp), %rcx
movl (%rax,%rcx,4), %esi
movsd 0x4ae8(%rsp), %xmm0
movsd 0x4ab0(%rsp), %xmm2
movq 0x4aa8(%rsp), %rax
movq 0x28(%rax), %rax
leaq (%rax,%rcx,8), %rdx
xorl %eax, %eax
movl %eax, %ecx
xorps %xmm1, %xmm1
callq 0x3ffc0
jmp 0x3fbb6
jmp 0x3fbb8
movl 0x4a58(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4a58(%rsp)
jmp 0x3fb5c
movl $0x0, 0x4af4(%rsp)
movl $0x1, 0x1c(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x2f230
leaq 0x168(%rsp), %rdi
callq 0x2f290
jmp 0x3fc16
leaq 0x150(%rsp), %rdi
callq 0x2f230
leaq 0x168(%rsp), %rdi
callq 0x2f290
jmp 0x3fc25
movl 0x4af4(%rsp), %eax
addq $0x4af8, %rsp           # imm = 0x4AF8
retq
movq 0xc8(%rsp), %rdi
callq 0x8640
nopw %cs:(%rax,%rax)