// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../external/HyRec2020/history.c
// Function: rec_build_history
char* rec_build_history(HYREC_DATA *data, int model, double *hubble_array){

  REC_COSMOPARAMS *cosmo = data->cosmo;
  int *error = &data->error;

  double *xe_output = data->xe_output, *Tm_output = data->Tm_output;
  int Nz = data->Nz;
  double zstart = data->zmax, zend = data->zmin;
  long iz;
  double dxHIIdlna_prev[2], dTmdlna_prev[2], dxHeIIdlna_prev[2];
  double dxHIIdlna_prev_sub[2], dxHeIIdlna_prev_sub[2], xHeII_prev[4];
  double z, dz, DLNA, Delta_xe, xHeII, xH1, dEdtdV_dep, nH, H;
  double *ion = &cosmo->inj_params->ion;
  double *exclya = &cosmo->inj_params->exclya;
  double z_out=0., H_next;
  int flag=10;
  double xe_i, Tm_i;

  DLNA = cosmo->dlna;
  dz = zstart/Nz;
  // Index at which we start integrating Hydrogen recombination, and corresponding redshift
  data->rad->iz_rad_0  = (long) floor(1 + log(kBoltz*cosmo->T0/square(cosmo->fsR)/cosmo->meR*(1.+zstart)/TR_MAX)/DLNA);
  data->rad->z0   = (1.+zstart)*exp(-data->rad->iz_rad_0 * DLNA) - 1.;

  z = zstart;
  /********* He III -> II Saha phase. Tm = Tr. Stop when xHeIII = 1e-8 *********/
  Delta_xe = cosmo->fHe;   /* Delta_xe = xHeIII here */
  for(iz = 0; z >= 0. && Delta_xe > 1e-8; iz++) {
    z = (1.+zstart)*exp(-cosmo->dlna*iz) - 1.;
    xe_output[iz] = rec_xesaha_HeII_III(cosmo, z, &Delta_xe);
    Tm_output[iz] = cosmo->T0 * (1.+z);
  }

  /******** He II -> I recombination.
    Hydrogen in Saha equilibrium.
    Tm fixed to steady state.
    Neglect any energy injection.
    Integrate until TR is low enough that can start integrating hydrogen recombination
    (this occurs at index izH0 computed in rec_get_cosmoparam).
    Start with quasi-equilibrium approximation.
  ********/

  dxHeIIdlna_prev[1] = dxHeIIdlna_prev[0] = 0.;

  xHeII    = rec_saha_xHeII(cosmo, z);
  data->quasi_eq = 1;                    /* Start with post-saha expansion */

  dxHeIIdlna_prev_sub[1] = dxHeIIdlna_prev[1];
  dxHeIIdlna_prev_sub[0] = dxHeIIdlna_prev[0];
  xHeII_prev[3] = xHeII;
  xHeII_prev[2] = xHeII;
  xHeII_prev[1] = xHeII;
  xHeII_prev[0] = xHeII;

  data->loop_after_quasi=1;
  for(; iz <= data->rad->iz_rad_0; iz++) {

    if (model == SWIFT && data->quasi_eq == 0 && data->loop_after_quasi == 1){
      xe_i = xe_output[iz-1]; Tm_i = Tm_output[iz-1];
      for (flag=0;flag<10;flag++) {
        rec_get_xe_next1_He(data, z, &xHeII, dxHeIIdlna_prev_sub, hubble_array, flag);
        z  = (1.+zstart)*exp(-DLNA*(iz-1+(flag+1)/10.)) - 1.;
        xH1 = rec_saha_xH1s(cosmo, z, xHeII);
        xe_i = 1.-xH1 + xHeII;

        if (hubble_array[0]==-1.) H  = rec_HubbleRate(cosmo, z);
        else H = rec_interp1d(.0, dz, hubble_array, Nz, z, error, data->error_message);
        Tm_i = rec_Tmss(z, xe_i, cosmo, 0., H);
      }
      xe_output[iz] = xe_i; Tm_output[iz] = Tm_i;

      xHeII_prev[3] = xHeII_prev[2];
      xHeII_prev[2] = xHeII_prev[1];
      xHeII_prev[1] = xHeII_prev[0];
      xHeII_prev[0] = xHeII;
      dxHeIIdlna_prev[1] = (xHeII_prev[1] - xHeII_prev[3])/2./DLNA;
      dxHeIIdlna_prev[0] = (xHeII_prev[0] - xHeII_prev[2])/2./DLNA;

      if (fabs(1-dxHeIIdlna_prev[1]/dxHeIIdlna_prev[0])<DXHEII_DIFF_MAX) data->loop_after_quasi = 0;
    }
    else{
      rec_get_xe_next1_He(data, z, &xHeII, dxHeIIdlna_prev, hubble_array, flag);
      z             = (1.+zstart)*exp(-DLNA*iz) - 1.;
      xH1           = rec_saha_xH1s(cosmo, z, xHeII);
      xe_output[iz] = 1.-xH1 + xHeII;

      if (hubble_array[0]==-1.) H  = rec_HubbleRate(cosmo, z);
      else H = rec_interp1d(.0, dz, hubble_array, Nz, z, error, data->error_message);

      Tm_output[iz] = rec_Tmss(z, xe_output[iz], cosmo, 0., H);
    }

    if (*error == 1) return data->error_message;
  }

  /******** H II -> I and He II -> I simultaneous recombination (rarely needed but just in case)
        Tm fixed to steady state.
        Integrate H and He simultaneously until xHeII < XHEII_MIN
        Start with post-saha expansion for hydrogen
        Now account for possible energy injection.
        Solve for dEdtdV_dep simultaneously;
  ********/

  dxHIIdlna_prev[1] = (xe_output[iz-2] - xe_output[iz-4])/2./DLNA - dxHeIIdlna_prev[1];
  dxHIIdlna_prev[0] = (xe_output[iz-1] - xe_output[iz-3])/2./DLNA - dxHeIIdlna_prev[0];
  data->quasi_eq          = 1;

  // Initialize energy *deposition*
  dEdtdV_dep = 0.;
  nH = cosmo->nH0*cube(1.+z);

  if (hubble_array[0]==-1.) H  = rec_HubbleRate(cosmo, z);
  else H = rec_interp1d(.0, dz, hubble_array, Nz, z, error, data->error_message);

  update_dEdtdV_dep(z, DLNA, xe_output[iz-1], Tm_output[iz-1], nH, H, cosmo->inj_params, &dEdtdV_dep);
  *ion = dEdtdV_dep/3. /nH *xH1 /EI;
  *exclya = *ion /0.75;

  for(; z >= 0. && xHeII > XHEII_MIN; iz++) {

    get_rec_next2_HHe(data, model, z, iz, &xH1, &xHeII, dxHIIdlna_prev, dxHeIIdlna_prev, H);
    xe_output[iz] = 1.-xH1 + xHeII;

    z  = (1.+zstart)*exp(-DLNA*iz) - 1.;

    if (hubble_array[0]==-1.) H  = rec_HubbleRate(cosmo, z);
    else H = rec_interp1d(.0, dz, hubble_array, Nz, z, error, data->error_message);

    nH = cosmo->nH0*cube(1.+z);
    Tm_output[iz] = rec_Tmss(z, xe_output[iz], cosmo, dEdtdV_dep, H);
    update_dEdtdV_dep(z, DLNA, xe_output[iz], Tm_output[iz], nH, H, cosmo->inj_params, &dEdtdV_dep);
    *ion = dEdtdV_dep/3. /nH *xH1 /EI;
    *exclya = *ion /0.75;

    if (*error == 1) return data->error_message;
  }

  /******** H recombination. Helium assumed entirely neutral.
        Tm fixed to steady-state until its relative difference from Tr is DLNT_MAX
  ********/
  dxHIIdlna_prev_sub[1] = dxHIIdlna_prev[1];
  dxHIIdlna_prev_sub[0] = dxHIIdlna_prev[0];
  data->loop_after_quasi = 1;
  for (; z >= 0. && fabs(1.-Tm_output[iz-1]/cosmo->T0/(1.+z)) < DLNT_MAX; iz++) {

    if (model == SWIFT && data->loop_after_quasi == 1){
      xe_i = xe_output[iz-1]; Tm_i = Tm_output[iz-1];
      for (flag=0;flag<10;flag++) {
        rec_get_xe_next1_H(data, model, z, iz, xe_i, Tm_i, &xe_i, &Tm_i, dxHIIdlna_prev_sub, H, flag);
        z  = (1.+zstart)*exp(-DLNA*(iz-1+(flag+1)/10.)) - 1.;
        nH = cosmo->nH0*cube(1.+z);

        if (hubble_array[0]==-1.) H  = rec_HubbleRate(cosmo, z);
        else H = rec_interp1d(.0, dz, hubble_array, Nz, z, error, data->error_message);

        update_dEdtdV_dep(z, DLNA/10., xe_i, Tm_i, nH, H, cosmo->inj_params, &dEdtdV_dep);
        *ion = dEdtdV_dep/3. /nH *(1.-xe_i) /EI;
        *exclya = *ion /0.75;
      }
      xe_output[iz] = xe_i; Tm_output[iz] = Tm_i;
      dxHIIdlna_prev[1] = (xe_output[iz-1] - xe_output[iz-3])/2./DLNA;
      dxHIIdlna_prev[0] = (xe_output[iz] - xe_output[iz-2])/2./DLNA;

      if (fabs(1-dxHIIdlna_prev[1]/dxHIIdlna_prev[0])<DXHII_DIFF_MAX) data->loop_after_quasi=0;
    }

    else{
      rec_get_xe_next1_H(data, model, z, iz, xe_output[iz-1], Tm_output[iz-1], xe_output+iz, Tm_output+iz,
                         dxHIIdlna_prev, H, flag);
      if (data->quasi_eq == 1){
          dxHIIdlna_prev[1] = (xe_output[iz-2] - xe_output[iz-4])/2./DLNA;
          dxHIIdlna_prev[0] = (xe_output[iz-1] - xe_output[iz-3])/2./DLNA;
      }
      z  = (1.+zstart)*exp(-DLNA*iz) - 1.;
      z_out  = (1.+zstart)*exp(-DLNA*(iz+1)) - 1.;
      nH = cosmo->nH0*cube(1.+z);

      if (hubble_array[0]==-1.) H  = rec_HubbleRate(cosmo, z);
      else H = rec_interp1d(.0, dz, hubble_array, Nz, z, error, data->error_message);

      update_dEdtdV_dep(z, DLNA, xe_output[iz], Tm_output[iz], nH, H, cosmo->inj_params, &dEdtdV_dep);
      *ion = dEdtdV_dep/3. /nH *(1.-xe_output[iz]) /EI;
      *exclya = *ion /0.75;
    }
    if (*error == 1) return data->error_message;
  }

  /******** Evolve xe and Tm simultaneously until z = zend
      Note that the radiative transfer calculation is switched off automatically in the functions
      rec_get_xe_next1_H and rec_get_xe_next2_HTm when it is no longer relevant.
  ********/

  dTmdlna_prev[1] = (Tm_output[iz-2] - Tm_output[iz-4])/2./DLNA;
  dTmdlna_prev[0] = (Tm_output[iz-1] - Tm_output[iz-3])/2./DLNA;

  if (hubble_array[0]==-1.) {
    H  = rec_HubbleRate(cosmo, z);
    H_next  = rec_HubbleRate(cosmo, z_out);
  }
  else {
    H = rec_interp1d(.0, dz, hubble_array, Nz, z, error, data->error_message);
    H_next = rec_interp1d(.0, dz, hubble_array, Nz, z_out, error, data->error_message);
  }

  for(; z > zend; iz++) {
    rec_get_xe_next2_HTm(data, model, z, iz, dxHIIdlna_prev, dTmdlna_prev, H, z_out, H_next);
    z  = (1.+zstart)*exp(-DLNA*iz) - 1.;
    z_out  = (1.+zstart)*exp(-DLNA*(iz+1)) - 1.;
    if (z < zend) z=0.;

    if (hubble_array[0]==-1.) {
      H  = rec_HubbleRate(cosmo, z);
      H_next  = rec_HubbleRate(cosmo, z_out);
    }
    else {
      H = rec_interp1d(.0, dz, hubble_array, Nz, z, error, data->error_message);
      if (z_out > zend) H_next = rec_interp1d(.0, dz, hubble_array, Nz, z_out, error, data->error_message);
      else H_next = H;
    }
    nH = cosmo->nH0*cube(1.+z);
    update_dEdtdV_dep(z, DLNA, xe_output[iz], Tm_output[iz], nH, H, cosmo->inj_params, &dEdtdV_dep);
    *ion = dEdtdV_dep/3. /nH *(1.-xe_output[iz]) /EI;
    *exclya = *ion /0.75;

    if (*error == 1) return data->error_message;
  }
  return data->error_message;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdx, %rbx
movl %esi, 0x5c(%rsp)
movq %rdi, %r14
movq 0x8(%rdi), %r15
movq 0x28(%rdi), %rbp
movq 0x30(%rdi), %rax
movq %rax, 0x70(%rsp)
movl 0x20(%rdi), %eax
movsd 0x10(%rdi), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x18(%rdi), %xmm0
movsd %xmm0, 0xb8(%rsp)
movq 0xb8(%r15), %rcx
movq %rcx, 0xb0(%rsp)
movsd 0xa8(%r15), %xmm0
movaps %xmm0, 0xc0(%rsp)
movl %eax, 0x24(%rsp)
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x40(%rsp)
movsd 0x8(%r15), %xmm1
movsd 0x98(%r15), %xmm0
mulsd 0x4e3b6(%rip), %xmm1    # 0x121208
movsd %xmm1, 0x10(%rsp)
callq 0xcbe48
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
divsd 0xa0(%r15), %xmm1
movsd 0x30(%rsp), %xmm0
addsd 0x123e2(%rip), %xmm0    # 0xe5260
movsd %xmm0, 0x78(%rsp)
mulsd %xmm0, %xmm1
divsd 0x15618(%rip), %xmm1    # 0xe84a8
movapd %xmm1, %xmm0
callq 0x82e0
divsd 0xc0(%rsp), %xmm0
addsd 0x123b6(%rip), %xmm0    # 0xe5260
callq 0x8610
cvttsd2si %xmm0, %rax
movq 0x58(%r14), %rcx
movq %rax, 0x8(%rcx)
negq %rax
cvtsi2sd %rax, %xmm0
mulsd 0xc0(%rsp), %xmm0
callq 0x86a0
movsd 0x30(%rsp), %xmm1
mulsd 0x78(%rsp), %xmm0
addsd 0x12902(%rip), %xmm0    # 0xe57e8
movq %r14, 0x38(%rsp)
movq 0x58(%r14), %rax
movsd %xmm0, (%rax)
movsd 0x80(%r15), %xmm0
leaq 0x158(%rsp), %r12
movsd %xmm0, (%r12)
xorl %r13d, %r13d
movq %rbp, 0x90(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0xa0(%rsp)
movapd %xmm1, %xmm2
ucomisd 0x1232a(%rip), %xmm2    # 0xe5258
jb 0xd2fd0
ucomisd 0x12d6c(%rip), %xmm0    # 0xe5ca8
jbe 0xd2fd0
movsd 0xa8(%r15), %xmm1
xorpd 0x122dd(%rip), %xmm1    # 0xe5230
cvtsi2sd %r13, %xmm0
mulsd %xmm1, %xmm0
callq 0x86a0
mulsd 0x78(%rsp), %xmm0
addsd 0x12879(%rip), %xmm0    # 0xe57e8
movapd %xmm0, 0x10(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xcc63c
movapd 0x10(%rsp), %xmm2
movsd 0x30(%rsp), %xmm1
movsd %xmm0, (%rbp)
movapd %xmm2, %xmm0
addsd 0x122c3(%rip), %xmm0    # 0xe5260
mulsd 0x8(%r15), %xmm0
movq 0xa0(%rsp), %rax
movsd %xmm0, (%rax)
incq %r13
movsd 0x158(%rsp), %xmm0
addq $0x8, %rax
movq %rax, 0xa0(%rsp)
addq $0x8, %rbp
jmp 0xd2f26
movq 0x38(%rsp), %r12
leaq 0x38(%r12), %rax
movq %rax, 0x28(%rsp)
divsd 0x40(%rsp), %xmm1
movsd %xmm1, 0x30(%rsp)
xorpd %xmm0, %xmm0
leaq 0x140(%rsp), %rax
movapd %xmm0, (%rax)
movq %r15, %rdi
movapd %xmm2, %xmm0
movapd %xmm2, 0x10(%rsp)
callq 0xcc7c5
movapd 0x10(%rsp), %xmm2
movapd %xmm0, %xmm3
leaq 0xa8(%rsp), %rax
movsd %xmm0, (%rax)
pushq $0x1
popq %rax
movl %eax, 0x3c(%r12)
leaq 0x160(%rsp), %rcx
xorpd %xmm0, %xmm0
movapd %xmm0, (%rcx)
movl %eax, 0x40(%r12)
movaps 0x121e9(%rip), %xmm1    # 0xe5230
movaps 0xc0(%rsp), %xmm0
xorps %xmm0, %xmm1
movaps %xmm1, 0xd0(%rsp)
movapd %xmm3, %xmm1
unpcklpd %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0]
movapd %xmm1, 0x100(%rsp)
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0xf0(%rsp)
movapd %xmm3, 0x40(%rsp)
movapd %xmm3, %xmm0
movq 0x58(%r12), %rax
cmpq 0x8(%rax), %r13
jg 0xd3402
movapd %xmm0, 0x130(%rsp)
cmpl $0x4, 0x5c(%rsp)
jne 0xd320a
cmpl $0x0, 0x3c(%r12)
jne 0xd320a
cmpl $0x1, 0x40(%r12)
jne 0xd320a
leaq -0x1(%r13), %rax
movq 0x90(%rsp), %rcx
movsd -0x8(%rcx,%r13,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x70(%rsp), %rcx
movsd -0x8(%rcx,%r13,8), %xmm0
cvtsi2sd %rax, %xmm1
movsd %xmm1, 0x98(%rsp)
pushq $0x1
popq %rax
movl %eax, %r12d
cmpl $0xb, %r12d
je 0xd3353
leal -0x1(%r12), %r8d
movq 0x38(%rsp), %r14
movq %r14, %rdi
movapd %xmm2, %xmm0
leaq 0xa8(%rsp), %rsi
leaq 0x160(%rsp), %rdx
movq %rbx, %rcx
callq 0xd1cca
cvtsi2sd %r12d, %xmm0
divsd 0x126bc(%rip), %xmm0    # 0xe57f0
addsd 0x98(%rsp), %xmm0
mulsd 0xd0(%rsp), %xmm0
callq 0x86a0
movapd %xmm0, %xmm2
mulsd 0x78(%rsp), %xmm2
movsd 0x1268b(%rip), %xmm0    # 0xe57e8
addsd %xmm0, %xmm2
movsd 0xa8(%rsp), %xmm1
movq %r15, %rdi
movapd %xmm2, 0x10(%rsp)
movapd %xmm2, %xmm0
movaps %xmm1, 0x40(%rsp)
callq 0xcc936
movsd %xmm0, 0x60(%rsp)
movsd (%rbx), %xmm0
ucomisd 0x12655(%rip), %xmm0    # 0xe57e8
jne 0xd31a7
jp 0xd31a7
movq %r15, %rdi
movapd 0x10(%rsp), %xmm0
callq 0xd0bdc
jmp 0xd31cc
movq 0x48(%r14), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl 0x24(%rsp), %esi
movapd 0x10(%rsp), %xmm2
movq 0x28(%rsp), %rdx
callq 0xcc0a7
movapd %xmm0, %xmm3
movsd 0x12088(%rip), %xmm1    # 0xe5260
subsd 0x60(%rsp), %xmm1
addsd 0x40(%rsp), %xmm1
xorpd %xmm2, %xmm2
movapd 0x10(%rsp), %xmm0
movsd %xmm1, 0x8(%rsp)
movq %r15, %rdi
callq 0xd18ba
incl %r12d
movapd 0x10(%rsp), %xmm2
jmp 0xd30f4
movq %r12, %rdi
movapd %xmm2, %xmm0
leaq 0xa8(%rsp), %rsi
leaq 0x140(%rsp), %rdx
movq %rbx, %rcx
pushq $0xa
popq %r8
callq 0xd1cca
cvtsi2sd %r13, %xmm0
mulsd 0xd0(%rsp), %xmm0
callq 0x86a0
movapd %xmm0, %xmm2
mulsd 0x78(%rsp), %xmm2
movsd 0x12596(%rip), %xmm0    # 0xe57e8
addsd %xmm0, %xmm2
movsd 0xa8(%rsp), %xmm1
movaps %xmm1, 0x40(%rsp)
movq %r15, %rdi
movapd %xmm2, 0x10(%rsp)
movapd %xmm2, %xmm0
callq 0xcc936
movapd %xmm0, %xmm1
movsd 0x11fde(%rip), %xmm0    # 0xe5260
movsd %xmm1, 0x60(%rsp)
subsd %xmm1, %xmm0
addsd 0x40(%rsp), %xmm0
movq 0x90(%rsp), %rax
movsd %xmm0, (%rax,%r13,8)
movsd (%rbx), %xmm0
ucomisd 0x1253c(%rip), %xmm0    # 0xe57e8
jne 0xd32c9
jp 0xd32c9
movq %r15, %rdi
movapd 0x10(%rsp), %xmm0
callq 0xd0bdc
movapd %xmm0, %xmm3
movq 0x28(%rsp), %r14
jmp 0xd32f6
movq 0x48(%r12), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl 0x24(%rsp), %esi
movapd 0x10(%rsp), %xmm2
movq 0x28(%rsp), %r14
movq %r14, %rdx
callq 0xcc0a7
movapd %xmm0, %xmm3
movq 0x90(%rsp), %rax
movsd (%rax,%r13,8), %xmm1
xorpd %xmm2, %xmm2
movaps 0x10(%rsp), %xmm0
movq %r15, %rdi
callq 0xd18ba
movq 0x70(%rsp), %rax
movsd %xmm0, (%rax,%r13,8)
movapd 0x130(%rsp), %xmm0
movapd 0x10(%rsp), %xmm2
cmpl $0x1, (%r14)
je 0xd4038
incq %r13
addq $0x8, 0xa0(%rsp)
addq $0x8, %rbp
movq 0x38(%rsp), %r12
jmp 0xd3080
movq 0x90(%rsp), %rax
movsd 0x8(%rsp), %xmm1
movsd %xmm1, (%rax,%r13,8)
movq 0x70(%rsp), %rax
movsd %xmm0, (%rax,%r13,8)
movapd 0x40(%rsp), %xmm3
movapd %xmm3, %xmm0
movapd 0x130(%rsp), %xmm5
unpcklpd %xmm5, %xmm0            # xmm0 = xmm0[0],xmm5[0]
movapd 0x100(%rsp), %xmm4
subpd %xmm4, %xmm0
mulpd 0x4e2e2(%rip), %xmm0    # 0x121680
divpd 0xf0(%rsp), %xmm0
movapd %xmm0, 0x140(%rsp)
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
divsd %xmm0, %xmm1
movsd 0x11e9c(%rip), %xmm0    # 0xe5260
subsd %xmm1, %xmm0
andpd 0x11e70(%rip), %xmm0    # 0xe5240
movsd 0x128e0(%rip), %xmm1    # 0xe5cb8
ucomisd %xmm0, %xmm1
unpcklpd %xmm4, %xmm5            # xmm5 = xmm5[0],xmm4[0]
jbe 0xd33eb
movq 0x38(%rsp), %rax
andl $0x0, 0x40(%rax)
movapd %xmm3, %xmm0
movapd %xmm5, 0x100(%rsp)
movq 0x28(%rsp), %r14
jmp 0xd332f
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x128(%rsp)
movq 0x90(%rsp), %rax
movupd -0x20(%rax,%r13,8), %xmm0
movupd -0x10(%rax,%r13,8), %xmm1
subpd %xmm0, %xmm1
mulpd 0x4e24d(%rip), %xmm1    # 0x121680
divpd 0xf0(%rsp), %xmm1
shufpd $0x1, %xmm1, %xmm1      # xmm1 = xmm1[1,0]
subpd 0x140(%rsp), %xmm1
movapd %xmm1, 0xe0(%rsp)
movl $0x1, 0x3c(%r12)
andq $0x0, 0x80(%rsp)
movsd 0x88(%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x11de4(%rip), %xmm0    # 0xe5260
addsd %xmm2, %xmm0
movapd %xmm2, 0x10(%rsp)
callq 0xcbe4d
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
movsd (%rbx), %xmm0
ucomisd 0x12342(%rip), %xmm0    # 0xe57e8
jne 0xd34ba
jp 0xd34ba
movq %r15, %rdi
movapd 0x10(%rsp), %xmm0
callq 0xd0bdc
jmp 0xd34e0
movq 0x48(%r12), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl 0x24(%rsp), %esi
movapd 0x10(%rsp), %xmm2
movq 0x28(%rsp), %rdx
callq 0xcc0a7
movapd %xmm0, %xmm5
movq 0x90(%rsp), %rax
movsd -0x8(%rax,%r13,8), %xmm2
movq 0x70(%rsp), %rax
movsd -0x8(%rax,%r13,8), %xmm3
movq 0xb8(%r15), %rdi
leaq 0x80(%rsp), %r14
movaps 0x10(%rsp), %xmm0
movaps 0xc0(%rsp), %xmm1
movsd 0x98(%rsp), %xmm4
movsd %xmm5, 0x8(%rsp)
movq %r14, %rsi
callq 0xd52c1
movsd (%r14), %xmm0
divsd 0x13209(%rip), %xmm0    # 0xe6748
divsd 0x98(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
mulsd %xmm0, %xmm1
divsd 0x4e106(%rip), %xmm1    # 0x121660
movq 0xb0(%rsp), %rax
movsd %xmm1, 0x60(%rax)
divsd 0x164a9(%rip), %xmm1    # 0xe9a18
movsd %xmm1, 0x68(%rax)
leaq 0xe0(%rsp), %r12
movapd 0x10(%rsp), %xmm4
ucomisd 0x11cce(%rip), %xmm4    # 0xe5258
movapd 0x40(%rsp), %xmm0
jb 0xd3790
ucomisd 0x12732(%rip), %xmm0    # 0xe5cd0
jbe 0xd3790
leaq 0x140(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %r14
movq %r14, %rdi
movl 0x5c(%rsp), %esi
movapd %xmm4, %xmm0
movq %r13, %rdx
leaq 0x128(%rsp), %rcx
leaq 0xa8(%rsp), %r8
movq %r12, %r9
movsd 0x8(%rsp), %xmm1
callq 0xd24a1
movsd 0x128(%rsp), %xmm1
movsd 0x11c6e(%rip), %xmm0    # 0xe5260
movsd %xmm1, 0x98(%rsp)
subsd %xmm1, %xmm0
movsd 0xa8(%rsp), %xmm1
movapd %xmm1, 0x40(%rsp)
addsd %xmm1, %xmm0
movsd %xmm0, (%rbp)
cvtsi2sd %r13, %xmm0
mulsd 0xd0(%rsp), %xmm0
callq 0x86a0
movapd %xmm0, %xmm2
mulsd 0x78(%rsp), %xmm2
movsd 0x121ac(%rip), %xmm1    # 0xe57e8
addsd %xmm1, %xmm2
movsd (%rbx), %xmm0
ucomisd %xmm1, %xmm0
movapd %xmm2, 0x10(%rsp)
jne 0xd366b
jp 0xd366b
movq %r15, %rdi
movapd %xmm2, %xmm0
callq 0xd0bdc
movsd %xmm0, 0x8(%rsp)
movq 0x28(%rsp), %r14
jmp 0xd3693
movq 0x48(%r14), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl 0x24(%rsp), %esi
movq 0x28(%rsp), %r14
movq %r14, %rdx
callq 0xcc0a7
movsd %xmm0, 0x8(%rsp)
movsd 0x88(%r15), %xmm0
movsd %xmm0, 0x60(%rsp)
movapd 0x10(%rsp), %xmm0
addsd 0x11bb0(%rip), %xmm0    # 0xe5260
callq 0xcbe4d
mulsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd (%rbp), %xmm1
movsd 0x80(%rsp), %xmm2
movapd 0x10(%rsp), %xmm0
movq %r15, %rdi
movsd 0x8(%rsp), %xmm3
callq 0xd18ba
movapd %xmm0, %xmm3
movq 0xa0(%rsp), %rax
movsd %xmm0, (%rax)
movsd (%rbp), %xmm2
movq 0xb8(%r15), %rdi
movaps 0x10(%rsp), %xmm0
movaps 0xc0(%rsp), %xmm1
movsd 0x60(%rsp), %xmm4
movsd 0x8(%rsp), %xmm5
leaq 0x80(%rsp), %rsi
callq 0xd52c1
movsd 0x80(%rsp), %xmm0
divsd 0x13012(%rip), %xmm0    # 0xe6748
divsd 0x60(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
mulsd %xmm0, %xmm1
divsd 0x4df0f(%rip), %xmm1    # 0x121660
movq 0xb0(%rsp), %rax
movsd %xmm1, 0x60(%rax)
divsd 0x162b2(%rip), %xmm1    # 0xe9a18
movsd %xmm1, 0x68(%rax)
cmpl $0x1, (%r14)
movapd 0x10(%rsp), %xmm4
je 0xd4038
incq %r13
addq $0x8, 0xa0(%rsp)
addq $0x8, %rbp
jmp 0xd3582
leaq 0xe0(%rsp), %rax
movaps (%rax), %xmm0
leaq 0x170(%rsp), %rax
movaps %xmm0, (%rax)
movq 0x38(%rsp), %r14
movl $0x1, 0x40(%r14)
movapd 0xc0(%rsp), %xmm0
divsd 0x1202c(%rip), %xmm0    # 0xe57f0
movapd %xmm0, 0x100(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x88(%rsp)
ucomisd 0x11a76(%rip), %xmm4    # 0xe5258
movl 0x24(%rsp), %r12d
jb 0xd3d0f
movq 0x70(%rsp), %rax
movsd -0x8(%rax,%r13,8), %xmm5
movapd %xmm5, %xmm0
divsd 0x8(%r15), %xmm0
movapd %xmm4, %xmm1
movsd 0x11a51(%rip), %xmm2    # 0xe5260
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movapd %xmm2, %xmm1
subsd %xmm0, %xmm1
andpd 0x11a19(%rip), %xmm1    # 0xe5240
movsd 0x4de39(%rip), %xmm0    # 0x121668
ucomisd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm3
jbe 0xd3d1d
cmpl $0x4, 0x5c(%rsp)
jne 0xd3a4d
cmpl $0x1, 0x40(%r14)
jne 0xd3a4d
leaq -0x1(%r13), %rax
movq 0x90(%rsp), %rcx
movsd -0x8(%rcx,%r13,8), %xmm2
movsd %xmm2, 0x120(%rsp)
movapd %xmm5, 0x60(%rsp)
movsd %xmm5, 0x118(%rsp)
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x130(%rsp)
pushq $0x1
popq %rax
movl %eax, %r12d
cmpl $0xb, %r12d
je 0xd3c57
leal -0x1(%r12), %eax
movl %eax, (%rsp)
movq 0x38(%rsp), %r14
movq %r14, %rdi
pushq $0x4
popq %rsi
movapd %xmm4, %xmm0
movq %r13, %rdx
movapd %xmm2, %xmm1
movaps 0x60(%rsp), %xmm2
leaq 0x120(%rsp), %rcx
leaq 0x118(%rsp), %r8
leaq 0x170(%rsp), %r9
callq 0xd278a
cvtsi2sd %r12d, %xmm0
divsd 0x11f05(%rip), %xmm0    # 0xe57f0
addsd 0x130(%rsp), %xmm0
mulsd 0xd0(%rsp), %xmm0
callq 0x86a0
movapd %xmm0, %xmm1
mulsd 0x78(%rsp), %xmm1
movsd 0x11ed4(%rip), %xmm0    # 0xe57e8
addsd %xmm0, %xmm1
movsd 0x88(%r15), %xmm0
movsd %xmm0, 0x40(%rsp)
movapd %xmm1, 0x10(%rsp)
addsd 0x1192b(%rip), %xmm1    # 0xe5260
movapd %xmm1, %xmm0
callq 0xcbe4d
movsd %xmm0, 0x60(%rsp)
movsd (%rbx), %xmm0
ucomisd 0x11e98(%rip), %xmm0    # 0xe57e8
jne 0xd3964
jp 0xd3964
movq %r15, %rdi
movapd 0x10(%rsp), %xmm0
callq 0xd0bdc
jmp 0xd3988
movq 0x48(%r14), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl 0x24(%rsp), %esi
movaps 0x10(%rsp), %xmm2
movq 0x28(%rsp), %rdx
callq 0xcc0a7
movsd %xmm0, 0x8(%rsp)
movsd 0x40(%rsp), %xmm4
mulsd 0x60(%rsp), %xmm4
movsd %xmm4, 0x40(%rsp)
movsd 0x120(%rsp), %xmm2
movsd %xmm2, 0x98(%rsp)
movsd 0x118(%rsp), %xmm3
movq 0xb8(%r15), %rdi
movaps 0x10(%rsp), %xmm0
movaps 0x100(%rsp), %xmm1
movaps %xmm3, 0x60(%rsp)
movsd 0x8(%rsp), %xmm5
leaq 0x80(%rsp), %rsi
callq 0xd52c1
movsd 0x98(%rsp), %xmm2
movsd 0x8(%rsp), %xmm3
movsd 0x80(%rsp), %xmm0
divsd 0x12d41(%rip), %xmm0    # 0xe6748
divsd 0x40(%rsp), %xmm0
movsd 0x1184b(%rip), %xmm1    # 0xe5260
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
divsd 0x4dc3b(%rip), %xmm1    # 0x121660
movq 0xb0(%rsp), %rax
movsd %xmm1, 0x60(%rax)
divsd 0x15fde(%rip), %xmm1    # 0xe9a18
movsd %xmm1, 0x68(%rax)
incl %r12d
movapd 0x10(%rsp), %xmm4
jmp 0xd3894
movq 0x90(%rsp), %rax
leaq (%rax,%r13,8), %r12
movsd -0x8(%r12), %xmm1
movq 0x70(%rsp), %rax
leaq (%rax,%r13,8), %r8
movl $0xa, (%rsp)
movq %r14, %rdi
movl 0x5c(%rsp), %esi
movapd %xmm4, %xmm0
movq %r13, %rdx
movapd %xmm5, %xmm2
movq %r12, %rcx
movq %r8, 0x60(%rsp)
leaq 0xe0(%rsp), %r9
callq 0xd278a
cmpl $0x1, 0x3c(%r14)
jne 0xd3acf
movupd -0x20(%r12), %xmm0
movupd -0x10(%r12), %xmm1
subpd %xmm0, %xmm1
mulpd 0x4dbc8(%rip), %xmm1    # 0x121680
divpd 0xf0(%rsp), %xmm1
shufpd $0x1, %xmm1, %xmm1      # xmm1 = xmm1[1,0]
movapd %xmm1, 0xe0(%rsp)
cvtsi2sd %r13, %xmm0
mulsd 0xd0(%rsp), %xmm0
callq 0x86a0
movapd %xmm0, %xmm1
mulsd 0x78(%rsp), %xmm1
movsd 0x11cf4(%rip), %xmm0    # 0xe57e8
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
leaq 0x1(%r13), %rax
cvtsi2sd %rax, %xmm0
mulsd 0xd0(%rsp), %xmm0
callq 0x86a0
movsd %xmm0, 0x88(%rsp)
movsd 0x88(%r15), %xmm0
movsd %xmm0, 0x40(%rsp)
movapd 0x10(%rsp), %xmm0
addsd 0x11725(%rip), %xmm0    # 0xe5260
callq 0xcbe4d
movsd %xmm0, 0x8(%rsp)
movsd (%rbx), %xmm0
ucomisd 0x11c96(%rip), %xmm0    # 0xe57e8
jne 0xd3b66
jp 0xd3b66
movq %r15, %rdi
movapd 0x10(%rsp), %xmm0
callq 0xd0bdc
jmp 0xd3b90
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl 0x24(%rsp), %esi
movapd 0x10(%rsp), %xmm2
movq 0x28(%rsp), %rdx
callq 0xcc0a7
movapd %xmm0, %xmm5
movsd 0x88(%rsp), %xmm0
mulsd 0x78(%rsp), %xmm0
addsd 0x11c3d(%rip), %xmm0    # 0xe57e8
movsd %xmm0, 0x88(%rsp)
movsd 0x40(%rsp), %xmm4
mulsd 0x8(%rsp), %xmm4
movsd %xmm4, 0x40(%rsp)
movsd (%r12), %xmm2
movq 0x60(%rsp), %rax
movsd (%rax), %xmm3
movq 0xb8(%r15), %rdi
movaps 0x10(%rsp), %xmm0
movaps 0xc0(%rsp), %xmm1
movsd %xmm5, 0x8(%rsp)
leaq 0x80(%rsp), %rsi
callq 0xd52c1
movsd 0x80(%rsp), %xmm0
divsd 0x12b3b(%rip), %xmm0    # 0xe6748
divsd 0x40(%rsp), %xmm0
movsd 0x11645(%rip), %xmm1    # 0xe5260
subsd (%r12), %xmm1
mulsd %xmm0, %xmm1
divsd 0x4da33(%rip), %xmm1    # 0x121660
movq 0xb0(%rsp), %rax
movsd %xmm1, 0x60(%rax)
divsd 0x15dd6(%rip), %xmm1    # 0xe9a18
movsd %xmm1, 0x68(%rax)
movq 0x28(%rsp), %rax
movapd 0x10(%rsp), %xmm4
jmp 0xd3cec
movsd %xmm3, 0x8(%rsp)
movq 0x90(%rsp), %rcx
movsd %xmm2, (%rcx,%r13,8)
movq 0x70(%rsp), %rax
movaps 0x60(%rsp), %xmm0
movsd %xmm0, (%rax,%r13,8)
movupd -0x18(%rcx,%r13,8), %xmm0
movupd -0x8(%rcx,%r13,8), %xmm1
subpd %xmm0, %xmm1
mulpd 0x4d9eb(%rip), %xmm1    # 0x121680
divpd 0xf0(%rsp), %xmm1
movapd %xmm1, %xmm0
shufpd $0x1, %xmm1, %xmm0      # xmm0 = xmm0[1],xmm1[0]
movapd %xmm0, 0xe0(%rsp)
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
divsd %xmm0, %xmm1
movsd 0x1159c(%rip), %xmm0    # 0xe5260
subsd %xmm1, %xmm0
andpd 0x11570(%rip), %xmm0    # 0xe5240
movsd 0x11fe0(%rip), %xmm1    # 0xe5cb8
ucomisd %xmm0, %xmm1
jbe 0xd3ce7
movq 0x38(%rsp), %rax
andl $0x0, 0x40(%rax)
movq 0x28(%rsp), %rax
cmpl $0x1, (%rax)
je 0xd4038
incq %r13
addq $0x8, 0xa0(%rsp)
addq $0x8, %rbp
movq 0x38(%rsp), %r14
jmp 0xd37da
movq 0x70(%rsp), %rax
movsd -0x8(%rax,%r13,8), %xmm5
jmp 0xd3d22
movq 0x70(%rsp), %rax
movupd -0x20(%rax,%r13,8), %xmm0
movsd -0x10(%rax,%r13,8), %xmm1
unpcklpd %xmm5, %xmm1            # xmm1 = xmm1[0],xmm5[0]
subpd %xmm0, %xmm1
mulpd 0x4d940(%rip), %xmm1    # 0x121680
divpd 0xf0(%rsp), %xmm1
shufpd $0x1, %xmm1, %xmm1      # xmm1 = xmm1[1,0]
movapd %xmm1, 0x180(%rsp)
movsd (%rbx), %xmm0
ucomisd 0x11a85(%rip), %xmm0    # 0xe57e8
movapd %xmm4, 0x10(%rsp)
jne 0xd3d92
jp 0xd3d92
movq %r15, %rdi
movapd %xmm4, %xmm0
callq 0xd0bdc
movsd %xmm0, 0x40(%rsp)
movq %r15, %rdi
movsd 0x88(%rsp), %xmm0
callq 0xd0bdc
jmp 0xd3de1
movq 0x48(%r14), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl %r12d, %esi
movapd %xmm4, %xmm2
movq 0x28(%rsp), %rdx
callq 0xcc0a7
movsd %xmm0, 0x40(%rsp)
movq 0x48(%r14), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl %r12d, %esi
movsd 0x88(%rsp), %xmm2
movq 0x28(%rsp), %rdx
callq 0xcc0a7
movapd %xmm0, %xmm3
movsd 0xb8(%rsp), %xmm1
movapd 0x10(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xd4038
movq 0x38(%rsp), %r12
movq %r12, %rdi
movl 0x5c(%rsp), %esi
movq %r13, %rdx
leaq 0xe0(%rsp), %rcx
leaq 0x180(%rsp), %r8
movsd 0x40(%rsp), %xmm1
movsd 0x88(%rsp), %xmm2
callq 0xd2a6b
cvtsi2sd %r13, %xmm0
mulsd 0xd0(%rsp), %xmm0
callq 0x86a0
movapd %xmm0, %xmm1
mulsd 0x78(%rsp), %xmm1
movsd 0x11992(%rip), %xmm0    # 0xe57e8
addsd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
incq %r13
cvtsi2sd %r13, %xmm0
mulsd 0xd0(%rsp), %xmm0
callq 0x86a0
mulsd 0x78(%rsp), %xmm0
movsd 0x11964(%rip), %xmm1    # 0xe57e8
addsd %xmm1, %xmm0
movsd %xmm0, 0x88(%rsp)
movapd 0x10(%rsp), %xmm0
movapd %xmm0, %xmm2
cmpltsd 0xb8(%rsp), %xmm2
andnpd %xmm0, %xmm2
movsd (%rbx), %xmm0
ucomisd %xmm1, %xmm0
movapd %xmm2, 0x10(%rsp)
jne 0xd3eeb
jp 0xd3eeb
movq %r15, %rdi
movapd %xmm2, %xmm0
callq 0xd0bdc
movsd %xmm0, 0x40(%rsp)
movq %r15, %rdi
movsd 0x88(%rsp), %xmm0
callq 0xd0bdc
movsd %xmm0, 0x60(%rsp)
movq 0x28(%rsp), %r12
jmp 0xd3f4f
movq 0x48(%r12), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl 0x24(%rsp), %esi
movq 0x28(%rsp), %r14
movq %r14, %rdx
callq 0xcc0a7
movsd 0x88(%rsp), %xmm2
ucomisd 0xb8(%rsp), %xmm2
movsd %xmm0, 0x40(%rsp)
jbe 0xd3f46
movq 0x48(%r12), %rcx
xorpd %xmm0, %xmm0
movsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
movl 0x24(%rsp), %esi
movq %r14, %rdx
callq 0xcc0a7
movsd %xmm0, 0x60(%rsp)
movq %r14, %r12
movsd 0x88(%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
movapd 0x10(%rsp), %xmm0
movsd 0x112f4(%rip), %xmm1    # 0xe5260
addsd %xmm1, %xmm0
callq 0xcbe4d
movapd %xmm0, %xmm4
mulsd 0x8(%rsp), %xmm4
movsd %xmm4, 0x8(%rsp)
movsd (%rbp), %xmm2
movq 0xa0(%rsp), %r14
movsd (%r14), %xmm3
movq 0xb8(%r15), %rdi
movaps 0x10(%rsp), %xmm0
movaps 0xc0(%rsp), %xmm1
movsd 0x40(%rsp), %xmm5
leaq 0x80(%rsp), %rsi
callq 0xd52c1
movsd 0x80(%rsp), %xmm0
divsd 0x12779(%rip), %xmm0    # 0xe6748
divsd 0x8(%rsp), %xmm0
movsd 0x11283(%rip), %xmm1    # 0xe5260
subsd (%rbp), %xmm1
mulsd %xmm0, %xmm1
divsd 0x4d672(%rip), %xmm1    # 0x121660
movq 0xb0(%rsp), %rax
movsd %xmm1, 0x60(%rax)
divsd 0x15a15(%rip), %xmm1    # 0xe9a18
movsd %xmm1, 0x68(%rax)
addq $0x8, %r14
movq %r14, 0xa0(%rsp)
addq $0x8, %rbp
cmpl $0x1, (%r12)
movsd 0xb8(%rsp), %xmm1
movapd 0x10(%rsp), %xmm0
movsd 0x60(%rsp), %xmm3
jne 0xd3df4
movq 0x38(%rsp), %rax
movq 0x48(%rax), %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq