// File: /workspace/github_cpp_makefile_star2_O3/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 0x5ea9
movq %r8, %r12
movq %rdx, %r14
cmpq %r8, %rdx
jl 0x5ec8
movq %r9, %rbx
movq %rsi, %r15
cmpq $0x2, %r12
je 0x5bbc
cmpq $0x1, %r12
jne 0x5c17
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x79cc
movq %rax, (%r15)
jmp 0x5e9a
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 0x5cbb
movq %rdi, -0x30(%rbp)
leaq (,%r14,8), %rdi
movq %rcx, -0x38(%rbp)
callq *0xa4ae(%rip)           # 0x100a0
movq %rax, %rbx
movq %rax, %rdi
movq -0x40(%rbp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x1a5d
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rdi
movq %rax, %r12
jmp 0x5cc2
movq %rcx, %r13
movq 0x8(%rbx), %rax
cmpq -0x8(%rcx,%r12,8), %rax
jne 0x5ee7
movq 0x10(%rbx), %rcx
cmpq -0x10(%r13,%r12,8), %rcx
jne 0x5f06
testq %rax, %rax
jns 0x5f25
movl (%rbx), %eax
testl %eax, %eax
je 0x5e7f
movq %rdi, -0x30(%rbp)
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %eax, %ecx
movl %eax, -0x38(%rbp)
callq 0x1a5d
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 0x94d7
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl -0x38(%rbp), %ecx
callq 0x1b37
testq %rax, %rax
je 0x5e9a
leaq 0x4792(%rip), %rdi      # 0xa435
leaq 0x43ba(%rip), %rsi      # 0xa064
leaq 0x57b0(%rip), %rcx      # 0xb461
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 0x5e11
ja 0x5dfd
cmpq %r15, %rbx
jb 0x5e11
incq %r9
subq %r15, %rbx
movl $0x0, %eax
sbbq %rax, %rax
subq %r13, %rax
addq %rax, %r12
testq %rdi, %rdi
je 0x5e1b
movq %r9, -0x8(%rdi,%r14,8)
decq %r14
testq %r14, %r14
jg 0x5ced
movq -0x48(%rbp), %rdx
testq %rdx, %rdx
je 0x5e72
movq %rdx, %rcx
negq %rcx
movq %rbx, %rax
shlq %cl, %rax
testq %rax, %rax
movq -0x40(%rbp), %r14
jne 0x5f44
movl %edx, %ecx
shrq %cl, %rbx
movl $0x40, %ecx
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 *0xa240(%rip)           # 0x100b0
jmp 0x5e76
movq -0x40(%rbp), %r14
movq %r12, 0x8(%r14)
movq %rbx, (%r14)
jmp 0x5e9a
movq 0x18(%rbx), %rax
movq %rax, (%rsp)
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %r13, %r8
movq %r12, %r9
callq 0x94d7
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x530f(%rip), %rdi      # 0xb1bf
leaq 0x41ad(%rip), %rsi      # 0xa064
leaq 0x55a3(%rip), %rcx      # 0xb461
movl $0x41e, %edx            # imm = 0x41E
callq 0x1090
leaq 0x5338(%rip), %rdi      # 0xb207
leaq 0x418e(%rip), %rsi      # 0xa064
leaq 0x5584(%rip), %rcx      # 0xb461
movl $0x41f, %edx            # imm = 0x41F
callq 0x1090
leaq 0x55db(%rip), %rdi      # 0xb4c9
leaq 0x416f(%rip), %rsi      # 0xa064
leaq 0x5565(%rip), %rcx      # 0xb461
movl $0x42a, %edx            # imm = 0x42A
callq 0x1090
leaq 0x55d0(%rip), %rdi      # 0xb4dd
leaq 0x4150(%rip), %rsi      # 0xa064
leaq 0x5546(%rip), %rcx      # 0xb461
movl $0x42b, %edx            # imm = 0x42B
callq 0x1090
leaq 0x55c5(%rip), %rdi      # 0xb4f1
leaq 0x4131(%rip), %rsi      # 0xa064
leaq 0x5527(%rip), %rcx      # 0xb461
movl $0x42c, %edx            # imm = 0x42C
callq 0x1090
leaq 0x5627(%rip), %rdi      # 0xb572
leaq 0x4112(%rip), %rsi      # 0xa064
leaq 0x55ba(%rip), %rcx      # 0xb513
movl $0x3c2, %edx            # imm = 0x3C2
callq 0x1090