// File: /workspace/github_c_makefile_star2_O1/lesgourg[P]class_public/build/../source/perturbations.c
// Function: perturbations_init
int perturbations_init(
                       struct precision * ppr,
                       struct background * pba,
                       struct thermodynamics * pth,
                       struct perturbations * ppt
                       ) {

  /** Summary: */

  /** - define local variables */

  /* running index for modes */
  int index_md;
  /* running index for initial conditions */
  int index_ic;
  /* running index for wavenumbers */
  int index_k;
  /* running index for type of perturbation */
  int index_tp;
  /* background quantities */
  double w_fld_ini, w_fld_0,dw_over_da_fld,integral_fld;

  /** - perform preliminary checks */

  if (ppt->has_perturbations == _FALSE_) {
    if (ppt->perturbations_verbose > 0)
      printf("No sources requested. Perturbation module skipped.\n");
    return _SUCCESS_;
  }
  else {
    if (ppt->perturbations_verbose > 0)
      printf("Computing sources\n");
  }

  class_test((ppt->gauge == synchronous) && (pba->has_cdm == _FALSE_),
             ppt->error_message,
             "In the synchronous gauge, it is not self-consistent to assume no CDM: the later is used to define the initial timelike hypersurface. You can either add a negligible amount of CDM, or switch to newtonian gauge");

  class_test ((ppr->tight_coupling_approximation < first_order_MB) ||
              (ppr->tight_coupling_approximation > compromise_CLASS),
              ppt->error_message,
              "your tight_coupling_approximation is set to %d, out of range defined in perturbations.h",ppr->tight_coupling_approximation);

  class_test ((ppr->radiation_streaming_approximation < rsa_null) ||
              (ppr->radiation_streaming_approximation > rsa_none),
              ppt->error_message,
              "your radiation_streaming_approximation is set to %d, out of range defined in perturbations.h",ppr->radiation_streaming_approximation);

  if (pba->has_idr == _TRUE_){
    class_test ((ppr->idr_streaming_approximation < rsa_idr_none) ||
                (ppr->idr_streaming_approximation > rsa_idr_MD),
                ppt->error_message,
                "your idr_radiation_streaming_approximation is set to %d, out of range defined in perturbations.h",ppr->idr_streaming_approximation);
  }

  if (pba->has_ur == _TRUE_) {

    class_test ((ppr->ur_fluid_approximation < ufa_mb) ||
                (ppr->ur_fluid_approximation > ufa_none),
                ppt->error_message,
                "your ur_fluid_approximation is set to %d, out of range defined in perturbations.h",ppr->ur_fluid_approximation);
  }

  if (pba->has_ncdm == _TRUE_) {

    class_test ((ppr->ncdm_fluid_approximation < ncdmfa_mb) ||
                (ppr->ncdm_fluid_approximation > ncdmfa_none),
                ppt->error_message,
                "your ncdm_fluid_approximation is set to %d, out of range defined in perturbations.h",ppr->ncdm_fluid_approximation);

    if (ppt->has_nc_density == _TRUE_) {
      if (ppt->perturbations_verbose > 0) {
        fprintf(stdout," -> [WARNING:] You request the number count Cl's in presence of non-cold dark matter.\n    Like in all previous CLASS and CLASSgal versions, this will be inferred from the total matter density,\n    but it could make much more sense physically to compute it from the CDM+baryon density only.\n    To get the latter behavior you would just need to change one line in transfer.c:\n    search there for a comment starting with 'use here delta_cb'\n");
      }
    }

  }

  if (pba->has_fld == _TRUE_) {

    /* check values of w_fld at initial time and today. Since 'a' in the code stands for 'a/a_0', its current value is 1 by definition */
    class_call(background_w_fld(pba, 0., &w_fld_ini, &dw_over_da_fld, &integral_fld), pba->error_message, ppt->error_message);
    class_call(background_w_fld(pba, 1.,   &w_fld_0, &dw_over_da_fld, &integral_fld), pba->error_message, ppt->error_message);

    class_test(w_fld_ini >= 0.,
               ppt->error_message,
               "The fluid is meant to be negligible at early time, and unimportant for defining the initial conditions of other species. You are using parameters for which this assumption may break down, since at early times you have w_fld(a--->0) = %e >= 0",w_fld_ini);

    if (pba->use_ppf == _FALSE_) {

      class_test((w_fld_ini +1.0)*(w_fld_0+1.0) <= 0.0,
                 ppt->error_message,
                 "w crosses -1 between the infinite past and today, and this would lead to divergent perturbation equations for the fluid perturbations. Try to switch to PPF scheme: use_ppf = yes");

      /* the next check is meaningful at least for w(a) = w0 + wa*(1-a/a0); for general formulas and with use_ppf=no, you may prefer to comment it out... */
      class_test((w_fld_0 == -1.) && (dw_over_da_fld == 0.),
                 ppt->error_message,
                 "Your choice of a fluid with (w0,wa)=(-1,0) is not valid due to instabilities in the unphysical perturbations of such a fluid. Try instead with a plain cosmological constant or with PPF scheme: use_ppf = yes");

    }

  }

  if (pba->has_dcdm == _TRUE_) {

    class_test((ppt->has_cdi == _TRUE_) || (ppt->has_bi == _TRUE_) || (ppt->has_nid == _TRUE_) || (ppt->has_niv == _TRUE_),
               ppt->error_message,
               "Non-adiabatic initial conditions not coded in presence of decaying dark matter");

  }

  class_test(ppt->has_vectors == _TRUE_,
             ppt->error_message,
             "Vectors not coded yet");

  if ((ppt->has_niv == _TRUE_) && (ppt->perturbations_verbose > 0)) {
    printf("Warning: the niv initial conditions in CLASS (and also in CAMB) should still be double-checked: if you want to do it and send feedback, you are welcome!\n");
  }

  if (ppt->has_tensors == _TRUE_) {

    ppt->evolve_tensor_ur = _FALSE_;
    ppt->evolve_tensor_ncdm = _FALSE_;

    switch (ppt->tensor_method) {

    case (tm_photons_only):
      break;

    case (tm_massless_approximation):
      if ((pba->has_ur == _TRUE_) || (pba->has_ncdm == _TRUE_))
        ppt->evolve_tensor_ur = _TRUE_;
      break;

    case (tm_exact):
      if (pba->has_ur == _TRUE_)
        ppt->evolve_tensor_ur = _TRUE_;
      if (pba->has_ncdm == _TRUE_)
        ppt->evolve_tensor_ncdm = _TRUE_;
      break;
    }
  }

  /*
    class_test((pba->h > _h_BIG_) || (pba->h < _h_SMALL_),
    ppt->error_message,
    "Your value of pba->h=%e is out of the bounds [%e , %e] and could cause a crash of the perturbation ODE integration. If you want to force this barrier, you may comment it out in perturbation.c",
    pba->h,
    _h_SMALL_,
    _h_BIG_);

    class_test((pba->Omega0_b*pba->h*pba->h < _omegab_SMALL_) || (pba->Omega0_b*pba->h*pba->h > _omegab_BIG_),
    ppt->error_message,
    "Your value of omega_b=%e is out of the bounds [%e , %e] and could cause a crash of the perturbation ODE integration. If you want to force this barrier, you may comment it out in perturbation.c",
    pba->Omega0_b*pba->h*pba->h,
    _omegab_SMALL_,
    _omegab_BIG_);
  */

  /** - initialize all indices and lists in perturbations structure using perturbations_indices() */

  class_call(perturbations_indices(ppr,
                                   pba,
                                   pth,
                                   ppt),
             ppt->error_message,
             ppt->error_message);


  if (ppt->z_max_pk > pth->z_rec) {

    class_test(ppt->has_cmb == _TRUE_,
               ppt->error_message,
               "You requested a very high z_pk=%e, higher than z_rec=%e. This works very well when you don't ask for a calculation of the CMB source function(s). Remove any CMB from your output and try e.g. with 'output=mTk' or 'output=mTk,vTk'",
               ppt->z_max_pk,
               pth->z_rec);

    class_test((ppt->has_source_delta_m == _TRUE_) && (ppt->has_matter_source_in_current_gauge == _FALSE_),
               ppt->error_message,
               "You requested a very high z_pk=%e, higher than z_rec=%e. This works very well when you ask only transfer functions, e.g. with 'output=mTk' or 'output=mTk,vTk'. But if you need the total matter (e.g. with 'mPk', 'dCl', etc.) there is an issue with the calculation of delta_m (or delta_cb) at very early times. By default, delta_m and delta_cb are expressed by the code as gauge-invariant variables (the density fluctuation in comoving gauge). This quantity is hard to get accurately at very early times. The solution is to define delta_m and delta_cb as density fluctuations in the current gauge, e.g. synchronous or newtonian. This is done by setting the input flag 'matter_source_in_current_gauge' to 'yes'.",
               ppt->z_max_pk,
               pth->z_rec);

  }



  /** - define the common time sampling for all sources using
      perturbations_timesampling_for_sources() */

  class_call(perturbations_timesampling_for_sources(ppr,
                                                    pba,
                                                    pth,
                                                    ppt),
             ppt->error_message,
             ppt->error_message);

  /** - if we want to store perturbations for given k values, write titles and allocate storage */
  class_call(perturbations_prepare_k_output(pba,ppt),
             ppt->error_message,
             ppt->error_message);

  /* Setup task system */
  class_setup_parallel();
  /** - loop over modes (scalar, tensors, etc). For each mode: */
  for (index_md = 0; index_md < ppt->md_size; index_md++) {

    if (ppt->perturbations_verbose > 1)
      printf("Evolving mode %d/%d\n",index_md+1,ppt->md_size);

    /** - --> loop over initial conditions and wavenumbers; for each of them, evolve perturbations and compute source functions with perturbations_solve() */

    for (index_ic = 0; index_ic < ppt->ic_size[index_md]; index_ic++) {

      if (ppt->perturbations_verbose > 1) {
        printf("Evolving ic %d/%d\n",index_ic+1,ppt->ic_size[index_md]);
        printf("evolving %d wavenumbers\n",ppt->k_size[index_md]);
      }

      /* integrating backwards is slightly more optimal for parallel runs */
      //for (index_k = 0; index_k < ppt->k_size; index_k++) {
      for (index_k = ppt->k_size[index_md]-1; index_k >=0; index_k--) {

        class_run_parallel(with_arguments(ppr,pba,pth,ppt,index_md,index_ic,index_k),

          if (ppt->perturbations_verbose > 2) {
            printf("evolving mode k=%e /Mpc  (%d/%d)",ppt->k[index_md][index_k],index_k+1,ppt->k_size[index_md]);
            if (pba->sgnK != 0)
              printf(" (for scalar modes, corresponds to nu=%e)",sqrt(ppt->k[index_md][index_k]*ppt->k[index_md][index_k]+pba->K)/sqrt(pba->sgnK*pba->K));
            printf("\n");
          }

          struct perturbations_workspace pw;
          class_call(perturbations_workspace_init(ppr,
                                                  pba,
                                                  pth,
                                                  ppt,
                                                  index_md,
                                                  &pw),
                     ppt->error_message,
                     ppt->error_message);

          class_call(perturbations_solve(ppr,
                                         pba,
                                         pth,
                                         ppt,
                                         index_md,
                                         index_ic,
                                         index_k,
                                         &pw),
                     ppt->error_message,
                     ppt->error_message);

          class_call(perturbations_workspace_free(ppt,index_md,&pw),
                     ppt->error_message,
                     ppt->error_message);
          return _SUCCESS_;

        );

      } /* end of loop over wavenumbers */

    } /* end of loop over initial conditions */

  } /* end loop over modes */

  class_finish_parallel();


  /** - spline the source array with respect to the time variable */

  if (ppt->ln_tau_size > 1) {

    class_setup_parallel();

    for (index_md = 0; index_md < ppt->md_size; index_md++) {

      for (index_ic = 0; index_ic < ppt->ic_size[index_md]; index_ic++) {

        for (index_tp = 0; index_tp < ppt->tp_size[index_md]; index_tp++) {

          class_run_parallel(with_arguments(ppt, index_md, index_ic, index_tp),
            class_call(array_spline_table_lines(ppt->ln_tau,
                                                ppt->ln_tau_size,
                                                ppt->late_sources[index_md][index_ic * ppt->tp_size[index_md] + index_tp],
                                                ppt->k_size[index_md],
                                                ppt->ddlate_sources[index_md][index_ic*ppt->tp_size[index_md] + index_tp],
                                                _SPLINE_EST_DERIV_,
                                                ppt->error_message),
                       ppt->error_message,
                       ppt->error_message);
            return _SUCCESS_;
          );

        } /* end of loop over type of source function*/

      } /* end of loop over initial condition */

    } /* end of loop over mode */

    class_finish_parallel();
  }

  ppt->is_allocated = _TRUE_;

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10d8, %rsp           # imm = 0x10D8
movq %rcx, %rbp
cmpw $0x0, (%rcx)
movzwl 0x6bf0(%rcx), %eax
je 0x6b869
movq %rdx, %rcx
movq %rsi, %r15
testw %ax, %ax
jle 0x6b7e8
movq %rdi, %r14
leaq 0x9bbcd(%rip), %rdi     # 0x1073a7
movq %rcx, %rbx
callq 0x8510
movq %r14, %rdi
movq %rbx, %rcx
cmpl $0x1, 0x7f4(%rbp)
jne 0x6b800
cmpw $0x0, 0x320(%r15)
je 0x6b967
movl 0x5a0(%rdi), %edx
cmpl $0x6, %edx
jb 0x6b885
leaq 0x96f88(%rip), %rsi     # 0x10279a
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x75857(%rip), %rsi     # 0xe1082
leaq 0x96fc0(%rip), %rdx     # 0x1027f2
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x757df(%rip), %rsi     # 0xe1034
leaq 0x96f2b(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x2dd, %ecx            # imm = 0x2DD
jmp 0x6b9c0
xorl %ebx, %ebx
testw %ax, %ax
jle 0x6b9cf
leaq 0x9bbd7(%rip), %rdi     # 0x107452
callq 0x8510
jmp 0x6b9cf
movl 0x620(%rdi), %edx
cmpl $0x4, %edx
jb 0x6b8ee
leaq 0x96fca(%rip), %rsi     # 0x102861
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x757d2(%rip), %rsi     # 0xe1082
leaq 0x97007(%rip), %rdx     # 0x1028be
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x7575a(%rip), %rsi     # 0xe1034
leaq 0x96ea6(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x2e2, %ecx            # imm = 0x2E2
jmp 0x6b9c0
cmpw $0x1, 0x332(%r15)
jne 0x6b9e3
movl 0x638(%rdi), %edx
cmpl $0x2, %edx
jb 0x6b9e3
leaq 0x97016(%rip), %rsi     # 0x102929
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x75756(%rip), %rsi     # 0xe1082
leaq 0x97057(%rip), %rdx     # 0x10298a
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x756de(%rip), %rsi     # 0xe1034
leaq 0x96e2a(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x2e8, %ecx            # imm = 0x2E8
jmp 0x6b9c0
leaq 0x96d0f(%rip), %rsi     # 0x10267d
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x756fb(%rip), %rsi     # 0xe1082
leaq 0x96dc0(%rip), %rdx     # 0x10274e
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x75683(%rip), %rsi     # 0xe1034
leaq 0x96dcf(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x2d8, %ecx            # imm = 0x2D8
movq %r14, %r8
xorl %eax, %eax
callq 0x30c2c
movl $0x1, %ebx
movl %ebx, %eax
addq $0x10d8, %rsp           # imm = 0x10D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpw $0x1, 0x330(%r15)
jne 0x6ba57
movl 0x650(%rdi), %edx
cmpl $0x4, %edx
jb 0x6ba57
leaq 0x96fef(%rip), %rsi     # 0x1029ef
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x75669(%rip), %rsi     # 0xe1082
leaq 0x97021(%rip), %rdx     # 0x102a41
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x755f1(%rip), %rsi     # 0xe1034
leaq 0x96d3d(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x2f0, %ecx            # imm = 0x2F0
jmp 0x6b9c0
cmpw $0x1, 0x32a(%r15)
jne 0x6bb0c
movl 0x660(%rdi), %edx
cmpl $0x4, %edx
jb 0x6bacf
leaq 0x9701c(%rip), %rsi     # 0x102a94
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x755f1(%rip), %rsi     # 0xe1082
leaq 0x97050(%rip), %rdx     # 0x102ae8
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x75579(%rip), %rsi     # 0xe1034
leaq 0x96cc5(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x2f8, %ecx            # imm = 0x2F8
jmp 0x6b9c0
cmpw $0x1, 0x36(%rbp)
jne 0x6bb0c
cmpw $0x0, 0x6bf0(%rbp)
jle 0x6bb0c
movq 0xcb459(%rip), %rax     # 0x136f40
movq %rcx, %rbx
movq (%rax), %rcx
movq %rdi, %r14
leaq 0x9704e(%rip), %rdi     # 0x102b45
movl $0x1b8, %esi            # imm = 0x1B8
movl $0x1, %edx
callq 0x86d0
movq %r14, %rdi
movq %rbx, %rcx
cmpw $0x1, 0x32e(%r15)
jne 0x6bc3b
movq %rdi, %r14
movq %rcx, %rbx
leaq 0xc8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
xorpd %xmm0, %xmm0
movq %r15, %rdi
callq 0x583fc
cmpl $0x1, %eax
jne 0x6bb96
addq $0xb84, %r15            # imm = 0xB84
leaq 0x75898(%rip), %rsi     # 0xe13f0
leaq 0x9719f(%rip), %rdx     # 0x102cfe
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x754b2(%rip), %rsi     # 0xe1034
leaq 0x96bfe(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x305, %ecx            # imm = 0x305
jmp 0x6c027
movsd 0x756c2(%rip), %xmm0    # 0xe1260
leaq 0xc0(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
movq %r15, %rdi
callq 0x583fc
cmpl $0x1, %eax
jne 0x6bc0f
addq $0xb84, %r15            # imm = 0xB84
leaq 0x7581f(%rip), %rsi     # 0xe13f0
leaq 0x9716c(%rip), %rdx     # 0x102d44
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x75439(%rip), %rsi     # 0xe1034
leaq 0x96b85(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x306, %ecx            # imm = 0x306
jmp 0x6c027
movsd 0xc8(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jae 0x6bd9a
cmpw $0x0, 0x110(%r15)
movq %rbx, %rcx
movq %r14, %rdi
je 0x6bf00
cmpw $0x1, 0x324(%r15)
jne 0x6bcc0
cmpw $0x1, 0xe(%rbp)
je 0x6bc62
cmpw $0x1, 0xc(%rbp)
je 0x6bc62
cmpw $0x1, 0x10(%rbp)
je 0x6bc62
cmpw $0x1, 0x12(%rbp)
jne 0x6bcc0
leaq 0x973f3(%rip), %rsi     # 0x10305c
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x75400(%rip), %rsi     # 0xe1082
leaq 0x97422(%rip), %rdx     # 0x1030ab
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x75388(%rip), %rsi     # 0xe1034
leaq 0x96ad4(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x31f, %ecx            # imm = 0x31F
jmp 0x6b9c0
cmpw $0x1, 0x6(%rbp)
jne 0x6bd25
leaq 0x97449(%rip), %rsi     # 0x103117
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x7539b(%rip), %rsi     # 0xe1082
leaq 0x8ad70(%rip), %rdx     # 0xf6a5e
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x75323(%rip), %rsi     # 0xe1034
leaq 0x96a6f(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x325, %ecx            # imm = 0x325
jmp 0x6b9c0
cmpw $0x1, 0x12(%rbp)
jne 0x6bd4e
cmpw $0x0, 0x6bf0(%rbp)
jle 0x6bd4e
movq %rdi, %r14
leaq 0x9b679(%rip), %rdi     # 0x1073b9
movq %rcx, %rbx
callq 0x8510
movq %r14, %rdi
movq %rbx, %rcx
cmpw $0x1, 0x8(%rbp)
jne 0x6be1a
movl $0x0, 0x1c(%rbp)
movl 0x18(%rbp), %eax
cmpl $0x2, %eax
je 0x6bdf8
cmpl $0x1, %eax
jne 0x6be1a
cmpw $0x1, 0x330(%r15)
je 0x6bd8f
cmpw $0x1, 0x32a(%r15)
jne 0x6be1a
movw $0x1, 0x1c(%rbp)
jmp 0x6be1a
leaq 0x96fe7(%rip), %rsi     # 0x102d88
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
movb $0x1, %al
callq 0x30c2c
leaq 0x752c8(%rip), %rsi     # 0xe1082
leaq 0x970b9(%rip), %rdx     # 0x102e7a
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x75250(%rip), %rsi     # 0xe1034
leaq 0x9699c(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x30a, %ecx            # imm = 0x30A
jmp 0x6b9c0
cmpw $0x1, 0x330(%r15)
jne 0x6be09
movw $0x1, 0x1c(%rbp)
cmpw $0x1, 0x32a(%r15)
jne 0x6be1a
movw $0x1, 0x1e(%rbp)
movq %rdi, %r14
movq %r15, %rsi
movq %rcx, %rdx
movq %rcx, %rbx
movq %rbp, %rcx
callq 0x6c9fc
testl %eax, %eax
je 0x6be77
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x755b0(%rip), %rsi     # 0xe13f0
leaq 0x972e6(%rip), %rdx     # 0x10312d
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x751d1(%rip), %rsi     # 0xe1034
leaq 0x9691d(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x35a, %ecx            # imm = 0x35A
jmp 0x6c027
movsd 0x7d0(%rbp), %xmm0
movsd 0xf30(%rbx), %xmm1
ucomisd %xmm1, %xmm0
movq %rbx, %rdx
jbe 0x6bfd2
cmpw $0x1, 0x7ec(%rbp)
jne 0x6bfba
leaq 0x972ae(%rip), %rsi     # 0x103157
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
movb $0x2, %al
callq 0x30c2c
leaq 0x751c0(%rip), %rsi     # 0xe1082
leaq 0x97373(%rip), %rdx     # 0x10323c
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x75148(%rip), %rsi     # 0xe1034
leaq 0x96894(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x363, %ecx            # imm = 0x363
jmp 0x6b9c0
movsd 0x75358(%rip), %xmm2    # 0xe1260
addsd %xmm2, %xmm0
movsd 0xc0(%rsp), %xmm1
addsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm2, %xmm0
jae 0x6c42a
ucomisd 0x758b5(%rip), %xmm1    # 0xe17e8
jne 0x6bc3b
jp 0x6bc3b
movsd 0x88(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x6bc3b
jp 0x6bc3b
leaq 0x96fff(%rip), %rsi     # 0x102f62
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x75106(%rip), %rsi     # 0xe1082
leaq 0x970ae(%rip), %rdx     # 0x103031
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x7508e(%rip), %rsi     # 0xe1034
leaq 0x967da(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x315, %ecx            # imm = 0x315
jmp 0x6b9c0
cmpw $0x1, 0x834(%rbp)
jne 0x6bfd2
cmpw $0x0, 0x7f8(%rbp)
je 0x6c819
movq %r14, %rdi
movq %r15, %rsi
movq %rdx, %rbx
movq %rbp, %rcx
callq 0x6d7cb
testl %eax, %eax
je 0x6c02f
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x753fb(%rip), %rsi     # 0xe13f0
leaq 0x97578(%rip), %rdx     # 0x103574
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x30c2c
leaq 0x7501c(%rip), %rsi     # 0xe1034
leaq 0x96768(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x377, %ecx            # imm = 0x377
movq %rbx, %r8
jmp 0x6b9c3
movq %r14, 0xa8(%rsp)
movq %rbx, 0xb0(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6eb92
callq 0x1c5f0
leaq 0x8d0(%rsp), %rdi
movl %eax, %esi
callq 0x1c6a0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
movl 0x808(%rbp), %edx
testl %edx, %edx
movq %rbp, 0x48(%rsp)
jle 0x6c405
movabsq $0x100000001, %r12      # imm = 0x100000001
leaq 0xc919b(%rip), %rax     # 0x135230
addq $0x10, %rax
movq %rax, 0xa0(%rsp)
movq $0x0, (%rsp)
movq %r15, 0x80(%rsp)
cmpw $0x2, 0x6bf0(%rbp)
jl 0x6c0d0
movq (%rsp), %rax
leal 0x1(%rax), %esi
leaq 0x974e6(%rip), %rdi     # 0x1035af
xorl %eax, %eax
callq 0x8030
movq 0x828(%rbp), %rax
movq (%rsp), %rcx
movl (%rax,%rcx,4), %edx
testl %edx, %edx
jle 0x6c3ea
movq $0x0, 0x28(%rsp)
cmpw $0x2, 0x6bf0(%rbp)
jl 0x6c12b
movq 0x28(%rsp), %rax
leal 0x1(%rax), %esi
leaq 0x974bc(%rip), %rdi     # 0x1035c4
xorl %eax, %eax
callq 0x8030
movq 0x950(%rbp), %rax
movq (%rsp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x974b3(%rip), %rdi     # 0x1035d7
xorl %eax, %eax
callq 0x8030
movq 0x950(%rbp), %rax
movq (%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x20(%rsp)
testl %eax, %eax
jle 0x6c3c8
movl $0x20, %edi
callq 0x83b0
movq %rax, %rbx
movq %r12, 0x8(%rax)
movq 0xa0(%rsp), %rax
movq %rax, (%rbx)
movl $0x68, %edi
callq 0x83b0
movq %rax, %r14
movq %r12, 0x8(%rax)
leaq 0xc9796(%rip), %rax     # 0x135910
movq %rax, (%r14)
movq %r14, %r12
addq $0x10, %r12
movq %r12, %rdi
leaq 0xd0(%rsp), %rsi
callq 0x1d42e
movq 0x20(%rsp), %rax
leal -0x1(%rax), %ecx
movq %rbx, %r13
addq $0x10, %r13
leaq 0xc97b6(%rip), %rax     # 0x135960
movq %rax, 0x10(%r14)
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%r14)
movq %r15, 0x40(%r14)
movq 0xb0(%rsp), %rax
movq %rax, 0x48(%r14)
movq %rbp, 0x50(%r14)
movq (%rsp), %rax
movl %eax, 0x58(%r14)
movq 0x28(%rsp), %rax
movl %eax, 0x5c(%r14)
movl %ecx, 0xc(%rsp)
movl %ecx, 0x60(%r14)
movq %r12, 0x10(%rbx)
movq %r14, 0x18(%rbx)
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x1d35e
movq %r13, 0x30(%rsp)
movq %rbx, 0x38(%rsp)
movq 0xcad9b(%rip), %rax     # 0x136fa8
cmpb $0x0, (%rax)
je 0x6c217
incl 0x8(%rbx)
jmp 0x6c21b
lock
incl 0x8(%rbx)
movl $0x1, %r14d
lock
xaddl %r14d, 0x8f0(%rsp)
movl 0x8d0(%rsp), %ecx
testl %ecx, %ecx
je 0x6c2cf
xorl %r15d, %r15d
leal (%r14,%r15), %eax
xorl %edx, %edx
divl %ecx
movq 0x8f8(%rsp), %r13
imulq $0xb0, %rdx, %rbp
leaq 0x58(,%rbp), %rdi
addq %r13, %rdi
movq %rdi, 0xd0(%rsp)
callq 0x8080
movl %eax, %r12d
testl %eax, %eax
sete 0xd8(%rsp)
je 0x6c28a
leaq 0xd0(%rsp), %rdi
callq 0x1d17a
jmp 0x6c2b3
addq %rbp, %r13
movq %r13, %rdi
leaq 0x30(%rsp), %rsi
callq 0x86d0c
leaq 0xd0(%rsp), %rdi
callq 0x1d17a
subq $-0x80, %r13
movq %r13, %rdi
callq 0x81c0
testl %r12d, %r12d
je 0x6c368
incl %r15d
movl 0x8d0(%rsp), %ecx
cmpl %ecx, %r15d
jb 0x6c23d
movl %r14d, %eax
xorl %edx, %edx
divl 0x8d0(%rsp)
movq 0x8f8(%rsp), %r14
imulq $0xb0, %rdx, %r15
leaq (%r14,%r15), %rax
addq $0x58, %rax
movq %rax, 0xd0(%rsp)
movb $0x0, 0xd8(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x1d20a
movabsq $0x100000001, %r12      # imm = 0x100000001
addq %r15, %r14
movb $0x1, 0xd8(%rsp)
movq %r14, %rdi
leaq 0x30(%rsp), %rsi
callq 0x86d0c
leaq 0xd0(%rsp), %rdi
callq 0x1d17a
subq $-0x80, %r14
movq %r14, %rdi
callq 0x81c0
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
movq 0x48(%rsp), %rbp
movq 0x80(%rsp), %r15
je 0x6c38e
callq 0x1d2a6
jmp 0x6c38e
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
movabsq $0x100000001, %r12      # imm = 0x100000001
je 0x6c381
callq 0x1d2a6
movq 0x48(%rsp), %rbp
movq 0x80(%rsp), %r15
movq %rbx, %rdi
callq 0x1d2a6
leaq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1dcb8
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6c3b4
callq 0x1d2a6
cmpl $0x1, 0x20(%rsp)
movl 0xc(%rsp), %eax
movq %rax, 0x20(%rsp)
jg 0x6c146
movq 0x28(%rsp), %rsi
incl %esi
movq 0x828(%rbp), %rax
movq (%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq %rsi, 0x28(%rsp)
cmpl %edx, %esi
jl 0x6c0ef
movq (%rsp), %rcx
incq %rcx
movslq 0x808(%rbp), %rdx
movq %rcx, (%rsp)
cmpq %rdx, %rcx
jl 0x6c0b1
movq 0x60(%rsp), %rbx
movq 0x68(%rsp), %r14
cmpq %r14, %rbx
je 0x6c488
movq %rbx, %rdi
callq 0x1c724
testl %eax, %eax
jne 0x6c88e
addq $0x10, %rbx
jmp 0x6c40f
leaq 0x96a59(%rip), %rsi     # 0x102e8a
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x30c2c
leaq 0x74c38(%rip), %rsi     # 0xe1082
leaq 0x96aeb(%rip), %rdx     # 0x102f3c
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x74bc0(%rip), %rsi     # 0xe1034
leaq 0x9630c(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x310, %ecx            # imm = 0x310
jmp 0x6b9c0
movq 0x60(%rsp), %rbx
movq 0x68(%rsp), %r14
cmpq %rbx, %r14
je 0x6c4b6
movq %rbx, %r15
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x6c4a8
callq 0x1d2a6
addq $0x10, %r15
cmpq %r14, %r15
jne 0x6c49a
movq %rbx, 0x68(%rsp)
cmpl $0x2, 0x9c8(%rbp)
jl 0x6c80c
callq 0x1c5f0
leaq 0xd0(%rsp), %rdi
movl %eax, %esi
callq 0x1c6a0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
cmpl $0x0, 0x808(%rbp)
jle 0x6c7a2
xorl %r14d, %r14d
leaq 0xc8d2f(%rip), %rax     # 0x135230
addq $0x10, %rax
movq %rax, 0x28(%rsp)
movq 0x828(%rbp), %rax
cmpl $0x0, (%rax,%r14,4)
jle 0x6c78f
movl $0x0, 0xc(%rsp)
movq %r14, (%rsp)
movq 0x930(%rbp), %rax
cmpl $0x0, (%rax,%r14,4)
jle 0x6c774
movl $0x0, 0x20(%rsp)
movl $0x20, %edi
callq 0x83b0
movq %rax, %rbx
movabsq $0x100000001, %r15      # imm = 0x100000001
movq %r15, 0x8(%rax)
movq 0x28(%rsp), %rax
movq %rax, (%rbx)
movl $0x50, %edi
callq 0x83b0
movq %rax, %r13
movq %r15, 0x8(%rax)
leaq 0xc9473(%rip), %rax     # 0x1359f0
movq %rax, (%r13)
movq %r13, %r15
addq $0x10, %r15
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
callq 0x1d42e
movq %rbx, %rbp
addq $0x10, %rbp
leaq 0xc949d(%rip), %rax     # 0x135a40
movq %rax, 0x10(%r13)
movq 0x48(%rsp), %rax
movq %rax, 0x38(%r13)
movl %r14d, 0x40(%r13)
movl 0xc(%rsp), %eax
movl %eax, 0x44(%r13)
movl 0x20(%rsp), %eax
movl %eax, 0x48(%r13)
movq %r15, 0x10(%rbx)
movq %r13, 0x18(%rbx)
leaq 0x90(%rsp), %rdi
movq %rbp, %rsi
callq 0x1d35e
movq %rbp, 0x50(%rsp)
movq %rbx, 0x58(%rsp)
movq 0xca9bb(%rip), %rax     # 0x136fa8
cmpb $0x0, (%rax)
je 0x6c5f7
incl 0x8(%rbx)
jmp 0x6c5fb
lock
incl 0x8(%rbx)
movl $0x1, %ebp
lock
xaddl %ebp, 0xf0(%rsp)
movl 0xd0(%rsp), %ecx
testl %ecx, %ecx
je 0x6c69a
xorl %r14d, %r14d
leal (%r14,%rbp), %eax
xorl %edx, %edx
divl %ecx
movq 0xf8(%rsp), %r15
imulq $0xb0, %rdx, %r12
leaq (%r15,%r12), %rdi
addq $0x58, %rdi
movq %rdi, 0x10(%rsp)
callq 0x8080
movl %eax, %r13d
testl %eax, %eax
sete 0x18(%rsp)
je 0x6c65c
leaq 0x10(%rsp), %rdi
callq 0x1d17a
jmp 0x6c682
addq %r12, %r15
movq %r15, %rdi
leaq 0x50(%rsp), %rsi
callq 0x87474
leaq 0x10(%rsp), %rdi
callq 0x1d17a
subq $-0x80, %r15
movq %r15, %rdi
callq 0x81c0
testl %r13d, %r13d
je 0x6c715
incl %r14d
movl 0xd0(%rsp), %ecx
cmpl %ecx, %r14d
jb 0x6c61b
movl %ebp, %eax
xorl %edx, %edx
divl 0xd0(%rsp)
movq 0xf8(%rsp), %r13
imulq $0xb0, %rdx, %r14
leaq (%r14,%r13), %rax
addq $0x58, %rax
movq %rax, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x1d20a
addq %r14, %r13
movb $0x1, 0x18(%rsp)
movq %r13, %rdi
leaq 0x50(%rsp), %rsi
callq 0x87474
movq 0x48(%rsp), %rbp
leaq 0x10(%rsp), %rdi
callq 0x1d17a
subq $-0x80, %r13
movq %r13, %rdi
callq 0x81c0
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
movq (%rsp), %r14
je 0x6c72d
callq 0x1d2a6
jmp 0x6c72d
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
movq (%rsp), %r14
je 0x6c728
callq 0x1d2a6
movq 0x48(%rsp), %rbp
movq %rbx, %rdi
callq 0x1d2a6
leaq 0x30(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x1dcb8
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x6c759
callq 0x1d2a6
movl 0x20(%rsp), %ecx
incl %ecx
movq 0x930(%rbp), %rax
movl %ecx, 0x20(%rsp)
cmpl (%rax,%r14,4), %ecx
jl 0x6c542
movl 0xc(%rsp), %ecx
incl %ecx
movq 0x828(%rbp), %rax
movl %ecx, 0xc(%rsp)
cmpl (%rax,%r14,4), %ecx
jl 0x6c528
incq %r14
movslq 0x808(%rbp), %rax
cmpq %rax, %r14
jl 0x6c50a
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r14
cmpq %r14, %rbx
je 0x6c7c7
movq %rbx, %rdi
callq 0x1c724
testl %eax, %eax
jne 0x6c877
addq $0x10, %rbx
jmp 0x6c7ac
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %r14
cmpq %rbx, %r14
je 0x6c7f5
movq %rbx, %r15
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x6c7e7
callq 0x1d2a6
addq $0x10, %r15
cmpq %r14, %r15
jne 0x6c7d9
movq %rbx, 0x38(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x1c770
leaq 0xd0(%rsp), %rdi
callq 0x1c7b0
movw $0x1, 0x73f2(%rbp)
xorl %ebx, %ebx
jmp 0x6c893
leaq 0x96a33(%rip), %rsi     # 0x103253
leaq 0x8d0(%rsp), %rbx
movq %rbx, %rdi
movb $0x2, %al
callq 0x30c2c
leaq 0x74849(%rip), %rsi     # 0xe1082
leaq 0x96cd8(%rip), %rdx     # 0x103518
leaq 0xd0(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30c2c
addq $0x6bf2, %rbp           # imm = 0x6BF2
leaq 0x747d1(%rip), %rsi     # 0xe1034
leaq 0x95f1d(%rip), %rdx     # 0x102787
movq %rbp, %rdi
movl $0x369, %ecx            # imm = 0x369
jmp 0x6b9c0
leaq 0x30(%rsp), %rdi
callq 0x1c770
leaq 0xd0(%rsp), %rdi
callq 0x1c7b0
movl $0x1, %ebx
leaq 0x60(%rsp), %rdi
callq 0x1c770
leaq 0x8d0(%rsp), %rdi
callq 0x1c7b0
jmp 0x6b9cf
jmp 0x6c922
jmp 0x6c8cf
jmp 0x6c922
movq %rax, %r15
jmp 0x6c965
jmp 0x6c958
movq %rax, %r15
jmp 0x6c8e2
movq %rax, %r15
jmp 0x6c986
movq %rax, %r15
jmp 0x6c98e
movq %rax, %r15
movq %r13, %rdi
callq 0x8380
movq %rbx, %rdi
callq 0x8380
jmp 0x6c98e
movq %rax, %r15
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
jne 0x6c989
jmp 0x6c98e
movq %rax, %r15
jmp 0x6c9b7
jmp 0x6c9a7
movq %rax, %r15
jmp 0x6c935
movq %rax, %r15
jmp 0x6c9d5
movq %rax, %r15
jmp 0x6c9dd
movq %rax, %r15
movq %r14, %rdi
callq 0x8380
movq %rbx, %rdi
callq 0x8380
jmp 0x6c9dd
movq %rax, %r15
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
jne 0x6c9d8
jmp 0x6c9dd
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x1d17a
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x6c974
callq 0x1d2a6
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x6c986
callq 0x1d2a6
movq %rbx, %rdi
callq 0x1d2a6
leaq 0x30(%rsp), %rdi
callq 0x1c770
leaq 0xd0(%rsp), %rdi
callq 0x1c7b0
jmp 0x6c9dd
movq %rax, %r15
leaq 0xd0(%rsp), %rdi
callq 0x1d17a
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x6c9c6
callq 0x1d2a6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x6c9d5
callq 0x1d2a6
movq %rbx, %rdi
callq 0x1d2a6
leaq 0x60(%rsp), %rdi
callq 0x1c770
leaq 0x8d0(%rsp), %rdi
callq 0x1c7b0
movq %r15, %rdi
callq 0x8650