// File: marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpn_div_qr_2_preinv
static void
mpn_div_qr_2_preinv (mp_ptr qp, mp_ptr rp, mp_srcptr np, mp_size_t nn,
		     const struct gmp_div_inverse *inv)
{
  unsigned shift;
  mp_size_t i;
  mp_limb_t d1, d0, di, r1, r0;
  mp_ptr tp;

  assert (nn >= 2);
  shift = inv->shift;
  d1 = inv->d1;
  d0 = inv->d0;
  di = inv->di;

  if (shift > 0)
    {
      tp = gmp_xalloc_limbs (nn);
      r1 = mpn_lshift (tp, np, nn, shift);
      np = tp;
    }
  else
    r1 = 0;

  r0 = np[nn - 1];

  i = nn - 2;
  do
    {
      mp_limb_t n0, q;
      n0 = np[i];
      gmp_udiv_qr_3by2 (q, r1, r0, r1, r0, n0, d1, d0, di);

      if (qp)
	qp[i] = q;
    }
  while (--i >= 0);

  if (shift > 0)
    {
      assert ((r0 << (GMP_LIMB_BITS - shift)) == 0);
      r0 = (r0 >> shift) | (r1 << (GMP_LIMB_BITS - shift));
      r1 >>= shift;

      gmp_free (tp);
    }

  rp[1] = r1;
  rp[0] = r0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
cmpq $0x2, -0x20(%rbp)
jl 0xc7f8
jmp 0xc817
leaq 0x3189(%rip), %rdi      # 0xf988
leaq 0x18ce(%rip), %rsi      # 0xe0d4
movl $0x3a3, %edx            # imm = 0x3A3
leaq 0x317e(%rip), %rcx      # 0xf990
callq 0x1070
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
cmpl $0x0, -0x2c(%rbp)
jbe 0xc879
movq -0x20(%rbp), %rdi
callq 0x3220
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x2c(%rbp), %ecx
callq 0x20b0
movq %rax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0xc881
movq $0x0, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x20(%rbp), %rax
subq $0x2, %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
jmp 0xc8b3
movq -0x58(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0xd8(%rbp)
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq -0xd0(%rbp), %rax
movl %eax, -0xbc(%rbp)
movq -0xd0(%rbp), %rax
shrq $0x20, %rax
movl %eax, -0xc4(%rbp)
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq -0xd8(%rbp), %rax
movl %eax, -0xc0(%rbp)
movq -0xd8(%rbp), %rax
shrq $0x20, %rax
movl %eax, -0xc8(%rbp)
movl -0xbc(%rbp), %eax
movl -0xc0(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0xa0(%rbp)
movl -0xbc(%rbp), %eax
movl -0xc8(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0xa8(%rbp)
movl -0xc4(%rbp), %eax
movl -0xc0(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0xb0(%rbp)
movl -0xc4(%rbp), %eax
movl -0xc8(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0xb8(%rbp)
movq -0xa0(%rbp), %rax
shrq $0x20, %rax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xb0(%rbp), %rax
addq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
cmpq -0xb0(%rbp), %rax
jae 0xc9cb
movabsq $0x100000000, %rax      # imm = 0x100000000
addq -0xb8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq -0xa8(%rbp), %rcx
shrq $0x20, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0xa8(%rbp), %rax
shlq $0x20, %rax
movabsq $0xffffffff, %rcx       # imm = 0xFFFFFFFF
andq -0xa0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x80(%rbp)
jmp 0xca09
movq -0x80(%rbp), %rax
addq -0x60(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x78(%rbp), %rax
addq -0x58(%rbp), %rax
movq -0xe0(%rbp), %rcx
cmpq -0x80(%rbp), %rcx
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x78(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x60(%rbp), %rax
movq -0x40(%rbp), %rcx
imulq -0x78(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x70(%rbp), %rax
subq -0x48(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x58(%rbp), %rax
subq -0x40(%rbp), %rax
movq -0x70(%rbp), %rcx
cmpq -0x48(%rbp), %rcx
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0xca9c
movq -0x48(%rbp), %rax
movq %rax, -0x120(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x128(%rbp)
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq -0x120(%rbp), %rax
movl %eax, -0x10c(%rbp)
movq -0x120(%rbp), %rax
shrq $0x20, %rax
movl %eax, -0x114(%rbp)
movabsq $0xffffffff, %rax       # imm = 0xFFFFFFFF
andq -0x128(%rbp), %rax
movl %eax, -0x110(%rbp)
movq -0x128(%rbp), %rax
shrq $0x20, %rax
movl %eax, -0x118(%rbp)
movl -0x10c(%rbp), %eax
movl -0x110(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0xf0(%rbp)
movl -0x10c(%rbp), %eax
movl -0x118(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0xf8(%rbp)
movl -0x114(%rbp), %eax
movl -0x110(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0x100(%rbp)
movl -0x114(%rbp), %eax
movl -0x118(%rbp), %ecx
imulq %rcx, %rax
movq %rax, -0x108(%rbp)
movq -0xf0(%rbp), %rax
shrq $0x20, %rax
addq -0xf8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x100(%rbp), %rax
addq -0xf8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rax
cmpq -0x100(%rbp), %rax
jae 0xcbb4
movabsq $0x100000000, %rax      # imm = 0x100000000
addq -0x108(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq -0xf8(%rbp), %rcx
shrq $0x20, %rcx
addq %rcx, %rax
movq %rax, -0x88(%rbp)
movq -0xf8(%rbp), %rax
shlq $0x20, %rax
movabsq $0xffffffff, %rcx       # imm = 0xFFFFFFFF
andq -0xf0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0xcbf8
movq -0x60(%rbp), %rax
subq -0x90(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x58(%rbp), %rax
subq -0x88(%rbp), %rax
movq -0x60(%rbp), %rcx
cmpq -0x90(%rbp), %rcx
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x80(%rbp), %rax
setae %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
addq -0x78(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x60(%rbp), %rax
movq -0x98(%rbp), %rcx
andq -0x48(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x138(%rbp)
movq -0x58(%rbp), %rax
movq -0x98(%rbp), %rcx
andq -0x40(%rbp), %rcx
addq %rcx, %rax
movq -0x138(%rbp), %rcx
cmpq -0x60(%rbp), %rcx
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x138(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0xcd37
movq -0x58(%rbp), %rax
cmpq -0x40(%rbp), %rax
ja 0xccea
movq -0x60(%rbp), %rax
cmpq -0x48(%rbp), %rax
jb 0xcd35
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
movq -0x60(%rbp), %rax
subq -0x48(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x58(%rbp), %rax
subq -0x40(%rbp), %rax
movq -0x60(%rbp), %rcx
cmpq -0x48(%rbp), %rcx
setb %cl
andb $0x1, %cl
movzbl %cl, %ecx
movslq %ecx, %rcx
subq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0xcd35
jmp 0xcd37
jmp 0xcd39
cmpq $0x0, -0x8(%rbp)
je 0xcd50
movq -0x78(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0xcd52
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jge 0xc8a1
cmpl $0x0, -0x2c(%rbp)
jbe 0xcdf6
movq -0x60(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, %edx
movl $0x40, %ecx
subq %rdx, %rcx
shlq %cl, %rax
cmpq $0x0, %rax
jne 0xcd8e
jmp 0xcdad
leaq 0x2c5a(%rip), %rdi      # 0xf9ef
leaq 0x1338(%rip), %rsi      # 0xe0d4
movl $0x3c2, %edx            # imm = 0x3C2
leaq 0x2be8(%rip), %rcx      # 0xf990
callq 0x1070
movq -0x60(%rbp), %rax
movl -0x2c(%rbp), %ecx
shrq %cl, %rax
movq -0x58(%rbp), %rdx
movl -0x2c(%rbp), %ecx
movl %ecx, %esi
movl $0x40, %ecx
subq %rsi, %rcx
shlq %cl, %rdx
movq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x60(%rbp)
movl -0x2c(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x58(%rbp)
movq 0x62ac(%rip), %rax      # 0x13098
movq -0x68(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, %esi
callq *%rax
movq -0x58(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x60(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)