// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../tools/quadrature.c
// Function: get_qsampling
int get_qsampling(double *x,
		  double *w,
		  int *N,
		  int N_max,
		  double rtol,
		  double *qvec,
		  int qsiz,
		  int (*test)(void * params_for_function, double q, double *psi),
		  int (*function)(void * params_for_function, double q, double *f0),
		  void * params_for_function,
		  ErrorMsg errmsg) {

  /* This routine returns the fewest possible number of abscissas and weights under
     the requirement that a test function folded with the neutrino distribution function
     can be integrated to an accuracy of rtol. If the distribution function is Fermi-Dirac
     or close, a Laguerre quadrature formula is often the best choice.

     This function combines two completely different strategies: Adaptive Gauss-Kronrod
     quadrature and Laguerres quadrature formula. */

  int i, NL=2,NR,level,Nadapt=0,NLag,NLag_max,Nold=NL;
  int adapt_converging=_FALSE_,Laguerre_converging=_FALSE_,combined_converging=_FALSE_;
  double y,y1,y2,I,Igk,err,ILag,*b,*c;
  qss_node *root,*root_comb;
  double I_comb,I_atzero,I_atinf,I_comb2;
  int N_comb=0,N_comb_lag=16,N_comb_leg=4;
  double a_comb,b_comb;
  double q_leg[4],w_leg[4];
  double q_lag[N_comb_lag],w_lag[N_comb_lag];
  char method_chosen[40];
  double qmin=0., qmax=0., qmaxm1=0.;
  double *wcomb2=NULL,delq;
  double Itot=0.0;
  int zeroskip=0;

  /* Set roots and weights for Gauss-Legendre 4 point rule: */
  q_leg[3] = sqrt((3.0+2.0*sqrt(6.0/5.0))/7.0);
  q_leg[2] = sqrt((3.0-2.0*sqrt(6.0/5.0))/7.0);
  q_leg[1] = -q_leg[2];
  q_leg[0] = -q_leg[3];
  w_leg[3] = (18.0-sqrt(30.0))/36.0;
  w_leg[2] = (18.0+sqrt(30.0))/36.0;
  w_leg[1] = w_leg[2];
  w_leg[0] = w_leg[3];

  /* Allocate storage for Laguerre coefficients: */
  class_alloc(b,N_max*sizeof(double),errmsg);
  class_alloc(c,N_max*sizeof(double),errmsg);
  /* If a vector of q values has been passed, use it: */
  if ((qvec!=NULL)&&(qsiz>1)){
    qmin = qvec[0];
    qmax = qvec[qsiz-1];
    qmaxm1 = qvec[qsiz-2];
  }
  else{
    qvec = NULL;
  }

  /* First do the adaptive quadrature - this will also give the value of the integral: */
  gk_adapt(&root,(*test),(*function), params_for_function,
	   rtol*1e-4, 1, 0.0, 1.0, _TRUE_, errmsg);
  /* Do a leaf count: */
  leaf_count(root);
  /* I can get the integral now: */
  I = get_integral(root, 1);
  //printf("I = %le |%le, used points: %d\n",I,I-1.0,15*root->leaf_childs);
  Itot += I;

  /* Starting from the top, move down in levels until tolerance is met: */
  for(level=root->leaf_childs; level>=1; level--){
    Igk = get_integral(root,level);
    err = I-Igk;
    if (fabs(err/Itot)<rtol) break;
  }
  if (level>0){
    /* Reduce tree to the found level:*/
    reduce_tree(root,level);
    /* Count the new leafs: */
    leaf_count(root);
    /* I know know how many function evaluations is
       required by the adaptively sampled grid:*/
    Nadapt = 15*root->leaf_childs;
    /* The adaptive routine could not recieve required precision
       using less than the required maximal number of points.*/
    if (Nadapt <= N_max) adapt_converging = _TRUE_;
  }


  /* Combined adaptive quadrature and Laguerre rescaled quadrature: */
  if(qvec!=NULL){
    /* Evaluate [0;qmin] using 4 point Gauss-Legendre rule: */
    (*function)(params_for_function,qmin,&y2);
    for(i=0,I_atzero=0.0; i<N_comb_leg; i++){
      q_leg[i] = 0.5*qmin*(1.0+q_leg[i]);
      w_leg[i] = w_leg[i]*0.5*qmin*y2;
      (*test)(params_for_function,q_leg[i],&y);
      I_atzero +=w_leg[i]*y;
    }

    /* Find asymptotic extrapolation:*/
    (*function)(params_for_function,qmaxm1,&y1);
    (*function)(params_for_function,qmax,&y2);

    b_comb = (y1/y2-1.0)/(qmax-qmaxm1);
    b_comb = MAX(b_comb,1e-100);
    //c_comb = -b_comb*qmax;
    a_comb = y2*exp(b_comb*qmax);
    // printf("f(q) = %g*exp(-%g*q) \n",a_comb,b_comb);
    //(*function)(params_for_function,100,&y2);
    //printf("f(100) = %e ?= %e\n",y2,a_comb*exp(-b_comb*100));

    /* Evaluate tail using 6 point Laguerre: */
    compute_Laguerre(q_lag,w_lag,N_comb_lag,0.0,b,c,_TRUE_);
    for (i=0,I_atinf=0.0; i<N_comb_lag; i++){
      w_lag[i] *= exp(-q_lag[i]);
      q_lag[i] = qmax + q_lag[i]/b_comb;
      w_lag[i] = a_comb/b_comb*exp(-b_comb*qmax)*w_lag[i];
      (*test)(params_for_function,q_lag[i],&y);
      I_atinf +=w_lag[i]*y;
    }

    /* Do the adaptive quadrature - this will also give the main part of the integral: */
    gk_adapt(&root_comb,(*test),(*function), params_for_function,
	     rtol*1e-2, 1, qmin, qmax, _FALSE_, errmsg);
    /* Do a leaf count: */
    leaf_count(root_comb);
    /* Starting from the top, move down in levels until tolerance is met: */
    for(level=root_comb->leaf_childs; level>=1; level--){
      I_comb = get_integral(root_comb,level);
      //printf("%le + %le + %le = %le | %le\n",
      //     I_atzero,I_atinf,I_comb,I_comb+I_atinf+I_atzero,I_comb+I_atinf+I_atzero-1.0);
      I_comb +=(I_atinf+I_atzero);
      err = I-I_comb;
      if (fabs(err/Itot)<rtol) break;
    }
    /* Reduce tree to the found level:*/
    if (level>0){
      reduce_tree(root_comb,level);
      /* Count the new leafs: */
      leaf_count(root_comb);
      N_comb = 15*root_comb->leaf_childs+N_comb_lag+N_comb_leg;
      if (N_comb <= N_max) combined_converging = _TRUE_;
    }

    /* Do the second combined quadrature: Same as above, but with trapezoidal rule
       using the given q grid:  */
    class_alloc(wcomb2,qsiz*sizeof(double),errmsg);
    I_comb2 = 0.0;
    for(i=0; i<qsiz; i++){
      if(i==0){
	delq = qvec[1]-qvec[0];
      }
      else if(i==qsiz-1){
	delq = qvec[qsiz-1]-qvec[qsiz-2];
      }
      else{
	delq = qvec[i+1]-qvec[i-1];
      }
      (*function)(params_for_function,qvec[i],&y2);
      wcomb2[i] = 0.5*y2*delq;
      (*test)(params_for_function,qvec[i],&y);
      I_comb2 +=wcomb2[i]*y;
    }
    I_comb2 +=(I_atzero+I_atinf);
    err = I - I_comb2;
    //    if(fabs(err/Itot)<rtol) combined2_converging= _TRUE_;
    //printf("I_comb2 = %e, rerr = %e\n",I_comb2,fabs(err/I));
  }


  /* Search for the minimal Laguerre quadrature rule: */
  NLag_max = MIN(N_max,80);
  for (NLag=NL; NLag<=NLag_max; NLag = MIN(NLag_max,NLag+10)){
    /* Evaluate integral: */
    compute_Laguerre(x,w,NLag,0.0,b,c,_TRUE_);
    ILag = 0.0;
    for (i=0; i<NLag; i++){
      (*test)(params_for_function,x[i],&y);
      (*function)(params_for_function,x[i],&y2);
      w[i] *= y2;
      ILag += y*w[i];
    }
    err = I-ILag;
    //fprintf(stderr,"\n Computing Laguerre, N=%d, I=%g and err=%g.\n",NLag,ILag,err);
    if (fabs(err/I)<rtol){
      Laguerre_converging = _TRUE_;
      break;
    }
    Nold = NLag;
    if (Nold == NLag_max) break;
  }

  if (Laguerre_converging == _TRUE_){
    /* We must refine NLag: */
    NL = Nold;
    NR = NLag;
    while ((NR-NL)>1) {
      NLag = (NL+NR)/2;
      /* Evaluate integral: */
      compute_Laguerre(x,w,NLag,0.0,b,c,_TRUE_);
      ILag = 0.0;
      for (i=0; i<NLag; i++){
	(*test)(params_for_function,x[i],&y);
	(*function)(params_for_function,x[i],&y2);
	w[i] *= y2;
	ILag += y*w[i];
      }
      err = I-ILag;
      //fprintf(stderr,"\n NLag=%d, rerr=%g.\n",NLag,fabs(err/I));
      if (fabs(err/Itot)<rtol){
	NR = NLag;
      }
      else{
	NL = NLag;
      }
    }
  }

  /* Choose best method if both works: */
  *N = N_max;
  //Laguerre_converging = _FALSE_;
  if (adapt_converging == _TRUE_) {
    *N = Nadapt;
  }
  if (combined_converging == _TRUE_){
    if(N_comb <= *N){
      *N = N_comb;
      adapt_converging = _FALSE_;
    }
    else{
      combined_converging = _FALSE_;
    }
  }
  if (Laguerre_converging == _TRUE_){
    if (NLag <= *N){
      *N = NLag;
      combined_converging = _FALSE_;
      adapt_converging = _FALSE_;
    }
    else{
      Laguerre_converging = _FALSE_;
    }
  }
  //printf("N_adapt=%d, N_combined=%d at level=%d, Nlag=%d\n",Nadapt,N_comb,level,NLag);
  if (adapt_converging==_TRUE_){
    class_sprintf(method_chosen,"Adaptive Gauss-Kronrod Quadrature");
    /* Gather weights and xvalues from tree: */
    i = Nadapt-1;
    get_leaf_x_and_w(root,&i,x,w,_TRUE_);
  }
  else if (Laguerre_converging==_TRUE_){
    class_sprintf(method_chosen,"Gauss-Laguerre Quadrature");
    /* x and w is already populated in this case. */
  }
  else if (combined_converging == _TRUE_){
    class_sprintf(method_chosen,"Combined Quadrature");
    for(i=0; i<N_comb_leg; i++){
      x[i] = q_leg[i];
      w[i] = w_leg[i];
    }
    i = N_comb_leg;
    get_leaf_x_and_w(root_comb,&i,x,w,_FALSE_);
    //printf("from %d to %d\n",N_comb_leg,i);

    for(i=0; i<N_comb_lag; i++){
      x[N_comb-N_comb_lag+i] = q_lag[i];
      w[N_comb-N_comb_lag+i] = w_lag[i];
    }
  }
  else{
    /* Failed to converge! */
    class_stop(errmsg,
		"get_qsampling fails to obtain a relative tolerance of %g as required using atmost %d points. If the PSD is interpolated from a file, try increasing the resolution and the q-interval (qmin;qmax) if possible, or decrease tol_ncdm/tol_ncdm_bg. As a last resort, increase _QUADRATURE_MAX_/_QUADRATURE_MAX_BG_.",rtol,N_max);
  }
  /* Trim weights to avoid zero weights: */
  for(i=0,zeroskip=0; i<*N; i++){
    for( ;(i<*N)&&(w[i+zeroskip]==0.0); zeroskip++,(*N)--);
    x[i] = x[i+zeroskip];
    w[i] = w[i+zeroskip];
  }


  //printf("Chosen sampling: %s, with %d points.\n",method_chosen,*N);
  //for(i=0; i<*N; i++) printf("(q,w) = (%g,%g)\n",x[i],w[i]);
  /* Deallocate tree: */
  burn_tree(root);
  if(qvec!=NULL){
    burn_tree(root_comb);
    free(wcomb2);
  }

  free(b);
  free(c);

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a30, %rsp           # imm = 0x2A30
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movsd %xmm0, -0x30(%rbp)
movq %r8, -0x38(%rbp)
movl %r9d, -0x3c(%rbp)
movl $0x2, -0x44(%rbp)
movl $0x0, -0x50(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x0, -0x68(%rbp)
movl $0x0, -0xe4(%rbp)
movl $0x10, -0xe8(%rbp)
movl $0x4, -0xec(%rbp)
movl -0xe8(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x148(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x2a00(%rbp)
movq %rcx, %rsp
movq %rax, -0x150(%rbp)
movl -0xe8(%rbp), %eax
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x29f8(%rbp)
movq %rcx, %rsp
movq %rax, -0x158(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x188(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x190(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x198(%rbp)
movq $0x0, -0x1a0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x1b0(%rbp)
movl $0x0, -0x1b4(%rbp)
movsd 0x1967fd(%rip), %xmm0   # 0x1d2330
callq 0x82e0
addsd %xmm0, %xmm0
movsd 0x197b54(%rip), %xmm1   # 0x1d3698
addsd %xmm1, %xmm0
movsd 0x197c38(%rip), %xmm1   # 0x1d3788
divsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, -0x108(%rbp)
movsd 0x1967c7(%rip), %xmm0   # 0x1d2330
callq 0x82e0
movaps %xmm0, %xmm1
addsd %xmm1, %xmm1
movsd 0x197b1b(%rip), %xmm0   # 0x1d3698
subsd %xmm1, %xmm0
movsd 0x197bff(%rip), %xmm1   # 0x1d3788
divsd %xmm1, %xmm0
callq 0x82e0
movsd %xmm0, -0x110(%rbp)
movsd -0x110(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x118(%rbp)
movsd -0x108(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, -0x120(%rbp)
movsd 0x1993c8(%rip), %xmm0   # 0x1d4fb8
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x1993b0(%rip), %xmm0   # 0x1d4fb0
subsd %xmm1, %xmm0
movsd 0x19939c(%rip), %xmm1   # 0x1d4fa8
divsd %xmm1, %xmm0
movsd %xmm0, -0x128(%rbp)
movsd 0x199398(%rip), %xmm0   # 0x1d4fb8
callq 0x82e0
movaps %xmm0, %xmm1
movsd 0x199380(%rip), %xmm0   # 0x1d4fb0
addsd %xmm1, %xmm0
movsd 0x19936c(%rip), %xmm1   # 0x1d4fa8
divsd %xmm1, %xmm0
movsd %xmm0, -0x130(%rbp)
movsd -0x130(%rbp), %xmm0
movsd %xmm0, -0x138(%rbp)
movsd -0x128(%rbp), %xmm0
movsd %xmm0, -0x140(%rbp)
movslq -0x24(%rbp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x3bcf1
movslq -0x24(%rbp), %rax
shlq $0x3, %rax
movl %eax, -0x1b8(%rbp)
leaq -0x9c0(%rbp), %rdi
movl -0x1b8(%rbp), %ecx
leaq 0x19635c(%rip), %rsi    # 0x1d2004
leaq 0x1bb366(%rip), %rdx    # 0x1f7015
movb $0x0, %al
callq 0x5b9c0
movq 0x28(%rbp), %rdi
leaq -0x9c0(%rbp), %r8
leaq 0x19636c(%rip), %rsi    # 0x1d2034
leaq 0x19950e(%rip), %rdx    # 0x1d51dd
movl $0x6c, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, -0x4(%rbp)
movl $0x1, -0x9c4(%rbp)
jmp 0x3ccaa
movslq -0x24(%rbp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0xb0(%rbp)
jne 0x3bd7a
movslq -0x24(%rbp), %rax
shlq $0x3, %rax
movl %eax, -0x9c8(%rbp)
leaq -0x11d0(%rbp), %rdi
movl -0x9c8(%rbp), %ecx
leaq 0x1962d3(%rip), %rsi    # 0x1d2004
leaq 0x1b0727(%rip), %rdx    # 0x1ec45f
movb $0x0, %al
callq 0x5b9c0
movq 0x28(%rbp), %rdi
leaq -0x11d0(%rbp), %r8
leaq 0x1962e3(%rip), %rsi    # 0x1d2034
leaq 0x199485(%rip), %rdx    # 0x1d51dd
movl $0x6d, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, -0x4(%rbp)
movl $0x1, -0x9c4(%rbp)
jmp 0x3ccaa
cmpq $0x0, -0x38(%rbp)
je 0x3bdcd
cmpl $0x1, -0x3c(%rbp)
jle 0x3bdcd
movq -0x38(%rbp), %rax
movsd (%rax), %xmm0
movsd %xmm0, -0x188(%rbp)
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x190(%rbp)
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x198(%rbp)
jmp 0x3bdd5
movq $0x0, -0x38(%rbp)
movq 0x10(%rbp), %rsi
movq 0x18(%rbp), %rdx
movq 0x20(%rbp), %rcx
movsd 0x1991d7(%rip), %xmm0   # 0x1d4fc0
mulsd -0x30(%rbp), %xmm0
movq 0x28(%rbp), %rax
leaq -0xb8(%rbp), %rdi
movl $0x1, %r9d
xorps %xmm1, %xmm1
movsd 0x19643e(%rip), %xmm2   # 0x1d2248
subq $0x10, %rsp
movl %r9d, %r8d
movq %rax, (%rsp)
callq 0x3ccc0
addq $0x10, %rsp
movq -0xb8(%rbp), %rdi
callq 0x3d0f0
movq -0xb8(%rbp), %rdi
movl $0x1, %esi
callq 0x3d170
movsd %xmm0, -0x88(%rbp)
movsd -0x88(%rbp), %xmm0
addsd -0x1b0(%rbp), %xmm0
movsd %xmm0, -0x1b0(%rbp)
movq -0xb8(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x1, -0x4c(%rbp)
jl 0x3bed2
movq -0xb8(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x3d170
movsd %xmm0, -0x90(%rbp)
movsd -0x88(%rbp), %xmm0
subsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm1
divsd -0x1b0(%rbp), %xmm1
movaps 0x19637c(%rip), %xmm0   # 0x1d2230
pand %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3bec5
jmp 0x3bed2
jmp 0x3bec7
movl -0x4c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3be68
cmpl $0x0, -0x4c(%rbp)
jle 0x3bf12
movq -0xb8(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x3d1f0
movq -0xb8(%rbp), %rdi
callq 0x3d0f0
movq -0xb8(%rbp), %rax
imull $0xf, 0x20(%rax), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x3bf10
movl $0x1, -0x60(%rbp)
jmp 0x3bf12
cmpq $0x0, -0x38(%rbp)
je 0x3c5b4
movq 0x18(%rbp), %rax
movq 0x20(%rbp), %rdi
movsd -0x188(%rbp), %xmm0
leaq -0x80(%rbp), %rsi
callq *%rax
movl $0x0, -0x40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xd0(%rbp)
movl -0x40(%rbp), %eax
cmpl -0xec(%rbp), %eax
jge 0x3c00c
movsd 0x196d2c(%rip), %xmm0   # 0x1d2c88
mulsd -0x188(%rbp), %xmm0
movslq -0x40(%rbp), %rax
movsd 0x1962d8(%rip), %xmm1   # 0x1d2248
addsd -0x120(%rbp,%rax,8), %xmm1
mulsd %xmm1, %xmm0
movslq -0x40(%rbp), %rax
movsd %xmm0, -0x120(%rbp,%rax,8)
movslq -0x40(%rbp), %rax
movsd 0x196cf2(%rip), %xmm0   # 0x1d2c88
mulsd -0x140(%rbp,%rax,8), %xmm0
mulsd -0x188(%rbp), %xmm0
mulsd -0x80(%rbp), %xmm0
movslq -0x40(%rbp), %rax
movsd %xmm0, -0x140(%rbp,%rax,8)
movq 0x10(%rbp), %rax
movq 0x20(%rbp), %rdi
movslq -0x40(%rbp), %rcx
movsd -0x120(%rbp,%rcx,8), %xmm0
leaq -0x70(%rbp), %rsi
callq *%rax
movslq -0x40(%rbp), %rax
movsd -0x140(%rbp,%rax,8), %xmm0
movsd -0x70(%rbp), %xmm2
movsd -0xd0(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3bf45
movq 0x18(%rbp), %rax
movq 0x20(%rbp), %rdi
movsd -0x198(%rbp), %xmm0
leaq -0x78(%rbp), %rsi
callq *%rax
movq 0x18(%rbp), %rax
movq 0x20(%rbp), %rdi
movsd -0x190(%rbp), %xmm0
leaq -0x80(%rbp), %rsi
callq *%rax
movsd -0x78(%rbp), %xmm0
divsd -0x80(%rbp), %xmm0
movsd 0x1961fe(%rip), %xmm1   # 0x1d2248
subsd %xmm1, %xmm0
movsd -0x190(%rbp), %xmm1
subsd -0x198(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x100(%rbp)
movsd 0x198f56(%rip), %xmm0   # 0x1d4fc8
ucomisd -0x100(%rbp), %xmm0
jbe 0x3c08e
movsd 0x198f44(%rip), %xmm0   # 0x1d4fc8
movsd %xmm0, -0x2a08(%rbp)
jmp 0x3c09e
movsd -0x100(%rbp), %xmm0
movsd %xmm0, -0x2a08(%rbp)
movsd -0x2a08(%rbp), %xmm0
movsd %xmm0, -0x100(%rbp)
movsd -0x80(%rbp), %xmm0
movsd %xmm0, -0x2a10(%rbp)
movsd -0x100(%rbp), %xmm0
mulsd -0x190(%rbp), %xmm0
callq 0x8670
movq -0x2a00(%rbp), %rdi
movq -0x29f8(%rbp), %rsi
movaps %xmm0, %xmm1
movsd -0x2a10(%rbp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0xf8(%rbp)
movl -0xe8(%rbp), %edx
movq -0xa8(%rbp), %rcx
movq -0xb0(%rbp), %r8
xorps %xmm0, %xmm0
movl $0x1, %r9d
callq 0x3b360
movl $0x0, -0x40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xd8(%rbp)
movl -0x40(%rbp), %eax
cmpl -0xe8(%rbp), %eax
jge 0x3c26b
movq -0x2a00(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
callq 0x8670
movq -0x2a00(%rbp), %rax
movq -0x29f8(%rbp), %rcx
movslq -0x40(%rbp), %rdx
mulsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%rcx,%rdx,8)
movsd -0x190(%rbp), %xmm0
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm1
divsd -0x100(%rbp), %xmm1
addsd %xmm1, %xmm0
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd -0xf8(%rbp), %xmm0
divsd -0x100(%rbp), %xmm0
movsd %xmm0, -0x2a18(%rbp)
movsd -0x100(%rbp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
mulsd -0x190(%rbp), %xmm0
callq 0x8670
movq -0x2a00(%rbp), %rcx
movq -0x29f8(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x2a18(%rbp), %xmm0
mulsd %xmm1, %xmm0
movslq -0x40(%rbp), %rdx
mulsd (%rax,%rdx,8), %xmm0
movslq -0x40(%rbp), %rdx
movsd %xmm0, (%rax,%rdx,8)
movq 0x10(%rbp), %rax
movq 0x20(%rbp), %rdi
movslq -0x40(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
leaq -0x70(%rbp), %rsi
callq *%rax
movq -0x29f8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd -0x70(%rbp), %xmm2
movsd -0xd8(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3c129
movq 0x10(%rbp), %rsi
movq 0x18(%rbp), %rdx
movq 0x20(%rbp), %rcx
movsd 0x198d51(%rip), %xmm0   # 0x1d4fd0
mulsd -0x30(%rbp), %xmm0
movsd -0x188(%rbp), %xmm1
movsd -0x190(%rbp), %xmm2
movq 0x28(%rbp), %rax
leaq -0xc0(%rbp), %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
subq $0x10, %rsp
movq %rax, (%rsp)
callq 0x3ccc0
addq $0x10, %rsp
movq -0xc0(%rbp), %rdi
callq 0x3d0f0
movq -0xc0(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x4c(%rbp)
cmpl $0x1, -0x4c(%rbp)
jl 0x3c363
movq -0xc0(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x3d170
movsd %xmm0, -0xc8(%rbp)
movsd -0xd8(%rbp), %xmm0
addsd -0xd0(%rbp), %xmm0
addsd -0xc8(%rbp), %xmm0
movsd %xmm0, -0xc8(%rbp)
movsd -0x88(%rbp), %xmm0
subsd -0xc8(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm1
divsd -0x1b0(%rbp), %xmm1
movaps 0x195eee(%rip), %xmm0   # 0x1d2230
pand %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3c353
jmp 0x3c363
jmp 0x3c355
movl -0x4c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3c2d2
cmpl $0x0, -0x4c(%rbp)
jle 0x3c3b5
movq -0xc0(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0x3d1f0
movq -0xc0(%rbp), %rdi
callq 0x3d0f0
movq -0xc0(%rbp), %rax
imull $0xf, 0x20(%rax), %eax
addl -0xe8(%rbp), %eax
addl -0xec(%rbp), %eax
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0x24(%rbp), %eax
jg 0x3c3b3
movl $0x1, -0x68(%rbp)
jmp 0x3c3b5
movslq -0x3c(%rbp), %rdi
shlq $0x3, %rdi
callq 0x8460
movq %rax, -0x1a0(%rbp)
cmpq $0x0, -0x1a0(%rbp)
jne 0x3c43e
movslq -0x3c(%rbp), %rax
shlq $0x3, %rax
movl %eax, -0x11d4(%rbp)
leaq -0x19e0(%rbp), %rdi
movl -0x11d4(%rbp), %ecx
leaq 0x195c0f(%rip), %rsi    # 0x1d2004
leaq 0x198def(%rip), %rdx    # 0x1d51eb
movb $0x0, %al
callq 0x5b9c0
movq 0x28(%rbp), %rdi
leaq -0x19e0(%rbp), %r8
leaq 0x195c1f(%rip), %rsi    # 0x1d2034
leaq 0x198dc1(%rip), %rdx    # 0x1d51dd
movl $0xd0, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, -0x4(%rbp)
movl $0x1, -0x9c4(%rbp)
jmp 0x3ccaa
xorps %xmm0, %xmm0
movsd %xmm0, -0xe0(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x3c57c
cmpl $0x0, -0x40(%rbp)
jne 0x3c47d
movq -0x38(%rbp), %rax
movsd 0x8(%rax), %xmm0
movq -0x38(%rbp), %rax
subsd (%rax), %xmm0
movsd %xmm0, -0x1a8(%rbp)
jmp 0x3c4e6
movl -0x40(%rbp), %eax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3c4b8
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x1a8(%rbp)
jmp 0x3c4e4
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x38(%rbp), %rax
movl -0x40(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x1a8(%rbp)
jmp 0x3c4e6
movq 0x18(%rbp), %rax
movq 0x20(%rbp), %rdi
movq -0x38(%rbp), %rcx
movslq -0x40(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
leaq -0x80(%rbp), %rsi
callq *%rax
movsd 0x19677f(%rip), %xmm0   # 0x1d2c88
mulsd -0x80(%rbp), %xmm0
mulsd -0x1a8(%rbp), %xmm0
movq -0x1a0(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq 0x10(%rbp), %rax
movq 0x20(%rbp), %rdi
movq -0x38(%rbp), %rcx
movslq -0x40(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
leaq -0x70(%rbp), %rsi
callq *%rax
movq -0x1a0(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd -0x70(%rbp), %xmm2
movsd -0xe0(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xe0(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3c450
movsd -0xd0(%rbp), %xmm0
addsd -0xd8(%rbp), %xmm0
addsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0xe0(%rbp)
movsd -0x88(%rbp), %xmm0
subsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
cmpl $0x50, -0x24(%rbp)
jge 0x3c5c5
movl -0x24(%rbp), %eax
movl %eax, -0x2a1c(%rbp)
jmp 0x3c5d2
movl $0x50, %eax
movl %eax, -0x2a1c(%rbp)
jmp 0x3c5d2
movl -0x2a1c(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
cmpl -0x58(%rbp), %eax
jg 0x3c742
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x54(%rbp), %edx
movq -0xa8(%rbp), %rcx
movq -0xb0(%rbp), %r8
xorps %xmm0, %xmm0
movl $0x1, %r9d
callq 0x3b360
xorps %xmm0, %xmm0
movsd %xmm0, -0xa0(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x3c6b7
movq 0x10(%rbp), %rax
movq 0x20(%rbp), %rdi
movq -0x10(%rbp), %rcx
movslq -0x40(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
leaq -0x70(%rbp), %rsi
callq *%rax
movq 0x18(%rbp), %rax
movq 0x20(%rbp), %rdi
movq -0x10(%rbp), %rcx
movslq -0x40(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
leaq -0x80(%rbp), %rsi
callq *%rax
movsd -0x80(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd -0x70(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0xa0(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3c626
movsd -0x88(%rbp), %xmm0
subsd -0xa0(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm1
divsd -0x88(%rbp), %xmm1
movaps 0x195b4a(%rip), %xmm0   # 0x1d2230
pand %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3c6fe
movl $0x1, -0x64(%rbp)
jmp 0x3c742
movl -0x54(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jne 0x3c70e
jmp 0x3c742
jmp 0x3c710
movl -0x58(%rbp), %eax
movl -0x54(%rbp), %ecx
addl $0xa, %ecx
cmpl %ecx, %eax
jge 0x3c728
movl -0x58(%rbp), %eax
movl %eax, -0x2a20(%rbp)
jmp 0x3c734
movl -0x54(%rbp), %eax
addl $0xa, %eax
movl %eax, -0x2a20(%rbp)
movl -0x2a20(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x3c5e1
cmpl $0x1, -0x64(%rbp)
jne 0x3c895
movl -0x5c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
subl -0x44(%rbp), %eax
cmpl $0x1, %eax
jle 0x3c893
movl -0x44(%rbp), %eax
addl -0x48(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x54(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x54(%rbp), %edx
movq -0xa8(%rbp), %rcx
movq -0xb0(%rbp), %r8
xorps %xmm0, %xmm0
movl $0x1, %r9d
callq 0x3b360
xorps %xmm0, %xmm0
movsd %xmm0, -0xa0(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x54(%rbp), %eax
jge 0x3c842
movq 0x10(%rbp), %rax
movq 0x20(%rbp), %rdi
movq -0x10(%rbp), %rcx
movslq -0x40(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
leaq -0x70(%rbp), %rsi
callq *%rax
movq 0x18(%rbp), %rax
movq 0x20(%rbp), %rdi
movq -0x10(%rbp), %rcx
movslq -0x40(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
leaq -0x80(%rbp), %rsi
callq *%rax
movsd -0x80(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
mulsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rax,%rcx,8)
movsd -0x70(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm2
movsd -0xa0(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa0(%rbp)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3c7b1
movsd -0x88(%rbp), %xmm0
subsd -0xa0(%rbp), %xmm0
movsd %xmm0, -0x98(%rbp)
movsd -0x98(%rbp), %xmm1
divsd -0x1b0(%rbp), %xmm1
movaps 0x1959bf(%rip), %xmm0   # 0x1d2230
pand %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x3c888
movl -0x54(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x3c88e
movl -0x54(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x3c758
jmp 0x3c895
movl -0x24(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x1, -0x60(%rbp)
jne 0x3c8ad
movl -0x50(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x1, -0x68(%rbp)
jne 0x3c8df
movl -0xe4(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jg 0x3c8d6
movl -0xe4(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x60(%rbp)
jmp 0x3c8dd
movl $0x0, -0x68(%rbp)
jmp 0x3c8df
cmpl $0x1, -0x64(%rbp)
jne 0x3c912
movl -0x54(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jg 0x3c909
movl -0x54(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x68(%rbp)
movl $0x0, -0x60(%rbp)
jmp 0x3c910
movl $0x0, -0x64(%rbp)
jmp 0x3c912
cmpl $0x1, -0x60(%rbp)
jne 0x3c984
jmp 0x3c91a
xorl %eax, %eax
movl %eax, %esi
leaq 0x1988cd(%rip), %rdx    # 0x1d51f2
movq %rsi, %rdi
movb $0x0, %al
callq 0x8540
movl %eax, -0x19e4(%rbp)
leaq -0x180(%rbp), %rdi
movl -0x19e4(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x1988a3(%rip), %rdx    # 0x1d51f2
movb $0x0, %al
callq 0x8540
jmp 0x3c958
movl -0x50(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x40(%rbp)
movq -0xb8(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x40(%rbp), %rsi
movl $0x1, %r8d
callq 0x3d280
jmp 0x3cb7b
cmpl $0x1, -0x64(%rbp)
jne 0x3c9cf
jmp 0x3c98c
xorl %eax, %eax
movl %eax, %esi
leaq 0x19887d(%rip), %rdx    # 0x1d5214
movq %rsi, %rdi
movb $0x0, %al
callq 0x8540
movl %eax, -0x19e8(%rbp)
leaq -0x180(%rbp), %rdi
movl -0x19e8(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x198853(%rip), %rdx    # 0x1d5214
movb $0x0, %al
callq 0x8540
jmp 0x3c9ca
jmp 0x3cb79
cmpl $0x1, -0x68(%rbp)
jne 0x3cb03
jmp 0x3c9db
xorl %eax, %eax
movl %eax, %esi
leaq 0x198848(%rip), %rdx    # 0x1d522e
movq %rsi, %rdi
movb $0x0, %al
callq 0x8540
movl %eax, -0x19ec(%rbp)
leaq -0x180(%rbp), %rdi
movl -0x19ec(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
leaq 0x19881e(%rip), %rdx    # 0x1d522e
movb $0x0, %al
callq 0x8540
jmp 0x3ca19
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0xec(%rbp), %eax
jge 0x3ca6a
movslq -0x40(%rbp), %rax
movsd -0x120(%rbp,%rax,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movslq -0x40(%rbp), %rax
movsd -0x140(%rbp,%rax,8), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3ca20
movl -0xec(%rbp), %eax
movl %eax, -0x40(%rbp)
movq -0xc0(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
leaq -0x40(%rbp), %rsi
xorl %r8d, %r8d
callq 0x3d280
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0xe8(%rbp), %eax
jge 0x3cb01
movq -0x29f8(%rbp), %rax
movq -0x2a00(%rbp), %rcx
movslq -0x40(%rbp), %rdx
movsd (%rcx,%rdx,8), %xmm0
movq -0x10(%rbp), %rcx
movl -0xe4(%rbp), %edx
subl -0xe8(%rbp), %edx
addl -0x40(%rbp), %edx
movslq %edx, %rdx
movsd %xmm0, (%rcx,%rdx,8)
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x18(%rbp), %rax
movl -0xe4(%rbp), %ecx
subl -0xe8(%rbp), %ecx
addl -0x40(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3ca95
jmp 0x3cb77
leaq -0x21f0(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
movl -0x24(%rbp), %edx
leaq 0x198729(%rip), %rsi    # 0x1d5242
movb $0x1, %al
callq 0x5b9c0
leaq -0x29f0(%rbp), %rdi
leaq -0x21f0(%rbp), %rdx
leaq 0x195a38(%rip), %rsi    # 0x1d256d
movb $0x0, %al
callq 0x5b9c0
movq 0x28(%rbp), %rdi
leaq -0x29f0(%rbp), %r8
leaq 0x1954e6(%rip), %rsi    # 0x1d2034
leaq 0x198688(%rip), %rdx    # 0x1d51dd
movl $0x14e, %ecx            # imm = 0x14E
movb $0x0, %al
callq 0x5b9c0
movl $0x1, -0x4(%rbp)
movl $0x1, -0x9c4(%rbp)
jmp 0x3ccaa
jmp 0x3cb79
jmp 0x3cb7b
movl $0x0, -0x40(%rbp)
movl $0x0, -0x1b4(%rbp)
movl -0x40(%rbp), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x3cc56
jmp 0x3cb9d
movl -0x40(%rbp), %ecx
movq -0x20(%rbp), %rdx
xorl %eax, %eax
cmpl (%rdx), %ecx
movb %al, -0x2a21(%rbp)
jge 0x3cbda
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl -0x1b4(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
sete %al
setnp %cl
andb %cl, %al
movb %al, -0x2a21(%rbp)
movb -0x2a21(%rbp), %al
testb $0x1, %al
jne 0x3cbe6
jmp 0x3cc04
jmp 0x3cbe8
movl -0x1b4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1b4(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0x3cb9d
movq -0x10(%rbp), %rax
movl -0x40(%rbp), %ecx
addl -0x1b4(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
addl -0x1b4(%rbp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x3cb8c
movq -0xb8(%rbp), %rdi
callq 0x3d380
cmpq $0x0, -0x38(%rbp)
je 0x3cc81
movq -0xc0(%rbp), %rdi
callq 0x3d380
movq -0x1a0(%rbp), %rdi
callq 0x8420
movq -0xa8(%rbp), %rdi
callq 0x8420
movq -0xb0(%rbp), %rdi
callq 0x8420
movl $0x0, -0x4(%rbp)
movl $0x1, -0x9c4(%rbp)
movq -0x148(%rbp), %rax
movq %rax, %rsp
movl -0x4(%rbp), %eax
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax)