user: Translate the below assembly code into C programming language:

```asm
<mpfr_atrig>:
  endbr64
  push   %r15
  push   %r14
  mov    %r9,%r14
  push   %r13
  push   %r12
  mov    %edi,%r12d
  mov    $0x1,%edi
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    D120(%rip),%rax
  mov    %esi,0x18(%rsp)
  mov    %rdx,0x8(%rsp)
  mov    %ecx,0x1c(%rsp)
  mov    %r8d,0x14(%rsp)
  cmp    %r9,(%rax)
  je     L49
  mov    D43(%rip),%rax
  xor    %edi,%edi
  cmp    %r9,(%rax)
  sete   %dil
L49:
  call   <assert@plt>
  mov    0x14(%rsp),%edi
  call   <mpz_sgn@plt>
  test   %rax,%rax
  jne    L13
  mov    0x1c(%rsp),%edx
  test   %edx,%edx
  je     L34
  mov    D43(%rip),%rax
  mov    (%rax),%rdx
  mov    D120(%rip),%rax
  cmp    %r14,(%rax)
  jne    L42
L17:
  mov    0x18(%rsp),%esi
  mov    %r12d,%edi
  mov    0x8(%rsp),%rax
  call   *%rax
  mov    %r14,%rdx
  mov    %r12d,%esi
  mov    %r12d,%edi
  neg    %eax
  mov    %eax,%r13d
  call   <mpfr_neg@plt>
  add    $0x38,%rsp
  mov    %r13d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L34:
  mov    0x18(%rsp),%esi
  mov    0x8(%rsp),%rax
  add    $0x38,%rsp
  mov    %r14,%rdx
  pop    %rbx
  mov    %r12d,%edi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    *%rax
  nop
L13:
  xor    %eax,%eax
  call   <mpfr_get_emin@plt>
  mov    %eax,0x28(%rsp)
  xor    %eax,%eax
  call   <mpfr_get_emax@plt>
  mov    %eax,0x2c(%rsp)
  xor    %eax,%eax
  call   <mpfr_get_emin_min@plt>
  mov    %eax,%edi
  call   <mpfr_set_emin@plt>
  xor    %eax,%eax
  call   <mpfr_get_emax_max@plt>
  mov    %eax,%edi
  call   <mpfr_set_emax@plt>
  mov    %r12d,%edi
  call   <mpfr_get_prec@plt>
  mov    %r14,0x20(%rsp)
  mov    D43(%rip),%rbp
  lea    (%rax,%rax,1),%ebx
  jmp    L45
  xchg   %ax,%ax
L15:
  mov    D120(%rip),%rax
  mov    0x18(%rsp),%esi
  mov    %r13d,%edi
  mov    (%rax),%rdx
  mov    0x8(%rsp),%rax
  call   *%rax
  mov    0x0(%rbp),%rcx
  mov    %r13d,%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  call   <mpfr_sub@plt>
  mov    D120(%rip),%rcx
  mov    %r14d,%edi
  mov    (%rcx),%rsi
  call   <mpfr_const_pi@plt>
  mov    %r15d,%edx
  mov    %r14d,%esi
  xor    %r15d,%r15d
  mov    D120(%rip),%rcx
  mov    %r14d,%edi
  mov    (%rcx),%rcx
  call   <mpfr_mul_z@plt>
  mov    0x0(%rbp),%rdx
  mov    0x18(%rsp),%esi
  mov    %r15d,%edi
  mov    0x8(%rsp),%rax
  call   *%rax
  mov    D120(%rip),%rax
  mov    %r15d,%edx
  mov    %r14d,%esi
  mov    %r15d,%edi
  mov    (%rax),%rcx
  call   <mpfr_sub@plt>
L59:
  mov    %r14d,%edi
  call   <mpfr_clear@plt>
  mov    %r12d,%edi
  call   <mpfr_get_prec@plt>
  mov    0x20(%rsp),%r14
  mov    %r15d,%edi
  mov    %eax,%esi
  mov    %r14,%rdx
  call   <mpfr_prec_round@plt>
  mov    %r12d,%edi
  call   <mpfr_get_prec@plt>
  mov    %r13d,%edi
  mov    %r14,%rdx
  mov    %eax,%esi
  call   <mpfr_prec_round@plt>
  mov    %r13d,%esi
  mov    %r15d,%edi
  call   <mpfr_cmp@plt>
  test   %rax,%rax
  je     L7
  xor    %edi,%edi
  call   <mpfr_clear@plt>
  xor    %edi,%edi
  call   <mpfr_clear@plt>
  mov    %r12d,%edi
  call   <mpfr_get_prec@plt>
  add    %eax,%ebx
L45:
  xor    %r14d,%r14d
  mov    %ebx,%esi
  xor    %r13d,%r13d
  mov    %r14d,%edi
  call   <mpfr_init2@plt>
  mov    %ebx,%esi
  xor    %edi,%edi
  call   <mpfr_init2@plt>
  mov    %ebx,%esi
  mov    %r13d,%edi
  call   <mpfr_init2@plt>
  mov    0x0(%rbp),%rsi
  mov    %r14d,%edi
  call   <mpfr_const_pi@plt>
  mov    0x14(%rsp),%r15d
  mov    %r14d,%esi
  mov    %r14d,%edi
  mov    0x0(%rbp),%rcx
  mov    %r15d,%edx
  call   <mpfr_mul_z@plt>
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jne    L15
  mov    0x18(%rsp),%r13d
  xor    %r15d,%r15d
  xor    %r14d,%r14d
  mov    0x0(%rbp),%rdx
  mov    %r15d,%edi
  mov    0x8(%rsp),%rax
  mov    %r13d,%esi
  call   *%rax
  mov    0x0(%rbp),%rcx
  mov    %r15d,%edx
  mov    %r14d,%esi
  mov    %r15d,%edi
  call   <mpfr_add@plt>
  mov    D120(%rip),%rcx
  mov    %r14d,%edi
  mov    (%rcx),%rsi
  call   <mpfr_const_pi@plt>
  mov    0x14(%rsp),%edx
  mov    %r14d,%esi
  mov    %r14d,%edi
  mov    D120(%rip),%rcx
  mov    (%rcx),%rcx
  call   <mpfr_mul_z@plt>
  mov    D120(%rip),%rcx
  mov    %r13d,%esi
  xor    %r13d,%r13d
  mov    %r13d,%edi
  mov    0x8(%rsp),%rax
  mov    (%rcx),%rdx
  call   *%rax
  mov    D120(%rip),%rax
  mov    %r13d,%edx
  mov    %r14d,%esi
  mov    %r13d,%edi
  mov    (%rax),%rcx
  call   <mpfr_add@plt>
  jmp    L59
  cs nopw 0x0(%rax,%rax,1)
L7:
  mov    0x20(%rsp),%r14
  xor    %r13d,%r13d
  mov    %r12d,%edi
  mov    %r13d,%esi
  mov    %r14,%rdx
  call   <mpfr_set@plt>
  mov    %r13d,%edi
  call   <mpfr_clear@plt>
  xor    %edi,%edi
  call   <mpfr_clear@plt>
  mov    0x28(%rsp),%edi
  call   <mpfr_set_emin@plt>
  mov    0x2c(%rsp),%edi
  call   <mpfr_set_emax@plt>
  xor    %esi,%esi
  mov    %r14,%rdx
  mov    %r12d,%edi
  mov    D120(%rip),%rax
  cmp    %r14,(%rax)
  sete   %sil
  add    $0x38,%rsp
  pop    %rbx
  lea    -0x1(%rsi,%rsi,1),%esi
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1240 <mpfr_check_range@plt>
  nopl   0x0(%rax)
L42:
  xor    %edi,%edi
  cmp    %rdx,%r14
  sete   %dil
  call   <assert@plt>
  mov    D120(%rip),%rax
  mov    (%rax),%rdx
  jmp    L17
```

assistant: ```c
int mpfr_atrig(mpfr_ptr rop, mpfr_srcptr op, int (*fun)(mpfr_ptr rop, mpfr_srcptr op, mpfr_rnd_t rnd), int sub, mpz_t npi, mpfr_rnd_t rnd) {
  assert(rnd == MPFR_RNDU || rnd == MPFR_RNDD);
  int t;
  if (mpz_sgn(npi) == 0) {
    if (sub) {
      mpfr_rnd_t rnd1 = rnd == MPFR_RNDU ? MPFR_RNDD : (assert(rnd == MPFR_RNDD), MPFR_RNDU);
      t = -(*fun)(rop, op, rnd1);
      mpfr_neg(rop, rop, rnd);
    } else {
      t = (*fun)(rop, op, rnd);
    }
    return t;
  }
  mpfr_exp_t emin_rop = mpfr_get_emin();
  mpfr_exp_t emax_rop = mpfr_get_emax();
  mpfr_set_emin(mpfr_get_emin_min());
  mpfr_set_emax(mpfr_get_emax_max());
  mpfr_prec_t prec = mpfr_get_prec(rop) * 2;
  for (;;) {
    mpfr_t pi, inf, sup;
    mpfr_init2(pi, prec);
    mpfr_init2(inf, prec);
    mpfr_init2(sup, prec);
    mpfr_const_pi(pi, MPFR_RNDD);
    mpfr_mul_z(pi, pi, npi, MPFR_RNDD);
    if (sub) {
      (*fun)(sup, op, MPFR_RNDU);
      mpfr_sub(sup, pi, sup, MPFR_RNDD);
    } else {
      (*fun)(inf, op, MPFR_RNDD);
      mpfr_add(inf, pi, inf, MPFR_RNDD);
    }
    mpfr_const_pi(pi, MPFR_RNDU);
    mpfr_mul_z(pi, pi, npi, MPFR_RNDU);
    if (sub) {
      (*fun)(inf, op, MPFR_RNDD);
      mpfr_sub(inf, pi, inf, MPFR_RNDU);
    } else {
      (*fun)(sup, op, MPFR_RNDU);
      mpfr_add(sup, pi, sup, MPFR_RNDU);
    }
    mpfr_clear(pi);
    mpfr_prec_round(inf, mpfr_get_prec(rop), rnd);
    mpfr_prec_round(sup, mpfr_get_prec(rop), rnd);
    if (mpfr_cmp(inf, sup) == 0) {
      mpfr_set(rop, inf, rnd);
      mpfr_clear(inf);
      mpfr_clear(sup);
      mpfr_set_emin(emin_rop);
      mpfr_set_emax(emax_rop);
      return mpfr_check_range(rop, rnd == MPFR_RNDU ? 1 : -1, rnd);
    }
    mpfr_clear(inf);
    mpfr_clear(sup);
    prec += mpfr_get_prec(rop);
  }
}
```