// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/thermodynamics.c
// Function: thermodynamics_obtain_z_ini
int thermodynamics_obtain_z_ini(
                                struct precision * ppr,
                                struct background *pba,
                                struct thermodynamics *pth,
                                struct thermo_workspace * ptw
                                ) {

  /* These wil affect when and how the temperature integration starts*/
  double z_initial;
  int Nz_log;
  /* This describes until when (if at all) any idm might be coupled to either photon or IDR temp*/
  double z_idm_dec, z_idm_dec_min=_HUGE_;

  double R_dm;
  double f1nu = 7./8.*pow((4./11.),(4./3.));

  z_initial = ppr->thermo_z_initial;
  Nz_log = ppr->thermo_Nz_log;

  /* Set this initially to False and check if it's needed */
  ptw->has_ap_idmtca = _FALSE_;

  /* If there is idm, we want the thermodynamics table to
   * start at a much larger z, in order to capture the possible
   * non-trivial behavior of the dark matter interaction rate at early times */

  /* First, calculate the approximate decoupling time iff there is coupling, based on formulae from 2010.04074 */
  if (pba->has_idm == _TRUE_) {
    if ((pth->has_idm_g == _TRUE_) && (pth->n_index_idm_g > -2)) {
      z_idm_dec = pow(3.01e9, 1./(2+pth->n_index_idm_g)) * pow((1.+pba->Neff*f1nu)/(1.+3.044*f1nu), 1./(4.+2.*pth->n_index_idm_g)) * pow(pth->u_idm_g*1e4, -1./(2.+pth->n_index_idm_g));
      if (pth->thermodynamics_verbose > 3)
        printf("The decoupling redshift for idm_g is z_idm_dec = %.5e\n", z_idm_dec);
      z_idm_dec_min = MIN(z_idm_dec, z_idm_dec_min);
    }
    if ((pth->has_idm_b == _TRUE_) && (pth->n_index_idm_b > -3)) {
      R_dm = pth->m_idm / (_m_p_*_c_*_c_/_eV_);
      z_idm_dec = 4e4 * pow(  9.15/pth->n_coeff_idm_b
                              *pow((1.+pba->Neff*f1nu)/(1.+3.044*f1nu), 1./2.) * (0.0224/pba->Omega0_b/pba->h/pba->h)
                              *pow(R_dm, (pth->n_index_idm_b+1.)/2.)/pow(1.+R_dm, (pth->n_index_idm_b-1.)/2.)
                              *pow(10.,4*pth->n_index_idm_b - 25)/pth->cross_idm_b        ,  2./(pth->n_index_idm_b+3));

      if (pth->n_index_idm_b == -2)
        z_idm_dec *= 10;
      if (pth->thermodynamics_verbose > 3)
        printf("The decoupling redshift for idm_b is z_idm_dec = %.5e\n", z_idm_dec);
      z_idm_dec_min = MIN(z_idm_dec, z_idm_dec_min);
    }
    if ((pth->has_idm_dr == _TRUE_) && (pth->n_index_idm_dr > 0)) {
      z_idm_dec = pow(10., 7.-6./ pth->n_index_idm_dr)
        * pow( 1.6 * (1e-6/pba->Omega0_idr/pba->h/pba->h)
               * pow((1.+pba->Neff*f1nu)/(1.+3.044*f1nu), 1./2.)
               * (1e6 / pth->a_idm_dr)  ,  1./pth->n_index_idm_dr);
      if (pth->thermodynamics_verbose > 3)
        printf("The decoupling redshift for idm_dr is z_idm_dec = %.5e\n", z_idm_dec);
      /* we need to be careful if idm is coupled to photons and idr at the same time */
      class_test(z_idm_dec_min != _HUGE_ && fabs(pba->T_idr - pba->T_cmb) > 1e-2,
                 pth->error_message,
                 "It seems that at early times idm is thermally coupled to both idr and photons (possibly through baryons).\nPlease set the initial temperatures equal or disable this error.");

      z_idm_dec_min = MIN(z_idm_dec, z_idm_dec_min);
    }

    /* if there is initial coupling then we need the approximation scheme ap_idmtca */
    if (z_idm_dec_min != _HUGE_) {
      ptw->has_ap_idmtca = _TRUE_;
      /* assert that ap_idmtca ends before ap_brec ends */
      ptw->z_ap_idmtca = MAX( 1e2 * z_idm_dec_min, (ppr->recfast_z_He_1+ppr->recfast_delta_z_He_1)*1.5);
      if (pth->thermodynamics_verbose > 3)
        printf("Starting the idm TCA at z_ap_idmtca = %.5e\n", ptw->z_ap_idmtca);
    }

    /* From this, decide the initial time of integration */
    /* start the integration before the decoupling */
    if (ptw->has_ap_idmtca == _TRUE_) {
      class_test(ptw->z_ap_idmtca * ppr->a_ini_over_a_today_default > 1,
                 pth->error_message,
                 "The decoupling time of the idm species is set earlier than the background integration. Start the background integration earlier.");

      z_initial = MAX(z_initial, MIN(100 * ptw->z_ap_idmtca, 1/ppr->a_ini_over_a_today_default-2.));
    }

    /* if there is no coupling at early time, we need to set an another starting point */
    else {
      z_initial = MAX(ppr->thermo_z_initial_if_idm, z_initial);
    }

    if (pth->thermodynamics_verbose > 2)
      printf(" -> Increasing the initial redshift of thermodynamics from %e to %e \n",ppr->thermo_z_initial,z_initial);

    /* Rescale Nz_log (if necessary) in order to cover with equal spacing the enlarged range */
    Nz_log = MAX((int)(Nz_log/log(ppr->thermo_z_initial)*log(z_initial)),Nz_log);
  }

  ppr->thermo_z_initial = z_initial;
  ppr->thermo_Nz_log = Nz_log;
  class_test(z_initial * ppr->a_ini_over_a_today_default > 1.,
             pth->error_message,
             "The initial starting time for the temperature integration is set earlier than the background integration. Adjust obtain_z_ini to mitigate this");
  class_test(z_initial <  ppr->recfast_z_He_3,
             pth->error_message,
             "The initial starting time for the temperature integration is set after HeliumIII recombination starts. Adjust obtain_z_ini to mitigate this");

  return _SUCCESS_;

}

// Assembly:
subq $0x4108, %rsp           # imm = 0x4108
movq %rdi, 0x40f8(%rsp)
movq %rsi, 0x40f0(%rsp)
movq %rdx, 0x40e8(%rsp)
movq %rcx, 0x40e0(%rsp)
movsd 0x13cd71(%rip), %xmm0   # 0x1f14f0
movsd %xmm0, 0x40c0(%rsp)
movsd 0x121ec0(%rip), %xmm0   # 0x1d6650
movsd 0x120d78(%rip), %xmm1   # 0x1d5510
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x11daf0(%rip), %xmm0   # 0x1d2298
mulsd %xmm1, %xmm0
movsd %xmm0, 0x40b0(%rsp)
movq 0x40f8(%rsp), %rax
movsd 0x190(%rax), %xmm0
movsd %xmm0, 0x40d8(%rsp)
movq 0x40f8(%rsp), %rax
movl 0x1ac(%rax), %eax
movl %eax, 0x40d4(%rsp)
movq 0x40e0(%rsp), %rax
movw $0x0, 0x60(%rax)
movq 0x40f0(%rsp), %rax
movswl 0x4b6(%rax), %eax
cmpl $0x1, %eax
jne 0xb53bc
movq 0x40e8(%rsp), %rax
movswl 0x36(%rax), %eax
cmpl $0x1, %eax
jne 0xb49db
movq 0x40e8(%rsp), %rax
cmpl $-0x2, 0x1058(%rax)
jle 0xb49db
movq 0x40e8(%rsp), %rax
movl 0x1058(%rax), %eax
addl $0x2, %eax
cvtsi2sd %eax, %xmm0
movsd 0x11d9f8(%rip), %xmm1   # 0x1d2248
divsd %xmm0, %xmm1
movsd 0x13cca4(%rip), %xmm0   # 0x1f1500
callq 0x8610
movsd %xmm0, 0xa0(%rsp)
movq 0x40f0(%rsp), %rax
movsd 0x328(%rax), %xmm0
movsd 0x40b0(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x11d9b9(%rip), %xmm1   # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x40b0(%rsp), %xmm1
movsd 0x13cc54(%rip), %xmm2   # 0x1f14f8
mulsd %xmm2, %xmm1
movsd 0x11d998(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq 0x40e8(%rsp), %rax
cvtsi2sdl 0x1058(%rax), %xmm2
addsd %xmm2, %xmm2
movsd 0x120bf4(%rip), %xmm1   # 0x1d54c8
addsd %xmm1, %xmm2
movsd 0x11d968(%rip), %xmm1   # 0x1d2248
divsd %xmm2, %xmm1
callq 0x8610
movaps %xmm0, %xmm1
movsd 0xa0(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0xa8(%rsp)
movq 0x40e8(%rsp), %rax
movsd 0x121d0e(%rip), %xmm0   # 0x1d6620
mulsd 0x1050(%rax), %xmm0
movq 0x40e8(%rsp), %rax
cvtsi2sdl 0x1058(%rax), %xmm1
movsd 0x11e34e(%rip), %xmm2   # 0x1d2c80
addsd %xmm1, %xmm2
movsd 0x11de92(%rip), %xmm1   # 0x1d27d0
divsd %xmm2, %xmm1
callq 0x8610
movaps %xmm0, %xmm1
movsd 0xa8(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x40c8(%rsp)
movq 0x40e8(%rsp), %rax
movswl 0x1060(%rax), %eax
cmpl $0x3, %eax
jle 0xb498b
movsd 0x40c8(%rsp), %xmm0
leaq 0x14141e(%rip), %rdi    # 0x1f5da2
movb $0x1, %al
callq 0x8030
movsd 0x40c8(%rsp), %xmm1
movsd 0x40c0(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xb49b7
movsd 0x40c8(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
jmp 0xb49c9
movsd 0x40c0(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0x98(%rsp), %xmm0
movsd %xmm0, 0x40c0(%rsp)
movq 0x40e8(%rsp), %rax
movswl 0x34(%rax), %eax
cmpl $0x1, %eax
jne 0xb4cb2
movq 0x40e8(%rsp), %rax
cmpl $-0x3, 0x1038(%rax)
jle 0xb4cb2
movq 0x40e8(%rsp), %rax
movsd 0x1010(%rax), %xmm0
movsd 0x13caa3(%rip), %xmm1   # 0x1f14c0
divsd %xmm1, %xmm0
movsd %xmm0, 0x40b8(%rsp)
movq 0x40e8(%rsp), %rax
movsd 0x13cade(%rip), %xmm0   # 0x1f1518
divsd 0x1040(%rax), %xmm0
movsd %xmm0, 0x78(%rsp)
movq 0x40f0(%rsp), %rax
movsd 0x328(%rax), %xmm0
movsd 0x40b0(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x11d7db(%rip), %xmm1   # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x40b0(%rsp), %xmm1
movsd 0x13ca76(%rip), %xmm2   # 0x1f14f8
mulsd %xmm2, %xmm1
movsd 0x11d7ba(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x11e1ea(%rip), %xmm1   # 0x1d2c88
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x78(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x40f0(%rsp), %rax
movsd 0x13ca50(%rip), %xmm1   # 0x1f1510
divsd 0x20(%rax), %xmm1
movq 0x40f0(%rsp), %rax
divsd 0x8(%rax), %xmm1
movq 0x40f0(%rsp), %rax
divsd 0x8(%rax), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x80(%rsp)
movsd 0x40b8(%rsp), %xmm0
movq 0x40e8(%rsp), %rax
cvtsi2sdl 0x1038(%rax), %xmm1
movsd 0x11d73b(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
movsd 0x11e167(%rip), %xmm2   # 0x1d2c80
divsd %xmm2, %xmm1
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x80(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x88(%rsp)
movsd 0x11d705(%rip), %xmm0   # 0x1d2248
addsd 0x40b8(%rsp), %xmm0
movq 0x40e8(%rsp), %rax
cvtsi2sdl 0x1038(%rax), %xmm1
movsd 0x11d6e4(%rip), %xmm2   # 0x1d2248
subsd %xmm2, %xmm1
movsd 0x11e110(%rip), %xmm2   # 0x1d2c80
divsd %xmm2, %xmm1
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x88(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x90(%rsp)
movq 0x40e8(%rsp), %rax
movl 0x1038(%rax), %eax
shll $0x2, %eax
subl $0x19, %eax
cvtsi2sd %eax, %xmm1
movsd 0x11dc2e(%rip), %xmm0   # 0x1d27e0
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x90(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x40e8(%rsp), %rax
divsd 0x1030(%rax), %xmm0
movq 0x40e8(%rsp), %rax
movl 0x1038(%rax), %eax
addl $0x3, %eax
cvtsi2sd %eax, %xmm2
movsd 0x11e08c(%rip), %xmm1   # 0x1d2c80
divsd %xmm2, %xmm1
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x13c900(%rip), %xmm0   # 0x1f1508
mulsd %xmm1, %xmm0
movsd %xmm0, 0x40c8(%rsp)
movq 0x40e8(%rsp), %rax
cmpl $-0x2, 0x1038(%rax)
jne 0xb4c40
movsd 0x11dbb2(%rip), %xmm0   # 0x1d27e0
mulsd 0x40c8(%rsp), %xmm0
movsd %xmm0, 0x40c8(%rsp)
movq 0x40e8(%rsp), %rax
movswl 0x1060(%rax), %eax
cmpl $0x3, %eax
jle 0xb4c6b
movsd 0x40c8(%rsp), %xmm0
leaq 0x141175(%rip), %rdi    # 0x1f5dd9
movb $0x1, %al
callq 0x8030
movsd 0x40c8(%rsp), %xmm1
movsd 0x40c0(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xb4c94
movsd 0x40c8(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
jmp 0xb4ca3
movsd 0x40c0(%rsp), %xmm0
movsd %xmm0, 0x70(%rsp)
movsd 0x70(%rsp), %xmm0
movsd %xmm0, 0x40c0(%rsp)
movq 0x40e8(%rsp), %rax
movswl 0x38(%rax), %eax
cmpl $0x1, %eax
jne 0xb4f58
movq 0x40e8(%rsp), %rax
movsd 0x1028(%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xb4f58
movq 0x40e8(%rsp), %rax
movsd 0x11e994(%rip), %xmm0   # 0x1d3688
divsd 0x1028(%rax), %xmm0
movsd 0x11ea84(%rip), %xmm1   # 0x1d3788
subsd %xmm0, %xmm1
movsd 0x11dad0(%rip), %xmm0   # 0x1d27e0
callq 0x8610
movsd %xmm0, 0x68(%rsp)
movq 0x40f0(%rsp), %rax
movsd 0x11df3d(%rip), %xmm1   # 0x1d2c68
divsd 0xf8(%rax), %xmm1
movq 0x40f0(%rsp), %rax
divsd 0x8(%rax), %xmm1
movq 0x40f0(%rsp), %rax
divsd 0x8(%rax), %xmm1
movsd 0x12197b(%rip), %xmm0   # 0x1d66d0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0x40f0(%rsp), %rax
movsd 0x328(%rax), %xmm0
movsd 0x40b0(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x11d4c4(%rip), %xmm1   # 0x1d2248
addsd %xmm1, %xmm0
movsd 0x40b0(%rsp), %xmm1
movsd 0x13c75f(%rip), %xmm2   # 0x1f14f8
mulsd %xmm2, %xmm1
movsd 0x11d4a3(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x11ded3(%rip), %xmm1   # 0x1d2c88
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x60(%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x40e8(%rsp), %rax
movsd 0x121701(%rip), %xmm1   # 0x1d64d8
divsd 0x1018(%rax), %xmm1
mulsd %xmm1, %xmm0
movq 0x40e8(%rsp), %rax
movsd 0x11d455(%rip), %xmm1   # 0x1d2248
divsd 0x1028(%rax), %xmm1
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x68(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x40c8(%rsp)
movq 0x40e8(%rsp), %rax
movswl 0x1060(%rax), %eax
cmpl $0x3, %eax
jle 0xb4e41
movsd 0x40c8(%rsp), %xmm0
leaq 0x140fd6(%rip), %rdi    # 0x1f5e10
movb $0x1, %al
callq 0x8030
movsd 0x40c0(%rsp), %xmm0
movsd 0x13c69e(%rip), %xmm1   # 0x1f14f0
ucomisd %xmm1, %xmm0
jne 0xb4e5f
jp 0xb4e5f
jmp 0xb4f11
movq 0x40f0(%rsp), %rax
movsd 0x100(%rax), %xmm0
movq 0x40f0(%rsp), %rax
subsd 0x18(%rax), %xmm0
movaps 0x11d3ad(%rip), %xmm1   # 0x1d2230
pand %xmm1, %xmm0
movsd 0x120141(%rip), %xmm1   # 0x1d4fd0
ucomisd %xmm1, %xmm0
jbe 0xb4f11
leaq 0x38b0(%rsp), %rdi
leaq 0x140fa4(%rip), %rsi    # 0x1f5e48
movb $0x0, %al
callq 0x5b9c0
leaq 0x30b0(%rsp), %rdi
leaq 0x38b0(%rsp), %rcx
leaq 0x11d1c0(%rip), %rsi    # 0x1d2082
leaq 0x14102a(%rip), %rdx    # 0x1f5ef3
movb $0x0, %al
callq 0x5b9c0
movq 0x40e8(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x30b0(%rsp), %r8
leaq 0x11d146(%rip), %rsi    # 0x1d2034
leaq 0x14103e(%rip), %rdx    # 0x1f5f33
movl $0x1232, %ecx           # imm = 0x1232
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4104(%rsp)
jmp 0xb552c
movsd 0x40c8(%rsp), %xmm1
movsd 0x40c0(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xb4f3a
movsd 0x40c8(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
jmp 0xb4f49
movsd 0x40c0(%rsp), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x58(%rsp), %xmm0
movsd %xmm0, 0x40c0(%rsp)
movsd 0x40c0(%rsp), %xmm0
movsd 0x13c587(%rip), %xmm1   # 0x1f14f0
ucomisd %xmm1, %xmm0
jne 0xb4f76
jp 0xb4f76
jmp 0xb5056
movq 0x40e0(%rsp), %rax
movw $0x1, 0x60(%rax)
movsd 0x11dccc(%rip), %xmm1   # 0x1d2c58
mulsd 0x40c0(%rsp), %xmm1
movq 0x40f8(%rsp), %rax
movsd 0x258(%rax), %xmm0
movq 0x40f8(%rsp), %rax
addsd 0x260(%rax), %xmm0
movsd 0x11dc93(%rip), %xmm2   # 0x1d2c50
mulsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0xb4ffb
movq 0x40f8(%rsp), %rax
movsd 0x258(%rax), %xmm0
movq 0x40f8(%rsp), %rax
addsd 0x260(%rax), %xmm0
movsd 0x11dc61(%rip), %xmm1   # 0x1d2c50
mulsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
jmp 0xb5012
movsd 0x11dc55(%rip), %xmm0   # 0x1d2c58
mulsd 0x40c0(%rsp), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x50(%rsp), %xmm0
movq 0x40e0(%rsp), %rax
movsd %xmm0, 0x68(%rax)
movq 0x40e8(%rsp), %rax
movswl 0x1060(%rax), %eax
cmpl $0x3, %eax
jle 0xb5054
movq 0x40e0(%rsp), %rax
movsd 0x68(%rax), %xmm0
leaq 0x140f02(%rip), %rdi    # 0x1f5f4f
movb $0x1, %al
callq 0x8030
jmp 0xb5056
movq 0x40e0(%rsp), %rax
movswl 0x60(%rax), %eax
cmpl $0x1, %eax
jne 0xb525d
movq 0x40e0(%rsp), %rax
movsd 0x68(%rax), %xmm0
movq 0x40f8(%rsp), %rax
mulsd (%rax), %xmm0
movsd 0x11d1bc(%rip), %xmm1   # 0x1d2248
ucomisd %xmm1, %xmm0
jbe 0xb510e
leaq 0x28b0(%rsp), %rdi
leaq 0x140eda(%rip), %rsi    # 0x1f5f7b
movb $0x0, %al
callq 0x5b9c0
leaq 0x20b0(%rsp), %rdi
leaq 0x28b0(%rsp), %rcx
leaq 0x11cfc3(%rip), %rsi    # 0x1d2082
leaq 0x140f36(%rip), %rdx    # 0x1f5ffc
movb $0x0, %al
callq 0x5b9c0
movq 0x40e8(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x20b0(%rsp), %r8
leaq 0x11cf49(%rip), %rsi    # 0x1d2034
leaq 0x140e41(%rip), %rdx    # 0x1f5f33
movl $0x1245, %ecx           # imm = 0x1245
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4104(%rsp)
jmp 0xb552c
movsd 0x40d8(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x40e0(%rsp), %rax
movsd 0x11db2b(%rip), %xmm1   # 0x1d2c58
mulsd 0x68(%rax), %xmm1
movq 0x40f8(%rsp), %rax
movsd 0x11d106(%rip), %xmm0   # 0x1d2248
divsd (%rax), %xmm0
movsd 0x11db32(%rip), %xmm2   # 0x1d2c80
subsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0xb5175
movq 0x40e0(%rsp), %rax
movsd 0x11daf0(%rip), %xmm0   # 0x1d2c58
mulsd 0x68(%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
jmp 0xb519b
movq 0x40f8(%rsp), %rax
movsd 0x11d0c3(%rip), %xmm0   # 0x1d2248
divsd (%rax), %xmm0
movsd 0x11daef(%rip), %xmm1   # 0x1d2c80
subsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x48(%rsp), %xmm1
movsd 0x40(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xb523d
movq 0x40e0(%rsp), %rax
movsd 0x11da97(%rip), %xmm1   # 0x1d2c58
mulsd 0x68(%rax), %xmm1
movq 0x40f8(%rsp), %rax
movsd 0x11d072(%rip), %xmm0   # 0x1d2248
divsd (%rax), %xmm0
movsd 0x11da9e(%rip), %xmm2   # 0x1d2c80
subsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0xb5209
movq 0x40e0(%rsp), %rax
movsd 0x11da5c(%rip), %xmm0   # 0x1d2c58
mulsd 0x68(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
jmp 0xb522f
movq 0x40f8(%rsp), %rax
movsd 0x11d02f(%rip), %xmm0   # 0x1d2248
divsd (%rax), %xmm0
movsd 0x11da5b(%rip), %xmm1   # 0x1d2c80
subsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
jmp 0xb524c
movsd 0x40d8(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x40d8(%rsp)
jmp 0xb52b2
movq 0x40f8(%rsp), %rax
movsd 0x198(%rax), %xmm1
movsd 0x40d8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xb528d
movsd 0x40d8(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
jmp 0xb52a3
movq 0x40f8(%rsp), %rax
movsd 0x198(%rax), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x40d8(%rsp)
movq 0x40e8(%rsp), %rax
movswl 0x1060(%rax), %eax
cmpl $0x2, %eax
jle 0xb52ed
movq 0x40f8(%rsp), %rax
movsd 0x190(%rax), %xmm0
movsd 0x40d8(%rsp), %xmm1
leaq 0x140d4d(%rip), %rdi    # 0x1f6033
movb $0x2, %al
callq 0x8030
cvtsi2sdl 0x40d4(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x40f8(%rsp), %rax
movsd 0x190(%rax), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd 0x18(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x40d8(%rsp), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
cmpl 0x40d4(%rsp), %eax
jge 0xb5359
movl 0x40d4(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0xb53b1
cvtsi2sdl 0x40d4(%rsp), %xmm0
movsd %xmm0, (%rsp)
movq 0x40f8(%rsp), %rax
movsd 0x190(%rax), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x40d8(%rsp), %xmm0
callq 0x82f0
movaps %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl %eax, 0x40d4(%rsp)
movsd 0x40d8(%rsp), %xmm0
movq 0x40f8(%rsp), %rax
movsd %xmm0, 0x190(%rax)
movl 0x40d4(%rsp), %ecx
movq 0x40f8(%rsp), %rax
movl %ecx, 0x1ac(%rax)
movsd 0x40d8(%rsp), %xmm0
movq 0x40f8(%rsp), %rax
mulsd (%rax), %xmm0
movsd 0x11ce41(%rip), %xmm1   # 0x1d2248
ucomisd %xmm1, %xmm0
jbe 0xb5489
leaq 0x18b0(%rsp), %rdi
leaq 0x140c5d(%rip), %rsi    # 0x1f6079
movb $0x0, %al
callq 0x5b9c0
leaq 0x10b0(%rsp), %rdi
leaq 0x18b0(%rsp), %rcx
leaq 0x11cc48(%rip), %rsi    # 0x1d2082
leaq 0x140cc7(%rip), %rdx    # 0x1f6108
movb $0x0, %al
callq 0x5b9c0
movq 0x40e8(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x10b0(%rsp), %r8
leaq 0x11cbce(%rip), %rsi    # 0x1d2034
leaq 0x140ac6(%rip), %rdx    # 0x1f5f33
movl $0x125a, %ecx           # imm = 0x125A
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4104(%rsp)
jmp 0xb552c
movsd 0x40d8(%rsp), %xmm1
movq 0x40f8(%rsp), %rax
movsd 0x278(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xb5521
leaq 0x8b0(%rsp), %rdi
leaq 0x140c82(%rip), %rsi    # 0x1f6139
movb $0x0, %al
callq 0x5b9c0
leaq 0xb0(%rsp), %rdi
leaq 0x8b0(%rsp), %rcx
leaq 0x11cbad(%rip), %rsi    # 0x1d2082
leaq 0x13cf8d(%rip), %rdx    # 0x1f2469
movb $0x0, %al
callq 0x5b9c0
movq 0x40e8(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0xb0(%rsp), %r8
leaq 0x11cb33(%rip), %rsi    # 0x1d2034
leaq 0x140a2b(%rip), %rdx    # 0x1f5f33
movl $0x125d, %ecx           # imm = 0x125D
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x4104(%rsp)
jmp 0xb552c
movl $0x0, 0x4104(%rsp)
movl 0x4104(%rsp), %eax
addq $0x4108, %rsp           # imm = 0x4108
retq
nopl (%rax,%rax)