user: Converte this assembly snippet into its equivalent C code:

```asm
<fp_ess>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,(%rsp)
  mov    %esi,0x4(%rsp)
  mov    %edx,0x8(%rsp)
  mov    %ecx,%r13d
  mov    $0x0,%eax
  mov    %eax,0xc(%rsp)
  mov    %eax,%edi
  call   <mpf_init@plt>
  mov    $0x0,%ebx
  mov    %ebx,%edi
  call   <mpf_init@plt>
  mov    $0x0,%r14d
  mov    %r14d,%edi
  call   <mpf_init@plt>
  mov    $0x0,%ebp
  mov    %ebp,%edi
  call   <mpf_init@plt>
  mov    %ebx,%edi
  call   <mpf_init@plt>
  mov    $0x0,%r15d
  mov    %r15d,%edi
  call   <mpf_init@plt>
  mov    %ebx,%edi
  call   <mpf_init@plt>
  mov    $0x0,%r12d
  mov    %r12d,%edi
  call   <mpf_init@plt>
  mov    %ebp,%edi
  call   <mpf_init@plt>
  mov    %r13d,%esi
  mov    0xc(%rsp),%edi
  call   <fp_e_pi@plt>
  mov    $0x0,%esi
  mov    (%rsp),%edi
  call   <mpf_set_ui@plt>
  mov    $0x0,%esi
  mov    0x4(%rsp),%edi
  call   <mpf_set_ui@plt>
  mov    %ebp,%edi
  call   <mpf_init@plt>
  mov    %ebx,%edi
  call   <mpf_init@plt>
  mov    $0x1,%esi
  mov    %ebx,%edi
  call   <mpf_set_ui@plt>
  mov    %r13d,%r13d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r13,%xmm0
  mulsd  D16(%rip),%xmm0
  addsd  D6(%rip),%xmm0
  cvttsd2si %xmm0,%rdx
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <mpf_mul_2exp@plt>
  mov    $0x1,%r13d
L5:
  mov    %r13d,%esi
  mov    $0x0,%ebx
  mov    %ebx,%edi
  call   <mpf_set_ui@plt>
  mov    0x8(%rsp),%edx
  mov    %ebx,%esi
  mov    $0x0,%r14d
  mov    %r14d,%edi
  call   <mpf_pow_ui@plt>
  lea    0x0(%r13,%r13,1),%edx
  mov    $0x0,%esi
  mov    $0x0,%ebp
  mov    %ebp,%edi
  call   <mpf_pow_ui@plt>
  mov    $0x1,%edx
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <mpf_add_ui@plt>
  mov    $0x1,%edx
  mov    %ebp,%esi
  mov    $0x0,%r15d
  mov    %r15d,%edi
  call   <mpf_sub_ui@plt>
  mov    %ebx,%edx
  mov    %r14d,%esi
  mov    %ebx,%edi
  call   <mpf_mul@plt>
  mov    %ebx,%edx
  mov    $0x1,%esi
  mov    $0x0,%r12d
  mov    %r12d,%edi
  call   <mpf_ui_div@plt>
  mov    %r12d,%edx
  mov    (%rsp),%esi
  mov    %ebp,%edi
  call   <mpf_add@plt>
  mov    %ebp,%esi
  mov    (%rsp),%edi
  call   <mpf_set@plt>
  mov    %r15d,%edx
  mov    %r14d,%esi
  mov    %ebx,%edi
  call   <mpf_mul@plt>
  mov    %ebx,%edx
  mov    $0x1,%esi
  mov    %r12d,%edi
  call   <mpf_ui_div@plt>
  mov    %r12d,%edx
  mov    0x4(%rsp),%r15d
  mov    %r15d,%esi
  mov    %ebp,%edi
  call   <mpf_add@plt>
  mov    %ebp,%esi
  mov    %r15d,%edi
  call   <mpf_set@plt>
  mov    %ebp,%esi
  mov    %ebx,%edi
  call   <mpf_cmp@plt>
  test   %rax,%rax
  jg     L17
  add    $0x1,%r13d
  cmp    $0x3b9aca00,%r13d
  jne    L5
L17:
  mov    $0x0,%edi
  call   <mpf_clear@plt>
  mov    $0x0,%ebx
  mov    %ebx,%edi
  call   <mpf_clear@plt>
  mov    $0x0,%r14d
  mov    %r14d,%edi
  call   <mpf_clear@plt>
  mov    $0x0,%ebp
  mov    %ebp,%edi
  call   <mpf_clear@plt>
  mov    %ebx,%edi
  call   <mpf_clear@plt>
  mov    $0x0,%r15d
  mov    %r15d,%edi
  call   <mpf_clear@plt>
  mov    %ebx,%edi
  call   <mpf_clear@plt>
  mov    $0x0,%r12d
  mov    %r12d,%edi
  call   <mpf_clear@plt>
  mov    %ebp,%edi
  call   <mpf_clear@plt>
  mov    %ebx,%edi
  call   <mpf_clear@plt>
  mov    %ebp,%edi
  call   <mpf_clear@plt>
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D16
datatype: f64
name: retrieve_data
arguments: data_tag: D6
datatype: f64

tool: D16: 3.321928095

tool: D6: 1

assistant: ```c
void fp_ess(mpf_t ess_plus, mpf_t ess_minus, unsigned int k, unsigned int prec) {
  mpf_t e_pi, en, enp, epip, eppos, epneg, term, oterm, acc;
  mpf_init(e_pi);
  mpf_init(en);
  mpf_init(enp);
  mpf_init(epip);
  mpf_init(eppos);
  mpf_init(epneg);
  mpf_init(term);
  mpf_init(oterm);
  mpf_init(acc);
  fp_e_pi(e_pi, prec);
  mpf_set_ui(ess_plus, 0);
  mpf_set_ui(ess_minus, 0);
  double mex = ((double)prec) * 3.321928095;
  unsigned int imax = (unsigned int)(mex + 1.0);
  mpf_t maxterm, one;
  mpf_init(maxterm);
  mpf_init(one);
  mpf_set_ui(one, 1);
  mpf_mul_2exp(maxterm, one, imax);
  int n;
  for (n = 1; n < 1000000000; n++) {
    mpf_set_ui(en, n);
    mpf_pow_ui(enp, en, k);
    mpf_pow_ui(epip, e_pi, 2 * n);
    mpf_add_ui(eppos, epip, 1);
    mpf_sub_ui(epneg, epip, 1);
    mpf_mul(term, enp, eppos);
    mpf_ui_div(oterm, 1, term);
    mpf_add(acc, ess_plus, oterm);
    mpf_set(ess_plus, acc);
    mpf_mul(term, enp, epneg);
    mpf_ui_div(oterm, 1, term);
    mpf_add(acc, ess_minus, oterm);
    mpf_set(ess_minus, acc);
    if (mpf_cmp(term, maxterm) > 0)
      break;
  }
  mpf_clear(e_pi);
  mpf_clear(en);
  mpf_clear(enp);
  mpf_clear(epip);
  mpf_clear(eppos);
  mpf_clear(epneg);
  mpf_clear(term);
  mpf_clear(oterm);
  mpf_clear(acc);
  mpf_clear(one);
  mpf_clear(maxterm);
}
```