// File: 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
subq $0x950, %rsp            # imm = 0x950
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
jmp 0x3901d
jmp 0x3901f
jmp 0x39021
jmp 0x39023
jmp 0x39025
cmpq $0x1c, -0x20(%rbp)
jge 0x3904a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0x394e0
jmp 0x392a4
cmpq $0x51, -0x20(%rbp)
jge 0x3907a
jmp 0x39053
jmp 0x39055
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq -0x920(%rbp), %r9
callq 0x3e800
jmp 0x392a2
cmpq $0xf2, -0x20(%rbp)
jge 0x390cd
movq -0x20(%rbp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x20f(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x928(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x928(%rbp), %r9
callq 0x40340
jmp 0x392a0
cmpq $0x159, -0x20(%rbp)     # imm = 0x159
jge 0x39120
movq -0x20(%rbp), %rax
leaq (%rax,%rax,2), %rax
leaq 0x20f(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x930(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x930(%rbp), %r9
callq 0x42930
jmp 0x3929e
cmpq $0x1e2, -0x20(%rbp)     # imm = 0x1E2
jge 0x39172
movq -0x20(%rbp), %rcx
shlq $0x4, %rcx
addq $0xcd7, %rcx            # imm = 0xCD7
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x938(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x938(%rbp), %r9
callq 0x434c0
jmp 0x3929c
cmpq $0x2d00, -0x20(%rbp)    # imm = 0x2D00
jge 0x39281
movq $0x0, -0x948(%rbp)
imulq $0xf, -0x20(%rbp), %rax
sarq $0x3, %rax
subq $0x387, %rax            # imm = 0x387
addq $0x55d, %rax            # imm = 0x55D
shlq $0x3, %rax
cmpq $0x7f00, %rax           # imm = 0x7F00
setbe %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x391f2
movq -0x20(%rbp), %rax
leaq (%rax,%rax,4), %rax
leaq (%rax,%rax,2), %rcx
andq $-0x8, %rcx
addq $0xebf, %rcx            # imm = 0xEBF
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq %rax, -0x950(%rbp)
jmp 0x39220
imulq $0xf, -0x20(%rbp), %rsi
sarq $0x3, %rsi
subq $0x387, %rsi            # imm = 0x387
addq $0x55d, %rsi            # imm = 0x55D
shlq $0x3, %rsi
leaq -0x948(%rbp), %rdi
callq 0x56430
movq %rax, -0x950(%rbp)
movq -0x950(%rbp), %rax
movq %rax, -0x940(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x940(%rbp), %r9
callq 0x44d70
cmpq $0x0, -0x948(%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 0x3927d
movq -0x948(%rbp), %rdi
callq 0x564a0
jmp 0x3927f
jmp 0x3929a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
callq 0x3a1c0
jmp 0x3929c
jmp 0x3929e
jmp 0x392a0
jmp 0x392a2
jmp 0x392a4
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax)