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

```asm
<latlon2ul>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %rdi,%r14
  mov    %rsi,(%rsp)
  mov    (%rdi),%rbx
  mov    $0x0,%ebp
  jmp    L312
L83:
  lea    0x0(%rbp,%rbp,4),%edx
  add    $0x1,%rbx
  movsbl -0x1(%rbx),%eax
  lea    -0x30(%rax,%rdx,2),%ebp
L312:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L83
  jmp    L197
L123:
  add    $0x1,%rbx
L197:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L123
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  mov    $0x0,%r12d
  test   %rax,%rax
  jne    L72
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%r13d
  mov    $0x0,%r12d
  jmp    L13
L8:
  lea    (%r12,%r12,4),%edx
  add    $0x1,%rbx
  movsbl -0x1(%rbx),%eax
  lea    -0x30(%rax,%rdx,2),%r12d
L72:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L8
  jmp    L134
L188:
  add    $0x1,%rbx
L134:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L188
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  mov    $0x0,%r13d
  test   %rax,%rax
  jne    L302
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%r13d
  jmp    L13
L16:
  lea    0x0(%r13,%r13,4),%edx
  add    $0x1,%rbx
  movsbl -0x1(%rbx),%eax
  lea    -0x30(%rax,%rdx,2),%r13d
L302:
  movsbl (%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L16
  movl   $0x0,0xc(%rsp)
  cmpb   $0x2e,(%rbx)
  jne    L204
  movsbl 0x1(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L31
  add    $0x1,%rbx
  movl   $0x0,0xc(%rsp)
  jmp    L204
L31:
  movsbl 0x1(%rbx),%eax
  sub    $0x30,%eax
  imul   $0x64,%eax,%eax
  mov    %eax,0xc(%rsp)
  movsbl 0x2(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L191
  add    $0x2,%rbx
  jmp    L204
L191:
  movsbl 0x2(%rbx),%eax
  lea    -0xf0(%rax,%rax,4),%eax
  mov    0xc(%rsp),%ecx
  lea    (%rcx,%rax,2),%eax
  mov    %eax,0xc(%rsp)
  movsbl 0x3(%rbx),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L181
  add    $0x3,%rbx
  jmp    L204
L181:
  movsbl 0x3(%rbx),%eax
  mov    0xc(%rsp),%ecx
  lea    -0x30(%rcx,%rax,1),%eax
  mov    %eax,0xc(%rsp)
  lea    0x4(%rbx),%rbx
  jmp    L204
L126:
  add    $0x1,%rbx
L204:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L126
  jmp    L309
L278:
  add    $0x1,%rbx
L309:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L278
L13:
  movzbl (%rbx),%eax
  lea    -0x45(%rax),%ecx
  cmp    $0x32,%cl
  ja     L62
  mov    $0x1,%eax
  shl    %cl,%rax
  movabs $0x4400000044000,%rdx
  test   %rdx,%rax
  jne    L330
  mov    $0x0,%r15d
  movabs $0x20100000201,%rdx
  test   %rdx,%rax
  jne    L119
L187:
  mov    $0x1,%eax
  shl    %cl,%rax
  movabs $0x420000004200,%rdx
  test   %rdx,%rax
  jne    L153
  movabs $0x4000100040001,%rdx
  test   %rdx,%rax
  setne  %al
  movzbl %al,%eax
  add    %eax,%eax
L131:
  mov    (%rsp),%rsi
  mov    %eax,(%rsi)
  add    $0x1,%rbx
  jmp    L250
L119:
  imul   $0x3c,%ebp,%eax
  add    %r12d,%eax
  imul   $0x3c,%eax,%eax
  add    %r13d,%eax
  imul   $0x3e8,%eax,%eax
  mov    0xc(%rsp),%esi
  lea    -0x80000000(%rsi,%rax,1),%r15d
  jmp    L187
L330:
  mov    $0x80000000,%r15d
  sub    0xc(%rsp),%r15d
  imul   $0x3c,%ebp,%eax
  add    %r12d,%eax
  imul   $0x3c,%eax,%eax
  add    %r13d,%eax
  imul   $0x3e8,%eax,%eax
  sub    %eax,%r15d
  jmp    L187
L62:
  mov    $0x0,%r15d
  mov    $0x0,%eax
  jmp    L131
L153:
  mov    $0x1,%eax
  jmp    L131
L164:
  add    $0x1,%rbx
L250:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L164
  jmp    L52
L70:
  add    $0x1,%rbx
L52:
  movsbl (%rbx),%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L70
  mov    %rbx,(%r14)
  mov    %r15d,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
u_int32_t latlon2ul(char **latlonstrptr, int *which) {
  char *cp;
  u_int32_t retval;
  int deg = 0, min = 0, secs = 0, secsfrac = 0;
  cp = *latlonstrptr;
  while (isdigit(*cp))
    deg = deg * 10 + (*cp++ - '0');
  while (isspace(*cp))
    cp++;
  if (!(isdigit(*cp)))
    goto fndhemi;
  while (isdigit(*cp))
    min = min * 10 + (*cp++ - '0');
  while (isspace(*cp))
    cp++;
  if (!(isdigit(*cp)))
    goto fndhemi;
  while (isdigit(*cp))
    secs = secs * 10 + (*cp++ - '0');
  if (*cp == '.') {
    cp++;
    if (isdigit(*cp)) {
      secsfrac = (*cp++ - '0') * 100;
      if (isdigit(*cp)) {
        secsfrac += (*cp++ - '0') * 10;
        if (isdigit(*cp)) {
          secsfrac += (*cp++ - '0');
        }
      }
    }
  }
  while (!isspace(*cp))
    cp++;
  while (isspace(*cp))
    cp++;
fndhemi:
  switch (*cp) {
  case 'N':
  case 'n':
  case 'E':
  case 'e':
    retval = ((unsigned)1 << 31) + (((((deg * 60) + min) * 60) + secs) * 1000) + secsfrac;
    break;
  case 'S':
  case 's':
  case 'W':
  case 'w':
    retval = ((unsigned)1 << 31) - (((((deg * 60) + min) * 60) + secs) * 1000) - secsfrac;
    break;
  default:
    retval = 0;
    break;
  }
  switch (*cp) {
  case 'N':
  case 'n':
  case 'S':
  case 's':
    *which = 1;
    break;
  case 'E':
  case 'e':
  case 'W':
  case 'w':
    *which = 2;
    break;
  default:
    *which = 0;
    break;
  }
  cp++;
  while (!isspace(*cp))
    cp++;
  while (isspace(*cp))
    cp++;
  *latlonstrptr = cp;
  return (retval);
}
```