// File: /workspace/github_c_makefile_star2_O2/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, %r13d
movq %rsi, 0x58(%rsp)
movsd %xmm1, 0x50(%rsp)
movsd %xmm0, 0x48(%rsp)
movq 0x8(%rdi), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rdi), %r12
cmpl $0x0, 0x1b0(%rax)
jne 0x67732
leaq -0x5bfe0(%rip), %rax    # 0xb750
jmp 0x67739
leaq -0x5b95d(%rip), %rax    # 0xbddc
movq %rax, 0x10(%rsp)
movq (%rdi), %rbp
movq %rdi, 0x40(%rsp)
movq 0x10(%rdi), %rbx
movq 0x80(%r12), %r15
movq 0xb8(%r15), %rax
movq %rax, 0x18(%rsp)
pushq $0x30
popq %rdi
callq 0x8490
testq %rax, %rax
je 0x677ac
movq %rax, %r14
movq %rbx, 0x28(%rsp)
andl $0x0, 0xc(%rax)
movabsq $0x100000002, %rax      # imm = 0x100000002
movq %rax, 0x4(%r14)
movq %rbp, 0x68(%rsp)
movzwl 0x4b6(%rbp), %ebx
testw %bx, %bx
movq %r13, 0x38(%rsp)
movq %r12, 0x70(%rsp)
je 0x677f1
movl $0x3, 0x10(%r14)
pushq $0x4
jmp 0x677f3
leaq 0x7d851(%rip), %rsi     # 0xe5004
leaq 0x9f116(%rip), %rdx     # 0x1068d0
leaq 0x90(%rsp), %r14
pushq $0x30
popq %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x7d857(%rip), %rsi     # 0xe5034
leaq 0x9f1bb(%rip), %rdx     # 0x10699f
movq %rbx, %rdi
movl $0x8bc, %ecx            # imm = 0x8BC
jmp 0x67a0e
pushq $0x3
popq %rax
movl %eax, (%r14)
movl %eax, %r12d
pushq $0x8
popq %rsi
movq %r12, %rdi
callq 0x8270
movq %rax, 0x18(%r14)
testq %rax, %rax
je 0x67862
movq %rax, %r13
leal (,%r12,8), %edi
callq 0x8490
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x67980
leal (,%r12,4), %edi
callq 0x8490
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0x679c8
xorl %ecx, %ecx
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
cmpq %rcx, %r12
je 0x678a9
movl $0x1, (%rax,%rcx,4)
incq %rcx
jmp 0x67851
leaq 0x7d79b(%rip), %rsi     # 0xe5004
leaq 0x9f07f(%rip), %rdx     # 0x1068ef
leaq 0x90(%rsp), %r14
pushq $0x8
popq %rcx
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
movq 0x28(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x7d79c(%rip), %rsi     # 0xe5034
leaq 0x9f100(%rip), %rdx     # 0x10699f
movl $0x8c7, %ecx            # imm = 0x8C7
jmp 0x67a0e
movq 0x18(%rsi), %rcx
movslq 0xc(%rsi), %rdx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, (%r13)
movslq 0x4(%rsi), %rdx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, 0x10(%r13)
movslq 0x8(%rsi), %rdx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, 0x8(%r13)
cmpw $0x1, %bx
jne 0x678ef
movslq 0x10(%rsi), %rdx
movsd (%rcx,%rdx,8), %xmm0
movsd %xmm0, 0x18(%r13)
movq %r14, 0xb8(%r15)
movsd 0x3e8(%rdi), %xmm1
movsd 0x400(%rdi), %xmm0
movq 0x28(%rsp), %rbx
mulsd 0x40(%rbx), %xmm0
subsd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x67a2d
leaq 0x9e08d(%rip), %rsi     # 0x1059b6
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x7d740(%rip), %rsi     # 0xe5082
leaq 0x9e0f1(%rip), %rdx     # 0x105a3a
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x7d6c8(%rip), %rsi     # 0xe5034
leaq 0x9f02c(%rip), %rdx     # 0x10699f
movq %rbx, %rdi
movl $0x8dd, %ecx            # imm = 0x8DD
jmp 0x67bcb
shll $0x3, %r12d
leaq 0x7d679(%rip), %rsi     # 0xe5004
leaq 0x9ef64(%rip), %rdx     # 0x1068f6
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
movq 0x28(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x7d67a(%rip), %rsi     # 0xe5034
leaq 0x9efde(%rip), %rdx     # 0x10699f
movl $0x8c8, %ecx            # imm = 0x8C8
jmp 0x67a0e
shll $0x2, %r12d
leaq 0x7d631(%rip), %rsi     # 0xe5004
leaq 0x9ef24(%rip), %rdx     # 0x1068fe
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movl %r12d, %ecx
xorl %eax, %eax
callq 0x2e014
movq 0x28(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x7d632(%rip), %rsi     # 0xe5034
leaq 0x9ef96(%rip), %rdx     # 0x10699f
movl $0x8c9, %ecx            # imm = 0x8C9
movq %r14, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rax
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x70(%rsp), %rcx
movq 0x88(%rcx), %rcx
movq 0x38(%rcx), %rdx
movslq (%rcx), %rsi
movsd %xmm1, (%rdx,%rsi,8)
movl 0x18(%rbx), %esi
movapd %xmm1, %xmm0
cmpl $0x3, %esi
je 0x67a62
cmpl $0x1, %esi
jne 0x67b79
movsd 0x3e8(%rdi), %xmm0
movsd %xmm1, 0x30(%rsp)
movslq 0x30(%rcx), %rcx
movsd %xmm0, (%rdx,%rcx,8)
movq 0x70(%rsp), %r15
movl 0x78(%r15), %ebp
movsd 0xa28(%rdi), %xmm3
movsd 0x1b8(%rdi), %xmm2
movsd 0x1c0(%rdi), %xmm4
leaq 0x1064(%rbx), %r8
subq $0x8, %rsp
leaq 0x85c(%rip), %rdi       # 0x68300
leaq 0x1301(%rip), %r9       # 0x68dac
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movq %r13, %rsi
movq %rax, %rdx
movl %r12d, %ecx
movq %r8, %r12
movq 0x48(%rsp), %r8
pushq %r12
pushq $0x0
pushq 0xdb4c6(%rip)           # 0x142f98
pushq 0x58(%rsp)
pushq 0x80(%rsp)
callq *0x40(%rsp)
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0x67b25
leaq 0x7d8ff(%rip), %rsi     # 0xe53f0
leaq 0x9ef28(%rip), %rdx     # 0x106a20
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7d520(%rip), %rsi     # 0xe5034
leaq 0x9ee84(%rip), %rdx     # 0x10699f
movq %r12, %rdi
movl $0x904, %ecx            # imm = 0x904
jmp 0x67b71
movq %rbx, %rdx
movq %r15, %rcx
callq 0x693b9
testl %eax, %eax
je 0x67bd3
leaq 0x7d8b1(%rip), %rsi     # 0xe53f0
leaq 0x9e741(%rip), %rdx     # 0x106287
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7d4d2(%rip), %rsi     # 0xe5034
leaq 0x9ee36(%rip), %rdx     # 0x10699f
movq %r12, %rdi
movl $0x90c, %ecx            # imm = 0x90C
movq %rbx, %r8
jmp 0x67a11
leaq 0x9ee4b(%rip), %rsi     # 0x1069cb
leaq 0x90(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x7d9ec(%rip), %rsi     # 0xe5585
leaq 0x890(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2e014
addq $0x1064, %rbx           # imm = 0x1064
leaq 0x7d478(%rip), %rsi     # 0xe5034
leaq 0x9eddc(%rip), %rdx     # 0x10699f
movq %rbx, %rdi
movl $0x8ea, %ecx            # imm = 0x8EA
movq %r15, %r8
jmp 0x67a11
movq %r15, %r13
movsd 0x70(%r15), %xmm2
movsd 0x20(%rbx), %xmm0
ucomisd %xmm2, %xmm0
jbe 0x67c3e
leaq 0x9ef61(%rip), %rsi     # 0x106b4f
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x7d47b(%rip), %rsi     # 0xe5082
leaq 0x9ef86(%rip), %rdx     # 0x106b94
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7d40a(%rip), %rsi     # 0xe5034
leaq 0x9ed6e(%rip), %rdx     # 0x10699f
movq %r12, %rdi
movl $0x912, %ecx            # imm = 0x912
jmp 0x67a0e
movq 0x18(%rsp), %rdx
movq 0x18(%rdx), %rax
movslq 0xc(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x18(%r14), %rsi
movslq 0xc(%r14), %rcx
movsd %xmm0, (%rsi,%rcx,8)
movslq 0x4(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x4(%r14), %rcx
movsd %xmm0, (%rsi,%rcx,8)
movslq 0x8(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x8(%r14), %rcx
movsd %xmm0, (%rsi,%rcx,8)
movq 0x68(%rsp), %r15
cmpw $0x1, 0x4b6(%r15)
jne 0x67ca3
movslq 0x10(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x10(%r14), %rax
movsd %xmm0, (%rsi,%rax,8)
movq 0x88(%r13), %rcx
movq 0x38(%rcx), %rax
movslq (%rcx), %rdx
andq $0x0, (%rax,%rdx,8)
movl 0x18(%rbx), %edx
cmpl $0x1, %edx
movq 0x20(%rsp), %rdi
je 0x67cd8
cmpl $0x3, %edx
jne 0x67e10
movsd %xmm2, 0x8(%rsp)
movslq 0x30(%rcx), %rcx
jmp 0x67d11
movsd 0x400(%rdi), %xmm1
mulsd 0x40(%rbx), %xmm1
movslq 0x30(%rcx), %rcx
movsd %xmm1, (%rax,%rcx,8)
movsd 0x400(%rdi), %xmm0
mulsd 0x58(%rbx), %xmm0
addsd 0x50(%rbx), %xmm0
ucomisd %xmm1, %xmm0
movsd %xmm2, 0x8(%rsp)
jbe 0x67d11
movsd %xmm0, (%rax,%rcx,8)
andq $0x0, (%rax,%rcx,8)
movq 0x40(%rsp), %r8
movq 0x18(%r8), %rax
movl %ebp, 0x78(%rax)
movq 0x28(%r14), %rdx
movl (%r14), %ecx
movsd 0xa28(%rdi), %xmm3
movsd 0x1b8(%rdi), %xmm2
movsd 0x1c0(%rdi), %xmm4
subq $0x8, %rsp
leaq 0x5b4(%rip), %rdi       # 0x68300
leaq 0x1059(%rip), %r9       # 0x68dac
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
pushq %r12
pushq $0x0
pushq 0xdb22f(%rip)           # 0x142f98
pushq 0x58(%rsp)
pushq 0x80(%rsp)
callq *0x40(%rsp)
addq $0x30, %rsp
cmpl $0x1, %eax
jne 0x67dbf
leaq 0x7d668(%rip), %rsi     # 0xe53f0
leaq 0x9ec91(%rip), %rdx     # 0x106a20
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7d289(%rip), %rsi     # 0xe5034
leaq 0x9ebed(%rip), %rdx     # 0x10699f
movq %r12, %rdi
movl $0x945, %ecx            # imm = 0x945
jmp 0x67b71
movq %rbx, %rdx
movq %r13, %rcx
callq 0x693b9
testl %eax, %eax
je 0x67e60
leaq 0x7d617(%rip), %rsi     # 0xe53f0
leaq 0x9e4a7(%rip), %rdx     # 0x106287
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7d238(%rip), %rsi     # 0xe5034
leaq 0x9eb9c(%rip), %rdx     # 0x10699f
movq %r12, %rdi
movl $0x94d, %ecx            # imm = 0x94D
jmp 0x67b71
leaq 0x9ebb4(%rip), %rsi     # 0x1069cb
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x7d755(%rip), %rsi     # 0xe5585
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2e014
leaq 0x7d1e8(%rip), %rsi     # 0xe5034
leaq 0x9eb4c(%rip), %rdx     # 0x10699f
movq %r12, %rdi
movl $0x92c, %ecx            # imm = 0x92C
jmp 0x67a0e
movsd 0x70(%r13), %xmm0
ucomisd 0x20(%rbx), %xmm0
jbe 0x67ec4
leaq 0x9ed38(%rip), %rsi     # 0x106bac
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movb $0x1, %al
callq 0x2e014
leaq 0x7d1f5(%rip), %rsi     # 0xe5082
leaq 0x9ee44(%rip), %rdx     # 0x106cd8
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7d184(%rip), %rsi     # 0xe5034
leaq 0x9eae8(%rip), %rdx     # 0x10699f
movq %r12, %rdi
movl $0x953, %ecx            # imm = 0x953
jmp 0x67a0e
movq %r15, %rdi
movq %r12, %r15
movq 0x18(%rsp), %rdx
movq 0x18(%rdx), %rax
movslq 0xc(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x18(%r14), %rsi
movslq 0xc(%r14), %rcx
movsd %xmm1, (%rsi,%rcx,8)
movslq 0x4(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq 0x4(%r14), %rcx
movsd %xmm1, (%rsi,%rcx,8)
movslq 0x8(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq 0x8(%r14), %rcx
movsd %xmm1, (%rsi,%rcx,8)
cmpw $0x1, 0x4b6(%rdi)
jne 0x67f29
movslq 0x10(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm1
movslq 0x10(%r14), %rax
movsd %xmm1, (%rsi,%rax,8)
xorpd %xmm1, %xmm1
movsd %xmm1, 0x60(%rsp)
movl $0x2711, %r12d          # imm = 0x2711
movq 0x20(%rsp), %rdi
movsd 0x30(%rsp), %xmm3
movsd 0x8(%rsp), %xmm4
movapd %xmm4, %xmm2
subsd %xmm0, %xmm2
movsd 0x20(%rbx), %xmm1
mulsd 0x3f8(%rdi), %xmm1
ucomisd %xmm1, %xmm2
jbe 0x681a5
movsd 0x60(%rsp), %xmm2
addsd %xmm3, %xmm2
mulsd 0x7dd35(%rip), %xmm2    # 0xe5cb0
movq 0x88(%r13), %rcx
movq 0x38(%rcx), %rax
movslq (%rcx), %rdx
movsd %xmm2, (%rax,%rdx,8)
movl 0x18(%rbx), %edx
cmpl $0x3, %edx
movsd %xmm2, 0x78(%rsp)
je 0x67fd9
cmpl $0x1, %edx
jne 0x682b0
movsd 0x400(%rdi), %xmm1
mulsd 0x40(%rbx), %xmm1
addsd %xmm2, %xmm1
movslq 0x30(%rcx), %rcx
movsd %xmm1, (%rax,%rcx,8)
movsd 0x400(%rdi), %xmm2
mulsd 0x58(%rbx), %xmm2
addsd 0x50(%rbx), %xmm2
ucomisd %xmm1, %xmm2
ja 0x67fdd
jmp 0x67fe6
movslq 0x30(%rcx), %rcx
movsd %xmm2, (%rax,%rcx,8)
movapd %xmm2, %xmm1
movapd %xmm0, 0x80(%rsp)
movsd %xmm4, 0x8(%rsp)
movsd %xmm3, 0x30(%rsp)
movsd 0x3e8(%rdi), %xmm0
ucomisd %xmm0, %xmm1
ja 0x681dd
movq 0x40(%rsp), %r8
movq 0x18(%r8), %rax
movl %ebp, 0x78(%rax)
movq 0x28(%r14), %rdx
movl (%r14), %ecx
movsd 0xa28(%rdi), %xmm3
movsd 0x1b8(%rdi), %xmm2
movsd 0x1c0(%rdi), %xmm4
subq $0x8, %rsp
leaq 0x2bd(%rip), %rdi       # 0x68300
movsd 0x50(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
leaq 0xd56(%rip), %r9        # 0x68dac
pushq %r15
pushq $0x0
pushq 0xdaf38(%rip)           # 0x142f98
pushq 0x58(%rsp)
pushq 0x80(%rsp)
callq *0x40(%rsp)
addq $0x30, %rsp
cmpl $0x1, %eax
je 0x68234
movq %rbx, %rdx
movq %r13, %rcx
callq 0x693b9
testl %eax, %eax
jne 0x68272
movsd 0x70(%r13), %xmm1
movsd 0x20(%rbx), %xmm5
ucomisd %xmm5, %xmm1
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
movsd 0x30(%rsp), %xmm3
movsd 0x8(%rsp), %xmm4
movsd 0x78(%rsp), %xmm0
ja 0x680c4
movsd %xmm0, 0x60(%rsp)
jmp 0x680cc
movapd %xmm1, %xmm4
movapd %xmm0, %xmm3
movq 0x18(%rdx), %rax
movslq 0xc(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm2
movq 0x18(%r14), %rsi
movslq 0xc(%r14), %rcx
movsd %xmm2, (%rsi,%rcx,8)
movslq 0x4(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm2
movslq 0x4(%r14), %rcx
movsd %xmm2, (%rsi,%rcx,8)
movslq 0x8(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm2
movslq 0x8(%r14), %rcx
movsd %xmm2, (%rsi,%rcx,8)
movq 0x68(%rsp), %rcx
cmpw $0x1, 0x4b6(%rcx)
jne 0x6812b
movslq 0x10(%rdx), %rcx
movsd (%rax,%rcx,8), %xmm2
movslq 0x10(%r14), %rax
movsd %xmm2, (%rsi,%rax,8)
cmpltsd %xmm1, %xmm5
movapd 0x80(%rsp), %xmm0
andpd %xmm5, %xmm0
andnpd %xmm1, %xmm5
orpd %xmm5, %xmm0
decl %r12d
jne 0x67f4a
leaq 0x9ec41(%rip), %rsi     # 0x106d96
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x7cf14(%rip), %rsi     # 0xe5082
leaq 0x9ec77(%rip), %rdx     # 0x106dec
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7cea3(%rip), %rsi     # 0xe5034
leaq 0x9e807(%rip), %rdx     # 0x10699f
movq %r15, %rdi
movl $0x9b0, %ecx            # imm = 0x9B0
jmp 0x67a0e
movq 0x88(%r13), %rax
movq 0x38(%rax), %rcx
movslq (%rax), %rax
movsd (%rcx,%rax,8), %xmm0
movsd %xmm0, 0x28(%rbx)
movq %r14, %rdi
movq %rdx, %rbx
callq 0x695be
movq 0x80(%r13), %rax
movq %rbx, 0xb8(%rax)
xorl %eax, %eax
jmp 0x67a1b
leaq 0x9eb0c(%rip), %rsi     # 0x106cf0
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movb $0x1, %al
callq 0x2e014
leaq 0x7ce85(%rip), %rsi     # 0xe5082
leaq 0x9eb2f(%rip), %rdx     # 0x106d33
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7ce14(%rip), %rsi     # 0xe5034
leaq 0x9e778(%rip), %rdx     # 0x10699f
movq %r15, %rdi
movl $0x978, %ecx            # imm = 0x978
jmp 0x67a0e
leaq 0x7d1b5(%rip), %rsi     # 0xe53f0
leaq 0x9e7de(%rip), %rdx     # 0x106a20
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7cdd6(%rip), %rsi     # 0xe5034
leaq 0x9e73a(%rip), %rdx     # 0x10699f
movq %r15, %rdi
movl $0x98f, %ecx            # imm = 0x98F
jmp 0x67b71
leaq 0x7d177(%rip), %rsi     # 0xe53f0
leaq 0x9e007(%rip), %rdx     # 0x106287
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0x7cd98(%rip), %rsi     # 0xe5034
leaq 0x9e6fc(%rip), %rdx     # 0x10699f
movq %r15, %rdi
movl $0x997, %ecx            # imm = 0x997
jmp 0x67b71
leaq 0x9e714(%rip), %rsi     # 0x1069cb
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0x7d2b5(%rip), %rsi     # 0xe5585
leaq 0x890(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2e014
leaq 0x7cd48(%rip), %rsi     # 0xe5034
leaq 0x9e6ac(%rip), %rdx     # 0x10699f
movq %r15, %rdi
movl $0x972, %ecx            # imm = 0x972
jmp 0x67a0e