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

```asm
<atof>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  jmp    L7
  nopl   (%rax)
L9:
  add    $0x1,%r13d
L7:
  movsbl (%rbx),%edi
  mov    %rbx,%r12
  add    $0x1,%rbx
  call   <isspace@plt>
  test   %rax,%rax
  jne    L9
  movzbl (%r12),%eax
  cmp    $0x2d,%al
  je     L193
  mov    $0x1,%r12d
  cmp    $0x2b,%al
  je     L72
L61:
  movq   $0x0,0x8(%rsp)
  movslq %r13d,%rbx
  add    %rbp,%rbx
  sub    %ebx,%r13d
  jmp    L107
  nopw   0x0(%rax,%rax,1)
L13:
  movsbl (%rbx),%eax
  movsd  D7(%rip),%xmm0
  pxor   %xmm1,%xmm1
  add    $0x1,%rbx
  mulsd  0x8(%rsp),%xmm0
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
L107:
  movsbl (%rbx),%edi
  lea    0x0(%r13,%rbx,1),%r14d
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L13
  movzbl (%rbx),%eax
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0x45,%dl
  jne    L140
  lea    0x1(%r14),%r15d
  movslq %r15d,%rbx
  movzbl 0x0(%rbp,%rbx,1),%eax
  cmp    $0x2d,%al
  je     L222
  mov    $0x1,%r13d
  cmp    $0x2b,%al
  je     L187
L118:
  movq   $0x0,0x10(%rsp)
  add    %rbp,%rbx
  sub    %ebx,%r15d
  jmp    L164
L234:
  movsbl (%rbx),%eax
  movsd  D7(%rip),%xmm0
  pxor   %xmm1,%xmm1
  add    $0x1,%rbx
  mulsd  0x10(%rsp),%xmm0
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rsp)
L164:
  movsbl (%rbx),%edi
  lea    (%r15,%rbx,1),%r14d
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L234
  movsd  D48(%rip),%xmm6
  movzbl (%rbx),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %r13d,%xmm1
  mulsd  0x10(%rsp),%xmm1
  movsd  %xmm6,0x18(%rsp)
  cmp    $0x2e,%al
  je     L182
L215:
  and    $0xffffffdf,%eax
  cmp    $0x45,%al
  jne    L84
  lea    0x1(%r14),%ebx
  movslq %ebx,%rbx
  movzbl 0x0(%rbp,%rbx,1),%eax
  cmp    $0x2d,%al
  je     L138
  mov    $0x1,%r13d
  cmp    $0x2b,%al
  je     L179
L50:
  movq   $0x0,0x10(%rsp)
  add    %rbp,%rbx
  jmp    L54
  xchg   %ax,%ax
L80:
  movsbl (%rbx),%eax
  movsd  D7(%rip),%xmm0
  pxor   %xmm1,%xmm1
  add    $0x1,%rbx
  mulsd  0x10(%rsp),%xmm0
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rsp)
L54:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L80
  pxor   %xmm1,%xmm1
  cvtsi2sd %r13d,%xmm1
  mulsd  0x10(%rsp),%xmm1
  jmp    L84
  nopl   0x0(%rax,%rax,1)
L193:
  mov    $0xffffffff,%r12d
L72:
  add    $0x1,%r13d
  jmp    L61
  nop
L140:
  cmp    $0x2e,%al
  je     L59
  movsd  D48(%rip),%xmm5
  pxor   %xmm1,%xmm1
  movsd  %xmm5,0x18(%rsp)
L84:
  mov    D7(%rip),%rax
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  movq   %rax,%xmm0
  call   <pow@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  0x8(%rsp),%xmm0
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L59:
  pxor   %xmm1,%xmm1
L182:
  lea    0x1(%r14),%r13d
  movsd  D48(%rip),%xmm7
  movslq %r13d,%rbx
  add    %rbp,%rbx
  movsd  %xmm7,0x18(%rsp)
  sub    %ebx,%r13d
  jmp    L249
  nopl   0x0(%rax)
L112:
  movsbl (%rbx),%eax
  pxor   %xmm2,%xmm2
  add    $0x1,%rbx
  movsd  D7(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  D7(%rip),%xmm4
  mulsd  0x18(%rsp),%xmm4
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm2
  addsd  %xmm0,%xmm2
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm2,0x8(%rsp)
L249:
  movsbl (%rbx),%edi
  movsd  %xmm1,0x10(%rsp)
  lea    0x0(%r13,%rbx,1),%r14d
  call   <isdigit@plt>
  movsd  0x10(%rsp),%xmm1
  test   %rax,%rax
  jne    L112
  movzbl (%rbx),%eax
  jmp    L215
  nopl   0x0(%rax)
L222:
  mov    $0xffffffff,%r13d
L187:
  lea    0x2(%r14),%r15d
  movslq %r15d,%rbx
  jmp    L118
  nopw   0x0(%rax,%rax,1)
L138:
  mov    $0xffffffff,%r13d
L179:
  lea    0x2(%r14),%ebx
  movslq %ebx,%rbx
  jmp    L50
```

tool_calls: name: parse_data
arguments: tag: D7
datatype: f64
name: parse_data
arguments: tag: D48
datatype: f64

tool: D7: 10

tool: D48: 1

assistant: ```c
double atof(char s[]) {
  double value = 0.0;
  double fractional_power = 1.0;
  int sign = 1;
  int str_index = 0;
  double power_of_ten = 0.0;
  for (str_index = 0; isspace(s[str_index]); ++str_index) {
  }
  sign = (s[str_index] == '-' ? -1 : 1);
  if (s[str_index] == '-' || s[str_index] == '+') {
    ++str_index;
  }
  for (value = 0.0; isdigit(s[str_index]); ++str_index) {
    value = value * 10.0 + (s[str_index] - '0');
  }
  if (s[str_index] == 'e' || s[str_index] == 'E') {
    ++str_index;
    int power_of_ten_sign = (s[str_index] == '-' ? -1 : 1);
    if (s[str_index] == '+' || s[str_index] == '-') {
      ++str_index;
    }
    for (power_of_ten = 0.0; isdigit(s[str_index]); ++str_index) {
      power_of_ten = power_of_ten * 10.0 + (s[str_index] - '0');
    }
    power_of_ten *= power_of_ten_sign;
  }
  if (s[str_index] == '.') {
    ++str_index;
    for (fractional_power = 1.0; isdigit(s[str_index]); ++str_index) {
      value = value * 10.0 + (s[str_index] - '0');
      fractional_power *= 10.0;
    }
  }
  if (s[str_index] == 'e' || s[str_index] == 'E') {
    ++str_index;
    int power_of_ten_sign = (s[str_index] == '-' ? -1 : 1);
    if (s[str_index] == '+' || s[str_index] == '-') {
      ++str_index;
    }
    for (power_of_ten = 0.0; isdigit(s[str_index]); ++str_index) {
      power_of_ten = power_of_ten * 10.0 + (s[str_index] - '0');
    }
    power_of_ten *= power_of_ten_sign;
  }
  return (sign * value / fractional_power) * pow(10.0, power_of_ten);
}
```