// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../source/transfer.c
// Function: transfer_init
int transfer_init(
                  struct precision * ppr,
                  struct background * pba,
                  struct thermodynamics * pth,
                  struct perturbations * ppt,
                  struct fourier * pfo,
                  struct transfer * ptr
                  ) {

  /** Summary: */

  /** - define local variables */

  /* running index for wavenumbers */
  int index_q;

  /* conformal time today */
  double tau0;
  /* conformal time at recombination */
  double tau_rec;
  /* order of magnitude of the oscillation period of transfer functions */
  double q_period;

  /* maximum number of sampling times for transfer sources */
  int tau_size_max;

  /* array of sources S(k,tau), just taken from perturbation module,
     or transformed if non-linear corrections are needed
     sources[index_md][index_ic * ppt->tp_size[index_md] + index_tp][index_tau * ppt->k_size[index_md] + index_k]
  */
  double *** sources;

  /* array of source derivatives S''(k,tau)
     (second derivative with respect to k, not tau!),
     used to interpolate sources at the right values of k,
     sources_spline[index_md][index_ic * ppt->tp_size[index_md] + index_tp][index_tau * ppt->k_size[index_md] + index_k]
  */
  double *** sources_spline;


  /** - array with the correspondence between the index of sources in
      the perturbation module and in the transfer module,
      tp_of_tt[index_md][index_tt]
  */
  int ** tp_of_tt;

  /* structure containing the flat spherical bessel functions */

  HyperInterpStruct BIS;
  double xmax;


  /** - check whether any spectrum in harmonic space (i.e., any \f$C_l\f$'s) is actually requested */

  if (ppt->has_cls == _FALSE_) {
    ptr->has_cls = _FALSE_;
    if (ptr->transfer_verbose > 0)
      printf("No harmonic space transfer functions to compute. Transfer module skipped.\n");
    return _SUCCESS_;
  }
  else
    ptr->has_cls = _TRUE_;

  if (ptr->transfer_verbose > 0)
    fprintf(stdout,"Computing transfers\n");

  /** - check whether we will need the full Limber scheme */

  if ((ppt->has_cl_cmb_lensing_potential == _TRUE_) && (ppt->want_lcmb_full_limber == _TRUE_)) {
    ptr->do_lcmb_full_limber = _TRUE_;
  }
  else {
    ptr->do_lcmb_full_limber = _FALSE_;
  }

  /** - get number of modes (scalars, tensors...) */

  ptr->md_size = ppt->md_size;

  /** - get conformal age / recombination time
      from background / thermodynamics structures
      (only place where these structures are used in this module) */

  tau0 = pba->conformal_age;
  tau_rec = pth->tau_rec;

  /** - correspondence between k and l depend on angular diameter
      distance, i.e. on curvature. */

  ptr->angular_rescaling = pth->angular_rescaling;

  /** - order of magnitude of the oscillation period of transfer functions */

  q_period = 2.*_PI_/(tau0-tau_rec)*ptr->angular_rescaling;

  /** - initialize all indices in the transfer structure and
      allocate all its arrays using transfer_indices() */

  class_call(transfer_indices(ppr,ppt,ptr,q_period,pba->K,pba->sgnK),
             ptr->error_message,
             ptr->error_message);

  /** - copy sources to a local array sources (in fact, only the pointers are copied, not the data), and eventually apply non-linear corrections to the sources */

  class_alloc(sources,
              ptr->md_size*sizeof(double**),
              ptr->error_message);

  class_call(transfer_perturbation_copy_sources_and_nl_corrections(ppt,pfo,ptr,sources),
             ptr->error_message,
             ptr->error_message);

  /** - spline all the sources passed by the perturbation module with respect to k (in order to interpolate later at a given value of k) */

  class_alloc(sources_spline,
              ptr->md_size*sizeof(double**),
              ptr->error_message);

  class_call(transfer_perturbation_source_spline(ppt,ptr,sources,sources_spline),
             ptr->error_message,
             ptr->error_message);

  /** - allocate and fill array describing the correspondence between perturbation types and transfer types */

  class_alloc(tp_of_tt,
              ptr->md_size*sizeof(int*),
              ptr->error_message);

  class_call(transfer_get_source_correspondence(ppt,ptr,tp_of_tt),
             ptr->error_message,
             ptr->error_message);

  /** - evaluate maximum number of sampled times in the transfer
      sources: needs to be known here, in order to allocate a large
      enough workspace */

  class_call(transfer_source_tau_size_max(ppr,pba,ppt,ptr,tau_rec,tau0,&tau_size_max),
             ptr->error_message,
             ptr->error_message);

  /** - compute flat spherical bessel functions */

  xmax = ptr->q[ptr->q_size-1]*tau0;
  // If the use the flat approximation for K<0, we need to increase xmax artificially
  if (pba->sgnK == -1 && ptr->index_q_flat_approximation < ptr->q_size)
    xmax *= sqrt(pba->sgnK*pba->K)/ptr->q[ptr->q_size-1]*(ptr->l[ptr->l_size_max-1]+1)/asinh((ptr->l[ptr->l_size_max-1]+1)/ptr->q[ptr->q_size-1]*sqrt(pba->sgnK*pba->K))*1.01;

  class_call(hyperspherical_HIS_create(0,
                                       1.,
                                       ptr->l_size_max,
                                       ptr->l,
                                       ppr->hyper_x_min,
                                       xmax,
                                       ppr->hyper_sampling_flat,
                                       ptr->l[ptr->l_size_max-1]+1,
                                       ppr->hyper_phi_min_abs,
                                       &BIS,
                                       ptr->error_message),
             ptr->error_message,
             ptr->error_message);

  /** - eventually read the selection and evolution functions */

  class_call(transfer_global_selection_read(ptr),
             ptr->error_message,
             ptr->error_message);

  /** - precompute window function for integrated nCl/sCl quantities*/
  double* window = NULL;
  if ((ppt->has_cl_lensing_potential == _TRUE_) || (ppt->has_cl_number_count == _TRUE_)) {
    class_call(transfer_precompute_selection(ppr,
                                             pba,
                                             ppt,
                                             ptr,
                                             tau_rec,
                                             tau_size_max,
                                             &(window)),
               ptr->error_message,
               ptr->error_message);
  }

  class_setup_parallel();

  /** - loop over all wavenumbers (parallelized).*/
  /* For each wavenumber: */
  for (index_q = 0; index_q < MAX(ptr->q_size,ptr->q_size_limber); index_q++) {
 class_run_parallel(with_arguments(pba,pth,ppt,ptr,ppr,index_q,tau_rec,tp_of_tt,sources,sources_spline,tau_size_max,window,tau0,&BIS),

      /* compute the transfer functions in the normal case (not the
         full Limber one) */

      struct transfer_workspace tw;
      struct transfer_workspace * ptw = &tw;

      class_call(transfer_workspace_init(ptr,
                                         ppr,
                                         ptw,
                                         ppt->tau_size,
                                         tau_size_max,
                                         pba->K,
                                         pba->sgnK,
                                         tau0-pth->tau_cut,
                                         &BIS),
                 ptr->error_message,
                 ptr->error_message);

      if (index_q < ptr->q_size) {

        if (ptr->transfer_verbose > 2)
        printf("Compute transfer for wavenumber [%d/%zu]\n",index_q,ptr->q_size-1);

        /* Update interpolation structure: */
        class_call(transfer_update_HIS(ppr,
                                       ptr,
                                       ptw,
                                       index_q,
                                       tau0),
                   ptr->error_message,
                   ptr->error_message);

        class_call(transfer_compute_for_each_q(ppr,
                                               pba,
                                               ppt,
                                               ptr,
                                               tp_of_tt,
                                               index_q,
                                               tau_size_max,
                                               tau_rec,
                                               sources,
                                               sources_spline,
                                               window,
                                               ptw,
                                               _FALSE_),
                   ptr->error_message,
                   ptr->error_message);
      }

      /* compute the transfer functions in the full Limber case (if
       this case is not needed, ptr->q_size_limber=0 and the
       condition is never met) */

      if (index_q < ptr->q_size_limber) {

        class_call(transfer_compute_for_each_q(ppr,
                                               pba,
                                               ppt,
                                               ptr,
                                               tp_of_tt,
                                               index_q,
                                               tau_size_max,
                                               tau_rec,
                                               sources,
                                               sources_spline,
                                               window,
                                               ptw,
                                               _TRUE_),
                            ptr->error_message,
                            ptr->error_message);
      }

      class_call(transfer_workspace_free(ptr,ptw),
                 ptr->error_message,
                 ptr->error_message);
      return _SUCCESS_;
    );
  } /* end of loop over wavenumber */

  class_finish_parallel();

  /** - finally, free arrays allocated outside parallel zone */
  free(window);

  class_call(transfer_perturbation_sources_spline_free(ppt,ptr,sources_spline),
             ptr->error_message,
             ptr->error_message);

  class_call(transfer_perturbation_sources_free(ppt,pfo,ptr,sources),
             ptr->error_message,
             ptr->error_message);

  class_call(transfer_free_source_correspondence(ptr,tp_of_tt),
             ptr->error_message,
             ptr->error_message);

  class_call(hyperspherical_HIS_free(&BIS,ptr->error_message),
             ptr->error_message,
             ptr->error_message);

  ptr->is_allocated = _TRUE_;
  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x928, %rsp            # imm = 0x928
movq %r9, %rbx
cmpw $0x0, 0xc(%rcx)
je 0xa408c
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r12
movw $0x1, 0x8a0(%rbx)
cmpw $0x0, 0x968(%rbx)
jle 0xa3fab
movq 0xa4fce(%rip), %rax     # 0x148f60
movq (%rax), %rcx
leaq 0x7a7e4(%rip), %rdi     # 0x11e780
movl $0x14, %esi
movl $0x1, %edx
callq 0x86d0
cmpw $0x1, 0x2c(%r15)
jne 0xa3fbf
movw $0x1, %ax
cmpw $0x1, 0x60(%r15)
je 0xa3fc1
xorl %eax, %eax
movw %ax, 0x93c(%rbx)
movl 0x854(%r15), %eax
movl %eax, 0x8a4(%rbx)
movsd 0x310(%rbp), %xmm2
movsd 0xf38(%r13), %xmm0
movsd 0xfd0(%r13), %xmm1
movsd %xmm1, 0x918(%rbx)
movsd %xmm2, 0x30(%rsp)
movsd %xmm0, 0x28(%rsp)
subsd %xmm0, %xmm2
movsd 0x4d419(%rip), %xmm0    # 0xf1428
divsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movsd 0x318(%rbp), %xmm1
movl 0x320(%rbp), %ecx
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0xa4892
testl %eax, %eax
je 0xa40c1
addq $0x96a, %rbx            # imm = 0x96A
leaq 0x4a3a7(%rip), %rsi     # 0xee3f0
leaq 0x7a745(%rip), %rdx     # 0x11e795
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x49fc8(%rip), %rsi     # 0xee034
leaq 0x7a75a(%rip), %rdx     # 0x11e7cd
movq %rbx, %rdi
movl $0xd8, %ecx
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %ebp
jmp 0xa40ad
movw $0x0, 0x8a0(%rbx)
xorl %ebp, %ebp
cmpw $0x0, 0x968(%rbx)
jle 0xa40ad
leaq 0x7d360(%rip), %rdi     # 0x121408
callq 0x8510
movl %ebp, %eax
addq $0x928, %rsp            # imm = 0x928
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, 0x68(%rsp)
movslq 0x8a4(%rbx), %r14
leaq (,%r14,8), %rdi
callq 0x8460
testq %rax, %rax
je 0xa4142
movq %r15, %rdi
movq 0x68(%rsp), %rsi
movq %rbx, %rdx
movq %rax, %rcx
movq %rax, %r14
callq 0xa5008
testl %eax, %eax
je 0xa418e
addq $0x96a, %rbx            # imm = 0x96A
leaq 0x4a2e5(%rip), %rsi     # 0xee3f0
leaq 0x7a6c9(%rip), %rdx     # 0x11e7db
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x49f06(%rip), %rsi     # 0xee034
leaq 0x7a698(%rip), %rdx     # 0x11e7cd
movq %rbx, %rdi
movl $0xe2, %ecx
jmp 0xa407b
shll $0x3, %r14d
leaq 0x49eb7(%rip), %rsi     # 0xee004
leaq 0x74183(%rip), %rdx     # 0x1182d7
leaq 0x120(%rsp), %r15
movq %r15, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x96a, %rbx            # imm = 0x96A
leaq 0x49ebd(%rip), %rsi     # 0xee034
leaq 0x7a64f(%rip), %rdx     # 0x11e7cd
movq %rbx, %rdi
movl $0xde, %ecx
movq %r15, %r8
jmp 0xa407e
movq %r14, 0x20(%rsp)
movslq 0x8a4(%rbx), %r14
leaq (,%r14,8), %rdi
callq 0x8460
testq %rax, %rax
je 0xa420f
movq %r15, %rdi
movq %rbx, %rsi
movq 0x20(%rsp), %rdx
movq %rax, %rcx
movq %rax, %r14
callq 0xa541a
testl %eax, %eax
je 0xa4258
addq $0x96a, %rbx            # imm = 0x96A
leaq 0x4a218(%rip), %rsi     # 0xee3f0
leaq 0x7a656(%rip), %rdx     # 0x11e835
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x49e39(%rip), %rsi     # 0xee034
leaq 0x7a5cb(%rip), %rdx     # 0x11e7cd
movq %rbx, %rdi
movl $0xec, %ecx
jmp 0xa407b
shll $0x3, %r14d
leaq 0x49dea(%rip), %rsi     # 0xee004
leaq 0x7a605(%rip), %rdx     # 0x11e826
leaq 0x120(%rsp), %r15
movq %r15, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x96a, %rbx            # imm = 0x96A
leaq 0x49df0(%rip), %rsi     # 0xee034
leaq 0x7a582(%rip), %rdx     # 0x11e7cd
movq %rbx, %rdi
movl $0xe8, %ecx
jmp 0xa4186
movq %r14, 0x60(%rsp)
movslq 0x8a4(%rbx), %r14
leaq (,%r14,8), %rdi
callq 0x8460
testq %rax, %rax
je 0xa42d4
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movq %rax, %r14
callq 0xa5699
testl %eax, %eax
je 0xa431d
addq $0x96a, %rbx            # imm = 0x96A
leaq 0x4a153(%rip), %rsi     # 0xee3f0
leaq 0x7a5de(%rip), %rdx     # 0x11e882
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x49d74(%rip), %rsi     # 0xee034
leaq 0x7a506(%rip), %rdx     # 0x11e7cd
movq %rbx, %rdi
movl $0xf6, %ecx
jmp 0xa407b
shll $0x3, %r14d
leaq 0x49d25(%rip), %rsi     # 0xee004
leaq 0x7a593(%rip), %rdx     # 0x11e879
leaq 0x120(%rsp), %r15
movq %r15, %rdi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x30af0
addq $0x96a, %rbx            # imm = 0x96A
leaq 0x49d2b(%rip), %rsi     # 0xee034
leaq 0x7a4bd(%rip), %rdx     # 0x11e7cd
movq %rbx, %rdi
movl $0xf2, %ecx
jmp 0xa4186
movq %r14, 0x58(%rsp)
leaq 0xc(%rsp), %r8
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movsd 0x28(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
callq 0xa5abd
testl %eax, %eax
je 0xa438d
addq $0x96a, %rbx            # imm = 0x96A
leaq 0x4a09a(%rip), %rsi     # 0xee3f0
leaq 0x7a55a(%rip), %rdx     # 0x11e8b7
leaq 0x120(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x49cbb(%rip), %rsi     # 0xee034
leaq 0x7a44d(%rip), %rdx     # 0x11e7cd
movq %rbx, %rdi
movl $0xfe, %ecx
jmp 0xa407b
movq 0x920(%rbx), %rax
movq 0x928(%rbx), %rcx
movsd -0x8(%rcx,%rax,8), %xmm2
mulsd 0x30(%rsp), %xmm2
cmpl $-0x1, 0x320(%rbp)
jne 0xa4493
movslq 0x938(%rbx), %rcx
cmpq %rcx, %rax
jbe 0xa4493
movsd %xmm2, 0x18(%rsp)
movsd 0x318(%rbp), %xmm1
movapd 0x49e56(%rip), %xmm0    # 0xee230
xorpd %xmm1, %xmm0
movsd 0x4d122(%rip), %xmm2    # 0xf1508
ucomisd %xmm1, %xmm2
jb 0xa43f2
sqrtsd %xmm0, %xmm0
jmp 0xa43f7
callq 0x82b0
movq 0x928(%rbx), %rax
movq 0x910(%rbx), %rcx
movq 0x920(%rbx), %rdx
movsd -0x8(%rax,%rdx,8), %xmm1
divsd %xmm1, %xmm0
movslq 0x908(%rbx), %rax
movl -0x4(%rcx,%rax,4), %eax
incl %eax
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm2, %xmm0
movsd %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl 0x320(%rbp), %xmm0
mulsd 0x318(%rbp), %xmm0
divsd %xmm1, %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xa445b
sqrtsd %xmm0, %xmm0
jmp 0xa446a
movsd %xmm2, (%rsp)
callq 0x82b0
movsd (%rsp), %xmm2
mulsd %xmm0, %xmm2
movapd %xmm2, %xmm0
callq 0x8470
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
mulsd 0x79eb7(%rip), %xmm1    # 0x11e340
movsd 0x18(%rsp), %xmm2
mulsd %xmm1, %xmm2
movslq 0x908(%rbx), %rsi
movq 0x910(%rbx), %rdx
movsd 0x718(%r12), %xmm1
movsd 0x720(%r12), %xmm3
movl -0x4(%rdx,%rsi,4), %ecx
incl %ecx
movsd 0x740(%r12), %xmm4
leaq 0x96a(%rbx), %r14
movsd 0x49d8c(%rip), %xmm0    # 0xee260
leaq 0xc0(%rsp), %r8
xorl %edi, %edi
movq %r14, %r9
callq 0x22154
cmpl $0x1, %eax
jne 0xa4529
leaq 0x49efe(%rip), %rsi     # 0xee3f0
leaq 0x7a407(%rip), %rdx     # 0x11e900
leaq 0x120(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x49b1f(%rip), %rsi     # 0xee034
leaq 0x7a2b1(%rip), %rdx     # 0x11e7cd
movq %r14, %rdi
movl $0x113, %ecx            # imm = 0x113
jmp 0xa45e7
movq %rbx, %rdi
callq 0xa5bd8
testl %eax, %eax
je 0xa4570
leaq 0x49eb4(%rip), %rsi     # 0xee3f0
leaq 0x7a478(%rip), %rdx     # 0x11e9bb
leaq 0x120(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x49ad5(%rip), %rsi     # 0xee034
leaq 0x7a267(%rip), %rdx     # 0x11e7cd
movq %r14, %rdi
movl $0x119, %ecx            # imm = 0x119
jmp 0xa45e7
movq $0x0, 0x38(%rsp)
cmpw $0x1, 0x2e(%r15)
je 0xa4589
cmpw $0x1, 0x30(%r15)
jne 0xa45ef
movl 0xc(%rsp), %r8d
leaq 0x38(%rsp), %r9
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %rbx, %rcx
movsd 0x28(%rsp), %xmm0
callq 0xa632b
testl %eax, %eax
je 0xa45ef
leaq 0x49e3b(%rip), %rsi     # 0xee3f0
leaq 0x7a423(%rip), %rdx     # 0x11e9df
leaq 0x120(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x49a5c(%rip), %rsi     # 0xee034
leaq 0x7a1ee(%rip), %rdx     # 0x11e7cd
movq %r14, %rdi
movl $0x126, %ecx            # imm = 0x126
movq %rbx, %r8
jmp 0xa407e
movq %r14, (%rsp)
callq 0x1c686
leaq 0x80(%rsp), %rdi
movl %eax, %esi
callq 0x1c736
xorpd %xmm0, %xmm0
movapd %xmm0, 0x40(%rsp)
movq $0x0, 0x50(%rsp)
movq 0x920(%rbx), %rax
orq 0x940(%rbx), %rax
je 0xa478f
movl 0xc(%rsp), %eax
movl %eax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x10(%rsp)
xorl %r14d, %r14d
movq %rbp, 0x120(%rsp)
movq %r13, 0x128(%rsp)
movq %r15, 0x130(%rsp)
movq %rbx, 0x138(%rsp)
movq %r12, 0x140(%rsp)
movl %r14d, 0x148(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x150(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x158(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x160(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x168(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x170(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x178(%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x180(%rsp)
leaq 0xc0(%rsp), %rax
movq %rax, 0x188(%rsp)
leaq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rsi
leaq 0x120(%rsp), %rdx
callq 0xa7eae
leaq 0x40(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x1dd2e
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xa4718
callq 0x1d330
incq %r14
movq 0x920(%rbx), %rax
movq 0x940(%rbx), %rcx
cmpq %rcx, %rax
cmovaq %rax, %rcx
cmpq %r14, %rcx
ja 0xa4643
movq 0x40(%rsp), %r12
movq 0x48(%rsp), %r14
cmpq %r14, %r12
je 0xa476b
movq %r12, %rdi
callq 0x1c7ba
testl %eax, %eax
jne 0xa4828
addq $0x10, %r12
cmpq %r14, %r12
jne 0xa4748
movq 0x40(%rsp), %r12
movq 0x48(%rsp), %r14
cmpq %r12, %r14
je 0xa478f
movq %r12, %r13
movq 0x8(%r13), %rdi
testq %rdi, %rdi
je 0xa4781
callq 0x1d330
addq $0x10, %r13
cmpq %r14, %r13
jne 0xa4773
movq %r12, 0x48(%rsp)
movq 0x38(%rsp), %rdi
callq 0x8410
movq %r15, %rdi
movq %rbx, %rsi
movq 0x60(%rsp), %rdx
callq 0xa8102
movq %r15, %rdi
movq 0x68(%rsp), %rsi
movq %rbx, %rdx
movq 0x20(%rsp), %rcx
callq 0xa81ad
movq %rbx, %rdi
movq 0x58(%rsp), %rsi
callq 0xa835c
leaq 0xc0(%rsp), %rdi
movq (%rsp), %rsi
callq 0x232f2
cmpl $0x1, %eax
jne 0xa482f
leaq 0x49c08(%rip), %rsi     # 0xee3f0
leaq 0x7a244(%rip), %rdx     # 0x11ea33
leaq 0x120(%rsp), %rdi
movq (%rsp), %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x4982b(%rip), %rsi     # 0xee034
leaq 0x79fbd(%rip), %rdx     # 0x11e7cd
leaq 0x120(%rsp), %r8
movq (%rsp), %rdi
movl $0x192, %ecx            # imm = 0x192
xorl %eax, %eax
callq 0x30af0
movl $0x1, %ebp
jmp 0xa483a
movw $0x1, 0x116a(%rbx)
xorl %ebp, %ebp
leaq 0x40(%rsp), %rdi
callq 0x1c806
leaq 0x80(%rsp), %rdi
callq 0x1c84c
jmp 0xa40ad
jmp 0xa4870
jmp 0xa4870
jmp 0xa4870
movq %rax, %rbx
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xa4873
callq 0x1d330
jmp 0xa4873
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1c806
leaq 0x80(%rsp), %rdi
callq 0x1c84c
movq %rbx, %rdi
callq 0x8650