// File: /workspace/github_c_makefile_star2_O3/PoulinV[P]AxiCLASS/build/../source/perturbations.c
// Function: perturbations_find_approximation_switches
int perturbations_find_approximation_switches(
                                              struct precision * ppr,
                                              struct background * pba,
                                              struct thermodynamics * pth,
                                              struct perturbations * ppt,
                                              int index_md,
                                              double k,
                                              struct perturbations_workspace * ppw,
                                              double tau_ini,
                                              double tau_end,
                                              double precision,
                                              int interval_number,
                                              int * interval_number_of,
                                              double * interval_limit, /* interval_limit[index_interval] (already allocated) */
                                              int ** interval_approx   /* interval_approx[index_interval][index_ap] (already allocated) */
                                              ){

  /** Summary: */

  int index_ap;
  int index_switch;
  int index_switch_tot;
  int num_switch;
  double tau_min,lower_bound,upper_bound;
  double mid=0;
  double * unsorted_tau_switch;
  double next_tau_switch;
  int flag_ini;
  int num_switching_at_given_time;

  /** - write in output arrays the initial time and approximation */

  interval_limit[0]=tau_ini;

  class_call(perturbations_approximations(ppr,
                                          pba,
                                          pth,
                                          ppt,
                                          index_md,
                                          k,
                                          tau_ini,
                                          ppw),
             ppt->error_message,
             ppt->error_message);

  for (index_ap=0; index_ap<ppw->ap_size; index_ap++)
    interval_approx[0][index_ap]=ppw->approx[index_ap];

  /** - if there are no approximation switches, just write final time and return */

  if (interval_number == 1) {

    interval_limit[1]=tau_end;

  }

  /** - if there are switches, consider approximations one after each
      other.  Find switching time by bisection. Store all switches in
      arbitrary order in array unsorted_tau_switch[ ] */

  else {

    class_alloc(unsorted_tau_switch,(interval_number-1)*sizeof(double),ppt->error_message);

    index_switch_tot=0;

    for (index_ap=0; index_ap<ppw->ap_size; index_ap++) {

      if (interval_number_of[index_ap] > 1) {

        num_switch = interval_number_of[index_ap]-1;

        tau_min = tau_ini;

        flag_ini = interval_approx[0][index_ap];

        for (index_switch=0; index_switch<num_switch; index_switch++) {

          lower_bound=tau_min;
          upper_bound=tau_end;
          mid = 0.5*(lower_bound+upper_bound);

          while (upper_bound - lower_bound > precision) {

            class_call(perturbations_approximations(ppr,
                                                    pba,
                                                    pth,
                                                    ppt,
                                                    index_md,
                                                    k,
                                                    mid,
                                                    ppw),
                       ppt->error_message,
                       ppt->error_message);

            if (ppw->approx[index_ap] > flag_ini+index_switch) {
              upper_bound=mid;
            }
            else {
              lower_bound=mid;
            }

            mid = 0.5*(lower_bound+upper_bound);

          }

          unsorted_tau_switch[index_switch_tot]=mid;
          index_switch_tot++;

          tau_min=mid;

        }
      }
    }

    class_test(index_switch_tot != (interval_number-1),
               ppt->error_message,
               "bug in approximation switch search routine: should have %d = %d",
               index_switch_tot,interval_number-1);

    /** - now sort interval limits in correct order */

    index_switch_tot=1;

    while (index_switch_tot < interval_number) {

      next_tau_switch=tau_end;
      for (index_switch=0; index_switch<interval_number-1; index_switch++) {
        if ((unsorted_tau_switch[index_switch] > interval_limit[index_switch_tot-1]) &&
            (unsorted_tau_switch[index_switch] < next_tau_switch)) {
          next_tau_switch=unsorted_tau_switch[index_switch];
        }
      }
      interval_limit[index_switch_tot]=next_tau_switch;
      index_switch_tot++;
    }

    interval_limit[index_switch_tot]=tau_end;

    class_test(index_switch_tot != interval_number,
               ppt->error_message,
               "most probably two approximation switching time were found to be equal, which cannot be handled\n");

    /** - store each approximation in chronological order */

    for (index_switch=1; index_switch<interval_number; index_switch++) {

      class_call(perturbations_approximations(ppr,
                                              pba,
                                              pth,
                                              ppt,
                                              index_md,
                                              k,
                                              0.5*(interval_limit[index_switch]+interval_limit[index_switch+1]),
                                              ppw),

                 ppt->error_message,
                 ppt->error_message);

      for (index_ap=0; index_ap<ppw->ap_size; index_ap++) {
        interval_approx[index_switch][index_ap]=ppw->approx[index_ap];

        /* check here that approximation does not go backward (remember
           that by definition the value of an approximation can only
           increase) */
        class_test(interval_approx[index_switch][index_ap] < interval_approx[index_switch-1][index_ap],
                   ppt->error_message,
                   "The approximation with label %d is not defined correctly: it goes backward (from %d to %d) for k=%e and between tau=%e and %e; this cannot be handled\n",
                   index_ap,
                   interval_approx[index_switch-1][index_ap],
                   interval_approx[index_switch][index_ap],
                   k,
                   0.5*(interval_limit[index_switch-1]+interval_limit[index_switch]),
                   0.5*(interval_limit[index_switch]+interval_limit[index_switch+1])
                   );
      }

      /* check here that more than one approximation is not switched on at a given time */
      num_switching_at_given_time=0;
      for (index_ap=0; index_ap<ppw->ap_size; index_ap++) {
        if (interval_approx[index_switch][index_ap] != interval_approx[index_switch-1][index_ap])
          num_switching_at_given_time++;
      }
      class_test(num_switching_at_given_time != 1,
                 ppt->error_message,
                 "for k=%e, at tau=%g, you switch %d approximations at the same time, this cannot be handled. Usually happens in two cases: triggers for different approximations coincide, or one approx is reversible\n",
                 k,
                 interval_limit[index_switch],
                 num_switching_at_given_time);

      if (ppt->perturbations_verbose>2) {

        if (_scalars_) {

          if ((interval_approx[index_switch-1][ppw->index_ap_tca]==(int)tca_on) &&
              (interval_approx[index_switch][ppw->index_ap_tca]==(int)tca_off))
            fprintf(stdout,"Mode k=%e: will switch off tight-coupling approximation at tau=%e\n",k,interval_limit[index_switch]);
          //fprintf(stderr,"Mode k=%e: will switch off tight-coupling approximation at tau=%e\n",k,interval_limit[index_switch]);  //TBC

          if ((interval_approx[index_switch-1][ppw->index_ap_rsa]==(int)rsa_off) &&
              (interval_approx[index_switch][ppw->index_ap_rsa]==(int)rsa_on))
            fprintf(stdout,"Mode k=%e: will switch on radiation streaming approximation at tau=%e\n",k,interval_limit[index_switch]);

          if (pba->has_idr == _TRUE_){
            if ((interval_approx[index_switch-1][ppw->index_ap_rsa_idr]==(int)rsa_idr_off) &&
                (interval_approx[index_switch][ppw->index_ap_rsa_idr]==(int)rsa_idr_on))
              fprintf(stdout,"Mode k=%e: will switch on dark radiation streaming approximation at tau=%e\n",k,interval_limit[index_switch]);
          }

          if (pth->has_idm_dr == _TRUE_){
            if ((interval_approx[index_switch-1][ppw->index_ap_tca_idm_dr]==(int)tca_idm_dr_on) &&
                (interval_approx[index_switch][ppw->index_ap_tca_idm_dr]==(int)tca_idm_dr_off))
              fprintf(stdout,"Mode k=%e: will switch off dark tight-coupling approximation at tau=%e\n",k,interval_limit[index_switch]);
          }

          if (pba->has_ur == _TRUE_) {
            if ((interval_approx[index_switch-1][ppw->index_ap_ufa]==(int)ufa_off) &&
                (interval_approx[index_switch][ppw->index_ap_ufa]==(int)ufa_on)) {
              fprintf(stdout,"Mode k=%e: will switch on ur fluid approximation at tau=%e\n",k,interval_limit[index_switch]);
            }
          }
          if (pba->has_ncdm == _TRUE_) {
            if ((interval_approx[index_switch-1][ppw->index_ap_ncdmfa]==(int)ncdmfa_off) &&
                (interval_approx[index_switch][ppw->index_ap_ncdmfa]==(int)ncdmfa_on)) {
              fprintf(stdout,"Mode k=%e: will switch on ncdm fluid approximation at tau=%e\n",k,interval_limit[index_switch]);
            }
          }
        }

        if (_tensors_) {

          if ((interval_approx[index_switch-1][ppw->index_ap_tca]==(int)tca_on) &&
              (interval_approx[index_switch][ppw->index_ap_tca]==(int)tca_off))
            fprintf(stdout,"Mode k=%e: will switch off tight-coupling approximation for tensors at tau=%e\n",k,interval_limit[index_switch]);

          if ((interval_approx[index_switch-1][ppw->index_ap_rsa]==(int)rsa_off) &&
              (interval_approx[index_switch][ppw->index_ap_rsa]==(int)rsa_on))
            fprintf(stdout,"Mode k=%e: will switch on radiation streaming approximation for tensors at tau=%e\n",k,interval_limit[index_switch]);

        }
      }
    }

    free(unsorted_tau_switch);

    class_call(perturbations_approximations(ppr,
                                            pba,
                                            pth,
                                            ppt,
                                            index_md,
                                            k,
                                            tau_end,
                                            ppw),

               ppt->error_message,
               ppt->error_message);
  }

  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1088, %rsp           # imm = 0x1088
movsd %xmm3, 0x50(%rsp)
movsd %xmm2, 0x38(%rsp)
movq %r9, %r14
movl %r8d, %r12d
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %rbx
movq 0x10d0(%rsp), %rax
movsd %xmm1, (%rax)
movsd %xmm0, 0x20(%rsp)
movsd %xmm1, 0x60(%rsp)
callq 0x8ab21
testl %eax, %eax
je 0x7b46e
addq $0x6c8a, %r15           # imm = 0x6C8A
leaq 0x72fd5(%rip), %rsi     # 0xee3f0
leaq 0x9a9f0(%rip), %rdx     # 0x115e12
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x72bf6(%rip), %rsi     # 0xee034
leaq 0x9ab80(%rip), %rdx     # 0x115fc5
movq %r15, %rdi
movl $0xe54, %ecx            # imm = 0xE54
movq %r14, %r8
xorl %eax, %eax
callq 0x30af0
movl $0x1, %eax
addq $0x1088, %rsp           # imm = 0x1088
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq %r13, 0x28(%rsp)
movq 0x10d8(%rsp), %rbx
movl 0x10c0(%rsp), %edi
movl 0x178(%r14), %r13d
testl %r13d, %r13d
movsd 0x38(%rsp), %xmm0
movq 0x10d0(%rsp), %r8
jle 0x7b4c7
movq 0x180(%r14), %rax
movq (%rbx), %rcx
xorl %edx, %edx
movl (%rax,%rdx,4), %esi
movl %esi, (%rcx,%rdx,4)
incq %rdx
movslq 0x178(%r14), %r13
cmpq %r13, %rdx
jl 0x7b4b2
cmpl $0x1, %edi
jne 0x7b4d6
movsd %xmm0, 0x8(%r8)
xorl %eax, %eax
jmp 0x7b45c
movq %rbp, 0x40(%rsp)
movslq %edi, %rax
leaq -0x8(,%rax,8), %r15
movq %r15, %rdi
callq 0x8460
testq %rax, %rax
je 0x7b6d4
movq %rax, %rbp
movl %r12d, 0x34(%rsp)
testl %r13d, %r13d
jle 0x7b71b
movq 0x10c8(%rsp), %rcx
xorl %r12d, %r12d
xorl %edx, %edx
movsd 0x38(%rsp), %xmm3
movq 0x18(%rsp), %rdi
movsd 0x50(%rsp), %xmm2
movsd 0x60(%rsp), %xmm0
movq 0x10(%rsp), %r15
movl (%rcx,%r12,4), %eax
cmpl $0x2, %eax
jl 0x7b67b
movl %eax, %ecx
movq (%rbx), %rax
movl (%rax,%r12,4), %eax
movq %rax, 0x68(%rsp)
movslq %edx, %rdx
movq %rdx, 0x48(%rsp)
addl $-0x2, %ecx
movl %ecx, 0x5c(%rsp)
xorl %r13d, %r13d
movapd %xmm0, %xmm4
movapd %xmm0, %xmm1
addsd %xmm3, %xmm1
mulsd 0x7375e(%rip), %xmm1    # 0xeecd0
movapd %xmm3, %xmm0
subsd %xmm4, %xmm0
ucomisd %xmm2, %xmm0
jbe 0x7b62a
movq 0x68(%rsp), %rax
leal (%rax,%r13), %ebx
movsd %xmm3, 0x70(%rsp)
movsd %xmm4, 0x78(%rsp)
movq 0x28(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq %r15, %rcx
movl 0x34(%rsp), %r8d
movsd 0x20(%rsp), %xmm0
movsd %xmm1, 0x8(%rsp)
movq %r14, %r9
callq 0x8ab21
testl %eax, %eax
jne 0x7b68f
movq 0x180(%r14), %rax
cmpl %ebx, (%rax,%r12,4)
jg 0x7b5f1
movsd 0x8(%rsp), %xmm1
movapd %xmm1, %xmm4
movq 0x18(%rsp), %rdi
movsd 0x50(%rsp), %xmm2
movsd 0x70(%rsp), %xmm3
jmp 0x7b60c
movsd 0x8(%rsp), %xmm3
movsd 0x78(%rsp), %xmm4
movapd %xmm4, %xmm1
movq 0x18(%rsp), %rdi
movsd 0x50(%rsp), %xmm2
addsd %xmm3, %xmm1
mulsd 0x736b8(%rip), %xmm1    # 0xeecd0
movapd %xmm3, %xmm0
subsd %xmm4, %xmm0
ucomisd %xmm2, %xmm0
ja 0x7b58d
movq 0x48(%rsp), %rax
movsd %xmm1, (%rbp,%rax,8)
incq %rax
movq %rax, 0x48(%rsp)
leal 0x1(%r13), %eax
movapd %xmm1, %xmm4
cmpl 0x5c(%rsp), %r13d
movl %eax, %r13d
movsd 0x38(%rsp), %xmm3
jne 0x7b566
movl 0x178(%r14), %r13d
movq 0x10d8(%rsp), %rbx
movsd 0x60(%rsp), %xmm0
movq 0x48(%rsp), %rdx
movq 0x10c8(%rsp), %rcx
incq %r12
movslq %r13d, %rax
cmpq %rax, %r12
jl 0x7b531
jmp 0x7b728
addq $0x6c8a, %r15           # imm = 0x6C8A
leaq 0x72d53(%rip), %rsi     # 0xee3f0
leaq 0x9a95f(%rip), %rdx     # 0x116003
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x72974(%rip), %rsi     # 0xee034
leaq 0x9a8fe(%rip), %rdx     # 0x115fc5
movq %r15, %rdi
movl $0xe86, %ecx            # imm = 0xE86
jmp 0x7b44d
leaq 0x72929(%rip), %rsi     # 0xee004
leaq 0x9a90d(%rip), %rdx     # 0x115fef
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl %r15d, %ecx
xorl %eax, %eax
callq 0x30af0
movq 0x10(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x7292a(%rip), %rsi     # 0xee034
leaq 0x9a8b4(%rip), %rdx     # 0x115fc5
movl $0xe67, %ecx            # imm = 0xE67
jmp 0x7b44d
xorl %edx, %edx
movsd 0x38(%rsp), %xmm3
movq 0x18(%rsp), %rdi
movl 0x10c0(%rsp), %eax
leal -0x1(%rax), %ecx
cmpl %ecx, %edx
jne 0x7bcd0
cmpl $0x2, %eax
jl 0x7bd30
movl %eax, %r15d
movl %ecx, %eax
movl $0x1, %ecx
movq 0x10d0(%rsp), %r12
movq 0x28(%rsp), %rsi
movsd -0x8(%r12,%rcx,8), %xmm0
xorl %edx, %edx
movsd 0x38(%rsp), %xmm2
movsd (%rbp,%rdx,8), %xmm1
movapd %xmm1, %xmm3
cmpltpd %xmm2, %xmm3
movapd %xmm0, %xmm4
cmpltpd %xmm1, %xmm4
andpd %xmm3, %xmm4
movd %xmm4, %r8d
testb $0x1, %r8b
jne 0x7b794
movapd %xmm2, %xmm1
incq %rdx
movapd %xmm1, %xmm2
cmpq %rdx, %rax
jne 0x7b769
movsd %xmm1, (%r12,%rcx,8)
incq %rcx
cmpq %r15, %rcx
jne 0x7b75a
movsd 0x38(%rsp), %xmm0
movsd %xmm0, (%r12,%r15,8)
movl 0x10c0(%rsp), %eax
cmpl $0x2, %eax
jl 0x7bc49
movl $0x1, %r10d
movsd 0x734f8(%rip), %xmm0    # 0xeecd0
movsd (%r12,%r10,8), %xmm1
movq %r10, %r13
addsd 0x8(%r12,%r10,8), %xmm1
mulsd %xmm0, %xmm1
movq 0x40(%rsp), %rdx
movq 0x10(%rsp), %rcx
movl 0x34(%rsp), %r8d
movsd 0x20(%rsp), %xmm0
movq %r14, %r9
callq 0x8ab21
testl %eax, %eax
jne 0x7be29
xorl %edx, %edx
cmpl $0x0, 0x178(%r14)
jle 0x7be73
movq %r13, %r11
leaq 0x1(%r13), %r10
movq 0x180(%r14), %rsi
movq -0x8(%rbx,%r13,8), %rdi
movq (%rbx,%r13,8), %r9
xorl %eax, %eax
movsd 0x20(%rsp), %xmm0
movl (%rsi,%rax,4), %r8d
movl %r8d, (%r9,%rax,4)
movl (%rdi,%rax,4), %ecx
cmpl %ecx, %r8d
jl 0x7bd9d
incq %rax
movslq 0x178(%r14), %rcx
cmpq %rcx, %rax
jl 0x7b840
testl %ecx, %ecx
jle 0x7be7c
movq -0x8(%rbx,%r11,8), %rax
movq (%rbx,%r11,8), %rsi
xorl %edi, %edi
xorl %edx, %edx
movl (%rsi,%rdi,4), %r8d
xorl %r9d, %r9d
cmpl (%rax,%rdi,4), %r8d
setne %r9b
addl %r9d, %edx
incq %rdi
cmpq %rdi, %rcx
jne 0x7b878
cmpl $0x1, %edx
jne 0x7be7c
movq 0x10(%rsp), %rax
cmpw $0x3, 0x6c88(%rax)
movq 0x18(%rsp), %rdi
movsd 0x7341b(%rip), %xmm0    # 0xeecd0
movq 0x28(%rsp), %rsi
jl 0x7bc40
movq 0x10(%rsp), %rbx
cmpw $0x1, 0xe(%rbx)
jne 0x7bb5d
movl 0x34(%rsp), %eax
cmpl %eax, 0x848(%rbx)
jne 0x7bb5d
movq 0x10d8(%rsp), %rbx
movq -0x8(%rbx,%r11,8), %rax
movslq 0x160(%r14), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x7b94c
movq (%rbx,%r11,8), %rdx
cmpl $0x1, (%rdx,%rcx,4)
jne 0x7b94c
movq 0xcd655(%rip), %rax     # 0x148f60
movq (%rax), %rdi
movsd (%r12,%r11,8), %xmm1
leaq 0x9aa75(%rip), %rsi     # 0x116390
movsd 0x20(%rsp), %xmm0
movb $0x2, %al
movq %r10, 0x8(%rsp)
callq 0x84e0
movq 0x28(%rsp), %rsi
movq %r13, %r11
movq 0x8(%rsp), %r10
movsd 0x7338e(%rip), %xmm0    # 0xeecd0
movq 0x18(%rsp), %rdi
movq -0x8(%rbx,%r13,8), %rax
movslq 0x164(%r14), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x7b9a6
movq (%rbx,%r11,8), %rax
cmpl $0x1, (%rax,%rcx,4)
jne 0x7b9a6
movq 0xcd5f6(%rip), %rax     # 0x148f60
movq (%rax), %rdi
movsd (%r12,%r11,8), %xmm1
leaq 0x9aa59(%rip), %rsi     # 0x1163d3
movsd 0x20(%rsp), %xmm0
movb $0x2, %al
movq %r10, 0x8(%rsp)
callq 0x84e0
movq 0x28(%rsp), %rsi
movq %r13, %r11
movq 0x8(%rsp), %r10
movsd 0x7332f(%rip), %xmm0    # 0xeecd0
movq 0x18(%rsp), %rdi
cmpw $0x1, 0x4c6(%rsi)
jne 0x7ba0f
movq -0x8(%rbx,%r11,8), %rcx
movslq 0x16c(%r14), %rax
cmpl $0x0, (%rcx,%rax,4)
jne 0x7ba0f
movq (%rbx,%r11,8), %rcx
cmpl $0x1, (%rcx,%rax,4)
jne 0x7ba0f
movq 0xcd58d(%rip), %rax     # 0x148f60
movq (%rax), %rdi
movsd (%r12,%r11,8), %xmm1
leaq 0x9aa37(%rip), %rsi     # 0x11641a
movsd 0x20(%rsp), %xmm0
movb $0x2, %al
movq %r10, 0x8(%rsp)
callq 0x84e0
movq 0x28(%rsp), %rsi
movq %r13, %r11
movq 0x8(%rsp), %r10
movsd 0x732c6(%rip), %xmm0    # 0xeecd0
movq 0x18(%rsp), %rdi
movq 0x40(%rsp), %rax
cmpw $0x1, 0x38(%rax)
jne 0x7ba7a
movq -0x8(%rbx,%r11,8), %rcx
movslq 0x168(%r14), %rax
cmpl $0x0, (%rcx,%rax,4)
jne 0x7ba7a
movq (%rbx,%r11,8), %rcx
cmpl $0x1, (%rcx,%rax,4)
jne 0x7ba7a
movq 0xcd522(%rip), %rax     # 0x148f60
movq (%rax), %rdi
movsd (%r12,%r11,8), %xmm1
leaq 0x9aa18(%rip), %rsi     # 0x116466
movsd 0x20(%rsp), %xmm0
movb $0x2, %al
movq %r10, 0x8(%rsp)
callq 0x84e0
movq 0x28(%rsp), %rsi
movq %r13, %r11
movq 0x8(%rsp), %r10
movsd 0x7325b(%rip), %xmm0    # 0xeecd0
movq 0x18(%rsp), %rdi
cmpw $0x1, 0x4c4(%rsi)
jne 0x7badf
movq -0x8(%rbx,%r11,8), %rcx
movslq 0x170(%r14), %rax
cmpl $0x0, (%rcx,%rax,4)
jne 0x7badf
movq (%rbx,%r11,8), %rcx
cmpl $0x1, (%rcx,%rax,4)
jne 0x7badf
movq 0xcd4b9(%rip), %rax     # 0x148f60
movq (%rax), %rdi
movsd (%r12,%r11,8), %xmm1
leaq 0x9a9f7(%rip), %rsi     # 0x1164ae
movsd 0x20(%rsp), %xmm0
movb $0x2, %al
movq %r10, %rbx
callq 0x84e0
movq 0x28(%rsp), %rsi
movq %r13, %r11
movq %rbx, %r10
movsd 0x731f6(%rip), %xmm0    # 0xeecd0
movq 0x18(%rsp), %rdi
cmpw $0x1, 0x4be(%rsi)
movq 0x10(%rsp), %rbx
jne 0x7bb5d
movq 0x10d8(%rsp), %rax
movq -0x8(%rax,%r11,8), %rcx
movslq 0x174(%r14), %rax
cmpl $0x0, (%rcx,%rax,4)
jne 0x7bb5d
movq 0x10d8(%rsp), %rcx
movq (%rcx,%r11,8), %rcx
cmpl $0x1, (%rcx,%rax,4)
jne 0x7bb5d
movq 0xcd43f(%rip), %rax     # 0x148f60
movq (%rax), %rdi
movsd (%r12,%r11,8), %xmm1
leaq 0x9a9b9(%rip), %rsi     # 0x1164ea
movsd 0x20(%rsp), %xmm0
movb $0x2, %al
movq %r10, 0x8(%rsp)
callq 0x84e0
movq 0x28(%rsp), %rsi
movq %r13, %r11
movq 0x8(%rsp), %r10
movsd 0x73178(%rip), %xmm0    # 0xeecd0
movq 0x18(%rsp), %rdi
cmpw $0x1, 0x12(%rbx)
movq 0x10d8(%rsp), %rbx
jne 0x7bc40
movl 0x34(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl %eax, 0x84c(%rcx)
jne 0x7bc40
movq -0x8(%rbx,%r11,8), %rax
movslq 0x160(%r14), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x7bbe9
movq (%rbx,%r11,8), %rdx
cmpl $0x1, (%rdx,%rcx,4)
jne 0x7bbe9
movq 0xcd3b8(%rip), %rax     # 0x148f60
movq (%rax), %rdi
movsd (%r12,%r11,8), %xmm1
leaq 0x9a970(%rip), %rsi     # 0x116528
movsd 0x20(%rsp), %xmm0
movb $0x2, %al
movq %r10, 0x8(%rsp)
callq 0x84e0
movq 0x28(%rsp), %rsi
movq %r13, %r11
movq 0x8(%rsp), %r10
movsd 0x730f1(%rip), %xmm0    # 0xeecd0
movq 0x18(%rsp), %rdi
movq -0x8(%rbx,%r13,8), %rax
movslq 0x164(%r14), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x7bc40
movq (%rbx,%r11,8), %rax
cmpl $0x1, (%rax,%rcx,4)
jne 0x7bc40
movq 0xcd359(%rip), %rax     # 0x148f60
movq (%rax), %rdi
movsd (%r12,%r11,8), %xmm1
leaq 0x9a960(%rip), %rsi     # 0x116577
movsd 0x20(%rsp), %xmm0
movb $0x2, %al
movq %r10, 0x8(%rsp)
callq 0x84e0
movq 0x28(%rsp), %rsi
movq 0x8(%rsp), %r10
movsd 0x73095(%rip), %xmm0    # 0xeecd0
movq 0x18(%rsp), %rdi
cmpq %r15, %r10
jne 0x7b7d8
movq %rdi, %rbx
movq %rbp, %rdi
movq %rsi, %r15
callq 0x8410
movq %rbx, %rdi
movq %r15, %rsi
movq 0x40(%rsp), %rdx
movq 0x10(%rsp), %rbx
movq %rbx, %rcx
movl 0x34(%rsp), %r8d
movsd 0x20(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movq %r14, %r9
callq 0x8ab21
testl %eax, %eax
je 0x7b4d2
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x72757(%rip), %rsi     # 0xee3f0
leaq 0x9a1e6(%rip), %rdx     # 0x115e86
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x72378(%rip), %rsi     # 0xee034
leaq 0x9a302(%rip), %rdx     # 0x115fc5
movq %rbx, %rdi
movl $0xf28, %ecx            # imm = 0xF28
jmp 0x7b44d
leaq 0x9a374(%rip), %rsi     # 0x11604b
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x72392(%rip), %rsi     # 0xee082
leaq 0x9a394(%rip), %rdx     # 0x11608b
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
movq 0x10(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x72315(%rip), %rsi     # 0xee034
leaq 0x9a29f(%rip), %rdx     # 0x115fc5
movl $0xe9f, %ecx            # imm = 0xE9F
jmp 0x7be21
movq 0x10d0(%rsp), %rax
movsd %xmm3, 0x8(%rax)
leaq 0x9a36f(%rip), %rsi     # 0x1160b3
leaq 0x80(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x30af0
leaq 0x72325(%rip), %rsi     # 0xee082
leaq 0x9a3af(%rip), %rdx     # 0x116113
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
movq 0x10(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x722a8(%rip), %rsi     # 0xee034
leaq 0x9a232(%rip), %rdx     # 0x115fc5
movl $0xeb6, %ecx            # imm = 0xEB6
jmp 0x7be21
movsd (%r12,%r11,8), %xmm2
movsd -0x8(%r12,%r11,8), %xmm1
addsd %xmm2, %xmm1
movsd 0x72f1a(%rip), %xmm3    # 0xeecd0
mulsd %xmm3, %xmm1
addsd (%r12,%r10,8), %xmm2
mulsd %xmm3, %xmm2
leaq 0x9a3f2(%rip), %rsi     # 0x1161bd
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movl %eax, %edx
movb $0x3, %al
callq 0x30af0
leaq 0x7229c(%rip), %rsi     # 0xee082
leaq 0x9a467(%rip), %rdx     # 0x116254
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
movq 0x10(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x7221f(%rip), %rsi     # 0xee034
leaq 0x9a1a9(%rip), %rdx     # 0x115fc5
movl $0xed7, %ecx            # imm = 0xED7
movq %r15, %r8
jmp 0x7b450
movq 0x10(%rsp), %rbx
addq $0x6c8a, %rbx           # imm = 0x6C8A
leaq 0x725b4(%rip), %rsi     # 0xee3f0
leaq 0x9a2f4(%rip), %rdx     # 0x116137
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x30af0
leaq 0x721d5(%rip), %rsi     # 0xee034
leaq 0x9a15f(%rip), %rdx     # 0x115fc5
movq %rbx, %rdi
movl $0xec6, %ecx            # imm = 0xEC6
jmp 0x7b44d
movsd 0x20(%rsp), %xmm0
movq %r13, %r11
movsd (%r12,%r11,8), %xmm1
leaq 0x9a41f(%rip), %rsi     # 0x1162a8
leaq 0x80(%rsp), %r14
movq %r14, %rdi
movb $0x2, %al
callq 0x30af0
leaq 0x721e0(%rip), %rsi     # 0xee082
leaq 0x9a4c6(%rip), %rdx     # 0x11636f
leaq 0x880(%rsp), %r15
movq %r15, %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x30af0
movq 0x10(%rsp), %rdi
addq $0x6c8a, %rdi           # imm = 0x6C8A
leaq 0x72163(%rip), %rsi     # 0xee034
leaq 0x9a0ed(%rip), %rdx     # 0x115fc5
movl $0xee5, %ecx            # imm = 0xEE5
jmp 0x7be21