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

```asm
<extract_double>:
  endbr64
  push   %r15
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    (%rdi),%rbx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  jmp    L41
  nopl   0x0(%rax,%rax,1)
L80:
  add    $0x1,%rbx
L41:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L80
  movzbl (%rbx),%r15d
  lea    -0x2d(%r15),%eax
  cmp    $0x1,%al
  jbe    L80
  cmp    $0x2b,%r15b
  je     L80
  test   %r15b,%r15b
  jne    L91
  mov    0x0(%rbp),%rdi
  lea    0x10(%rsp),%rsi
  call   <strtod@plt>
  mov    0x10(%rsp),%rax
  movsd  %xmm0,(%r12)
  cmpb   $0x0,(%rax)
  jne    L133
  movb   $0x0,(%rbx)
  mov    %rbx,%r14
L64:
  mov    %r14,0x0(%rbp)
  mov    $0x1,%eax
L37:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L239
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L91:
  movsbl %r15b,%edi
  call   <isspace@plt>
  movzbl (%rbx),%r15d
  test   %eax,%eax
  je     L85
  xor    %eax,%eax
L216:
  movb   $0x0,(%rbx)
  mov    0x0(%rbp),%rdi
  xor    %r14d,%r14d
  lea    0x10(%rsp),%rsi
  test   %r15b,%r15b
  mov    %eax,0xc(%rsp)
  cmove  %rbx,%r14
  call   <strtod@plt>
  mov    0x10(%rsp),%rdx
  mov    0xc(%rsp),%eax
  movsd  %xmm0,(%r12)
  cmpb   $0x0,(%rdx)
  jne    L133
  mov    %r15b,(%rbx)
  test   %eax,%eax
  je     L135
  movzbl 0x1(%rbx),%eax
  lea    0x1(%rbx),%r12
  test   %al,%al
  jne    L105
L63:
  test   %r14,%r14
  jne    L64
  mov    %r12,%rdi
  call   <skip_white_space@plt>
  cmp    $0x1,%rax
  mov    %rax,0x0(%rbp)
  sbb    %eax,%eax
  or     $0x1,%eax
  jmp    L37
L133:
  mov    %r15b,(%rbx)
L127:
  mov    %r13,%rsi
  lea    D8(%rip),%rdi
  call   <bitch@plt>
  mov    $0xffffffff,%eax
  jmp    L37
L85:
  cmp    $0x29,%r15b
  je     L216
  cmp    $0x3b,%r15b
  je     L216
  test   %r14d,%r14d
  je     L127
  mov    %r15d,%edx
  mov    $0x1,%eax
  and    $0xffffffdf,%edx
  cmp    $0x4d,%dl
  je     L216
  jmp    L127
L105:
  movsbl %al,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L63
  movzbl 0x1(%rbx),%eax
  cmp    $0x3b,%al
  je     L63
  cmp    $0x29,%al
  je     L63
  jmp    L127
L135:
  mov    %rbx,%r12
  jmp    L63
L239:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D8
data_type: string

tool: D8: %s is not valid

assistant: ```c
int extract_double(char **input, char *what, double *val, int skip_m) {
  char *s = *input;
  char *end = NULL;
  char *stop;
  char c;
  int saw_m = 0;
  while (isdigit(*s) || *s == '+' || *s == '-' || *s == '.')
    s++;
  if (*s && !isspace(*s) && *s != ';' && *s != ')') {
    if (skip_m && (*s == 'm' || *s == 'M')) {
      saw_m = 1;
    } else {
      bitch("%s is not valid", what);
      return -1;
    }
  }
  if (!*s)
    end = s;
  c = *s;
  *s = '\0';
  *val = strtod(*input, &stop);
  if (*stop != '\0') {
    *s = c;
    bitch("%s is not valid", what);
    return -1;
  }
  *s = c;
  if (saw_m) {
    s++;
    if (*s && !isspace(*s) && *s != ';' && *s != ')') {
      bitch("%s is not valid", what);
      return -1;
    }
  }
  if (end) {
    *input = end;
  } else {
    *input = skip_white_space(s);
    if (!*input)
      return -1;
  }
  return 1;
}
```