// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d8e2
cmpq $0x50, %rbx
jle 0x1d902
cmpq $0xf1, %rbx
jle 0x1d922
cmpq $0x158, %rbx            # imm = 0x158
jle 0x1d954
cmpq $0x1e1, %rbx            # imm = 0x1E1
jle 0x1d986
cmpq $0x2cff, %rbx           # imm = 0x2CFF
jle 0x1d9b6
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 0x1e890
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 0x1dbb0
leaq -0x920(%rbp), %r9
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x20908
jmp 0x1da17
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 0x2169c
jmp 0x1da17
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 0x2347c
jmp 0x1da17
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 0x239ac
jmp 0x1da17
movq $0x0, -0x920(%rbp)
leaq (%rbx,%rbx,4), %rax
leaq (%rax,%rax,2), %rax
movabsq $0x7ffffffffffffff8, %rcx # imm = 0x7FFFFFFFFFFFFFF8
andq %rax, %rcx
leaq 0xeb0(%rcx), %rsi
cmpq $0x7050, %rcx           # imm = 0x7050
ja 0x1da24
movq %rsp, %r9
addq $0xf, %rsi
andq $-0x10, %rsi
subq %rsi, %r9
movq %r9, %rsp
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x24860
movq -0x920(%rbp), %rdi
testq %rdi, %rdi
jne 0x1da35
leaq -0x20(%rbp), %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq -0x920(%rbp), %rdi
callq 0x30170
movq %rax, %r9
jmp 0x1d9f7
callq 0x301a3
jmp 0x1da17