// File: marxn[P]pupp/3rdparty/gmp/./mini-gmp/mini-gmp.c
// Function: mpz_gcd
void
mpz_gcd (mpz_t g, const mpz_t u, const mpz_t v)
{
  mpz_t tu, tv;
  mp_bitcnt_t uz, vz, gz;

  if (u->_mp_size == 0)
    {
      mpz_abs (g, v);
      return;
    }
  if (v->_mp_size == 0)
    {
      mpz_abs (g, u);
      return;
    }

  mpz_init (tu);
  mpz_init (tv);

  mpz_abs (tu, u);
  uz = mpz_make_odd (tu);
  mpz_abs (tv, v);
  vz = mpz_make_odd (tv);
  gz = GMP_MIN (uz, vz);

  if (tu->_mp_size < tv->_mp_size)
    mpz_swap (tu, tv);

  mpz_tdiv_r (tu, tu, tv);
  if (tu->_mp_size == 0)
    {
      mpz_swap (g, tv);
    }
  else
    for (;;)
      {
	int c;

	mpz_make_odd (tu);
	c = mpz_cmp (tu, tv);
	if (c == 0)
	  {
	    mpz_swap (g, tu);
	    break;
	  }
	if (c < 0)
	  mpz_swap (tu, tv);

	if (tv->_mp_size == 1)
	  {
	    mp_limb_t vl = tv->_mp_d[0];
	    mp_limb_t ul = mpz_tdiv_ui (tu, vl);
	    mpz_set_ui (g, mpn_gcd_11 (ul, vl));
	    break;
	  }
	mpz_sub (tu, tu, tv);
      }
  mpz_clear (tu);
  mpz_clear (tv);
  mpz_mul_2exp (g, g, gz);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x6bf3
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43f0
jmp 0x6d7a
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jne 0x6c0f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x43f0
jmp 0x6d7a
leaq -0x30(%rbp), %rdi
callq 0x31e0
leaq -0x40(%rbp), %rdi
callq 0x31e0
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x43f0
leaq -0x30(%rbp), %rdi
callq 0x6d90
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43f0
leaq -0x40(%rbp), %rdi
callq 0x6d90
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x50(%rbp), %rax
jae 0x6c69
movq -0x48(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x6c71
movq -0x50(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x3c(%rbp), %eax
jge 0x6c8e
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4480
leaq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x5880
cmpl $0x0, -0x2c(%rbp)
jne 0x6cb7
movq -0x8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4480
jmp 0x6d57
jmp 0x6cb9
leaq -0x30(%rbp), %rdi
callq 0x6d90
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x41b0
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jne 0x6ce7
movq -0x8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4480
jmp 0x6d55
cmpl $0x0, -0x5c(%rbp)
jge 0x6cfa
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4480
cmpl $0x1, -0x3c(%rbp)
jne 0x6d3f
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x6670
movq %rax, -0x70(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0x6840
movq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0x3350
jmp 0x6d55
leaq -0x30(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x4c50
jmp 0x6cb9
jmp 0x6d57
leaq -0x30(%rbp), %rdi
callq 0x32c0
leaq -0x40(%rbp), %rdi
callq 0x32c0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x58(%rbp), %rdx
callq 0x5000
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)