user: 请将以下的汇编代码转换成C语言代码:

```asm
<dms_to_degrees>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x20,%rsp
  movzbl (%rdi),%edx
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  cmp    $0x20,%dl
  jne    L61
  mov    %edi,%esi
  lea    0x1(%rdi),%rax
  neg    %esi
  nopw   0x0(%rax,%rax,1)
L27:
  lea    (%rsi,%rax,1),%ecx
  mov    %rax,%r13
  movzbl (%rax),%edx
  add    $0x1,%rax
  cmp    $0x20,%dl
  je     L27
L89:
  movsd  D44(%rip),%xmm2
  movsd  %xmm2,(%rsp)
  cmp    $0x2d,%dl
  jne    L103
  movsd  D32(%rip),%xmm5
  add    $0x1,%ecx
  movslq %ecx,%rcx
  lea    (%rbx,%rcx,1),%r13
  movsd  %xmm5,(%rsp)
L103:
  lea    0x10(%rsp),%r12
  mov    %r13,%rdi
  mov    %r12,%rsi
  call   <strtod@plt>
  mov    0x10(%rsp),%rax
  movsd  %xmm0,0x8(%rsp)
  cmp    %r13,%rax
  je     L152
  sub    %rbx,%rax
  cltq
  lea    (%rbx,%rax,1),%r13
  movsbl 0x0(%r13),%edi
  test   %dil,%dil
  je     L32
  lea    0x1(%rbx,%rax,1),%r14
  jmp    L148
  nopl   0x0(%rax)
L124:
  mov    %r14,%r13
  movsbl (%r14),%edi
  add    $0x1,%r14
  test   %dil,%dil
  je     L32
L148:
  call   <isdigit@plt>
  test   %eax,%eax
  je     L124
L32:
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strtod@plt>
  mov    0x10(%rsp),%rax
  movq   %xmm0,%r14
  cmp    %r13,%rax
  je     L125
  sub    %rbx,%rax
  cltq
  lea    (%rbx,%rax,1),%r13
  movsbl 0x0(%r13),%edi
  test   %dil,%dil
  je     L64
  lea    0x1(%rbx,%rax,1),%rbx
  jmp    L157
  nopl   0x0(%rax)
L166:
  mov    %rbx,%r13
  movsbl (%rbx),%edi
  add    $0x1,%rbx
  test   %dil,%dil
  je     L64
L157:
  call   <isdigit@plt>
  test   %eax,%eax
  je     L166
L64:
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strtod@plt>
  cmp    %r13,0x10(%rsp)
  je     L43
  movq   %r14,%xmm1
  divsd  D19(%rip),%xmm1
  addsd  0x8(%rsp),%xmm1
  xor    %eax,%eax
  divsd  D7(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mulsd  (%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
L60:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L108
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L125:
  movsd  (%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  xor    %eax,%eax
  movsd  %xmm0,0x0(%rbp)
  jmp    L60
  nopl   0x0(%rax)
L43:
  movq   %r14,%xmm0
  divsd  D19(%rip),%xmm0
  xor    %eax,%eax
  addsd  0x8(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  jmp    L60
  nopl   0x0(%rax)
L61:
  mov    %rdi,%r13
  xor    %ecx,%ecx
  jmp    L89
L152:
  mov    $0xffffffff,%eax
  jmp    L60
L108:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D44
type_infered: f64
name: unpack_data
arguments: data_label: D32
type_infered: f32[2]
name: unpack_data
arguments: data_label: D19
type_infered: f64
name: unpack_data
arguments: data_label: D7
type_infered: f64

tool: D44: 1

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

tool: D19: 60

tool: D7: 3600

assistant: ```c
int dms_to_degrees(char *decs, double *dec) {
  char *endp;
  double d = 0.0, m = 0.0, s = 0.0;
  int i;
  double sign = 1.0;
  for (i = 0; decs[i] == ' ' && decs[i] != 0; i++)
    ;
  if (decs[i] == '-') {
    sign = -1.0;
    i++;
  }
  d = strtod(decs + i, &endp);
  if (endp == decs + i) {
    return -1;
  }
  for (i = endp - decs; decs[i] && !isdigit(decs[i]); i++)
    ;
  m = strtod(decs + i, &endp);
  if (endp == decs + i) {
    *dec = d * sign;
    return 0;
  }
  for (i = endp - decs; decs[i] && !isdigit(decs[i]); i++)
    ;
  s = strtod(decs + i, &endp);
  if (endp == decs + i) {
    *dec = (d + m / 60.0) * sign;
    return 0;
  }
  *dec = (d + m / 60.0 + s / 3600.0) * sign;
  return 0;
}
```