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

```asm
<str2dbl>:
  endbr64
  push   %r15
  mov    %rdi,%rsi
  xor    %edx,%edx
  push   %r14
  push   %r13
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    $0x2e,%edi
  sub    $0x18,%rsp
  call   <firstIndexOf@plt>
  mov    %eax,%ebp
  jmp    L48
  nopl   0x0(%rax,%rax,1)
L78:
  movsbl (%rbx,%r12,1),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L44
  movb   $0x0,(%rbx,%r12,1)
L44:
  add    $0x1,%r12
L48:
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    %r12d,%eax
  jge    L78
  movzbl (%rbx),%r12d
  cmp    $0x2d,%r12b
  sete   %r13b
  sete   %r15b
  movzbl %r13b,%r13d
  cmp    $0xffffffff,%ebp
  je     L79
  lea    -0x1(%rbp),%r14d
  sub    %r13d,%r14d
  cmp    %ebp,%r13d
  jge    L86
  movzbl %r15b,%r15d
  sub    %ebp,%r13d
  pxor   %xmm5,%xmm5
  add    %rbx,%r15
  add    %r14d,%r13d
  movsd  %xmm5,0x8(%rsp)
  nopl   0x0(%rax)
L93:
  mov    %r14d,%esi
  mov    $0xa,%edi
  sub    $0x1,%r14d
  add    $0x1,%r15
  call   <pow@plt>
  movsbl -0x1(%r15),%edx
  pxor   %xmm0,%xmm0
  movsbl %al,%eax
  sub    $0x30,%edx
  imul   %eax,%edx
  cvtsi2sd %edx,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  cmp    %r13d,%r14d
  jne    L93
L134:
  lea    0x1(%rbp),%r13d
  movslq %r13d,%r13
  jmp    L124
  nopl   (%rax)
L104:
  mov    %r14d,%esi
  mov    $0xa,%edi
  call   <pow@plt>
  movsbl (%rbx,%r13,1),%edx
  pxor   %xmm0,%xmm0
  add    $0x1,%r13
  movsbl %al,%eax
  sub    $0x30,%edx
  imul   %eax,%edx
  cvtsi2sd %edx,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
L124:
  mov    %ebp,%r14d
  mov    %rbx,%rdi
  sub    %r13d,%r14d
  call   <strlen@plt>
  cmp    %r13d,%eax
  jg     L104
L115:
  cmp    $0x2d,%r12b
  jne    L29
  movsd  0x8(%rsp),%xmm4
  xorpd  D4(%rip),%xmm4
  movsd  %xmm4,0x8(%rsp)
L29:
  movsd  0x8(%rsp),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L79:
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    -0x1(%rax),%ebp
  sub    %r13d,%ebp
  js     L119
  movzbl %r15b,%r15d
  pxor   %xmm6,%xmm6
  add    %r15,%rbx
  movsd  %xmm6,0x8(%rsp)
  nopl   0x0(%rax)
L61:
  mov    %ebp,%esi
  mov    $0xa,%edi
  sub    $0x1,%ebp
  add    $0x1,%rbx
  call   <pow@plt>
  movsbl -0x1(%rbx),%edx
  pxor   %xmm0,%xmm0
  movsbl %al,%eax
  sub    $0x30,%edx
  imul   %eax,%edx
  cvtsi2sd %edx,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  cmp    $0xffffffff,%ebp
  jne    L61
  jmp    L115
L86:
  pxor   %xmm7,%xmm7
  mov    %r13d,%ebp
  movsd  %xmm7,0x8(%rsp)
  jmp    L134
L119:
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  jmp    L115
```

tool_calls: name: extract_symbolic_data
arguments: tag: D4
type: f32[4]

tool: {"D4": [0.0,-0.0,0.0,0.0]}

assistant: ```c
double str2dbl(char *str) {
  int j = 0, i, n = firstIndexOf('.', str, 0), neg = 0;
  double result = 0;
  for (i = 0; i <= strlen(str); i++)
    if (isspace(str[i]))
      str[i] = '\0';
  if (str[0] == '-') {
    neg = 1;
    j = 1;
  }
  if (n == -1) {
    n = strlen(str);
    for (i = n - 1 - neg; i >= 0; i--) {
      result += pow(10, i) * (str[j] - 48);
      j++;
    }
  } else {
    j = n - 1 - neg;
    for (i = neg ? 1 : 0; i < n; i++) {
      result += pow(10, j) * (str[i] - 48);
      j--;
    }
    i++;
    j = -1;
    for (i = i; i < strlen(str); i++) {
      result += pow(10, j) * (str[i] - 48);
      j--;
    }
  }
  if (neg)
    result *= -1;
  return result;
}
```