// File: /workspace/github_cpp_makefile_star2_O1/marxn[P]pupp/3rdparty/gmp/mpn/tdiv_qr.c
// Function: _gmpn_tdiv_qr
void
mpn_tdiv_qr (mp_ptr qp, mp_ptr rp, mp_size_t qxn,
	     mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn)
{
  ASSERT_ALWAYS (qxn == 0);

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

  switch (dn)
    {
    case 0:
      DIVIDE_BY_ZERO;

    case 1:
      {
	rp[0] = mpn_divrem_1 (qp, (mp_size_t) 0, np, nn, dp[0]);
	return;
      }

    case 2:
      {
	mp_ptr n2p, d2p;
	mp_limb_t qhl, cy;
	TMP_DECL;
	TMP_MARK;
	if ((dp[1] & GMP_NUMB_HIGHBIT) == 0)
	  {
	    int cnt;
	    mp_limb_t dtmp[2];
	    count_leading_zeros (cnt, dp[1]);
	    cnt -= GMP_NAIL_BITS;
	    d2p = dtmp;
	    d2p[1] = (dp[1] << cnt) | (dp[0] >> (GMP_NUMB_BITS - cnt));
	    d2p[0] = (dp[0] << cnt) & GMP_NUMB_MASK;
	    n2p = TMP_ALLOC_LIMBS (nn + 1);
	    cy = mpn_lshift (n2p, np, nn, cnt);
	    n2p[nn] = cy;
	    qhl = mpn_divrem_2 (qp, 0L, n2p, nn + (cy != 0), d2p);
	    if (cy == 0)
	      qp[nn - 2] = qhl;	/* always store nn-2+1 quotient limbs */
	    rp[0] = (n2p[0] >> cnt)
	      | ((n2p[1] << (GMP_NUMB_BITS - cnt)) & GMP_NUMB_MASK);
	    rp[1] = (n2p[1] >> cnt);
	  }
	else
	  {
	    d2p = (mp_ptr) dp;
	    n2p = TMP_ALLOC_LIMBS (nn);
	    MPN_COPY (n2p, np, nn);
	    qhl = mpn_divrem_2 (qp, 0L, n2p, nn, d2p);
	    qp[nn - 2] = qhl;	/* always store nn-2+1 quotient limbs */
	    rp[0] = n2p[0];
	    rp[1] = n2p[1];
	  }
	TMP_FREE;
	return;
      }

    default:
      {
	int adjust;
	gmp_pi1_t dinv;
	TMP_DECL;
	TMP_MARK;
	adjust = np[nn - 1] >= dp[dn - 1];	/* conservative tests for quotient size */
	if (nn + adjust >= 2 * dn)
	  {
	    mp_ptr n2p, d2p;
	    mp_limb_t cy;
	    int cnt;

	    qp[nn - dn] = 0;			  /* zero high quotient limb */
	    if ((dp[dn - 1] & GMP_NUMB_HIGHBIT) == 0) /* normalize divisor */
	      {
		count_leading_zeros (cnt, dp[dn - 1]);
		cnt -= GMP_NAIL_BITS;
		d2p = TMP_ALLOC_LIMBS (dn);
		mpn_lshift (d2p, dp, dn, cnt);
		n2p = TMP_ALLOC_LIMBS (nn + 1);
		cy = mpn_lshift (n2p, np, nn, cnt);
		n2p[nn] = cy;
		nn += adjust;
	      }
	    else
	      {
		cnt = 0;
		d2p = (mp_ptr) dp;
		n2p = TMP_ALLOC_LIMBS (nn + 1);
		MPN_COPY (n2p, np, nn);
		n2p[nn] = 0;
		nn += adjust;
	      }

	    invert_pi1 (dinv, d2p[dn - 1], d2p[dn - 2]);
	    if (BELOW_THRESHOLD (dn, DC_DIV_QR_THRESHOLD))
	      mpn_sbpi1_div_qr (qp, n2p, nn, d2p, dn, dinv.inv32);
	    else if (BELOW_THRESHOLD (dn, MUPI_DIV_QR_THRESHOLD) ||   /* fast condition */
		     BELOW_THRESHOLD (nn, 2 * MU_DIV_QR_THRESHOLD) || /* fast condition */
		     (double) (2 * (MU_DIV_QR_THRESHOLD - MUPI_DIV_QR_THRESHOLD)) * dn /* slow... */
		     + (double) MUPI_DIV_QR_THRESHOLD * nn > (double) dn * nn)    /* ...condition */
	      mpn_dcpi1_div_qr (qp, n2p, nn, d2p, dn, &dinv);
	    else
	      {
		mp_size_t itch = mpn_mu_div_qr_itch (nn, dn, 0);
		mp_ptr scratch = TMP_ALLOC_LIMBS (itch);
		mpn_mu_div_qr (qp, rp, n2p, nn, d2p, dn, scratch);
		n2p = rp;
	      }

	    if (cnt != 0)
	      mpn_rshift (rp, n2p, dn, cnt);
	    else
	      MPN_COPY (rp, n2p, dn);
	    TMP_FREE;
	    return;
	  }

	/* When we come here, the numerator/partial remainder is less
	   than twice the size of the denominator.  */

	  {
	    /* Problem:

	       Divide a numerator N with nn limbs by a denominator D with dn
	       limbs forming a quotient of qn=nn-dn+1 limbs.  When qn is small
	       compared to dn, conventional division algorithms perform poorly.
	       We want an algorithm that has an expected running time that is
	       dependent only on qn.

	       Algorithm (very informally stated):

	       1) Divide the 2 x qn most significant limbs from the numerator
		  by the qn most significant limbs from the denominator.  Call
		  the result qest.  This is either the correct quotient, but
		  might be 1 or 2 too large.  Compute the remainder from the
		  division.  (This step is implemented by an mpn_divrem call.)

	       2) Is the most significant limb from the remainder < p, where p
		  is the product of the most significant limb from the quotient
		  and the next(d)?  (Next(d) denotes the next ignored limb from
		  the denominator.)  If it is, decrement qest, and adjust the
		  remainder accordingly.

	       3) Is the remainder >= qest?  If it is, qest is the desired
		  quotient.  The algorithm terminates.

	       4) Subtract qest x next(d) from the remainder.  If there is
		  borrow out, decrement qest, and adjust the remainder
		  accordingly.

	       5) Skip one word from the denominator (i.e., let next(d) denote
		  the next less significant limb.  */

	    mp_size_t qn;
	    mp_ptr n2p, d2p;
	    mp_ptr tp;
	    mp_limb_t cy;
	    mp_size_t in, rn;
	    mp_limb_t quotient_too_large;
	    unsigned int cnt;

	    qn = nn - dn;
	    qp[qn] = 0;				/* zero high quotient limb */
	    qn += adjust;			/* qn cannot become bigger */

	    if (qn == 0)
	      {
		MPN_COPY (rp, np, dn);
		TMP_FREE;
		return;
	      }

	    in = dn - qn;		/* (at least partially) ignored # of limbs in ops */
	    /* Normalize denominator by shifting it to the left such that its
	       most significant bit is set.  Then shift the numerator the same
	       amount, to mathematically preserve quotient.  */
	    if ((dp[dn - 1] & GMP_NUMB_HIGHBIT) == 0)
	      {
		count_leading_zeros (cnt, dp[dn - 1]);
		cnt -= GMP_NAIL_BITS;

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

		n2p = TMP_ALLOC_LIMBS (2 * qn + 1);
		cy = mpn_lshift (n2p, np + nn - 2 * qn, 2 * qn, cnt);
		if (adjust)
		  {
		    n2p[2 * qn] = cy;
		    n2p++;
		  }
		else
		  {
		    n2p[0] |= np[nn - 2 * qn - 1] >> (GMP_NUMB_BITS - cnt);
		  }
	      }
	    else
	      {
		cnt = 0;
		d2p = (mp_ptr) dp + in;

		n2p = TMP_ALLOC_LIMBS (2 * qn + 1);
		MPN_COPY (n2p, np + nn - 2 * qn, 2 * qn);
		if (adjust)
		  {
		    n2p[2 * qn] = 0;
		    n2p++;
		  }
	      }

	    /* Get an approximate quotient using the extracted operands.  */
	    if (qn == 1)
	      {
		mp_limb_t q0, r0;
		udiv_qrnnd (q0, r0, n2p[1], n2p[0] << GMP_NAIL_BITS, d2p[0] << GMP_NAIL_BITS);
		n2p[0] = r0 >> GMP_NAIL_BITS;
		qp[0] = q0;
	      }
	    else if (qn == 2)
	      mpn_divrem_2 (qp, 0L, n2p, 4L, d2p); /* FIXME: obsolete function */
	    else
	      {
		invert_pi1 (dinv, d2p[qn - 1], d2p[qn - 2]);
		if (BELOW_THRESHOLD (qn, DC_DIV_QR_THRESHOLD))
		  mpn_sbpi1_div_qr (qp, n2p, 2 * qn, d2p, qn, dinv.inv32);
		else if (BELOW_THRESHOLD (qn, MU_DIV_QR_THRESHOLD))
		  mpn_dcpi1_div_qr (qp, n2p, 2 * qn, d2p, qn, &dinv);
		else
		  {
		    mp_size_t itch = mpn_mu_div_qr_itch (2 * qn, qn, 0);
		    mp_ptr scratch = TMP_ALLOC_LIMBS (itch);
		    mp_ptr r2p = rp;
		    if (np == r2p)	/* If N and R share space, put ... */
		      r2p += nn - qn;	/* intermediate remainder at N's upper end. */
		    mpn_mu_div_qr (qp, r2p, n2p, 2 * qn, d2p, qn, scratch);
		    MPN_COPY (n2p, r2p, qn);
		  }
	      }

	    rn = qn;
	    /* Multiply the first ignored divisor limb by the most significant
	       quotient limb.  If that product is > the partial remainder's
	       most significant limb, we know the quotient is too large.  This
	       test quickly catches most cases where the quotient is too large;
	       it catches all cases where the quotient is 2 too large.  */
	    {
	      mp_limb_t dl, x;
	      mp_limb_t h, dummy;

	      if (in - 2 < 0)
		dl = 0;
	      else
		dl = dp[in - 2];

#if GMP_NAIL_BITS == 0
	      x = (dp[in - 1] << cnt) | ((dl >> 1) >> ((~cnt) % GMP_LIMB_BITS));
#else
	      x = (dp[in - 1] << cnt) & GMP_NUMB_MASK;
	      if (cnt != 0)
		x |= dl >> (GMP_NUMB_BITS - cnt);
#endif
	      umul_ppmm (h, dummy, x, qp[qn - 1] << GMP_NAIL_BITS);

	      if (n2p[qn - 1] < h)
		{
		  mp_limb_t cy;

		  mpn_decr_u (qp, (mp_limb_t) 1);
		  cy = mpn_add_n (n2p, n2p, d2p, qn);
		  if (cy)
		    {
		      /* The partial remainder is safely large.  */
		      n2p[qn] = cy;
		      ++rn;
		    }
		}
	    }

	    quotient_too_large = 0;
	    if (cnt != 0)
	      {
		mp_limb_t cy1, cy2;

		/* Append partially used numerator limb to partial remainder.  */
		cy1 = mpn_lshift (n2p, n2p, rn, GMP_NUMB_BITS - cnt);
		n2p[0] |= np[in - 1] & (GMP_NUMB_MASK >> cnt);

		/* Update partial remainder with partially used divisor limb.  */
		cy2 = mpn_submul_1 (n2p, qp, qn, dp[in - 1] & (GMP_NUMB_MASK >> cnt));
		if (qn != rn)
		  {
		    ASSERT_ALWAYS (n2p[qn] >= cy2);
		    n2p[qn] -= cy2;
		  }
		else
		  {
		    n2p[qn] = cy1 - cy2; /* & GMP_NUMB_MASK; */

		    quotient_too_large = (cy1 < cy2);
		    ++rn;
		  }
		--in;
	      }
	    /* True: partial remainder now is neutral, i.e., it is not shifted up.  */

	    tp = TMP_ALLOC_LIMBS (dn);

	    if (in < qn)
	      {
		if (in == 0)
		  {
		    MPN_COPY (rp, n2p, rn);
		    ASSERT_ALWAYS (rn == dn);
		    goto foo;
		  }
		mpn_mul (tp, qp, qn, dp, in);
	      }
	    else
	      mpn_mul (tp, dp, in, qp, qn);

	    cy = mpn_sub (n2p, n2p, rn, tp + in, qn);
	    MPN_COPY (rp + in, n2p, dn - in);
	    quotient_too_large |= cy;
	    cy = mpn_sub_n (rp, np, tp, in);
	    cy = mpn_sub_1 (rp + in, rp + in, rn, cy);
	    quotient_too_large |= cy;
	  foo:
	    if (quotient_too_large)
	      {
		mpn_decr_u (qp, (mp_limb_t) 1);
		mpn_add_n (rp, rp, dp, dn);
	      }
	  }
	TMP_FREE;
	return;
      }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
testq %rdx, %rdx
jne 0x207b7
movq %r8, %r11
movq %rcx, %r10
movq %rsi, %r13
movq 0x10(%rbp), %rbx
cmpq $0x1, %rbx
je 0x1ff33
cmpq $0x2, %rbx
je 0x1fe41
testq %rbx, %rbx
je 0x20902
xorl %ecx, %ecx
movq %rcx, -0x38(%rbp)
movq -0x8(%r10,%r11,8), %r12
movq -0x8(%r9,%rbx,8), %r8
xorl %eax, %eax
cmpq %r8, %r12
setae %al
leaq (%rax,%r11), %r15
leaq (%rbx,%rbx), %rsi
movq %r11, %rdx
subq %rbx, %rdx
movq %rcx, (%rdi,%rdx,8)
cmpq %rsi, %r15
jge 0x1ff4c
addq %rax, %rdx
movq %rdx, -0x30(%rbp)
je 0x2005b
leaq (%r10,%r11,8), %rcx
movq %rbx, %rax
subq %rdx, %rax
movq %rax, -0x60(%rbp)
movq -0x8(%r9,%rbx,8), %rax
testq %rax, %rax
movq %r13, -0x58(%rbp)
movq %rdi, -0x68(%rbp)
movq %r10, -0x80(%rbp)
movq %r9, -0x50(%rbp)
movq %r11, -0x70(%rbp)
js 0x201f8
movq %rax, -0xb0(%rbp)
bsrq -0xb0(%rbp), %r14
xorl $0x3f, %r14d
leaq (,%rdx,8), %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
movq %r12, -0x48(%rbp)
movq %r8, -0x78(%rbp)
movq %rcx, %rbx
ja 0x2085e
movq %rsp, %r13
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r13
movq %r13, %rsp
movq -0x60(%rbp), %rax
leaq (%r9,%rax,8), %r15
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %r12
movl %r12d, %ecx
callq 0x1c4a0
movq -0x30(%rbp), %rsi
movq -0x8(%r15), %rax
movl %r12d, %ecx
negl %ecx
shrq %cl, %rax
movq %r13, -0x40(%rbp)
orq %rax, (%r13)
leaq (%rsi,%rsi), %r13
shlq $0x4, %rsi
orq $0x8, %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x20879
movq %rsp, %r15
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r15
movq %r15, %rsp
leaq (,%r13,8), %rax
subq %rax, %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl %r14d, %ecx
callq 0x1c4a0
movq -0x78(%rbp), %rcx
cmpq %rcx, -0x48(%rbp)
jb 0x20271
movq %rax, (%r15,%r13,8)
addq $0x8, %r15
movq %r15, -0x48(%rbp)
jmp 0x20299
movq $0x0, -0x38(%rbp)
movq 0x8(%r9), %rax
testq %rax, %rax
js 0x1fff2
movq %rdi, %rbx
movq %rax, -0xc8(%rbp)
bsrq -0xc8(%rbp), %r14
xorl $0x3f, %r14d
movq (%r9), %rdx
movl $0x40, %ecx
subl %r14d, %ecx
movq %rcx, -0x30(%rbp)
movl %r14d, %ecx
shldq %cl, %rdx, %rax
shlq %cl, %rdx
movq %rax, -0x88(%rbp)
movq %rdx, -0x90(%rbp)
leaq 0x8(,%r11,8), %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
movq %r13, -0x58(%rbp)
ja 0x207bc
movq %rsp, %r12
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r12
movq %r12, %rsp
movq %r12, %rdi
movq %r10, %rsi
movq %r11, %rdx
movl %r14d, %ecx
movq %r11, %r15
callq 0x1c4a0
movq %rax, %r13
movq %rax, (%r12,%r15,8)
xorl %ecx, %ecx
testq %rax, %rax
setne %cl
addq %r15, %rcx
leaq -0x90(%rbp), %r8
movq %rbx, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x1cc20
testq %r13, %r13
jne 0x1ff01
movq %rax, -0x10(%rbx,%r15,8)
movq (%r12), %rax
movq 0x8(%r12), %rdx
movl %r14d, %ecx
shrq %cl, %rax
movq %rdx, %rsi
movq -0x30(%rbp), %rcx
shlq %cl, %rsi
orq %rax, %rsi
movq -0x58(%rbp), %rax
movq %rsi, (%rax)
movl %r14d, %ecx
shrq %cl, %rdx
movq %rdx, 0x8(%rax)
jmp 0x201dc
movq (%r9), %r8
xorl %esi, %esi
movq %r10, %rdx
movq %r11, %rcx
callq 0x1ca00
movq %rax, (%r13)
jmp 0x201e9
movq -0x8(%r9,%rbx,8), %rax
testq %rax, %rax
movq %r13, -0x58(%rbp)
movq %rdi, -0x68(%rbp)
js 0x20084
movq %rax, -0xc0(%rbp)
bsrq -0xc0(%rbp), %rcx
xorl $0x3f, %ecx
leaq (,%rbx,8), %rsi
movq %r11, %r12
movq %r10, %r14
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x207f6
movq %rsp, %r13
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r13
movq %r13, %rsp
movq %r13, %rdi
movq %r9, %rsi
movq %rbx, %rdx
movq %rcx, -0x30(%rbp)
callq 0x1c4a0
movq %r12, %rdx
leaq 0x8(,%r12,8), %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x20815
movq %rsp, %r12
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r12
movq %r12, %rsp
movq %r14, %rsi
movq %r12, %rdi
movq -0x30(%rbp), %rcx
movq %rdx, %r14
callq 0x1c4a0
jmp 0x200cd
movq %r9, %r15
movq %rdi, %rbx
leaq (,%r11,8), %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x207d9
movq %rsp, %r14
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r14
movq %r14, %rsp
movq %r14, %rdi
movq %r10, %rsi
movq %r11, %rdx
movq %r11, %r12
callq 0x2f4c6
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x1cc20
movq %rax, -0x10(%rbx,%r12,8)
movq (%r14), %rax
movq %rax, (%r13)
movq 0x8(%r14), %rax
movq %rax, 0x8(%r13)
jmp 0x201dc
movq %r13, %rdi
movq %r10, %rsi
movq %rbx, %rdx
callq 0x2f4c6
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x20764
callq 0x301a3
jmp 0x20760
leaq 0x8(,%r11,8), %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
movq %r9, -0x50(%rbp)
ja 0x2088a
movq %rsp, %r12
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r12
movq %r12, %rsp
movq %r12, %rdi
movq %r10, %rsi
movq %r11, %rdx
movq %r11, %r14
callq 0x2f4c6
xorl %eax, %eax
movq $0x0, -0x30(%rbp)
movq -0x50(%rbp), %r13
movq %rax, (%r12,%r14,8)
movq %rbx, %r14
movq -0x8(%r13,%rbx,8), %rbx
movq %rbx, %rdi
callq 0x2f530
movq %rax, %r9
movq %rax, %rsi
imulq %rbx, %rsi
movq -0x10(%r13,%r14,8), %rcx
addq %rcx, %rsi
jae 0x20113
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, -0xb8(%rbp)
movq %rcx, %rax
mulq -0xb8(%rbp)
addq %rsi, %rdx
jae 0x20139
leaq -0x1(%r9), %rsi
cmpq %rbx, %rdx
jae 0x20847
movq %rsi, %r9
movq %r9, -0x90(%rbp)
movq 0x10(%rbp), %r8
cmpq $0x32, %r8
jle 0x201a8
cmpq $0x5d, %r8
jl 0x2018d
cmpq $0x1052, %r15           # imm = 0x1052
jl 0x2018d
cvtsi2sd %r8, %xmm0
cvtsi2sd %r15, %xmm1
movsd 0x1a825(%rip), %xmm2    # 0x3a990
mulsd %xmm1, %xmm2
movsd 0x1a829(%rip), %xmm3    # 0x3a9a0
mulsd %xmm0, %xmm3
addsd %xmm2, %xmm3
mulsd %xmm1, %xmm0
ucomisd %xmm0, %xmm3
jbe 0x20436
leaq -0x90(%rbp), %r9
movq -0x68(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x2cf8d
jmp 0x201ba
movq -0x68(%rbp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x2bf54
movq -0x58(%rbp), %rbx
movq -0x30(%rbp), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq 0x10(%rbp), %rdx
testl %ecx, %ecx
je 0x201d7
callq 0x30480
jmp 0x201dc
callq 0x2f4c6
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
jne 0x2077c
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq (%rdx,%rdx), %r13
movq %rdx, %rsi
shlq $0x4, %rsi
orq $0x8, %rsi
movq %r8, %r15
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x208a7
movq %rsp, %r14
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r14
movq %r14, %rsp
movq %r9, %rbx
movq -0x60(%rbp), %rax
leaq (%r9,%rax,8), %rax
movq %rax, -0x40(%rbp)
leaq (,%r13,8), %rax
subq %rax, %rcx
movq %r14, %rdi
movq %rcx, %rsi
movq %r13, %rdx
callq 0x2f4c6
cmpq %r15, %r12
jb 0x20261
movq $0x0, (%r14,%r13,8)
addq $0x8, %r14
movq %r14, -0x48(%rbp)
movq %rbx, %r9
movq -0x30(%rbp), %rax
xorl %r12d, %r12d
jmp 0x202a4
movl $0x40, %ecx
subl %r14d, %ecx
notq %r13
movq %r15, %rsi
movq -0x80(%rbp), %r15
leaq (%r15,%r13,8), %rax
movq -0x70(%rbp), %rdx
movq (%rax,%rdx,8), %rax
shrq %cl, %rax
movq %rsi, -0x48(%rbp)
orq %rax, (%rsi)
movq -0x50(%rbp), %r9
movq -0x30(%rbp), %rax
movq %r14, %r12
cmpq $0x2, %rax
movq -0x68(%rbp), %r14
movq -0x60(%rbp), %r13
je 0x202e3
cmpq $0x1, %rax
jne 0x20308
movq -0x48(%rbp), %r15
movq (%r15), %rax
movq 0x8(%r15), %rdx
movq -0x40(%rbp), %rcx
movq (%rcx), %rcx
movq %rcx, -0xa8(%rbp)
divq -0xa8(%rbp)
movq %rdx, (%r15)
movq %rax, (%r14)
jmp 0x204d3
movl $0x4, %ecx
movq %r14, %rdi
xorl %esi, %esi
movq -0x48(%rbp), %r15
movq %r15, %rdx
movq -0x40(%rbp), %r8
movq %r9, %rbx
callq 0x1cc20
movq %rbx, %r9
jmp 0x204d3
movq %r12, -0x78(%rbp)
movq %r9, %r15
movq -0x40(%rbp), %rbx
movq -0x8(%rbx,%rax,8), %r12
movq %r12, %rdi
callq 0x2f530
movq -0x30(%rbp), %r8
movq %rax, %r9
movq %rax, %rsi
imulq %r12, %rsi
movq -0x10(%rbx,%r8,8), %rcx
addq %rcx, %rsi
jae 0x20356
xorl %eax, %eax
cmpq %r12, %rsi
movl $0x0, %edx
adcq $-0x2, %rdx
cmpq %r12, %rsi
cmovaeq %r12, %rax
addq %rdx, %r9
addq %r12, %rax
subq %rax, %rsi
movq %r9, -0xa0(%rbp)
movq %rcx, %rax
mulq -0xa0(%rbp)
addq %rsi, %rdx
jae 0x2037c
leaq -0x1(%r9), %rsi
cmpq %r12, %rdx
jae 0x208dd
movq %rsi, %r9
movq %r9, -0x90(%rbp)
cmpq $0x32, %r8
jle 0x20493
leaq (%r8,%r8), %r12
cmpq $0x828, %r8             # imm = 0x828
jle 0x204ac
movq %r12, %rdi
movq %r8, %rsi
xorl %edx, %edx
callq 0x2e666
movq %rax, %rsi
shlq $0x3, %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x208f4
movq %rsp, %rax
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %rax
movq %rax, %rsp
movq -0x80(%rbp), %rdx
movq -0x70(%rbp), %rbx
movq -0x30(%rbp), %r13
subq %r13, %rbx
xorl %ecx, %ecx
movq -0x58(%rbp), %rsi
cmpq %rsi, %rdx
cmoveq %rbx, %rcx
leaq (%rsi,%rcx,8), %rbx
subq $0x8, %rsp
movq %r14, %rdi
movq %rbx, %rsi
movq -0x48(%rbp), %r14
movq %r14, %rdx
movq %r12, %rcx
movq -0x40(%rbp), %r8
movq %r13, %r9
pushq %rax
callq 0x2de94
addq $0x10, %rsp
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2f4c6
movq %r15, %r9
movq %r14, %r15
movq -0x68(%rbp), %r14
movq -0x60(%rbp), %r13
jmp 0x204cf
movq %r15, %rdi
movq %r8, %rsi
xorl %edx, %edx
callq 0x2e666
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
ja 0x208c9
movq %rsp, %r10
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r10
movq %r10, %rsp
subq $0x8, %rsp
movq -0x68(%rbp), %rdi
movq -0x58(%rbp), %rbx
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r13, %r8
movq 0x10(%rbp), %r9
pushq %r10
callq 0x2de94
addq $0x10, %rsp
movq %rbx, %r12
jmp 0x201be
leaq (%r8,%r8), %rdx
movq %r14, %rdi
movq -0x48(%rbp), %rbx
movq %rbx, %rsi
movq -0x40(%rbp), %rcx
callq 0x2bf54
jmp 0x204c9
leaq -0x90(%rbp), %r9
movq %r14, %rdi
movq -0x48(%rbp), %rbx
movq %rbx, %rsi
movq %r12, %rdx
movq -0x40(%rbp), %rcx
callq 0x2cf8d
movq %r15, %r9
movq %rbx, %r15
movq -0x78(%rbp), %r12
cmpq $0x2, %r13
jge 0x204dd
xorl %eax, %eax
jmp 0x204e5
movq -0x10(%r9,%r13,8), %rax
shrq %rax
movq -0x30(%rbp), %r8
movq -0x8(%r9,%r13,8), %rdx
movl %r12d, %ecx
shlq %cl, %rdx
notb %cl
shrq %cl, %rax
orq %rdx, %rax
movq -0x8(%r14,%r8,8), %rcx
movq %rcx, -0x98(%rbp)
mulq -0x98(%rbp)
movq %r8, %rbx
cmpq %rdx, -0x8(%r15,%r8,8)
jae 0x20552
movq %r14, %rax
subq $0x1, (%rax)
leaq 0x8(%rax), %rax
jb 0x2051c
movq %r15, %rdi
movq %r15, %rsi
movq -0x40(%rbp), %rdx
movq %r8, %rcx
movq %r9, %rbx
callq 0x1bfa0
movq -0x30(%rbp), %r8
movq %rbx, %r9
movq %r8, %rbx
testq %rax, %rax
je 0x20552
movq %rax, (%r15,%r8,8)
leaq 0x1(%r8), %rbx
testl %r12d, %r12d
je 0x205e0
movq %r12, %rax
movl %eax, %r12d
leaq -0x1(%r13), %rcx
movq %rcx, -0x70(%rbp)
movl $0x40, %ecx
subl %eax, %ecx
movq %r15, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r13, %r14
movq %r9, %r13
callq 0x1c4a0
movq $-0x1, %r8
movl %r12d, %ecx
shrq %cl, %r8
movq -0x80(%rbp), %rcx
movq -0x8(%rcx,%r14,8), %rcx
andq %r8, %rcx
orq %rcx, (%r15)
movq %rax, %r12
andq -0x8(%r13,%r14,8), %r8
movq -0x68(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
movq -0x30(%rbp), %rdx
movq %r8, %rcx
callq 0x30370
movq -0x30(%rbp), %r8
cmpq %rbx, %r8
jne 0x205ea
xorl %ecx, %ecx
subq %rax, %r12
setb %cl
movq %rcx, -0x40(%rbp)
movq %r12, (%r15,%r8,8)
incq %rbx
movq -0x70(%rbp), %r13
jmp 0x20607
movq $0x0, -0x40(%rbp)
jmp 0x2060b
movq -0x70(%rbp), %r13
movq (%r15,%r8,8), %rcx
subq %rax, %rcx
jb 0x208c4
movq %rcx, (%r15,%r8,8)
movq $0x0, -0x40(%rbp)
movq -0x50(%rbp), %r9
movq 0x10(%rbp), %rax
leaq (,%rax,8), %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x2082c
movq %rsp, %r12
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r12
movq %r12, %rsp
movq -0x48(%rbp), %r15
cmpq %r8, %r13
jge 0x2065b
testq %r13, %r13
je 0x20786
movq %r12, %rdi
movq %r14, %rsi
movq %r8, %rdx
movq %r9, %rcx
movq %r8, %r14
movq %r13, %r8
jmp 0x2066a
movq %r12, %rdi
movq %r9, %rsi
movq %r13, %rdx
movq %r14, %rcx
movq %r8, %r14
callq 0x1cd58
leaq (%r12,%r13,8), %rdx
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rcx
callq 0x1c1c0
testq %rax, %rax
je 0x20699
movq %r14, %rax
cmpq %rbx, %rax
jge 0x206a3
subq $0x1, (%r15,%rax,8)
leaq 0x1(%rax), %rax
jb 0x20689
movq $0x0, -0x60(%rbp)
jmp 0x206ac
movl $0x1, %eax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %r14
movq %r13, %r15
leaq (%r14,%r13,8), %r13
movq 0x10(%rbp), %rdx
subq %r15, %rdx
movq %r13, %rdi
movq -0x48(%rbp), %rsi
callq 0x2f4c6
movq %r14, %rdi
movq -0x80(%rbp), %rsi
movq %r12, %rdx
movq %r15, %rcx
callq 0x1c1c0
subq %rax, (%r13)
jae 0x2071d
cmpq $0x2, %rbx
movl $0x1, %eax
cmovlq %rax, %rbx
movl $0x1, %ecx
movq -0x68(%rbp), %r12
movq -0x50(%rbp), %rdx
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdi
movq -0x60(%rbp), %r8
cmpq %rcx, %rbx
je 0x20733
subq $0x1, (%r13,%rcx,8)
leaq 0x1(%rcx), %rcx
jb 0x20708
xorl %eax, %eax
jmp 0x20733
xorl %eax, %eax
movq -0x68(%rbp), %r12
movq -0x50(%rbp), %rdx
movq -0x30(%rbp), %rsi
movq -0x40(%rbp), %rdi
movq -0x60(%rbp), %r8
orq %rdi, %r8
orq %rax, %r8
movq %r8, %rax
movq -0x58(%rbp), %r14
movq 0x10(%rbp), %rcx
testq %rax, %rax
je 0x20764
subq $0x1, (%r12)
leaq 0x8(%r12), %r12
jb 0x20749
movq %r14, %rdi
movq %r14, %rsi
callq 0x1bfa0
movq -0x30(%rbp), %rsi
testq %rsi, %rsi
sete %al
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x201e9
callq 0x301a3
jmp 0x201e9
movq %r14, %r12
movq -0x58(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r9, %r15
callq 0x2f4c6
movq -0x30(%rbp), %rsi
movq %r15, %rdx
movq 0x10(%rbp), %rcx
cmpq %rcx, %rbx
movq -0x40(%rbp), %rax
je 0x20744
callq 0x66ad
callq 0x667d
leaq -0x38(%rbp), %rdi
movq %r10, %r12
movq %r11, %r15
callq 0x30170
movq %r15, %r11
movq %r12, %r10
movq %rax, %r12
jmp 0x1febd
leaq -0x38(%rbp), %rdi
movq %r10, %r14
movq %r11, %r12
callq 0x30170
movq %r12, %r11
movq %r14, %r10
movq %rax, %r14
jmp 0x2001e
leaq -0x38(%rbp), %rdi
movq %r9, -0x50(%rbp)
movq %rcx, %r13
callq 0x30170
movq %r13, %rcx
movq -0x50(%rbp), %r9
movq %rax, %r13
jmp 0x1ffa0
leaq -0x38(%rbp), %rdi
movq %rdx, %r12
callq 0x30170
movq %r12, %rdx
movq %rax, %r12
jmp 0x1ffdb
leaq -0x38(%rbp), %rdi
movq %r9, %r15
callq 0x30170
movq -0x30(%rbp), %r8
movq %r15, %r9
movq %rax, %r12
jmp 0x20635
addq $-0x2, %r9
cmpq %rcx, %rax
cmovaeq %r9, %rsi
cmpq %rbx, %rdx
cmovbeq %rsi, %r9
jmp 0x20139
leaq -0x38(%rbp), %rdi
movq %r9, %r15
callq 0x30170
movq -0x30(%rbp), %rdx
movq %r15, %r9
movq %rax, %r13
jmp 0x1fdab
leaq -0x38(%rbp), %rdi
callq 0x30170
movq %rax, %r15
jmp 0x1fe06
leaq -0x38(%rbp), %rdi
movq %r10, %r12
movq %r11, %r14
callq 0x30170
movq %r14, %r11
movq %r12, %r10
movq %rax, %r12
jmp 0x200ae
leaq -0x38(%rbp), %rdi
movq %r9, %rbx
movq %rcx, %r14
callq 0x30170
movq %r14, %rcx
movq %rbx, %r9
movq %rax, %r14
jmp 0x20228
callq 0x6694
leaq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x30170
movq %rax, %r10
jmp 0x20464
addq $-0x2, %r9
cmpq %rcx, %rax
cmovaeq %r9, %rsi
cmpq %r12, %rdx
cmovbeq %rsi, %r9
jmp 0x2037c
leaq -0x38(%rbp), %rdi
callq 0x30170
jmp 0x203d0
callq 0x30104
nop