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

```asm
<strtod>:
  endbr64
  mov    %rdi,%rdx
  test   %rdi,%rdi
  je     L185
  movzbl (%rdi),%eax
  cmp    $0x2b,%al
  je     L168
  mov    $0x1,%edi
  cmp    $0x2d,%al
  je     L125
L181:
  movzbl (%rdx),%eax
  lea    -0x30(%rax),%ecx
  pxor   %xmm1,%xmm1
  movsd  D8(%rip),%xmm2
  cmp    $0x9,%cl
  ja     L180
L63:
  mulsd  %xmm2,%xmm1
  movsbl %al,%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rdx
  movzbl (%rdx),%eax
  lea    -0x30(%rax),%ecx
  cmp    $0x9,%cl
  jbe    L63
L180:
  cmp    $0x2e,%al
  je     L135
L148:
  movzbl (%rdx),%ecx
  and    $0xffffffdf,%ecx
  mov    $0x0,%eax
  cmp    $0x45,%cl
  jne    L257
L38:
  movzbl 0x1(%rdx),%r8d
  lea    0x2(%rdx),%rcx
  cmp    $0x2b,%r8b
  je     L2
  lea    0x1(%rdx),%rcx
  cmp    $0x2d,%r8b
  je     L147
L2:
  movzbl (%rcx),%edx
  lea    -0x30(%rdx),%r9d
  mov    $0x0,%r8d
  cmp    $0x9,%r9b
  ja     L21
L197:
  lea    (%r8,%r8,4),%r8d
  movsbl %dl,%edx
  lea    -0x30(%rdx,%r8,2),%r8d
  add    $0x1,%rcx
  movzbl (%rcx),%edx
  lea    -0x30(%rdx),%r9d
  cmp    $0x9,%r9b
  jbe    L197
L21:
  add    %r8d,%eax
L226:
  test   %eax,%eax
  jle    L126
  movsd  D8(%rip),%xmm0
L194:
  mulsd  %xmm0,%xmm1
  sub    $0x1,%eax
  jne    L194
L203:
  test   %rsi,%rsi
  je     L212
  mov    %rcx,(%rsi)
L212:
  pxor   %xmm0,%xmm0
  cvtsi2sd %edi,%xmm0
  mulsd  %xmm1,%xmm0
  ret
L168:
  add    $0x1,%rdx
  mov    $0x1,%edi
  jmp    L181
L125:
  add    $0x1,%rdx
  mov    $0xffffffff,%edi
  jmp    L181
L135:
  lea    0x1(%rdx),%rcx
  movzbl 0x1(%rdx),%edx
  lea    -0x30(%rdx),%eax
  cmp    $0x9,%al
  ja     L202
  mov    $0x0,%eax
  movsd  D8(%rip),%xmm2
L15:
  mulsd  %xmm2,%xmm1
  movsbl %dl,%edx
  sub    $0x30,%edx
  pxor   %xmm0,%xmm0
  cvtsi2sd %edx,%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rcx
  sub    $0x1,%eax
  movzbl (%rcx),%edx
  lea    -0x30(%rdx),%r8d
  cmp    $0x9,%r8b
  jbe    L15
  and    $0xffffffdf,%edx
  cmp    $0x45,%dl
  jne    L226
  mov    %rcx,%rdx
  jmp    L38
L147:
  lea    0x2(%rdx),%rcx
  mov    $0xffffffff,%edi
  jmp    L2
L126:
  jns    L203
  movsd  D4(%rip),%xmm0
L214:
  mulsd  %xmm0,%xmm1
  add    $0x1,%eax
  jne    L214
  jmp    L203
L185:
  pxor   %xmm0,%xmm0
  ret
L202:
  mov    %rcx,%rdx
  jmp    L148
L257:
  mov    %rdx,%rcx
  jmp    L203
```

tool_calls: name: retrieve_data
arguments: tag: D8
type: f64
name: retrieve_data
arguments: tag: D4
type: f64

tool: D8: 10

tool: D4: 0.1

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;
}
```