// File: /workspace/github_cpp_makefile_star2_O2/marxn[P]pupp/3rdparty/gmp/mpn/mul_fft.c
// Function: mpn_mul_fft_decompose
static void
mpn_mul_fft_decompose (mp_ptr A, mp_ptr *Ap, mp_size_t K, mp_size_t nprime,
		       mp_srcptr n, mp_size_t nl, mp_size_t l, mp_size_t Mp,
		       mp_ptr T)
{
  mp_size_t i, j;
  mp_ptr tmp;
  mp_size_t Kl = K * l;
  TMP_DECL;
  TMP_MARK;

  if (nl > Kl) /* normalize {n, nl} mod 2^(Kl*GMP_NUMB_BITS)+1 */
    {
      mp_size_t dif = nl - Kl;
      mp_limb_signed_t cy;

      tmp = TMP_BALLOC_LIMBS(Kl + 1);

      if (dif > Kl)
	{
	  int subp = 0;

	  cy = mpn_sub_n (tmp, n, n + Kl, Kl);
	  n += 2 * Kl;
	  dif -= Kl;

	  /* now dif > 0 */
	  while (dif > Kl)
	    {
	      if (subp)
		cy += mpn_sub_n (tmp, tmp, n, Kl);
	      else
		cy -= mpn_add_n (tmp, tmp, n, Kl);
	      subp ^= 1;
	      n += Kl;
	      dif -= Kl;
	    }
	  /* now dif <= Kl */
	  if (subp)
	    cy += mpn_sub (tmp, tmp, Kl, n, dif);
	  else
	    cy -= mpn_add (tmp, tmp, Kl, n, dif);
	  if (cy >= 0)
	    cy = mpn_add_1 (tmp, tmp, Kl, cy);
	  else
	    cy = mpn_sub_1 (tmp, tmp, Kl, -cy);
	}
      else /* dif <= Kl, i.e. nl <= 2 * Kl */
	{
	  cy = mpn_sub (tmp, n, Kl, n + Kl, dif);
	  cy = mpn_add_1 (tmp, tmp, Kl, cy);
	}
      tmp[Kl] = cy;
      nl = Kl + 1;
      n = tmp;
    }
  for (i = 0; i < K; i++)
    {
      Ap[i] = A;
      /* store the next M bits of n into A[0..nprime] */
      if (nl > 0) /* nl is the number of remaining limbs */
	{
	  j = (l <= nl && i < K - 1) ? l : nl; /* store j next limbs */
	  nl -= j;
	  MPN_COPY (T, n, j);
	  MPN_ZERO (T + j, nprime + 1 - j);
	  n += l;
	  mpn_fft_mul_2exp_modF (A, T, i * Mp, nprime);
	}
      else
	MPN_ZERO (A, nprime + 1);
      A += nprime + 1;
    }
  ASSERT_ALWAYS (nl == 0);
  TMP_FREE;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r8, %r13
movq %rcx, 0x20(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdi, %r12
movq 0x80(%rsp), %rax
andq $0x0, 0x28(%rsp)
movq %rdx, 0x18(%rsp)
imulq %rdx, %rax
movq %r9, %r14
subq %rax, %r14
jle 0x2a7bb
movq %r9, %rbx
leaq 0x8(,%rax,8), %rsi
leaq 0x28(%rsp), %rdi
movq %rax, %r15
callq 0x29dc0
movq %rax, %rbp
leaq (,%r15,8), %rcx
addq %r13, %rcx
cmpq %r15, %r14
jle 0x2a7c3
movq %rbp, 0x8(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
movq %rcx, %rdx
movq %r15, %rcx
callq 0x17ed0
movq %rax, %r14
movq %r15, %rbp
shlq $0x4, %rbp
addq %r13, %rbp
leaq (,%r15,8), %rcx
movq %rbx, %r8
subq %r15, %r8
subq %r15, %r8
xorl %r13d, %r13d
movq %r8, %rbx
movq %r15, %rax
movq %rcx, %r15
movq %rax, 0x10(%rsp)
subq %rax, %rbx
jle 0x2a7e2
testl %r13d, %r13d
je 0x2a794
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x17ed0
addq %rax, %r14
jmp 0x2a7aa
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
movq %rbp, %rdx
movq %rax, %rcx
callq 0x17cf0
subq %rax, %r14
xorl $0x1, %r13d
addq %r15, %rbp
movq %rbx, %r8
movq 0x10(%rsp), %rax
jmp 0x2a772
movq %r13, %rbp
jmp 0x2a847
movq %rbp, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %r8
callq 0x17dc8
movq %rbp, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq %rax, %rcx
jmp 0x2a837
testl %r13d, %r13d
je 0x2a802
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
movq %rax, %rdx
movq %rbp, %rcx
callq 0x17dc8
movq %rax, %rcx
addq %r14, %rcx
jmp 0x2a81b
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
movq %rax, %rdx
movq %rbp, %rcx
callq 0x17c54
subq %rax, %r14
movq %r14, %rcx
testq %rcx, %rcx
js 0x2a989
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %rbp, %rsi
movq 0x10(%rsp), %r15
movq %r15, %rdx
callq 0x29e1c
movq %rax, (%rbp,%r15,8)
incq %r15
movq %r15, %r9
movq 0x90(%rsp), %rbx
movq 0x20(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rsp), %rcx
leaq -0x1(%rcx), %rdx
movq %rdx, 0x38(%rsp)
leaq 0x8(,%rax,8), %r15
xorl %edx, %edx
testq %rcx, %rcx
cmovleq %rdx, %rcx
movq %rcx, 0x18(%rsp)
xorl %r13d, %r13d
movq %r15, 0x30(%rsp)
cmpq %r13, 0x18(%rsp)
je 0x2a96b
movq 0x40(%rsp), %rax
movq %r12, (%rax,%r13,8)
testq %r9, %r9
jle 0x2a92d
movq %rdx, 0x8(%rsp)
movq %r12, %r15
cmpq 0x38(%rsp), %r13
movq %rbp, %rsi
movq %r9, %rbp
movq 0x80(%rsp), %rax
cmovlq %rax, %rbp
cmpq %rax, %r9
movq %r9, %r14
cmovlq %r9, %rbp
movq %rbx, %rdi
movq %rsi, %r12
movq %rbp, %rdx
callq 0x290c6
movq 0x10(%rsp), %rdx
subq %rbp, %rdx
je 0x2a8f6
leaq (%rbx,%rbp,8), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x6170
subq %rbp, %r14
movq 0x80(%rsp), %rax
leaq (%r12,%rax,8), %rbp
movq %r15, %r12
movq %r15, %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %r15
movq %r15, %rdx
movq 0x20(%rsp), %rcx
callq 0x2b34f
movq %r15, %rdx
movq %r14, %r9
movq 0x30(%rsp), %r15
jmp 0x2a958
cmpq $0x0, 0x10(%rsp)
je 0x2a958
movq %r12, %rdi
xorl %esi, %esi
movq %rbp, 0x8(%rsp)
movq %rdx, %rbp
movq %r15, %rdx
movq %r9, %r14
callq 0x6170
movq %rbp, %rdx
movq 0x8(%rsp), %rbp
movq %r14, %r9
incq %r13
addq 0x88(%rsp), %rdx
addq %r15, %r12
jmp 0x2a889
testq %r9, %r9
jne 0x2a9a9
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
jne 0x2a9c1
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
negq %rcx
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %rbp, %rsi
movq 0x10(%rsp), %r15
movq %r15, %rdx
callq 0x17e44
jmp 0x2a83c
leaq 0x9560(%rip), %rdi      # 0x33f10
leaq 0x9592(%rip), %rdx      # 0x33f49
movl $0x2cb, %esi            # imm = 0x2CB
callq 0x29ce6
callq 0x29df3
jmp 0x2a97a