user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<strtod_flags>:
  endbr64
  push   %r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %rsi,%r13
  push   %r12
  mov    %edx,%r12d
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  xchg   %ax,%ax
L323:
  mov    %rbx,%r15
  movsbl (%rbx),%edi
  add    $0x1,%rbx
  mov    %edi,%ebp
  call   <isspace@plt>
  test   %rax,%rax
  jne    L323
  xor    %ecx,%ecx
  test   $0x1,%r12b
  jne    L37
  cmp    $0x2b,%bpl
  je     L146
  cmp    $0x2d,%bpl
  je     L195
L37:
  mov    %r12d,%r8d
  mov    %r12d,%edi
  movsd  D26(%rip),%xmm1
  xor    %esi,%esi
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  and    $0x4,%r8d
  and    $0x2,%edi
L277:
  cmp    $0x2e,%bpl
  je     L112
  cmp    $0x2c,%bpl
  je     L299
  lea    -0x30(%rbp),%edx
  cmp    $0x9,%dl
  ja     L280
  mulsd  D4(%rip),%xmm0
  movsbl %dl,%edx
  pxor   %xmm2,%xmm2
  add    $0x1,%eax
  cvtsi2sd %edx,%xmm2
  addsd  %xmm2,%xmm0
  test   %esi,%esi
  je     L100
  mulsd  D4(%rip),%xmm1
  jmp    L100
  nopl   0x0(%rax,%rax,1)
L112:
  test   %edi,%edi
  jne    L64
  test   %esi,%esi
  je     L346
L64:
  test   %eax,%eax
  je     L215
L92:
  test   %r13,%r13
  je     L58
  sub    $0x1,%rbx
  mov    %rbx,0x0(%r13)
L58:
  test   %ecx,%ecx
  jne    L109
L191:
  divsd  %xmm1,%xmm0
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L109:
  xorpd  D23(%rip),%xmm0
  jmp    L191
  nopw   0x0(%rax,%rax,1)
L195:
  mov    $0x1,%ecx
L146:
  movzbl (%rbx),%ebp
  lea    0x2(%r15),%rbx
  jmp    L37
  nopl   0x0(%rax)
L346:
  mov    $0x1,%esi
L100:
  add    $0x1,%rbx
  movzbl -0x1(%rbx),%ebp
  jmp    L277
  nopw   0x0(%rax,%rax,1)
L280:
  and    $0xffffffdf,%ebp
  cmp    $0x45,%bpl
  jne    L64
  and    $0x8,%r12d
  jne    L64
  test   %eax,%eax
  je     L215
  movzbl (%rbx),%edx
  cmp    $0x2b,%dl
  je     L28
  cmp    $0x2d,%dl
  jne    L176
  mov    $0x1,%edi
L178:
  movzbl 0x1(%rbx),%edx
  lea    0x2(%rbx),%rax
L36:
  sub    $0x30,%edx
  cmp    $0x9,%dl
  ja     L92
  lea    0x1(%rax),%rbx
  movzbl (%rax),%eax
  movsbl %dl,%edx
  lea    -0x30(%rax),%esi
  cmp    $0x9,%sil
  ja     L2
  nopl   0x0(%rax,%rax,1)
L350:
  sub    $0x30,%eax
  lea    (%rdx,%rdx,4),%edx
  add    $0x1,%rbx
  movsbl %al,%eax
  lea    (%rax,%rdx,2),%edx
  movzbl -0x1(%rbx),%eax
  lea    -0x30(%rax),%esi
  cmp    $0x9,%sil
  jbe    L350
L2:
  mov    $0x134,%eax
  cmp    %eax,%edx
  cmovle %edx,%eax
  test   %edx,%edx
  je     L92
  movsd  D4(%rip),%xmm2
  jmp    L349
  nopl   0x0(%rax)
L34:
  mulsd  %xmm2,%xmm1
L214:
  sub    $0x1,%eax
  test   %eax,%eax
  jle    L92
L349:
  test   %edi,%edi
  jne    L34
  divsd  %xmm2,%xmm1
  jmp    L214
  nopl   0x0(%rax)
L215:
  test   %r13,%r13
  je     L345
  mov    %r14,0x0(%r13)
L345:
  add    $0x8,%rsp
  pxor   %xmm0,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L299:
  test   %r8d,%r8d
  jne    L64
  test   %esi,%esi
  jne    L64
  jmp    L346
  cs nopw 0x0(%rax,%rax,1)
L176:
  lea    0x1(%rbx),%rax
  xor    %edi,%edi
  jmp    L36
L28:
  xor    %edi,%edi
  jmp    L178
```

tool_calls: name: disassemble_data
arguments: tag: D26
type_guessed: f64
name: disassemble_data
arguments: tag: D4
type_guessed: f32[2]
name: disassemble_data
arguments: tag: D23
type_guessed: f32[4]

tool: D26: 1

tool: {"D4": [0.0,2.5625]}

tool: {"D23": [0.0,-0.0,0.0,0.0]}

assistant: ```c
double strtod_flags(const char *str, const char **ptr, unsigned int flags) {
  char c;
  const char *p = str, *ep;
  double val = 0.0;
  double decimal = 1.0;
  int sign = 0, esign = 0;
  int numbers = 0, dot = 0;
  while (isspace(c = *p++))
    ;
  if (!(flags & 0x01)) {
    switch (c) {
    case '-':
      sign = 1;
    case '+':
      c = *p++;
    }
  }
  for (;; c = *p++) {
    if ((c == '.' && !(flags & 0x02)) || (c == ',' && !(flags & 0x04))) {
      if (dot)
        goto done;
      dot = 1;
      continue;
    }
    if (c >= '0' && c <= '9') {
      numbers++;
      val = (val * 10) + (c - '0');
      if (dot)
        decimal *= 10;
      continue;
    }
    if (c != 'e' && c != 'E')
      goto done;
    if (flags & 0x08)
      goto done;
    break;
  }
  if (!numbers)
    goto done;
  ep = p;
  c = *ep++;
  switch (c) {
  case '-':
    esign = 1;
  case '+':
    c = *ep++;
  }
  if (c >= '0' && c <= '9') {
    p = ep;
    int exponent = c - '0';
    for (;;) {
      c = *p++;
      if (c < '0' || c > '9')
        break;
      exponent *= 10;
      exponent += c - '0';
    }
    if (exponent > 308)
      exponent = 308;
    while (exponent-- > 0) {
      if (esign)
        decimal *= 10;
      else
        decimal /= 10;
    }
  }
done:
  if (!numbers)
    goto no_conversion;
  if (ptr)
    *ptr = p - 1;
  return (sign ? -val : val) / decimal;
no_conversion:
  if (ptr)
    *ptr = str;
  return 0.0;
}
```