user: 请从给定的汇编指令推导出C源代码：

```asm
<atof>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x28,%rsp
  jmp    L165
  nopl   0x0(%rax)
L196:
  add    $0x1,%ebp
L165:
  movsbl (%rbx),%edi
  mov    %rbx,%r13
  add    $0x1,%rbx
  call   <isspace@plt>
  test   %rax,%rax
  jne    L196
  movsbl 0x0(%r13),%edi
  cmp    $0x2d,%dil
  je     L161
  movl   $0x1,0x1c(%rsp)
  movslq %ebp,%r13
  cmp    $0x2b,%dil
  je     L30
L56:
  add    %r12,%r13
  pxor   %xmm6,%xmm6
  mov    %r13,%r15
  movsd  %xmm6,0x8(%rsp)
  jmp    L13
  nopl   (%rax)
L169:
  movsbl -0x1(%r15),%eax
  movsd  D10(%rip),%xmm0
  pxor   %xmm1,%xmm1
  mulsd  0x8(%rsp),%xmm0
  movsbl (%r15),%edi
  sub    $0x30,%eax
  cvtsi2sd %eax,%xmm1
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%rsp)
L13:
  call   <isdigit@plt>
  mov    %ebp,%ebx
  mov    %r15,%r14
  sub    %r13d,%ebx
  add    %r15d,%ebx
  add    $0x1,%r15
  test   %rax,%rax
  jne    L169
  movsbl (%r14),%edi
  movslq %ebx,%r13
  cmp    $0x2e,%dil
  jne    L182
  add    $0x1,%ebx
  movslq %ebx,%r13
  movsbl (%r12,%r13,1),%edi
L182:
  movsd  D15(%rip),%xmm7
  add    %r12,%r13
  mov    %r13,%r15
  movsd  %xmm7,0x10(%rsp)
  jmp    L180
  nopl   0x0(%rax,%rax,1)
L208:
  movsbl -0x1(%r15),%eax
  pxor   %xmm1,%xmm1
  movsbl (%r15),%edi
  movsd  D10(%rip),%xmm0
  mulsd  0x8(%rsp),%xmm0
  sub    $0x30,%eax
  movsd  D10(%rip),%xmm2
  cvtsi2sd %eax,%xmm1
  mulsd  0x10(%rsp),%xmm2
  addsd  %xmm0,%xmm1
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm1,0x8(%rsp)
L180:
  call   <isdigit@plt>
  mov    %ebx,%ebp
  mov    %r15,%r14
  sub    %r13d,%ebp
  add    %r15d,%ebp
  add    $0x1,%r15
  test   %rax,%rax
  jne    L208
  movzbl (%r14),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x1c(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  and    $0xffffffdf,%eax
  divsd  0x10(%rsp),%xmm0
  cmp    $0x45,%al
  jne    L162
  lea    0x1(%rbp),%eax
  cltq
  movsbl (%r12,%rax,1),%edi
  cmp    $0x2d,%dil
  je     L207
  mov    $0x1,%ebx
  cmp    $0x2b,%dil
  je     L130
L102:
  add    %rax,%r12
  xor    %ebp,%ebp
  jmp    L36
  nopl   0x0(%rax)
L110:
  movsbl -0x1(%r12),%eax
  lea    0x0(%rbp,%rbp,4),%edx
  movsbl (%r12),%edi
  lea    -0x30(%rax,%rdx,2),%ebp
L36:
  movsd  %xmm0,0x8(%rsp)
  add    $0x1,%r12
  call   <isdigit@plt>
  movsd  0x8(%rsp),%xmm0
  test   %rax,%rax
  jne    L110
  lea    -0x1(%rbp),%eax
  cmp    $0x1,%ebx
  je     L181
  movsd  D10(%rip),%xmm1
  test   %ebp,%ebp
  jle    L162
  nopl   0x0(%rax)
L71:
  divsd  %xmm1,%xmm0
  sub    $0x1,%eax
  jae    L71
L162:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L161:
  movl   $0xffffffff,0x1c(%rsp)
L30:
  add    $0x1,%ebp
  movslq %ebp,%r13
  movsbl (%r12,%r13,1),%edi
  jmp    L56
  nopl   0x0(%rax,%rax,1)
L207:
  mov    $0xffffffff,%ebx
L130:
  lea    0x2(%rbp),%eax
  cltq
  movsbl (%r12,%rax,1),%edi
  jmp    L102
  nopl   0x0(%rax)
L181:
  test   %ebp,%ebp
  jle    L162
  movsd  D10(%rip),%xmm1
  nopl   0x0(%rax)
L1:
  mulsd  %xmm1,%xmm0
  sub    $0x1,%eax
  jae    L1
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D10
type_infered: f64
name: unpack_data
arguments: data_label: D15
type_infered: f64

tool: D10: 10

tool: D15: 1

assistant: ```c
double atof(char s[]) {
  double val, power;
  int exp, i, sign;
  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 = 10.0 * val + (s[i] - '0');
  if (s[i] == '.')
    i++;
  for (power = 1.0; isdigit(s[i]); i++) {
    val = 10.0 * val + (s[i] - '0');
    power *= 10.0;
  }
  val = sign * val / power;
  if (s[i] == 'e' || s[i] == 'E') {
    sign = (s[++i] == '-') ? -1 : 1;
    if (s[i] == '+' || s[i] == '-')
      i++;
    for (exp = 0; isdigit(s[i]); i++)
      exp = 10 * exp + (s[i] - '0');
    if (sign == 1)
      while (exp-- > 0)
        val *= 10;
    else
      while (exp-- > 0)
        val /= 10;
  }
  return val;
}
```