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

```asm
<tonum>:
  endbr64
  push   %r14
  push   %r13
  mov    %rdi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  sub    $0x30,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  cmp    $0x1,%esi
  je     L114
  jle    L208
  movsd  D45(%rip),%xmm2
  cmpb   $0x2d,(%rdi)
  movsd  %xmm2,0x8(%rsp)
  je     L64
L139:
  xor    %edx,%edx
  lea    0x10(%rsp),%rcx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <readsigned@plt>
  movsd  0x10(%rsp),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L65
  xorpd  D42(%rip),%xmm1
  movsd  D23(%rip),%xmm3
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm3,0x8(%rsp)
L65:
  cmp    %eax,%ebx
  jle    L13
  movslq %eax,%rdx
  movzbl 0x0(%r13,%rdx,1),%edx
  cmp    $0x2e,%dl
  je     L223
  test   %eax,%eax
  je     L50
  xor    %r14d,%r14d
L1:
  and    $0xffffffdf,%edx
  cmp    $0x45,%dl
  je     L165
  neg    %r14d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14d,%xmm0
  call   <decpow@plt>
  mulsd  0x18(%rsp),%xmm0
  addsd  0x10(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  movsd  0x20(%rsp),%xmm0
  call   <decpow@plt>
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%r12)
L50:
  xor    %eax,%eax
L102:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L135
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   (%rax)
L13:
  test   %eax,%eax
  je     L50
L6:
  call   <decpow@plt>
  mulsd  0x18(%rsp),%xmm0
  addsd  0x10(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  movsd  0x20(%rsp),%xmm0
  call   <decpow@plt>
  mulsd  0x8(%rsp),%xmm0
  mov    $0x1,%eax
  movsd  %xmm0,(%r12)
  jmp    L102
  nop
L114:
  movzbl (%rdi),%eax
  lea    -0x2d(%rax),%edx
  cmp    $0x1,%dl
  jbe    L50
  movsd  D45(%rip),%xmm6
  movsd  %xmm6,0x8(%rsp)
  cmp    $0x2b,%al
  jne    L139
  jmp    L50
  cs nopw 0x0(%rax,%rax,1)
L64:
  cmpb   $0x2d,0x1(%rdi)
  je     L139
  movsd  D23(%rip),%xmm3
  add    $0x1,%r13
  sub    $0x1,%ebx
  movsd  %xmm3,0x8(%rsp)
  jmp    L139
  nopl   0x0(%rax)
L208:
  movsd  D45(%rip),%xmm6
  movsd  %xmm6,0x8(%rsp)
  jmp    L139
  nopl   0x0(%rax,%rax,1)
L165:
  lea    0x1(%rax),%ebp
  mov    %r13,%rdi
  lea    0x20(%rsp),%rcx
  mov    %ebx,%esi
  mov    %ebp,%edx
  call   <readsigned@plt>
  mov    %eax,%r13d
  cmp    %eax,%ebp
  je     L50
  neg    %r14d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14d,%xmm0
  call   <decpow@plt>
  mulsd  0x18(%rsp),%xmm0
  addsd  0x10(%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  movsd  0x20(%rsp),%xmm0
  call   <decpow@plt>
  mulsd  0x8(%rsp),%xmm0
  xor    %eax,%eax
  cmp    %r13d,%ebx
  setle  %al
  movsd  %xmm0,(%r12)
  jmp    L102
  nopl   0x0(%rax)
L223:
  lea    0x1(%rax),%ebp
  lea    0x18(%rsp),%rcx
  mov    $0xa,%r8d
  mov    %ebx,%esi
  mov    %ebp,%edx
  mov    %r13,%rdi
  call   <readint@plt>
  mov    %eax,%r14d
  sub    %ebp,%r14d
  test   %eax,%eax
  je     L50
  cmp    %ebx,%eax
  jge    L116
  movslq %eax,%rdx
  movzbl 0x0(%r13,%rdx,1),%edx
  jmp    L1
L135:
  call   <__stack_chk_fail@plt>
L116:
  sub    %eax,%ebp
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebp,%xmm0
  jmp    L6
```

tool_calls: name: read_data
arguments: tag: D45
type_guessed: f64
name: read_data
arguments: tag: D42
type_guessed: f32[4]
name: read_data
arguments: tag: D23
type_guessed: f32[2]

tool: D45: 1

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

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

assistant: ```c
int tonum(unsigned char *s, int len, double *result) {
  int i = 0, fraclen = 0;
  double sgn = 1, val, frac = 0, exp = 0;
  if (len == 1 && (*s == '.' || *s == '-' || *s == '+'))
    return 0;
  if (len > 1 && s[0] == '-' && s[1] != '-') {
    sgn = -1;
    s++;
    len--;
  }
  i = readsigned(s, len, i, &val);
  if (val < 0) {
    sgn = -1;
    val = -val;
  }
  if (i < len && s[i] == '.') {
    i++;
    fraclen = readint(s, len, i, &frac, 10) - i;
    i += fraclen;
  }
  if (i == 0)
    return 0;
  if (i < len && (s[i] == 'e' || s[i] == 'E')) {
    int i0 = i + 1;
    i = readsigned(s, len, i + 1, &exp);
    if (i == i0)
      return 0;
  }
  *result = sgn * (val + frac * decpow(-fraclen)) * decpow(exp);
  if (i < len)
    return 0;
  return 1;
}
```