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

```asm
<m_atof>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  movsd  D17(%rip),%xmm2
  movsbl (%rdi),%ebx
  movsd  %xmm2,0x8(%rsp)
  cmp    $0x2d,%bl
  jne    L123
  movsd  D41(%rip),%xmm4
  movsbl 0x1(%rdi),%ebx
  add    $0x1,%rdi
  movsd  %xmm4,0x8(%rsp)
L123:
  lea    0x1(%rdi),%rbp
  pxor   %xmm0,%xmm0
  test   %ebx,%ebx
  jne    L170
  jmp    L39
  nopl   (%rax)
L220:
  sub    $0x30,%ebx
  pxor   %xmm1,%xmm1
  add    $0x1,%rbp
  mulsd  D34(%rip),%xmm0
  cvtsi2sd %ebx,%xmm1
  movsbl -0x1(%rbp),%ebx
  addsd  %xmm1,%xmm0
  test   %ebx,%ebx
  je     L39
L170:
  mov    %ebx,%edi
  movsd  %xmm0,(%rsp)
  call   <isdigit@plt>
  movsd  (%rsp),%xmm0
  test   %rax,%rax
  jne    L220
  cmp    $0x2e,%ebx
  jne    L211
  lea    0x1(%rbp),%r12
  movsbl 0x0(%rbp),%ebp
  xor    %ebx,%ebx
  test   %ebp,%ebp
  jne    L1
  jmp    L39
  nopl   0x0(%rax)
L206:
  sub    $0x30,%ebp
  pxor   %xmm1,%xmm1
  add    $0x1,%r12
  sub    $0x1,%ebx
  mulsd  D34(%rip),%xmm0
  cvtsi2sd %ebp,%xmm1
  movsbl -0x1(%r12),%ebp
  addsd  %xmm1,%xmm0
  test   %ebp,%ebp
  je     L193
L1:
  mov    %ebp,%edi
  movsd  %xmm0,(%rsp)
  call   <isdigit@plt>
  movsd  (%rsp),%xmm0
  test   %rax,%rax
  jne    L206
  and    $0xffffffdf,%ebp
  cmp    $0x45,%ebp
  jne    L107
L73:
  movsbl (%r12),%ebp
  cmp    $0x2b,%ebp
  je     L156
  lea    0x1(%r12),%r13
  mov    $0x1,%r14d
  cmp    $0x2d,%ebp
  jne    L184
  movsbl 0x1(%r12),%ebp
  lea    0x2(%r12),%r13
  mov    $0xffffffff,%r14d
L184:
  xor    %r12d,%r12d
  jmp    L133
  nopw   0x0(%rax,%rax,1)
L229:
  lea    (%r12,%r12,4),%eax
  add    $0x1,%r13
  lea    -0x30(%rbp,%rax,2),%r12d
  movsbl -0x1(%r13),%ebp
L133:
  mov    %ebp,%edi
  movsd  %xmm0,(%rsp)
  call   <isdigit@plt>
  movsd  (%rsp),%xmm0
  test   %rax,%rax
  jne    L229
  imul   %r14d,%r12d
  add    %r12d,%ebx
  test   %ebx,%ebx
  jle    L107
  movsd  D34(%rip),%xmm1
  nopl   0x0(%rax,%rax,1)
L31:
  mulsd  %xmm1,%xmm0
  sub    $0x1,%ebx
  jne    L31
L39:
  mulsd  0x8(%rsp),%xmm0
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L107:
  test   %ebx,%ebx
  je     L39
L193:
  movsd  D20(%rip),%xmm1
L226:
  mulsd  %xmm1,%xmm0
  add    $0x1,%ebx
  jne    L226
  jmp    L39
  nopl   0x0(%rax,%rax,1)
L156:
  movsbl 0x1(%r12),%ebp
  lea    0x2(%r12),%r13
  mov    $0x1,%r14d
  jmp    L184
  cs nopw 0x0(%rax,%rax,1)
L211:
  and    $0xffffffdf,%ebx
  cmp    $0x45,%ebx
  jne    L39
  mov    %rbp,%r12
  xor    %ebx,%ebx
  jmp    L73
```

tool_calls: name: extract_symbolic_data
arguments: tag: D17
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D41
datatype: f32[2]
name: extract_symbolic_data
arguments: tag: D34
datatype: f64
name: extract_symbolic_data
arguments: tag: D20
datatype: f64

tool: {"D17": [0.0,1.875]}

tool: {"D41": [0.0,-1.875]}

tool: D34: 10

tool: D20: 0.1

assistant: ```c
double m_atof(char *s) {
  double a = 0.0;
  int e = 0;
  int c;
  int negative = 1;
  if (*s == '-') {
    negative = -1;
    s += 1;
  }
  while ((c = *s++) != '\0' && isdigit(c)) {
    a = a * 10.0 + (c - '0');
  }
  if (c == '.') {
    while ((c = *s++) != '\0' && isdigit(c)) {
      a = a * 10.0 + (c - '0');
      e = e - 1;
    }
  }
  if (c == 'e' || c == 'E') {
    int sign = 1;
    int i = 0;
    c = *s++;
    if (c == '+')
      c = *s++;
    else if (c == '-') {
      c = *s++;
      sign = -1;
    }
    while (isdigit(c)) {
      i = i * 10 + (c - '0');
      c = *s++;
    }
    e += i * sign;
  }
  while (e > 0) {
    a *= 10.0;
    e--;
  }
  while (e < 0) {
    a *= 0.1;
    e++;
  }
  return a * negative;
}
```