// File: marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpn_div_qr_preinv
static void
mpn_div_qr_preinv (mp_ptr qp, mp_ptr np, mp_size_t nn,
		   mp_srcptr dp, mp_size_t dn,
		   const struct gmp_div_inverse *inv)
{
  assert (dn > 0);
  assert (nn >= dn);

  if (dn == 1)
    np[0] = mpn_div_qr_1_preinv (qp, np, nn, inv);
  else if (dn == 2)
    mpn_div_qr_2_preinv (qp, np, np, nn, inv);
  else
    {
      mp_limb_t nh;
      unsigned shift;

      assert (inv->d1 == dp[dn-1]);
      assert (inv->d0 == dp[dn-2]);
      assert ((inv->d1 & GMP_LIMB_HIGHBIT) != 0);

      shift = inv->shift;
      if (shift > 0)
	nh = mpn_lshift (np, np, nn, shift);
      else
	nh = 0;

      mpn_div_qr_pi1 (qp, np, nn, nh, dp, dn, inv->di);

      if (shift > 0)
	gmp_assert_nocarry (mpn_rshift (np, np, dn, shift));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jle 0x7d89
jmp 0x7da8
leaq 0x78a4(%rip), %rdi      # 0xf634
leaq 0x633d(%rip), %rsi      # 0xe0d4
movl $0x41e, %edx            # imm = 0x41E
leaq 0x7b33(%rip), %rcx      # 0xf8d6
callq 0x1070
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x7db4
jmp 0x7dd3
leaq 0x78c1(%rip), %rdi      # 0xf67c
leaq 0x6312(%rip), %rsi      # 0xe0d4
movl $0x41f, %edx            # imm = 0x41F
leaq 0x7b08(%rip), %rcx      # 0xf8d6
callq 0x1070
cmpq $0x1, -0x28(%rbp)
jne 0x7dfe
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x30(%rbp), %rcx
callq 0xa390
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x7f7c
cmpq $0x2, -0x28(%rbp)
jne 0x7e23
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0xc7d0
jmp 0x7f7a
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rdx
subq $0x1, %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0x7e3f
jmp 0x7e5e
leaq 0x7af8(%rip), %rdi      # 0xf93e
leaq 0x6287(%rip), %rsi      # 0xe0d4
movl $0x42a, %edx            # imm = 0x42A
leaq 0x7a7d(%rip), %rcx      # 0xf8d6
callq 0x1070
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rdx
subq $0x2, %rdx
cmpq (%rcx,%rdx,8), %rax
jne 0x7e7a
jmp 0x7e99
leaq 0x7ad1(%rip), %rdi      # 0xf952
leaq 0x624c(%rip), %rsi      # 0xe0d4
movl $0x42b, %edx            # imm = 0x42B
leaq 0x7a42(%rip), %rcx      # 0xf8d6
callq 0x1070
movq -0x30(%rbp), %rcx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq 0x8(%rcx), %rax
cmpq $0x0, %rax
je 0x7eb3
jmp 0x7ed2
leaq 0x7aac(%rip), %rdi      # 0xf966
leaq 0x6213(%rip), %rsi      # 0xe0d4
movl $0x42c, %edx            # imm = 0x42C
leaq 0x7a09(%rip), %rcx      # 0xf8d6
callq 0x1070
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jbe 0x7efb
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x3c(%rbp), %ecx
callq 0x20b0
movq %rax, -0x38(%rbp)
jmp 0x7f03
movq $0x0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, (%rsp)
callq 0xce20
cmpl $0x0, -0x3c(%rbp)
jbe 0x7f78
jmp 0x7f34
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
movl -0x3c(%rbp), %ecx
callq 0x2230
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x7f55
jmp 0x7f74
leaq 0x6549(%rip), %rdi      # 0xe4a5
leaq 0x6171(%rip), %rsi      # 0xe0d4
movl $0x437, %edx            # imm = 0x437
leaq 0x7967(%rip), %rcx      # 0xf8d6
callq 0x1070
jmp 0x7f76
jmp 0x7f78
jmp 0x7f7a
jmp 0x7f7c
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)