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

```asm
<strtod>:
  endbr64
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x10,%rsp
  jmp    L135
  nopw   0x0(%rax,%rax,1)
L143:
  add    $0x1,%rbx
L135:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L143
  movzbl (%rbx),%edx
  fld1
  cmp    $0x2b,%dl
  je     L11
  cmp    $0x2d,%dl
  jne    L178
  fchs
L11:
  movzbl 0x1(%rbx),%edx
  add    $0x1,%rbx
L178:
  movsbl %dl,%eax
  fldz
  sub    $0x30,%eax
  fld    %st(0)
  cmp    $0x9,%eax
  ja     L223
  flds   0xe81(%rip)        # 2000 <_fini+0xd18>
  nop
L97:
  add    $0x1,%rbx
  mov    %eax,0x8(%rsp)
  fmul   %st,%st(1)
  movsbl (%rbx),%eax
  fildl  0x8(%rsp)
  mov    %eax,%edx
  sub    $0x30,%eax
  faddp  %st,%st(2)
  cmp    $0x9,%eax
  jbe    L97
  fstp   %st(0)
L223:
  cmp    $0x2e,%dl
  je     L187
  movzbl (%rbx),%edx
  or     $0x20,%edx
  cmp    $0x65,%dl
  je     L254
  fstp   %st(1)
  jmp    L248
  nopw   0x0(%rax,%rax,1)
L124:
  fstp   %st(1)
  nopw   0x0(%rax,%rax,1)
L248:
  test   %rbp,%rbp
  je     L104
  mov    %rbx,0x0(%rbp)
L104:
  fmulp  %st,%st(1)
  fstpl  0x8(%rsp)
  movsd  0x8(%rsp),%xmm0
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  cs nopw 0x0(%rax,%rax,1)
L187:
  movsbl 0x1(%rbx),%eax
  lea    0x1(%rbx),%rcx
  mov    %eax,%edx
  sub    $0x30,%eax
  cmp    $0x9,%eax
  ja     L141
  fld1
  fldl   0xdfe(%rip)        # 2008 <_fini+0xd20>
  nopw   0x0(%rax,%rax,1)
L191:
  fmul   %st,%st(1)
  mov    %eax,0x8(%rsp)
  movsbl 0x1(%rcx),%eax
  add    $0x1,%rcx
  fildl  0x8(%rsp)
  mov    %eax,%edx
  sub    $0x30,%eax
  fmul   %st(2),%st
  faddp  %st,%st(3)
  cmp    $0x9,%eax
  jbe    L191
  fstp   %st(0)
  fstp   %st(0)
L141:
  or     $0x20,%edx
  mov    %rcx,%rbx
  cmp    $0x65,%dl
  jne    L124
L254:
  movsbl 0x1(%rbx),%edx
  cmp    $0x2d,%dl
  je     L47
  jg     L19
  cmp    $0x2b,%dl
  jne    L28
  fstp   %st(1)
  flds   0xda5(%rip)        # 2000 <_fini+0xd18>
L160:
  movsbl 0x2(%rbx),%edx
  lea    0x2(%rbx),%rax
  lea    -0x30(%rdx),%ecx
  cmp    $0x9,%ecx
  ja     L94
L217:
  mov    %rax,%rbx
  xor    %eax,%eax
L92:
  add    $0x1,%rbx
  lea    (%rax,%rax,4),%eax
  lea    -0x30(%rdx,%rax,2),%eax
  movsbl (%rbx),%edx
  lea    -0x30(%rdx),%ecx
  cmp    $0x9,%ecx
  jbe    L92
  jmp    L125
  nopl   0x0(%rax,%rax,1)
L19:
  lea    -0x30(%rdx),%eax
  cmp    $0x9,%al
  ja     L50
  fstp   %st(1)
  flds   0xd61(%rip)        # 2000 <_fini+0xd18>
  lea    0x1(%rbx),%rax
  jmp    L217
  nopl   (%rax)
L218:
  fmul   %st(0),%st
L125:
  test   $0x1,%al
  je     L114
  fmul   %st,%st(1)
L114:
  shr    %eax
  jne    L218
  fstp   %st(0)
  jmp    L248
  nopl   0x0(%rax,%rax,1)
L28:
  fstp   %st(0)
  jmp    L195
  nopl   0x0(%rax)
L50:
  fstp   %st(0)
L195:
  mov    %r12,%rbx
  jmp    L248
L47:
  fstp   %st(1)
  fldl   0xd2e(%rip)        # 2008 <_fini+0xd20>
  jmp    L160
L94:
  mov    %rax,%rbx
  xor    %eax,%eax
  jmp    L125
```

assistant: ```c
double strtod(const char *restrict s, char **restrict endptr) {
  const char *p = s;
  long double factor, value = 0.L;
  int sign = 1;
  unsigned int expo = 0;
  while (isspace(*p))
    p++;
  switch (*p) {
  case '-':
    sign = -1;
  case '+':
    p++;
  default:
    break;
  }
  while ((unsigned int)(*p - '0') < 10u)
    value = value * 10 + (*p++ - '0');
  if (*p == '.') {
    factor = 1.;
    p++;
    while ((unsigned int)(*p - '0') < 10u) {
      factor *= 0.1;
      value += (*p++ - '0') * factor;
    }
  }
  if ((*p | 32) == 'e') {
    factor = 10.L;
    switch (*++p) {
    case '-':
      factor = 0.1;
    case '+':
      p++;
      break;
    case '0':
    case '1':
    case '2':
    case '3':
    case '4':
    case '5':
    case '6':
    case '7':
    case '8':
    case '9':
      break;
    default:
      value = 0.L;
      p = s;
      goto done;
    }
    while ((unsigned int)(*p - '0') < 10u)
      expo = 10 * expo + (*p++ - '0');
    while (1) {
      if (expo & 1)
        value *= factor;
      if ((expo >>= 1) == 0)
        break;
      factor *= factor;
    }
  }
done:
  if (endptr)
    *endptr = (char *)p;
  return value * sign;
}
```