// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../source/thermodynamics.c
// Function: thermodynamics_reionization_evolve_with_tau
int thermodynamics_reionization_evolve_with_tau(
                                                struct thermodynamics_parameters_and_workspace * ptpaw,
                                                double mz_ini,
                                                double mz_end,
                                                double * mz_output,
                                                int mz_size
                                                ) {

  /** Summary: */

  /** Define local variables */
  int counter;
  double z_sup,z_mid,z_inf;
  double tau_sup,tau_mid,tau_inf;

  int index_ti;
  int last_index_back_mz_ini;

  struct precision * ppr;
  struct background * pba;
  struct thermodynamics * pth;
  struct thermo_workspace * ptw;

  /* function pointer to ODE evolver and names of possible evolvers */
  extern int evolver_rk(EVOLVER_PROTOTYPE);
  extern int evolver_ndf15(EVOLVER_PROTOTYPE);
  int (*generic_evolver)(EVOLVER_PROTOTYPE) = evolver_ndf15;

  /* pointers towards two thermo vector stuctures (see below) */

  struct thermo_vector * ptvs; // Vector for storing the initial conditions
  struct thermo_vector * ptv; // Temporary vector as workspace

  /** - Remame fields to avoid heavy notations */

  ppr = ptpaw->ppr;
  pba = ptpaw->pba;
  pth = ptpaw->pth;
  ptw = ptpaw->ptw;

  /** - Choose evolver */

  switch (ppr->thermo_evolver) {
  case rk:
    generic_evolver = evolver_rk;
    break;
  case ndf15:
    generic_evolver = evolver_ndf15;
    break;
  }

  /** - ptvs will be a pointer towards the same thermo vector that was
      used in the previous approximation schemes; it contains values
      that will serve here to set initial conditions. */

  ptvs = ptw->ptdw->ptv;

  /** - ptv is a pointer towards a whole new thermo vector used for
      the calculations in the bisection, that we must allocate and
      initialize */

  class_alloc(ptv,sizeof(struct thermo_vector),pth->error_message);

  /* allocate vector indices dynamically */
  index_ti = 0;
  class_define_index(ptv->index_ti_D_Tmat,_TRUE_,index_ti,1);
  class_define_index(ptv->index_ti_x_He,_TRUE_,index_ti,1);
  class_define_index(ptv->index_ti_x_H,_TRUE_,index_ti,1);
  class_define_index(ptv->index_ti_T_idm,pba->has_idm,index_ti,1);
  ptv->ti_size = index_ti;

  /* Allocate all arrays used during the evolution */
  class_calloc(ptv->y,ptv->ti_size,sizeof(double),pth->error_message);
  class_alloc(ptv->dy,ptv->ti_size*sizeof(double),pth->error_message);
  class_alloc(ptv->used_in_output,ptv->ti_size*sizeof(int),pth->error_message);

  for (index_ti=0; index_ti<ptv->ti_size; index_ti++) {
    ptv->used_in_output[index_ti] = _TRUE_;
  }

  /** - Initialize the values of the temporary vector */
  ptv->y[ptv->index_ti_D_Tmat] = ptvs->y[ptvs->index_ti_D_Tmat];
  ptv->y[ptv->index_ti_x_H] = ptvs->y[ptvs->index_ti_x_H];
  ptv->y[ptv->index_ti_x_He] = ptvs->y[ptvs->index_ti_x_He];
  if (pba->has_idm == _TRUE_)
    ptv->y[ptv->index_ti_T_idm] = ptvs->y[ptvs->index_ti_T_idm];

  ptw->ptdw->ptv = ptv;

  /** - Evolve quantities through reionization assuming upper value of z_reio */

  z_sup = ppr->reionization_z_start_max-ppr->reionization_start_factor*pth->reionization_width;
  class_test(z_sup < 0.,
             pth->error_message,
             "parameters are such that reionization cannot take place before today while starting after z_start_max; need to increase z_start_max");

  /* maximum possible reionization redshift */
  ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_redshift] = z_sup;
  /* maximum possible starting redshift */
  switch (pth->reio_parametrization) {
  case reio_camb:
    ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] = ppr->reionization_z_start_max;
    break;
  case reio_half_tanh:
    ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] = z_sup;
    break;
  default:
    class_stop(pth->error_message,"Should not be there: tau_reio acan be an input only for reio_camb and reio_half_tanh");
    break;
  }

  /* ptaw->ptw->last_index_back has been properly set according to the
     redshift z = -mz_inbi, we should keep memory of it */
  last_index_back_mz_ini = ptpaw->ptw->last_index_back;

  /* Calculate a first ionization history at upper limit */
  class_call(generic_evolver(thermodynamics_derivs,
                             mz_ini,
                             mz_end,
                             ptv->y,
                             ptv->used_in_output,
                             ptv->ti_size,
                             ptpaw,
                             ppr->tol_thermo_integration,
                             ppr->smallest_allowed_variation,
                             thermodynamics_timescale,  // timescale
                             ppr->thermo_integration_stepsize, // stepsize
                             mz_output, // values of z for output
                             mz_size, // size of previous array
                             thermodynamics_sources, // function for output
                             NULL, // print variables
                             pth->error_message),
             pth->error_message,
             pth->error_message);

  /* infer corresponding tau_reio */
  class_call(thermodynamics_reionization_get_tau(ppr,
                                                 pba,
                                                 pth,
                                                 ptw),
             pth->error_message,
             pth->error_message);

  tau_sup=ptw->reionization_optical_depth;

  class_test(tau_sup < pth->tau_reio,
             pth->error_message,
             "parameters are such that reionization cannot start after z_start_max");

  /** - Restore initial conditions */
  ptv->y[ptv->index_ti_D_Tmat] = ptvs->y[ptvs->index_ti_D_Tmat];
  ptv->y[ptv->index_ti_x_H] = ptvs->y[ptvs->index_ti_x_H];
  ptv->y[ptv->index_ti_x_He] = ptvs->y[ptvs->index_ti_x_He];
  if (pba->has_idm == _TRUE_)
    ptv->y[ptv->index_ti_T_idm] = ptvs->y[ptvs->index_ti_T_idm];

  /** - Evolve quantities through reionization assuming lower value of z_reio */

  z_inf = 0.;

  /* minimum possible reionization redshift */
  ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_redshift] = z_inf;
  /* minimum possible starting redshift */
  switch (pth->reio_parametrization) {
  case reio_camb:
    ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] = ppr->reionization_start_factor*pth->reionization_width;
    if (ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] < pth->helium_fullreio_redshift+ppr->reionization_start_factor*pth->helium_fullreio_width) {
      ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] = pth->helium_fullreio_redshift+ppr->reionization_start_factor*pth->helium_fullreio_width;
    }
  case reio_half_tanh:
    ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] = z_inf;
    break;
  default:
    class_stop(pth->error_message,"Should not be there: tau_reio acan be an input only for reio_camb and reio_half_tanh");
    break;
  }

  /* reset ptaw->ptw->last_index_back to match the redshift z = -mz_inbi */
  ptpaw->ptw->last_index_back = last_index_back_mz_ini;

  /* Calculate a second ionization history at lower limit */
  class_call(generic_evolver(thermodynamics_derivs,
                             mz_ini,
                             mz_end,
                             ptv->y,
                             ptv->used_in_output,
                             ptv->ti_size,
                             ptpaw,
                             ppr->tol_thermo_integration,
                             ppr->smallest_allowed_variation,
                             thermodynamics_timescale,  // timescale
                             ppr->thermo_integration_stepsize, // stepsize
                             mz_output, // values of z for output
                             mz_size, // size of previous array
                             thermodynamics_sources, // function for output
                             NULL, // print variables
                             pth->error_message),
             pth->error_message,
             pth->error_message);

  /* infer corresponding tau_reio */
  class_call(thermodynamics_reionization_get_tau(ppr,
                                                 pba,
                                                 pth,
                                                 ptw),
             pth->error_message,
             pth->error_message);

  tau_inf=ptw->reionization_optical_depth;

  class_test(tau_inf > pth->tau_reio,
             pth->error_message,
             "CLASS cannot reach the low value of tau_reio that was selected, even when setting z_reio as low as 0.\nThis means that some additional physical component is requiring some minimal tau_reio_min = %.10e.\nThis is usually caused by strong energy injections or other modifications of the x_e(z) behaviour.",tau_inf);

  /** - Restore initial conditions */
  ptv->y[ptv->index_ti_D_Tmat] = ptvs->y[ptvs->index_ti_D_Tmat];
  ptv->y[ptv->index_ti_x_H] = ptvs->y[ptvs->index_ti_x_H];
  ptv->y[ptv->index_ti_x_He] = ptvs->y[ptvs->index_ti_x_He];
  if (pba->has_idm == _TRUE_)
    ptv->y[ptv->index_ti_T_idm] = ptvs->y[ptvs->index_ti_T_idm];

  /** - Evolve quantities through reionization, trying intermediate values of z_reio by bisection */
  counter=0;
  while ((tau_sup-tau_inf) > pth->tau_reio * ppr->reionization_optical_depth_tol) {
    z_mid=0.5*(z_sup+z_inf);

    /* reionization redshift */
    ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_redshift] = z_mid;

    /* infer starting redshift for hydrogen (Note, that this is only the start of the ADDITIONAL tanh re-ionization function)*/
    switch (pth->reio_parametrization) {
    case reio_camb:
      ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] = ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_redshift]+ppr->reionization_start_factor*pth->reionization_width;
      /* if starting redshift for helium is larger, take that one
       *    (does not happen in realistic models) */
      if (ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] < pth->helium_fullreio_redshift+ppr->reionization_start_factor*pth->helium_fullreio_width) {
        ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] = pth->helium_fullreio_redshift+ppr->reionization_start_factor*pth->helium_fullreio_width;
      }
      break;
    case reio_half_tanh:
      ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] = z_mid;
      break;
    default:
      class_stop(pth->error_message,"Should not be there: tau_reio acan be an input only for reio_camb and reio_half_tanh");
      break;
    }

    class_test(ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_start] > ppr->reionization_z_start_max,
               pth->error_message,
               "starting redshift for reionization > reionization_z_start_max = %e",ppr->reionization_z_start_max);

    /* reset ptaw->ptw->last_index_back to match the redshift z = -mz_inbi */
    ptpaw->ptw->last_index_back = last_index_back_mz_ini;

    /* Compute a new ionization history */
    class_call(generic_evolver(thermodynamics_derivs,
                               mz_ini,
                               mz_end,
                               ptv->y,
                               ptv->used_in_output,
                               ptv->ti_size,
                               ptpaw,
                               ppr->tol_thermo_integration,
                               ppr->smallest_allowed_variation,
                               thermodynamics_timescale,  // timescale
                               ppr->thermo_integration_stepsize, // stepsize
                               mz_output, // values of z for output
                               mz_size, // size of previous array
                               thermodynamics_sources, // function for output
                               NULL, // print variables
                               pth->error_message),
               pth->error_message,
               pth->error_message);

    /* infer corresponding tau_reio */
    class_call(thermodynamics_reionization_get_tau(ppr,
                                                   pba,
                                                   pth,
                                                   ptw),
               pth->error_message,
               pth->error_message);

    tau_mid=ptw->reionization_optical_depth;

    /* trial */
    if (tau_mid > pth->tau_reio) {
      z_sup=z_mid;
      tau_sup=tau_mid;
    }
    else {
      z_inf=z_mid;
      tau_inf=tau_mid;
    }

    /* Restore initial conditions */
    ptv->y[ptv->index_ti_D_Tmat] = ptvs->y[ptvs->index_ti_D_Tmat];
    ptv->y[ptv->index_ti_x_H] = ptvs->y[ptvs->index_ti_x_H];
    ptv->y[ptv->index_ti_x_He] = ptvs->y[ptvs->index_ti_x_He];
    if (pba->has_idm == _TRUE_)
      ptv->y[ptv->index_ti_T_idm] = ptvs->y[ptvs->index_ti_T_idm];

    /* counter to avoid infinite loop */
    counter++;
    class_test(counter > _MAX_IT_,
               pth->error_message,
               "while searching for reionization_optical_depth, maximum number of iterations exceeded");
  }

  /** - Store the ionization redshift in the thermodynamics structure */
  pth->z_reio = ptw->ptrp->reionization_parameters[ptw->ptrp->index_re_reio_redshift];

  /** - Free tempeoraty thermo vector */
  class_call(thermodynamics_vector_free(ptv),
             pth->error_message,
             pth->error_message);

  /* point ptw->ptdw->ptv to same location as when entering the function */
  ptw->ptdw->ptv = ptvs;

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1098, %rsp           # imm = 0x1098
movl %edx, %r15d
movq %rsi, %r12
movq %xmm1, 0x60(%rsp)
movq %xmm0, 0x58(%rsp)
movq 0x8(%rdi), %rax
movq %rax, 0x38(%rsp)
movq 0x18(%rdi), %rbx
cmpl $0x0, 0x1b0(%rax)
jne 0x6e585
leaq -0x61637(%rip), %rax    # 0xcf4c
jmp 0x6e58c
leaq -0x60fb8(%rip), %rax    # 0xd5d4
movq %rax, 0x28(%rsp)
movq (%rdi), %r13
movq %rdi, 0x30(%rsp)
movq 0x10(%rdi), %r14
movq 0x80(%rbx), %rax
movq %rax, 0x18(%rsp)
movq 0xb8(%rax), %rax
movq %rax, 0x68(%rsp)
movl $0x30, %edi
callq 0x8460
testq %rax, %rax
je 0x6e610
movq %rax, %rbp
movq %r12, 0x50(%rsp)
movq %r14, 0x8(%rsp)
movl $0x0, 0xc(%rax)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x4(%rbp)
movzwl 0x4b6(%r13), %eax
testw %ax, %ax
movq %r15, 0x20(%rsp)
movq %r13, 0x48(%rsp)
movw %ax, (%rsp)
je 0x6e657
movl $0x3, 0x10(%rbp)
movl $0x4, %r12d
jmp 0x6e65d
leaq 0x829ed(%rip), %rsi     # 0xf1004
leaq 0xa43c2(%rip), %rdx     # 0x1129e0
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movl $0x30, %ecx
xorl %eax, %eax
callq 0x30c2c
addq $0x1064, %r14           # imm = 0x1064
leaq 0x829f1(%rip), %rsi     # 0xf1034
leaq 0xa4465(%rip), %rdx     # 0x112aaf
movq %r14, %rdi
movl $0x8bc, %ecx            # imm = 0x8BC
jmp 0x6ead9
movl $0x3, %r12d
movl %r12d, (%rbp)
movl %r12d, %r14d
movl $0x8, %esi
movq %r14, %rdi
callq 0x8250
movq %rax, 0x18(%rbp)
testq %rax, %rax
je 0x6e8b9
movq %rax, %r15
movq %rbx, 0x10(%rsp)
leal (,%r12,8), %ebx
movq %rbx, %rdi
callq 0x8460
movq %rax, 0x20(%rbp)
testq %rax, %rax
je 0x6e902
shll $0x2, %r14d
movq %r14, %rdi
callq 0x8460
movq %rax, 0x28(%rbp)
testq %rax, %rax
movq 0x10(%rsp), %r13
je 0x6e94b
movslq (%rbp), %rcx
testq %rcx, %rcx
movq 0x8(%rsp), %r12
movq 0x38(%rsp), %r9
movq 0x68(%rsp), %r10
jle 0x6e7da
leal 0x3(%rcx), %edx
leaq -0x1(%rcx), %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %edx
shlq $0x4, %rdx
movdqa 0x87323(%rip), %xmm1    # 0xf5a20
movdqa 0x8357b(%rip), %xmm2    # 0xf1c80
xorl %esi, %esi
movdqa 0x83581(%rip), %xmm3    # 0xf1c90
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x87311(%rip), %xmm5    # 0xf5a30
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edi
notl %edi
testb $0x1, %dil
je 0x6e75b
movl $0x1, (%rax,%rsi)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x6e772
movl $0x1, 0x4(%rax,%rsi)
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %edi
testb $0x1, %dil
je 0x6e7b2
movl $0x1, 0x8(%rax,%rsi)
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x6e7c5
movl $0x1, 0xc(%rax,%rsi)
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x10, %rsi
cmpq %rsi, %rdx
jne 0x6e71f
movq 0x18(%r10), %rdx
movslq 0xc(%r10), %rsi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, (%r15)
movslq 0x4(%r10), %rsi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, 0x10(%r15)
movslq 0x8(%r10), %rsi
movsd (%rdx,%rsi,8), %xmm0
movsd %xmm0, 0x8(%r15)
cmpw $0x1, (%rsp)
jne 0x6e824
movslq 0x10(%r10), %rsi
movsd (%rdx,%rsi,8), %xmm0
movslq 0x10(%rbp), %rdx
movsd %xmm0, (%r15,%rdx,8)
movq 0x18(%rsp), %rdx
movq %rbp, 0xb8(%rdx)
movsd 0x3e8(%r9), %xmm1
movsd 0x400(%r9), %xmm0
mulsd 0x40(%r12), %xmm0
subsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x6e996
leaq 0xa3264(%rip), %rsi     # 0x111ac6
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x82807(%rip), %rsi     # 0xf1082
leaq 0xa32c8(%rip), %rdx     # 0x111b4a
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x1064, %r12           # imm = 0x1064
leaq 0x8278f(%rip), %rsi     # 0xf1034
leaq 0xa4203(%rip), %rdx     # 0x112aaf
movq %r12, %rdi
movl $0x8dd, %ecx            # imm = 0x8DD
jmp 0x6e943
leaq 0x82744(%rip), %rsi     # 0xf1004
leaq 0xa4138(%rip), %rdx     # 0x1129ff
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movl $0x8, %ecx
xorl %eax, %eax
callq 0x30c2c
movq 0x8(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x82743(%rip), %rsi     # 0xf1034
leaq 0xa41b7(%rip), %rdx     # 0x112aaf
movl $0x8c7, %ecx            # imm = 0x8C7
jmp 0x6ead9
leaq 0x826fb(%rip), %rsi     # 0xf1004
leaq 0xa40f6(%rip), %rdx     # 0x112a06
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movl %ebx, %ecx
xorl %eax, %eax
callq 0x30c2c
movq 0x8(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x826fd(%rip), %rsi     # 0xf1034
leaq 0xa4171(%rip), %rdx     # 0x112aaf
movl $0x8c8, %ecx            # imm = 0x8C8
movq %r14, %r8
jmp 0x6eadc
shll $0x2, %r12d
leaq 0x826ae(%rip), %rsi     # 0xf1004
leaq 0xa40b1(%rip), %rdx     # 0x112a0e
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x30c2c
movq 0x8(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x826af(%rip), %rsi     # 0xf1034
leaq 0xa4123(%rip), %rdx     # 0x112aaf
movl $0x8c9, %ecx            # imm = 0x8C9
jmp 0x6ead9
movq 0x88(%r13), %rdx
movq 0x38(%rdx), %rsi
movslq (%rdx), %rdi
movsd %xmm1, (%rsi,%rdi,8)
movl 0x18(%r12), %edi
movapd %xmm1, %xmm0
cmpl $0x3, %edi
je 0x6e9c9
cmpl $0x1, %edi
jne 0x6eafa
movsd 0x3e8(%r9), %xmm0
movsd %xmm1, 0x18(%rsp)
movslq 0x30(%rdx), %rdx
movsd %xmm0, (%rsi,%rdx,8)
movl 0x78(%r13), %ebx
movsd 0xa28(%r9), %xmm3
movsd 0x1b8(%r9), %xmm2
movsd 0x1c0(%r9), %xmm4
leaq 0x1064(%r12), %r14
subq $0x8, %rsp
leaq 0x8c9(%rip), %rdi       # 0x6f2d3
leaq 0x1353(%rip), %r9       # 0x6fd64
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
movq %r15, %rsi
movq %rax, %rdx
movq 0x38(%rsp), %r8
pushq %r14
pushq $0x0
pushq 0xdd566(%rip)           # 0x14bf98
movq 0x40(%rsp), %r15
pushq %r15
pushq 0x78(%rsp)
callq *0x58(%rsp)
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0x6ea85
leaq 0x8299f(%rip), %rsi     # 0xf13f0
leaq 0xa40d8(%rip), %rdx     # 0x112b30
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x825c0(%rip), %rsi     # 0xf1034
leaq 0xa4034(%rip), %rdx     # 0x112aaf
movq %r14, %rdi
movl $0x904, %ecx            # imm = 0x904
jmp 0x6ead9
movq %r14, (%rsp)
movq %r12, %rdx
movq %r13, %rcx
callq 0x7037b
testl %eax, %eax
je 0x6eb51
leaq 0x8294d(%rip), %rsi     # 0xf13f0
leaq 0xa38ed(%rip), %rdx     # 0x112397
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq (%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8256a(%rip), %rsi     # 0xf1034
leaq 0xa3fde(%rip), %rdx     # 0x112aaf
movq %r14, %rdi
movl $0x90c, %ecx            # imm = 0x90C
movq %rbx, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %eax
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa3fda(%rip), %rsi     # 0x112adb
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x82a6b(%rip), %rsi     # 0xf1585
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x30c2c
addq $0x1064, %r12           # imm = 0x1064
leaq 0x824f7(%rip), %rsi     # 0xf1034
leaq 0xa3f6b(%rip), %rdx     # 0x112aaf
movq %r12, %rdi
movl $0x8ea, %ecx            # imm = 0x8EA
jmp 0x6e943
movsd 0x70(%r13), %xmm2
movsd 0x20(%r12), %xmm0
ucomisd %xmm2, %xmm0
jbe 0x6ebbc
leaq 0xa40f4(%rip), %rsi     # 0x112c5f
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x824fe(%rip), %rsi     # 0xf1082
leaq 0xa4119(%rip), %rdx     # 0x112ca4
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8248d(%rip), %rsi     # 0xf1034
leaq 0xa3f01(%rip), %rdx     # 0x112aaf
movq (%rsp), %rdi
movl $0x912, %ecx            # imm = 0x912
jmp 0x6e943
movq 0x68(%rsp), %rdx
movq 0x18(%rdx), %rax
movslq 0xc(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x18(%rbp), %rsi
movslq 0xc(%rbp), %rcx
movsd %xmm0, (%rsi,%rcx,8)
movslq 0x4(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x4(%rbp), %rcx
movsd %xmm0, (%rsi,%rcx,8)
movslq 0x8(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x8(%rbp), %rcx
movsd %xmm0, (%rsi,%rcx,8)
movq 0x48(%rsp), %r8
cmpw $0x1, 0x4b6(%r8)
jne 0x6ec21
movslq 0x10(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x10(%rbp), %rax
movsd %xmm0, (%rsi,%rax,8)
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rcx
movq 0x38(%rcx), %rax
movslq (%rcx), %rdx
movq $0x0, (%rax,%rdx,8)
movl 0x18(%r12), %edx
cmpl $0x3, %edx
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %r13
je 0x6ec92
cmpl $0x1, %edx
jne 0x6eda9
movsd 0x400(%rdi), %xmm1
mulsd 0x40(%r12), %xmm1
movslq 0x30(%rcx), %rdx
movsd %xmm1, (%rax,%rdx,8)
movsd 0x400(%rdi), %xmm0
mulsd 0x58(%r12), %xmm0
addsd 0x50(%r12), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x6ec92
movsd %xmm0, (%rax,%rdx,8)
movsd %xmm2, 0x40(%rsp)
movslq 0x30(%rcx), %rcx
xorl %r10d, %r10d
movq %r10, (%rax,%rcx,8)
movq 0x18(%r13), %rax
movl %ebx, 0x78(%rax)
movq 0x28(%rbp), %rdx
movl (%rbp), %ecx
movsd 0xa28(%rdi), %xmm3
movsd 0x1b8(%rdi), %xmm2
movsd 0x1c0(%rdi), %xmm4
subq $0x8, %rsp
leaq 0x5ff(%rip), %rdi       # 0x6f2d3
leaq 0x1089(%rip), %r9       # 0x6fd64
movsd 0x60(%rsp), %xmm0
movq 0x68(%rsp), %xmm1
movq %r13, %r8
movq 0x8(%rsp), %r14
pushq %r14
pushq %r10
pushq 0xdd29f(%rip)           # 0x14bf98
pushq %r15
pushq 0x78(%rsp)
callq *0x58(%rsp)
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0x6ed4a
leaq 0x826dd(%rip), %rsi     # 0xf13f0
leaq 0xa3e16(%rip), %rdx     # 0x112b30
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x822fe(%rip), %rsi     # 0xf1034
leaq 0xa3d72(%rip), %rdx     # 0x112aaf
movq %r14, %rdi
movl $0x945, %ecx            # imm = 0x945
jmp 0x6ead9
movq %r12, %rdx
movq 0x10(%rsp), %r15
movq %r15, %rcx
callq 0x7037b
testl %eax, %eax
movq 0x68(%rsp), %r14
je 0x6edfa
leaq 0x82682(%rip), %rsi     # 0xf13f0
leaq 0xa3622(%rip), %rdx     # 0x112397
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq (%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8229f(%rip), %rsi     # 0xf1034
leaq 0xa3d13(%rip), %rdx     # 0x112aaf
movq %r14, %rdi
movl $0x94d, %ecx            # imm = 0x94D
jmp 0x6ead9
leaq 0xa3d2b(%rip), %rsi     # 0x112adb
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x827bc(%rip), %rsi     # 0xf1585
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0x8224f(%rip), %rsi     # 0xf1034
leaq 0xa3cc3(%rip), %rdx     # 0x112aaf
movq (%rsp), %rdi
movl $0x92c, %ecx            # imm = 0x92C
jmp 0x6e943
movsd 0x70(%r15), %xmm0
ucomisd 0x20(%r12), %xmm0
jbe 0x6ee61
leaq 0xa3eac(%rip), %rsi     # 0x112cbc
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movb $0x1, %al
callq 0x30c2c
leaq 0x82259(%rip), %rsi     # 0xf1082
leaq 0xa3fb8(%rip), %rdx     # 0x112de8
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x821e8(%rip), %rsi     # 0xf1034
leaq 0xa3c5c(%rip), %rdx     # 0x112aaf
movq (%rsp), %rdi
movl $0x953, %ecx            # imm = 0x953
jmp 0x6e943
movq 0x18(%r14), %rax
movslq 0xc(%r14), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x18(%rbp), %rcx
movslq 0xc(%rbp), %rdx
movsd %xmm1, (%rcx,%rdx,8)
movslq 0x4(%r14), %rdx
movsd (%rax,%rdx,8), %xmm1
movslq 0x4(%rbp), %rdx
movsd %xmm1, (%rcx,%rdx,8)
movslq 0x8(%r14), %rdx
movsd (%rax,%rdx,8), %xmm1
movslq 0x8(%rbp), %rdx
movsd %xmm1, (%rcx,%rdx,8)
movq 0x48(%rsp), %rdx
cmpw $0x1, 0x4b6(%rdx)
movq (%rsp), %r15
jne 0x6eec4
movslq 0x10(%r14), %rdx
movsd (%rax,%rdx,8), %xmm1
movslq 0x10(%rbp), %rax
movsd %xmm1, (%rcx,%rax,8)
xorpd %xmm1, %xmm1
movsd %xmm1, 0x70(%rsp)
movl $0x2711, %r12d          # imm = 0x2711
movq 0x20(%rsp), %r10
movq 0x38(%rsp), %rdi
movsd 0x18(%rsp), %xmm3
movsd 0x40(%rsp), %xmm4
movapd %xmm4, %xmm2
subsd %xmm0, %xmm2
movq 0x8(%rsp), %rsi
movsd 0x20(%rsi), %xmm1
mulsd 0x3f8(%rdi), %xmm1
ucomisd %xmm1, %xmm2
jbe 0x6f166
movsd 0x70(%rsp), %xmm2
addsd %xmm3, %xmm2
mulsd 0x82db0(%rip), %xmm2    # 0xf1cd0
movq 0x10(%rsp), %rax
movq 0x88(%rax), %rax
movq 0x38(%rax), %rcx
movslq (%rax), %rdx
movsd %xmm2, (%rcx,%rdx,8)
movl 0x18(%rsi), %edx
cmpl $0x3, %edx
movsd %xmm2, 0x78(%rsp)
je 0x6ef88
cmpl $0x1, %edx
jne 0x6f283
movsd 0x400(%rdi), %xmm1
movq 0x8(%rsp), %rsi
mulsd 0x40(%rsi), %xmm1
addsd %xmm2, %xmm1
movslq 0x30(%rax), %rdx
movsd %xmm1, (%rcx,%rdx,8)
movsd 0x400(%rdi), %xmm2
mulsd 0x58(%rsi), %xmm2
addsd 0x50(%rsi), %xmm2
ucomisd %xmm1, %xmm2
ja 0x6ef8c
jmp 0x6ef91
movslq 0x30(%rax), %rdx
movsd %xmm2, (%rcx,%rdx,8)
movapd %xmm0, 0x80(%rsp)
movsd %xmm4, 0x40(%rsp)
movsd %xmm3, 0x18(%rsp)
movslq 0x30(%rax), %rax
movsd (%rcx,%rax,8), %xmm0
ucomisd 0x3e8(%rdi), %xmm0
ja 0x6f1a0
movq 0x18(%r13), %rax
movl %ebx, 0x78(%rax)
movq 0x18(%rbp), %rsi
movq 0x28(%rbp), %rdx
movl (%rbp), %ecx
movsd 0xa28(%rdi), %xmm3
movsd 0x1b8(%rdi), %xmm2
movsd 0x1c0(%rdi), %xmm4
subq $0x8, %rsp
leaq 0x2e1(%rip), %rdi       # 0x6f2d3
movsd 0x60(%rsp), %xmm0
movsd 0x68(%rsp), %xmm1
movq %r13, %r8
leaq 0xd5c(%rip), %r9        # 0x6fd64
pushq %r15
pushq $0x0
pushq 0xdcf86(%rip)           # 0x14bf98
pushq %r10
pushq 0x78(%rsp)
callq *0x58(%rsp)
addq $0x30, %rsp
cmpl $0x1, %eax
je 0x6f1ff
movq 0x8(%rsp), %r13
movq %r13, %rdx
movq 0x10(%rsp), %r15
movq %r15, %rcx
callq 0x7037b
testl %eax, %eax
jne 0x6f241
movsd 0x70(%r15), %xmm1
movsd 0x20(%r13), %xmm5
ucomisd %xmm5, %xmm1
movq 0x38(%rsp), %rdi
movq 0x48(%rsp), %rsi
movsd 0x18(%rsp), %xmm3
movsd 0x40(%rsp), %xmm4
movsd 0x78(%rsp), %xmm0
ja 0x6f07c
movsd %xmm0, 0x70(%rsp)
jmp 0x6f084
movapd %xmm1, %xmm4
movapd %xmm0, %xmm3
movq 0x20(%rsp), %r10
movq 0x30(%rsp), %r13
movq (%rsp), %r15
movq 0x18(%r14), %rax
movslq 0xc(%r14), %rcx
movsd (%rax,%rcx,8), %xmm2
movq 0x18(%rbp), %rcx
movslq 0xc(%rbp), %rdx
movsd %xmm2, (%rcx,%rdx,8)
movslq 0x4(%r14), %rdx
movsd (%rax,%rdx,8), %xmm2
movslq 0x4(%rbp), %rdx
movsd %xmm2, (%rcx,%rdx,8)
movslq 0x8(%r14), %rdx
movsd (%rax,%rdx,8), %xmm2
movslq 0x8(%rbp), %rdx
movsd %xmm2, (%rcx,%rdx,8)
cmpw $0x1, 0x4b6(%rsi)
jne 0x6f0ec
movslq 0x10(%r14), %rdx
movsd (%rax,%rdx,8), %xmm2
movslq 0x10(%rbp), %rax
movsd %xmm2, (%rcx,%rax,8)
cmpltsd %xmm1, %xmm5
movapd 0x80(%rsp), %xmm0
andpd %xmm5, %xmm0
andnpd %xmm1, %xmm5
orpd %xmm5, %xmm0
decl %r12d
jne 0x6eeea
leaq 0xa3d90(%rip), %rsi     # 0x112ea6
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x81f53(%rip), %rsi     # 0xf1082
leaq 0xa3dc6(%rip), %rdx     # 0x112efc
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x81ee2(%rip), %rsi     # 0xf1034
leaq 0xa3956(%rip), %rdx     # 0x112aaf
movq %r15, %rdi
movl $0x9b0, %ecx            # imm = 0x9B0
jmp 0x6e943
movq 0x10(%rsp), %rbx
movq 0x88(%rbx), %rax
movq 0x38(%rax), %rcx
movslq (%rax), %rax
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x28(%rsi)
movq %rbp, %rdi
callq 0x70586
movq 0x80(%rbx), %rax
movq %r14, 0xb8(%rax)
xorl %eax, %eax
jmp 0x6eae8
movq 0x3e8(%rdi), %xmm0
leaq 0xa3c51(%rip), %rsi     # 0x112e00
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movb $0x1, %al
callq 0x30c2c
leaq 0x81eba(%rip), %rsi     # 0xf1082
leaq 0xa3c74(%rip), %rdx     # 0x112e43
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x81e49(%rip), %rsi     # 0xf1034
leaq 0xa38bd(%rip), %rdx     # 0x112aaf
movq %r15, %rdi
movl $0x978, %ecx            # imm = 0x978
jmp 0x6e943
leaq 0x821ea(%rip), %rsi     # 0xf13f0
leaq 0xa3923(%rip), %rdx     # 0x112b30
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq (%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x81e07(%rip), %rsi     # 0xf1034
leaq 0xa387b(%rip), %rdx     # 0x112aaf
movq %r14, %rdi
movl $0x98f, %ecx            # imm = 0x98F
jmp 0x6ead9
leaq 0x821a8(%rip), %rsi     # 0xf13f0
leaq 0xa3148(%rip), %rdx     # 0x112397
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq (%rsp), %r14
movq %r14, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x81dc5(%rip), %rsi     # 0xf1034
leaq 0xa3839(%rip), %rdx     # 0x112aaf
movq %r14, %rdi
movl $0x997, %ecx            # imm = 0x997
jmp 0x6ead9
leaq 0xa3851(%rip), %rsi     # 0x112adb
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x822e2(%rip), %rsi     # 0xf1585
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x30c2c
leaq 0x81d75(%rip), %rsi     # 0xf1034
leaq 0xa37e9(%rip), %rdx     # 0x112aaf
movq %r15, %rdi
movl $0x972, %ecx            # imm = 0x972
jmp 0x6e943