user: Translate the below assembly code into C programming language:

```asm
<extract_double>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %ecx,-0x4c(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movl   $0x0,-0x24(%rbp)
  jmp    L241
L244:
  addq   $0x1,-0x18(%rbp)
L241:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L244
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2b,%al
  je     L244
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  je     L244
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  je     L244
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L171
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L171
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L171
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x29,%al
  je     L171
  cmpl   $0x0,-0x4c(%rbp)
  je     L200
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x6d,%al
  je     L80
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x4d,%al
  jne    L200
L80:
  movl   $0x1,-0x24(%rbp)
  jmp    L171
L200:
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <bitch@plt>
  mov    $0xffffffff,%eax
  jmp    L125
L171:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L271
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
L271:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  mov    %al,-0x25(%rbp)
  mov    -0x18(%rbp),%rax
  movb   $0x0,(%rax)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  lea    -0x20(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strtod@plt>
  movq   %xmm0,%rax
  mov    -0x48(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x20(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L31
  mov    -0x18(%rbp),%rax
  movzbl -0x25(%rbp),%edx
  mov    %dl,(%rax)
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <bitch@plt>
  mov    $0xffffffff,%eax
  jmp    L125
L31:
  mov    -0x18(%rbp),%rax
  movzbl -0x25(%rbp),%edx
  mov    %dl,(%rax)
  cmpl   $0x0,-0x24(%rbp)
  je     L128
  addq   $0x1,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L128
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %eax,%eax
  jne    L128
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L128
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x29,%al
  je     L128
  mov    -0x40(%rbp),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  call   <bitch@plt>
  mov    $0xffffffff,%eax
  jmp    L125
L128:
  cmpq   $0x0,-0x10(%rbp)
  je     L252
  mov    -0x38(%rbp),%rax
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  jmp    L220
L252:
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <skip_white_space@plt>
  mov    -0x38(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L220
  mov    $0xffffffff,%eax
  jmp    L125
L220:
  mov    $0x1,%eax
L125:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L169
  call   <__stack_chk_fail@plt>
L169:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D29
type_infered: string

tool: D29: %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;
}
```