// File: marxn[P]pupp/3rdparty/gmp/mpn/mul_fft.c
// Function: mpn_mul_fft_internal
static mp_limb_t
mpn_mul_fft_internal (mp_ptr op, mp_size_t pl, int k,
		      mp_ptr *Ap, mp_ptr *Bp, mp_ptr A, mp_ptr B,
		      mp_size_t nprime, mp_size_t l, mp_size_t Mp,
		      int **fft_l, mp_ptr T, int sqr)
{
  mp_size_t K, i, pla, lo, sh, j;
  mp_ptr p;
  mp_limb_t cc;

  K = (mp_size_t) 1 << k;

  /* direct fft's */
  mpn_fft_fft (Ap, K, fft_l + k, 2 * Mp, nprime, 1, T);
  if (!sqr)
    mpn_fft_fft (Bp, K, fft_l + k, 2 * Mp, nprime, 1, T);

  /* term to term multiplications */
  mpn_fft_mul_modF_K (Ap, sqr ? Ap : Bp, nprime, K);

  /* inverse fft's */
  mpn_fft_fftinv (Ap, K, 2 * Mp, nprime, T);

  /* division of terms after inverse fft */
  Bp[0] = T + nprime + 1;
  mpn_fft_div_2exp_modF (Bp[0], Ap[0], k, nprime);
  for (i = 1; i < K; i++)
    {
      Bp[i] = Ap[i - 1];
      mpn_fft_div_2exp_modF (Bp[i], Ap[i], k + (K - i) * Mp, nprime);
    }

  /* addition of terms in result p */
  MPN_ZERO (T, nprime + 1);
  pla = l * (K - 1) + nprime + 1; /* number of required limbs for p */
  p = B; /* B has K*(n' + 1) limbs, which is >= pla, i.e. enough */
  MPN_ZERO (p, pla);
  cc = 0; /* will accumulate the (signed) carry at p[pla] */
  for (i = K - 1, lo = l * i + nprime,sh = l * i; i >= 0; i--,lo -= l,sh -= l)
    {
      mp_ptr n = p + sh;

      j = (K - i) & (K - 1);

      if (mpn_add_n (n, n, Bp[j], nprime + 1))
	cc += mpn_add_1 (n + nprime + 1, n + nprime + 1,
			  pla - sh - nprime - 1, CNST_LIMB(1));
      T[2 * l] = i + 1; /* T = (i + 1)*2^(2*M) */
      if (mpn_cmp (Bp[j], T, nprime + 1) > 0)
	{ /* subtract 2^N'+1 */
	  cc -= mpn_sub_1 (n, n, pla - sh, CNST_LIMB(1));
	  cc -= mpn_sub_1 (p + lo, p + lo, pla - lo, CNST_LIMB(1));
	}
    }
  if (cc == -CNST_LIMB(1))
    {
      if ((cc = mpn_add_1 (p + pla - pl, p + pla - pl, pl, CNST_LIMB(1))))
	{
	  /* p[pla-pl]...p[pla-1] are all zero */
	  mpn_sub_1 (p + pla - pl - 1, p + pla - pl - 1, pl + 1, CNST_LIMB(1));
	  mpn_sub_1 (p + pla - 1, p + pla - 1, 1, CNST_LIMB(1));
	}
    }
  else if (cc == 1)
    {
      if (pla >= 2 * pl)
	{
	  while ((cc = mpn_add_1 (p + pla - 2 * pl, p + pla - 2 * pl, 2 * pl, cc)))
	    ;
	}
      else
	{
	  cc = mpn_sub_1 (p + pla - pl, p + pla - pl, pl, cc);
	  ASSERT (cc == 0);
	}
    }
  else
    ASSERT (cc == 0);

  /* here p < 2^(2M) [K 2^(M(K-1)) + (K-1) 2^(M(K-2)) + ... ]
     < K 2^(2M) [2^(M(K-1)) + 2^(M(K-2)) + ... ]
     < K 2^(2M) 2^(M(K-1))*2 = 2^(M*K+M+k+1) */
  return mpn_fft_norm_modF (op, pl, p, pla);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movl 0x40(%rbp), %eax
movq 0x38(%rbp), %rax
movq 0x30(%rbp), %rax
movq 0x28(%rbp), %rax
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl -0x14(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq 0x30(%rbp), %rdx
movslq -0x14(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x28(%rbp), %rcx
shlq %rcx
movq 0x18(%rbp), %r8
movq 0x38(%rbp), %rax
movl $0x1, %r9d
movq %rax, (%rsp)
callq 0x58090
cmpl $0x0, 0x40(%rbp)
jne 0x5770e
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq 0x30(%rbp), %rdx
movslq -0x14(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq 0x28(%rbp), %rcx
shlq %rcx
movq 0x18(%rbp), %r8
movq 0x38(%rbp), %rax
movl $0x1, %r9d
movq %rax, (%rsp)
callq 0x58090
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpl $0x0, 0x40(%rbp)
je 0x5772c
movq -0x20(%rbp), %rax
movq %rax, -0xa8(%rbp)
jmp 0x57737
movq -0x28(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq 0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
callq 0x58320
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq 0x28(%rbp), %rdx
shlq %rdx
movq 0x18(%rbp), %rcx
movq 0x38(%rbp), %r8
callq 0x58ac0
movq 0x38(%rbp), %rcx
movq 0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rcx
addq $0x8, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
movslq -0x14(%rbp), %rdx
movq 0x18(%rbp), %rcx
callq 0x58ce0
movq $0x1, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x57814
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movslq -0x14(%rbp), %rdx
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
imulq 0x28(%rbp), %rax
addq %rax, %rdx
movq 0x18(%rbp), %rcx
callq 0x58ce0
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x577ab
jmp 0x57816
jmp 0x57818
jmp 0x5781a
movq 0x18(%rbp), %rax
addq $0x1, %rax
cmpq $0x0, %rax
je 0x5786e
jmp 0x5782a
movq 0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
movq 0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x57840
jmp 0x57842
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 0x57842
jmp 0x5786c
jmp 0x5786e
jmp 0x57870
movq 0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
imulq %rcx, %rax
addq 0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq 0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x57896
jmp 0x57898
cmpq $0x0, -0x48(%rbp)
je 0x578f3
jmp 0x578a1
movq -0x68(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x578b9
jmp 0x578bb
movq -0x88(%rbp), %rax
movq %rax, %rcx
addq $0x8, %rcx
movq %rcx, -0x88(%rbp)
movq $0x0, (%rax)
movq -0x90(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, %rax
jne 0x578bb
jmp 0x578f1
jmp 0x578f3
jmp 0x578f5
movq $0x0, -0x70(%rbp)
movq -0x38(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x40(%rbp)
movq 0x20(%rbp), %rax
imulq -0x40(%rbp), %rax
addq 0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq 0x20(%rbp), %rax
imulq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x40(%rbp)
jl 0x57ab0
movq -0x68(%rbp), %rax
movq -0x58(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x98(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x28(%rbp), %rax
movq -0x60(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x18(%rbp), %rcx
addq $0x1, %rcx
callq 0x36c80
cmpq $0x0, %rax
je 0x579da
movq -0x98(%rbp), %rdi
movq 0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
addq $0x8, %rdi
movq -0x98(%rbp), %rsi
movq 0x18(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
addq $0x8, %rsi
movq -0x48(%rbp), %rdx
subq -0x58(%rbp), %rdx
subq 0x18(%rbp), %rdx
subq $0x1, %rdx
movl $0x1, %ecx
callq 0x564f0
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rdx
addq $0x1, %rdx
movq 0x38(%rbp), %rax
movq 0x20(%rbp), %rcx
shlq %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
movq -0x60(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x38(%rbp), %rsi
movq 0x18(%rbp), %rdx
addq $0x1, %rdx
callq 0x3b060
cmpl $0x0, %eax
jle 0x57a7f
movq -0x98(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x48(%rbp), %rdx
subq -0x58(%rbp), %rdx
movl $0x1, %ecx
callq 0x36e60
movq %rax, %rcx
movq -0x70(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movq -0x50(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x68(%rbp), %rsi
movq -0x50(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x48(%rbp), %rdx
subq -0x50(%rbp), %rdx
movl $0x1, %ecx
callq 0x36e60
movq %rax, %rcx
movq -0x70(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x70(%rbp)
jmp 0x57a81
movq -0x40(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
movq 0x20(%rbp), %rcx
movq -0x50(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x50(%rbp)
movq 0x20(%rbp), %rcx
movq -0x58(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0x57927
cmpq $-0x1, -0x70(%rbp)
jne 0x57b99
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
xorl %eax, %eax
subq -0x10(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x68(%rbp), %rsi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
xorl %eax, %eax
subq -0x10(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rdx
movl $0x1, %ecx
callq 0x564f0
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
je 0x57b94
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
xorl %eax, %eax
subq -0x10(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
addq $-0x8, %rdi
movq -0x68(%rbp), %rsi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
xorl %eax, %eax
subq -0x10(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
addq $-0x8, %rsi
movq -0x10(%rbp), %rdx
addq $0x1, %rdx
movl $0x1, %ecx
callq 0x36e60
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
addq $-0x8, %rdi
movq -0x68(%rbp), %rsi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
addq $-0x8, %rsi
movl $0x1, %ecx
movq %rcx, %rdx
callq 0x36e60
jmp 0x57c6f
cmpq $0x1, -0x70(%rbp)
jne 0x57c67
movq -0x48(%rbp), %rax
movq -0x10(%rbp), %rcx
shlq %rcx
cmpq %rcx, %rax
jl 0x57c18
jmp 0x57bb6
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x10(%rbp), %rcx
shlq %rcx
xorl %eax, %eax
subq %rcx, %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x68(%rbp), %rsi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rcx
shlq %rcx
xorl %eax, %eax
subq %rcx, %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rdx
shlq %rdx
movq -0x70(%rbp), %rcx
callq 0x564f0
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
je 0x57c16
jmp 0x57bb6
jmp 0x57c65
movq -0x68(%rbp), %rdi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
xorl %eax, %eax
subq -0x10(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq -0x68(%rbp), %rsi
movq -0x48(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
xorl %eax, %eax
subq -0x10(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x10(%rbp), %rdx
movq -0x70(%rbp), %rcx
callq 0x36e60
movq %rax, -0x70(%rbp)
jmp 0x57c63
jmp 0x57c65
jmp 0x57c6d
jmp 0x57c69
jmp 0x57c6b
jmp 0x57c6d
jmp 0x57c6f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x58d40
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax)