// File: /workspace/github_cpp_makefile_star2_O3/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 %rcx, 0x20(%rsp)
movq %rdx, %rbx
movq %rsi, 0x40(%rsp)
movq %rdi, %r15
movq 0x80(%rsp), %rax
imulq %rdx, %rax
movq $0x0, 0x30(%rsp)
movq %r9, %rbp
subq %rax, %rbp
jle 0x30807
movq %r8, %r12
movq %r15, 0x18(%rsp)
leaq 0x8(,%rax,8), %rsi
leaq 0x30(%rsp), %rdi
movq %rax, %r13
callq 0x2fdb0
movq %r13, %rcx
movq %rax, %r14
movq %rbp, %r15
subq %r13, %r15
movq %rax, 0x8(%rsp)
jle 0x30814
movq %rbx, 0x10(%rsp)
leaq (%r12,%rcx,8), %rdx
movq %r14, %rdi
movq %r12, %rsi
callq 0x1bca0
movq %r13, %rcx
movq %rax, %rbx
movq %r13, %rbp
shlq $0x4, %rbp
addq %r12, %rbp
cmpq %r13, %r15
jle 0x30871
xorl %eax, %eax
testl %eax, %eax
je 0x307da
movl %eax, %r14d
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
movq %rbp, %rdx
callq 0x1bca0
movq %r13, %rcx
addq %rax, %rbx
movl %r14d, %eax
xorl $0x1, %eax
leaq (%rbp,%r13,8), %rbp
subq %r13, %r15
cmpq %r13, %r15
jg 0x307a5
jmp 0x3086b
movq 0x8(%rsp), %rdi
movq %rdi, %rsi
movq %rbp, %rdx
callq 0x1ba80
movq %r13, %rcx
subq %rax, %rbx
leaq (%rbp,%r13,8), %rbp
subq %r13, %r15
movl $0x1, %eax
cmpq %r13, %r15
jg 0x307a5
jmp 0x308b2
movq %r9, %r14
movq %r8, 0x8(%rsp)
jmp 0x30a12
testq %rbp, %rbp
je 0x3085f
movq %r12, %rsi
leaq (%r12,%rcx,8), %rdx
movq %r14, %rdi
movq %rbp, %rcx
callq 0x1bca0
testq %rax, %rax
movq 0x18(%rsp), %r15
je 0x308fc
movq %r13, %rcx
cmpq %rcx, %rbp
jge 0x30940
movq (%r12,%rbp,8), %rdx
leaq 0x1(%rbp), %rax
subq $0x1, %rdx
movq %rdx, (%r14,%rbp,8)
movq %rax, %rbp
jb 0x3083c
jmp 0x30902
xorl %eax, %eax
movq 0x18(%rsp), %r15
jmp 0x30902
cmpl $0x1, %r14d
jne 0x308b2
testq %r15, %r15
je 0x308f0
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x1ba80
testq %rax, %rax
je 0x30939
xorl %eax, %eax
movq %r13, %rcx
cmpq %rcx, %r15
jge 0x30975
incq (%r14,%r15,8)
leaq 0x1(%r15), %r15
je 0x3089a
jmp 0x30983
testq %r15, %r15
je 0x308f0
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x1bca0
testq %rax, %rax
je 0x30939
xorl %eax, %eax
movq %r13, %rcx
cmpq %rcx, %r15
jge 0x3097e
subq $0x1, (%r14,%r15,8)
leaq 0x1(%r15), %r15
jb 0x308d7
jmp 0x30983
xorl %eax, %eax
movq 0x8(%rsp), %r14
jmp 0x30983
movq %rbp, %rax
movq %r13, %rcx
cmpq %r12, %r14
setne %dil
movq %rcx, %rdx
subq %rax, %rdx
setg %sil
andb %dil, %sil
cmpb $0x1, %sil
jne 0x309fd
leaq (%r14,%rax,8), %rdi
leaq (%r12,%rax,8), %rsi
shlq $0x3, %rdx
callq 0x6200
movq %r13, %rcx
jmp 0x309fd
xorl %eax, %eax
movq %r13, %rcx
jmp 0x30983
incq (%r14)
jne 0x309fd
cmpq $0x2, %rcx
movl $0x1, %esi
cmovgeq %rcx, %rsi
xorl %eax, %eax
movl $0x1, %edx
cmpq %rdx, %rsi
je 0x30b24
incq (%r14,%rdx,8)
leaq 0x1(%rdx), %rdx
je 0x3095d
jmp 0x30a08
movq $-0x1, %rax
jmp 0x30983
movl $0x1, %eax
addq %rax, %rbx
movq 0x18(%rsp), %r15
js 0x309bf
addq %rbx, (%r14)
jae 0x30a01
cmpq $0x2, %rcx
movl $0x1, %eax
movl $0x1, %esi
cmovgeq %rcx, %rsi
movl $0x1, %edx
movq 0x10(%rsp), %rbx
cmpq %rdx, %rsi
je 0x30a08
incq (%r14,%rdx,8)
leaq 0x1(%rdx), %rdx
je 0x309ae
jmp 0x309fd
movq (%r14), %rax
leaq (%rax,%rbx), %rdx
negq %rbx
movq %rdx, (%r14)
cmpq %rbx, %rax
jae 0x30a01
cmpq $0x2, %rcx
movl $0x1, %eax
movl $0x1, %esi
cmovgeq %rcx, %rsi
movl $0x1, %edx
movq 0x10(%rsp), %rbx
cmpq %rdx, %rsi
je 0x30a08
subq $0x1, (%r14,%rdx,8)
leaq 0x1(%rdx), %rdx
jb 0x309ed
xorl %eax, %eax
jmp 0x30a08
xorl %eax, %eax
movq 0x10(%rsp), %rbx
movq %rax, (%r14,%rcx,8)
incq %rcx
movq %rcx, %r14
testq %rbx, %rbx
jle 0x30b06
movq 0x90(%rsp), %r12
movq 0x20(%rsp), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x28(%rsp)
leaq -0x1(%rbx), %rcx
movq %rcx, 0x38(%rsp)
leaq 0x8(,%rax,8), %rax
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
movq %rbx, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq %r15, (%rax,%r13,8)
testq %r14, %r14
jle 0x30ad6
cmpq 0x38(%rsp), %r13
movq %r14, %rbx
movq 0x80(%rsp), %rax
cmovlq %rax, %rbx
cmpq %rax, %r14
cmovlq %r14, %rbx
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x2f106
movq 0x28(%rsp), %rdx
subq %rbx, %rdx
je 0x30aa3
leaq (%r12,%rbx,8), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x6170
subq %rbx, %r14
movq 0x80(%rsp), %rax
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,8), %rcx
movq %rcx, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq 0x20(%rsp), %rcx
callq 0x319c2
movq 0x10(%rsp), %rbx
jmp 0x30aed
cmpq $0x0, 0x28(%rsp)
je 0x30aed
movq %r15, %rdi
xorl %esi, %esi
movq 0x18(%rsp), %rdx
callq 0x6170
incq %r13
addq 0x18(%rsp), %r15
addq 0x88(%rsp), %rbp
cmpq %r13, %rbx
jne 0x30a51
testq %r14, %r14
jne 0x30b2e
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
jne 0x30b33
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
jmp 0x30a08
callq 0x752f
callq 0x2fde3
jmp 0x30b15