// File: /workspace/github_cpp_makefile_star2_O1/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 0x5f3d
movq %r8, %r12
movq %rdx, %r14
cmpq %r8, %rdx
jl 0x5f5c
movq %r9, %rbx
movq %rsi, %r15
cmpq $0x2, %r12
je 0x5c46
cmpq $0x1, %r12
jne 0x5cab
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x7b11
movq %rax, (%r15)
jmp 0x5f2e
movq %r15, -0x40(%rbp)
cmpq $0x1, %r14
jle 0x5f7b
movl (%rbx), %r12d
movq 0x8(%rbx), %r13
movq 0x10(%rbx), %r15
movq 0x18(%rbx), %rcx
testq %r12, %r12
movq %r12, -0x48(%rbp)
je 0x5d4f
movq %rdi, -0x30(%rbp)
leaq (,%r14,8), %rdi
movq %rcx, -0x38(%rbp)
callq *0xa41a(%rip)           # 0x100a0
movq %rax, %rbx
movq %rax, %rdi
movq -0x40(%rbp), %rsi
movq %r14, %rdx
movl %r12d, %ecx
callq 0x1a6f
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rdi
movq %rax, %r12
jmp 0x5d56
movq %rcx, %r13
movq 0x8(%rbx), %rax
cmpq -0x8(%rcx,%r12,8), %rax
jne 0x5f9a
movq 0x10(%rbx), %rcx
cmpq -0x10(%r13,%r12,8), %rcx
jne 0x5fb9
testq %rax, %rax
jns 0x5fd8
movl (%rbx), %eax
testl %eax, %eax
je 0x5f13
movq %rdi, -0x30(%rbp)
movq %r15, %rdi
movq %r15, %rsi
movq %r14, %rdx
movl %eax, %ecx
movl %eax, -0x38(%rbp)
callq 0x1a6f
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 0x9687
movq %r15, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl -0x38(%rbp), %ecx
callq 0x1b49
testq %rax, %rax
je 0x5f2e
leaq 0x46fe(%rip), %rdi      # 0xa435
leaq 0x4326(%rip), %rsi      # 0xa064
leaq 0x571c(%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 0x5ea5
ja 0x5e91
cmpq %r15, %rbx
jb 0x5ea5
incq %r9
subq %r15, %rbx
movl $0x0, %eax
sbbq %rax, %rax
subq %r13, %rax
addq %rax, %r12
testq %rdi, %rdi
je 0x5eaf
movq %r9, -0x8(%rdi,%r14,8)
decq %r14
testq %r14, %r14
jg 0x5d81
movq -0x48(%rbp), %rdx
testq %rdx, %rdx
je 0x5f06
movq %rdx, %rcx
negq %rcx
movq %rbx, %rax
shlq %cl, %rax
testq %rax, %rax
movq -0x40(%rbp), %r14
jne 0x5ff7
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 *0xa1ac(%rip)           # 0x100b0
jmp 0x5f0a
movq -0x40(%rbp), %r14
movq %r12, 0x8(%r14)
movq %rbx, (%r14)
jmp 0x5f2e
movq 0x18(%rbx), %rax
movq %rax, (%rsp)
movq %r15, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
movq %r13, %r8
movq %r12, %r9
callq 0x9687
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x527b(%rip), %rdi      # 0xb1bf
leaq 0x4119(%rip), %rsi      # 0xa064
leaq 0x550f(%rip), %rcx      # 0xb461
movl $0x41e, %edx            # imm = 0x41E
callq 0x1090
leaq 0x52a4(%rip), %rdi      # 0xb207
leaq 0x40fa(%rip), %rsi      # 0xa064
leaq 0x54f0(%rip), %rcx      # 0xb461
movl $0x41f, %edx            # imm = 0x41F
callq 0x1090
leaq 0x5591(%rip), %rdi      # 0xb513
leaq 0x40db(%rip), %rsi      # 0xa064
leaq 0x558b(%rip), %rcx      # 0xb51b
movl $0x3a3, %edx            # imm = 0x3A3
callq 0x1090
leaq 0x5528(%rip), %rdi      # 0xb4c9
leaq 0x40bc(%rip), %rsi      # 0xa064
leaq 0x54b2(%rip), %rcx      # 0xb461
movl $0x42a, %edx            # imm = 0x42A
callq 0x1090
leaq 0x551d(%rip), %rdi      # 0xb4dd
leaq 0x409d(%rip), %rsi      # 0xa064
leaq 0x5493(%rip), %rcx      # 0xb461
movl $0x42b, %edx            # imm = 0x42B
callq 0x1090
leaq 0x5512(%rip), %rdi      # 0xb4f1
leaq 0x407e(%rip), %rsi      # 0xa064
leaq 0x5474(%rip), %rcx      # 0xb461
movl $0x42c, %edx            # imm = 0x42C
callq 0x1090
leaq 0x557c(%rip), %rdi      # 0xb57a
leaq 0x405f(%rip), %rsi      # 0xa064
leaq 0x550f(%rip), %rcx      # 0xb51b
movl $0x3c2, %edx            # imm = 0x3C2
callq 0x1090