// File: /workspace/github_c_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x908, %rsp            # imm = 0x908
movq %r9, %r12
movq %r8, %r14
movsd %xmm4, 0xf8(%rsp)
movl %ecx, %ebp
movsd 0xc8592(%rip), %xmm4    # 0xe83e8
divsd %xmm0, %xmm4
movsd %xmm1, 0x18(%rsp)
subsd %xmm1, %xmm2
mulsd %xmm2, %xmm3
divsd %xmm4, %xmm3
cvttsd2si %xmm3, %eax
cmpl $0x3, %eax
pushq $0x2
popq %rcx
cmovgel %eax, %ecx
movslq %esi, %r13
leal -0x1(%rcx), %eax
cvtsi2sd %eax, %xmm1
movq %rdx, 0x68(%rsp)
movl -0x4(%rdx,%r13,4), %eax
movl %eax, 0x74(%rsp)
divsd %xmm1, %xmm2
movsd %xmm0, 0x38(%rsp)
movsd %xmm0, 0x8(%r8)
movsd %xmm2, 0x28(%rsp)
movsd %xmm2, 0x10(%r8)
movq %rsi, %rbx
movl %esi, 0x1c(%r8)
movq %rcx, 0x98(%rsp)
movl %ecx, 0x30(%r8)
movl %edi, 0xc(%rsp)
movl %edi, (%r8)
leaq (,%r13,4), %r15
movq %r15, %rdi
callq 0x8490
movq %rax, 0x20(%r14)
pushq $0x1
popq %rcx
movq %rcx, 0x20(%rsp)
testq %rax, %rax
je 0x1ffc3
leaq (,%r13,8), %r15
movq %r15, %rdi
callq 0x8490
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0x1fff8
movl %ebp, %r15d
movq %r12, 0x30(%rsp)
movl 0x98(%rsp), %r12d
leaq (,%r12,8), %rbp
movq %rbp, %rdi
callq 0x8490
movq %rax, 0x38(%r14)
testq %rax, %rax
je 0x20034
movq %rbp, %rdi
callq 0x8490
movq %rax, 0x40(%r14)
testq %rax, %rax
je 0x2006b
movq %rbp, %rdi
callq 0x8490
movq %rax, 0x48(%r14)
testq %rax, %rax
je 0x200a2
imulq %r13, %rbp
movq %rbp, %rdi
callq 0x8490
movq %rax, 0x50(%r14)
testq %rax, %rax
je 0x200d9
movq %rbp, %rdi
callq 0x8490
movq %rax, 0x58(%r14)
testq %rax, %rax
je 0x20110
movsd 0xc5d1a(%rip), %xmm1    # 0xe5cb0
movsd 0x28(%rsp), %xmm0
mulsd %xmm0, %xmm1
mulsd %xmm0, %xmm1
movsd 0xc8444(%rip), %xmm2    # 0xe83f0
ucomisd %xmm1, %xmm2
jbe 0x20147
movl $0x1, 0x18(%r14)
jmp 0x2017c
leaq 0xc503a(%rip), %rsi     # 0xe5004
leaq 0xc90b5(%rip), %rdx     # 0xe9086
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xc5047(%rip), %rsi     # 0xe5034
leaq 0xc909a(%rip), %rdx     # 0xe908e
pushq $0x32
jmp 0x2002b
leaq 0xc5005(%rip), %rsi     # 0xe5004
leaq 0xc90a2(%rip), %rdx     # 0xe90a8
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xc5012(%rip), %rsi     # 0xe5034
leaq 0xc9065(%rip), %rdx     # 0xe908e
pushq $0x33
popq %rcx
movq %r12, %rdi
jmp 0x20293
leaq 0xc4fc9(%rip), %rsi     # 0xe5004
leaq 0xc907a(%rip), %rdx     # 0xe90bc
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xc4fd7(%rip), %rsi     # 0xe5034
leaq 0xc902a(%rip), %rdx     # 0xe908e
pushq $0x34
jmp 0x2028d
leaq 0xc4f92(%rip), %rsi     # 0xe5004
leaq 0xc904b(%rip), %rdx     # 0xe90c4
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xc4fa0(%rip), %rsi     # 0xe5034
leaq 0xc8ff3(%rip), %rdx     # 0xe908e
pushq $0x35
jmp 0x2028d
leaq 0xc4f5b(%rip), %rsi     # 0xe5004
leaq 0xc901f(%rip), %rdx     # 0xe90cf
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xc4f69(%rip), %rsi     # 0xe5034
leaq 0xc8fbc(%rip), %rdx     # 0xe908e
pushq $0x36
jmp 0x2028d
leaq 0xc4f24(%rip), %rsi     # 0xe5004
leaq 0xc8ff3(%rip), %rdx     # 0xe90da
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xc4f32(%rip), %rsi     # 0xe5034
leaq 0xc8f85(%rip), %rdx     # 0xe908e
pushq $0x37
jmp 0x2028d
leaq 0xc4eed(%rip), %rsi     # 0xe5004
leaq 0xc8fc6(%rip), %rdx     # 0xe90e4
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xc4efb(%rip), %rsi     # 0xe5034
leaq 0xc8f4e(%rip), %rdx     # 0xe908e
pushq $0x38
jmp 0x2028d
movsd 0xc82a9(%rip), %xmm1    # 0xe83f8
callq 0x8650
divsd 0xc656c(%rip), %xmm0    # 0xe66c8
movsd 0xc828c(%rip), %xmm1    # 0xe83f0
ucomisd %xmm0, %xmm1
jbe 0x20174
movl $0x3, 0x18(%r14)
jmp 0x2017c
movl $0x5, 0x18(%r14)
movq 0x68(%rsp), %rsi
movsd 0x38(%rsp), %xmm0
mulsd %xmm0, %xmm0
leal -0x1(%rbx), %eax
movl %eax, 0x14(%rsp)
movslq 0x74(%rsp), %rbp
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
cmpq %rax, %rbx
je 0x201b2
movl (%rsi,%rax,4), %ecx
movq 0x20(%r14), %rdx
movl %ecx, (%rdx,%rax,4)
incq %rax
jmp 0x2019e
movsd %xmm0, 0x78(%rsp)
movq %rbx, 0xf0(%rsp)
leaq 0x18(,%rbp,8), %r13
movq %r13, %rdi
callq 0x8490
movq %rax, 0x88(%rsp)
testq %rax, %rax
je 0x20225
movq %r13, %rdi
callq 0x8490
movq %rax, 0x80(%rsp)
testq %rax, %rax
je 0x2025a
movl 0x14(%rsp), %edx
cmpl $-0x1, %edx
pushq $-0x1
popq %rax
cmovll %edx, %eax
movl %eax, 0x70(%rsp)
pushq $-0xa
popq %rsi
movq 0x68(%rsp), %rcx
testl %edx, %edx
js 0x202b4
movl %edx, %eax
movl (%rcx,%rax,4), %eax
cmpl %r15d, %eax
jl 0x202b8
decl %edx
jmp 0x2020b
leaq 0xc4dd8(%rip), %rsi     # 0xe5004
leaq 0xc8ec5(%rip), %rdx     # 0xe90f8
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xc4de5(%rip), %rsi     # 0xe5034
leaq 0xc8e38(%rip), %rdx     # 0xe908e
pushq $0x47
jmp 0x2028d
leaq 0xc4da3(%rip), %rsi     # 0xe5004
leaq 0xc8e87(%rip), %rdx     # 0xe90ef
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2e014
leaq 0xc4db0(%rip), %rsi     # 0xe5034
leaq 0xc8e03(%rip), %rdx     # 0xe908e
pushq $0x48
popq %rcx
movq 0x30(%rsp), %rdi
movq %rbx, %r8
xorl %eax, %eax
callq 0x2e014
movq 0x20(%rsp), %rax
addq $0x908, %rsp            # imm = 0x908
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %edx
jmp 0x202be
movl %edx, 0x70(%rsp)
movl %eax, %esi
cvtsi2sd %esi, %xmm1
movl 0xc(%rsp), %eax
cmpl $-0x1, %eax
je 0x2032b
cmpl $0x1, %eax
je 0x20303
testl %eax, %eax
jne 0x2029d
movsd 0xc4f84(%rip), %xmm0    # 0xe5260
addsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movl %edx, 0x14(%rsp)
movl %esi, 0x44(%rsp)
jb 0x20523
sqrtsd %xmm0, %xmm0
jmp 0x20528
movsd 0xc4f55(%rip), %xmm0    # 0xe5260
addsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movl %edx, 0x14(%rsp)
movl %esi, 0x44(%rsp)
jb 0x2035a
sqrtsd %xmm0, %xmm0
jmp 0x2035f
movsd 0xc4f2d(%rip), %xmm0    # 0xe5260
addsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movl %edx, 0x14(%rsp)
movl %esi, 0x44(%rsp)
jb 0x20446
sqrtsd %xmm0, %xmm0
jmp 0x2044b
callq 0x82d0
divsd 0x38(%rsp), %xmm0
callq 0x85d0
movsd %xmm0, 0x90(%rsp)
xorl %ebx, %ebx
cmpq %rbx, %r12
movsd 0x28(%rsp), %xmm3
je 0x203d0
cvtsi2sd %ebx, %xmm0
mulsd %xmm3, %xmm0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x38(%r14), %rax
movsd %xmm0, (%rax,%rbx,8)
callq 0x80a0
movq 0x40(%r14), %rax
movsd %xmm0, (%rax,%rbx,8)
movsd 0x20(%rsp), %xmm0
callq 0x8230
movsd 0xc4ea2(%rip), %xmm1    # 0xe5260
divsd %xmm0, %xmm1
movq 0x48(%r14), %rax
movsd %xmm1, (%rax,%rbx,8)
incq %rbx
jmp 0x20375
addq $0x2, %rbp
xorl %ebx, %ebx
xorpd %xmm4, %xmm4
movsd 0x78(%rsp), %xmm2
cmpq %rbp, %rbx
jg 0x20511
movl %ebx, %eax
imull %ebx, %eax
cvtsi2sd %eax, %xmm1
movapd %xmm2, %xmm0
subsd %xmm1, %xmm0
ucomisd %xmm4, %xmm0
jb 0x20406
sqrtsd %xmm0, %xmm0
jmp 0x2041b
callq 0x82d0
xorpd %xmm4, %xmm4
movsd 0x78(%rsp), %xmm2
movsd 0x28(%rsp), %xmm3
movq 0x88(%rsp), %rax
movsd %xmm0, (%rax,%rbx,8)
movsd 0xc4e30(%rip), %xmm1    # 0xe5260
divsd %xmm0, %xmm1
movq 0x80(%rsp), %rax
movsd %xmm1, (%rax,%rbx,8)
incq %rbx
jmp 0x203e0
callq 0x82d0
divsd 0x38(%rsp), %xmm0
callq 0x84a0
movsd %xmm0, 0x90(%rsp)
xorl %ebx, %ebx
movsd 0xc4df7(%rip), %xmm4    # 0xe5260
cmpq %rbx, %r12
movsd 0x28(%rsp), %xmm3
je 0x204c8
cvtsi2sd %ebx, %xmm0
mulsd %xmm3, %xmm0
addsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movq 0x38(%r14), %rax
movsd %xmm0, (%rax,%rbx,8)
callq 0x8390
movq 0x40(%r14), %rax
movsd %xmm0, (%rax,%rbx,8)
movsd 0x20(%rsp), %xmm0
callq 0x80d0
movsd 0xc4dae(%rip), %xmm4    # 0xe5260
movapd %xmm4, %xmm1
divsd %xmm0, %xmm1
movq 0x48(%r14), %rax
movsd %xmm1, (%rax,%rbx,8)
incq %rbx
jmp 0x20469
addq $0x2, %rbp
xorl %ebx, %ebx
movsd 0x78(%rsp), %xmm2
cmpq %rbp, %rbx
jg 0x20511
movl %ebx, %eax
imull %ebx, %eax
cvtsi2sd %eax, %xmm0
addsd %xmm2, %xmm0
sqrtsd %xmm0, %xmm0
movq 0x88(%rsp), %rax
movsd %xmm0, (%rax,%rbx,8)
movapd %xmm4, %xmm1
divsd %xmm0, %xmm1
movq 0x80(%rsp), %rax
movsd %xmm1, (%rax,%rbx,8)
incq %rbx
jmp 0x204d4
movl 0xc(%rsp), %eax
movsd 0x90(%rsp), %xmm0
jmp 0x205b3
callq 0x82d0
movsd 0x28(%rsp), %xmm3
movq 0x38(%r14), %rax
movq 0x40(%r14), %rcx
movq 0x48(%r14), %rdx
xorl %esi, %esi
movsd 0xc4d1c(%rip), %xmm4    # 0xe5260
cmpq %rsi, %r12
je 0x20573
cvtsi2sd %esi, %xmm1
mulsd %xmm3, %xmm1
addsd 0x18(%rsp), %xmm1
movsd %xmm1, (%rax,%rsi,8)
movsd %xmm1, (%rcx,%rsi,8)
movapd %xmm4, %xmm2
divsd %xmm1, %xmm2
movsd %xmm2, (%rdx,%rsi,8)
incq %rsi
jmp 0x20544
addq $0x2, %rbp
divsd 0x38(%rsp), %xmm4
xorl %ebx, %ebx
movl 0xc(%rsp), %eax
movsd 0x38(%rsp), %xmm1
cmpq %rbp, %rbx
jg 0x205ad
movq 0x88(%rsp), %rcx
movsd %xmm1, (%rcx,%rbx,8)
movq 0x80(%rsp), %rcx
movsd %xmm4, (%rcx,%rbx,8)
incq %rbx
jmp 0x20589
divsd 0x38(%rsp), %xmm0
movq %rbx, 0x78(%rsp)
subsd 0x18(%rsp), %xmm0
divsd %xmm3, %xmm0
cvttsd2si %xmm0, %ebx
pushq $0x1
popq %rsi
testl %eax, %eax
jne 0x205d4
callq 0x1a2a0
movl %eax, %esi
leaq 0x100(%rsp), %rdi
callq 0x1a33e
leaq 0xd0(%rsp), %rax
andq $0x0, 0x10(%rax)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rax)
movq 0x98(%rsp), %rax
cmpl %ebx, %eax
movl %ebx, 0x18(%rsp)
cmovll %eax, %ebx
xorl %ecx, %ecx
testl %ebx, %ebx
cmovlel %ecx, %ebx
movl %ebx, 0x90(%rsp)
leaq 0xb(%rsp), %rbx
leaq 0x120bff(%rip), %rax    # 0x141220
addq $0x10, %rax
movq %rax, 0x28(%rsp)
leaq 0x58(%rsp), %r13
cmpl 0x90(%rsp), %ecx
je 0x208d8
movl %ecx, 0x20(%rsp)
andq $0x0, 0xa0(%rsp)
movq %rbx, %rdi
pushq $0x1
popq %rsi
callq 0x1b0f6
movq %rax, %rbp
movq %rbx, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
movabsq $0x100000001, %r15      # imm = 0x100000001
movq %r15, 0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, (%rbp)
movl $0xa8, %edi
callq 0x83d0
movq %rax, %rbx
leaq 0x13(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %rbx, 0x60(%rsp)
movq %r15, 0x8(%rbx)
leaq 0x120dd3(%rip), %rax    # 0x141478
movq %rax, (%rbx)
movq %rbx, %r15
addq $0x10, %r15
movq %r15, %rdi
leaq 0x12(%rsp), %rsi
callq 0x1b18a
movq %rbp, %r12
addq $0x10, %r12
leaq 0x120dfe(%rip), %rax    # 0x1414c8
movq %rax, 0x10(%rbx)
movl 0x74(%rsp), %eax
movl %eax, 0x40(%rbx)
movq 0x30(%rsp), %rax
movq %rax, 0x48(%rbx)
movl 0xc(%rsp), %eax
movl %eax, 0x50(%rbx)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x58(%rbx)
movl 0x44(%rsp), %eax
movl %eax, 0x60(%rbx)
movq %r14, 0x68(%rbx)
movl 0x20(%rsp), %eax
movl %eax, 0x70(%rbx)
movq 0x88(%rsp), %rax
movq %rax, 0x78(%rbx)
movq 0x80(%rsp), %rax
movq %rax, 0x80(%rbx)
movl 0x70(%rsp), %eax
movl %eax, 0x88(%rbx)
movl 0x14(%rsp), %eax
movl %eax, 0x8c(%rbx)
movq 0x78(%rsp), %rax
movl %eax, 0x90(%rbx)
movq 0x68(%rsp), %rax
movq %rax, 0x98(%rbx)
movq 0x98(%rsp), %rax
movl %eax, 0xa0(%rbx)
andq $0x0, 0x60(%rsp)
movq %r13, %rdi
callq 0x2d10c
movq %r15, 0x10(%rbp)
andq $0x0, 0x50(%rsp)
movq %rbx, 0x18(%rbp)
andq $0x0, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x1afb0
andq $0x0, 0xc8(%rsp)
movq %rbp, 0xa8(%rsp)
movq %r12, 0xa0(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x1b0e8
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x1b09c
leaq 0x48(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1b986
pushq $0x1
popq %rax
movl %eax, %ebx
lock
xaddl %ebx, 0x120(%rsp)
xorl %r12d, %r12d
movl 0x100(%rsp), %ecx
cmpl %ecx, %r12d
jae 0x20825
leal (%rbx,%r12), %eax
xorl %edx, %edx
divl %ecx
movq 0x128(%rsp), %r15
imulq $0xb0, %rdx, %rbp
leaq (%r15,%rbp), %rdi
addq $0x58, %rdi
movq %rdi, 0x58(%rsp)
callq 0x1add8
movb %al, 0x60(%rsp)
testb %al, %al
jne 0x2086b
movq %r13, %rdi
callq 0x1adc2
incl %r12d
jmp 0x207db
movl %ebx, %eax
xorl %edx, %edx
divl %ecx
movq 0x128(%rsp), %rbx
imulq $0xb0, %rdx, %r15
leaq (%rbx,%r15), %rsi
addq $0x58, %rsi
movq %r13, %rdi
callq 0x1ae48
addq %r15, %rbx
movq %rbx, %rdi
leaq 0x48(%rsp), %rsi
callq 0x2d694
movq %r13, %rdi
callq 0x1adc2
subq $-0x80, %rbx
movq %rbx, %rdi
jmp 0x2088a
addq %rbp, %r15
movq %r15, %rdi
leaq 0x48(%rsp), %rsi
callq 0x2d694
movq %r13, %rdi
callq 0x1adc2
subq $-0x80, %r15
movq %r15, %rdi
callq 0x81e0
leaq 0x50(%rsp), %rdi
callq 0x1afb0
leaq 0xb(%rsp), %rbx
leaq 0xa8(%rsp), %rdi
callq 0x1afb0
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x1bb4a
leaq 0xb8(%rsp), %rdi
callq 0x1afb0
movl 0x20(%rsp), %ecx
incl %ecx
jmp 0x2062f
leaq 0x58(%rsp), %rbx
pushq $0x1
popq %rax
movq %rax, 0x20(%rsp)
movl 0x18(%rsp), %ebp
movabsq $0x100000001, %r12      # imm = 0x100000001
cmpl 0x98(%rsp), %ebp
jge 0x20bc2
movl %ebp, 0x18(%rsp)
andq $0x0, 0xa0(%rsp)
leaq 0xb(%rsp), %r15
movq %r15, %rdi
pushq $0x1
popq %rsi
callq 0x1b0f6
movq %rax, %rbp
movq %r15, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
movq %r12, 0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, (%rbp)
movl $0xa8, %edi
callq 0x83d0
movq %rax, %r13
leaq 0x13(%rsp), %rax
movq %rax, 0x58(%rsp)
movq %r13, 0x60(%rsp)
movq %r12, 0x8(%r13)
leaq 0x120bf4(%rip), %rax    # 0x141558
movq %rax, (%r13)
movq %r13, %r15
addq $0x10, %r15
movq %r15, %rdi
leaq 0x12(%rsp), %rsi
callq 0x1b18a
movq %rbp, %r12
addq $0x10, %r12
leaq 0x120c1e(%rip), %rax    # 0x1415a8
movq %rax, 0x10(%r13)
movq 0x98(%rsp), %rax
movl %eax, 0x3c(%r13)
movl 0x18(%rsp), %eax
movl %eax, 0x40(%r13)
movl 0x74(%rsp), %eax
movl %eax, 0x50(%r13)
movq 0x30(%rsp), %rax
movq %rax, 0x58(%r13)
movl 0xc(%rsp), %eax
movl %eax, 0x60(%r13)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x68(%r13)
movl 0x70(%rsp), %eax
movl %eax, 0x70(%r13)
movl 0x44(%rsp), %eax
movl %eax, 0x74(%r13)
movq %r14, 0x78(%r13)
movq 0x88(%rsp), %rax
movq %rax, 0x80(%r13)
movq 0x80(%rsp), %rax
movq %rax, 0x88(%r13)
movl 0x14(%rsp), %eax
movl %eax, 0x90(%r13)
movq 0x78(%rsp), %rax
movl %eax, 0x94(%r13)
movq 0x68(%rsp), %rax
movq %rax, 0x98(%r13)
andq $0x0, 0x60(%rsp)
movq %rbx, %rdi
callq 0x2d842
movq %r15, 0x10(%rbp)
andq $0x0, 0x50(%rsp)
movq %r13, 0x18(%rbp)
andq $0x0, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x1afb0
andq $0x0, 0xc8(%rsp)
movq %rbp, 0xa8(%rsp)
movq %r12, 0xa0(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x1b0e8
leaq 0xb0(%rsp), %rdi
movq %r12, %rsi
callq 0x1b09c
leaq 0x48(%rsp), %rdi
leaq 0xa0(%rsp), %rsi
callq 0x1b986
pushq $0x1
popq %r13
lock
xaddl %r13d, 0x120(%rsp)
xorl %r12d, %r12d
movl 0x100(%rsp), %ecx
cmpl %ecx, %r12d
jae 0x20aeb
leal (%r12,%r13), %eax
xorl %edx, %edx
divl %ecx
movq 0x128(%rsp), %r15
imulq $0xb0, %rdx, %rbp
leaq (%r15,%rbp), %rdi
addq $0x58, %rdi
movq %rdi, 0x58(%rsp)
callq 0x1add8
movb %al, 0x60(%rsp)
testb %al, %al
jne 0x20b4f
movq %rbx, %rdi
callq 0x1adc2
incl %r12d
jmp 0x20aa1
movl %r13d, %eax
xorl %edx, %edx
divl %ecx
movq 0x128(%rsp), %r15
imulq $0xb0, %rdx, %r12
leaq (%r15,%r12), %rsi
addq $0x58, %rsi
movq %rbx, %rdi
callq 0x1ae48
addq %r12, %r15
movq %r15, %rdi
leaq 0x48(%rsp), %rsi
callq 0x2de66
movl 0x18(%rsp), %ebp
movabsq $0x100000001, %r12      # imm = 0x100000001
movq %rbx, %rdi
callq 0x1adc2
subq $-0x80, %r15
movq %r15, %rdi
callq 0x81e0
leaq 0x50(%rsp), %rdi
callq 0x1afb0
jmp 0x20b8b
addq %rbp, %r15
movq %r15, %rdi
leaq 0x48(%rsp), %rsi
callq 0x2de66
movq %rbx, %rdi
callq 0x1adc2
subq $-0x80, %r15
movq %r15, %rdi
callq 0x81e0
leaq 0x50(%rsp), %rdi
callq 0x1afb0
movl 0x18(%rsp), %ebp
movabsq $0x100000001, %r12      # imm = 0x100000001
leaq 0xa8(%rsp), %rdi
callq 0x1afb0
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x1bb4a
leaq 0xb8(%rsp), %rdi
callq 0x1afb0
addl $0x10, %ebp
jmp 0x208f3
movq 0xd0(%rsp), %rbx
movq 0xd8(%rsp), %r15
cmpq %r15, %rbx
je 0x20c06
movq %rbx, %rdi
callq 0x1a3be
addq $0x10, %rbx
testl %eax, %eax
je 0x20bd2
leaq 0xd0(%rsp), %rdi
callq 0x1a3f8
leaq 0x100(%rsp), %rdi
callq 0x1a41a
jmp 0x2029d
leaq 0xd0(%rsp), %rdi
callq 0x1a3f0
movq 0x88(%rsp), %rdi
callq 0x8430
movq 0x80(%rsp), %rdi
callq 0x8430
movq 0xf0(%rsp), %rcx
shlq $0x3, %rcx
movq $0x0, 0x20(%rsp)
xorl %ebx, %ebx
movq 0x68(%rsp), %rax
cmpq %rbx, %rcx
je 0x20be7
movq %rax, %r15
movl (%rax), %esi
movq 0x28(%r14), %rdx
addq %rbx, %rdx
movq %rcx, %r12
movl 0xc(%rsp), %edi
movsd 0x38(%rsp), %xmm0
movsd 0xf8(%rsp), %xmm2
callq 0x20d36
movq %r12, %rcx
movq %r15, %rax
addq $0x8, %rbx
addq $0x4, %rax
jmp 0x20c49
jmp 0x20c8f
jmp 0x20c8f
jmp 0x20cf0
jmp 0x20c8f
jmp 0x20c9e
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x1adc2
jmp 0x20ca1
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x1afb0
leaq 0xb8(%rsp), %rdi
callq 0x1afb0
jmp 0x20cd4
jmp 0x20cd1
jmp 0x20cf5
jmp 0x20cf0
jmp 0x20cde
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x2d842
jmp 0x20d07
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
jmp 0x20ce9
movq %rax, %rbx
leaq 0xb8(%rsp), %rdi
callq 0x1afb0
jmp 0x20d14
movq %rax, %rbx
jmp 0x20d14
movq %rax, %rbx
jmp 0x20d07
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x2d10c
leaq 0xc0(%rsp), %rdi
callq 0x1b0e8
leaq 0xd0(%rsp), %rdi
callq 0x1a3f8
leaq 0x100(%rsp), %rdi
callq 0x1a41a
movq %rbx, %rdi
callq 0x8680