// File: 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
movq %rsp, %rbp
subq $0xa0, %rsp
movq 0x20(%rbp), %rax
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rax
imulq 0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x50(%rbp), %rax
jle 0x57404
movq -0x30(%rbp), %rax
subq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rsi
addq $0x1, %rsi
shlq $0x3, %rsi
leaq -0x58(%rbp), %rdi
callq 0x56430
movq %rax, -0x48(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x50(%rbp), %rax
jle 0x5739f
movl $0x0, -0x6c(%rbp)
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rdx
movq -0x50(%rbp), %rcx
callq 0x36fe0
movq %rax, -0x68(%rbp)
movq -0x50(%rbp), %rax
shlq %rax
shlq $0x3, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x50(%rbp), %rcx
movq -0x60(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
cmpq -0x50(%rbp), %rax
jle 0x5730e
cmpl $0x0, -0x6c(%rbp)
je 0x572c1
movq -0x48(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rcx
callq 0x36fe0
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x572e4
movq -0x48(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rcx
callq 0x36c80
movq %rax, %rcx
movq -0x68(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x68(%rbp)
movl -0x6c(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x6c(%rbp)
movq -0x50(%rbp), %rax
shlq $0x3, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x50(%rbp), %rcx
movq -0x60(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x60(%rbp)
jmp 0x57292
cmpl $0x0, -0x6c(%rbp)
je 0x57337
movq -0x48(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x60(%rbp), %r8
callq 0x36d60
addq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x5735e
movq -0x48(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x60(%rbp), %r8
callq 0x36b60
movq %rax, %rcx
movq -0x68(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jl 0x57380
movq -0x48(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x564f0
movq %rax, -0x68(%rbp)
jmp 0x5739d
movq -0x48(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
subq -0x68(%rbp), %rcx
callq 0x36e60
movq %rax, -0x68(%rbp)
jmp 0x573e0
movq -0x48(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x28(%rbp), %rcx
movq -0x50(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rcx
movq -0x60(%rbp), %r8
callq 0x36d60
movq %rax, -0x68(%rbp)
movq -0x48(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x564f0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdx
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x575d3
movq -0x8(%rbp), %rdx
movq -0x10(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x30(%rbp)
jle 0x5753e
movq 0x10(%rbp), %rax
cmpq -0x30(%rbp), %rax
jg 0x5745d
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jge 0x5745d
movq 0x10(%rbp), %rax
movq %rax, -0x98(%rbp)
jmp 0x57468
movq -0x30(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movq -0x30(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
jmp 0x57484
jmp 0x57486
jmp 0x57488
jmp 0x5748a
jmp 0x5748c
jmp 0x5748e
jmp 0x57490
movq 0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x554c6
jmp 0x574a3
jmp 0x574a5
jmp 0x574a7
jmp 0x574a9
movq -0x20(%rbp), %rax
addq $0x1, %rax
subq -0x40(%rbp), %rax
cmpq $0x0, %rax
je 0x57510
jmp 0x574bd
movq 0x20(%rbp), %rax
movq -0x40(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
subq -0x40(%rbp), %rax
movq %rax, -0x80(%rbp)
jmp 0x574e2
jmp 0x574e4
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 0x574e4
jmp 0x5750e
jmp 0x57510
jmp 0x57512
movq 0x10(%rbp), %rax
shlq $0x3, %rax
addq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq 0x20(%rbp), %rsi
movq -0x38(%rbp), %rdx
imulq 0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x57c90
jmp 0x575ae
jmp 0x57540
jmp 0x57542
jmp 0x57544
movq -0x20(%rbp), %rax
addq $0x1, %rax
cmpq $0x0, %rax
je 0x575aa
jmp 0x57554
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x90(%rbp)
jmp 0x57570
jmp 0x57572
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 0x57572
jmp 0x575a8
jmp 0x575aa
jmp 0x575ac
jmp 0x575ae
movq -0x20(%rbp), %rax
addq $0x1, %rax
shlq $0x3, %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x5740c
jmp 0x575d5
cmpq $0x0, -0x30(%rbp)
sete %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5760f
leaq 0xca52(%rip), %rdi      # 0x64050
movl $0x2cb, %esi            # imm = 0x2CB
leaq 0xca7f(%rip), %rdx      # 0x64089
callq 0x562c0
jmp 0x57611
jmp 0x57613
cmpq $0x0, -0x58(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x5763c
movq -0x58(%rbp), %rdi
callq 0x564a0
jmp 0x5763e
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)