// File: /workspace/github_cpp_makefile_star2_O1/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 $0x38, %rsp
movq %rdx, %r14
movq %rdi, %r15
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 0x70a7
movq %rax, %rbx
movq %rsi, %rdi
jmp 0x70b3
movq %rdx, %rbx
movq %rax, %rdx
movq %r14, %rdi
movq %rsi, %r14
testq %rbx, %rbx
je 0x7148
movl 0x4(%r14), %r13d
shrl $0x1f, %r13d
movl 0x4(%rdi), %eax
movl %eax, %r12d
shrl $0x1f, %r12d
movl %r12d, %ecx
andl %r13d, %ecx
testl %eax, %eax
cmovnsq %rbx, %rdx
movq %rdx, -0x50(%rbp)
movq %rcx, -0x48(%rbp)
leaq (%rcx,%rdx), %rax
movslq (%r15), %rcx
cmpq %rcx, %rax
movq %r15, -0x58(%rbp)
jbe 0x714f
movq %rdi, -0x40(%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 *0x8f8d(%rip)           # 0x100a8
movq %rax, 0x8(%r15)
movl %ebx, (%r15)
movl 0x4(%r15), %ecx
movl %ecx, %edx
negl %edx
cmovsl %ecx, %edx
cmpq %rdx, %rbx
movq %rax, -0x38(%rbp)
jae 0x713e
movl $0x0, 0x4(%r15)
movq -0x30(%rbp), %rbx
movq -0x40(%rbp), %rdi
jmp 0x7157
xorl %eax, %eax
jmp 0x7256
movq 0x8(%r15), %rax
movq %rax, -0x38(%rbp)
movq %r13, %rcx
negq %rcx
movq %r12, %rsi
negq %rsi
movq -0x48(%rbp), %r9
movq %r9, %r10
negq %r10
movq 0x8(%r14), %r15
movq 0x8(%rdi), %rax
movq %rax, -0x30(%rbp)
cmpq $0x1, %rbx
adcq $0x0, %rbx
xorl %r8d, %r8d
movq -0x38(%rbp), %rax
movq %r12, %r11
movq %rbx, %rdi
movq (%r15,%r8,8), %rbx
xorq %rcx, %rbx
addq %r13, %rbx
movq %rcx, %rdx
movq %r15, %rcx
setb %r15b
xorl %r13d, %r13d
movq -0x30(%rbp), %r14
movq (%r14,%r8,8), %r14
xorq %rsi, %r14
xorl %r12d, %r12d
addq %r11, %r14
setb %r12b
andq %r14, %rbx
xorq %r10, %rbx
addq %r9, %rbx
movb %r15b, %r13b
setb %r15b
movq %rbx, (%rax,%r8,8)
movq %rdi, %rbx
xorl %r9d, %r9d
movb %r15b, %r9b
movq %rcx, %r15
movq %rdx, %rcx
incq %r8
cmpq %r8, %rdi
jne 0x7188
cmpq %r11, %r14
jb 0x7288
movq -0x50(%rbp), %r14
cmpq %r14, %r8
movq -0x38(%rbp), %rdi
jae 0x7231
movq %r10, %rdx
movq (%r15,%r8,8), %r11
xorq %rcx, %r11
xorl %ebx, %ebx
addq %r13, %r11
setb %bl
andq %rsi, %r11
xorq %rdx, %r11
xorl %r10d, %r10d
addq %r9, %r11
setb %r10b
movq %r11, (%rdi,%r8,8)
incq %r8
movq %r10, %r9
movq %rbx, %r13
cmpq %r14, %r8
jb 0x71fe
jmp 0x7234
movq %r9, %r10
testq %r10, %r10
movq -0x58(%rbp), %r15
je 0x7269
movq $0x1, (%rdi,%r14,8)
incq %r14
movl %r14d, %eax
negl %eax
cmpq $0x0, -0x48(%rbp)
cmovel %r14d, %eax
movl %eax, 0x4(%r15)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %r14, %r14
je 0x7248
cmpq $0x0, -0x8(%rdi,%r14,8)
jne 0x7248
leaq -0x1(%r14), %rcx
cmpq $0x1, %r14
movq %rcx, %r14
jg 0x726e
xorl %r14d, %r14d
jmp 0x7248
leaq 0x3407(%rip), %rdi      # 0xa696
leaq 0x2dce(%rip), %rsi      # 0xa064
leaq 0x3401(%rip), %rcx      # 0xa69e
movl $0xe49, %edx            # imm = 0xE49
callq 0x1090