// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../source/transfer.c
// Function: transfer_compute_for_each_q
int transfer_compute_for_each_q(
                                struct precision * ppr,
                                struct background * pba,
                                struct perturbations * ppt,
                                struct transfer * ptr,
                                int ** tp_of_tt,
                                int index_q,
                                int tau_size_max,
                                double tau_rec,
                                double *** pert_sources,
                                double *** pert_sources_spline,
                                double * window,
                                struct transfer_workspace * ptw,
                                short use_full_limber
                                ) {

  /** Summary: */

  /** - define local variables */

  /* running index for modes */
  int index_md;
  /* running index for initial conditions */
  int index_ic;
  /* running index for transfer types */
  int index_tt;
  /* running index for multipoles */
  int index_l;

  /** - we deal with workspaces, i.e. with contiguous memory zones (one
      per thread) containing various fields used by the integration
      routine */

  /* - first workspace field: perturbation source interpolated from perturbation structure */
  double * interpolated_sources;

  /* - second workspace field: list of tau0-tau values, tau0_minus_tau[index_tau] */
  double * tau0_minus_tau;

  /* - third workspace field: list of trapezoidal weights for integration over tau */
  double * w_trapz;

  /* - fourth workspace field, containing just a double: number of time values */
  int * tau_size;

  /* - fifth workspace field, identical to above interpolated sources:
     sources[index_tau] */
  double * sources;

  /** - for a given l, maximum value of k such that we can convolve
      the source with Bessel functions j_l(x) without reaching x_max */
  double q_max_bessel=0.;

  /* a value of index_type */
  int previous_type;

  double l;

  short neglect;

  radial_function_type radial_type;

  double q,k,k_max;

  /** - store the sources in the workspace and define all
      fields in this workspace */
  interpolated_sources = ptw->interpolated_sources;
  tau0_minus_tau = ptw->tau0_minus_tau;
  w_trapz  = ptw->w_trapz;
  tau_size = &(ptw->tau_size);
  sources = ptw->sources;

  /** - loop over all modes. For each mode */

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

    if (use_full_limber == _FALSE_) {
      q = ptr->q[index_q];
      k = ptr->k[index_md][index_q];
      k_max = ppt->k[index_md][ppt->k_size_cl[index_md]-1];
    }
    else {
      q = ptr->q_limber[index_q];
      k = ptr->k_limber[index_md][index_q];
      k_max = ppt->k[index_md][ppt->k_size[index_md]-1];
    }


    /* if we reached q_max for this mode, there is nothing to be done */

    if (k <= k_max) {

      /** - loop over initial conditions. */
      /* For each of them: */

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

        /* initialize the previous type index */
        previous_type=-1;

        /* - loop over types. For each of them: */

        for (index_tt = 0; index_tt < ptr->tt_size[index_md]; index_tt++) {


          /** - define here wich transfer fucntion should be computed
                in the standard way and full limber way. Currently:
                compute all transfer functions in the standard way and
                only the lensing CMB potential in the full limber
                way. */

          if ((use_full_limber == _FALSE_) || (index_tt == ptr->index_tt_lcmb)) {

            /** - check if we must now deal with a new source with a
                new index ppt->index_type. If yes, interpolate it at the
                right values of k. */

            if (tp_of_tt[index_md][index_tt] != previous_type) {

              class_call(transfer_interpolate_sources(ppt,
                                                      ptr,
                                                      k,
                                                      index_md,
                                                      index_ic,
                                                      tp_of_tt[index_md][index_tt],
                                                      pert_sources[index_md][index_ic * ppt->tp_size[index_md] + tp_of_tt[index_md][index_tt]],
                                                      pert_sources_spline[index_md][index_ic * ppt->tp_size[index_md] + tp_of_tt[index_md][index_tt]],
                                                      interpolated_sources),
                         ptr->error_message,
                         ptr->error_message);
            }

            previous_type = tp_of_tt[index_md][index_tt];

            /* the code makes a distinction between "perturbation
               sources" (e.g. gravitational potential) and "transfer
               sources" (e.g. total density fluctuations, obtained
               through the Poisson equation, and observed with a given
               selection function).

               The next routine computes the transfer source given the
               interpolated perturbation source, and copies it in the
               workspace. */

            class_call(transfer_sources(ppr,
                                        pba,
                                        ppt,
                                        ptr,
                                        interpolated_sources,
                                        tau_rec,
                                        k,
                                        index_md,
                                        index_tt,
                                        sources,
                                        window,
                                        tau_size_max,
                                        tau0_minus_tau,
                                        w_trapz,
                                        tau_size),
                       ptr->error_message,
                       ptr->error_message);

            /* now that the array of times tau0_minus_tau is known, we can
               infer the array of radial coordinates r(tau0_minus_tau) as well as a
               few other quantities related by trigonometric functions */

            class_call(transfer_radial_coordinates(ptr,ptw,index_md,index_q),
                       ptr->error_message,
                       ptr->error_message);

            /** - Select radial function type */
            class_call(transfer_select_radial_function(
                                                       ppt,
                                                       ptr,
                                                       index_md,
                                                       index_tt,
                                                       &radial_type),
                       ptr->error_message,
                       ptr->error_message);

            for (index_l = 0; index_l < ptr->l_size[index_md]; index_l++) {

              l = (double)ptr->l[index_l];

              /* neglect transfer function when l is much smaller than k*tau0 */
              class_call(transfer_can_be_neglected(ppr,
                                                   ppt,
                                                   ptr,
                                                   index_md,
                                                   index_ic,
                                                   index_tt,
                                                   (pba->conformal_age-tau_rec)*ptr->angular_rescaling,
                                                   ptr->q[index_q],
                                                   l,
                                                   &neglect),
                         ptr->error_message,
                         ptr->error_message);

              /* for K>0 (closed), transfer functions only defined for l<nu */
              if ((ptw->sgnK == 1) && (ptr->l[index_l] >= (int)(q/sqrt(ptw->K)+0.2))) {
                neglect = _TRUE_;
              }
              /* This would maybe go into transfer_can_be_neglected later: */
              if ((ptw->sgnK != 0) && (index_q < ptr->index_q_flat_approximation) && (index_l>=ptw->HIS.l_size) && (use_full_limber == _FALSE_)) {
                neglect = _TRUE_;
              }
              if (neglect == _TRUE_) {

                if (use_full_limber == _FALSE_) {
                  ptr->transfer[index_md][((index_ic * ptr->tt_size[index_md] + index_tt)
                                           * ptr->l_size[index_md] + index_l)
                                          * ptr->q_size + index_q] = 0.;
                }
                else {
                  ptr->transfer_limber[index_md][((index_ic * ptr->tt_size[index_md] + index_tt)
                                                  * ptr->l_size[index_md] + index_l)
                                                 * ptr->q_size_limber + index_q] = 0.;
                }
              }
              else {

                if (use_full_limber == _FALSE_) {

                  /* for a given l, maximum value of k such that we can
                     convolve the source with Bessel functions j_l(x)
                     without reaching x_max (this is relevant in the flat
                     case when the bessels are computed with the old bessel
                     module. otherwise this condition is guaranteed by the
                     choice of proper xmax when computing bessels) */
                  if (ptw->sgnK == 0) {
                    q_max_bessel = ptw->pBIS->x[ptw->pBIS->x_size-1]/tau0_minus_tau[0];
                  }
                  else {
                    q_max_bessel = ptr->q[ptr->q_size-1];
                  }

                  /* neglect late time CMB sources when l is above threshold */
                  class_call(transfer_late_source_can_be_neglected(ppr,
                                                                   ppt,
                                                                   ptr,
                                                                   index_md,
                                                                   index_tt,
                                                                   l,
                                                                   &(ptw->neglect_late_source)),
                             ptr->error_message,
                             ptr->error_message);
                }

                /* note: if use_full_limber == _TRUE_, q_max_bessel is
                   still equal to zero at this stage, but this is OK
                   because in this case it will never be used, not
                   even inside transfer_compute_for_each_l() */

                /* compute the transfer function for this l */
                class_call(transfer_compute_for_each_l(
                                                       ptw,
                                                       ppr,
                                                       ppt,
                                                       ptr,
                                                       index_q,
                                                       index_md,
                                                       index_ic,
                                                       index_tt,
                                                       index_l,
                                                       l,
                                                       q_max_bessel,
                                                       radial_type,
                                                       use_full_limber
                                                       ),
                           ptr->error_message,
                           ptr->error_message);
              }

            } /* end of loop over l */

          }
          else {
            for (index_l = 0; index_l < ptr->l_size[index_md]; index_l++) {
              if (use_full_limber == _FALSE_) {
                ptr->transfer[index_md][((index_ic * ptr->tt_size[index_md] + index_tt)
                                         * ptr->l_size[index_md] + index_l)
                                        * ptr->q_size + index_q] = 0.;
              }
              else {
                ptr->transfer_limber[index_md][((index_ic * ptr->tt_size[index_md] + index_tt)
                                                * ptr->l_size[index_md] + index_l)
                                               * ptr->q_size_limber + index_q] = 0.;
              }
            }
          }

        } /* end of loop over type */

      } /* end of loop over initial condition */

    }

    else {

      for (index_ic = 0; index_ic < ppt->ic_size[index_md]; index_ic++) {
        for (index_tt = 0; index_tt < ptr->tt_size[index_md]; index_tt++) {
          for (index_l = 0; index_l < ptr->l_size[index_md]; index_l++) {

            if (use_full_limber == _FALSE_) {
              ptr->transfer[index_md][((index_ic * ptr->tt_size[index_md] + index_tt)
                                       * ptr->l_size[index_md] + index_l)
                                      * ptr->q_size + index_q] = 0.;
            }
            else {
              ptr->transfer_limber[index_md][((index_ic * ptr->tt_size[index_md] + index_tt)
                                              * ptr->l_size[index_md] + index_l)
                                             * ptr->q_size_limber + index_q] = 0.;
            }
          }
        }
      }
    }

  } /* end of loop over mode */

  return _SUCCESS_;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x3908, %rsp           # imm = 0x3908
movw 0x3958(%rsp), %ax
movq 0x3950(%rsp), %rax
movq 0x3948(%rsp), %rax
movq 0x3940(%rsp), %rax
movq 0x3938(%rsp), %rax
movl 0x3930(%rsp), %eax
movq %rdi, 0x38f8(%rsp)
movq %rsi, 0x38f0(%rsp)
movq %rdx, 0x38e8(%rsp)
movq %rcx, 0x38e0(%rsp)
movq %r8, 0x38d8(%rsp)
movl %r9d, 0x38d4(%rsp)
movsd %xmm0, 0x38c8(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x3888(%rsp)
movq 0x3950(%rsp), %rax
movq 0x80(%rax), %rax
movq %rax, 0x38b0(%rsp)
movq 0x3950(%rsp), %rax
movq 0x90(%rax), %rax
movq %rax, 0x38a8(%rsp)
movq 0x3950(%rsp), %rax
movq 0x98(%rax), %rax
movq %rax, 0x38a0(%rsp)
movq 0x3950(%rsp), %rax
addq $0x74, %rax
movq %rax, 0x3898(%rsp)
movq 0x3950(%rsp), %rax
movq 0x88(%rax), %rax
movq %rax, 0x3890(%rsp)
movl $0x0, 0x38c4(%rsp)
movl 0x38c4(%rsp), %eax
movq 0x38e0(%rsp), %rcx
cmpl 0x8a4(%rcx), %eax
jge 0x13e05e
movswl 0x3958(%rsp), %eax
cmpl $0x0, %eax
jne 0x13d14c
movq 0x38e0(%rsp), %rax
movq 0x928(%rax), %rax
movslq 0x38d4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x3868(%rsp)
movq 0x38e0(%rsp), %rax
movq 0x930(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x38d4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x3860(%rsp)
movq 0x38e8(%rsp), %rax
movq 0x9d0(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x38e8(%rsp), %rcx
movq 0x9b8(%rcx), %rcx
movslq 0x38c4(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x3858(%rsp)
jmp 0x13d1eb
movq 0x38e0(%rsp), %rax
movq 0x948(%rax), %rax
movslq 0x38d4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x3868(%rsp)
movq 0x38e0(%rsp), %rax
movq 0x950(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x38d4(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x3860(%rsp)
movq 0x38e8(%rsp), %rax
movq 0x9d0(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x38e8(%rsp), %rcx
movq 0x9c8(%rcx), %rcx
movslq 0x38c4(%rsp), %rdx
movl (%rcx,%rdx,4), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x3858(%rsp)
movsd 0x3860(%rsp), %xmm1
movsd 0x3858(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x13de38
movl $0x0, 0x38c0(%rsp)
movl 0x38c0(%rsp), %eax
movq 0x38e8(%rsp), %rcx
movq 0x870(%rcx), %rcx
movslq 0x38c4(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x13de33
movl $0xffffffff, 0x3884(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x38bc(%rsp)
movl 0x38bc(%rsp), %eax
movq 0x38e0(%rsp), %rcx
movq 0x8f0(%rcx), %rcx
movslq 0x38c4(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x13de1b
movswl 0x3958(%rsp), %eax
cmpl $0x0, %eax
je 0x13d29e
movl 0x38bc(%rsp), %eax
movq 0x38e0(%rsp), %rcx
cmpl 0x8bc(%rcx), %eax
jne 0x13dc89
movq 0x38d8(%rsp), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x38bc(%rsp), %rcx
movl (%rax,%rcx,4), %eax
cmpl 0x3884(%rsp), %eax
je 0x13d459
movq 0x38e8(%rsp), %rdi
movq 0x38e0(%rsp), %rsi
movsd 0x3860(%rsp), %xmm0
movl 0x38c4(%rsp), %edx
movl 0x38c0(%rsp), %ecx
movq 0x38d8(%rsp), %rax
movslq 0x38c4(%rsp), %r8
movq (%rax,%r8,8), %rax
movslq 0x38bc(%rsp), %r8
movl (%rax,%r8,4), %r8d
movq 0x3938(%rsp), %rax
movslq 0x38c4(%rsp), %r9
movq (%rax,%r9,8), %rax
movl 0x38c0(%rsp), %r9d
movq 0x38e8(%rsp), %r10
movq 0x998(%r10), %r10
movslq 0x38c4(%rsp), %r11
imull (%r10,%r11,4), %r9d
movq 0x38d8(%rsp), %r10
movslq 0x38c4(%rsp), %r11
movq (%r10,%r11,8), %r10
movslq 0x38bc(%rsp), %r11
addl (%r10,%r11,4), %r9d
movslq %r9d, %r9
movq (%rax,%r9,8), %r9
movq 0x3940(%rsp), %rax
movslq 0x38c4(%rsp), %r10
movq (%rax,%r10,8), %rax
movl 0x38c0(%rsp), %r10d
movq 0x38e8(%rsp), %r11
movq 0x998(%r11), %r11
movslq 0x38c4(%rsp), %rbx
imull (%r11,%rbx,4), %r10d
movq 0x38d8(%rsp), %r11
movslq 0x38c4(%rsp), %rbx
movq (%r11,%rbx,8), %r11
movslq 0x38bc(%rsp), %rbx
addl (%r11,%rbx,4), %r10d
movslq %r10d, %r10
movq (%rax,%r10,8), %r10
movq 0x38b0(%rsp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x13e080
cmpl $0x1, %eax
jne 0x13d457
leaq 0x3050(%rsp), %rdi
movq 0x38e0(%rsp), %rcx
addq $0x96a, %rcx            # imm = 0x96A
leaq 0x94fd0(%rip), %rsi     # 0x1d23d8
leaq 0xc622b(%rip), %rdx     # 0x20363a
movb $0x0, %al
callq 0x5b9c0
movq 0x38e0(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
leaq 0x3050(%rsp), %r8
leaq 0x94c00(%rip), %rsi     # 0x1d2034
leaq 0xc632c(%rip), %rdx     # 0x203767
movl $0x7b6, %ecx            # imm = 0x7B6
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3904(%rsp)
jmp 0x13e069
jmp 0x13d459
movq 0x38d8(%rsp), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movslq 0x38bc(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x3884(%rsp)
movq 0x38f8(%rsp), %rdi
movq 0x38f0(%rsp), %rsi
movq 0x38e8(%rsp), %rdx
movq 0x38e0(%rsp), %rcx
movq 0x38b0(%rsp), %r8
movsd 0x38c8(%rsp), %xmm0
movsd 0x3860(%rsp), %xmm1
movl 0x38c4(%rsp), %r9d
movl 0x38bc(%rsp), %ebp
movq 0x3890(%rsp), %r15
movq 0x3948(%rsp), %r14
movl 0x3930(%rsp), %ebx
movq 0x38a8(%rsp), %r11
movq 0x38a0(%rsp), %r10
movq 0x3898(%rsp), %rax
movl %ebp, (%rsp)
movq %r15, 0x8(%rsp)
movq %r14, 0x10(%rsp)
movl %ebx, 0x18(%rsp)
movq %r11, 0x20(%rsp)
movq %r10, 0x28(%rsp)
movq %rax, 0x30(%rsp)
callq 0x13e530
cmpl $0x1, %eax
jne 0x13d58e
leaq 0x2850(%rsp), %rdi
movq 0x38e0(%rsp), %rcx
addq $0x96a, %rcx            # imm = 0x96A
leaq 0x94e99(%rip), %rsi     # 0x1d23d8
leaq 0xc623d(%rip), %rdx     # 0x203783
movb $0x0, %al
callq 0x5b9c0
movq 0x38e0(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
leaq 0x2850(%rsp), %r8
leaq 0x94ac9(%rip), %rsi     # 0x1d2034
leaq 0xc61f5(%rip), %rdx     # 0x203767
movl $0x7d5, %ecx            # imm = 0x7D5
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3904(%rsp)
jmp 0x13e069
movq 0x38e0(%rsp), %rdi
movq 0x3950(%rsp), %rsi
movl 0x38c4(%rsp), %edx
movl 0x38d4(%rsp), %ecx
callq 0x140100
cmpl $0x1, %eax
jne 0x13d623
leaq 0x2050(%rsp), %rdi
movq 0x38e0(%rsp), %rcx
addq $0x96a, %rcx            # imm = 0x96A
leaq 0x94e04(%rip), %rsi     # 0x1d23d8
leaq 0xc6245(%rip), %rdx     # 0x203820
movb $0x0, %al
callq 0x5b9c0
movq 0x38e0(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
leaq 0x2050(%rsp), %r8
leaq 0x94a34(%rip), %rsi     # 0x1d2034
leaq 0xc6160(%rip), %rdx     # 0x203767
movl $0x7dd, %ecx            # imm = 0x7DD
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3904(%rsp)
jmp 0x13e069
movq 0x38e8(%rsp), %rdi
movq 0x38e0(%rsp), %rsi
movl 0x38c4(%rsp), %edx
movl 0x38bc(%rsp), %ecx
leaq 0x3870(%rsp), %r8
callq 0x1404d0
cmpl $0x1, %eax
jne 0x13d6c0
leaq 0x1850(%rsp), %rdi
movq 0x38e0(%rsp), %rcx
addq $0x96a, %rcx            # imm = 0x96A
leaq 0x94d67(%rip), %rsi     # 0x1d23d8
leaq 0xc61de(%rip), %rdx     # 0x203856
movb $0x0, %al
callq 0x5b9c0
movq 0x38e0(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
leaq 0x1850(%rsp), %r8
leaq 0x94997(%rip), %rsi     # 0x1d2034
leaq 0xc60c3(%rip), %rdx     # 0x203767
movl $0x7e7, %ecx            # imm = 0x7E7
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3904(%rsp)
jmp 0x13e069
movl $0x0, 0x38b8(%rsp)
movl 0x38b8(%rsp), %eax
movq 0x38e0(%rsp), %rcx
movq 0x900(%rcx), %rcx
movslq 0x38c4(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x13dc84
movq 0x38e0(%rsp), %rax
movq 0x910(%rax), %rax
movslq 0x38b8(%rsp), %rcx
cvtsi2sdl (%rax,%rcx,4), %xmm0
movsd %xmm0, 0x3878(%rsp)
movq 0x38f8(%rsp), %rdi
movq 0x38e8(%rsp), %rsi
movq 0x38e0(%rsp), %rdx
movl 0x38c4(%rsp), %ecx
movl 0x38c0(%rsp), %r8d
movl 0x38bc(%rsp), %r9d
movq 0x38f0(%rsp), %rax
movsd 0x310(%rax), %xmm0
subsd 0x38c8(%rsp), %xmm0
movq 0x38e0(%rsp), %rax
mulsd 0x918(%rax), %xmm0
movq 0x38e0(%rsp), %rax
movq 0x928(%rax), %rax
movslq 0x38d4(%rsp), %r10
movsd (%rax,%r10,8), %xmm1
movsd 0x3878(%rsp), %xmm2
leaq 0x3876(%rsp), %rax
movq %rax, (%rsp)
callq 0x1407d0
cmpl $0x1, %eax
jne 0x13d818
leaq 0x1050(%rsp), %rdi
movq 0x38e0(%rsp), %rcx
addq $0x96a, %rcx            # imm = 0x96A
leaq 0x94c0f(%rip), %rsi     # 0x1d23d8
leaq 0xc60d3(%rip), %rdx     # 0x2038a3
movb $0x0, %al
callq 0x5b9c0
movq 0x38e0(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
leaq 0x1050(%rsp), %r8
leaq 0x9483f(%rip), %rsi     # 0x1d2034
leaq 0xc5f6b(%rip), %rdx     # 0x203767
movl $0x7f9, %ecx            # imm = 0x7F9
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3904(%rsp)
jmp 0x13e069
movq 0x3950(%rsp), %rax
cmpl $0x1, 0xc0(%rax)
jne 0x13d89a
movq 0x38e0(%rsp), %rax
movq 0x910(%rax), %rax
movslq 0x38b8(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x44(%rsp)
movsd 0x3868(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x3950(%rsp), %rax
movsd 0xb8(%rax), %xmm0
callq 0x82e0
movl 0x44(%rsp), %eax
movaps %xmm0, %xmm1
movsd 0x48(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd 0x949fc(%rip), %xmm1    # 0x1d2280
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
cmpl %ecx, %eax
jl 0x13d89a
movw $0x1, 0x3876(%rsp)
movq 0x3950(%rsp), %rax
cmpl $0x0, 0xc0(%rax)
je 0x13d8ed
movl 0x38d4(%rsp), %eax
movq 0x38e0(%rsp), %rcx
cmpl 0x938(%rcx), %eax
jge 0x13d8ed
movl 0x38b8(%rsp), %eax
movq 0x3950(%rsp), %rcx
cmpl 0x1c(%rcx), %eax
jl 0x13d8ed
movswl 0x3958(%rsp), %eax
cmpl $0x0, %eax
jne 0x13d8ed
movw $0x1, 0x3876(%rsp)
movswl 0x3876(%rsp), %eax
cmpl $0x1, %eax
jne 0x13da31
movswl 0x3958(%rsp), %eax
cmpl $0x0, %eax
jne 0x13d9a0
movq 0x38e0(%rsp), %rax
movq 0x958(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x38c0(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x8f0(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38bc(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x900(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38b8(%rsp), %ecx
movslq %ecx, %rcx
movq 0x38e0(%rsp), %rdx
imulq 0x920(%rdx), %rcx
movslq 0x38d4(%rsp), %rdx
addq %rdx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x13da2c
movq 0x38e0(%rsp), %rax
movq 0x960(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x38c0(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x8f0(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38bc(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x900(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38b8(%rsp), %ecx
movslq %ecx, %rcx
movq 0x38e0(%rsp), %rdx
imulq 0x940(%rdx), %rcx
movslq 0x38d4(%rsp), %rdx
addq %rdx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x13dc6c
movswl 0x3958(%rsp), %eax
cmpl $0x0, %eax
jne 0x13db7c
movq 0x3950(%rsp), %rax
cmpl $0x0, 0xc0(%rax)
jne 0x13da94
movq 0x3950(%rsp), %rax
movq 0x68(%rax), %rax
movq 0x38(%rax), %rax
movq 0x3950(%rsp), %rcx
movq 0x68(%rcx), %rcx
movl 0x30(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x38a8(%rsp), %rax
divsd (%rax), %xmm0
movsd %xmm0, 0x3888(%rsp)
jmp 0x13dac4
movq 0x38e0(%rsp), %rax
movq 0x928(%rax), %rax
movq 0x38e0(%rsp), %rcx
movq 0x920(%rcx), %rcx
subq $0x1, %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x3888(%rsp)
movq 0x38f8(%rsp), %rdi
movq 0x38e8(%rsp), %rsi
movq 0x38e0(%rsp), %rdx
movl 0x38c4(%rsp), %ecx
movl 0x38bc(%rsp), %r8d
movsd 0x3878(%rsp), %xmm0
movq 0x3950(%rsp), %r9
addq $0xd0, %r9
callq 0x140c20
cmpl $0x1, %eax
jne 0x13db7a
leaq 0x850(%rsp), %rdi
movq 0x38e0(%rsp), %rcx
addq $0x96a, %rcx            # imm = 0x96A
leaq 0x948ad(%rip), %rsi     # 0x1d23d8
leaq 0xc5e0b(%rip), %rdx     # 0x20393d
movb $0x0, %al
callq 0x5b9c0
movq 0x38e0(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
leaq 0x850(%rsp), %r8
leaq 0x944dd(%rip), %rsi     # 0x1d2034
leaq 0xc5c09(%rip), %rdx     # 0x203767
movl $0x82a, %ecx            # imm = 0x82A
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3904(%rsp)
jmp 0x13e069
jmp 0x13db7c
movq 0x3950(%rsp), %rdi
movq 0x38f8(%rsp), %rsi
movq 0x38e8(%rsp), %rdx
movq 0x38e0(%rsp), %rcx
movl 0x38d4(%rsp), %r8d
movl 0x38c4(%rsp), %r9d
movl 0x38c0(%rsp), %ebx
movl 0x38bc(%rsp), %r11d
movl 0x38b8(%rsp), %r10d
movsd 0x3878(%rsp), %xmm0
movsd 0x3888(%rsp), %xmm1
movl 0x3870(%rsp), %eax
movl %ebx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movl %eax, 0x18(%rsp)
movswl 0x3958(%rsp), %eax
movl %eax, 0x20(%rsp)
callq 0x140e10
cmpl $0x1, %eax
jne 0x13dc6a
leaq 0x50(%rsp), %rdi
movq 0x38e0(%rsp), %rcx
addq $0x96a, %rcx            # imm = 0x96A
leaq 0x947ba(%rip), %rsi     # 0x1d23d8
leaq 0xc5d81(%rip), %rdx     # 0x2039a6
movb $0x0, %al
callq 0x5b9c0
movq 0x38e0(%rsp), %rdi
addq $0x96a, %rdi            # imm = 0x96A
leaq 0x50(%rsp), %r8
leaq 0x943ed(%rip), %rsi     # 0x1d2034
leaq 0xc5b19(%rip), %rdx     # 0x203767
movl $0x843, %ecx            # imm = 0x843
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x3904(%rsp)
jmp 0x13e069
jmp 0x13dc6c
jmp 0x13dc6e
movl 0x38b8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38b8(%rsp)
jmp 0x13d6cb
jmp 0x13de03
movl $0x0, 0x38b8(%rsp)
movl 0x38b8(%rsp), %eax
movq 0x38e0(%rsp), %rcx
movq 0x900(%rcx), %rcx
movslq 0x38c4(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x13de01
movswl 0x3958(%rsp), %eax
cmpl $0x0, %eax
jne 0x13dd5d
movq 0x38e0(%rsp), %rax
movq 0x958(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x38c0(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x8f0(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38bc(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x900(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38b8(%rsp), %ecx
movslq %ecx, %rcx
movq 0x38e0(%rsp), %rdx
imulq 0x920(%rdx), %rcx
movslq 0x38d4(%rsp), %rdx
addq %rdx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x13dde9
movq 0x38e0(%rsp), %rax
movq 0x960(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x38c0(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x8f0(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38bc(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x900(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38b8(%rsp), %ecx
movslq %ecx, %rcx
movq 0x38e0(%rsp), %rdx
imulq 0x940(%rdx), %rcx
movslq 0x38d4(%rsp), %rdx
addq %rdx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x13ddeb
movl 0x38b8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38b8(%rsp)
jmp 0x13dc94
jmp 0x13de03
jmp 0x13de05
movl 0x38bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38bc(%rsp)
jmp 0x13d24f
jmp 0x13de1d
movl 0x38c0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38c0(%rsp)
jmp 0x13d212
jmp 0x13e046
movl $0x0, 0x38c0(%rsp)
movl 0x38c0(%rsp), %eax
movq 0x38e8(%rsp), %rcx
movq 0x870(%rcx), %rcx
movslq 0x38c4(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x13e044
movl $0x0, 0x38bc(%rsp)
movl 0x38bc(%rsp), %eax
movq 0x38e0(%rsp), %rcx
movq 0x8f0(%rcx), %rcx
movslq 0x38c4(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x13e02c
movl $0x0, 0x38b8(%rsp)
movl 0x38b8(%rsp), %eax
movq 0x38e0(%rsp), %rcx
movq 0x900(%rcx), %rcx
movslq 0x38c4(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0x13e014
movswl 0x3958(%rsp), %eax
cmpl $0x0, %eax
jne 0x13df70
movq 0x38e0(%rsp), %rax
movq 0x958(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x38c0(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x8f0(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38bc(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x900(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38b8(%rsp), %ecx
movslq %ecx, %rcx
movq 0x38e0(%rsp), %rdx
imulq 0x920(%rdx), %rcx
movslq 0x38d4(%rsp), %rdx
addq %rdx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x13dffc
movq 0x38e0(%rsp), %rax
movq 0x960(%rax), %rax
movslq 0x38c4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movl 0x38c0(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x8f0(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38bc(%rsp), %ecx
movq 0x38e0(%rsp), %rdx
movq 0x900(%rdx), %rdx
movslq 0x38c4(%rsp), %rsi
imull (%rdx,%rsi,4), %ecx
addl 0x38b8(%rsp), %ecx
movslq %ecx, %rcx
movq 0x38e0(%rsp), %rdx
imulq 0x940(%rdx), %rcx
movslq 0x38d4(%rsp), %rdx
addq %rdx, %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
jmp 0x13dffe
movl 0x38b8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38b8(%rsp)
jmp 0x13dea7
jmp 0x13e016
movl 0x38bc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38bc(%rsp)
jmp 0x13de75
jmp 0x13e02e
movl 0x38c0(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38c0(%rsp)
jmp 0x13de43
jmp 0x13e046
jmp 0x13e048
movl 0x38c4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x38c4(%rsp)
jmp 0x13d07c
movl $0x0, 0x3904(%rsp)
movl 0x3904(%rsp), %eax
addq $0x3908, %rsp           # imm = 0x3908
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop