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    L8
  nopl   0x0(%rax,%rax,1)
L196:
  add    $0x1,%rbx
L8:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L196
  movzbl (%rbx),%r15d
  lea    -0x2d(%r15),%eax
  cmp    $0x1,%al
  jbe    L196
  cmp    $0x2b,%r15b
  je     L196
  test   %r15b,%r15b
  jne    L16
  mov    0x0(%rbp),%rdi
  lea    0x10(%rsp),%rsi
  call   <strtod@plt>
  mov    0x10(%rsp),%rax
  movsd  %xmm0,(%r12)
  cmpb   $0x0,(%rax)
  jne    L110
  movb   $0x0,(%rbx)
  mov    %rbx,%r14
L79:
  mov    %r14,0x0(%rbp)
  mov    $0x1,%eax
L233:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L197
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L16:
  movsbl %r15b,%edi
  call   <isspace@plt>
  movzbl (%rbx),%r15d
  test   %eax,%eax
  je     L203
  xor    %eax,%eax
L179:
  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    L110
  mov    %r15b,(%rbx)
  test   %eax,%eax
  je     L204
  movzbl 0x1(%rbx),%eax
  lea    0x1(%rbx),%r12
  test   %al,%al
  jne    L28
L76:
  test   %r14,%r14
  jne    L79
  mov    %r12,%rdi
  call   <skip_white_space@plt>
  cmp    $0x1,%rax
  mov    %rax,0x0(%rbp)
  sbb    %eax,%eax
  or     $0x1,%eax
  jmp    L233
L110:
  mov    %r15b,(%rbx)
L35:
  mov    %r13,%rsi
  lea    D8(%rip),%rdi
  call   <bitch@plt>
  mov    $0xffffffff,%eax
  jmp    L233
L203:
  cmp    $0x29,%r15b
  je     L179
  cmp    $0x3b,%r15b
  je     L179
  test   %r14d,%r14d
  je     L35
  mov    %r15d,%edx
  mov    $0x1,%eax
  and    $0xffffffdf,%edx
  cmp    $0x4d,%dl
  je     L179
  jmp    L35
L28:
  movsbl %al,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L76
  movzbl 0x1(%rbx),%eax
  cmp    $0x3b,%al
  je     L76
  cmp    $0x29,%al
  je     L76
  jmp    L35
L204:
  mov    %rbx,%r12
  jmp    L76
L197:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_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;
}
```