user: Please show me the C implementation that matches the assembly code listed below:

```asm
<question_mark>:
  endbr64
  push   %r15
  push   %r14
  mov    %edi,%r14d
  push   %r13
  mov    %esi,%r13d
  xor    %esi,%esi
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x18,%rsp
  call   <mpf_set_ui@plt>
  mov    %r13d,%edi
  call   <mpf_sgn@plt>
  test   %rax,%rax
  jne    L13
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L13:
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  mov    %ebp,%edi
  call   <mpf_init@plt>
  mov    %r12d,%edi
  call   <mpf_init@plt>
  xor    %edi,%edi
  call   <mpf_init@plt>
  xor    %r8d,%r8d
  mov    %r8d,%edi
  mov    %r8d,(%rsp)
  call   <mpf_init@plt>
  mov    %ebp,%edi
  call   <mpf_init@plt>
  mov    %r13d,%esi
  mov    %r12d,%edi
  call   <mpf_set@plt>
  mov    (%rsp),%r8d
  mov    $0x1,%esi
  mov    %r8d,%edi
  mov    %r8d,0xc(%rsp)
  call   <mpf_set_ui@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %rbx,%xmm0
  mulsd  D4(%rip),%xmm0
  call   <floor@plt>
  mov    0xc(%rsp),%esi
  mov    %ebp,%edi
  mov    %rax,%rbx
  lea    -0x2(%rax),%rdx
  mov    %rax,(%rsp)
  call   <mpf_div_2exp@plt>
  test   %rbx,%rbx
  js     L11
  mov    $0x1,%r13d
  mov    $0xffffffffffffffff,%rbx
  jmp    L24
  cs nopw 0x0(%rax,%rax,1)
L8:
  xor    %edx,%edx
  mov    %r14d,%esi
  mov    %r14d,%edi
  call   <mpf_sub@plt>
  xor    %esi,%esi
  xor    %edi,%edi
  call   <mpf_cmp@plt>
  test   %rax,%rax
  js     L11
L39:
  add    $0x1,%r13d
  cmp    %rbx,(%rsp)
  jle    L11
L24:
  xor    %ebp,%ebp
  xor    %r12d,%r12d
  xor    %r15d,%r15d
  mov    $0x1,%esi
  mov    %r12d,%edx
  mov    %ebp,%edi
  call   <mpf_ui_div@plt>
  mov    %ebp,%esi
  mov    %r15d,%edi
  call   <mpf_floor@plt>
  mov    %r15d,%edx
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <mpf_sub@plt>
  mov    %r15d,%edi
  call   <mpf_get_si@plt>
  xor    %esi,%esi
  mov    %ebp,%edi
  add    %rax,%rbx
  mov    %rbx,%rdx
  call   <mpf_div_2exp@plt>
  test   $0x1,%r13b
  je     L8
  mov    %r14d,%esi
  mov    %r14d,%edi
  mov    %ebp,%edx
  call   <mpf_add@plt>
  xor    %esi,%esi
  xor    %edi,%edi
  call   <mpf_cmp@plt>
  test   %rax,%rax
  jns    L39
L11:
  xor    %ebp,%ebp
  mov    %ebp,%edi
  call   <mpf_clear@plt>
  xor    %edi,%edi
  call   <mpf_clear@plt>
  xor    %edi,%edi
  call   <mpf_clear@plt>
  xor    %edi,%edi
  call   <mpf_clear@plt>
  add    $0x18,%rsp
  mov    %ebp,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1130 <mpf_clear@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D4
datatype: f64

tool: D4: 3.321

assistant: ```c
void question_mark(mpf_t qmark, const mpf_t x, unsigned int prec) {
  mpf_t ox, h, bits, one, low_bound;
  long bitsdone, ibits;
  int place;
  mpf_set_ui(qmark, 0);
  if (0 == mpf_sgn(x))
    return;
  mpf_init(ox);
  mpf_init(h);
  mpf_init(bits);
  mpf_init(one);
  mpf_init(low_bound);
  mpf_set(h, x);
  mpf_set_ui(one, 1);
  long nbits = (long)floor(3.321 * prec);
  mpf_div_2exp(low_bound, one, nbits - 2);
  bitsdone = -1;
  place = 1;
  while (bitsdone < nbits) {
    mpf_ui_div(ox, 1, h);
    mpf_floor(bits, ox);
    mpf_sub(h, ox, bits);
    ibits = mpf_get_si(bits);
    bitsdone += ibits;
    mpf_div_2exp(ox, one, bitsdone);
    if (place % 2 == 1) {
      mpf_add(qmark, qmark, ox);
    } else {
      mpf_sub(qmark, qmark, ox);
    }
    if (mpf_cmp(h, low_bound) < 0)
      break;
    place++;
  }
  mpf_clear(ox);
  mpf_clear(h);
  mpf_clear(bits);
  mpf_clear(one);
  mpf_clear(low_bound);
}
```