user: 请从给定的汇编指令推导出C源代码:

```asm
<str2dd>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %rdx,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movsbl (%rdi),%edi
  call   <toupper@plt>
  cmp    $0x2b,%al
  je     L293
  mov    $0x0,%r13d
  cmp    $0x4e,%al
  jne    L288
L293:
  add    $0x1,%rbx
  mov    $0x1,%r13d
L288:
  cmp    $0x2d,%al
  je     L1
  cmp    $0x53,%al
  jne    L146
L1:
  add    $0x1,%rbx
  mov    $0xffffffff,%r13d
L146:
  mov    %rsp,%rsi
  mov    %rbx,%rdi
  call   <parse_dd_or_dms@plt>
  movsd  %xmm0,(%r12)
  call   <isnan@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  jne    L86
  mov    (%rsp),%rax
  cmp    %rbx,%rax
  je     L130
  test   %rax,%rax
  je     L130
  movzbl (%rax),%edi
  mov    $0x0,%eax
  test   %dil,%dil
  je     L86
  test   %r13d,%r13d
  je     L254
L157:
  test   %r13d,%r13d
  jns    L67
  movsd  (%r12),%xmm0
  xorpd  D7(%rip),%xmm0
  movsd  %xmm0,(%r12)
  jmp    L67
L254:
  movsbl %dil,%edi
  call   <toupper@plt>
  cmp    $0x4e,%al
  je     L224
  mov    $0xffffffff,%r13d
  cmp    $0x53,%al
  jne    L67
L227:
  addq   $0x1,(%rsp)
  jmp    L157
L224:
  mov    $0x1,%r13d
  jmp    L227
L336:
  addq   $0x1,(%rsp)
L67:
  mov    (%rsp),%rax
  movsbl (%rax),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L336
  mov    (%rsp),%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L86
  movsbl %dil,%edi
  call   <toupper@plt>
  cmp    $0x2b,%al
  je     L24
  mov    $0x0,%r12d
  cmp    $0x57,%al
  je     L24
L377:
  cmp    $0x2d,%al
  je     L81
  cmp    $0x45,%al
  je     L81
L78:
  mov    %rsp,%rsi
  mov    %rbx,%rdi
  call   <parse_dd_or_dms@plt>
  movsd  %xmm0,0x0(%rbp)
  call   <isnan@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  jne    L86
  mov    (%rsp),%rax
  cmp    %rbx,%rax
  je     L14
  test   %rax,%rax
  je     L126
  movzbl (%rax),%edx
  mov    $0x1,%eax
  test   %dl,%dl
  je     L86
  test   %r12d,%r12d
  je     L66
L341:
  test   %r12d,%r12d
  js     L133
L206:
  mov    (%rsp),%rax
  cmpb   $0x0,(%rax)
  sete   %al
  movzbl %al,%eax
  jmp    L86
L24:
  add    $0x1,%rbx
  mov    $0x1,%r12d
  jmp    L377
L81:
  add    $0x1,%rbx
  mov    $0xffffffff,%r12d
  jmp    L78
L66:
  movsbl %dl,%edi
  call   <toupper@plt>
  cmp    $0x57,%al
  je     L100
  mov    $0xffffffff,%r12d
  cmp    $0x45,%al
  jne    L206
L330:
  addq   $0x1,(%rsp)
  jmp    L341
L100:
  mov    $0x1,%r12d
  jmp    L330
L133:
  movsd  0x0(%rbp),%xmm0
  xorpd  D7(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp)
  jmp    L206
L130:
  mov    $0x0,%eax
L86:
  mov    0x8(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L114
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L14:
  mov    $0x0,%eax
  jmp    L86
L126:
  mov    $0x1,%eax
  jmp    L86
L114:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D7
type_guessed: byte[16]

tool: {"D7": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

assistant: ```c
int str2dd(char *s, double *lat, double *lon) {
  char *e;
  int dir = 0;
  char c;
  c = toupper(*s);
  if (c == '+' || c == 'N') {
    s++;
    dir = 1;
  }
  if (c == '-' || c == 'S') {
    s++;
    dir = -1;
  }
  *lat = parse_dd_or_dms(s, &e);
  if (isnan(*lat) || e == NULL || e == s || *e == '\0')
    return 0;
  if (!dir) {
    c = toupper(*e);
    if (c == 'N')
      dir = 1;
    if (c == 'S')
      dir = -1;
    if (dir)
      e++;
  }
  if (dir < 0)
    *lat = -*lat;
  while (isspace(*e))
    e++;
  if (*e == '\0')
    return 0;
  s = e;
  dir = 0;
  c = toupper(*s);
  if (c == '+' || c == 'W') {
    s++;
    dir = 1;
  }
  if (c == '-' || c == 'E') {
    s++;
    dir = -1;
  }
  *lon = parse_dd_or_dms(s, &e);
  if (isnan(*lon) || e == s)
    return 0;
  if (e == NULL || *e == '\0')
    return 1;
  if (dir == 0) {
    c = toupper(*e);
    if (c == 'W')
      dir = 1;
    if (c == 'E')
      dir = -1;
    if (dir != 0)
      e++;
  }
  if (dir < 0)
    *lon = -*lon;
  return (*e == '\0');
}
```