user: Converte this assembly snippet into its equivalent C code:

```asm
<atof>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L120
L172:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x14(%rbp),%xmm1
  movsd  D8(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0xc(%rbp),%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
L120:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  je     L137
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L172
L137:
  cmpl   $0x2e,-0xc(%rbp)
  jne    L78
  jmp    L62
L134:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x14(%rbp),%xmm1
  movsd  D8(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0xc(%rbp),%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  subl   $0x1,-0x10(%rbp)
L62:
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x0,-0xc(%rbp)
  je     L78
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L134
L78:
  cmpl   $0x65,-0xc(%rbp)
  je     L97
  cmpl   $0x45,-0xc(%rbp)
  jne    L25
L97:
  movl   $0x1,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x2b,-0xc(%rbp)
  jne    L160
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  jmp    L11
L160:
  cmpl   $0x2d,-0xc(%rbp)
  jne    L11
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
  movl   $0xffffffff,-0x8(%rbp)
  jmp    L11
L87:
  mov    -0x4(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%edx
  mov    -0xc(%rbp),%eax
  sub    $0x30,%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,-0xc(%rbp)
L11:
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L87
  mov    -0x4(%rbp),%eax
  imul   -0x8(%rbp),%eax
  add    %eax,-0x10(%rbp)
  jmp    L25
L28:
  movss  -0x14(%rbp),%xmm1
  movss  D4(%rip),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x14(%rbp)
  subl   $0x1,-0x10(%rbp)
L25:
  cmpl   $0x0,-0x10(%rbp)
  jg     L28
  jmp    L37
L112:
  pxor   %xmm1,%xmm1
  cvtss2sd -0x14(%rbp),%xmm1
  movsd  D10(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
  movss  %xmm0,-0x14(%rbp)
  addl   $0x1,-0x10(%rbp)
L37:
  cmpl   $0x0,-0x10(%rbp)
  js     L112
  movss  -0x14(%rbp),%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D8
type_infered: f64
name: retrieve_data
arguments: data_label: D4
type_infered: byte[4]
name: retrieve_data
arguments: data_label: D10
type_infered: f64

tool: D8: 10

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

tool: D10: 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;
}
```