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

```asm
<atof>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r13
  mov    %rdi,%rbx
  mov    $0x0,%r12d
  jmp    L81
L51:
  add    $0x1,%r12d
L81:
  mov    %rbx,%rbp
  movsbl (%rbx),%edi
  call   <isspace@plt>
  add    $0x1,%rbx
  test   %rax,%rax
  jne    L51
  movzbl 0x0(%rbp),%eax
  cmp    $0x2d,%al
  je     L50
  sub    $0x2b,%eax
  movl   $0x1,0x18(%rsp)
  test   $0xfd,%al
  je     L140
L97:
  movslq %r12d,%r14
  add    %r13,%r14
  mov    %r14,%rbx
  pxor   %xmm4,%xmm4
  movsd  %xmm4,0x8(%rsp)
  jmp    L48
L50:
  movl   $0xffffffff,0x18(%rsp)
L140:
  add    $0x1,%r12d
  jmp    L97
L91:
  movsd  0x8(%rsp),%xmm0
  mulsd  D42(%rip),%xmm0
  movsbl (%rbx),%eax
  sub    $0x30,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  add    $0x1,%rbx
L48:
  mov    %r12d,%ebp
  sub    %r14d,%ebp
  add    %ebx,%ebp
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L91
  cmpb   $0x2e,(%rbx)
  sete   %al
  movzbl %al,%eax
  add    %eax,%ebp
  movslq %ebp,%r14
  add    %r13,%r14
  mov    %r14,%rbx
  movsd  D1(%rip),%xmm2
  movsd  %xmm2,0x10(%rsp)
  jmp    L111
L129:
  movsd  0x8(%rsp),%xmm0
  mulsd  D42(%rip),%xmm0
  movsbl (%rbx),%eax
  sub    $0x30,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  movsd  0x10(%rsp),%xmm5
  mulsd  D42(%rip),%xmm5
  movsd  %xmm5,0x10(%rsp)
  add    $0x1,%rbx
L111:
  mov    %ebp,%r12d
  sub    %r14d,%r12d
  add    %ebx,%r12d
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L129
  movzbl (%rbx),%eax
  and    $0xffffffdf,%eax
  cmp    $0x45,%al
  jne    L210
  lea    0x1(%r12),%ebp
  movslq %ebp,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  lea    -0x2b(%rax),%edx
  test   $0xfd,%dl
  je     L60
L32:
  movslq %ebp,%rbp
  add    %r13,%rbp
  mov    D69(%rip),%rbx
  jmp    L92
L210:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x18(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  0x10(%rsp),%xmm0
  jmp    L100
L60:
  lea    0x2(%r12),%ebp
  movsbl %al,%eax
  mov    %eax,0x1c(%rsp)
  jmp    L32
L29:
  movq   %rbx,%xmm0
  mulsd  D42(%rip),%xmm0
  movsbl 0x0(%rbp),%eax
  sub    $0x30,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rbx
  add    $0x1,%rbp
L92:
  movsbl 0x0(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L29
  movq   %rbx,%xmm3
  ucomisd D69(%rip),%xmm3
  jp     L13
  je     L82
L13:
  movsd  D1(%rip),%xmm1
  movsd  D42(%rip),%xmm3
  movapd %xmm1,%xmm2
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm4
L75:
  mulsd  %xmm3,%xmm1
  movq   %rbx,%xmm6
  subsd  %xmm2,%xmm6
  movq   %xmm6,%rbx
  ucomisd %xmm0,%xmm6
  jp     L75
  ucomisd %xmm4,%xmm6
  jne    L75
L208:
  cmpl   $0x2d,0x1c(%rsp)
  je     L0
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x18(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  divsd  0x10(%rsp),%xmm0
L100:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L82:
  movsd  D1(%rip),%xmm1
  jmp    L208
L0:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x18(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  divsd  0x10(%rsp),%xmm0
  jmp    L100
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D42
data_type: f64
name: extract_symbolic_data
arguments: data_label: D1
data_type: f64
name: extract_symbolic_data
arguments: data_label: D69
data_type: f64

tool: D42: 10

tool: D1: 1

tool: D69: 0

assistant: ```c
double atof(char s[]) {
  double val, power, pot, e = 1.0;
  int i, sign, sign_pot;
  for (i = 0; isspace(s[i]); i++)
    ;
  sign = (s[i] == '-') ? -1 : 1;
  if (s[i] == '+' || s[i] == '-')
    i++;
  for (val = 0.0; isdigit(s[i]); i++)
    val = 10.0 * val + (s[i] - '0');
  if (s[i] == '.')
    i++;
  for (power = 1.0; isdigit(s[i]); i++) {
    val = 10.0 * val + (s[i] - '0');
    power *= 10;
  }
  if (s[i] == 'e' || s[i] == 'E')
    i++;
  else
    return sign * val / power;
  if (s[i] == '-' || s[i] == '+')
    sign_pot = s[i++];
  for (pot = 0.0; isdigit(s[i]); i++)
    pot = 10 * pot + (s[i] - '0');
  while (pot != 0) {
    e *= 10;
    pot--;
  }
  if (sign_pot == '-')
    return sign * val / e / power;
  else
    return sign * val * e / power;
}
```