user: Translate the below assembly code into C programming language:

```asm
<str2dbl>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    $0x0,%edx
  mov    %rdi,%rsi
  mov    $0x2e,%edi
  call   <firstIndexOf@plt>
  mov    %eax,0x8(%rsp)
  mov    $0x0,%ebp
  jmp    L35
L51:
  add    $0x1,%rbp
L35:
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    %ebp,%eax
  jl     L53
  movsbl (%rbx,%rbp,1),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L51
  movb   $0x0,(%rbx,%rbp,1)
  jmp    L51
L53:
  movzbl (%rbx),%r15d
  cmp    $0x2d,%r15b
  sete   %r13b
  sete   %r12b
  movzbl %r12b,%r12d
  cmpl   $0xffffffff,0x8(%rsp)
  je     L146
  mov    0x8(%rsp),%eax
  lea    -0x1(%rax),%ebp
  sub    %r12d,%ebp
  cmp    %r12d,%eax
  jle    L125
  movzbl %r13b,%r12d
  add    %rbx,%r12
  movzbl %r13b,%ecx
  mov    %ecx,0xc(%rsp)
  mov    %ecx,%r14d
  sub    %eax,%r14d
  add    %ebp,%r14d
  pxor   %xmm5,%xmm5
  movsd  %xmm5,(%rsp)
L27:
  mov    %ebp,%esi
  mov    $0xa,%edi
  call   <pow@plt>
  movsbl (%r12),%edx
  sub    $0x30,%edx
  movsbl %al,%eax
  imul   %eax,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  sub    $0x1,%ebp
  add    $0x1,%r12
  cmp    %r14d,%ebp
  jne    L27
  movzbl %r13b,%r13d
  sub    0xc(%rsp),%r13d
  mov    0x8(%rsp),%r12d
  add    %r13d,%r12d
L6:
  lea    0x1(%r12),%ebp
  movslq %ebp,%rbp
  jmp    L14
L146:
  mov    %rbx,%rdi
  call   <strlen@plt>
  lea    -0x1(%rax),%ebp
  sub    %r12d,%ebp
  js     L110
  movzbl %r13b,%r13d
  add    %rbx,%r13
  pxor   %xmm6,%xmm6
  movsd  %xmm6,(%rsp)
L138:
  mov    %ebp,%esi
  mov    $0xa,%edi
  call   <pow@plt>
  movsbl 0x0(%r13),%edx
  sub    $0x30,%edx
  movsbl %al,%eax
  imul   %eax,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  sub    $0x1,%ebp
  add    $0x1,%r13
  cmp    $0xffffffff,%ebp
  jne    L138
  jmp    L26
L125:
  pxor   %xmm7,%xmm7
  movsd  %xmm7,(%rsp)
  jmp    L6
L132:
  mov    %r13d,%esi
  mov    $0xa,%edi
  call   <pow@plt>
  movsbl (%rbx,%rbp,1),%edx
  sub    $0x30,%edx
  movsbl %al,%eax
  imul   %eax,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x1,%rbp
L14:
  mov    %r12d,%r13d
  sub    %ebp,%r13d
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    %ebp,%eax
  jg     L132
L26:
  cmp    $0x2d,%r15b
  jne    L117
  movsd  (%rsp),%xmm4
  xorpd  D4(%rip),%xmm4
  movsd  %xmm4,(%rsp)
L117:
  movsd  (%rsp),%xmm0
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L110:
  pxor   %xmm7,%xmm7
  movsd  %xmm7,(%rsp)
  jmp    L26
```

tool_calls: name: retrieve_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;
}
```