// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/mpn/div_q.c
// Function: _gmpn_div_q
void
mpn_div_q (mp_ptr qp,
	   mp_srcptr np, mp_size_t nn,
	   mp_srcptr dp, mp_size_t dn, mp_ptr scratch)
{
  mp_ptr new_dp, new_np, tp, rp;
  mp_limb_t cy, dh, qh;
  mp_size_t new_nn, qn;
  gmp_pi1_t dinv;
  int cnt;
  TMP_DECL;
  TMP_MARK;

  ASSERT (nn >= dn);
  ASSERT (dn > 0);
  ASSERT (dp[dn - 1] != 0);
  ASSERT (! MPN_OVERLAP_P (qp, nn - dn + 1, np, nn));
  ASSERT (! MPN_OVERLAP_P (qp, nn - dn + 1, dp, dn));
  ASSERT (MPN_SAME_OR_SEPARATE_P (np, scratch, nn));

  ASSERT_ALWAYS (FUDGE >= 2);

  if (dn == 1)
    {
      mpn_divrem_1 (qp, 0L, np, nn, dp[dn - 1]);
      return;
    }

  qn = nn - dn + 1;		/* Quotient size, high limb might be zero */

  if (qn + FUDGE >= dn)
    {
      /* |________________________|
                          |_______|  */
      new_np = scratch;

      dh = dp[dn - 1];
      if (LIKELY ((dh & GMP_NUMB_HIGHBIT) == 0))
	{
	  count_leading_zeros (cnt, dh);

	  cy = mpn_lshift (new_np, np, nn, cnt);
	  new_np[nn] = cy;
	  new_nn = nn + (cy != 0);

	  new_dp = TMP_ALLOC_LIMBS (dn);
	  mpn_lshift (new_dp, dp, dn, cnt);

	  if (dn == 2)
	    {
	      qh = mpn_divrem_2 (qp, 0L, new_np, new_nn, new_dp);
	    }
	  else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) ||
		   BELOW_THRESHOLD (new_nn - dn, DC_DIV_Q_THRESHOLD))
	    {
	      invert_pi1 (dinv, new_dp[dn - 1], new_dp[dn - 2]);
	      qh = mpn_sbpi1_div_q (qp, new_np, new_nn, new_dp, dn, dinv.inv32);
	    }
	  else if (BELOW_THRESHOLD (dn, MUPI_DIV_Q_THRESHOLD) ||   /* fast condition */
		   BELOW_THRESHOLD (nn, 2 * MU_DIV_Q_THRESHOLD) || /* fast condition */
		   (double) (2 * (MU_DIV_Q_THRESHOLD - MUPI_DIV_Q_THRESHOLD)) * dn /* slow... */
		   + (double) MUPI_DIV_Q_THRESHOLD * nn > (double) dn * nn)   /* ...condition */
	    {
	      invert_pi1 (dinv, new_dp[dn - 1], new_dp[dn - 2]);
	      qh = mpn_dcpi1_div_q (qp, new_np, new_nn, new_dp, dn, &dinv);
	    }
	  else
	    {
	      mp_size_t itch = mpn_mu_div_q_itch (new_nn, dn, 0);
	      mp_ptr scratch = TMP_ALLOC_LIMBS (itch);
	      qh = mpn_mu_div_q (qp, new_np, new_nn, new_dp, dn, scratch);
	    }
	  if (cy == 0)
	    qp[qn - 1] = qh;
	  else if (UNLIKELY (qh != 0))
	    {
	      /* This happens only when the quotient is close to B^n and
		 mpn_*_divappr_q returned B^n.  */
	      mp_size_t i, n;
	      n = new_nn - dn;
	      for (i = 0; i < n; i++)
		qp[i] = GMP_NUMB_MAX;
	      qh = 0;		/* currently ignored */
	    }
	}
      else  /* divisor is already normalised */
	{
	  if (new_np != np)
	    MPN_COPY (new_np, np, nn);

	  if (dn == 2)
	    {
	      qh = mpn_divrem_2 (qp, 0L, new_np, nn, dp);
	    }
	  else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) ||
		   BELOW_THRESHOLD (nn - dn, DC_DIV_Q_THRESHOLD))
	    {
	      invert_pi1 (dinv, dh, dp[dn - 2]);
	      qh = mpn_sbpi1_div_q (qp, new_np, nn, dp, dn, dinv.inv32);
	    }
	  else if (BELOW_THRESHOLD (dn, MUPI_DIV_Q_THRESHOLD) ||   /* fast condition */
		   BELOW_THRESHOLD (nn, 2 * MU_DIV_Q_THRESHOLD) || /* fast condition */
		   (double) (2 * (MU_DIV_Q_THRESHOLD - MUPI_DIV_Q_THRESHOLD)) * dn /* slow... */
		   + (double) MUPI_DIV_Q_THRESHOLD * nn > (double) dn * nn)   /* ...condition */
	    {
	      invert_pi1 (dinv, dh, dp[dn - 2]);
	      qh = mpn_dcpi1_div_q (qp, new_np, nn, dp, dn, &dinv);
	    }
	  else
	    {
	      mp_size_t itch = mpn_mu_div_q_itch (nn, dn, 0);
	      mp_ptr scratch = TMP_ALLOC_LIMBS (itch);
	      qh = mpn_mu_div_q (qp, np, nn, dp, dn, scratch);
	    }
	  qp[nn - dn] = qh;
	}
    }
  else
    {
      /* |________________________|
                |_________________|  */
      tp = TMP_ALLOC_LIMBS (qn + 1);

      new_np = scratch;
      new_nn = 2 * qn + 1;
      if (new_np == np)
	/* We need {np,nn} to remain untouched until the final adjustment, so
	   we need to allocate separate space for new_np.  */
	new_np = TMP_ALLOC_LIMBS (new_nn + 1);


      dh = dp[dn - 1];
      if (LIKELY ((dh & GMP_NUMB_HIGHBIT) == 0))
	{
	  count_leading_zeros (cnt, dh);

	  cy = mpn_lshift (new_np, np + nn - new_nn, new_nn, cnt);
	  new_np[new_nn] = cy;

	  new_nn += (cy != 0);

	  new_dp = TMP_ALLOC_LIMBS (qn + 1);
	  mpn_lshift (new_dp, dp + dn - (qn + 1), qn + 1, cnt);
	  new_dp[0] |= dp[dn - (qn + 1) - 1] >> (GMP_NUMB_BITS - cnt);

	  if (qn + 1 == 2)
	    {
	      qh = mpn_divrem_2 (tp, 0L, new_np, new_nn, new_dp);
	    }
	  else if (BELOW_THRESHOLD (qn, DC_DIVAPPR_Q_THRESHOLD - 1))
	    {
	      invert_pi1 (dinv, new_dp[qn], new_dp[qn - 1]);
	      qh = mpn_sbpi1_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, dinv.inv32);
	    }
	  else if (BELOW_THRESHOLD (qn, MU_DIVAPPR_Q_THRESHOLD - 1))
	    {
	      invert_pi1 (dinv, new_dp[qn], new_dp[qn - 1]);
	      qh = mpn_dcpi1_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, &dinv);
	    }
	  else
	    {
	      mp_size_t itch = mpn_mu_divappr_q_itch (new_nn, qn + 1, 0);
	      mp_ptr scratch = TMP_ALLOC_LIMBS (itch);
	      qh = mpn_mu_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, scratch);
	    }
	  if (cy == 0)
	    tp[qn] = qh;
	  else if (UNLIKELY (qh != 0))
	    {
	      /* This happens only when the quotient is close to B^n and
		 mpn_*_divappr_q returned B^n.  */
	      mp_size_t i, n;
	      n = new_nn - (qn + 1);
	      for (i = 0; i < n; i++)
		tp[i] = GMP_NUMB_MAX;
	      qh = 0;		/* currently ignored */
	    }
	}
      else  /* divisor is already normalised */
	{
	  MPN_COPY (new_np, np + nn - new_nn, new_nn); /* pointless if MU will be used */

	  new_dp = (mp_ptr) dp + dn - (qn + 1);

	  if (qn == 2 - 1)
	    {
	      qh = mpn_divrem_2 (tp, 0L, new_np, new_nn, new_dp);
	    }
	  else if (BELOW_THRESHOLD (qn, DC_DIVAPPR_Q_THRESHOLD - 1))
	    {
	      invert_pi1 (dinv, dh, new_dp[qn - 1]);
	      qh = mpn_sbpi1_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, dinv.inv32);
	    }
	  else if (BELOW_THRESHOLD (qn, MU_DIVAPPR_Q_THRESHOLD - 1))
	    {
	      invert_pi1 (dinv, dh, new_dp[qn - 1]);
	      qh = mpn_dcpi1_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, &dinv);
	    }
	  else
	    {
	      mp_size_t itch = mpn_mu_divappr_q_itch (new_nn, qn + 1, 0);
	      mp_ptr scratch = TMP_ALLOC_LIMBS (itch);
	      qh = mpn_mu_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, scratch);
	    }
	  tp[qn] = qh;
	}

      MPN_COPY (qp, tp + 1, qn);
      if (tp[0] <= 4)
        {
	  mp_size_t rn;

          rp = TMP_ALLOC_LIMBS (dn + qn);
          mpn_mul (rp, dp, dn, tp + 1, qn);
	  rn = dn + qn;
	  rn -= rp[rn - 1] == 0;

          if (rn > nn || mpn_cmp (np, rp, nn) < 0)
            mpn_decr_u (qp, 1);
        }
    }

  TMP_FREE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %r13
movq %rsi, %r11
movq %rdi, %r10
andq $0x0, -0x70(%rbp)
cmpq $0x1, %r8
jne 0x1accd
movq (%rcx), %r8
movq %r10, %rdi
xorl %esi, %esi
movq %r11, %rdx
movq %r13, %rcx
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x18700
movq %r8, %r15
movq %r13, %r12
subq %r8, %r12
leaq 0x6(%r12), %rax
cmpq %r8, %rax
movq %r8, -0x48(%rbp)
movq %r10, -0x58(%rbp)
movq %r12, -0x40(%rbp)
movq %r13, -0x78(%rbp)
jge 0x1ae73
leaq 0x10(,%r12,8), %rbx
cmpq $0x7f00, %rbx           # imm = 0x7F00
movq %r11, -0x98(%rbp)
ja 0x1b38f
movq %rsp, %rsi
leaq 0xf(%rbx), %rax
andq $-0x10, %rax
subq %rax, %rsi
movq %rsi, -0x38(%rbp)
movq %rsi, %rsp
leaq 0x1(%r12), %r8
cmpq %r11, %r9
movq %rcx, -0x60(%rbp)
movq %r8, -0x90(%rbp)
jne 0x1ad63
movq %r8, %rsi
shlq $0x4, %rsi
addq $0x10, %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x1b5da
movq %rsp, %r9
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r9
movq %r9, %rsp
leaq 0x2(%r12), %rax
movq %rax, -0x68(%rbp)
leaq 0x1(,%r8,2), %rdx
leaq (%rcx,%r15,8), %r15
movq -0x8(%r15), %r13
pushq $-0x2
popq %r14
testq %r13, %r13
movq %r9, -0x30(%rbp)
js 0x1b3b9
movq %r15, -0xa0(%rbp)
movq %r13, -0xb8(%rbp)
bsrq -0xb8(%rbp), %r13
xorl $0x3f, %r13d
movq -0x78(%rbp), %rax
leaq (%r11,%rax,8), %rsi
leaq (,%rdx,8), %rax
subq %rax, %rsi
movq %r9, %rdi
movl %r13d, %ecx
movq %r9, %r12
movq %rdx, %r15
callq 0x181a0
cmpq $0x1, %rax
movq %r15, %rcx
sbbq $-0x1, %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x88(%rbp)
movq %rax, (%r12,%r15,8)
cmpq $0x7f00, %rbx           # imm = 0x7F00
ja 0x1b450
movq %rsp, %r12
addq $0xf, %rbx
andq $-0x10, %rbx
subq %rbx, %r12
movq %r12, %rsp
movq -0xa0(%rbp), %rax
movq -0x40(%rbp), %rbx
subq %rbx, %r14
leaq (%rax,%r14,8), %rsi
movq %r12, %rdi
movq -0x68(%rbp), %rdx
movl %r13d, %ecx
callq 0x181a0
movq -0x48(%rbp), %rdx
movq %rdx, %rax
subq %rbx, %rax
movq -0x60(%rbp), %rcx
movq -0x18(%rcx,%rax,8), %rax
negb %r13b
movl %r13d, %ecx
shrq %cl, %rax
orq %rax, (%r12)
movq -0x78(%rbp), %r13
cmpq %rdx, %r13
jne 0x1af24
movq -0x38(%rbp), %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq %r12, %r8
callq 0x18920
movq -0x58(%rbp), %r15
movq %rbx, %r14
jmp 0x1b24f
movq -0x8(%rcx,%r15,8), %rbx
testq %rbx, %rbx
movq %r9, -0x30(%rbp)
js 0x1b408
movq %rcx, %r14
movq %rbx, -0xe0(%rbp)
movq %r13, %rbx
bsrq -0xe0(%rbp), %r13
xorl $0x3f, %r13d
movq %r9, %rdi
movq %r11, %rsi
movq %rbx, %rdx
movl %r13d, %ecx
movq %r9, %r12
callq 0x181a0
movq %rax, (%r12,%rbx,8)
movq %rax, -0x38(%rbp)
cmpq $0x1, %rax
sbbq $-0x1, %rbx
leaq (,%r15,8), %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x1b464
movq %rsp, %r12
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r12
movq %r12, %rsp
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x181a0
cmpq $0x2, %r15
jne 0x1af99
movq -0x58(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
movq %r12, %r8
callq 0x18920
movq -0x40(%rbp), %r13
jmp 0x1b10c
cmpq $0x105, %rbx            # imm = 0x105
movq -0x58(%rbp), %r15
movq %rbx, %r14
jle 0x1b147
cmpq $0x6d5, %r14            # imm = 0x6D5
jbe 0x1b1cc
movq -0x50(%rbp), %rdi
movq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0x28ba9
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
ja 0x1b7bb
movq %rsp, %r9
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movq -0x30(%rbp), %rsi
movq -0x88(%rbp), %rbx
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq %r12, %rcx
movq -0x68(%rbp), %r8
callq 0x28628
jmp 0x1b256
cmpq $0x108, %r15            # imm = 0x108
movq -0x58(%rbp), %r14
jl 0x1b086
movq %rbx, %rax
subq %r15, %rax
cmpq $0x107, %rax            # imm = 0x107
jle 0x1b086
movq -0x78(%rbp), %rax
cmpq $0xdb0, %rax            # imm = 0xDB0
jl 0x1aff8
cvtsi2sd %r15, %xmm0
cvtsi2sd %rax, %xmm1
movsd 0x189a6(%rip), %xmm2    # 0x33980
mulsd %xmm1, %xmm2
mulsd %xmm0, %xmm1
mulsd 0x1899e(%rip), %xmm0    # 0x33988
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1b33c
movq %r15, %r13
movq -0x8(%r12,%r15,8), %r15
movq %r15, %rdi
callq 0x29130
movq %rax, %rcx
movq %rax, %rdi
imulq %r15, %rdi
movq -0x10(%r12,%r13,8), %r8
addq %r8, %rdi
jae 0x1b03a
xorl %eax, %eax
cmpq %r15, %rdi
movl $0x0, %edx
adcq $-0x2, %rdx
cmpq %r15, %rdi
cmovaeq %r15, %rax
addq %rdx, %rcx
addq %r15, %rax
subq %rax, %rdi
movq -0x40(%rbp), %r13
movq -0x30(%rbp), %rsi
movq %rcx, -0xd0(%rbp)
movq %r8, %rax
mulq -0xd0(%rbp)
addq %rdi, %rdx
jae 0x1b068
leaq -0x1(%rcx), %rdi
cmpq %r15, %rdx
jae 0x1b7e6
movq %rdi, %rcx
leaq -0x80(%rbp), %r9
movq %rcx, (%r9)
movq %r14, %rdi
movq %rbx, %rdx
movq %r12, %rcx
movq -0x48(%rbp), %r8
callq 0x26d3c
jmp 0x1b10c
movq %r15, %r13
movq -0x8(%r12,%r15,8), %r15
movq %r15, %rdi
callq 0x29130
movq %rax, %r9
movq %rax, %rsi
imulq %r15, %rsi
movq -0x10(%r12,%r13,8), %rcx
addq %rcx, %rsi
jae 0x1b0c8
xorl %eax, %eax
cmpq %r15, %rsi
movl $0x0, %edx
adcq $-0x2, %rdx
cmpq %r15, %rsi
cmovaeq %r15, %rax
addq %rdx, %r9
addq %r15, %rax
subq %rax, %rsi
movq %r9, -0xd8(%rbp)
movq %rcx, %rax
mulq -0xd8(%rbp)
addq %rsi, %rdx
movq -0x40(%rbp), %r13
movq -0x30(%rbp), %rsi
jae 0x1b0f6
leaq -0x1(%r9), %rdi
cmpq %r15, %rdx
jae 0x1b7a4
movq %rdi, %r9
movq %r9, -0x80(%rbp)
movq %r14, %rdi
movq %rbx, %rdx
movq %r12, %rcx
movq -0x48(%rbp), %r8
callq 0x25834
movq -0x38(%rbp), %rcx
testq %rcx, %rcx
je 0x1b13e
testq %rax, %rax
je 0x1b324
subq -0x48(%rbp), %rbx
xorl %eax, %eax
testq %rbx, %rbx
cmovleq %rax, %rbx
cmpq %rax, %rbx
je 0x1b324
orq $-0x1, (%r14,%rax,8)
incq %rax
jmp 0x1b12b
movq %rax, (%r14,%r13,8)
jmp 0x1b324
movq 0x8(%r12,%r14,8), %rbx
movq %rbx, %rdi
callq 0x29130
movq %rax, %r9
movq %rax, %rsi
imulq %rbx, %rsi
movq (%r12,%r14,8), %rcx
addq %rcx, %rsi
jae 0x1b185
xorl %eax, %eax
cmpq %rbx, %rsi
movl $0x0, %edx
adcq $-0x2, %rdx
cmpq %rbx, %rsi
cmovaeq %rbx, %rax
addq %rdx, %r9
addq %rbx, %rax
subq %rax, %rsi
movq %r9, -0xb0(%rbp)
movq %rcx, %rax
mulq -0xb0(%rbp)
addq %rsi, %rdx
movq -0x30(%rbp), %rsi
jae 0x1b1af
leaq -0x1(%r9), %rdi
cmpq %rbx, %rdx
jae 0x1b7cf
movq %rdi, %r9
movq %r9, -0x80(%rbp)
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq %r12, %rcx
movq -0x68(%rbp), %r8
callq 0x265b0
jmp 0x1b24f
movq 0x8(%r12,%r14,8), %rbx
movq %rbx, %rdi
callq 0x29130
movq %rax, %rcx
movq %rax, %rdi
imulq %rbx, %rdi
movq (%r12,%r14,8), %r8
addq %r8, %rdi
jae 0x1b20a
xorl %eax, %eax
cmpq %rbx, %rdi
movl $0x0, %edx
adcq $-0x2, %rdx
cmpq %rbx, %rdi
cmovaeq %rbx, %rax
addq %rdx, %rcx
addq %rbx, %rax
subq %rax, %rdi
movq -0x30(%rbp), %rsi
movq %rcx, -0xa8(%rbp)
movq %r8, %rax
mulq -0xa8(%rbp)
addq %rdi, %rdx
jae 0x1b234
leaq -0x1(%rcx), %rdi
cmpq %rbx, %rdx
jae 0x1b84e
movq %rdi, %rcx
leaq -0x80(%rbp), %r9
movq %rcx, (%r9)
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq %r12, %rcx
movq -0x68(%rbp), %r8
callq 0x2791d
movq -0x88(%rbp), %rbx
testq %rbx, %rbx
je 0x1b28b
testq %rax, %rax
movq -0x90(%rbp), %rdx
movq -0x38(%rbp), %r12
je 0x1b29b
movq -0x50(%rbp), %rcx
subq -0x68(%rbp), %rcx
xorl %eax, %eax
testq %rcx, %rcx
cmovleq %rax, %rcx
cmpq %rax, %rcx
je 0x1b29b
orq $-0x1, (%r12,%rax,8)
incq %rax
jmp 0x1b27c
movq -0x38(%rbp), %r12
movq %rax, 0x8(%r12,%r14,8)
movq -0x90(%rbp), %rdx
leaq 0x8(%r12), %rbx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x290c6
cmpq $0x4, (%r12)
ja 0x1b324
leaq 0x1(%r13), %r14
leaq 0x8(,%r13,8), %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x1b475
movq %rsp, %r12
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r12
movq %r12, %rsp
movq %r12, %rdi
movq -0x60(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rcx
movq -0x90(%rbp), %r8
callq 0x18a58
cmpq $0x1, (%r12,%r13,8)
sbbq $0x0, %r14
cmpq %r13, %r14
jg 0x1b31a
movq -0x98(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1ac5c
testl %eax, %eax
jns 0x1b324
subq $0x1, (%r15)
leaq 0x8(%r15), %r15
jb 0x1b31a
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
jne 0x1b388
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x28f0b
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
ja 0x1b865
movq %rsp, %r9
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movq -0x40(%rbp), %r13
movq -0x30(%rbp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x28c14
jmp 0x1b10c
callq 0x29df3
jmp 0x1b32d
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
movq %r9, -0x30(%rbp)
movq %rcx, %r14
callq 0x29dc0
movq -0x98(%rbp), %r11
movq %r14, %rcx
movq -0x30(%rbp), %r9
movq %rax, -0x38(%rbp)
jmp 0x1ad25
movq -0x78(%rbp), %rbx
leaq (%r11,%rbx,8), %rsi
leaq (,%rdx,8), %rax
subq %rax, %rsi
movq %r9, %rdi
movq %rdx, -0x50(%rbp)
callq 0x290c6
subq -0x40(%rbp), %r14
leaq (%r15,%r14,8), %r14
cmpq -0x48(%rbp), %rbx
jne 0x1b486
movq -0x38(%rbp), %r12
movq %r12, %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
movq -0x50(%rbp), %rcx
movq %r14, %r8
callq 0x18920
jmp 0x1b793
movq %rcx, -0x60(%rbp)
cmpq %r11, %r9
je 0x1b429
movq %r9, %rdi
movq %r11, %rsi
movq %r11, %r14
movq %r13, %rdx
callq 0x290c6
movq %r14, %r11
movq -0x30(%rbp), %r9
cmpq $0x2, %r15
jne 0x1b4f5
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
movq %r9, %rdx
movq %r13, %rcx
movq -0x60(%rbp), %r8
callq 0x18920
jmp 0x1b709
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
callq 0x29dc0
movq %rax, %r12
jmp 0x1ae03
leaq -0x70(%rbp), %rdi
callq 0x29dc0
movq %rax, %r12
jmp 0x1aee8
leaq -0x70(%rbp), %rdi
callq 0x29dc0
movq %rax, %r12
jmp 0x1b2dc
movq %r15, %rbx
cmpq $0x105, -0x40(%rbp)     # imm = 0x105
jle 0x1b5fc
cmpq $0x6d5, -0x40(%rbp)     # imm = 0x6D5
jbe 0x1b712
movq -0x50(%rbp), %rdi
movq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0x28ba9
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
ja 0x1b879
movq %rsp, %r9
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movq -0x38(%rbp), %r12
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r14, %rcx
movq -0x68(%rbp), %r8
callq 0x28628
jmp 0x1b793
movl $0x108, %eax            # imm = 0x108
cmpq %rax, %r15
setge %cl
movq %r12, %r15
cmpq %rax, %r12
setge %al
testb %al, %cl
je 0x1b67f
cmpq $0xdb0, %r13            # imm = 0xDB0
jl 0x1b54b
cvtsi2sdq -0x48(%rbp), %xmm0
cvtsi2sd %r13, %xmm1
movsd 0x18453(%rip), %xmm2    # 0x33980
mulsd %xmm1, %xmm2
mulsd %xmm0, %xmm1
mulsd 0x1844b(%rip), %xmm0    # 0x33988
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x1b7fd
movq %rbx, %rdi
callq 0x29130
movq %rax, %rcx
movq %rax, %rdi
imulq %rbx, %rdi
movq -0x48(%rbp), %rax
movq -0x60(%rbp), %rdx
movq -0x10(%rdx,%rax,8), %rsi
addq %rsi, %rdi
jae 0x1b58d
xorl %eax, %eax
cmpq %rbx, %rdi
movl $0x0, %edx
adcq $-0x2, %rdx
cmpq %rbx, %rdi
cmovaeq %rbx, %rax
addq %rdx, %rcx
addq %rbx, %rax
subq %rax, %rdi
movq %rcx, -0xe8(%rbp)
movq %rsi, %rax
mulq -0xe8(%rbp)
addq %rdi, %rdx
jae 0x1b5b3
leaq -0x1(%rcx), %rdi
cmpq %rbx, %rdx
jae 0x1b8bb
movq %rdi, %rcx
leaq -0x80(%rbp), %r9
movq %rcx, (%r9)
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %r13, %rdx
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %r8
callq 0x26d3c
jmp 0x1b706
leaq -0x70(%rbp), %rdi
movq %r11, %r14
callq 0x29dc0
movq %r14, %r11
movq -0x90(%rbp), %r8
movq -0x60(%rbp), %rcx
movq %rax, %r9
jmp 0x1ad63
movq %r13, %rdi
callq 0x29130
movq %rax, %r9
movq %rax, %rsi
imulq %r13, %rsi
movq -0x10(%rbx), %rcx
addq %rcx, %rsi
jae 0x1b635
xorl %eax, %eax
cmpq %r13, %rsi
movl $0x0, %edx
adcq $-0x2, %rdx
cmpq %r13, %rsi
cmovaeq %r13, %rax
addq %rdx, %r9
addq %r13, %rax
subq %rax, %rsi
movq %r9, -0xc8(%rbp)
movq %rcx, %rax
mulq -0xc8(%rbp)
addq %rsi, %rdx
jae 0x1b65b
leaq -0x1(%r9), %rsi
cmpq %r13, %rdx
jae 0x1b88d
movq %rsi, %r9
movq %r9, -0x80(%rbp)
movq -0x38(%rbp), %r12
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r14, %rcx
movq -0x68(%rbp), %r8
callq 0x265b0
jmp 0x1b793
movq %rbx, %rdi
callq 0x29130
movq %rax, %r9
movq %rax, %rsi
imulq %rbx, %rsi
movq -0x48(%rbp), %rax
movq -0x60(%rbp), %rcx
movq -0x10(%rcx,%rax,8), %rcx
addq %rcx, %rsi
jae 0x1b6c1
xorl %eax, %eax
cmpq %rbx, %rsi
movl $0x0, %edx
adcq $-0x2, %rdx
cmpq %rbx, %rsi
cmovaeq %rbx, %rax
addq %rdx, %r9
addq %rbx, %rax
subq %rax, %rsi
movq %r9, -0xf0(%rbp)
movq %rcx, %rax
mulq -0xf0(%rbp)
addq %rsi, %rdx
jae 0x1b6e7
leaq -0x1(%r9), %rsi
cmpq %rbx, %rdx
jae 0x1b8a4
movq %rsi, %r9
movq %r9, -0x80(%rbp)
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
movq -0x30(%rbp), %rsi
movq %r13, %rdx
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %r8
callq 0x25834
movq %r15, %r12
movq %rax, (%rbx,%r12,8)
jmp 0x1b324
movq %r13, %rdi
callq 0x29130
movq %rax, %rcx
movq %rax, %rdi
imulq %r13, %rdi
movq -0x10(%rbx), %rsi
addq %rsi, %rdi
jae 0x1b74b
xorl %eax, %eax
cmpq %r13, %rdi
movl $0x0, %edx
adcq $-0x2, %rdx
cmpq %r13, %rdi
cmovaeq %r13, %rax
addq %rdx, %rcx
addq %r13, %rax
subq %rax, %rdi
movq %rcx, -0xc0(%rbp)
movq %rsi, %rax
mulq -0xc0(%rbp)
addq %rdi, %rdx
jae 0x1b771
leaq -0x1(%rcx), %rdi
cmpq %r13, %rdx
jae 0x1b8d2
movq %rdi, %rcx
leaq -0x80(%rbp), %r9
movq %rcx, (%r9)
movq -0x38(%rbp), %r12
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq %r14, %rcx
movq -0x68(%rbp), %r8
callq 0x2791d
movq -0x58(%rbp), %r15
movq -0x40(%rbp), %r14
movq -0x78(%rbp), %r13
jmp 0x1b28f
addq $-0x2, %r9
cmpq %rcx, %rax
cmovaeq %r9, %rdi
cmpq %r15, %rdx
cmovbeq %rdi, %r9
jmp 0x1b0f6
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x29dc0
movq %rax, %r9
jmp 0x1af75
addq $-0x2, %r9
cmpq %rcx, %rax
cmovaeq %r9, %rdi
cmpq %rbx, %rdx
cmovbeq %rdi, %r9
jmp 0x1b1af
addq $-0x2, %rcx
cmpq %r8, %rax
cmovaeq %rcx, %rdi
cmpq %r15, %rdx
cmovbeq %rdi, %rcx
jmp 0x1b068
movq %r11, %r14
movq %r13, %rdi
movq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x28f0b
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
ja 0x1b8e9
movq %rsp, %r9
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movq -0x58(%rbp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq -0x60(%rbp), %rcx
movq -0x48(%rbp), %r8
callq 0x28c14
jmp 0x1b706
addq $-0x2, %rcx
cmpq %r8, %rax
cmovaeq %rcx, %rdi
cmpq %rbx, %rdx
cmovbeq %rdi, %rcx
jmp 0x1b234
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x29dc0
movq %rax, %r9
jmp 0x1b36a
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x29dc0
movq %rax, %r9
jmp 0x1b4d5
addq $-0x2, %r9
cmpq %rcx, %rax
cmovaeq %r9, %rsi
cmpq %r13, %rdx
cmovbeq %rsi, %r9
jmp 0x1b65b
addq $-0x2, %r9
cmpq %rcx, %rax
cmovaeq %r9, %rsi
cmpq %rbx, %rdx
cmovbeq %rsi, %r9
jmp 0x1b6e7
addq $-0x2, %rcx
cmpq %rsi, %rax
cmovaeq %rcx, %rdi
cmpq %rbx, %rdx
cmovbeq %rdi, %rcx
jmp 0x1b5b3
addq $-0x2, %rcx
cmpq %rsi, %rax
cmovaeq %rcx, %rdi
cmpq %r13, %rdx
cmovbeq %rdi, %rcx
jmp 0x1b771
leaq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x29dc0
movq %rax, %r9
jmp 0x1b82f
nopl (%rax)