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

```asm
<hex_to_double>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
L76:
  mov    -0x48(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x48(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
  cmpb   $0x20,-0x35(%rbp)
  je     L104
  cmpb   $0xa,-0x35(%rbp)
  je     L168
  cmpb   $0x9,-0x35(%rbp)
  je     L57
  cmpb   $0xc,-0x35(%rbp)
  je     L66
  cmpb   $0xb,-0x35(%rbp)
  jne    L140
  jmp    L76
L104:
  nop
  jmp    L76
L168:
  nop
  jmp    L76
L57:
  nop
  jmp    L76
L66:
  nop
  jmp    L76
L140:
  nop
  movsd  D18(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  cmpb   $0x2d,-0x35(%rbp)
  jne    L70
  movsd  D25(%rip),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x48(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
L70:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  cmpb   $0x2e,-0x35(%rbp)
  je     L53
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  jmp    L126
L53:
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x10(%rbp)
L179:
  mov    -0x48(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x48(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
  movsbl -0x35(%rbp),%eax
  mov    %eax,%edi
  call   <hexdig@plt>
  mov    %eax,-0x2c(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  js     L71
  jmp    L179
L71:
  nop
  mov    -0x48(%rbp),%rax
  sub    $0x1,%rax
  mov    %rax,-0x28(%rbp)
  jmp    L137
L77:
  subq   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <hexdig@plt>
  mov    %eax,-0x2c(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x2c(%rbp),%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D16(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
L137:
  mov    -0x28(%rbp),%rax
  cmp    -0x10(%rbp),%rax
  ja     L77
  movl   $0x0,-0x34(%rbp)
  cmpb   $0x78,-0x35(%rbp)
  je     L169
  cmpb   $0x58,-0x35(%rbp)
  jne    L182
L169:
  mov    -0x48(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x48(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
  movl   $0x1,-0x30(%rbp)
  cmpb   $0x2d,-0x35(%rbp)
  jne    L85
  movl   $0xffffffff,-0x30(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x48(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
L85:
  movsbl -0x35(%rbp),%eax
  mov    %eax,%edi
  call   <hexdig@plt>
  mov    %eax,-0x2c(%rbp)
  cmpl   $0x0,-0x2c(%rbp)
  js     L186
  mov    -0x34(%rbp),%eax
  shl    $0x4,%eax
  mov    %eax,%edx
  mov    -0x2c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x34(%rbp)
  mov    -0x48(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x48(%rbp)
  movzbl (%rax),%eax
  mov    %al,-0x35(%rbp)
  jmp    L85
L186:
  nop
  mov    -0x34(%rbp),%eax
  imul   -0x30(%rbp),%eax
  mov    %eax,-0x34(%rbp)
L182:
  mov    -0x34(%rbp),%edx
  mov    -0x18(%rbp),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <ldexp@plt>
  movsd  -0x20(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
L126:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D18
type: f64
name: retrieve_data
arguments: tag: D25
type: f32[2]
name: retrieve_data
arguments: tag: D16
type: f64

tool: D18: 1

tool: {"D25": [0.0,-1.875]}

tool: D16: 0.0625

assistant: ```c
double hex_to_double(char *s) {
  char c;
  char *p1;
  char *p2;
  int digit;
  int expon;
  int esign;
  double msign;
  double mant;
  double value;
  for (;;) {
    c = *s++;
    if (c == ' ')
      continue;
    if (c == '\n')
      continue;
    if (c == '\t')
      continue;
    if (c == '\f')
      continue;
    if (c != '\v')
      break;
  }
  msign = 1.0;
  if (c == '-') {
    msign = -1.0;
    c = *s++;
  }
  mant = 0.0;
  if (c != '.')
    return (msign * mant);
  p1 = s;
  for (;;) {
    c = *s++;
    digit = hexdig(c);
    if (digit < 0)
      break;
  }
  for (p2 = s - 1; p2 > p1;) {
    digit = hexdig(*--p2);
    mant += ((double)digit);
    mant *= 0.0625;
  }
  expon = 0;
  if ((c == 'x') || (c == 'X')) {
    c = *s++;
    esign = 1;
    if (c == '-') {
      esign = -1;
      c = *s++;
    }
    for (;;) {
      digit = hexdig(c);
      if (digit < 0)
        break;
      expon = (expon << 4) + digit;
      c = *s++;
    }
    expon *= esign;
  }
  value = msign * ldexp(mant, expon);
  return (value);
}
```