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

```asm
<SARParseLongitudeDMS>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,%r15
  mov    %fs:0x28,%rax
  mov    %rax,0x68(%rsp)
  xor    %eax,%eax
  test   %rsi,%rsi
  je     L281
  movl   $0x0,(%rsi)
L281:
  mov    0x8(%rsp),%rbx
  test   %rbx,%rbx
  je     L147
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L204
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  mov    $0x0,%ebp
  mov    $0x1,%r14d
L51:
  cmp    $0x20,%dil
  je     L74
  cmp    $0x9,%dil
  je     L74
  movsbl %dil,%edi
  call   <toupper@plt>
  cmp    $0x27,%al
  cmove  %r14d,%r12d
  movsbl (%rbx),%edi
  call   <toupper@plt>
  cmp    $0x57,%al
  cmove  %r14d,%r13d
  add    $0x1,%rbx
  add    $0x1,%ebp
  movzbl (%rbx),%edi
  test   %dil,%dil
  jne    L51
L74:
  test   %ebp,%ebp
  jg     L39
  movb   $0x0,0x10(%rsp)
L263:
  mov    $0x4f,%eax
  cmp    %eax,%ebp
  cmovg  %eax,%ebp
  movslq %ebp,%rbp
  movb   $0x0,0x10(%rsp,%rbp,1)
  test   %r12d,%r12d
  jne    L246
  test   %r15,%r15
  je     L6
  lea    0x10(%rsp),%rdi
  call   <atof@plt>
  test   %r13d,%r13d
  je     L45
  comiss D61(%rip),%xmm0
  jbe    L45
  xorps  D46(%rip),%xmm0
  movss  %xmm0,(%r15)
  jmp    L6
L39:
  mov    $0x50,%edx
  cmp    %edx,%ebp
  cmovle %ebp,%edx
  lea    0x10(%rsp),%rdi
  mov    0x8(%rsp),%rsi
  call   <strncpy@plt>
  jmp    L263
L246:
  lea    0x10(%rsp),%rdi
  mov    $0x27,%esi
  call   <strchr@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L20
  movb   $0x0,(%rax)
  lea    0x10(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  add    $0x1,%rbx
  mov    $0x22,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L265
  movb   $0x0,(%rax)
  mov    %rbx,%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  add    $0x1,%r12
  mov    $0x22,%esi
  mov    %r12,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L163
  movb   $0x0,(%rax)
  mov    %r12,%rdi
  call   <atoi@plt>
L169:
  mov    $0x0,%r12d
  test   %r15,%r15
  je     L6
  test   %r13d,%r13d
  je     L275
  test   %ebp,%ebp
  jle    L275
  neg    %ebp
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebp,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %ebx,%xmm1
  movss  D77(%rip),%xmm2
  divss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  divss  %xmm2,%xmm1
  divss  D48(%rip),%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,(%r15)
  jmp    L6
L20:
  lea    0x10(%rsp),%rdi
  call   <atoi@plt>
  mov    %eax,%ebp
  mov    $0x0,%ebx
  mov    $0x0,%eax
  jmp    L169
L265:
  mov    %rbx,%rdi
  call   <atoi@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  jmp    L169
L163:
  mov    %r12,%rdi
  call   <atoi@plt>
  jmp    L169
L275:
  test   %ebp,%ebp
  js     L249
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebx,%xmm0
  movss  D77(%rip),%xmm2
  divss  %xmm2,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %ebp,%xmm1
  addss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  divss  %xmm2,%xmm1
  divss  D48(%rip),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,(%r15)
  mov    $0x0,%r12d
  jmp    L6
L249:
  pxor   %xmm0,%xmm0
  cvtsi2ss %ebp,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %ebx,%xmm1
  movss  D77(%rip),%xmm2
  divss  %xmm2,%xmm1
  subss  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  cvtsi2ss %eax,%xmm1
  divss  %xmm2,%xmm1
  divss  D48(%rip),%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,(%r15)
  mov    $0x0,%r12d
  jmp    L6
L45:
  movss  %xmm0,(%r15)
L6:
  mov    0x68(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L284
  mov    %r12d,%eax
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L147:
  mov    $0xffffffff,%r12d
  jmp    L6
L204:
  mov    $0xffffffff,%r12d
  jmp    L6
L284:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D61
data_type: byte[4]
name: unpack_data
arguments: data_label: D46
data_type: byte[16]
name: unpack_data
arguments: data_label: D77
data_type: byte[4]
name: unpack_data
arguments: data_label: D48
data_type: byte[4]

tool: {"D61": [0x00,0x00,0x00,0x00]}

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

tool: {"D77": [0x00,0x00,0x70,0x42]}

tool: {"D48": [0x00,0x00,0xc8,0x42]}

assistant: ```c
int SARParseLongitudeDMS(const char *string, float *dms) {
  const char *sp;
  int in_len, is_traditional = 0, is_west = 0;
  int lstring_len = 80;
  char *sp2, *sp3;
  char lstring[80];
  if (dms != NULL)
    *dms = 0.0f;
  if ((string != NULL) ? (*string == '\0') : 1)
    return (-1);
  sp = string;
  in_len = 0;
  while ((*sp != '\0') && !(((*sp) == ' ') || ((*sp) == '\t'))) {
    if (toupper(*sp) == '\'')
      is_traditional = 1;
    if (toupper(*sp) == 'W')
      is_west = 1;
    sp++;
    in_len++;
  }
  if (in_len > 0)
    strncpy(lstring, string, (((in_len) < (lstring_len)) ? (in_len) : (lstring_len)));
  else
    *lstring = '\0';
  lstring[(((in_len) < (lstring_len - 1)) ? (in_len) : (lstring_len - 1))] = '\0';
  if (is_traditional) {
    int d = 0, m = 0, s = 0;
    sp2 = lstring;
    if (sp2 != NULL) {
      sp3 = strchr(sp2, '\'');
      if (sp3 != NULL) {
        *sp3 = '\0';
        d = (((sp2) != NULL) ? atoi(sp2) : 0);
        sp2 = sp3 + 1;
      } else {
        d = (((sp2) != NULL) ? atoi(sp2) : 0);
        sp2 = NULL;
      }
    }
    if (sp2 != NULL) {
      sp3 = strchr(sp2, '"');
      if (sp3 != NULL) {
        *sp3 = '\0';
        m = (((sp2) != NULL) ? atoi(sp2) : 0);
        sp2 = sp3 + 1;
      } else {
        m = (((sp2) != NULL) ? atoi(sp2) : 0);
        sp2 = NULL;
      }
    }
    if (sp2 != NULL) {
      sp3 = strchr(sp2, '"');
      if (sp3 != NULL) {
        *sp3 = '\0';
        s = (((sp2) != NULL) ? atoi(sp2) : 0);
        sp2 = sp3 + 1;
      } else {
        s = (((sp2) != NULL) ? atoi(sp2) : 0);
        sp2 = NULL;
      }
    }
    if (dms != NULL) {
      if (is_west && (d > 0))
        *dms = (float)-d - ((float)m / 60.0f) - ((float)s / 60.0f / 100.0f);
      else if (d < 0)
        *dms = (float)d - ((float)m / 60.0f) - ((float)s / 60.0f / 100.0f);
      else
        *dms = (float)d + ((float)m / 60.0f) + ((float)s / 60.0f / 100.0f);
    }
  } else {
    sp2 = lstring;
    if (dms != NULL) {
      float d = (float)(((sp2) != NULL) ? atof(sp2) : 0.0f);
      if (is_west && (d > 0.0f))
        *dms = -d;
      else
        *dms = d;
    }
  }
  return (0);
}
```