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

```asm
<atof>:
  endbr64
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  jmp    L116
  nop
L121:
  add    $0x1,%rbx
L116:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L121
  movsbl (%rbx),%edi
  cmp    $0x2d,%dil
  je     L88
  xor    %ebp,%ebp
  cmp    $0x2b,%dil
  je     L172
L189:
  pxor   %xmm0,%xmm0
  jmp    L128
L140:
  movsbl (%rbx),%eax
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm0
  movsbl 0x1(%rbx),%edi
  mulsd  D50(%rip),%xmm0
  add    $0x1,%rbx
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm1
  addsd  %xmm1,%xmm0
  cvtsd2ss %xmm0,%xmm0
L128:
  movss  %xmm0,0x8(%rsp)
  call   <isdigit@plt>
  movss  0x8(%rsp),%xmm0
  test   %rax,%rax
  jne    L140
  movsbl (%rbx),%edi
  cmp    $0x2e,%dil
  je     L34
L52:
  movss  %xmm0,0x8(%rsp)
  call   <toupper@plt>
  movss  0x8(%rsp),%xmm0
  cmp    $0x45,%al
  je     L73
L112:
  test   %bpl,%bpl
  je     L51
  xorps  D42(%rip),%xmm0
L51:
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L172:
  movsbl 0x1(%rbx),%edi
  add    $0x1,%rbx
  jmp    L189
  nopl   (%rax)
L88:
  movsbl 0x1(%rbx),%edi
  mov    $0x1,%ebp
  add    $0x1,%rbx
  jmp    L189
  nopw   0x0(%rax,%rax,1)
L34:
  movss  D48(%rip),%xmm1
  add    $0x1,%rbx
  jmp    L75
  xchg   %ax,%ax
L3:
  movsbl (%rbx),%eax
  pxor   %xmm2,%xmm2
  add    $0x1,%rbx
  sub    $0x30,%eax
  cvtsi2ss %eax,%xmm2
  mulss  %xmm1,%xmm2
  cvtss2sd %xmm1,%xmm1
  mulsd  D26(%rip),%xmm1
  addss  %xmm2,%xmm0
  cvtsd2ss %xmm1,%xmm1
L75:
  movsbl (%rbx),%edi
  movss  %xmm0,0xc(%rsp)
  movss  %xmm1,0x8(%rsp)
  call   <isdigit@plt>
  movss  0x8(%rsp),%xmm1
  movss  0xc(%rsp),%xmm0
  test   %rax,%rax
  jne    L3
  movsbl (%rbx),%edi
  jmp    L52
  nopw   0x0(%rax,%rax,1)
L73:
  lea    0x1(%rbx),%rdi
  call   <atoi@plt>
  movss  0x8(%rsp),%xmm0
  test   %al,%al
  mov    %eax,%edx
  je     L112
  movss  D46(%rip),%xmm1
  movsd  D26(%rip),%xmm2
  jmp    L82
  nopl   0x0(%rax,%rax,1)
L139:
  mulss  %xmm1,%xmm0
  sub    $0x1,%edx
L123:
  test   %dl,%dl
  je     L112
L82:
  test   %dl,%dl
  jns    L139
  cvtss2sd %xmm0,%xmm0
  mulsd  %xmm2,%xmm0
  add    $0x1,%edx
  cvtsd2ss %xmm0,%xmm0
  jmp    L123
```

tool_calls: name: unpack_data
arguments: tag: D50
datatype: f64
name: unpack_data
arguments: tag: D42
datatype: byte[16]
name: unpack_data
arguments: tag: D48
datatype: f32
name: unpack_data
arguments: tag: D26
datatype: byte[8]
name: unpack_data
arguments: tag: D46
datatype: byte[4]

tool: D50: 10

tool: {"D42": [0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D48: 0.1

tool: {"D26": [0x9a,0x99,0x99,0x99,0x99,0x99,0xb9,0x3f]}

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

assistant: ```c
float atof(char *s) {
  float value, fraction;
  signed char iexp;
  char sign;
  while (isspace(*s))
    s++;
  if (*s == '-') {
    sign = 1;
    s++;
  } else {
    sign = 0;
    if (*s == '+')
      s++;
  }
  for (value = 0.0; isdigit(*s); s++) {
    value = 10.0 * value + (*s - '0');
  }
  if (*s == '.') {
    s++;
    for (fraction = 0.1; isdigit(*s); s++) {
      value += (*s - '0') * fraction;
      fraction *= 0.1;
    }
  }
  if (toupper(*s) == 'E') {
    s++;
    iexp = (signed char)atoi(s);
    {
      while (iexp != 0) {
        if (iexp < 0) {
          value *= 0.1;
          iexp++;
        } else {
          value *= 10.0;
          iexp--;
        }
      }
    }
  }
  if (sign)
    value *= -1.0;
  return (value);
}
```