// File: /workspace/github_c_makefile_star2_O2/PoulinV[P]AxiCLASS/build/../source/input.c
// Function: input_try_unknown_parameters
int input_try_unknown_parameters(double * unknown_parameter,
                                 int unknown_parameters_size,
                                 void * voidpfzw,
                                 double * output,
                                 ErrorMsg errmsg){
  /** Summary */

  /** Define local variables */
  struct precision pr;        /* for precision parameters */
  struct background ba;       /* for cosmological background */
  struct thermodynamics th;           /* for thermodynamics */
  struct perturbations pt;         /* for source functions */
  struct transfer tr;        /* for transfer functions */
  struct primordial pm;       /* for primordial spectra */
  struct harmonic hr;          /* for output spectra */
  struct fourier fo;        /* for non-linear spectra */
  struct lensing le;          /* for lensed spectra */
  struct distortions sd;      /* for spectral distortions */
  struct output op;           /* for output files */

  int i;
  double rho_dcdm_today, rho_dr_today;
  struct fzerofun_workspace * pfzw;
  int input_verbose;
  int flag;
  int param;
  double ac;
  short compute_sigma8 = _FALSE_;

  /* Assume for now shooting did not fail */
  ba.shooting_failed = _FALSE_;

  pfzw = (struct fzerofun_workspace *) voidpfzw;
  /** Read input parameters */
  // This needs to be done with enough accuracy. A standard double has a relative
  // precision of around 1e-16, so 1e-20 should be good enough for the shooting
  for (i=0; i < unknown_parameters_size; i++) {
    class_sprintf(pfzw->fc.value[pfzw->unknown_parameters_index[i]],"%.20e",unknown_parameter[i]);
  }

  class_call(input_read_precisions(&(pfzw->fc),&pr,&ba,&th,&pt,&tr,&pm,&hr,&fo,&le,&sd,&op,
                                   errmsg),
             errmsg,
             errmsg);

  class_call(input_read_parameters(&(pfzw->fc),&pr,&ba,&th,&pt,&tr,&pm,&hr,&fo,&le,&sd,&op,
                                   errmsg),
             errmsg,
             errmsg);

  class_call(parser_read_int(&(pfzw->fc),"input_verbose",&param,&flag,errmsg),
             errmsg,
             errmsg);

  if (flag == _TRUE_)
    input_verbose = param;
  else
    input_verbose = 0;

  /** Optimise flags for sigma8 calculation.*/
  for (i=0; i < unknown_parameters_size; i++) {
    if (pfzw->target_name[i] == sigma8) {
      compute_sigma8 = _TRUE_;
    }
    if (pfzw->target_name[i] == S8) {
      compute_sigma8 = _TRUE_;
    }
  }

  /* Sigma8 depends on linear P(k), so no need to run anything except linear P(k) during shooting */
  if (compute_sigma8 == _TRUE_) {
    /* In June 2020 the k_max_for_pk was increased for higher precision,
       and in February 2022 the value was converted into a set of two precision parameters */
    pt.k_max_for_pk=
      MIN(MAX(pr.k_max_for_pk_sigma8_min, pt.k_max_for_pk),
          pr.k_max_for_pk_sigma8_max);
    pt.has_pk_matter=_TRUE_;
    pt.has_perturbations = _TRUE_;
    pt.has_cl_cmb_temperature = _FALSE_;
    pt.has_cls = _FALSE_;
    pt.has_cl_cmb_polarization = _FALSE_;
    pt.has_cl_cmb_lensing_potential = _FALSE_;
    pt.has_cl_number_count = _FALSE_;
    pt.has_cl_lensing_potential=_FALSE_;
    pt.has_density_transfers=_FALSE_;
    pt.has_velocity_transfers=_FALSE_;
    fo.has_pk_eq=_FALSE_;
    fo.method=nl_none;
  }

  /** Shoot forward into class up to required stage */
  if (pfzw->required_computation_stage >= cs_background){
    if (input_verbose>2)
      printf("Stage 1: background\n");
    ba.background_verbose = 0;
    class_call_except(background_init(&pr,&ba), ba.error_message, errmsg, background_free_input(&ba);thermodynamics_free_input(&th);perturbations_free_input(&pt););
  }

  if (pfzw->required_computation_stage >= cs_thermodynamics){
    if (input_verbose>2)
      printf("Stage 2: thermodynamics\n");
    pr.thermo_Nz_lin = 10000;
    pr.thermo_Nz_log = 500;
    th.thermodynamics_verbose = 0;
    th.hyrec_verbose = 0;
    class_call_except(thermodynamics_init(&pr,&ba,&th), th.error_message, errmsg, background_free(&ba);thermodynamics_free_input(&th);perturbations_free_input(&pt););
  }

  if (pfzw->required_computation_stage >= cs_perturbations){
    if (input_verbose>2)
      printf("Stage 3: perturbations\n");
    pt.perturbations_verbose = 0;
    class_call_except(perturbations_init(&pr,&ba,&th,&pt), pt.error_message, errmsg, thermodynamics_free(&th);background_free(&ba);perturbations_free_input(&pt););
  }

  if (pfzw->required_computation_stage >= cs_primordial){
    if (input_verbose>2)
      printf("Stage 4: primordial\n");
    pm.primordial_verbose = 0;
    class_call_except(primordial_init(&pr,&pt,&pm), pm.error_message, errmsg, perturbations_free(&pt);thermodynamics_free(&th);background_free(&ba));
  }

  if (pfzw->required_computation_stage >= cs_nonlinear){
    if (input_verbose>2)
      printf("Stage 5: nonlinear\n");
    fo.fourier_verbose = 0;
    class_call_except(fourier_init(&pr,&ba,&th,&pt,&pm,&fo), fo.error_message, errmsg, primordial_free(&pm);perturbations_free(&pt);thermodynamics_free(&th);background_free(&ba));
  }

  if (pfzw->required_computation_stage >= cs_transfer){
    if (input_verbose>2)
      printf("Stage 6: transfer\n");
    tr.transfer_verbose = 0;
    class_call_except(transfer_init(&pr,&ba,&th,&pt,&fo,&tr), tr.error_message, errmsg, fourier_free(&fo);primordial_free(&pm);perturbations_free(&pt);thermodynamics_free(&th);background_free(&ba));
  }

  if (pfzw->required_computation_stage >= cs_spectra){
    if (input_verbose>2)
      printf("Stage 7: spectra\n");
    hr.harmonic_verbose = 0;
    class_call_except(harmonic_init(&pr,&ba,&pt,&pm,&fo,&tr,&hr),hr.error_message, errmsg, transfer_free(&tr);fourier_free(&fo);primordial_free(&pm);perturbations_free(&pt);thermodynamics_free(&th);background_free(&ba));
  }

  /** Get the corresponding shoot variable and put into output */
  for (i=0; i < pfzw->target_size; i++) {
    switch (pfzw->target_name[i]) {
      case theta_s:
      case theta_s_100:
        output[i] = 100.*th.rs_rec/th.ra_rec-pfzw->target_value[i];
        break;
      case Neff:
        output[i] = ba.Neff-pfzw->target_value[i];
        break;
      case Omega_dcdmdr:
        rho_dcdm_today = ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_dcdm];
        if (ba.has_dr == _TRUE_)
          rho_dr_today = ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_dr];
        else
          rho_dr_today = 0.;
        output[i] = (rho_dcdm_today+rho_dr_today)/(ba.H0*ba.H0)-pfzw->target_value[i];
        break;
      case omega_dcdmdr:
        rho_dcdm_today = ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_dcdm];
        if (ba.has_dr == _TRUE_)
          rho_dr_today = ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_dr];
        else
          rho_dr_today = 0.;
        output[i] = (rho_dcdm_today+rho_dr_today)/(ba.H0*ba.H0)-pfzw->target_value[i]/ba.h/ba.h;
        break;
      case fraction_axion_ac: // TLS where to print out log10_fraction_axion_ac and axion_ac
        // output[i] = log10(ba.f_ede)-pfzw->target_value[i];
        output[i] = ba.f_ede-pfzw->target_value[i];
        if(input_verbose>10)printf("ba.f_ede %e  pfzw->target_value[i] %e output[i] %e\n", ba.f_ede,pfzw->target_value[i],output[i]);
        break;
      case log10_axion_ac:
        ac = 1./(pow(10,ba.log10_z_c)+1);
        output[i] = log10(ac)-pfzw->target_value[i];
         if(input_verbose>10)printf("ac %e  pfzw->target_value[i] %e output[i] %e\n", log10(ac),pfzw->target_value[i],output[i]);
        break;
      case log10_fraction_axion_ac_phi2n: // TLS where to print out log10_fraction_axion_ac and axion_ac
        output[i] = log10(ba.f_ede)-pfzw->target_value[i];
         // printf("ba.f_ede %e  pfzw->target_value[i] %e output[i] %e\n", log10(ba.f_ede),pfzw->target_value[i],output[i]);
        break;
      case Omega_scf_shoot_fa:
         output[i] = ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_scf]/(ba.H0*ba.H0)
          -ba.Omega0_scf;
        pfzw->target_value[i] = ba.Omega0_scf;
        if(input_verbose>10){
            printf("Shooting in f_a for Omega_ax \n");
            printf("f_axion: %e\n", ba.f_axion);
            printf("rho_ax / rho_crit: %e\n",ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_scf]/(ba.H0*ba.H0));
            printf("distance away from target: %e\n", ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_scf]/(ba.H0*ba.H0) - ba.Omega0_scf);
          }
        break;
      case log10_axion_ac_phi2n:
        ac = 1./(pow(10,ba.log10_z_c)+1);
        output[i] = log10(ac)-pfzw->target_value[i];
         // printf("ac %e  pfzw->target_value[i] %e output[i] %e\n", log10(ac),pfzw->target_value[i],output[i]);
        break;

      case Omega_scf:
        /** - In case scalar field is used to fill, pba->Omega0_scf is not equal to pfzw->target_value[i].*/
      /*cjcomment is this the value of energy density used for matching in shooting? */
      /*COComment This must be updated to use value of rho from fluid equation */
        output[i] = ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_scf]/(ba.H0*ba.H0)
          -ba.Omega0_scf;
        pfzw->target_value[i] = ba.Omega0_scf;
          // printf("output[i] for scalar field %e \n", output[i]);
          // COComment Old print statements for scalar field, not relevant now using fluid equations as phi no longer evolves to end
          // printf("Made up of minus : %e \n", -ba.Omega0_scf);
          // printf("background table [] %e where bt_size = %e, bg_size = %e and index_bg_rho_scf = %e \n", ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_scf],ba.bt_size,ba.bg_size,ba.index_bg_rho_scf);
          // printf("backgroundtable[] / H0^2 = %e \n ", ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_scf]/(ba.H0*ba.H0));
          if(input_verbose>10){
            printf("Where does the code end up? \n");
            printf("rho_ax / rho_crit: %e\n",ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_scf]/(ba.H0*ba.H0));
            printf("distance away from target: %e\n", ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_scf]/(ba.H0*ba.H0) - ba.Omega0_scf);
          }
          // printf("phi: %e\n", ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_phi_scf]);
          // printf("phidot: %e\n", ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_phi_prime_scf]);
          // printf("K.E (not divided by a, as a=1?): %e\n", ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_phi_prime_scf]*ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_phi_prime_scf]/2);
          // printf("potential: %e\n",ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_V_scf]);


        break;
      case Omega_ini_dcdm:
      case omega_ini_dcdm:
        rho_dcdm_today = ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_dcdm];

        if (ba.has_dr == _TRUE_)
          rho_dr_today = ba.background_table[(ba.bt_size-1)*ba.bg_size+ba.index_bg_rho_dr];
        else
          rho_dr_today = 0.;
        output[i] = -(rho_dcdm_today+rho_dr_today)/(ba.H0*ba.H0)+ba.Omega0_dcdmdr;
        break;
      case a_peak_eq:
        output[i] = ba.a_peak-ba.a_eq;
        if(input_verbose>2) printf("a_peak from bg = %e \t a_peak - a_eq = %e\n", ba.a_peak, output[i]);
        break;
      case sigma8:
        output[i] = fo.sigma8[fo.index_pk_m];
        break;
      case S8:
        output[i] = fo.sigma8[fo.index_pk_m]*sqrt(ba.Omega0_m/0.3);
        break;
    }
  }

  /** Free structures */
  if (pfzw->required_computation_stage >= cs_spectra){
    class_call(harmonic_free(&hr), hr.error_message, errmsg);
  }
  if (pfzw->required_computation_stage >= cs_transfer){
    class_call(transfer_free(&tr), tr.error_message, errmsg);
  }
  if (pfzw->required_computation_stage >= cs_nonlinear){
    class_call(fourier_free(&fo), fo.error_message, errmsg);
  }
  if (pfzw->required_computation_stage >= cs_primordial){
    class_call(primordial_free(&pm), pm.error_message, errmsg);
  }
  if (pfzw->required_computation_stage >= cs_perturbations){
    class_call(perturbations_free(&pt), pt.error_message, errmsg);
  }
  if (pfzw->required_computation_stage >= cs_thermodynamics){
    class_call(thermodynamics_free(&th), th.error_message, errmsg);
  }
  if (pfzw->required_computation_stage >= cs_background){
    class_call(background_free(&ba), ba.error_message, errmsg);
  }

  /** Set filecontent to unread */
  for (i=0; i<pfzw->fc.size; i++) {
    pfzw->fc.read[i] = _FALSE_;
  }

  /** Free pointers allocated on input if neccessary */
  if (pfzw->required_computation_stage < cs_perturbations) {
    /** Some pointers in ppt may not be allocated if has_perturbations is _FALSE_, but this is handled in perturbations_free_input as neccessary. */
    perturbations_free_input(&pt);
  }
  if (pfzw->required_computation_stage < cs_thermodynamics) {
    thermodynamics_free_input(&th);
  }
  if (pfzw->required_computation_stage < cs_background) {
    background_free_input(&ba);
  }
  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x11e78, %rsp          # imm = 0x11E78
movq %r8, %r14
movq %rcx, 0x18(%rsp)
movq %rdx, %r15
movl %esi, %r13d
movq %rdi, %rbx
andw $0x0, 0x538(%rsp)
xorl %r12d, %r12d
testl %esi, %esi
cmovlel %r12d, %r13d
leaq 0xac137(%rip), %rbp     # 0xe7374
cmpq %r12, %r13
je 0x3b27f
movsd (%rbx,%r12,8), %xmm0
xorl %edi, %edi
xorl %esi, %esi
movq %rbp, %rdx
movb $0x1, %al
callq 0x8580
movq (%r15), %rcx
movslq (%rcx,%r12,4), %rdi
shlq $0xa, %rdi
addq 0x20(%r15), %rdi
incl %eax
movslq %eax, %rsi
movsd (%rbx,%r12,8), %xmm0
movq %rbp, %rdx
movb $0x1, %al
callq 0x8580
incq %r12
jmp 0x3b23d
leaq 0x8(%r15), %rbp
subq $0x40, %rsp
movq %r14, 0x30(%rsp)
leaq 0x4ad0(%rsp), %rsi
movq %rbp, %rdi
callq 0x2f8db
addq $0x40, %rsp
pushq $0x1
popq %rbx
cmpl $0x1, %eax
jne 0x3b2f0
leaq 0xaa141(%rip), %rsi     # 0xe53f0
leaq 0xb01da(%rip), %rdx     # 0xeb490
leaq 0x7720(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xa9d62(%rip), %rsi     # 0xe5034
leaq 0xb03b0(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x775, %ecx            # imm = 0x775
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0x3b406
subq $0x8, %rsp
leaq 0xf458(%rsp), %rax
leaq 0x10078(%rsp), %r10
leaq 0xebc0(%rsp), %r11
leaq 0x1d48(%rsp), %rbx
leaq 0x5cc8(%rsp), %r12
leaq 0x4a98(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x3230(%rsp), %rcx
leaq 0x7728(%rsp), %r8
leaq 0x65b8(%rsp), %r9
movq %rbp, %rdi
pushq %r14
pushq %rax
pushq %r10
pushq %r11
pushq %rbx
pushq %r12
leaq 0x2710(%rsp), %rax
pushq %rax
callq 0x383c9
addq $0x40, %rsp
testl %eax, %eax
je 0x3b39f
leaq 0xaa085(%rip), %rsi     # 0xe53f0
leaq 0xb0185(%rip), %rdx     # 0xeb4f7
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xa9ca6(%rip), %rsi     # 0xe5034
leaq 0xb02f4(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x77a, %ecx            # imm = 0x77A
jmp 0x3b3f9
leaq 0xaedde(%rip), %rsi     # 0xea184
leaq 0x10(%rsp), %rdx
leaq 0x14(%rsp), %rcx
movq %rbp, %rdi
movq %r14, %r8
callq 0x1c5c4
cmpl $0x1, %eax
jne 0x3b41a
leaq 0xaa029(%rip), %rsi     # 0xe53f0
leaq 0xb02d8(%rip), %rdx     # 0xeb6a6
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x2e014
leaq 0xa9c4a(%rip), %rsi     # 0xe5034
leaq 0xb0298(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x77e, %ecx            # imm = 0x77E
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x11e78, %rsp          # imm = 0x11E78
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r12, %rbp
movl 0x14(%rsp), %ecx
movl 0x10(%rsp), %eax
xorl %esi, %esi
pushq $0x1
popq %rbx
xorl %edx, %edx
movq %r14, %r12
cmpq %rsi, %r13
je 0x3b449
movq 0x30(%r15), %rdi
movl (%rdi,%rsi,4), %edi
andl $-0x2, %edi
cmpl $0xe, %edi
cmovel %ebx, %edx
incq %rsi
jmp 0x3b42f
xorl %r14d, %r14d
cmpl $0x1, %ecx
cmovel %eax, %r14d
cmpw $0x1, %dx
jne 0x3b4b6
movsd 0x7778(%rsp), %xmm0
maxsd 0x52d0(%rsp), %xmm0
minsd 0x52d8(%rsp), %xmm0
movsd %xmm0, 0x7778(%rsp)
movw $0x1, 0x7720(%rsp)
andw $0x0, 0x772c(%rsp)
andq $0x0, 0x7748(%rsp)
andw $0x0, 0x1d68(%rsp)
movq $0x10000, 0x7750(%rsp) # imm = 0x10000
andl $0x0, 0x1d40(%rsp)
cmpl $0x3, %r14d
jl 0x3b4c8
leaq 0xc60c6(%rip), %rdi     # 0x101589
callq 0x8540
leaq 0x20(%rsp), %rsi
andw $0x0, 0xd1a(%rsi)
leaq 0x4a90(%rsp), %rdi
callq 0x5a9de
cmpl $0x1, %eax
jne 0x3b53e
leaq 0xd3c(%rsp), %rcx
leaq 0xa9efa(%rip), %rsi     # 0xe53f0
leaq 0xb01ea(%rip), %rdx     # 0xeb6e7
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa9b1e(%rip), %rsi     # 0xe5034
leaq 0xb016c(%rip), %rdx     # 0xeb689
movq %r12, %rdi
movl $0x7a9, %ecx            # imm = 0x7A9
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
leaq 0x20(%rsp), %rdi
callq 0x5e002
jmp 0x3b5e9
movq %r12, (%rsp)
cmpl $0x0, 0x44(%r15)
je 0x3b9f2
cmpl $0x3, %r14d
jl 0x3b55f
leaq 0xc6043(%rip), %rdi     # 0x10159d
callq 0x8540
movabsq $0x1f400002710, %rax    # imm = 0x1F400002710
leaq 0x4a90(%rsp), %rdi
movq %rax, 0x1a8(%rdi)
leaq 0x3228(%rsp), %rdx
andl $0x0, 0x1060(%rdx)
leaq 0x20(%rsp), %rsi
callq 0x62e7f
cmpl $0x1, %eax
jne 0x3b608
leaq 0x428c(%rsp), %rcx
leaq 0xa9e4b(%rip), %rsi     # 0xe53f0
leaq 0xb0154(%rip), %rdx     # 0xeb700
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa9a6f(%rip), %rsi     # 0xe5034
leaq 0xb00bd(%rip), %rdx     # 0xeb689
movq (%rsp), %rdi
movl $0x7b3, %ecx            # imm = 0x7B3
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
leaq 0x20(%rsp), %rdi
callq 0x5df89
leaq 0x3228(%rsp), %rdi
callq 0x66f8b
leaq 0x7720(%rsp), %rdi
callq 0x73189
jmp 0x3b406
cmpl $0x2, 0x44(%r15)
jb 0x3b9f2
cmpl $0x3, %r14d
jl 0x3b625
leaq 0xc5f95(%rip), %rdi     # 0x1015b5
callq 0x8540
leaq 0x7720(%rsp), %rcx
andw $0x0, 0x6c88(%rcx)
leaq 0x4a90(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x3228(%rsp), %rdx
callq 0x6edec
cmpl $0x1, %eax
jne 0x3b6b9
leaq 0xe3aa(%rsp), %rcx
leaq 0xa9d8d(%rip), %rsi     # 0xe53f0
leaq 0xb00b7(%rip), %rdx     # 0xeb721
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa99b1(%rip), %rsi     # 0xe5034
leaq 0xaffff(%rip), %rdx     # 0xeb689
movq (%rsp), %rdi
movl $0x7ba, %ecx            # imm = 0x7BA
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
leaq 0x3228(%rsp), %rdi
callq 0x66ecc
leaq 0x20(%rsp), %rdi
callq 0x5df89
jmp 0x3b5f6
cmpl $0x3, 0x44(%r15)
jb 0x3b9f2
cmpl $0x3, %r14d
jl 0x3b6d6
leaq 0xc5efb(%rip), %rdi     # 0x1015cc
callq 0x8540
leaq 0x26d8(%rsp), %rdx
andw $0x0, 0x328(%rdx)
leaq 0x4a90(%rsp), %rdi
leaq 0x7720(%rsp), %rsi
callq 0x90005
cmpl $0x1, %eax
jne 0x3b74e
leaq 0x2a02(%rsp), %rcx
leaq 0xa9ce1(%rip), %rsi     # 0xe53f0
leaq 0xb002f(%rip), %rdx     # 0xeb745
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa9905(%rip), %rsi     # 0xe5034
leaq 0xaff53(%rip), %rdx     # 0xeb689
movq (%rsp), %rdi
movl $0x7c1, %ecx            # imm = 0x7C1
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
jmp 0x3b801
cmpl $0x4, 0x44(%r15)
jb 0x3b9f2
cmpl $0x3, %r14d
jl 0x3b76b
leaq 0xc5e7a(%rip), %rdi     # 0x1015e0
callq 0x8540
leaq 0x1d40(%rsp), %r9
andw $0x0, 0x190(%r9)
leaq 0x4a90(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x3228(%rsp), %rdx
leaq 0x7720(%rsp), %rcx
leaq 0x26d8(%rsp), %r8
callq 0x9af94
cmpl $0x1, %eax
jne 0x3b82a
leaq 0x1ed2(%rsp), %rcx
leaq 0xa9c36(%rip), %rsi     # 0xe53f0
leaq 0xaffa1(%rip), %rdx     # 0xeb762
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa985a(%rip), %rsi     # 0xe5034
leaq 0xafea8(%rip), %rdx     # 0xeb689
movq (%rsp), %rdi
movl $0x7c8, %ecx            # imm = 0x7C8
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
leaq 0x26d8(%rsp), %rdi
callq 0x91ee1
leaq 0x7720(%rsp), %rdi
callq 0x731a9
leaq 0x3228(%rsp), %rdi
callq 0x66ecc
leaq 0x20(%rsp), %rdi
callq 0x5df89
jmp 0x3b406
cmpl $0x5, 0x44(%r15)
jb 0x3b9f2
movq (%rsp), %r12
movl %ebx, %r13d
cmpl $0x3, %r14d
jl 0x3b84e
leaq 0xc5daa(%rip), %rdi     # 0x1015f3
callq 0x8540
leaq 0x65b0(%rsp), %r9
andw $0x0, 0x968(%r9)
leaq 0x4a90(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x3228(%rsp), %rdx
leaq 0x7720(%rsp), %rcx
leaq 0x1d40(%rsp), %r8
callq 0x9ed5d
cmpl $0x1, %eax
jne 0x3b920
leaq 0x6f1a(%rsp), %rcx
leaq 0xa9b4f(%rip), %rsi     # 0xe53f0
leaq 0xafee0(%rip), %rdx     # 0xeb788
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa9773(%rip), %rsi     # 0xe5034
leaq 0xafdc1(%rip), %rdx     # 0xeb689
movq %r12, %rdi
movl $0x7cf, %ecx            # imm = 0x7CF
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
leaq 0x1d40(%rsp), %rdi
callq 0x9e001
leaq 0x26d8(%rsp), %rdi
callq 0x91ee1
leaq 0x7720(%rsp), %rdi
callq 0x731a9
leaq 0x3228(%rsp), %rdi
callq 0x66ecc
leaq 0x20(%rsp), %rdi
callq 0x5df89
movl %r13d, %ebx
jmp 0x3b406
cmpl $0x6, 0x44(%r15)
movl %r13d, %ebx
jb 0x3b9f2
cmpl $0x3, %r14d
jl 0x3b940
leaq 0xc5cca(%rip), %rdi     # 0x101605
callq 0x8540
andw $0x0, 0x5da8(%rsp)
subq $0x8, %rsp
leaq 0x4a98(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x7728(%rsp), %rdx
leaq 0x26e0(%rsp), %rcx
leaq 0x1d48(%rsp), %r8
leaq 0x65b8(%rsp), %r9
pushq %rbp
callq 0xacfdf
popq %rcx
popq %rdx
cmpl $0x1, %eax
movl %r13d, %ebx
jne 0x3b9f2
leaq 0x5daa(%rsp), %rcx
leaq 0xa9a57(%rip), %rsi     # 0xe53f0
leaq 0xafe0f(%rip), %rdx     # 0xeb7af
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa967b(%rip), %rsi     # 0xe5034
leaq 0xafcc9(%rip), %rdx     # 0xeb689
movq (%rsp), %rdi
movl $0x7d6, %ecx            # imm = 0x7D6
movq %r15, %r8
xorl %eax, %eax
callq 0x2e014
leaq 0x65b0(%rsp), %rdi
callq 0xa30e8
leaq 0x1d40(%rsp), %rdi
callq 0x9e001
jmp 0x3b7f4
xorl %r13d, %r13d
leaq 0xae1dc(%rip), %rbp     # 0xe9bd8
movq 0x18(%rsp), %r12
movslq 0x40(%r15), %rax
cmpq %rax, %r13
jge 0x3bf06
movq 0x30(%r15), %rax
movl (%rax,%r13,4), %eax
cmpq $0xf, %rax
ja 0x3bccc
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
movsd 0x4168(%rsp), %xmm0
mulsd 0xaa2c5(%rip), %xmm0    # 0xe5d00
divsd 0x4178(%rsp), %xmm0
jmp 0x3bcbc
movq 0x480(%rsp), %rax
movslq 0x460(%rsp), %rdx
decq %rdx
movslq 0x45c(%rsp), %rcx
imulq %rdx, %rcx
xorpd %xmm0, %xmm0
cmpw $0x1, 0x4da(%rsp)
jne 0x3ba8a
movslq 0x3d8(%rsp), %rdx
movslq %ecx, %rsi
addq %rdx, %rsi
movsd (%rax,%rsi,8), %xmm0
movslq 0x3d4(%rsp), %rdx
addq %rdx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x128(%rsp), %xmm2
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm0
subsd %xmm0, %xmm2
movsd %xmm2, (%r12,%r13,8)
jmp 0x3bccc
movq 0x1e08(%rsp), %rax
movslq 0x1d94(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
jmp 0x3bcc6
movsd 0x220(%rsp), %xmm0
jmp 0x3bb92
movq 0x480(%rsp), %rax
movslq 0x460(%rsp), %rdx
decq %rdx
movslq 0x45c(%rsp), %rcx
imulq %rdx, %rcx
xorpd %xmm0, %xmm0
cmpw $0x1, 0x4da(%rsp)
jne 0x3bb29
movslq 0x3d8(%rsp), %rdx
movslq %ecx, %rsi
addq %rdx, %rsi
movsd (%rax,%rsi,8), %xmm0
movslq 0x3d4(%rsp), %rdx
addq %rdx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x28(%rsp), %xmm2
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm0
movq 0x38(%r15), %rax
movsd (%rax,%r13,8), %xmm1
divsd %xmm2, %xmm1
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
jmp 0x3bcc6
movsd 0x210(%rsp), %xmm1
movsd 0xa9c77(%rip), %xmm0    # 0xe57f0
callq 0x8650
movsd 0xa96da(%rip), %xmm1    # 0xe5260
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x81f0
jmp 0x3bcbc
movsd 0x210(%rsp), %xmm1
movsd 0xa9c43(%rip), %xmm0    # 0xe57f0
callq 0x8650
movsd 0xa96a6(%rip), %xmm1    # 0xe5260
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movapd %xmm1, %xmm0
callq 0x81f0
movq 0x38(%r15), %rax
subsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%r12,%r13,8)
cmpl $0xb, %r14d
jl 0x3bccc
movsd 0x8(%rsp), %xmm0
callq 0x81f0
movq 0x38(%r15), %rax
movsd (%rax,%r13,8), %xmm1
movsd (%r12,%r13,8), %xmm2
leaq 0xafc01(%rip), %rdi     # 0xeb80e
jmp 0x3beda
movsd 0x348(%rsp), %xmm0
jmp 0x3bcbc
movq 0x1e08(%rsp), %rax
movslq 0x1d94(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x360(%rsp), %xmm0
divsd 0xa966a(%rip), %xmm0    # 0xe52b0
ucomisd 0xa960a(%rip), %xmm0    # 0xe5258
jb 0x3bee6
sqrtsd %xmm0, %xmm0
jmp 0x3bef7
movq 0x480(%rsp), %rax
movslq 0x460(%rsp), %rdx
decq %rdx
movslq 0x45c(%rsp), %rcx
imulq %rdx, %rcx
xorpd %xmm0, %xmm0
cmpw $0x1, 0x4da(%rsp)
jne 0x3bc9e
movslq 0x3d8(%rsp), %rdx
movslq %ecx, %rsi
addq %rdx, %rsi
movsd (%rax,%rsi,8), %xmm0
movslq 0x3d4(%rsp), %rdx
addq %rdx, %rcx
addsd (%rax,%rcx,8), %xmm0
movsd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm0
movq 0x38(%r15), %rax
subsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%r12,%r13,8)
incq %r13
jmp 0x3ba01
movsd 0xd8(%rsp), %xmm0
movapd %xmm0, %xmm1
subsd 0x380(%rsp), %xmm1
movsd %xmm1, (%r12,%r13,8)
cmpl $0x3, %r14d
jl 0x3bccc
leaq 0xafb82(%rip), %rdi     # 0xeb87f
movb $0x2, %al
callq 0x8030
jmp 0x3bccc
movslq 0x460(%rsp), %rax
decq %rax
movslq 0x45c(%rsp), %rcx
imulq %rax, %rcx
movslq 0x3f0(%rsp), %rax
addq %rcx, %rax
movq 0x480(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x148(%rsp), %xmm2
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm0
subsd %xmm2, %xmm0
movsd %xmm0, (%r12,%r13,8)
movq 0x38(%r15), %rax
movsd %xmm2, (%rax,%r13,8)
cmpl $0xb, %r14d
jl 0x3bccc
leaq 0xc58a5(%rip), %rdi     # 0x101616
callq 0x8540
jmp 0x3be02
movslq 0x460(%rsp), %rax
decq %rax
movslq 0x45c(%rsp), %rcx
imulq %rax, %rcx
movslq 0x3f0(%rsp), %rax
addq %rcx, %rax
movq 0x480(%rsp), %rcx
movsd (%rcx,%rax,8), %xmm0
movsd 0x20(%rsp), %xmm1
movsd 0x148(%rsp), %xmm2
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm0
subsd %xmm2, %xmm0
movsd %xmm0, (%r12,%r13,8)
movq 0x38(%r15), %rax
movsd %xmm2, (%rax,%r13,8)
cmpl $0xb, %r14d
jl 0x3bccc
leaq 0xc584d(%rip), %rdi     # 0x101633
callq 0x8540
movsd 0x1b0(%rsp), %xmm0
leaq 0xafa41(%rip), %rdi     # 0xeb83c
movb $0x1, %al
callq 0x8030
movq 0x480(%rsp), %rax
movslq 0x460(%rsp), %rcx
decq %rcx
movslq 0x45c(%rsp), %rdx
imulq %rcx, %rdx
movslq 0x3f0(%rsp), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm0
leaq 0xafa03(%rip), %rdi     # 0xeb849
movb $0x1, %al
callq 0x8030
movq 0x480(%rsp), %rax
movslq 0x460(%rsp), %rcx
decq %rcx
movslq 0x45c(%rsp), %rdx
imulq %rcx, %rdx
movslq 0x3f0(%rsp), %rcx
addq %rdx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd 0x20(%rsp), %xmm1
mulsd %xmm1, %xmm1
divsd %xmm1, %xmm0
subsd 0x148(%rsp), %xmm0
leaq 0xaf9c6(%rip), %rdi     # 0xeb860
movb $0x1, %al
callq 0x8030
jmp 0x3bccc
movsd 0x220(%rsp), %xmm0
movq 0x38(%r15), %rax
movapd %xmm0, %xmm2
subsd (%rax,%r13,8), %xmm2
movsd %xmm2, (%r12,%r13,8)
cmpl $0xb, %r14d
jl 0x3bccc
movsd (%rax,%r13,8), %xmm1
leaq 0xaf900(%rip), %rdi     # 0xeb7da
movb $0x3, %al
callq 0x8030
jmp 0x3bccc
movsd %xmm1, 0x8(%rsp)
callq 0x82d0
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r12,%r13,8)
jmp 0x3bccc
movl 0x44(%r15), %eax
cmpl $0x6, %eax
movq (%rsp), %r14
jb 0x3bf6c
leaq 0x5cc0(%rsp), %rdi
callq 0xae4b7
cmpl $0x1, %eax
jne 0x3bf68
leaq 0x5daa(%rsp), %rcx
leaq 0xa94bc(%rip), %rsi     # 0xe53f0
leaq 0xaf96e(%rip), %rdx     # 0xeb8a9
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa90e0(%rip), %rsi     # 0xe5034
leaq 0xaf72e(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x843, %ecx            # imm = 0x843
jmp 0x3b2e1
movl 0x44(%r15), %eax
cmpl $0x5, %eax
jb 0x3bfca
leaq 0x65b0(%rsp), %rdi
callq 0xa30e8
cmpl $0x1, %eax
jne 0x3bfc6
leaq 0x6f1a(%rsp), %rcx
leaq 0xa945e(%rip), %rsi     # 0xe53f0
leaq 0xaf923(%rip), %rdx     # 0xeb8bc
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa9082(%rip), %rsi     # 0xe5034
leaq 0xaf6d0(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x846, %ecx            # imm = 0x846
jmp 0x3b2e1
movl 0x44(%r15), %eax
cmpl $0x4, %eax
jb 0x3c028
leaq 0x1d40(%rsp), %rdi
callq 0x9e001
cmpl $0x1, %eax
jne 0x3c024
leaq 0x1ed2(%rsp), %rcx
leaq 0xa9400(%rip), %rsi     # 0xe53f0
leaq 0xaf8d8(%rip), %rdx     # 0xeb8cf
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa9024(%rip), %rsi     # 0xe5034
leaq 0xaf672(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x849, %ecx            # imm = 0x849
jmp 0x3b2e1
movl 0x44(%r15), %eax
cmpl $0x3, %eax
jb 0x3c086
leaq 0x26d8(%rsp), %rdi
callq 0x91ee1
cmpl $0x1, %eax
jne 0x3c082
leaq 0x2a02(%rsp), %rcx
leaq 0xa93a2(%rip), %rsi     # 0xe53f0
leaq 0xaf88c(%rip), %rdx     # 0xeb8e1
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa8fc6(%rip), %rsi     # 0xe5034
leaq 0xaf614(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x84c, %ecx            # imm = 0x84C
jmp 0x3b2e1
movl 0x44(%r15), %eax
cmpl $0x2, %eax
jb 0x3c0e4
leaq 0x7720(%rsp), %rdi
callq 0x731a9
cmpl $0x1, %eax
jne 0x3c0e0
leaq 0xe3aa(%rsp), %rcx
leaq 0xa9344(%rip), %rsi     # 0xe53f0
leaq 0xaf843(%rip), %rdx     # 0xeb8f6
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa8f68(%rip), %rsi     # 0xe5034
leaq 0xaf5b6(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x84f, %ecx            # imm = 0x84F
jmp 0x3b2e1
movl 0x44(%r15), %eax
testl %eax, %eax
je 0x3c13d
leaq 0x3228(%rsp), %rdi
callq 0x66ecc
cmpl $0x1, %eax
jne 0x3c13d
leaq 0x428c(%rsp), %rcx
leaq 0xa92e7(%rip), %rsi     # 0xe53f0
leaq 0xaf7fe(%rip), %rdx     # 0xeb90e
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa8f0b(%rip), %rsi     # 0xe5034
leaq 0xaf559(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x852, %ecx            # imm = 0x852
jmp 0x3b2e1
leaq 0x20(%rsp), %rdi
callq 0x5df89
cmpl $0x1, %eax
jne 0x3c18f
leaq 0xd3c(%rsp), %rcx
leaq 0xa9295(%rip), %rsi     # 0xe53f0
leaq 0xaf7c5(%rip), %rdx     # 0xeb927
leaq 0x1540(%rsp), %r15
movq %r15, %rdi
xorl %eax, %eax
callq 0x2e014
leaq 0xa8eb9(%rip), %rsi     # 0xe5034
leaq 0xaf507(%rip), %rdx     # 0xeb689
movq %r14, %rdi
movl $0x855, %ecx            # imm = 0x855
jmp 0x3b2e1
movl 0x10(%r15), %eax
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
cmpq %rcx, %rax
je 0x3c1ad
movq 0x28(%r15), %rdx
andw $0x0, (%rdx,%rcx,2)
incq %rcx
jmp 0x3c19a
xorl %ebx, %ebx
cmpl $0x1, 0x44(%r15)
ja 0x3b406
leaq 0x7720(%rsp), %rdi
callq 0x73189
cmpl $0x0, 0x44(%r15)
jne 0x3b406
leaq 0x3228(%rsp), %rdi
callq 0x66f8b
jmp 0x3b406