user: What is the c source code of the assembly code below?

```asm
<swh_geoc2d>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rsi,%r14
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x1c(%rsp),%rbx
  mov    %rdi,%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  lea    0x10(%rsp),%rdx
  lea    D159(%rip),%rsi
  mov    %rbx,%rdi
  call   <strtok_r@plt>
  test   %rax,%rax
  je     L12
  mov    %rax,%rbx
  lea    D129(%rip),%rsi
  mov    %rax,%rdi
  call   <strspn@plt>
  mov    %rax,%rbp
  mov    %rbx,%rdi
  call   <strlen@plt>
  cmp    %rax,%rbp
  jne    L81
  mov    %rbx,%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  mov    %eax,%edi
  not    %edi
  shr    $0x1f,%edi
  call   <assert@plt>
  lea    0x10(%rsp),%rdx
  lea    D159(%rip),%rsi
  mov    $0x0,%edi
  call   <strtok_r@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L137
  lea    D156(%rip),%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L58
  lea    D8(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    $0x5a,%r13d
  mov    $0x1,%r15d
  test   %rax,%rax
  je     L60
  lea    D130(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    $0xb4,%r13d
  mov    $0x0,%r15d
  test   %rax,%rax
  je     L60
  lea    D13(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L60
  mov    $0xffffffff,%eax
  jmp    L245
L58:
  mov    $0x5a,%r13d
  mov    $0x1,%r15d
L60:
  cmp    %ebx,%r13d
  setge  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  lea    0x10(%rsp),%rdx
  lea    D159(%rip),%rsi
  mov    $0x0,%edi
  call   <strtok_r@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L199
  lea    D129(%rip),%rsi
  mov    %rax,%rdi
  call   <strspn@plt>
  mov    %rax,%r12
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %rax,%r12
  jne    L125
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    %eax,%r12d
  cmp    $0x3b,%eax
  setbe  %dil
  movzbl %dil,%edi
  cmp    %ebx,%r13d
  je     L10
L191:
  call   <assert@plt>
  lea    0x10(%rsp),%rdx
  lea    D159(%rip),%rsi
  mov    $0x0,%edi
  call   <strtok_r@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L227
  lea    D129(%rip),%rsi
  mov    %rax,%rdi
  call   <strspn@plt>
  mov    %rax,0x8(%rsp)
  mov    %rbp,%rdi
  call   <strlen@plt>
  cmp    %rax,0x8(%rsp)
  jne    L190
  mov    %rbp,%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  cmp    $0x3b,%eax
  setbe  %dil
  movzbl %dil,%edi
  cmp    %ebx,%r13d
  je     L240
L17:
  call   <assert@plt>
  test   %r15d,%r15d
  je     L115
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  mulsd  D128(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebx,%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebp,%xmm1
  mulsd  D45(%rip),%xmm1
  addsd  %xmm1,%xmm0
L180:
  movsd  %xmm0,(%r14)
  mov    $0x0,%eax
L245:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L113
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L10:
  test   %eax,%eax
  sete   %dil
  movzbl %dil,%edi
  jmp    L191
L240:
  test   %eax,%eax
  sete   %dil
  movzbl %dil,%edi
  jmp    L17
L115:
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  mulsd  D128(%rip),%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebx,%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebp,%xmm1
  mulsd  D45(%rip),%xmm1
  addsd  %xmm1,%xmm0
  xorpd  D9(%rip),%xmm0
  jmp    L180
L12:
  mov    $0xffffffff,%eax
  jmp    L245
L81:
  mov    $0xffffffff,%eax
  jmp    L245
L137:
  mov    $0xffffffff,%eax
  jmp    L245
L199:
  mov    $0xffffffff,%eax
  jmp    L245
L125:
  mov    $0xffffffff,%eax
  jmp    L245
L227:
  mov    $0xffffffff,%eax
  jmp    L245
L190:
  mov    $0xffffffff,%eax
  jmp    L245
L113:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D159
type_guessed: string
name: read_data
arguments: label: D129
type_guessed: string
name: read_data
arguments: label: D156
type_guessed: string
name: read_data
arguments: label: D8
type_guessed: string
name: read_data
arguments: label: D130
type_guessed: string
name: read_data
arguments: label: D13
type_guessed: string
name: read_data
arguments: label: D128
type_guessed: byte[8]
name: read_data
arguments: label: D45
type_guessed: byte[8]
name: read_data
arguments: label: D9
type_guessed: byte[16]

tool: D159: :

tool: D129: 0123456789

tool: D156: N

tool: D8: E

tool: D130: S

tool: D13: W

tool: {"D128": [0x11,0x11,0x11,0x11,0x11,0x11,0x91,0x3f]}

tool: {"D45": [0xdf,0xbc,0x9a,0x78,0x56,0x34,0x32,0x3f]}

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

assistant: ```c
int swh_geoc2d(const char *coord, double *ret) {
  int deg, dir, min, sec, degmax;
  char *ptr, buf[12];
  strcpy(buf, coord);
  char *saveptr;
  ptr = strtok_r(buf, ":", &saveptr);
  if (ptr == NULL || strspn(ptr, "0123456789") != strlen(ptr))
    return -1;
  else
    deg = atoi(ptr);
  assert(deg >= 0);
  ptr = strtok_r(NULL, ":", &saveptr);
  if (ptr == NULL)
    return -1;
  else {
    if (strcmp(ptr, "N") == 0 || strcmp(ptr, "E") == 0) {
      degmax = 90;
      dir = 1;
    } else if (strcmp(ptr, "S") == 0 || strcmp(ptr, "W") == 0) {
      degmax = 180;
      dir = 0;
    } else
      return -1;
  }
  assert(deg <= degmax);
  ptr = strtok_r(NULL, ":", &saveptr);
  if (ptr == NULL || strspn(ptr, "0123456789") != strlen(ptr))
    return -1;
  else
    min = atoi(ptr);
  assert(deg == degmax ? min == 0 : min >= 0 && min <= 59);
  ptr = strtok_r(NULL, ":", &saveptr);
  if (ptr == NULL || strspn(ptr, "0123456789") != strlen(ptr))
    return -1;
  else
    sec = atoi(ptr);
  assert(deg == degmax ? sec == 0 : sec >= 0 && sec <= 59);
  *ret = (double)(dir ? (deg + ((1.0 / 60) * min) + ((1.0 / 3600) * sec)) : -(deg + ((1.0 / 60) * min) + ((1.0 / 3600) * sec)));
  return 0;
}
```