// File: /workspace/github_cpp_makefile_star2_O3/marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpz_and
void
mpz_and (mpz_t r, const mpz_t u, const mpz_t v)
{
  mp_size_t un, vn, rn, 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)
    {
      r->_mp_size = 0;
      return;
    }

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

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

  /* If the smaller input is positive, higher limbs don't matter. */
  rn = vx ? un : vn;

  rp = MPZ_REALLOC (r, rn + 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 < rn; i++)
    {
      ul = (up[i] ^ ux) + uc;
      uc = ul < uc;

      rl = ( (ul & vx) ^ rx) + rc;
      rc = rl < rc;
      rp[i] = rl;
    }
  if (rc)
    rp[rn++] = rc;
  else
    rn = mpn_normalized_size (rp, rn);

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movl 0x4(%rsi), %ecx
movl %ecx, %eax
negl %eax
cmovsl %ecx, %eax
movl 0x4(%rdx), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
cmpl %edx, %eax
jae 0x6fc2
movq %rax, %r13
movq %rsi, %r10
jmp 0x6fce
movq %rdx, %r13
movq %rax, %rdx
movq %r14, %r10
movq %rsi, %r14
testq %r13, %r13
je 0x704e
movl 0x4(%r14), %ebx
shrl $0x1f, %ebx
movl 0x4(%r10), %eax
movl %eax, %r12d
shrl $0x1f, %r12d
movl %r12d, %ecx
andl %ebx, %ecx
testl %eax, %eax
cmovnsq %r13, %rdx
movq %rdx, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
leaq (%rcx,%rdx), %r15
movslq (%rdi), %rcx
movq 0x8(%rdi), %rax
cmpq %rcx, %r15
movq %rdi, -0x38(%rbp)
jbe 0x7055
movq %r10, -0x30(%rbp)
leaq (,%r15,8), %rdx
movq %rax, %rdi
xorl %esi, %esi
callq *0x9085(%rip)           # 0x100a8
movq -0x38(%rbp), %rsi
movq %rax, -0x40(%rbp)
movq %rax, 0x8(%rsi)
movl %r15d, (%rsi)
movl 0x4(%rsi), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
cmpq %rdx, %r15
jae 0x7048
movl $0x0, 0x4(%rsi)
movq -0x30(%rbp), %r10
jmp 0x7059
xorl %eax, %eax
jmp 0x716b
movq %rax, -0x40(%rbp)
movq %rbx, %rdx
negq %rdx
movq %r12, %rsi
negq %rsi
movq -0x48(%rbp), %r8
movq %r8, %r9
negq %r9
movq 0x8(%r14), %r15
movq 0x8(%r10), %rax
movq %rax, -0x30(%rbp)
xorl %r10d, %r10d
movq -0x40(%rbp), %rax
movq %r12, %r11
movq %r15, %rcx
movq (%r15,%r10,8), %r15
xorq %rdx, %r15
addq %rbx, %r15
setb %dil
xorl %ebx, %ebx
movq -0x30(%rbp), %r14
movq (%r14,%r10,8), %r14
xorq %rsi, %r14
xorl %r12d, %r12d
addq %r11, %r14
setb %r12b
andq %r14, %r15
xorq %r9, %r15
addq %r8, %r15
movb %dil, %bl
setb %dil
movq %r15, (%rax,%r10,8)
movq %rcx, %r15
xorl %r8d, %r8d
movb %dil, %r8b
incq %r10
cmpq %r10, %r13
jne 0x7082
cmpq %r11, %r14
jb 0x717d
movq -0x50(%rbp), %r11
cmpl %r11d, %r13d
movq -0x40(%rbp), %r14
jae 0x7123
movq %rdx, %rax
movq %r9, %rdx
movq (%r15,%r13,8), %rdi
xorq %rax, %rdi
xorl %r10d, %r10d
addq %rbx, %rdi
setb %r10b
andq %rsi, %rdi
xorq %rdx, %rdi
xorl %r9d, %r9d
addq %r8, %rdi
setb %r9b
movq %rdi, (%r14,%r13,8)
incq %r13
movq %r9, %r8
movq %r10, %rbx
cmpq %r11, %r13
jb 0x70ee
jmp 0x7126
movq %r8, %r9
testq %r9, %r9
je 0x713c
movq $0x1, (%r14,%r11,8)
incq %r11
movq -0x38(%rbp), %rdi
jmp 0x715d
testq %r11, %r11
movq -0x38(%rbp), %rdi
je 0x715a
cmpq $0x0, -0x8(%r14,%r11,8)
jne 0x715d
leaq -0x1(%r11), %rax
cmpq $0x1, %r11
movq %rax, %r11
jg 0x7145
xorl %r11d, %r11d
movl %r11d, %eax
negl %eax
cmpq $0x0, -0x48(%rbp)
cmovel %r11d, %eax
movl %eax, 0x4(%rdi)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3512(%rip), %rdi      # 0xa696
leaq 0x2ed9(%rip), %rsi      # 0xa064
leaq 0x350c(%rip), %rcx      # 0xa69e
movl $0xe49, %edx            # imm = 0xE49
callq 0x1090