// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
testq %r8, %r8
jle 0x5480
movq %r8, %r12
movq %rdx, %r14
cmpq %r8, %rdx
jl 0x549f
movq %r9, %rbx
movq %rsi, %r15
cmpq $0x2, %r12
je 0x5195
cmpq $0x1, %r12
jne 0x51f0
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x6b6f
movq %rax, (%r15)
jmp 0x5471
movq %r15, -0x40(%rbp)
movl (%rbx), %r12d
movq 0x8(%rbx), %r13
movq 0x10(%rbx), %r15
movq 0x18(%rbx), %rcx
testq %r12, %r12
movq %r12, -0x48(%rbp)
je 0x5294
movq %rdi, -0x30(%rbp)
leaq (,%r14,8), %rdi
movq %rcx, -0x38(%rbp)
callq *0x9ecd(%rip)           # 0xf098
movq %rax, %rbx
movq %rax, %rdi
movq -0x40(%rbp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x187e
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rdi
movq %rax, %r12
jmp 0x529b
movq %rcx, %r13
movq 0x8(%rbx), %rax
cmpq -0x8(%rcx,%r12,8), %rax
jne 0x54be
movq 0x10(%rbx), %rcx
cmpq -0x10(%r13,%r12,8), %rcx
jne 0x54dd
testq %rax, %rax
jns 0x54fc
movl (%rbx), %eax
testl %eax, %eax
je 0x5456
movq %rdi, -0x30(%rbp)
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %eax, %ecx
movl %eax, -0x38(%rbp)
callq 0x187e
movq 0x18(%rbx), %rcx
movq %rcx, (%rsp)
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rax, %rcx
movq %r13, %r8
movq %r12, %r9
callq 0x82d1
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl -0x38(%rbp), %ecx
callq 0x1941
testq %rax, %rax
je 0x5471
leaq 0x41b9(%rip), %rdi      # 0x9435
leaq 0x3de1(%rip), %rsi      # 0x9064
leaq 0x51d7(%rip), %rcx      # 0xa461
movl $0x437, %edx            # imm = 0x437
callq 0x1090
xorl %r12d, %r12d
movq -0x40(%rbp), %rbx
movq %rbx, -0x30(%rbp)
movq -0x8(%rbx,%r14,8), %rbx
decq %r14
movq %rcx, %rax
shrq $0x20, %rax
movq %rax, -0x38(%rbp)
movl %ecx, %eax
movq %rax, -0x58(%rbp)
movq %r15, %rsi
shrq $0x20, %rsi
movl %r15d, %eax
movq %rax, -0x50(%rbp)
movq %rdi, %rcx
movq %r12, %r9
shrq $0x20, %r9
movl %r12d, %r11d
movq %r11, %r8
movq -0x58(%rbp), %rdi
imulq %rdi, %r8
movq -0x38(%rbp), %rdx
imulq %rdx, %r11
movq %r9, %rax
imulq %rdi, %rax
imulq %rdx, %r9
movl %r8d, %r10d
shrq $0x20, %r8
addq %rax, %r11
addq %r8, %r11
movabsq $0x100000000, %rdi      # imm = 0x100000000
leaq (%r9,%rdi), %r8
cmpq %rax, %r11
cmovaeq %r9, %r8
movq %r11, %r9
shrq $0x20, %r9
shlq $0x20, %r11
orq %r11, %r10
addq %r12, %r9
addq %rbx, %r10
adcq %r8, %r9
movq %r9, %r11
shrq $0x20, %r11
movl %r9d, %r8d
movq %r8, %rax
movq -0x50(%rbp), %rdx
imulq %rdx, %rax
movq %r11, %r12
imulq %rdx, %r12
imulq %rsi, %r8
movl %eax, %edx
shrq $0x20, %rax
addq %r8, %r12
addq %rax, %r12
movq %r9, %rax
notq %rax
imulq %r13, %rax
imulq %rsi, %r11
cmpq %r8, %r12
leaq (%r11,%rdi), %r8
cmovaeq %r11, %r8
movq %r12, %r11
shlq $0x20, %r12
orq %r12, %rdx
movq -0x30(%rbp), %rdi
movq -0x8(%rdi,%r14,8), %rdi
shrq $0x20, %r11
subq %r15, %rdi
movl $0x0, %r12d
sbbq %r12, %rbx
addq %rax, %rbx
addq %r8, %r11
subq %rdx, %rdi
movq %rbx, %rax
sbbq %r11, %rax
cmpq %r10, %rax
adcq $-0x1, %r9
cmpq %r10, %rax
movl $0x0, %ebx
cmovaeq %r15, %rbx
movl $0x0, %r12d
cmovaeq %r13, %r12
incq %r9
addq %rdi, %rbx
adcq %rax, %r12
movq %rcx, %rdi
cmpq %r13, %r12
jb 0x53ea
ja 0x53d6
cmpq %r15, %rbx
jb 0x53ea
incq %r9
subq %r15, %rbx
movl $0x0, %eax
sbbq %rax, %rax
subq %r13, %rax
addq %rax, %r12
testq %rdi, %rdi
je 0x53f4
movq %r9, -0x8(%rdi,%r14,8)
decq %r14
testq %r14, %r14
jg 0x52c6
movq -0x48(%rbp), %rdx
testq %rdx, %rdx
je 0x5449
movq %rdx, %rcx
negq %rcx
movq %rbx, %rax
shlq %cl, %rax
testq %rax, %rax
movq -0x40(%rbp), %r14
jne 0x551b
movl %edx, %ecx
shrq %cl, %rbx
pushq $0x40
popq %rcx
subq %rdx, %rcx
movq %r12, %rax
shlq %cl, %rax
orq %rax, %rbx
movl %edx, %ecx
shrq %cl, %r12
movq -0x30(%rbp), %rdi
xorl %esi, %esi
callq *0x9c61(%rip)           # 0xf0a8
jmp 0x544d
movq -0x40(%rbp), %r14
movq %r12, 0x8(%r14)
movq %rbx, (%r14)
jmp 0x5471
movq 0x18(%rbx), %rax
movq %rax, (%rsp)
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %r13, %r8
movq %r12, %r9
callq 0x82d1
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4d38(%rip), %rdi      # 0xa1bf
leaq 0x3bd6(%rip), %rsi      # 0x9064
leaq 0x4fcc(%rip), %rcx      # 0xa461
movl $0x41e, %edx            # imm = 0x41E
callq 0x1090
leaq 0x4d61(%rip), %rdi      # 0xa207
leaq 0x3bb7(%rip), %rsi      # 0x9064
leaq 0x4fad(%rip), %rcx      # 0xa461
movl $0x41f, %edx            # imm = 0x41F
callq 0x1090
leaq 0x5004(%rip), %rdi      # 0xa4c9
leaq 0x3b98(%rip), %rsi      # 0x9064
leaq 0x4f8e(%rip), %rcx      # 0xa461
movl $0x42a, %edx            # imm = 0x42A
callq 0x1090
leaq 0x4ff9(%rip), %rdi      # 0xa4dd
leaq 0x3b79(%rip), %rsi      # 0x9064
leaq 0x4f6f(%rip), %rcx      # 0xa461
movl $0x42b, %edx            # imm = 0x42B
callq 0x1090
leaq 0x4fee(%rip), %rdi      # 0xa4f1
leaq 0x3b5a(%rip), %rsi      # 0x9064
leaq 0x4f50(%rip), %rcx      # 0xa461
movl $0x42c, %edx            # imm = 0x42C
callq 0x1090
leaq 0x5050(%rip), %rdi      # 0xa572
leaq 0x3b3b(%rip), %rsi      # 0x9064
leaq 0x4fe3(%rip), %rcx      # 0xa513
movl $0x3c2, %edx            # imm = 0x3C2
callq 0x1090