user: What is the c source code of the assembly code below?

```asm
<strtod>:
  endbr64
  test   %rdi,%rdi
  je     L227
  movzbl (%rdi),%eax
  cmp    $0x2b,%al
  je     L140
  movsd  D2(%rip),%xmm3
  cmp    $0x2d,%al
  je     L133
L47:
  lea    -0x30(%rax),%edx
  movsd  D78(%rip),%xmm1
  pxor   %xmm0,%xmm0
  cmp    $0x9,%dl
  ja     L93
  nopl   0x0(%rax)
L72:
  mulsd  %xmm1,%xmm0
  sub    $0x30,%eax
  pxor   %xmm2,%xmm2
  add    $0x1,%rdi
  movsbl %al,%eax
  cvtsi2sd %eax,%xmm2
  movzbl (%rdi),%eax
  lea    -0x30(%rax),%edx
  addsd  %xmm2,%xmm0
  cmp    $0x9,%dl
  jbe    L72
L93:
  cmp    $0x2e,%al
  je     L179
L37:
  and    $0xffffffdf,%eax
  xor    %edx,%edx
  mov    %rdi,%rcx
  cmp    $0x45,%al
  jne    L225
L239:
  movzbl 0x1(%rdi),%eax
  cmp    $0x2b,%al
  je     L154
  lea    0x1(%rdi),%rcx
  cmp    $0x2d,%al
  je     L66
L49:
  lea    -0x30(%rax),%r8d
  xor    %edi,%edi
  cmp    $0x9,%r8b
  ja     L108
  nopl   (%rax)
L183:
  sub    $0x30,%eax
  lea    (%rdi,%rdi,4),%edi
  add    $0x1,%rcx
  movsbl %al,%eax
  lea    (%rax,%rdi,2),%edi
  movzbl (%rcx),%eax
  lea    -0x30(%rax),%r8d
  cmp    $0x9,%r8b
  jbe    L183
  add    %edi,%edx
  test   %edx,%edx
  jle    L108
  movsd  D78(%rip),%xmm1
  nopl   0x0(%rax,%rax,1)
L29:
  mulsd  %xmm1,%xmm0
  sub    $0x1,%edx
  jne    L29
L225:
  test   %rsi,%rsi
  je     L75
  mov    %rcx,(%rsi)
L75:
  mulsd  %xmm3,%xmm0
  ret
L108:
  test   %edx,%edx
  je     L225
L62:
  movsd  D70(%rip),%xmm1
  nopw   0x0(%rax,%rax,1)
L177:
  mulsd  %xmm1,%xmm0
  add    $0x1,%edx
  jne    L177
  jmp    L225
  nopl   0x0(%rax,%rax,1)
L179:
  movzbl 0x1(%rdi),%eax
  lea    0x1(%rdi),%rcx
  lea    -0x30(%rax),%edx
  cmp    $0x9,%dl
  ja     L27
  movsd  D78(%rip),%xmm1
  xor    %edx,%edx
  cs nopw 0x0(%rax,%rax,1)
L74:
  sub    $0x30,%eax
  pxor   %xmm2,%xmm2
  add    $0x1,%rcx
  sub    $0x1,%edx
  mulsd  %xmm1,%xmm0
  movsbl %al,%eax
  cvtsi2sd %eax,%xmm2
  movzbl (%rcx),%eax
  lea    -0x30(%rax),%edi
  addsd  %xmm2,%xmm0
  cmp    $0x9,%dil
  jbe    L74
  and    $0xffffffdf,%eax
  cmp    $0x45,%al
  jne    L62
  mov    %rcx,%rdi
  jmp    L239
  nopl   0x0(%rax,%rax,1)
L140:
  movzbl 0x1(%rdi),%eax
  movsd  D2(%rip),%xmm3
  add    $0x1,%rdi
  jmp    L47
  nopl   (%rax)
L133:
  movzbl 0x1(%rdi),%eax
  movsd  D9(%rip),%xmm3
  add    $0x1,%rdi
  jmp    L47
  nopl   (%rax)
L66:
  movzbl 0x2(%rdi),%eax
  movsd  D9(%rip),%xmm3
  lea    0x2(%rdi),%rcx
  jmp    L49
  nopl   (%rax)
L227:
  pxor   %xmm0,%xmm0
  ret
  nopl   (%rax)
L154:
  movzbl 0x2(%rdi),%eax
  lea    0x2(%rdi),%rcx
  jmp    L49
L27:
  mov    %rcx,%rdi
  jmp    L37
```

tool_calls: name: unpack_data
arguments: data_label: D2
type_infered: f32[2]
name: unpack_data
arguments: data_label: D78
type_infered: f64
name: unpack_data
arguments: data_label: D70
type_infered: f64
name: unpack_data
arguments: data_label: D9
type_infered: f32[2]

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

tool: D78: 10

tool: D70: 0.1

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

assistant: ```c
double strtod(const char *nptr, char **endptr) {
  double val = 0.0;
  int d = 0;
  int sign = 1;
  if (!nptr) {
    return 0.0;
  }
  if (*nptr == '+') {
    nptr++;
  } else if (*nptr == '-') {
    nptr++;
    sign = -1;
  }
  while (*nptr >= '0' && *nptr <= '9') {
    val = val * 10.0 + (*nptr - '0');
    nptr++;
  }
  if (*nptr == '.') {
    nptr++;
    while (*nptr >= '0' && *nptr <= '9') {
      val = val * 10.0 + (*nptr - '0');
      nptr++;
      d--;
    }
  }
  if (*nptr == 'E' || *nptr == 'e') {
    int e_sign = 1;
    int e_val = 0;
    nptr++;
    if (*nptr == '+') {
      nptr++;
    } else if (*nptr == '-') {
      nptr++;
      sign = -1;
    }
    while ((*nptr >= '0' && *nptr <= '9')) {
      e_val = e_val * 10 + (*nptr - '0');
      nptr++;
    }
    d += e_val * e_sign;
  }
  while (d > 0) {
    val *= 10.0;
    d--;
  }
  while (d < 0) {
    val *= 0.1;
    d++;
  }
  if (endptr) {
    *endptr = (char *)nptr;
  }
  return sign * val;
}
```