user: What would the C source look like for the assembly code provided here?

```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    L79
  mov    $0x1,%eax
  nopw   0x0(%rax,%rax,1)
L117:
  mov    %eax,%ecx
  add    $0x1,%rax
  movzbl -0x1(%rbx,%rax,1),%edx
  cmp    $0x20,%dl
  je     L117
L64:
  movsd  D38(%rip),%xmm2
  movsd  %xmm2,(%rsp)
  cmp    $0x2d,%dl
  jne    L17
  movsd  D18(%rip),%xmm5
  add    $0x1,%ecx
  movsd  %xmm5,(%rsp)
L17:
  movslq %ecx,%rcx
  lea    0x10(%rsp),%r12
  lea    (%rbx,%rcx,1),%r13
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strtod@plt>
  mov    0x10(%rsp),%rax
  movsd  %xmm0,0x8(%rsp)
  cmp    %rax,%r13
  je     L143
  sub    %rbx,%rax
  cltq
  lea    (%rbx,%rax,1),%r13
  movsbl 0x0(%r13),%edi
  test   %dil,%dil
  je     L142
  lea    0x1(%rbx,%rax,1),%r14
  jmp    L114
  nopw   0x0(%rax,%rax,1)
L44:
  mov    %r14,%r13
  movsbl (%r14),%edi
  add    $0x1,%r14
  test   %dil,%dil
  je     L142
L114:
  call   <isdigit@plt>
  test   %eax,%eax
  je     L44
L142:
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strtod@plt>
  mov    0x10(%rsp),%rax
  movq   %xmm0,%r14
  cmp    %r13,%rax
  je     L16
  sub    %rbx,%rax
  cltq
  lea    (%rbx,%rax,1),%r13
  movsbl 0x0(%r13),%edi
  test   %dil,%dil
  je     L161
  lea    0x1(%rbx,%rax,1),%rbx
  jmp    L78
  nopl   0x0(%rax)
L75:
  mov    %rbx,%r13
  movsbl (%rbx),%edi
  add    $0x1,%rbx
  test   %dil,%dil
  je     L161
L78:
  call   <isdigit@plt>
  test   %eax,%eax
  je     L75
L161:
  mov    %r12,%rsi
  mov    %r13,%rdi
  call   <strtod@plt>
  cmp    %r13,0x10(%rsp)
  je     L31
  movq   %r14,%xmm1
  divsd  D49(%rip),%xmm1
  addsd  0x8(%rsp),%xmm1
  xor    %eax,%eax
  divsd  D11(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mulsd  (%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
L141:
  mov    0x18(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L101
  add    $0x20,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopw   0x0(%rax,%rax,1)
L16:
  movsd  (%rsp),%xmm0
  mulsd  0x8(%rsp),%xmm0
  xor    %eax,%eax
  movsd  %xmm0,0x0(%rbp)
  jmp    L141
  nopl   0x0(%rax)
L31:
  movq   %r14,%xmm0
  divsd  D49(%rip),%xmm0
  xor    %eax,%eax
  addsd  0x8(%rsp),%xmm0
  mulsd  (%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  jmp    L141
  nopl   0x0(%rax)
L79:
  xor    %ecx,%ecx
  jmp    L64
L143:
  mov    $0xffffffff,%eax
  jmp    L141
L101:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D38
datatype: f64
name: read_data
arguments: data_tag: D18
datatype: f32[2]
name: read_data
arguments: data_tag: D49
datatype: f64
name: read_data
arguments: data_tag: D11
datatype: f64

tool: D38: 1

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

tool: D49: 60

tool: D11: 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;
}
```