user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<atof>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r13
  mov    %rdi,%rbx
  mov    $0x0,%ebp
  jmp    L45
L49:
  add    $0x1,%ebp
L45:
  mov    %rbx,%r12
  movsbl (%rbx),%edi
  call   <isspace@plt>
  add    $0x1,%rbx
  test   %rax,%rax
  jne    L49
  movzbl (%r12),%eax
  cmp    $0x2d,%al
  je     L64
  sub    $0x2b,%eax
  movl   $0x1,0x1c(%rsp)
  test   $0xfd,%al
  je     L186
L100:
  movslq %ebp,%r14
  add    %r13,%r14
  mov    %r14,%rbx
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L127
L64:
  movl   $0xffffffff,0x1c(%rsp)
L186:
  add    $0x1,%ebp
  jmp    L100
L124:
  movsd  0x8(%rsp),%xmm0
  mulsd  D28(%rip),%xmm0
  movsbl (%rbx),%eax
  sub    $0x30,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  add    $0x1,%rbx
L127:
  mov    %ebp,%r12d
  sub    %r14d,%r12d
  add    %ebx,%r12d
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L124
  cmpb   $0x2e,(%rbx)
  sete   %al
  movzbl %al,%eax
  add    %eax,%r12d
  movslq %r12d,%r14
  add    %r13,%r14
  mov    %r14,%rbp
  movsd  D26(%rip),%xmm6
  movsd  %xmm6,0x10(%rsp)
  jmp    L172
L141:
  movsd  0x8(%rsp),%xmm0
  mulsd  D28(%rip),%xmm0
  movsbl 0x0(%rbp),%eax
  sub    $0x30,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
  movsd  0x10(%rsp),%xmm2
  mulsd  D28(%rip),%xmm2
  movsd  %xmm2,0x10(%rsp)
  add    $0x1,%rbp
L172:
  mov    %r12d,%ebx
  sub    %r14d,%ebx
  add    %ebp,%ebx
  mov    %rbp,%r15
  movsbl 0x0(%rbp),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L141
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x1c(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  divsd  0x10(%rsp),%xmm0
  movq   %xmm0,%rbp
  movzbl (%r15),%eax
  and    $0xffffffdf,%eax
  cmp    $0x45,%al
  sete   %al
  movzbl %al,%eax
  add    %eax,%ebx
  movslq %ebx,%rax
  movzbl 0x0(%r13,%rax,1),%eax
  cmp    $0x2d,%al
  je     L32
  sub    $0x2b,%eax
  mov    $0x1,%r14d
  test   $0xfd,%al
  je     L46
L81:
  movslq %ebx,%rbx
  add    %r13,%rbx
  mov    $0x0,%r12d
  jmp    L8
L32:
  mov    $0xffffffff,%r14d
L46:
  add    $0x1,%ebx
  jmp    L81
L76:
  lea    (%r12,%r12,4),%edx
  movsbl (%rbx),%eax
  lea    -0x30(%rax,%rdx,2),%r12d
  add    $0x1,%rbx
L8:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L76
  test   %r12d,%r12d
  jle    L125
  movsd  D28(%rip),%xmm0
  movapd %xmm0,%xmm1
  jmp    L169
L39:
  movq   %rbp,%xmm4
  mulsd  %xmm1,%xmm4
  movq   %xmm4,%rbp
L184:
  add    $0x1,%eax
  cmp    %eax,%r12d
  je     L125
L169:
  cmp    $0x1,%r14d
  je     L39
  movq   %rbp,%xmm3
  divsd  %xmm0,%xmm3
  movq   %xmm3,%rbp
  jmp    L184
L125:
  movq   %rbp,%xmm0
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D28
type_guessed: f64
name: retrieve_data
arguments: tag: D26
type_guessed: f64

tool: D28: 10

tool: D26: 1

assistant: ```c
double atof(char s[]) {
  double val, power;
  int i, j, sign, scientific;
  for (i = 0; isspace(s[i]); i++) {
    ;
  }
  sign = (s[i] == '-') ? -1 : 1;
  if (s[i] == '+' || s[i] == '-') {
    i++;
  }
  for (val = 0.0; isdigit(s[i]); i++) {
    val = val * 10.0 + (s[i] - '0');
  }
  if (s[i] == '.') {
    i++;
  }
  for (power = 1.0; isdigit(s[i]); i++) {
    val = val * 10.0 + (s[i] - '0');
    power *= 10.0;
  }
  val = sign * val / power;
  if (s[i] == 'e' || s[i] == 'E') {
    i++;
  }
  sign = (s[i] == '-') ? -1 : 1;
  if (s[i] == '+' || s[i] == '-') {
    i++;
  }
  for (scientific = 0; isdigit(s[i]); i++) {
    scientific = scientific * 10 + (s[i] - '0');
  }
  for (i = 0; i < scientific; i++) {
    if (sign == 1) {
      val *= 10.0;
    } else {
      val /= 10.0;
    }
  }
  return val;
}
```