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

```asm
<atof>:
  endbr64
  push   %r14
  pxor   %xmm0,%xmm0
  push   %r13
  push   %r12
  push   %rbp
  lea    0x1(%rdi),%rbp
  push   %rbx
  sub    $0x10,%rsp
  movsbl (%rdi),%ebx
  test   %ebx,%ebx
  jne    L202
  jmp    L25
  nopl   0x0(%rax)
L166:
  sub    $0x30,%ebx
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm0
  add    $0x1,%rbp
  mulsd  D28(%rip),%xmm0
  cvtsi2sd %ebx,%xmm1
  movsbl -0x1(%rbp),%ebx
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  test   %ebx,%ebx
  je     L25
L202:
  mov    %ebx,%edi
  movss  %xmm0,0xc(%rsp)
  call   <isdigit@plt>
  movss  0xc(%rsp),%xmm0
  test   %rax,%rax
  jne    L166
  cmp    $0x2e,%ebx
  jne    L120
  lea    0x1(%rbp),%r12
  movsbl 0x0(%rbp),%ebp
  xor    %ebx,%ebx
  test   %ebp,%ebp
  jne    L50
  jmp    L25
  nopl   0x0(%rax,%rax,1)
L164:
  sub    $0x30,%ebp
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm0
  add    $0x1,%r12
  mulsd  D28(%rip),%xmm0
  cvtsi2sd %ebp,%xmm1
  sub    $0x1,%ebx
  movsbl -0x1(%r12),%ebp
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  test   %ebp,%ebp
  je     L206
L50:
  mov    %ebp,%edi
  movss  %xmm0,0xc(%rsp)
  call   <isdigit@plt>
  movss  0xc(%rsp),%xmm0
  test   %rax,%rax
  jne    L164
  and    $0xffffffdf,%ebp
  cmp    $0x45,%ebp
  jne    L77
L7:
  movsbl (%r12),%ebp
  cmp    $0x2b,%ebp
  je     L134
  lea    0x1(%r12),%r13
  mov    $0x1,%r14d
  cmp    $0x2d,%ebp
  jne    L38
  movsbl 0x1(%r12),%ebp
  lea    0x2(%r12),%r13
  mov    $0xffffffff,%r14d
L38:
  xor    %r12d,%r12d
  jmp    L21
  nopl   0x0(%rax)
L66:
  lea    (%r12,%r12,4),%eax
  add    $0x1,%r13
  lea    -0x30(%rbp,%rax,2),%r12d
  movsbl -0x1(%r13),%ebp
L21:
  mov    %ebp,%edi
  movss  %xmm0,0xc(%rsp)
  call   <isdigit@plt>
  movss  0xc(%rsp),%xmm0
  test   %rax,%rax
  jne    L66
  imul   %r14d,%r12d
  add    %r12d,%ebx
  test   %ebx,%ebx
  jle    L77
  movss  D20(%rip),%xmm1
  nopl   (%rax)
L17:
  mulss  %xmm1,%xmm0
  sub    $0x1,%ebx
  jne    L17
L25:
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L77:
  test   %ebx,%ebx
  je     L25
L206:
  movsd  D5(%rip),%xmm1
  nopw   0x0(%rax,%rax,1)
L143:
  cvtss2sd %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  add    $0x1,%ebx
  jne    L143
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  cs nopw 0x0(%rax,%rax,1)
L134:
  movsbl 0x1(%r12),%ebp
  lea    0x2(%r12),%r13
  mov    $0x1,%r14d
  jmp    L38
  cs nopw 0x0(%rax,%rax,1)
L120:
  and    $0xffffffdf,%ebx
  cmp    $0x45,%ebx
  jne    L25
  mov    %rbp,%r12
  xor    %ebx,%ebx
  jmp    L7
```

tool_calls: name: retrieve_data
arguments: tag: D28
type: f64
name: retrieve_data
arguments: tag: D20
type: byte[4]
name: retrieve_data
arguments: tag: D5
type: f64

tool: D28: 10

tool: {"D20": [0x00,0x00,0x20,0x41]}

tool: D5: 0.1

assistant: ```c
float atof(char *s) {
  float a = 0.0;
  int e = 0;
  int c;
  while ((c = *s++) != '\0' && isdigit(c)) {
    a = a * 10.0 + (c - '0');
  }
  if (c == '.') {
    while ((c = *s++) != '\0' && isdigit(c)) {
      a = a * 10.0 + (c - '0');
      e = e - 1;
    }
  }
  if (c == 'e' || c == 'E') {
    int sign = 1;
    int i = 0;
    c = *s++;
    if (c == '+')
      c = *s++;
    else if (c == '-') {
      c = *s++;
      sign = -1;
    }
    while (isdigit(c)) {
      i = i * 10 + (c - '0');
      c = *s++;
    }
    e += i * sign;
  }
  while (e > 0) {
    a *= 10.0;
    e--;
  }
  while (e < 0) {
    a *= 0.1;
    e++;
  }
  return a;
}
```