// File: /workspace/github_cpp_makefile_star2_O1/marxn[P]pupp/3rdparty/gmp/mpn/mul_fft.c
// Function: mpn_fft_fft
static void
mpn_fft_fft (mp_ptr *Ap, mp_size_t K, int **ll,
	     mp_size_t omega, mp_size_t n, mp_size_t inc, mp_ptr tp)
{
  if (K == 2)
    {
      mp_limb_t cy;
#if HAVE_NATIVE_mpn_add_n_sub_n
      cy = mpn_add_n_sub_n (Ap[0], Ap[inc], Ap[0], Ap[inc], n + 1) & 1;
#else
      MPN_COPY (tp, Ap[0], n + 1);
      mpn_add_n (Ap[0], Ap[0], Ap[inc], n + 1);
      cy = mpn_sub_n (Ap[inc], tp, Ap[inc], n + 1);
#endif
      if (Ap[0][n] > 1) /* can be 2 or 3 */
	Ap[0][n] = 1 - mpn_sub_1 (Ap[0], Ap[0], n, Ap[0][n] - 1);
      if (cy) /* Ap[inc][n] can be -1 or -2 */
	Ap[inc][n] = mpn_add_1 (Ap[inc], Ap[inc], n, ~Ap[inc][n] + 1);
    }
  else
    {
      mp_size_t j, K2 = K >> 1;
      int *lk = *ll;

      mpn_fft_fft (Ap,     K2, ll-1, 2 * omega, n, inc * 2, tp);
      mpn_fft_fft (Ap+inc, K2, ll-1, 2 * omega, n, inc * 2, tp);
      /* A[2*j*inc]   <- A[2*j*inc] + omega^l[k][2*j*inc] A[(2j+1)inc]
	 A[(2j+1)inc] <- A[2*j*inc] + omega^l[k][(2j+1)inc] A[(2j+1)inc] */
      for (j = 0; j < K2; j++, lk += 2, Ap += 2 * inc)
	{
	  /* Ap[inc] <- Ap[0] + Ap[inc] * 2^(lk[1] * omega)
	     Ap[0]   <- Ap[0] + Ap[inc] * 2^(lk[0] * omega) */
	  mpn_fft_mul_2exp_modF (tp, Ap[inc], lk[0] * omega, n);
	  mpn_fft_sub_modF (Ap[inc], Ap[0], tp, n);
	  mpn_fft_add_modF (Ap[0],   Ap[0], tp, n);
	}
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r14
movq %r8, %rbx
movq %rdi, %r15
movq 0x70(%rsp), %r12
cmpq $0x2, %rsi
jne 0x32129
movq (%r15), %rsi
leaq 0x1(%rbx), %r13
movq %r12, %rdi
movq %r13, %rdx
callq 0x2f4c6
movq (%r15), %rdi
movq (%r15,%r14,8), %rdx
movq %rdi, %rsi
movq %r13, %rcx
callq 0x1bfa0
movq (%r15,%r14,8), %rdi
movq %r12, %rsi
movq %rdi, %rdx
movq %r13, %rcx
callq 0x1c1c0
movq (%r15), %rcx
movq (%rcx,%rbx,8), %rsi
cmpq $0x2, %rsi
jb 0x320d6
decq %rsi
movl $0x1, %edx
subq %rsi, (%rcx)
jae 0x320d2
cmpq $0x2, %rbx
movl $0x1, %edi
movl $0x1, %esi
cmovgeq %rbx, %rsi
xorl %edx, %edx
cmpq %rdi, %rsi
je 0x320d2
subq $0x1, (%rcx,%rdi,8)
leaq 0x1(%rdi), %rdi
jb 0x320bd
movl $0x1, %edx
movq %rdx, (%rcx,%rbx,8)
testq %rax, %rax
je 0x32277
movq (%r15,%r14,8), %rax
movq (%rax,%rbx,8), %rcx
movq (%rax), %rdx
subq %rcx, %rdx
negq %rcx
movq %rdx, (%rax)
cmpq %rcx, %rdx
jae 0x3211e
cmpq $0x2, %rbx
movl $0x1, %ecx
movl $0x1, %edx
cmovgeq %rbx, %rdx
movl $0x1, %esi
cmpq %rsi, %rdx
je 0x32120
incq (%rax,%rsi,8)
leaq 0x1(%rsi), %rsi
je 0x3210f
xorl %ecx, %ecx
movq %rcx, (%rax,%rbx,8)
jmp 0x32277
movq %rsi, %rbp
sarq %rbp
movq (%rdx), %rax
movq %rax, 0x28(%rsp)
addq $-0x8, %rdx
movq %rcx, 0x30(%rsp)
addq %rcx, %rcx
movq %rcx, 0x8(%rsp)
leaq (%r14,%r14), %r9
movq %r9, 0x10(%rsp)
movq %r12, (%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %rdx, %r13
movq %rbx, %r8
callq 0x32033
leaq (%r15,%r14,8), %rdi
movq %r12, (%rsp)
movq %rbp, %rsi
movq %r13, %rdx
movq 0x8(%rsp), %rcx
movq %rbx, %r8
movq 0x10(%rsp), %r9
callq 0x32033
movq %rbp, 0x8(%rsp)
testq %rbp, %rbp
jle 0x32277
movq %r14, %rax
shlq $0x4, %rax
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
movq %r14, 0x20(%rsp)
movq %r15, 0x10(%rsp)
movq (%r15,%r14,8), %rsi
movq 0x28(%rsp), %rax
movslq (%rax,%rbp,8), %rdx
imulq 0x30(%rsp), %rdx
movq %r12, %rdi
movq %rbx, %rcx
callq 0x31d86
movq (%r15,%r14,8), %r13
movq (%r15), %rsi
movq (%rsi,%rbx,8), %r14
movq (%r12,%rbx,8), %r15
movq %r13, %rdi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1c1c0
addq %r15, %rax
movq 0x10(%rsp), %r15
subq %rax, %r14
movq %r14, %rax
negq %rax
movq %r14, %rcx
sarq $0x3f, %rcx
andq %rax, %rcx
addq %rcx, %r14
movq %r14, (%r13,%rbx,8)
addq %rcx, (%r13)
jae 0x3221b
addq $0x1, 0x8(%r13)
leaq 0x8(%r13), %r13
jb 0x32210
movq (%r15), %r13
movq (%r12,%rbx,8), %r14
addq (%r13,%rbx,8), %r14
movq %r13, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1bfa0
addq %r14, %rax
movq %rax, %rcx
subq $0x1, %rcx
jae 0x32246
xorl %ecx, %ecx
subq %rcx, %rax
movq %rax, (%r13,%rbx,8)
subq %rcx, (%r13)
jae 0x3225f
subq $0x1, 0x8(%r13)
leaq 0x8(%r13), %r13
jb 0x32254
incq %rbp
addq 0x18(%rsp), %r15
cmpq %rbp, 0x8(%rsp)
movq 0x20(%rsp), %r14
jne 0x321a7
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq