// File: marxn[P]pupp/3rdparty/gmp/mpn/toom32_mul.c
// Function: _gmpn_toom32_mul
void
mpn_toom32_mul (mp_ptr pp,
		mp_srcptr ap, mp_size_t an,
		mp_srcptr bp, mp_size_t bn,
		mp_ptr scratch)
{
  mp_size_t n, s, t;
  int vm1_neg;
  mp_limb_t cy;
  mp_limb_signed_t hi;
  mp_limb_t ap1_hi, bp1_hi;

#define a0  ap
#define a1  (ap + n)
#define a2  (ap + 2 * n)
#define b0  bp
#define b1  (bp + n)

  /* Required, to ensure that s + t >= n. */
  ASSERT (bn + 2 <= an && an + 6 <= 3*bn);

  n = 1 + (2 * an >= 3 * bn ? (an - 1) / (size_t) 3 : (bn - 1) >> 1);

  s = an - 2 * n;
  t = bn - n;

  ASSERT (0 < s && s <= n);
  ASSERT (0 < t && t <= n);
  ASSERT (s + t >= n);

  /* Product area of size an + bn = 3*n + s + t >= 4*n + 2. */
#define ap1 (pp)		/* n, most significant limb in ap1_hi */
#define bp1 (pp + n)		/* n, most significant bit in bp1_hi */
#define am1 (pp + 2*n)		/* n, most significant bit in hi */
#define bm1 (pp + 3*n)		/* n */
#define v1 (scratch)		/* 2n + 1 */
#define vm1 (pp)		/* 2n + 1 */
#define scratch_out (scratch + 2*n + 1) /* Currently unused. */

  /* Scratch need: 2*n + 1 + scratch for the recursive multiplications. */

  /* FIXME: Keep v1[2*n] and vm1[2*n] in scalar variables? */

  /* Compute ap1 = a0 + a1 + a3, am1 = a0 - a1 + a3 */
  ap1_hi = mpn_add (ap1, a0, n, a2, s);
#if HAVE_NATIVE_mpn_add_n_sub_n
  if (ap1_hi == 0 && mpn_cmp (ap1, a1, n) < 0)
    {
      ap1_hi = mpn_add_n_sub_n (ap1, am1, a1, ap1, n) >> 1;
      hi = 0;
      vm1_neg = 1;
    }
  else
    {
      cy = mpn_add_n_sub_n (ap1, am1, ap1, a1, n);
      hi = ap1_hi - (cy & 1);
      ap1_hi += (cy >> 1);
      vm1_neg = 0;
    }
#else
  if (ap1_hi == 0 && mpn_cmp (ap1, a1, n) < 0)
    {
      ASSERT_NOCARRY (mpn_sub_n (am1, a1, ap1, n));
      hi = 0;
      vm1_neg = 1;
    }
  else
    {
      hi = ap1_hi - mpn_sub_n (am1, ap1, a1, n);
      vm1_neg = 0;
    }
  ap1_hi += mpn_add_n (ap1, ap1, a1, n);
#endif

  /* Compute bp1 = b0 + b1 and bm1 = b0 - b1. */
  if (t == n)
    {
#if HAVE_NATIVE_mpn_add_n_sub_n
      if (mpn_cmp (b0, b1, n) < 0)
	{
	  cy = mpn_add_n_sub_n (bp1, bm1, b1, b0, n);
	  vm1_neg ^= 1;
	}
      else
	{
	  cy = mpn_add_n_sub_n (bp1, bm1, b0, b1, n);
	}
      bp1_hi = cy >> 1;
#else
      bp1_hi = mpn_add_n (bp1, b0, b1, n);

      if (mpn_cmp (b0, b1, n) < 0)
	{
	  ASSERT_NOCARRY (mpn_sub_n (bm1, b1, b0, n));
	  vm1_neg ^= 1;
	}
      else
	{
	  ASSERT_NOCARRY (mpn_sub_n (bm1, b0, b1, n));
	}
#endif
    }
  else
    {
      /* FIXME: Should still use mpn_add_n_sub_n for the main part. */
      bp1_hi = mpn_add (bp1, b0, n, b1, t);

      if (mpn_zero_p (b0 + t, n - t) && mpn_cmp (b0, b1, t) < 0)
	{
	  ASSERT_NOCARRY (mpn_sub_n (bm1, b1, b0, t));
	  MPN_ZERO (bm1 + t, n - t);
	  vm1_neg ^= 1;
	}
      else
	{
	  ASSERT_NOCARRY (mpn_sub (bm1, b0, n, b1, t));
	}
    }

  TOOM32_MUL_N_REC (v1, ap1, bp1, n, scratch_out);
  if (ap1_hi == 1)
    {
      cy = bp1_hi + mpn_add_n (v1 + n, v1 + n, bp1, n);
    }
  else if (ap1_hi == 2)
    {
#if HAVE_NATIVE_mpn_addlsh1_n
      cy = 2 * bp1_hi + mpn_addlsh1_n (v1 + n, v1 + n, bp1, n);
#else
      cy = 2 * bp1_hi + mpn_addmul_1 (v1 + n, bp1, n, CNST_LIMB(2));
#endif
    }
  else
    cy = 0;
  if (bp1_hi != 0)
    cy += mpn_add_n (v1 + n, v1 + n, ap1, n);
  v1[2 * n] = cy;

  TOOM32_MUL_N_REC (vm1, am1, bm1, n, scratch_out);
  if (hi)
    hi = mpn_add_n (vm1+n, vm1+n, bm1, n);

  vm1[2*n] = hi;

  /* v1 <-- (v1 + vm1) / 2 = x0 + x2 */
  if (vm1_neg)
    {
#if HAVE_NATIVE_mpn_rsh1sub_n
      mpn_rsh1sub_n (v1, v1, vm1, 2*n+1);
#else
      mpn_sub_n (v1, v1, vm1, 2*n+1);
      ASSERT_NOCARRY (mpn_rshift (v1, v1, 2*n+1, 1));
#endif
    }
  else
    {
#if HAVE_NATIVE_mpn_rsh1add_n
      mpn_rsh1add_n (v1, v1, vm1, 2*n+1);
#else
      mpn_add_n (v1, v1, vm1, 2*n+1);
      ASSERT_NOCARRY (mpn_rshift (v1, v1, 2*n+1, 1));
#endif
    }

  /* We get x1 + x3 = (x0 + x2) - (x0 - x1 + x2 - x3), and hence

     y = x1 + x3 + (x0 + x2) * B
       = (x0 + x2) * B + (x0 + x2) - vm1.

     y is 3*n + 1 limbs, y = y0 + y1 B + y2 B^2. We store them as
     follows: y0 at scratch, y1 at pp + 2*n, and y2 at scratch + n
     (already in place, except for carry propagation).

     We thus add

   B^3  B^2   B    1
    |    |    |    |
   +-----+----+
 + |  x0 + x2 |
   +----+-----+----+
 +      |  x0 + x2 |
	+----------+
 -      |  vm1     |
 --+----++----+----+-
   | y2  | y1 | y0 |
   +-----+----+----+

  Since we store y0 at the same location as the low half of x0 + x2, we
  need to do the middle sum first. */

  hi = vm1[2*n];
  cy = mpn_add_n (pp + 2*n, v1, v1 + n, n);
  MPN_INCR_U (v1 + n, n + 1, cy + v1[2*n]);

  /* FIXME: Can we get rid of this second vm1_neg conditional by
     swapping the location of +1 and -1 values? */
  if (vm1_neg)
    {
      cy = mpn_add_n (v1, v1, vm1, n);
      hi += mpn_add_nc (pp + 2*n, pp + 2*n, vm1 + n, n, cy);
      MPN_INCR_U (v1 + n, n+1, hi);
    }
  else
    {
      cy = mpn_sub_n (v1, v1, vm1, n);
      hi += mpn_sub_nc (pp + 2*n, pp + 2*n, vm1 + n, n, cy);
      MPN_DECR_U (v1 + n, n+1, hi);
    }

  TOOM32_MUL_N_REC (pp, a0, b0, n, scratch_out);
  /* vinf, s+t limbs.  Use mpn_mul for now, to handle unbalanced operands */
  if (s > t)  mpn_mul (pp+3*n, a2, s, b1, t);
  else        mpn_mul (pp+3*n, b1, t, a2, s);

  /* Remaining interpolation.

     y * B + x0 + x3 B^3 - x0 B^2 - x3 B
     = (x1 + x3) B + (x0 + x2) B^2 + x0 + x3 B^3 - x0 B^2 - x3 B
     = y0 B + y1 B^2 + y3 B^3 + Lx0 + H x0 B
       + L x3 B^3 + H x3 B^4 - Lx0 B^2 - H x0 B^3 - L x3 B - H x3 B^2
     = L x0 + (y0 + H x0 - L x3) B + (y1 - L x0 - H x3) B^2
       + (y2 - (H x0 - L x3)) B^3 + H x3 B^4

	  B^4       B^3       B^2        B         1
 |         |         |         |         |         |
   +-------+                   +---------+---------+
   |  Hx3  |                   | Hx0-Lx3 |    Lx0  |
   +------+----------+---------+---------+---------+
	  |    y2    |  y1     |   y0    |
	  ++---------+---------+---------+
	  -| Hx0-Lx3 | - Lx0   |
	   +---------+---------+
		      | - Hx3  |
		      +--------+

    We must take into account the carry from Hx0 - Lx3.
  */

  cy = mpn_sub_n (pp + n, pp + n, pp+3*n, n);
  hi = scratch[2*n] + cy;

  cy = mpn_sub_nc (pp + 2*n, pp + 2*n, pp, n, cy);
  hi -= mpn_sub_nc (pp + 3*n, scratch + n, pp + n, n, cy);

  hi += mpn_add (pp + n, pp + n, 3*n, scratch, n);

  /* FIXME: Is support for s + t == n needed? */
  if (LIKELY (s + t > n))
    {
      hi -= mpn_sub (pp + 2*n, pp + 2*n, 2*n, pp + 4*n, s+t-n);

      if (hi < 0)
	MPN_DECR_U (pp + 4*n, s+t-n, -hi);
      else
	MPN_INCR_U (pp + 4*n, s+t-n, hi);
    }
  else
    ASSERT (hi == 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
jmp 0x3efc5
movq -0x18(%rbp), %rax
shlq %rax
imulq $0x3, -0x28(%rbp), %rcx
cmpq %rcx, %rax
jl 0x3eff1
movq -0x18(%rbp), %rax
subq $0x1, %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xb0(%rbp)
jmp 0x3f003
movq -0x28(%rbp), %rax
subq $0x1, %rax
sarq %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq %rcx
subq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
subq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x3f032
jmp 0x3f034
jmp 0x3f036
jmp 0x3f038
jmp 0x3f03a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x40(%rbp), %r8
callq 0x36b60
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x3f0cc
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x38(%rbp), %rdx
callq 0x3b060
cmpl $0x0, %eax
jge 0x3f0cc
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x36fe0
movq $0x0, -0x60(%rbp)
movl $0x1, -0x4c(%rbp)
jmp 0x3f11d
movq -0x68(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x36fe0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x36c80
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x3f20b
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x36c80
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x38(%rbp), %rdx
callq 0x3b060
cmpl $0x0, %eax
jge 0x3f1da
movq -0x8(%rbp), %rdi
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x36fe0
movl -0x4c(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3f206
movq -0x8(%rbp), %rdi
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x36fe0
jmp 0x3f362
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x48(%rbp), %r8
callq 0x36b60
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x38(%rbp), %rsi
subq -0x48(%rbp), %rsi
callq 0x590e0
cmpl $0x0, %eax
je 0x3f330
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x48(%rbp), %rdx
callq 0x3b060
cmpl $0x0, %eax
jge 0x3f330
movq -0x8(%rbp), %rdi
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x36fe0
jmp 0x3f2b6
jmp 0x3f2b8
movq -0x38(%rbp), %rax
subq -0x48(%rbp), %rax
cmpq $0x0, %rax
je 0x3f323
jmp 0x3f2c8
movq -0x8(%rbp), %rax
imulq $0x3, -0x38(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq -0x48(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x38(%rbp), %rax
subq -0x48(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x3f2f5
jmp 0x3f2f7
movq -0x78(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x78(%rbp)
movq $0x0, (%rax)
movq -0x80(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, %rax
jne 0x3f2f7
jmp 0x3f321
jmp 0x3f323
jmp 0x3f325
movl -0x4c(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x3f360
movq -0x8(%rbp), %rdi
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x48(%rbp), %r8
callq 0x36d60
jmp 0x3f362
jmp 0x3f364
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x39000
cmpq $0x1, -0x68(%rbp)
jne 0x3f3df
movq -0x70(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x36c80
movq %rax, %rcx
movq -0xc0(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0x3f447
cmpq $0x2, -0x68(%rbp)
jne 0x3f43d
movq -0x70(%rbp), %rax
shlq %rax
movq %rax, -0xc8(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x555c0
movq %rax, %rcx
movq -0xc8(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0x3f445
movq $0x0, -0x58(%rbp)
jmp 0x3f447
cmpq $0x0, -0x70(%rbp)
je 0x3f481
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x36c80
addq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdx
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x39000
cmpq $0x0, -0x60(%rbp)
je 0x3f505
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x36c80
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq %rcx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x4c(%rbp)
je 0x3f53c
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rcx
shlq %rcx
addq $0x1, %rcx
callq 0x55a30
jmp 0x3f558
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rcx
shlq %rcx
addq $0x1, %rcx
callq 0x558f0
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x36c80
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq -0x58(%rbp), %rcx
movq -0x30(%rbp), %rdx
movq -0x38(%rbp), %rsi
shlq %rsi
addq (%rdx,%rsi,8), %rcx
addq %rcx, (%rax)
jae 0x3f5cf
addq $0x1, 0x8(%rax)
leaq 0x8(%rax), %rax
jb 0x3f5c4
movq %rax, -0x88(%rbp)
jmp 0x3f5d8
jmp 0x3f5da
cmpl $0x0, -0x4c(%rbp)
je 0x3f678
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x36c80
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %r8
callq 0x36c60
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq -0x60(%rbp), %rcx
addq %rcx, (%rax)
jae 0x3f668
addq $0x1, 0x8(%rax)
leaq 0x8(%rax), %rax
jb 0x3f65d
movq %rax, -0x90(%rbp)
jmp 0x3f671
jmp 0x3f673
jmp 0x3f709
movq -0x30(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x36fe0
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %r8
callq 0x36fc0
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq -0x60(%rbp), %rcx
subq %rcx, (%rax)
jae 0x3f6fc
subq $0x1, 0x8(%rax)
leaq 0x8(%rax), %rax
jb 0x3f6f1
movq %rax, -0x98(%rbp)
jmp 0x3f705
jmp 0x3f707
jmp 0x3f709
jmp 0x3f70b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x39000
movq -0x40(%rbp), %rax
cmpq -0x48(%rbp), %rax
jle 0x3f76a
movq -0x8(%rbp), %rdi
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x40(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x48(%rbp), %r8
callq 0x37f00
jmp 0x3f7a8
movq -0x8(%rbp), %rdi
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x48(%rbp), %rdx
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x40(%rbp), %r8
callq 0x37f00
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
callq 0x36fe0
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq %rcx
movq (%rax,%rcx,8), %rax
addq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %r8
callq 0x36fc0
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
imulq $0x3, -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x8(%rbp), %rdx
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x38(%rbp), %rcx
movq -0x58(%rbp), %r8
callq 0x36fc0
movq %rax, %rcx
movq -0x60(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
imulq $0x3, -0x38(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
callq 0x36b60
addq -0x60(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rax
addq -0x48(%rbp), %rax
cmpq -0x38(%rbp), %rax
setg %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3f9b3
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movq -0x38(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x38(%rbp), %rdx
shlq %rdx
movq -0x8(%rbp), %rcx
movq -0x38(%rbp), %rax
shlq $0x2, %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x40(%rbp), %r8
addq -0x48(%rbp), %r8
subq -0x38(%rbp), %r8
callq 0x36d60
movq %rax, %rcx
movq -0x60(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jge 0x3f97b
jmp 0x3f945
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x2, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
xorl %ecx, %ecx
subq -0x60(%rbp), %rcx
subq %rcx, (%rax)
jae 0x3f96e
subq $0x1, 0x8(%rax)
leaq 0x8(%rax), %rax
jb 0x3f963
movq %rax, -0xa0(%rbp)
jmp 0x3f977
jmp 0x3f979
jmp 0x3f9b1
jmp 0x3f97d
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x2, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq -0x60(%rbp), %rcx
addq %rcx, (%rax)
jae 0x3f9a4
addq $0x1, 0x8(%rax)
leaq 0x8(%rax), %rax
jb 0x3f999
movq %rax, -0xa8(%rbp)
jmp 0x3f9ad
jmp 0x3f9af
jmp 0x3f9b1
jmp 0x3f9b9
jmp 0x3f9b5
jmp 0x3f9b7
jmp 0x3f9b9
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)