// File: marxn[P]pupp/3rdparty/gmp/mpf/set_str.c
// Function: mpn_pow_1_highpart
static mp_size_t
mpn_pow_1_highpart (mp_ptr rp, mp_size_t *ignp,
		    mp_limb_t base, mp_exp_t exp,
		    mp_size_t prec, mp_ptr tp)
{
  mp_size_t ign;		/* counts number of ignored low limbs in r */
  mp_size_t off;		/* keeps track of offset where value starts */
  mp_ptr passed_rp = rp;
  mp_size_t rn;
  int cnt;
  int i;

  rp[0] = base;
  rn = 1;
  off = 0;
  ign = 0;
  count_leading_zeros (cnt, exp);
  for (i = GMP_LIMB_BITS - cnt - 2; i >= 0; i--)
    {
      mpn_sqr (tp, rp + off, rn);
      rn = 2 * rn;
      rn -= tp[rn - 1] == 0;
      ign <<= 1;

      off = 0;
      if (rn > prec)
	{
	  ign += rn - prec;
	  off = rn - prec;
	  rn = prec;
	}
      MP_PTR_SWAP (rp, tp);

      if (((exp >> i) & 1) != 0)
	{
	  mp_limb_t cy;
	  cy = mpn_mul_1 (rp, rp + off, rn, base);
	  rp[rn] = cy;
	  rn += cy != 0;
	  off = 0;
	}
    }

  if (rn > prec)
    {
      ign += rn - prec;
      rp += rn - prec;
      rn = prec;
    }

  MPN_COPY_INCR (passed_rp, rp + off, rn);
  *ignp = ign;
  return rn;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %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)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq $0x1, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
jmp 0x34840
jmp 0x34842
movq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
bsrq -0x78(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
xorq $0x3f, %rax
movl %eax, -0x54(%rbp)
movl $0x40, %eax
subl -0x54(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x58(%rbp)
cmpl $0x0, -0x58(%rbp)
jl 0x34996
movq -0x30(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x50(%rbp), %rdx
callq 0x392b0
movq -0x50(%rbp), %rax
shlq %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq -0x50(%rbp), %rcx
subq $0x1, %rcx
cmpq $0x0, (%rax,%rcx,8)
sete %al
andb $0x1, %al
movzbl %al, %eax
movslq %eax, %rcx
movq -0x50(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
shlq %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x34905
movq -0x50(%rbp), %rax
subq -0x28(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x50(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x34907
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movl -0x58(%rbp), %ecx
sarq %cl, %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x34986
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x50(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x37206
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rdx
movq -0x8(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpq $0x0, -0x70(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
jmp 0x34988
movl -0x58(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x58(%rbp)
jmp 0x3486c
movq -0x50(%rbp), %rax
cmpq -0x28(%rbp), %rax
jle 0x349cc
movq -0x50(%rbp), %rax
subq -0x28(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x50(%rbp), %rax
subq -0x28(%rbp), %rax
shlq $0x3, %rax
addq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x349ce
jmp 0x349d0
jmp 0x349d2
jmp 0x349d4
jmp 0x349d6
movq -0x48(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x40(%rbp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq -0x50(%rbp), %rdx
callq 0x554c6
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)