// File: /workspace/github_cpp_makefile_star2_O3/marxn[P]pupp/3rdparty/gmp/mpf/add.c
// Function: _gmpf_add
void
mpf_add (mpf_ptr r, mpf_srcptr u, mpf_srcptr v)
{
  mp_srcptr up, vp;
  mp_ptr rp, tp;
  mp_size_t usize, vsize, rsize;
  mp_size_t prec;
  mp_exp_t uexp;
  mp_size_t ediff;
  mp_limb_t cy;
  int negate;
  TMP_DECL;

  usize = u->_mp_size;
  vsize = v->_mp_size;

  /* Handle special cases that don't work in generic code below.  */
  if (usize == 0)
    {
    set_r_v_maybe:
      if (r != v)
        mpf_set (r, v);
      return;
    }
  if (vsize == 0)
    {
      v = u;
      goto set_r_v_maybe;
    }

  /* If signs of U and V are different, perform subtraction.  */
  if ((usize ^ vsize) < 0)
    {
      __mpf_struct v_negated;
      v_negated._mp_size = -vsize;
      v_negated._mp_exp = v->_mp_exp;
      v_negated._mp_d = v->_mp_d;
      mpf_sub (r, u, &v_negated);
      return;
    }

  TMP_MARK;

  /* Signs are now known to be the same.  */
  negate = usize < 0;

  /* Make U be the operand with the largest exponent.  */
  if (u->_mp_exp < v->_mp_exp)
    {
      mpf_srcptr t;
      t = u; u = v; v = t;
      usize = u->_mp_size;
      vsize = v->_mp_size;
    }

  usize = ABS (usize);
  vsize = ABS (vsize);
  up = u->_mp_d;
  vp = v->_mp_d;
  rp = r->_mp_d;
  prec = r->_mp_prec;
  uexp = u->_mp_exp;
  ediff = u->_mp_exp - v->_mp_exp;

  /* If U extends beyond PREC, ignore the part that does.  */
  if (usize > prec)
    {
      up += usize - prec;
      usize = prec;
    }

  /* If V extends beyond PREC, ignore the part that does.
     Note that this may make vsize negative.  */
  if (vsize + ediff > prec)
    {
      vp += vsize + ediff - prec;
      vsize = prec - ediff;
    }

#if 0
  /* Locate the least significant non-zero limb in (the needed parts
     of) U and V, to simplify the code below.  */
  while (up[0] == 0)
    up++, usize--;
  while (vp[0] == 0)
    vp++, vsize--;
#endif

  /* Allocate temp space for the result.  Allocate
     just vsize + ediff later???  */
  tp = TMP_ALLOC_LIMBS (prec);

  if (ediff >= prec)
    {
      /* V completely cancelled.  */
      if (rp != up)
	MPN_COPY_INCR (rp, up, usize);
      rsize = usize;
    }
  else
    {
      /* uuuu     |  uuuu     |  uuuu     |  uuuu     |  uuuu    */
      /* vvvvvvv  |  vv       |    vvvvv  |    v      |       vv */

      if (usize > ediff)
	{
	  /* U and V partially overlaps.  */
	  if (vsize + ediff <= usize)
	    {
	      /* uuuu     */
	      /*   v      */
	      mp_size_t size;
	      size = usize - ediff - vsize;
	      MPN_COPY (tp, up, size);
	      cy = mpn_add (tp + size, up + size, usize - size, vp, vsize);
	      rsize = usize;
	    }
	  else
	    {
	      /* uuuu     */
	      /*   vvvvv  */
	      mp_size_t size;
	      size = vsize + ediff - usize;
	      MPN_COPY (tp, vp, size);
	      cy = mpn_add (tp + size, up, usize, vp + size, usize - ediff);
	      rsize = vsize + ediff;
	    }
	}
      else
	{
	  /* uuuu     */
	  /*      vv  */
	  mp_size_t size;
	  size = vsize + ediff - usize;
	  MPN_COPY (tp, vp, vsize);
	  MPN_ZERO (tp + vsize, ediff - usize);
	  MPN_COPY (tp + size, up, usize);
	  cy = 0;
	  rsize = size + usize;
	}

      MPN_COPY (rp, tp, rsize);
      rp[rsize] = cy;
      rsize += cy;
      uexp += cy;
    }

  r->_mp_size = negate ? -rsize : rsize;
  r->_mp_exp = uexp;
  TMP_FREE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movslq 0x4(%rsi), %r8
testq %r8, %r8
je 0x1a3d4
movslq 0x4(%rdx), %r11
testl %r11d, %r11d
je 0x1a3d1
movq %r11, %rax
xorq %r8, %rax
js 0x1a3f3
movq $0x0, -0xc0(%rbp)
movq 0x8(%rsi), %rax
movq 0x8(%rdx), %r13
cmpq %r13, %rax
jge 0x1a41e
movq %rax, %r10
movq %r8, %r9
movq %rsi, %rax
jmp 0x1a430
movq %rsi, %rdx
cmpq %rdi, %rdx
je 0x1a95e
movq %rdx, %rsi
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19a48
negl %r11d
leaq -0xc0(%rbp), %rax
movl %r11d, 0x4(%rax)
movq 0x8(%rdx), %rcx
movq %rcx, 0x8(%rax)
movq 0x10(%rdx), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdx
callq 0x1a9c8
jmp 0x1a95e
movq %r13, %r10
movq %rax, %r13
movq %r11, %r9
movq %r8, %r11
movq %rdx, %rax
movq %rsi, %rdx
movq %r11, %rcx
negq %rcx
movq %r11, %rbx
movq %rcx, -0x90(%rbp)
cmovnsq %rcx, %rbx
movq %r9, %rsi
negq %rsi
movq %r9, -0x80(%rbp)
movq %r9, %rcx
movq %rsi, -0xa8(%rbp)
cmovnsq %rsi, %rcx
movslq (%rdi), %r9
movq %r13, -0x60(%rbp)
movq %r10, -0x88(%rbp)
subq %r10, %r13
xorl %esi, %esi
movq %rbx, %r12
subq %r9, %r12
movq %r9, %r10
cmovlq %rbx, %r10
cmovleq %rsi, %r12
leaq (%rcx,%r13), %r15
movq %r9, %r14
subq %r13, %r14
subq %r9, %r15
cmovleq %rcx, %r14
movq 0x10(%rdx), %rcx
movq %rcx, -0x70(%rbp)
cmovleq %rsi, %r15
movq %r9, %rdx
movq 0x10(%rdi), %r9
shlq $0x3, %r15
addq 0x10(%rax), %r15
leaq (,%rdx,8), %rcx
cmpq $0x7f00, %rcx           # imm = 0x7F00
movq %r9, -0x30(%rbp)
ja 0x1a96d
movq %rsp, %r9
leaq 0xf(%rcx), %rax
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movq -0x70(%rbp), %rax
leaq (%rax,%r12,8), %rsi
cmpq %r13, %rdx
jle 0x1a604
movq %rsi, -0x78(%rbp)
leaq (%r14,%r13), %rax
cmpq %r13, %rbx
movq %rdi, -0xa0(%rbp)
movq %r8, -0x98(%rbp)
movq %rax, -0x58(%rbp)
jle 0x1a633
movq %rcx, -0x40(%rbp)
movq %rdx, -0x48(%rbp)
movq %r11, -0x38(%rbp)
movq %rax, %rbx
subq %r10, %rbx
movq %r9, -0x68(%rbp)
movq %r10, -0x50(%rbp)
jle 0x1a6bd
movq %r9, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2f106
movq -0x50(%rbp), %rdx
movq -0x68(%rbp), %rsi
leaq (%rsi,%rbx,8), %r14
movq %rdx, %r12
subq %r13, %r12
je 0x1a7d7
leaq (%r15,%rbx,8), %rdx
movq %r14, %rdi
movq -0x78(%rbp), %rsi
movq %r12, %rcx
callq 0x1ba80
testq %rax, %rax
movq -0x60(%rbp), %rbx
je 0x1a894
movq -0xa8(%rbp), %r10
movq -0x80(%rbp), %rax
cmpq %r10, %rax
cmovgq %rax, %r10
addq %rbx, %r10
movq -0x88(%rbp), %rax
subq %rax, %r10
movq -0x48(%rbp), %rcx
cmpq %rcx, %r10
cmovgeq %rcx, %r10
addq %rax, %r10
shlq $0x3, %r10
leaq (,%rbx,8), %rax
subq %rax, %r10
movq -0x68(%rbp), %rsi
addq %rsi, %r10
movq -0x38(%rbp), %r8
movq -0x90(%rbp), %rax
cmpq %rax, %r8
cmovgq %r8, %rax
cmpq %rcx, %rax
cmovleq %rcx, %rax
shlq $0x3, %rax
subq -0x40(%rbp), %rax
movq -0x70(%rbp), %r9
addq %r9, %rax
movq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rdx
cmpq %rdx, %r12
jge 0x1a901
movq (%rax,%r12,8), %rcx
incq %r12
incq %rcx
movq %rcx, (%r10)
leaq 0x8(%r10), %r10
je 0x1a5e3
jmp 0x1a8a8
movq -0x30(%rbp), %rax
cmpq %rsi, %rax
je 0x1a62a
movq %rdi, %rbx
movq %rax, %rdi
movq %r10, %rdx
movq %r8, %r14
movq %r10, %r15
callq 0x2f106
movq %r15, %r10
movq %r14, %r8
movq %rbx, %rdi
movq -0x60(%rbp), %rbx
jmp 0x1a93f
movq %rdx, %r12
movq %rax, %rbx
subq %r10, %rbx
movq %r9, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r9, %r14
movq %r10, %r15
callq 0x2f106
movq %r15, %rdx
subq %r15, %r13
je 0x1a699
movq -0x80(%rbp), %rcx
movq %rcx, %rax
negq %rax
cmovsq %rcx, %rax
movq -0x60(%rbp), %rcx
addq %rcx, %rax
movq -0x88(%rbp), %rdx
subq %rdx, %rax
cmpq %r12, %rax
cmovgeq %r12, %rax
addq %rdx, %rax
subq %rcx, %rax
leaq (%r14,%rax,8), %rdi
shlq $0x3, %r13
xorl %esi, %esi
movq %r13, %rdx
callq 0x6170
movq %r15, %rdx
leaq (%r14,%rbx,8), %rdi
movq -0x78(%rbp), %rsi
callq 0x2f106
xorl %r15d, %r15d
movq -0x60(%rbp), %rbx
movq -0x30(%rbp), %rdi
movq %r14, %rsi
movq -0x58(%rbp), %r12
jmp 0x1a919
movq %r10, %r12
subq %rax, %r12
movq %r9, %rdi
movq -0x78(%rbp), %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x2f106
testq %r14, %r14
movq -0x60(%rbp), %rbx
je 0x1a7e7
movq -0x68(%rbp), %rax
leaq (%rax,%r12,8), %rdi
leaq (,%r12,8), %rsi
addq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1ba80
testq %rax, %rax
movq -0x68(%rbp), %rsi
movq -0x50(%rbp), %r10
movq -0x38(%rbp), %rcx
movq -0x70(%rbp), %r11
movq -0x58(%rbp), %r12
je 0x1a7fe
movq -0x90(%rbp), %rdi
cmpq %rdi, %rcx
cmovgq %rcx, %rdi
movq -0x48(%rbp), %r14
cmpq %r14, %rdi
movq %r14, %rax
cmovlq %rdi, %rax
cmovleq %r14, %rdi
movq -0x88(%rbp), %r13
addq %r13, %rax
leaq (%rsi,%rax,8), %rcx
movq %rbx, %rdx
negq %rdx
movq -0xa8(%rbp), %r15
movq -0x80(%rbp), %r9
cmpq %r15, %r9
movq %r15, %r8
cmovgq %r9, %r8
addq %rbx, %r8
subq %r13, %r8
cmpq %r14, %r8
cmovgeq %r14, %r8
addq %rdi, %rax
addq %r13, %r8
shlq $0x3, %rax
subq -0x40(%rbp), %rax
addq %r11, %rax
leaq (%r8,%rdx), %rdi
cmpq %r12, %rdi
jge 0x1a90c
movq (%rax,%rdx,8), %rdi
leaq 0x1(%rdx), %r14
incq %rdi
movq %rdi, (%rcx,%rdx,8)
movq %r14, %rdx
je 0x1a784
movq -0x80(%rbp), %rcx
cmpq %r15, %rcx
movq %r15, %rax
cmovgq %rcx, %rax
addq %rbx, %rax
movq -0x88(%rbp), %rdx
subq %rdx, %rax
movq -0x48(%rbp), %rcx
cmpq %rcx, %rax
cmovgeq %rcx, %rax
addq %rdx, %r14
addq %rax, %r14
movq -0x38(%rbp), %rcx
jmp 0x1a7fe
xorl %r12d, %r12d
movq -0x60(%rbp), %rbx
movq -0x30(%rbp), %rdi
jmp 0x1a8a0
xorl %r14d, %r14d
movq -0x68(%rbp), %rsi
movq -0x50(%rbp), %r10
movq -0x38(%rbp), %rcx
movq -0x70(%rbp), %r11
movq -0x58(%rbp), %r12
xorl %r15d, %r15d
cmpq -0x78(%rbp), %rsi
je 0x1a912
cmpq %r12, %r14
jge 0x1a912
movq -0xa8(%rbp), %r8
movq -0x80(%rbp), %rax
cmpq %r8, %rax
cmovgq %rax, %r8
addq %rbx, %r8
subq -0x88(%rbp), %r8
movq -0x48(%rbp), %rdx
cmpq %rdx, %r8
cmovgeq %rdx, %r8
movq %r8, %rax
subq %r14, %rax
movq -0x90(%rbp), %rdi
cmpq %rdi, %rcx
cmovgq %rcx, %rdi
cmpq %rdx, %rdi
movq %rdx, %rcx
cmovlq %rdi, %rcx
cmovleq %rdx, %rdi
shlq $0x3, %rcx
leaq (%rcx,%r14,8), %rcx
shlq $0x3, %r8
leaq (%rcx,%rdi,8), %rdx
subq %r8, %rcx
addq %rsi, %rcx
subq %r8, %rdx
subq -0x40(%rbp), %rdx
addq %rdx, %r11
xorl %r15d, %r15d
xorl %edx, %edx
movq (%r11,%rdx,8), %rdi
movq %rdi, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x1a882
jmp 0x1a912
movq -0x30(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x38(%rbp), %r8
movq -0x70(%rbp), %r9
xorl %r15d, %r15d
cmpq -0x78(%rbp), %r14
je 0x1a6b4
cmpq %rdx, %r12
jge 0x1a6b4
movq -0x90(%rbp), %rdx
cmpq %rdx, %r8
cmovgq %r8, %rdx
movq -0x48(%rbp), %rcx
cmpq %rcx, %rdx
movq %rcx, %rax
cmovlq %rdx, %rax
cmovleq %rcx, %rdx
shlq $0x3, %rdx
subq -0x40(%rbp), %rdx
addq %rdx, %r9
xorl %r15d, %r15d
movq (%r9,%r12,8), %rcx
movq %rcx, (%r14,%r12,8)
incq %r12
cmpq %r12, %rax
jne 0x1a8ec
jmp 0x1a6b4
movl $0x1, %r15d
jmp 0x1a6b4
movl $0x1, %r15d
movq %r10, %r12
movq -0x30(%rbp), %rdi
movq %rdi, %r14
movq %r12, %rdx
callq 0x2f106
movq %r15, (%r14,%r12,8)
addq %r15, %r12
addq %r15, %rbx
movq %r12, %r10
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %r8
movl %r10d, %eax
negl %eax
testl %r8d, %r8d
cmovnsl %r10d, %eax
movl %eax, 0x4(%rdi)
movq %rbx, 0x8(%rdi)
movq -0xc0(%rbp), %rdi
testq %rdi, %rdi
jne 0x1a9c1
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, -0xa0(%rbp)
leaq -0xc0(%rbp), %rdi
movq %rdx, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
movq -0x40(%rbp), %rsi
movq %r8, -0x98(%rbp)
movq %r10, -0x50(%rbp)
movq %r11, -0x38(%rbp)
callq 0x2fdb0
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rdx
movq -0x38(%rbp), %r11
movq -0x50(%rbp), %r10
movq -0x98(%rbp), %r8
movq -0xa0(%rbp), %rdi
movq %rax, %r9
jmp 0x1a4d6
callq 0x2fde3
jmp 0x1a95e