// File: /workspace/github_cpp_makefile_star2_O1/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 0x1a83a
movslq 0x4(%rdx), %r11
testl %r11d, %r11d
je 0x1a837
movq %r11, %rax
xorq %r8, %rax
js 0x1a859
movq $0x0, -0xc0(%rbp)
movq 0x8(%rsi), %rax
cmpq 0x8(%rdx), %rax
jge 0x1a884
movq %r8, %r9
movq %rsi, %rax
jmp 0x1a890
movq %rsi, %rdx
cmpq %rdi, %rdx
je 0x1adc2
movq %rdx, %rsi
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x19e00
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 0x1ae30
jmp 0x1adc2
movq %r11, %r9
movq %r8, %r11
movq %rdx, %rax
movq %rsi, %rdx
movq %r11, %rcx
negq %rcx
movq %r11, %rbx
movq %rcx, -0x88(%rbp)
cmovnsq %rcx, %rbx
movq %r9, %rsi
negq %rsi
movq %r9, -0x90(%rbp)
movq %r9, %rcx
movq %rsi, -0xa8(%rbp)
cmovnsq %rsi, %rcx
movq 0x8(%rdx), %r13
movslq (%rdi), %r9
movq 0x8(%rax), %rsi
movq %r13, -0x58(%rbp)
movq %rsi, -0x78(%rbp)
subq %rsi, %r13
xorl %esi, %esi
movq %rbx, %r12
subq %r9, %r12
movq %r9, %r10
cmovlq %rbx, %r10
cmovleq %rsi, %r12
movq %r9, %r14
subq %r13, %r14
leaq (%rcx,%r13), %r15
subq %r9, %r15
cmovleq %rcx, %r14
cmovleq %rsi, %r15
movq %r9, %rcx
shlq $0x3, %r15
addq 0x10(%rax), %r15
movq 0x10(%rdx), %rax
movq %rax, -0x80(%rbp)
movq 0x10(%rdi), %rdx
leaq (,%r9,8), %rsi
cmpq $0x7f00, %rsi           # imm = 0x7F00
ja 0x1add1
movq %rsp, %r9
leaq 0xf(%rsi), %rax
andq $-0x10, %rax
subq %rax, %r9
movq %r9, %rsp
movq -0x80(%rbp), %rax
leaq (%rax,%r12,8), %rax
cmpq %r13, %rcx
jle 0x1aa6c
movq %rax, -0x70(%rbp)
leaq (%r14,%r13), %rax
cmpq %r13, %rbx
movq %rdi, -0xa0(%rbp)
movq %r8, -0x98(%rbp)
movq %rdx, -0x30(%rbp)
movq %rax, -0x50(%rbp)
jle 0x1aa9a
movq %rsi, -0x60(%rbp)
movq %rcx, -0x40(%rbp)
movq %r11, -0x48(%rbp)
movq %rax, %rbx
subq %r10, %rbx
movq %r9, -0x68(%rbp)
movq %r10, -0x38(%rbp)
jle 0x1ab24
movq %r9, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2f4c6
movq -0x38(%rbp), %rdx
movq -0x68(%rbp), %rsi
leaq (%rsi,%rbx,8), %r14
movq %rdx, %r12
subq %r13, %r12
je 0x1ac37
leaq (%r15,%rbx,8), %rdx
movq %r14, %rdi
movq -0x70(%rbp), %rsi
movq %r12, %rcx
callq 0x1bfa0
testq %rax, %rax
movq -0x58(%rbp), %rbx
movq -0x80(%rbp), %r9
je 0x1acfc
movq -0xa8(%rbp), %r10
movq -0x90(%rbp), %rax
cmpq %r10, %rax
cmovgq %rax, %r10
addq %rbx, %r10
movq -0x78(%rbp), %rax
subq %rax, %r10
movq -0x40(%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 -0x48(%rbp), %r8
movq -0x88(%rbp), %rax
cmpq %rax, %r8
cmovgq %r8, %rax
cmpq %rcx, %rax
cmovleq %rcx, %rax
shlq $0x3, %rax
subq -0x60(%rbp), %rax
addq %r9, %rax
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rdx
cmpq %rdx, %r12
jge 0x1ad65
movq (%rax,%r12,8), %rcx
incq %r12
incq %rcx
movq %rcx, (%r10)
leaq 0x8(%r10), %r10
je 0x1aa4b
jmp 0x1ad0c
cmpq %rax, %rdx
je 0x1aa91
movq %rdi, %rbx
movq %rdx, %rdi
movq %rax, %rsi
movq %r10, %rdx
movq %r8, %r14
movq %r10, %r15
callq 0x2f4c6
movq %r15, %r10
movq %r14, %r8
movq %rbx, %rdi
movq -0x58(%rbp), %rbx
jmp 0x1ada3
movq %rcx, %r12
movq %rax, %rbx
subq %r10, %rbx
movq %r9, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r9, %r14
movq %r10, %r15
callq 0x2f4c6
movq %r15, %rdx
subq %r15, %r13
je 0x1ab00
movq -0x90(%rbp), %rcx
movq %rcx, %rax
negq %rax
cmovsq %rcx, %rax
movq -0x58(%rbp), %rcx
addq %rcx, %rax
movq -0x78(%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 -0x70(%rbp), %rsi
callq 0x2f4c6
xorl %r15d, %r15d
movq -0x58(%rbp), %rbx
movq -0x30(%rbp), %rdi
movq %r14, %rsi
movq -0x50(%rbp), %r12
jmp 0x1ad7d
movq %r10, %r12
subq %rax, %r12
movq %r9, %rdi
movq -0x70(%rbp), %r13
movq %r13, %rsi
movq %r12, %rdx
callq 0x2f4c6
testq %r14, %r14
movq -0x58(%rbp), %rbx
je 0x1ac4f
movq -0x68(%rbp), %rax
leaq (%rax,%r12,8), %rdi
leaq (,%r12,8), %rsi
addq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1bfa0
testq %rax, %rax
movq -0x68(%rbp), %rsi
movq -0x38(%rbp), %r9
movq -0x48(%rbp), %r10
movq -0x50(%rbp), %r11
movq -0x80(%rbp), %r12
movq -0x90(%rbp), %r13
je 0x1ac6d
movq -0x88(%rbp), %rdi
cmpq %rdi, %r10
cmovgq %r10, %rdi
movq -0x40(%rbp), %r14
cmpq %r14, %rdi
movq %r14, %rax
cmovlq %rdi, %rax
cmovleq %r14, %rdi
movq -0x78(%rbp), %r9
addq %r9, %rax
leaq (%rsi,%rax,8), %rcx
movq %rbx, %rdx
negq %rdx
movq -0xa8(%rbp), %r15
cmpq %r15, %r13
movq %r15, %r8
cmovgq %r13, %r8
addq %rbx, %r8
subq %r9, %r8
cmpq %r14, %r8
cmovgeq %r14, %r8
addq %rdi, %rax
addq %r9, %r8
movq -0x38(%rbp), %r9
shlq $0x3, %rax
subq -0x60(%rbp), %rax
addq %r12, %rax
leaq (%r8,%rdx), %rdi
cmpq %r11, %rdi
jge 0x1ad70
movq (%rax,%rdx,8), %rdi
leaq 0x1(%rdx), %r14
incq %rdi
movq %rdi, (%rcx,%rdx,8)
movq %r14, %rdx
je 0x1abef
cmpq %r15, %r13
movq %r15, %rax
cmovgq %r13, %rax
addq %rbx, %rax
movq -0x78(%rbp), %rdx
subq %rdx, %rax
movq -0x40(%rbp), %rcx
cmpq %rcx, %rax
cmovgeq %rcx, %rax
addq %rdx, %r14
addq %rax, %r14
jmp 0x1ac6d
xorl %r12d, %r12d
movq -0x58(%rbp), %rbx
movq -0x30(%rbp), %rdi
movq -0x48(%rbp), %r8
movq -0x80(%rbp), %r9
jmp 0x1ad0c
xorl %r14d, %r14d
movq -0x68(%rbp), %rsi
movq -0x38(%rbp), %r9
movq -0x48(%rbp), %r10
movq -0x50(%rbp), %r11
movq -0x80(%rbp), %r12
movq -0x90(%rbp), %r13
xorl %r15d, %r15d
cmpq -0x70(%rbp), %rsi
je 0x1ad76
cmpq %r11, %r14
jge 0x1ad76
movq -0xa8(%rbp), %r8
cmpq %r8, %r13
cmovgq %r13, %r8
addq %rbx, %r8
subq -0x78(%rbp), %r8
movq -0x40(%rbp), %rdx
cmpq %rdx, %r8
cmovgeq %rdx, %r8
movq %r8, %rax
subq %r14, %rax
movq -0x88(%rbp), %rdi
cmpq %rdi, %r10
cmovgq %r10, %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 -0x60(%rbp), %rdx
addq %rdx, %r12
xorl %r15d, %r15d
xorl %edx, %edx
movq (%r12,%rdx,8), %rdi
movq %rdi, (%rcx,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x1acea
jmp 0x1ad76
movq -0x30(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq -0x48(%rbp), %r8
xorl %r15d, %r15d
cmpq -0x70(%rbp), %r14
je 0x1ab1b
cmpq %rdx, %r12
jge 0x1ab1b
movq -0x88(%rbp), %rdx
cmpq %rdx, %r8
cmovgq %r8, %rdx
movq -0x40(%rbp), %rcx
cmpq %rcx, %rdx
movq %rcx, %rax
cmovlq %rdx, %rax
cmovleq %rcx, %rdx
shlq $0x3, %rdx
subq -0x60(%rbp), %rdx
addq %rdx, %r9
xorl %r15d, %r15d
movq (%r9,%r12,8), %rcx
movq %rcx, (%r14,%r12,8)
incq %r12
cmpq %r12, %rax
jne 0x1ad50
jmp 0x1ab1b
movl $0x1, %r15d
jmp 0x1ab1b
movl $0x1, %r15d
movq %r9, %r12
movq -0x30(%rbp), %rdi
movq %rdi, %r14
movq %r12, %rdx
callq 0x2f4c6
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 0x1ae29
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 %rcx, -0x40(%rbp)
movq %r8, -0x98(%rbp)
movq %rdx, -0x30(%rbp)
movq %r10, -0x38(%rbp)
movq %r11, -0x48(%rbp)
movq %rsi, -0x60(%rbp)
callq 0x30170
movq -0x60(%rbp), %rsi
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %r11
movq -0x38(%rbp), %r10
movq -0x30(%rbp), %rdx
movq -0x98(%rbp), %r8
movq -0xa0(%rbp), %rdi
movq %rax, %r9
jmp 0x1a93a
callq 0x301a3
jmp 0x1adc2