// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/thermodynamics.c
// Function: thermodynamics_reionization_function
int thermodynamics_reionization_function(
                                         double z,
                                         struct thermodynamics * pth,
                                         struct thermo_reionization_parameters * preio,
                                         double * x
                                         ) {

  /** Summary: */

  /** - define local variables */
  double argument;
  int i;
  double z_jump;

  int jump;
  double center,before, after,width,one_jump;
  double z_min, z_max;

  switch (pth->reio_parametrization) {

    /** - no reionization means nothing to be added to xe_before */
  case reio_none:
    *x = preio->reionization_parameters[preio->index_re_xe_before];
    break;

    /** - implementation of ionization function similar to the one in CAMB */
  case reio_camb:

    /** - --> case z > z_reio_start */
    if (z > preio->reionization_parameters[preio->index_re_reio_start]) {
      *x = preio->reionization_parameters[preio->index_re_xe_before];
    }
    else {
      /** - --> case z < z_reio_start: hydrogen contribution (tanh of complicated argument) */
      argument = (pow((1.+preio->reionization_parameters[preio->index_re_reio_redshift]),
                      preio->reionization_parameters[preio->index_re_reio_exponent])
                  -pow((1.+z),preio->reionization_parameters[preio->index_re_reio_exponent]))
        /(preio->reionization_parameters[preio->index_re_reio_exponent]
          *pow((1.+preio->reionization_parameters[preio->index_re_reio_redshift]),
               (preio->reionization_parameters[preio->index_re_reio_exponent]-1.)))
        /preio->reionization_parameters[preio->index_re_reio_width];

      *x = (preio->reionization_parameters[preio->index_re_xe_after]
            -preio->reionization_parameters[preio->index_re_xe_before])
        *(tanh(argument)+1.)/2.
        +preio->reionization_parameters[preio->index_re_xe_before];

      /** - --> case z < z_reio_start: helium contribution (tanh of simpler argument) */
      argument = (preio->reionization_parameters[preio->index_re_helium_fullreio_redshift] - z)
        /preio->reionization_parameters[preio->index_re_helium_fullreio_width];

      *x += preio->reionization_parameters[preio->index_re_helium_fullreio_fraction]
        *(tanh(argument)+1.)/2.;
    }
    break;

    /** - implementation of half-tangent like in 1209.0247 */
  case reio_half_tanh:

    /** - --> case z > z_reio_start */
    if (z > preio->reionization_parameters[preio->index_re_reio_start]) {
      *x = preio->reionization_parameters[preio->index_re_xe_before];
    }
    else {
      /** - --> case z < z_reio_start: hydrogen contribution (tanh of complicated argument) */
      argument = (pow((1.+preio->reionization_parameters[preio->index_re_reio_redshift]),
                      preio->reionization_parameters[preio->index_re_reio_exponent])
                  -pow((1.+z),preio->reionization_parameters[preio->index_re_reio_exponent]))
        /(preio->reionization_parameters[preio->index_re_reio_exponent]
          *pow((1.+preio->reionization_parameters[preio->index_re_reio_redshift]),
               (preio->reionization_parameters[preio->index_re_reio_exponent]-1.)))
        /preio->reionization_parameters[preio->index_re_reio_width];

      /* argument goes from 0 to infty, not from -infty to infty like
         in reio_camb case. Thus tanh(argument) goes from 0 to 1, not
         from -1 to 1.  */

      *x = (preio->reionization_parameters[preio->index_re_xe_after]
            -preio->reionization_parameters[preio->index_re_xe_before])
        *tanh(argument)
        +preio->reionization_parameters[preio->index_re_xe_before];
    }
    break;

    /** - implementation of binned ionization function similar to astro-ph/0606552 */
  case reio_bins_tanh:

    /** - --> case z > z_reio_start */
    if (z > preio->reionization_parameters[preio->index_re_first_z+preio->re_z_size-1]) {
      *x = preio->reionization_parameters[preio->index_re_xe_before];
    }
    else if (z < preio->reionization_parameters[preio->index_re_first_z]) {
      *x = preio->reionization_parameters[preio->index_re_first_xe];
    }
    else {
      i = 0;
      while (preio->reionization_parameters[preio->index_re_first_z+i+1]<z) i++;

      /* fix the final xe to xe_before*/
      preio->reionization_parameters[preio->index_re_first_xe+preio->re_z_size-1] = preio->reionization_parameters[preio->index_re_xe_before];

      /* This is the expression of the tanh-like jumps of the reio_bins_tanh scheme until the 10.06.2015. It appeared to be
         not robust enough. It could lead to a kink in xe(z) near the maximum value of z at which reionisation is sampled. It has
         been replaced by the simpler and more robust expression below.

         *xe = preio->reionization_parameters[preio->index_re_first_xe+i]
         +0.5*(tanh((2.*(z-preio->reionization_parameters[preio->index_re_first_z+i])
         /(preio->reionization_parameters[preio->index_re_first_z+i+1]
         -preio->reionization_parameters[preio->index_re_first_z+i])-1.)
         /preio->reionization_parameters[preio->index_re_step_sharpness])
         /tanh(1./preio->reionization_parameters[preio->index_re_step_sharpness])+1.)
         *(preio->reionization_parameters[preio->index_re_first_xe+i+1]
         -preio->reionization_parameters[preio->index_re_first_xe+i]);
      */

      /* compute the central redshift value of the tanh jump */
      if (i == preio->re_z_size-2) {
        z_jump = preio->reionization_parameters[preio->index_re_first_z+i]
          + 0.5*(preio->reionization_parameters[preio->index_re_first_z+i]
                 -preio->reionization_parameters[preio->index_re_first_z+i-1]);
      }
      else{
        z_jump =  0.5*(preio->reionization_parameters[preio->index_re_first_z+i+1]
                       + preio->reionization_parameters[preio->index_re_first_z+i]);
      }

      /* implementation of the tanh jump */
      *x = preio->reionization_parameters[preio->index_re_first_xe+i]
        +0.5*(tanh((z-z_jump)
                   /preio->reionization_parameters[preio->index_re_step_sharpness])+1.)
        *(preio->reionization_parameters[preio->index_re_first_xe+i+1]
          -preio->reionization_parameters[preio->index_re_first_xe+i]);
    }
    break;

    /** - implementation of many tanh jumps */
  case reio_many_tanh:

    /** - --> case z > z_reio_start */
    if (z > preio->reionization_parameters[preio->index_re_first_z+preio->re_z_size-1]) {
      *x = preio->reionization_parameters[preio->index_re_xe_before];
    }
    else if (z > preio->reionization_parameters[preio->index_re_first_z]) {

      *x = preio->reionization_parameters[preio->index_re_xe_before];

      /* fix the final xe to xe_before*/
      preio->reionization_parameters[preio->index_re_first_xe+preio->re_z_size-1] = preio->reionization_parameters[preio->index_re_xe_before];

      for (jump=1; jump<preio->re_z_size-1; jump++) {

        center = preio->reionization_parameters[preio->index_re_first_z+preio->re_z_size-1-jump];

        /* before and after are meant with respect to growing z, not growing time */
        before = preio->reionization_parameters[preio->index_re_first_xe+preio->re_z_size-1-jump]
          -preio->reionization_parameters[preio->index_re_first_xe+preio->re_z_size-jump];
        after = 0.;
        width = preio->reionization_parameters[preio->index_re_step_sharpness];

        one_jump = before + (after-before)*(tanh((z-center)/width)+1.)/2.;

        *x += one_jump;
      }

    }
    else{
      *x = preio->reionization_parameters[preio->index_re_first_xe];
    }
    break;

    /** - implementation of reio_inter */
  case reio_inter:

    /** - --> case z > z_reio_start */
    if (z > preio->reionization_parameters[preio->index_re_first_z+preio->re_z_size-1]) {
      *x = preio->reionization_parameters[preio->index_re_xe_before];
    }
    else{
      i=0;
      while (preio->reionization_parameters[preio->index_re_first_z+i+1] < z) i++;

      z_min = preio->reionization_parameters[preio->index_re_first_z+i];
      z_max = preio->reionization_parameters[preio->index_re_first_z+i+1];

      /* fix the final xe to xe_before*/
      preio->reionization_parameters[preio->index_re_first_xe+preio->re_z_size-1] = preio->reionization_parameters[preio->index_re_xe_before];

      class_test(z<z_min,
                 pth->error_message,
                 "z out of range for reionization interpolation");

      class_test(z>z_max,
                 pth->error_message,
                 "z out of range for reionization interpolation");

      argument =(z-preio->reionization_parameters[preio->index_re_first_z+i])
        /(preio->reionization_parameters[preio->index_re_first_z+i+1]
          -preio->reionization_parameters[preio->index_re_first_z+i]);

      *x = preio->reionization_parameters[preio->index_re_first_xe+i]
        + argument*(preio->reionization_parameters[preio->index_re_first_xe+i+1]
                    -preio->reionization_parameters[preio->index_re_first_xe+i]);

      class_test(*x<0.,
                 pth->error_message,
                 "Interpolation gives negative ionization fraction\n",
                 argument,
                 preio->reionization_parameters[preio->index_re_first_xe+i],
                 preio->reionization_parameters[preio->index_re_first_xe+i+1]);
    }
    break;

  default:
    class_stop(pth->error_message,
               "value of reio_parametrization=%d unclear",pth->reio_parametrization);
    break;
  }
  return _SUCCESS_;
}

// Assembly:
subq $0x40f8, %rsp           # imm = 0x40F8
movsd %xmm0, 0x40e8(%rsp)
movq %rdi, 0x40e0(%rsp)
movq %rsi, 0x40d8(%rsp)
movq %rdx, 0x40d0(%rsp)
movq 0x40e0(%rsp), %rax
movl 0x18(%rax), %eax
movq %rax, 0x68(%rsp)
subq $0x5, %rax
ja 0xc6b34
movq 0x68(%rsp), %rax
leaq 0x12bb0a(%rip), %rcx    # 0x1f1618
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc6bab
movsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x30(%rcx), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0xc5b9b
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc5e2d
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq (%rcx), %rcx
movsd 0x10c68e(%rip), %xmm0   # 0x1d2248
addsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
callq 0x8610
movsd %xmm0, 0x40(%rsp)
movsd 0x10c659(%rip), %xmm0   # 0x1d2248
addsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x40(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq (%rcx), %rcx
movsd 0x10c5d9(%rip), %xmm0   # 0x1d2248
addsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x10c5af(%rip), %xmm2   # 0x1d2248
subsd %xmm2, %xmm1
callq 0x8610
movsd 0x48(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x50(%rsp), %xmm0
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x8(%rcx), %rcx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x40c8(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x10(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x40c8(%rsp), %xmm0
callq 0x80d0
movaps %xmm0, %xmm1
movsd 0x58(%rsp), %xmm0
movsd 0x10c50a(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x10cf32(%rip), %xmm1   # 0x1d2c80
divsd %xmm1, %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
addsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x18(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
subsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x1c(%rcx), %rcx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x40c8(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x14(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x60(%rsp)
movsd 0x40c8(%rsp), %xmm0
callq 0x80d0
movaps %xmm0, %xmm1
movsd 0x60(%rsp), %xmm0
movsd 0x10c43f(%rip), %xmm2   # 0x1d2248
addsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x10ce67(%rip), %xmm1   # 0x1d2c80
divsd %xmm1, %xmm0
movq 0x40d0(%rsp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
jmp 0xc6bab
movsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x30(%rcx), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0xc5e88
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc6054
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq (%rcx), %rcx
movsd 0x10c3a1(%rip), %xmm0   # 0x1d2248
addsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
callq 0x8610
movsd %xmm0, 0x20(%rsp)
movsd 0x10c36c(%rip), %xmm0   # 0x1d2248
addsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq (%rcx), %rcx
movsd 0x10c2ec(%rip), %xmm0   # 0x1d2248
addsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x4(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x10c2c2(%rip), %xmm2   # 0x1d2248
subsd %xmm2, %xmm1
callq 0x8610
movsd 0x28(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x30(%rsp), %xmm0
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x8(%rcx), %rcx
divsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x40c8(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x10(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x40c8(%rsp), %xmm0
callq 0x80d0
movaps %xmm0, %xmm2
movsd 0x38(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc6bab
movsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
movq 0x40d8(%rsp), %rdx
addl 0x20(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0xc60bf
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc63b0
movsd 0x40e8(%rsp), %xmm1
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x24(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xc6119
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x28(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc63ae
movl $0x0, 0x40c4(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x40e8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xc616f
movl 0x40c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c4(%rsp)
jmp 0xc6124
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
movq 0x40d8(%rsp), %rdx
addl 0x20(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x40c4(%rsp), %eax
movq 0x40d8(%rsp), %rcx
movl 0x20(%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jne 0xc6266
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movsd 0x10ca35(%rip), %xmm2   # 0x1d2c88
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x40b8(%rsp)
jmp 0xc62ca
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
addsd (%rax,%rcx,8), %xmm1
movsd 0x10c9cb(%rip), %xmm0   # 0x1d2c88
mulsd %xmm1, %xmm0
movsd %xmm0, 0x40b8(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x40e8(%rsp), %xmm0
subsd 0x40b8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x2c(%rcx), %rcx
divsd (%rax,%rcx,8), %xmm0
callq 0x80d0
movsd 0x18(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x10bf0d(%rip), %xmm0   # 0x1d2248
addsd %xmm0, %xmm2
movsd 0x10c941(%rip), %xmm0   # 0x1d2c88
mulsd %xmm2, %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc63b0
jmp 0xc6bab
movsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
movq 0x40d8(%rsp), %rdx
addl 0x20(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0xc641b
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc669a
movsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x24(%rcx), %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0xc666f
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
movq 0x40d8(%rsp), %rdx
addl 0x20(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x1, 0x40b4(%rsp)
movl 0x40b4(%rsp), %eax
movq 0x40d8(%rsp), %rcx
movl 0x20(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xc666d
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
movq 0x40d8(%rsp), %rdx
addl 0x20(%rdx), %ecx
subl $0x1, %ecx
subl 0x40b4(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x40a8(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
movq 0x40d8(%rsp), %rdx
addl 0x20(%rdx), %ecx
subl $0x1, %ecx
subl 0x40b4(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
movq 0x40d8(%rsp), %rdx
addl 0x20(%rdx), %ecx
subl 0x40b4(%rsp), %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x40a0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x4098(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x2c(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x4090(%rsp)
movsd 0x40a0(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x4098(%rsp), %xmm0
subsd 0x40a0(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x40e8(%rsp), %xmm0
subsd 0x40a8(%rsp), %xmm0
divsd 0x4090(%rsp), %xmm0
callq 0x80d0
movsd 0x8(%rsp), %xmm1
movaps %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
movsd 0x10bc2b(%rip), %xmm3   # 0x1d2248
addsd %xmm3, %xmm2
mulsd %xmm2, %xmm1
movsd 0x10c653(%rip), %xmm2   # 0x1d2c80
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x4088(%rsp)
movsd 0x4088(%rsp), %xmm0
movq 0x40d0(%rsp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl 0x40b4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40b4(%rsp)
jmp 0xc64c5
jmp 0xc6698
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0x28(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc669a
jmp 0xc6bab
movsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
movq 0x40d8(%rsp), %rdx
addl 0x20(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
ucomisd (%rax,%rcx,8), %xmm0
jbe 0xc6705
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xc6b32
movl $0x0, 0x40c4(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x40e8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xc675b
movl 0x40c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x40c4(%rsp)
jmp 0xc6710
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x4080(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x4078(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movslq 0xc(%rcx), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
movq 0x40d8(%rsp), %rdx
addl 0x20(%rdx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movsd 0x40e8(%rsp), %xmm1
movsd 0x4080(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xc689a
leaq 0x3870(%rsp), %rdi
leaq 0x12f3e8(%rip), %rsi    # 0x1f5c15
movb $0x0, %al
callq 0x5b9c0
leaq 0x3070(%rsp), %rdi
leaq 0x3870(%rsp), %rcx
leaq 0x10b837(%rip), %rsi    # 0x1d2082
leaq 0x12f3f1(%rip), %rdx    # 0x1f5c43
movb $0x0, %al
callq 0x5b9c0
movq 0x40e0(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x3070(%rsp), %r8
leaq 0x10b7bd(%rip), %rsi    # 0x1d2034
leaq 0x12f3cd(%rip), %rdx    # 0x1f5c4b
movl $0x10e2, %ecx           # imm = 0x10E2
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x40f4(%rsp)
jmp 0xc6bb6
movsd 0x40e8(%rsp), %xmm0
ucomisd 0x4078(%rsp), %xmm0
jbe 0xc692a
leaq 0x2870(%rsp), %rdi
leaq 0x12f358(%rip), %rsi    # 0x1f5c15
movb $0x0, %al
callq 0x5b9c0
leaq 0x2070(%rsp), %rdi
leaq 0x2870(%rsp), %rcx
leaq 0x10b7a7(%rip), %rsi    # 0x1d2082
leaq 0x12f38e(%rip), %rdx    # 0x1f5c70
movb $0x0, %al
callq 0x5b9c0
movq 0x40e0(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x2070(%rsp), %r8
leaq 0x10b72d(%rip), %rsi    # 0x1d2034
leaq 0x12f33d(%rip), %rdx    # 0x1f5c4b
movl $0x10e6, %ecx           # imm = 0x10E6
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x40f4(%rsp)
jmp 0xc6bb6
movsd 0x40e8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x24(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x40c8(%rsp)
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x40c8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
subsd (%rax,%rcx,8), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movq 0x40d0(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x40d0(%rsp), %rax
xorps %xmm0, %xmm0
ucomisd (%rax), %xmm0
jbe 0xc6b30
leaq 0x1870(%rsp), %rdi
movsd 0x40c8(%rsp), %xmm0
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq 0x40d8(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x40d8(%rsp), %rcx
movl 0x28(%rcx), %ecx
addl 0x40c4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm2
leaq 0x12f1b5(%rip), %rsi    # 0x1f5c78
movb $0x3, %al
callq 0x5b9c0
leaq 0x1070(%rsp), %rdi
leaq 0x1870(%rsp), %rcx
leaq 0x10b5a1(%rip), %rsi    # 0x1d2082
leaq 0x12f1c2(%rip), %rdx    # 0x1f5caa
movb $0x0, %al
callq 0x5b9c0
movq 0x40e0(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x1070(%rsp), %r8
leaq 0x10b527(%rip), %rsi    # 0x1d2034
leaq 0x12f137(%rip), %rdx    # 0x1f5c4b
movl $0x10f5, %ecx           # imm = 0x10F5
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x40f4(%rsp)
jmp 0xc6bb6
jmp 0xc6b32
jmp 0xc6bab
leaq 0x870(%rsp), %rdi
movq 0x40e0(%rsp), %rax
movl 0x18(%rax), %edx
leaq 0x12baf4(%rip), %rsi    # 0x1f2642
movb $0x0, %al
callq 0x5b9c0
leaq 0x70(%rsp), %rdi
leaq 0x870(%rsp), %rdx
leaq 0x10ba04(%rip), %rsi    # 0x1d256d
movb $0x0, %al
callq 0x5b9c0
movq 0x40e0(%rsp), %rdi
addq $0x1064, %rdi           # imm = 0x1064
leaq 0x70(%rsp), %r8
leaq 0x10b4a9(%rip), %rsi    # 0x1d2034
leaq 0x12f0b9(%rip), %rdx    # 0x1f5c4b
movl $0x10fb, %ecx           # imm = 0x10FB
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x40f4(%rsp)
jmp 0xc6bb6
movl $0x0, 0x40f4(%rsp)
movl 0x40f4(%rsp), %eax
addq $0x40f8, %rsp           # imm = 0x40F8
retq
nopw %cs:(%rax,%rax)