user: Demonstrate the C code that generates the assembly output below:

```asm
<str2dd>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %al,-0x15(%rbp)
  cmpb   $0x2b,-0x15(%rbp)
  je     L272
  cmpb   $0x4e,-0x15(%rbp)
  jne    L229
L272:
  addq   $0x1,-0x28(%rbp)
  movl   $0x1,-0x14(%rbp)
L229:
  cmpb   $0x2d,-0x15(%rbp)
  je     L332
  cmpb   $0x53,-0x15(%rbp)
  jne    L138
L332:
  addq   $0x1,-0x28(%rbp)
  movl   $0xffffffff,-0x14(%rbp)
L138:
  lea    -0x10(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <parse_dd_or_dms@plt>
  movq   %xmm0,%rax
  mov    -0x30(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x30(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  jne    L91
  mov    -0x10(%rbp),%rax
  test   %rax,%rax
  je     L91
  mov    -0x10(%rbp),%rax
  cmp    %rax,-0x28(%rbp)
  je     L91
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L130
L91:
  mov    $0x0,%eax
  jmp    L220
L130:
  cmpl   $0x0,-0x14(%rbp)
  jne    L239
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %al,-0x15(%rbp)
  cmpb   $0x4e,-0x15(%rbp)
  jne    L22
  movl   $0x1,-0x14(%rbp)
L22:
  cmpb   $0x53,-0x15(%rbp)
  jne    L319
  movl   $0xffffffff,-0x14(%rbp)
L319:
  cmpl   $0x0,-0x14(%rbp)
  je     L239
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x10(%rbp)
L239:
  cmpl   $0x0,-0x14(%rbp)
  jns    L114
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D5(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L114
L37:
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x10(%rbp)
L114:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L37
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L284
  mov    $0x0,%eax
  jmp    L220
L284:
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x28(%rbp)
  movl   $0x0,-0x14(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %al,-0x15(%rbp)
  cmpb   $0x2b,-0x15(%rbp)
  je     L292
  cmpb   $0x57,-0x15(%rbp)
  jne    L141
L292:
  addq   $0x1,-0x28(%rbp)
  movl   $0x1,-0x14(%rbp)
L141:
  cmpb   $0x2d,-0x15(%rbp)
  je     L105
  cmpb   $0x45,-0x15(%rbp)
  jne    L329
L105:
  addq   $0x1,-0x28(%rbp)
  movl   $0xffffffff,-0x14(%rbp)
L329:
  lea    -0x10(%rbp),%rdx
  mov    -0x28(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <parse_dd_or_dms@plt>
  movq   %xmm0,%rax
  mov    -0x38(%rbp),%rdx
  mov    %rax,(%rdx)
  mov    -0x38(%rbp),%rax
  mov    (%rax),%rax
  movq   %rax,%xmm0
  call   <isnan@plt>
  test   %rax,%rax
  jne    L221
  mov    -0x10(%rbp),%rax
  cmp    %rax,-0x28(%rbp)
  jne    L45
L221:
  mov    $0x0,%eax
  jmp    L220
L45:
  mov    -0x10(%rbp),%rax
  test   %rax,%rax
  je     L211
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L334
L211:
  mov    $0x1,%eax
  jmp    L220
L334:
  cmpl   $0x0,-0x14(%rbp)
  jne    L39
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <toupper@plt>
  mov    %al,-0x15(%rbp)
  cmpb   $0x57,-0x15(%rbp)
  jne    L328
  movl   $0x1,-0x14(%rbp)
L328:
  cmpb   $0x45,-0x15(%rbp)
  jne    L115
  movl   $0xffffffff,-0x14(%rbp)
L115:
  cmpl   $0x0,-0x14(%rbp)
  je     L39
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x10(%rbp)
L39:
  cmpl   $0x0,-0x14(%rbp)
  jns    L166
  mov    -0x38(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D5(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x38(%rbp),%rax
  movsd  %xmm0,(%rax)
L166:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  sete   %al
  movzbl %al,%eax
L220:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L112
  call   <__stack_chk_fail@plt>
L112:
  leave
  ret
```

tool_calls: name: parse_data
arguments: label: D5
type_guessed: byte[8]

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

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