// File: /workspace/github_c_makefile_star2_O3/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, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movq %rdx, %r14
movl %esi, %ebp
movw $0x0, 0x538(%rsp)
testl %esi, %esi
jle 0x3e7c5
movq %rdi, %r12
movl %ebp, %r15d
xorl %ebx, %ebx
leaq 0xb1c2f(%rip), %r13     # 0xf03b4
movsd (%r12,%rbx,8), %xmm0
xorl %edi, %edi
xorl %esi, %esi
movq %r13, %rdx
movb $0x1, %al
callq 0x8550
movq (%r14), %rcx
movslq (%rcx,%rbx,4), %rdi
shlq $0xa, %rdi
addq 0x20(%r14), %rdi
incl %eax
movslq %eax, %rsi
movsd (%r12,%rbx,8), %xmm0
movq %r13, %rdx
movb $0x1, %al
callq 0x8550
incq %rbx
cmpq %rbx, %r15
jne 0x3e785
leaq 0x8(%r14), %r12
subq $0x40, %rsp
movq 0x48(%rsp), %rbx
movq %rbx, 0x30(%rsp)
leaq 0x4ad0(%rsp), %rsi
movq %r12, %rdi
callq 0x323ea
addq $0x40, %rsp
cmpl $0x1, %eax
jne 0x3e82e
leaq 0xafbf9(%rip), %rsi     # 0xee3f0
leaq 0xb5dca(%rip), %rdx     # 0xf45c8
leaq 0x7720(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xaf81a(%rip), %rsi     # 0xee034
leaq 0xb5fa0(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x775, %ecx            # imm = 0x775
jmp 0x3e937
subq $0x8, %rsp
leaq 0xf458(%rsp), %rax
leaq 0x10078(%rsp), %r10
leaq 0xebc0(%rsp), %r11
leaq 0x1d48(%rsp), %r15
leaq 0x5cc8(%rsp), %r13
leaq 0x4a98(%rsp), %rsi
leaq 0x28(%rsp), %rdx
leaq 0x3230(%rsp), %rcx
leaq 0x7728(%rsp), %r8
leaq 0x65b8(%rsp), %r9
movq %r12, %rdi
pushq %rbx
pushq %rax
pushq %r10
pushq %r11
pushq %r15
pushq %r13
leaq 0x2710(%rsp), %rax
pushq %rax
callq 0x3b844
addq $0x40, %rsp
testl %eax, %eax
je 0x3e8dd
leaq 0xafb47(%rip), %rsi     # 0xee3f0
leaq 0xb5d7f(%rip), %rdx     # 0xf462f
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xaf768(%rip), %rsi     # 0xee034
leaq 0xb5eee(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x77a, %ecx            # imm = 0x77A
jmp 0x3e937
leaq 0xb49d8(%rip), %rsi     # 0xf32bc
leaq 0x18(%rsp), %rdx
leaq 0x1c(%rsp), %rcx
movq %r12, %rdi
movq %rbx, %r8
callq 0x1e736
cmpl $0x1, %eax
jne 0x3e95a
leaq 0xafaeb(%rip), %rsi     # 0xee3f0
leaq 0xb5ed2(%rip), %rdx     # 0xf47de
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0xaf70c(%rip), %rsi     # 0xee034
leaq 0xb5e92(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x77e, %ecx            # imm = 0x77E
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %ebx
movl %ebx, %eax
addq $0x11e78, %rsp          # imm = 0x11E78
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r12d, %r12d
cmpl $0x1, 0x1c(%rsp)
jne 0x3e969
movl 0x18(%rsp), %r12d
testl %ebp, %ebp
movq 0x10(%rsp), %r15
jle 0x3ea05
movq 0x30(%r14), %rax
movl %ebp, %ecx
xorl %edx, %edx
movl $0x1, %esi
xorl %edi, %edi
movl (%rax,%rdx,4), %r8d
andl $-0x2, %r8d
cmpl $0xe, %r8d
cmovel %esi, %edi
incq %rdx
cmpq %rdx, %rcx
jne 0x3e985
cmpw $0x1, %di
jne 0x3ea05
movsd 0x7778(%rsp), %xmm0
maxsd 0x52d0(%rsp), %xmm0
minsd 0x52d8(%rsp), %xmm0
movsd %xmm0, 0x7778(%rsp)
movw $0x1, 0x7720(%rsp)
xorl %eax, %eax
movw %ax, 0x772c(%rsp)
movq $0x0, 0x7748(%rsp)
movq $0x10000, 0x7750(%rsp) # imm = 0x10000
movw %ax, 0x1d68(%rsp)
movl $0x0, 0x1d40(%rsp)
cmpl $0x3, %r12d
jl 0x3ea17
leaq 0xcbcaf(%rip), %rdi     # 0x10a6c1
callq 0x8510
leaq 0x20(%rsp), %rsi
movw $0x0, 0xd1a(%rsi)
leaq 0x4a90(%rsp), %rdi
callq 0x5e98e
cmpl $0x1, %eax
jne 0x3ea8e
leaq 0xd3c(%rsp), %rcx
leaq 0xaf9aa(%rip), %rsi     # 0xee3f0
leaq 0xb5dd2(%rip), %rdx     # 0xf481f
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaf5ce(%rip), %rsi     # 0xee034
leaq 0xb5d54(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x7a9, %ecx            # imm = 0x7A9
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
leaq 0x20(%rsp), %rdi
callq 0x6204e
jmp 0x3eb37
cmpl $0x0, 0x44(%r14)
je 0x3ef0c
cmpl $0x3, %r12d
jl 0x3eaab
leaq 0xcbc2f(%rip), %rdi     # 0x10a6d5
callq 0x8510
movabsq $0x1f400002710, %rax    # imm = 0x1F400002710
leaq 0x4a90(%rsp), %rdi
movq %rax, 0x1a8(%rdi)
leaq 0x3228(%rsp), %rdx
movl $0x0, 0x1060(%rdx)
leaq 0x20(%rsp), %rsi
callq 0x67151
cmpl $0x1, %eax
jne 0x3eb56
leaq 0x428c(%rsp), %rcx
leaq 0xaf8fc(%rip), %rsi     # 0xee3f0
leaq 0xb5d3d(%rip), %rdx     # 0xf4838
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaf520(%rip), %rsi     # 0xee034
leaq 0xb5ca6(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x7b3, %ecx            # imm = 0x7B3
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
leaq 0x20(%rsp), %rdi
callq 0x61fd4
leaq 0x3228(%rsp), %rdi
callq 0x6b37c
leaq 0x7720(%rsp), %rdi
callq 0x778d1
jmp 0x3e941
cmpl $0x2, 0x44(%r14)
jb 0x3ef0c
cmpl $0x3, %r12d
jl 0x3eb73
leaq 0xcbb7f(%rip), %rdi     # 0x10a6ed
callq 0x8510
leaq 0x7720(%rsp), %rcx
movw $0x0, 0x6c88(%rcx)
leaq 0x4a90(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x3228(%rsp), %rdx
callq 0x73460
cmpl $0x1, %eax
jne 0x3ec07
leaq 0xe3aa(%rsp), %rcx
leaq 0xaf83e(%rip), %rsi     # 0xee3f0
leaq 0xb5ca0(%rip), %rdx     # 0xf4859
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaf462(%rip), %rsi     # 0xee034
leaq 0xb5be8(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x7ba, %ecx            # imm = 0x7BA
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
leaq 0x3228(%rsp), %rdi
callq 0x6b2ba
leaq 0x20(%rsp), %rdi
callq 0x61fd4
jmp 0x3eb44
cmpl $0x3, 0x44(%r14)
jb 0x3ef0c
cmpl $0x3, %r12d
jl 0x3ec24
leaq 0xcbae5(%rip), %rdi     # 0x10a704
callq 0x8510
leaq 0x26d8(%rsp), %rdx
movw $0x0, 0x328(%rdx)
leaq 0x4a90(%rsp), %rdi
leaq 0x7720(%rsp), %rsi
callq 0x94c20
cmpl $0x1, %eax
jne 0x3ec9c
leaq 0x2a02(%rsp), %rcx
leaq 0xaf792(%rip), %rsi     # 0xee3f0
leaq 0xb5c18(%rip), %rdx     # 0xf487d
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaf3b6(%rip), %rsi     # 0xee034
leaq 0xb5b3c(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x7c1, %ecx            # imm = 0x7C1
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0x3ee0d
cmpl $0x4, 0x44(%r14)
jb 0x3ef0c
cmpl $0x3, %r12d
jl 0x3ecb9
leaq 0xcba64(%rip), %rdi     # 0x10a718
callq 0x8510
leaq 0x1d40(%rsp), %r9
movw $0x0, 0x190(%r9)
leaq 0x4a90(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x3228(%rsp), %rdx
leaq 0x7720(%rsp), %rcx
leaq 0x26d8(%rsp), %r8
callq 0x9ff2c
cmpl $0x1, %eax
jne 0x3ed47
leaq 0x1ed2(%rsp), %rcx
leaq 0xaf6e7(%rip), %rsi     # 0xee3f0
leaq 0xb5b8a(%rip), %rdx     # 0xf489a
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaf30b(%rip), %rsi     # 0xee034
leaq 0xb5a91(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x7c8, %ecx            # imm = 0x7C8
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
jmp 0x3ee00
cmpl $0x5, 0x44(%r14)
jb 0x3ef0c
cmpl $0x3, %r12d
jl 0x3ed64
leaq 0xcb9cc(%rip), %rdi     # 0x10a72b
callq 0x8510
leaq 0x65b0(%rsp), %r9
movw $0x0, 0x968(%r9)
leaq 0x4a90(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x3228(%rsp), %rdx
leaq 0x7720(%rsp), %rcx
leaq 0x1d40(%rsp), %r8
callq 0xa3f4a
cmpl $0x1, %eax
jne 0x3ee36
leaq 0x6f1a(%rsp), %rcx
leaq 0xaf638(%rip), %rsi     # 0xee3f0
leaq 0xb5b01(%rip), %rdx     # 0xf48c0
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaf25c(%rip), %rsi     # 0xee034
leaq 0xb59e2(%rip), %rdx     # 0xf47c1
movq 0x8(%rsp), %rdi
movl $0x7cf, %ecx            # imm = 0x7CF
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
leaq 0x1d40(%rsp), %rdi
callq 0xa317e
leaq 0x26d8(%rsp), %rdi
callq 0x96c17
leaq 0x7720(%rsp), %rdi
callq 0x778fb
leaq 0x3228(%rsp), %rdi
callq 0x6b2ba
leaq 0x20(%rsp), %rdi
callq 0x61fd4
jmp 0x3e941
cmpl $0x6, 0x44(%r14)
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r15
jb 0x3ef0c
cmpl $0x3, %r12d
jl 0x3ee5d
leaq 0xcb8e5(%rip), %rdi     # 0x10a73d
callq 0x8510
movw $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 %r13
callq 0xb32c8
addq $0x10, %rsp
cmpl $0x1, %eax
movq 0x8(%rsp), %rbx
movq 0x10(%rsp), %r15
jne 0x3ef0c
leaq 0x5daa(%rsp), %rcx
leaq 0xaf52f(%rip), %rsi     # 0xee3f0
leaq 0xb5a1f(%rip), %rdx     # 0xf48e7
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaf153(%rip), %rsi     # 0xee034
leaq 0xb58d9(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x7d6, %ecx            # imm = 0x7D6
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
leaq 0x65b0(%rsp), %rdi
callq 0xa839b
jmp 0x3edf3
cmpl $0x0, 0x40(%r14)
jle 0x3f426
xorl %r13d, %r13d
leaq 0xb3def(%rip), %rbp     # 0xf2d10
movq 0x30(%r14), %rax
movl (%rax,%r13,4), %eax
cmpq $0xf, %rax
ja 0x3f1df
movslq (%rbp,%rax,4), %rax
addq %rbp, %rax
jmpq *%rax
movsd 0x4168(%rsp), %xmm0
mulsd 0xafdd2(%rip), %xmm0    # 0xeed20
divsd 0x4178(%rsp), %xmm0
jmp 0x3f1cf
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 0x3ef9d
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, (%r15,%r13,8)
jmp 0x3f1df
movq 0x1e08(%rsp), %rax
movslq 0x1d94(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
jmp 0x3f1d9
movsd 0x220(%rsp), %xmm0
jmp 0x3f0a5
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 0x3f03c
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(%r14), %rax
movsd (%rax,%r13,8), %xmm1
divsd %xmm2, %xmm1
divsd %xmm2, %xmm1
subsd %xmm1, %xmm0
jmp 0x3f1d9
movsd 0x210(%rsp), %xmm1
movsd 0xaf764(%rip), %xmm0    # 0xee7f0
callq 0x8620
movsd 0xaf1c7(%rip), %xmm1    # 0xee260
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x81d0
jmp 0x3f1cf
movsd 0x210(%rsp), %xmm1
movsd 0xaf730(%rip), %xmm0    # 0xee7f0
callq 0x8620
movsd 0xaf193(%rip), %xmm1    # 0xee260
addsd %xmm1, %xmm0
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movapd %xmm1, %xmm0
callq 0x81d0
movq 0x38(%r14), %rax
subsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%r15,%r13,8)
cmpl $0xb, %r12d
jl 0x3f1df
movsd 0x8(%rsp), %xmm0
callq 0x81d0
movq 0x38(%r14), %rax
movsd (%rax,%r13,8), %xmm1
movsd (%r15,%r13,8), %xmm2
leaq 0xb5826(%rip), %rdi     # 0xf4946
jmp 0x3f3fa
movsd 0x348(%rsp), %xmm0
jmp 0x3f1cf
movq 0x1e08(%rsp), %rax
movslq 0x1d94(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm1
movsd 0x360(%rsp), %xmm0
divsd 0xaf157(%rip), %xmm0    # 0xee2b0
ucomisd 0xaf0f7(%rip), %xmm0    # 0xee258
jb 0x3f406
sqrtsd %xmm0, %xmm0
jmp 0x3f417
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 0x3f1b1
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(%r14), %rax
subsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%r15,%r13,8)
incq %r13
movslq 0x40(%r14), %rax
cmpq %rax, %r13
jl 0x3ef21
jmp 0x3f426
movsd 0xd8(%rsp), %xmm0
movapd %xmm0, %xmm1
subsd 0x380(%rsp), %xmm1
movsd %xmm1, (%r15,%r13,8)
cmpl $0x3, %r12d
jl 0x3f1df
leaq 0xb579a(%rip), %rdi     # 0xf49b7
movb $0x2, %al
callq 0x8030
jmp 0x3f1df
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, (%r15,%r13,8)
movq 0x38(%r14), %rax
movsd %xmm2, (%rax,%r13,8)
cmpl $0xb, %r12d
jl 0x3f1df
leaq 0xcb4bd(%rip), %rdi     # 0x10a74e
callq 0x8510
jmp 0x3f322
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, (%r15,%r13,8)
movq 0x38(%r14), %rax
movsd %xmm2, (%rax,%r13,8)
cmpl $0xb, %r12d
jl 0x3f1df
leaq 0xcb465(%rip), %rdi     # 0x10a76b
callq 0x8510
movsd 0x1b0(%rsp), %xmm0
leaq 0xb5659(%rip), %rdi     # 0xf4974
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 0xb561b(%rip), %rdi     # 0xf4981
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 0xb55de(%rip), %rdi     # 0xf4998
movb $0x1, %al
callq 0x8030
jmp 0x3f1df
movsd 0x220(%rsp), %xmm0
movq 0x38(%r14), %rax
movapd %xmm0, %xmm2
subsd (%rax,%r13,8), %xmm2
movsd %xmm2, (%r15,%r13,8)
cmpl $0xb, %r12d
jl 0x3f1df
movsd (%rax,%r13,8), %xmm1
leaq 0xb5518(%rip), %rdi     # 0xf4912
movb $0x3, %al
callq 0x8030
jmp 0x3f1df
movsd %xmm1, 0x8(%rsp)
callq 0x82b0
movsd 0x8(%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%r15,%r13,8)
jmp 0x3f1df
movl 0x44(%r14), %eax
cmpl $0x6, %eax
jb 0x3f488
leaq 0x5cc0(%rsp), %rdi
callq 0xb4809
cmpl $0x1, %eax
jne 0x3f484
leaq 0x5daa(%rsp), %rcx
leaq 0xaefa0(%rip), %rsi     # 0xee3f0
leaq 0xb558a(%rip), %rdx     # 0xf49e1
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaebc4(%rip), %rsi     # 0xee034
leaq 0xb534a(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x843, %ecx            # imm = 0x843
jmp 0x3e937
movl 0x44(%r14), %eax
cmpl $0x5, %eax
jb 0x3f4e6
leaq 0x65b0(%rsp), %rdi
callq 0xa839b
cmpl $0x1, %eax
jne 0x3f4e2
leaq 0x6f1a(%rsp), %rcx
leaq 0xaef42(%rip), %rsi     # 0xee3f0
leaq 0xb553f(%rip), %rdx     # 0xf49f4
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaeb66(%rip), %rsi     # 0xee034
leaq 0xb52ec(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x846, %ecx            # imm = 0x846
jmp 0x3e937
movl 0x44(%r14), %eax
cmpl $0x4, %eax
jb 0x3f544
leaq 0x1d40(%rsp), %rdi
callq 0xa317e
cmpl $0x1, %eax
jne 0x3f540
leaq 0x1ed2(%rsp), %rcx
leaq 0xaeee4(%rip), %rsi     # 0xee3f0
leaq 0xb54f4(%rip), %rdx     # 0xf4a07
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaeb08(%rip), %rsi     # 0xee034
leaq 0xb528e(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x849, %ecx            # imm = 0x849
jmp 0x3e937
movl 0x44(%r14), %eax
cmpl $0x3, %eax
jb 0x3f5a2
leaq 0x26d8(%rsp), %rdi
callq 0x96c17
cmpl $0x1, %eax
jne 0x3f59e
leaq 0x2a02(%rsp), %rcx
leaq 0xaee86(%rip), %rsi     # 0xee3f0
leaq 0xb54a8(%rip), %rdx     # 0xf4a19
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaeaaa(%rip), %rsi     # 0xee034
leaq 0xb5230(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x84c, %ecx            # imm = 0x84C
jmp 0x3e937
movl 0x44(%r14), %eax
cmpl $0x2, %eax
jb 0x3f600
leaq 0x7720(%rsp), %rdi
callq 0x778fb
cmpl $0x1, %eax
jne 0x3f5fc
leaq 0xe3aa(%rsp), %rcx
leaq 0xaee28(%rip), %rsi     # 0xee3f0
leaq 0xb545f(%rip), %rdx     # 0xf4a2e
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xaea4c(%rip), %rsi     # 0xee034
leaq 0xb51d2(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x84f, %ecx            # imm = 0x84F
jmp 0x3e937
movl 0x44(%r14), %eax
testl %eax, %eax
je 0x3f659
leaq 0x3228(%rsp), %rdi
callq 0x6b2ba
cmpl $0x1, %eax
jne 0x3f659
leaq 0x428c(%rsp), %rcx
leaq 0xaedcb(%rip), %rsi     # 0xee3f0
leaq 0xb541a(%rip), %rdx     # 0xf4a46
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xae9ef(%rip), %rsi     # 0xee034
leaq 0xb5175(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x852, %ecx            # imm = 0x852
jmp 0x3e937
leaq 0x20(%rsp), %rdi
callq 0x61fd4
cmpl $0x1, %eax
jne 0x3f6ab
leaq 0xd3c(%rsp), %rcx
leaq 0xaed79(%rip), %rsi     # 0xee3f0
leaq 0xb53e1(%rip), %rdx     # 0xf4a5f
leaq 0x1540(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0xae99d(%rip), %rsi     # 0xee034
leaq 0xb5123(%rip), %rdx     # 0xf47c1
movq %rbx, %rdi
movl $0x855, %ecx            # imm = 0x855
jmp 0x3e937
movl 0x10(%r14), %edx
testl %edx, %edx
jle 0x3f6c1
movq 0x28(%r14), %rdi
addq %rdx, %rdx
xorl %esi, %esi
callq 0x8200
xorl %ebx, %ebx
cmpl $0x1, 0x44(%r14)
ja 0x3e946
leaq 0x7720(%rsp), %rdi
callq 0x778d1
cmpl $0x0, 0x44(%r14)
jne 0x3e946
leaq 0x3228(%rsp), %rdi
callq 0x6b37c
jmp 0x3e946