user: Converte this assembly snippet into its equivalent C code:

```asm
<parse_coord>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movsd  D136(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L67
L157:
  addq   $0x1,-0x28(%rbp)
L67:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L157
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2d,%al
  jne    L102
  addq   $0x1,-0x28(%rbp)
  movsd  D41(%rip),%xmm0
  movsd  %xmm0,-0x8(%rbp)
L102:
  mov    -0x30(%rbp),%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  jmp    L34
L177:
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  D179(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm1
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  addq   $0x1,-0x28(%rbp)
L34:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L177
  jmp    L29
L118:
  addq   $0x1,-0x28(%rbp)
L29:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L118
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L243
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    $0xffffffff,%eax
  jmp    L180
L243:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L287
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D210(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L318
L287:
  movl   $0x0,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D210(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L163
  movsd  -0x8(%rbp),%xmm0
  movq   D208(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L163
L318:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D220(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L337
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D144(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L121
L337:
  movl   $0x1,-0x1c(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D144(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L163
  movsd  -0x8(%rbp),%xmm0
  movq   D208(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  jmp    L163
L121:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L210
  addq   $0x1,-0x28(%rbp)
  movsd  D136(%rip),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  jmp    L52
L71:
  movsd  -0x10(%rbp),%xmm1
  movsd  D179(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x10(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D179(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  addq   $0x1,-0x28(%rbp)
L52:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L71
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  divsd  -0x18(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  jmp    L343
L209:
  addq   $0x1,-0x28(%rbp)
L343:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L209
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L9
  mov    $0xffffffff,%eax
  jmp    L180
L9:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D148(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L202
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D210(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L239
L202:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D210(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L13
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D208(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
L13:
  mov    $0x0,%eax
  jmp    L180
L239:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D220(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  jne    L290
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D144(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L309
L290:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%esi
  lea    D144(%rip),%rax
  mov    %rax,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L73
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  movq   D208(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
L73:
  mov    $0x1,%eax
  jmp    L180
L309:
  mov    $0xffffffff,%eax
  jmp    L180
L210:
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    $0xffffffff,%eax
  jmp    L180
L163:
  addq   $0x1,-0x28(%rbp)
  jmp    L255
L283:
  addq   $0x1,-0x28(%rbp)
L255:
  mov    -0x28(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L283
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <atof@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x10(%rbp),%xmm0
  movsd  D202(%rip),%xmm2
  divsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x30(%rbp),%rax
  movsd  (%rax),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  mov    -0x30(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x1c(%rbp),%eax
L180:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D136
type_guessed: f64
name: disassemble_data
arguments: data_tag: D41
type_guessed: f32[2]
name: disassemble_data
arguments: data_tag: D179
type_guessed: f64
name: disassemble_data
arguments: data_tag: D148
type_guessed: string
name: disassemble_data
arguments: data_tag: D210
type_guessed: string
name: disassemble_data
arguments: data_tag: D208
type_guessed: f32[2]
name: disassemble_data
arguments: data_tag: D220
type_guessed: string
name: disassemble_data
arguments: data_tag: D144
type_guessed: string
name: disassemble_data
arguments: data_tag: D202
type_guessed: f64

tool: D136: 1

tool: {"D41": [0.0,-1.875]}

tool: D179: 10

tool: D148: Nn

tool: D210: Ss

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

tool: D220: EeOo

tool: D144: Ww

tool: D202: 60

assistant: ```c
int parse_coord(const char *s, double *a) {
  double e, f, n = 1.0;
  int r;
  for (; isspace((int)*s); s++)
    ;
  if (*s == '-') {
    s++;
    n = -1.0;
  }
  for (*a = 0.0; isdigit((int)*s); s++) {
    *a *= 10.0;
    *a += *s - '0';
  }
  for (; isspace((int)*s); s++)
    ;
  if (*s == '\0') {
    *a *= n;
    return -1;
  }
  if (((strchr("Nn", (*s)) != NULL) || (strchr("Ss", (*s)) != NULL))) {
    r = 0;
    if ((strchr("Ss", (*s)) != NULL))
      n *= -1.0;
  } else if (((strchr("EeOo", (*s)) != NULL) || (strchr("Ww", (*s)) != NULL))) {
    r = 1;
    if ((strchr("Ww", (*s)) != NULL))
      n *= -1.0;
  } else if (*s == '.') {
    s++;
    for (e = 1.0, f = 0.0; isdigit((int)*s); e *= 10.0, s++) {
      f *= 10.0;
      f += *s - '0';
    }
    *a += f / e;
    *a *= n;
    for (; isspace((int)*s); s++)
      ;
    if (*s == '\0')
      return -1;
    if (((strchr("Nn", (*s)) != NULL) || (strchr("Ss", (*s)) != NULL))) {
      if ((strchr("Ss", (*s)) != NULL))
        *a *= -1.0;
      return 0;
    } else if (((strchr("EeOo", (*s)) != NULL) || (strchr("Ww", (*s)) != NULL))) {
      if ((strchr("Ww", (*s)) != NULL))
        *a *= -1.0;
      return 1;
    } else
      return -1;
  } else {
    *a *= n;
    return -1;
  }
  s++;
  for (; isspace((int)*s); s++)
    ;
  f = atof(s);
  *a += f / 60.0;
  *a *= n;
  return r;
}
```