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

```asm
<luaO_str2d>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x14(%rbp)
  jmp    L158
L124:
  movsd  -0x8(%rbp),%xmm1
  movsd  D0(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
L158:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L124
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L67
  addq   $0x1,-0x28(%rbp)
  jmp    L139
L153:
  movsd  -0x8(%rbp),%xmm1
  movsd  D0(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  addl   $0x1,-0x14(%rbp)
L139:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L153
L67:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  cmp    $0x45,%al
  jne    L93
  movl   $0x0,-0x10(%rbp)
  movl   $0x1,-0xc(%rbp)
  addq   $0x1,-0x28(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L35
  addq   $0x1,-0x28(%rbp)
  movl   $0xffffffff,-0xc(%rbp)
  jmp    L119
L35:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  jne    L119
  addq   $0x1,-0x28(%rbp)
L119:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L28
  movsd  D21(%rip),%xmm0
  jmp    L53
L28:
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x28(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x28(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %ecx,%eax
  mov    %eax,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L28
  mov    -0xc(%rbp),%eax
  imul   -0x10(%rbp),%eax
  sub    %eax,-0x14(%rbp)
  jmp    L93
L33:
  addq   $0x1,-0x28(%rbp)
L93:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L33
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L0
  movsd  D21(%rip),%xmm0
  jmp    L53
L0:
  cmpl   $0x0,-0x14(%rbp)
  jle    L83
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <expten@plt>
  movapd %xmm0,%xmm1
  movsd  -0x8(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L21
L83:
  cmpl   $0x0,-0x14(%rbp)
  jns    L21
  mov    -0x14(%rbp),%eax
  neg    %eax
  mov    %eax,%edi
  call   <expten@plt>
  movsd  -0x8(%rbp),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
L21:
  movsd  -0x8(%rbp),%xmm0
L53:
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D0
type_infered: f64
name: retrieve_data
arguments: data_tag: D21
type_infered: f32[2]

tool: D0: 10

tool: {"D21": [0.0,-1.875]}

assistant: ```c
double luaO_str2d(char *s) {
  double a = 0.0;
  int point = 0;
  while (isdigit((unsigned char)*s)) {
    a = 10.0 * a + (*(s++) - '0');
  }
  if (*s == '.') {
    s++;
    while (isdigit((unsigned char)*s)) {
      a = 10.0 * a + (*(s++) - '0');
      point++;
    }
  }
  if (toupper((unsigned char)*s) == 'E') {
    int e = 0;
    int sig = 1;
    s++;
    if (*s == '-') {
      s++;
      sig = -1;
    } else if (*s == '+')
      s++;
    if (!isdigit((unsigned char)*s))
      return -1;
    do {
      e = 10 * e + (*(s++) - '0');
    } while (isdigit((unsigned char)*s));
    point -= sig * e;
  }
  while (isspace((unsigned char)*s))
    s++;
  if (*s != '\0')
    return -1;
  if (point > 0)
    a /= expten(point);
  else if (point < 0)
    a *= expten(-point);
  return a;
}
```