// File: /workspace/github_cpp_makefile_star2_O3/marxn[P]pupp/3rdparty/gmp/mpn/mul_n.c
// Function: _gmpn_mul_n
void
mpn_mul_n (mp_ptr p, mp_srcptr a, mp_srcptr b, mp_size_t n)
{
  ASSERT (n >= 1);
  ASSERT (! MPN_OVERLAP_P (p, 2 * n, a, n));
  ASSERT (! MPN_OVERLAP_P (p, 2 * n, b, n));

  if (BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD))
    {
      mpn_mul_basecase (p, a, n, b, n);
    }
  else if (BELOW_THRESHOLD (n, MUL_TOOM33_THRESHOLD))
    {
      /* Allocate workspace of fixed size on stack: fast! */
      mp_limb_t ws[mpn_toom22_mul_itch (MUL_TOOM33_THRESHOLD_LIMIT-1,
					MUL_TOOM33_THRESHOLD_LIMIT-1)];
      ASSERT (MUL_TOOM33_THRESHOLD <= MUL_TOOM33_THRESHOLD_LIMIT);
      mpn_toom22_mul (p, a, n, b, n, ws);
    }
  else if (BELOW_THRESHOLD (n, MUL_TOOM44_THRESHOLD))
    {
      mp_ptr ws;
      TMP_SDECL;
      TMP_SMARK;
      ws = TMP_SALLOC_LIMBS (mpn_toom33_mul_itch (n, n));
      mpn_toom33_mul (p, a, n, b, n, ws);
      TMP_SFREE;
    }
  else if (BELOW_THRESHOLD (n, MUL_TOOM6H_THRESHOLD))
    {
      mp_ptr ws;
      TMP_SDECL;
      TMP_SMARK;
      ws = TMP_SALLOC_LIMBS (mpn_toom44_mul_itch (n, n));
      mpn_toom44_mul (p, a, n, b, n, ws);
      TMP_SFREE;
    }
  else if (BELOW_THRESHOLD (n, MUL_TOOM8H_THRESHOLD))
    {
      mp_ptr ws;
      TMP_SDECL;
      TMP_SMARK;
      ws = TMP_SALLOC_LIMBS (mpn_toom6_mul_n_itch (n));
      mpn_toom6h_mul (p, a, n, b, n, ws);
      TMP_SFREE;
    }
  else if (BELOW_THRESHOLD (n, MUL_FFT_THRESHOLD))
    {
      mp_ptr ws;
      TMP_DECL;
      TMP_MARK;
      ws = TMP_ALLOC_LIMBS (mpn_toom8_mul_n_itch (n));
      mpn_toom8h_mul (p, a, n, b, n, ws);
      TMP_FREE;
    }
  else
    {
      /* The current FFT code allocates its own space.  That should probably
	 change.  */
      mpn_fft_mul (p, a, n, b, n);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x900, %rsp            # imm = 0x900
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
cmpq $0x1b, %rcx
jle 0x1d3c6
cmpq $0x50, %rbx
jbe 0x1d3e6
cmpq $0xf1, %rbx
jbe 0x1d406
cmpq $0x158, %rbx            # imm = 0x158
jbe 0x1d438
cmpq $0x1e1, %rbx            # imm = 0x1E1
jbe 0x1d46a
cmpq $0x2cff, %rbx           # imm = 0x2CFF
jbe 0x1d49a
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbx, %r8
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1e360
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbx, %r8
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1d680
leaq -0x920(%rbp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x203ac
jmp 0x1d4ed
leaq (%rbx,%rbx,2), %rax
movq %rsp, %r9
leaq 0x20f(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x210f0
jmp 0x1d4ed
leaq (%rbx,%rbx,2), %rax
movq %rsp, %r9
leaq 0x20f(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x22f0c
jmp 0x1d4ed
movq %rbx, %rax
shlq $0x4, %rax
movq %rsp, %r9
addq $0xcd7, %rax            # imm = 0xCD7
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x2346c
jmp 0x1d4ed
movq $0x0, -0x920(%rbp)
leal (%rbx,%rbx,4), %eax
leal (%rax,%rax,2), %eax
andl $0x3fff8, %eax          # imm = 0x3FFF8
leaq 0xeb0(%rax), %rsi
cmpl $0x7050, %eax           # imm = 0x7050
ja 0x1d4fa
movq %rsp, %r9
addl $0xf, %esi
andl $-0x10, %esi
subq %rsi, %r9
movq %r9, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x24380
movq -0x920(%rbp), %rdi
testq %rdi, %rdi
jne 0x1d50b
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x920(%rbp), %rdi
callq 0x2fdb0
movq %rax, %r9
jmp 0x1d4cd
callq 0x2fde3
jmp 0x1d4ed
nop