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

```asm
<question_mark>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  mov    -0x34(%rbp),%eax
  mov    $0x0,%esi
  mov    %eax,%edi
  call   <mpf_set_ui@plt>
  mov    -0x38(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_sgn@plt>
  test   %rax,%rax
  je     L34
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_init@plt>
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_init@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_init@plt>
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_init@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_init@plt>
  mov    -0x38(%rbp),%edx
  mov    -0x28(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <mpf_set@plt>
  mov    -0x20(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <mpf_set_ui@plt>
  mov    -0x3c(%rbp),%eax
  test   %rax,%rax
  js     L53
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L24
L53:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L24:
  movsd  D4(%rip),%xmm1
  mulsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <floor@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  lea    -0x2(%rax),%rdx
  mov    -0x20(%rbp),%ecx
  mov    -0x1c(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mpf_div_2exp@plt>
  movq   $0xffffffffffffffff,-0x18(%rbp)
  movl   $0x1,-0x30(%rbp)
  jmp    L84
L10:
  mov    -0x28(%rbp),%edx
  mov    -0x2c(%rbp),%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <mpf_ui_div@plt>
  mov    -0x2c(%rbp),%edx
  mov    -0x24(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <mpf_floor@plt>
  mov    -0x24(%rbp),%edx
  mov    -0x2c(%rbp),%ecx
  mov    -0x28(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mpf_sub@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_get_si@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  add    %rax,-0x18(%rbp)
  mov    -0x18(%rbp),%rdx
  mov    -0x20(%rbp),%ecx
  mov    -0x2c(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mpf_div_2exp@plt>
  mov    -0x30(%rbp),%eax
  cltd
  shr    $0x1f,%edx
  add    %edx,%eax
  and    $0x1,%eax
  sub    %edx,%eax
  cmp    $0x1,%eax
  jne    L44
  mov    -0x2c(%rbp),%edx
  mov    -0x34(%rbp),%ecx
  mov    -0x34(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mpf_add@plt>
  jmp    L81
L44:
  mov    -0x2c(%rbp),%edx
  mov    -0x34(%rbp),%ecx
  mov    -0x34(%rbp),%eax
  mov    %ecx,%esi
  mov    %eax,%edi
  call   <mpf_sub@plt>
L81:
  mov    -0x1c(%rbp),%edx
  mov    -0x28(%rbp),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  call   <mpf_cmp@plt>
  test   %rax,%rax
  js     L21
  addl   $0x1,-0x30(%rbp)
L84:
  mov    -0x18(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  jl     L10
  jmp    L33
L21:
  nop
L33:
  mov    -0x2c(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_clear@plt>
  mov    -0x28(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_clear@plt>
  mov    -0x24(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_clear@plt>
  mov    -0x20(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_clear@plt>
  mov    -0x1c(%rbp),%eax
  mov    %eax,%edi
  call   <mpf_clear@plt>
  jmp    L30
L34:
  nop
L30:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D4
type_guessed: 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);
}
```