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

```asm
<luaO_str2d>:
  endbr64
  push   %r13
  pxor   %xmm4,%xmm4
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x18,%rsp
  movsd  %xmm4,0x8(%rsp)
  jmp    L14
  nopl   (%rax)
L168:
  movsbl (%rbx),%eax
  movsd  D1(%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)
L14:
  movzbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L168
  movzbl (%rbx),%edi
  xor    %ebp,%ebp
  cmp    $0x2e,%dil
  je     L217
L128:
  call   <toupper@plt>
  cmp    $0x45,%al
  jne    L18
  jmp    L210
  nopl   0x0(%rax)
L213:
  add    $0x1,%rbx
L18:
  movzbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L213
  cmpb   $0x0,(%rbx)
  jne    L38
  test   %ebp,%ebp
  jg     L39
  jne    L52
L182:
  movsd  0x8(%rsp),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L39:
  mov    %ebp,%edi
  call   <expten@plt>
  movsd  0x8(%rsp),%xmm6
  divsd  %xmm0,%xmm6
  movsd  %xmm6,0x8(%rsp)
  jmp    L182
  nopl   0x0(%rax)
L38:
  movsd  D20(%rip),%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L182
L210:
  movzbl 0x1(%rbx),%edi
  cmp    $0x2d,%dil
  je     L19
  cmp    $0x2b,%dil
  je     L122
  add    $0x1,%rbx
  mov    $0x1,%r13d
L200:
  call   <isdigit@plt>
  xor    %r12d,%r12d
  test   %rax,%rax
  je     L38
  nop
L190:
  movsbl (%rbx),%eax
  movzbl 0x1(%rbx),%edi
  lea    (%r12,%r12,4),%edx
  add    $0x1,%rbx
  lea    -0x30(%rax,%rdx,2),%r12d
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L190
  imul   %r12d,%r13d
  sub    %r13d,%ebp
  jmp    L18
  nopw   0x0(%rax,%rax,1)
L217:
  add    $0x1,%rbx
  jmp    L30
  cs nopw 0x0(%rax,%rax,1)
L209:
  movsbl (%rbx),%eax
  pxor   %xmm1,%xmm1
  add    $0x1,%rbx
  add    $0x1,%ebp
  movsd  D1(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
L30:
  movzbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L209
  movzbl (%rbx),%edi
  jmp    L128
L122:
  movzbl 0x2(%rbx),%edi
  mov    $0x1,%r13d
  add    $0x2,%rbx
  jmp    L200
  nopl   (%rax)
L19:
  movzbl 0x2(%rbx),%edi
  mov    $0xffffffff,%r13d
  add    $0x2,%rbx
  jmp    L200
  nopl   0x0(%rax,%rax,1)
L52:
  mov    %ebp,%edi
  neg    %edi
  call   <expten@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  jmp    L182
```

tool_calls: name: parse_data
arguments: data_tag: D1
datatype: f64
name: parse_data
arguments: data_tag: D20
datatype: f32[2]

tool: D1: 10

tool: {"D20": [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;
}
```