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

```asm
<swh_geoc2d>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  lea    D67(%rip),%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rsi,0x10(%rsp)
  lea    0x2c(%rsp),%r13
  mov    %rdi,%rsi
  lea    0x20(%rsp),%r12
  mov    %r13,%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x38(%rsp)
  xor    %eax,%eax
  call   <strcpy@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %r13,%rdi
  call   <strtok_r@plt>
  test   %rax,%rax
  je     L103
  lea    D6(%rip),%r14
  mov    %rax,%r13
  mov    %rax,%rdi
  mov    %r14,%rsi
  call   <strspn@plt>
  mov    %r13,%rdi
  mov    %rax,%rbx
  call   <strlen@plt>
  cmp    %rax,%rbx
  jne    L103
  mov    %r13,%rdi
  call   <atoi@plt>
  mov    %eax,%edi
  mov    %eax,%ebx
  not    %edi
  shr    $0x1f,%edi
  call   <assert@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  xor    %edi,%edi
  call   <strtok_r@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L103
  lea    D83(%rip),%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L15
L13:
  movl   $0x1,0x1c(%rsp)
  mov    $0x5a,%r15d
L136:
  xor    %edi,%edi
  cmp    %ebx,%r15d
  setge  %dil
  call   <assert@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  xor    %edi,%edi
  call   <strtok_r@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L103
  mov    %rax,%rdi
  mov    %r14,%rsi
  call   <strspn@plt>
  mov    %r13,%rdi
  mov    %rax,0x8(%rsp)
  call   <strlen@plt>
  cmp    %rax,0x8(%rsp)
  jne    L103
  mov    %r13,%rdi
  call   <atoi@plt>
  xor    %edi,%edi
  cmp    $0x3b,%eax
  mov    %eax,%r13d
  setbe  %dil
  cmp    %ebx,%r15d
  jne    L20
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
L20:
  call   <assert@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  xor    %edi,%edi
  call   <strtok_r@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L103
  mov    %rax,%rdi
  mov    %r14,%rsi
  call   <strspn@plt>
  mov    %r12,%rdi
  mov    %rax,%rbp
  call   <strlen@plt>
  cmp    %rax,%rbp
  jne    L103
  mov    %r12,%rdi
  call   <atoi@plt>
  xor    %edi,%edi
  cmp    $0x3b,%eax
  mov    %eax,%ebp
  setbe  %dil
  cmp    %ebx,%r15d
  jne    L59
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
L59:
  call   <assert@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  mov    0x1c(%rsp),%eax
  cvtsi2sd %r13d,%xmm0
  mulsd  D21(%rip),%xmm0
  cvtsi2sd %ebx,%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebp,%xmm1
  mulsd  D54(%rip),%xmm1
  addsd  %xmm1,%xmm0
  test   %eax,%eax
  je     L85
L165:
  mov    0x10(%rsp),%rax
  movsd  %xmm0,(%rax)
  xor    %eax,%eax
L167:
  mov    0x38(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L21
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L15:
  lea    D3(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L13
  lea    D70(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L176
L113:
  movl   $0x0,0x1c(%rsp)
  mov    $0xb4,%r15d
  jmp    L136
  nop
L85:
  xorpd  D16(%rip),%xmm0
  jmp    L165
  nopw   0x0(%rax,%rax,1)
L176:
  lea    D58(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L113
  nopl   0x0(%rax)
L103:
  mov    $0xffffffff,%eax
  jmp    L167
L21:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D67
type_guessed: string
name: disassemble_data
arguments: data_tag: D6
type_guessed: string
name: disassemble_data
arguments: data_tag: D83
type_guessed: string
name: disassemble_data
arguments: data_tag: D21
type_guessed: byte[8]
name: disassemble_data
arguments: data_tag: D54
type_guessed: byte[8]
name: disassemble_data
arguments: data_tag: D3
type_guessed: string
name: disassemble_data
arguments: data_tag: D70
type_guessed: string
name: disassemble_data
arguments: data_tag: D16
type_guessed: byte[16]
name: disassemble_data
arguments: data_tag: D58
type_guessed: string

tool: D67: :

tool: D6: 0123456789

tool: D83: N

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

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

tool: D3: E

tool: D70: S

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

tool: D58: W

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