user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<mpfr_as_mpz>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %edx,-0x2c(%rbp)
  mov    %ecx,-0x30(%rbp)
  mov    %r8d,-0x34(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <mpfr_get_prec@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <mpfr_zero_p@plt>
  test   %rax,%rax
  je     L64
  mov    -0x24(%rbp),%eax
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <mpz_set_ui@plt>
  jmp    L10
L64:
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <mpfr_number_p@plt>
  test   %rax,%rax
  je     L44
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <mpfr_get_exp@plt>
  mov    %eax,-0x8(%rbp)
  mov    -0x28(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <mpfr_get_z_2exp@plt>
  mov    -0x24(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <mpz_abs@plt>
  mov    -0xc(%rbp),%eax
  lea    -0x1(%rax),%edx
  mov    -0x24(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <mpz_clrbit@plt>
  cmpl   $0x0,-0x34(%rbp)
  jne    L59
  mov    -0x8(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x24(%rbp),%ecx
  mov    -0x24(%rbp),%eax
  mov    $0x1,%edx
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mpz_add_ui@plt>
  jmp    L21
L59:
  mov    -0x2c(%rbp),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  sub    $0x1,%eax
  cmp    %eax,-0x8(%rbp)
  jl     L27
  mov    -0x8(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  sub    -0xc(%rbp),%eax
  add    $0x2,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L21
L27:
  movl   $0x1,-0x14(%rbp)
  mov    -0x8(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  mov    -0xc(%rbp),%eax
  sub    $0x1,%eax
  sub    -0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x24(%rbp),%ecx
  mov    -0x24(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mpz_tdiv_q_2exp@plt>
  jmp    L21
L44:
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <mpfr_inf_p@plt>
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x0,-0x34(%rbp)
  jne    L69
  mov    -0x30(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x24(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <mpz_set_ui@plt>
  jmp    L21
L69:
  mov    -0x30(%rbp),%eax
  sub    -0x2c(%rbp),%eax
  sub    -0xc(%rbp),%eax
  add    $0x3,%eax
  mov    %eax,-0x14(%rbp)
  mov    -0x24(%rbp),%eax
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <mpz_set_ui@plt>
L21:
  mov    -0x14(%rbp),%edx
  mov    -0x4(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <mpz_init_set_ui@plt>
  mov    -0x10(%rbp),%edx
  mov    -0x4(%rbp),%ecx
  mov    -0x4(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mpz_mul_2exp@plt>
  mov    -0x4(%rbp),%edx
  mov    -0x24(%rbp),%ecx
  mov    -0x24(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mpz_add@plt>
  mov    -0x4(%rbp),%eax
  mov    %eax,%edi
  call   <mpz_clear@plt>
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <mpfr_sgn@plt>
  test   %rax,%rax
  jns    L10
  mov    -0x24(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <mpz_neg@plt>
L10:
  leave
  ret
```

assistant: ```c
void mpfr_as_mpz(mpz_t m, mpfr_srcptr x, mpfr_exp_t emin, mpfr_exp_t emax, int subnormal) {
  mpfr_prec_t prec = mpfr_get_prec(x);
  if (mpfr_zero_p(x)) {
    mpz_set_ui(m, 0);
    return;
  }
  mpfr_uexp_t base_m;
  mp_bitcnt_t base_e = prec - 1;
  if (mpfr_number_p(x)) {
    mpfr_exp_t exp = mpfr_get_exp(x);
    mpfr_get_z_2exp(m, x);
    mpz_abs(m, m);
    mpz_clrbit(m, prec - 1);
    if (!subnormal) {
      base_m = exp - emin;
      mpz_add_ui(m, m, 1);
    } else if (exp >= emin + prec - 1) {
      base_m = exp - emin - prec + 2;
    } else {
      base_m = 1;
      base_e = exp - emin;
      mpz_tdiv_q_2exp(m, m, prec - 1 - base_e);
    }
  } else {
    assert(mpfr_inf_p(x));
    if (!subnormal) {
      base_m = emax - emin + 1;
      mpz_set_ui(m, 1);
    } else {
      base_m = emax - emin - prec + 3;
      mpz_set_ui(m, 0);
    }
  }
  mpz_t base;
  mpz_init_set_ui(base, base_m);
  mpz_mul_2exp(base, base, base_e);
  mpz_add(m, m, base);
  mpz_clear(base);
  if (mpfr_sgn(x) < 0) {
    mpz_neg(m, m);
  }
}
```