// File: /workspace/github_cpp_makefile_star2_O1/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpz_xor
void
mpz_xor (mpz_t r, const mpz_t u, const mpz_t v)
{
  mp_size_t un, vn, i;
  mp_ptr up, vp, rp;

  mp_limb_t ux, vx, rx;
  mp_limb_t uc, vc, rc;
  mp_limb_t ul, vl, rl;

  un = GMP_ABS (u->_mp_size);
  vn = GMP_ABS (v->_mp_size);
  if (un < vn)
    {
      MPZ_SRCPTR_SWAP (u, v);
      MP_SIZE_T_SWAP (un, vn);
    }
  if (vn == 0)
    {
      mpz_set (r, u);
      return;
    }

  uc = u->_mp_size < 0;
  vc = v->_mp_size < 0;
  rc = uc ^ vc;

  ux = -uc;
  vx = -vc;
  rx = -rc;

  rp = MPZ_REALLOC (r, un + rc);

  up = u->_mp_d;
  vp = v->_mp_d;

  i = 0;
  do
    {
      ul = (up[i] ^ ux) + uc;
      uc = ul < uc;

      vl = (vp[i] ^ vx) + vc;
      vc = vl < vc;

      rl = (ul ^ vl ^ rx) + rc;
      rc = rl < rc;
      rp[i] = rl;
    }
  while (++i < vn);
  assert (vc == 0);

  for (; i < un; i++)
    {
      ul = (up[i] ^ ux) + uc;
      uc = ul < uc;

      rl = (ul ^ ux) + rc;
      rc = rl < rc;
      rp[i] = rl;
    }
  if (rc)
    rp[un++] = rc;
  else
    un = mpn_normalized_size (rp, un);

  r->_mp_size = rx ? -un : un;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %r15
movl 0x4(%rsi), %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movl 0x4(%rdx), %ecx
movl %ecx, %edi
negl %edi
cmovsl %ecx, %edi
cmpl %edi, %eax
jae 0x7525
movq %rax, %rbx
movq %rsi, %r9
jmp 0x7531
movq %rdi, %rbx
movq %rax, %rdi
movq %rdx, %r9
movq %rsi, %rdx
testq %rbx, %rbx
je 0x75cb
movl 0x4(%rdx), %eax
shrl $0x1f, %eax
movl %eax, -0x40(%rbp)
movl %eax, %r13d
movl 0x4(%r9), %eax
shrl $0x1f, %eax
movl %eax, -0x3c(%rbp)
movl %eax, %r12d
movq %r12, %r14
xorq %r13, %r14
movq %rdi, -0x60(%rbp)
leaq (%r14,%rdi), %rax
movslq (%r15), %rcx
cmpq %rcx, %rax
movq %r15, -0x58(%rbp)
jbe 0x75e4
movq %r9, -0x48(%rbp)
movq %rdx, -0x50(%rbp)
movq %rbx, -0x30(%rbp)
cmpq $0x2, %rax
movl $0x1, %ebx
cmovgeq %rax, %rbx
movq 0x8(%r15), %rdi
leaq (,%rbx,8), %rdx
xorl %esi, %esi
callq *0x8b0e(%rip)           # 0x100a8
movq %rax, -0x38(%rbp)
movq %rax, 0x8(%r15)
movl %ebx, (%r15)
movl 0x4(%r15), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
cmpq %rdx, %rbx
jae 0x75bd
movl $0x0, 0x4(%r15)
movq -0x30(%rbp), %rbx
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %r9
jmp 0x75ec
movq %r15, %rdi
movq %rdx, %rsi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24be
movq 0x8(%r15), %rax
movq %rax, -0x38(%rbp)
movq %r13, %rcx
negq %rcx
movq %r12, %rdi
negq %rdi
movq %r14, %r8
negq %r8
movq 0x8(%rdx), %r15
movq 0x8(%r9), %rax
movq %rax, -0x30(%rbp)
cmpq $0x1, %rbx
adcq $0x0, %rbx
xorl %esi, %esi
movq -0x38(%rbp), %rax
movq %r12, %r10
movq %rbx, %rdx
movq (%r15,%rsi,8), %rbx
xorq %rcx, %rbx
addq %r13, %rbx
movq %r15, %r9
setb %r15b
xorl %r13d, %r13d
movq -0x30(%rbp), %r11
movq (%r11,%rsi,8), %r11
xorq %rdi, %r11
xorl %r12d, %r12d
addq %r10, %r11
setb %r12b
xorq %r8, %rbx
xorq %r11, %rbx
addq %r14, %rbx
movb %r15b, %r13b
setb %r15b
movq %rbx, (%rax,%rsi,8)
movq %rdx, %rbx
xorl %r14d, %r14d
movb %r15b, %r14b
movq %r9, %r15
incq %rsi
cmpq %rsi, %rdx
jne 0x7618
cmpq %r10, %r11
jb 0x7712
movq -0x60(%rbp), %r11
cmpq %r11, %rsi
movq -0x38(%rbp), %rdx
jae 0x76ba
movq -0x58(%rbp), %r10
movq (%r15,%rsi,8), %r8
xorq %rcx, %r8
xorl %r9d, %r9d
addq %r13, %r8
setb %r9b
xorq %rcx, %r8
xorl %edi, %edi
addq %r14, %r8
setb %dil
movq %r8, (%rdx,%rsi,8)
incq %rsi
movq %rdi, %r14
movq %r9, %r13
cmpq %r11, %rsi
jb 0x7689
jmp 0x76c1
movq %r14, %rdi
movq -0x58(%rbp), %r10
testq %rdi, %rdi
je 0x76f3
movq $0x1, (%rdx,%r11,8)
incq %r11
movl %r11d, %eax
negl %eax
movl -0x3c(%rbp), %ecx
cmpl %ecx, -0x40(%rbp)
cmovel %r11d, %eax
movl %eax, 0x4(%r10)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r11, %r11
je 0x76d1
cmpq $0x0, -0x8(%rdx,%r11,8)
jne 0x76d1
leaq -0x1(%r11), %rcx
cmpq $0x1, %r11
movq %rcx, %r11
jg 0x76f8
xorl %r11d, %r11d
jmp 0x76d1
leaq 0x2f7d(%rip), %rdi      # 0xa696
leaq 0x2944(%rip), %rsi      # 0xa064
leaq 0x3009(%rip), %rcx      # 0xa730
movl $0xed7, %edx            # imm = 0xED7
callq 0x1090