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

```asm
<latlon2ul>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x28,%rsp
  mov    (%rdi),%rbp
  mov    %rdi,0x8(%rsp)
  mov    %rsi,0x10(%rsp)
  jmp    L5
  nopl   0x0(%rax,%rax,1)
L50:
  movsbl -0x1(%r12),%eax
  lea    (%rbx,%rbx,4),%edx
  mov    %r12,%rbp
  lea    -0x30(%rax,%rdx,2),%ebx
L5:
  movsbl 0x0(%rbp),%edi
  lea    0x1(%rbp),%r12
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L50
  jmp    L348
  nopl   0x0(%rax)
L17:
  add    $0x1,%r12
L348:
  movsbl 0x0(%rbp),%edi
  mov    %rbp,%r14
  mov    %r12,%rbp
  call   <isspace@plt>
  test   %rax,%rax
  jne    L17
  movsbl (%r14),%edi
  xor    %ebp,%ebp
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L134
  jmp    L64
  nopl   (%rax)
L216:
  movsbl -0x1(%r12),%eax
  lea    0x0(%rbp,%rbp,4),%edx
  mov    %r12,%r14
  lea    -0x30(%rax,%rdx,2),%ebp
L134:
  movsbl (%r14),%edi
  lea    0x1(%r14),%r12
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L216
  jmp    L366
  nopl   (%rax)
L187:
  add    $0x1,%r12
L366:
  movsbl (%r14),%edi
  mov    %r14,%r13
  mov    %r12,%r14
  call   <isspace@plt>
  test   %rax,%rax
  jne    L187
  movsbl 0x0(%r13),%edi
  xor    %r12d,%r12d
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L173
  movl   $0x0,0x1c(%rsp)
  mov    %r13,%r14
  xor    %r12d,%r12d
L281:
  movzbl (%r14),%eax
  lea    -0x45(%rax),%ecx
  cmp    $0x32,%cl
  ja     L69
L283:
  movabs $0x4400000044000,%rsi
  mov    $0x1,%eax
  shl    %cl,%rax
  test   %rsi,%rax
  jne    L316
  movabs $0x20100000201,%rsi
  xor    %r15d,%r15d
  test   %rsi,%rax
  jne    L203
L300:
  mov    $0x1,%eax
  shl    %cl,%rax
  movabs $0x420000004200,%rcx
  test   %rcx,%rax
  jne    L343
  movabs $0x4000100040001,%rcx
  test   %rcx,%rax
  setne  %al
  movzbl %al,%eax
  add    %eax,%eax
L146:
  mov    0x10(%rsp),%rsi
  add    $0x1,%r14
  mov    %eax,(%rsi)
  jmp    L163
  nopw   0x0(%rax,%rax,1)
L332:
  add    $0x1,%r14
L163:
  movsbl (%r14),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L332
  movsbl (%r14),%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L49
  nopl   0x0(%rax,%rax,1)
L298:
  movsbl 0x1(%r14),%edi
  add    $0x1,%r14
  call   <isspace@plt>
  test   %rax,%rax
  jne    L298
L49:
  mov    0x8(%rsp),%rax
  mov    %r14,(%rax)
  add    $0x28,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L255:
  movsbl -0x1(%r15),%eax
  lea    (%r12,%r12,4),%edx
  mov    %r15,%r13
  lea    -0x30(%rax,%rdx,2),%r12d
L173:
  movsbl 0x0(%r13),%edi
  lea    0x1(%r13),%r15
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L255
  movsbl 0x0(%r13),%edi
  movl   $0x0,0x1c(%rsp)
  cmp    $0x2e,%dil
  jne    L350
  jmp    L88
  nopl   0x0(%rax)
L331:
  movsbl (%r15),%edi
  mov    %r15,%r13
  add    $0x1,%r15
L350:
  call   <isspace@plt>
  test   %rax,%rax
  je     L331
  jmp    L42
  nopw   0x0(%rax,%rax,1)
L111:
  add    $0x1,%r15
L42:
  movsbl 0x0(%r13),%edi
  mov    %r13,%r14
  mov    %r15,%r13
  call   <isspace@plt>
  test   %rax,%rax
  jne    L111
  movzbl (%r14),%eax
  lea    -0x45(%rax),%ecx
  cmp    $0x32,%cl
  jbe    L283
L69:
  xor    %r15d,%r15d
  xor    %eax,%eax
  jmp    L146
  nopl   0x0(%rax,%rax,1)
L64:
  movl   $0x0,0x1c(%rsp)
  xor    %r12d,%r12d
  xor    %ebp,%ebp
  jmp    L281
L203:
  imul   $0x3c,%ebx,%eax
  mov    0x1c(%rsp),%esi
  add    %ebp,%eax
  imul   $0x3c,%eax,%eax
  add    %r12d,%eax
  imul   $0x3e8,%eax,%eax
  lea    -0x80000000(%rsi,%rax,1),%r15d
  jmp    L300
L316:
  imul   $0x3c,%ebx,%eax
  mov    $0x80000000,%r15d
  sub    0x1c(%rsp),%r15d
  add    %ebp,%eax
  imul   $0x3c,%eax,%eax
  add    %r12d,%eax
  imul   $0x3e8,%eax,%eax
  sub    %eax,%r15d
  jmp    L300
L88:
  movsbl 0x1(%r13),%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L1
  movsbl 0x1(%r13),%edi
  mov    %r15,%r13
  lea    0x1(%r15),%r15
  jmp    L350
L343:
  mov    $0x1,%eax
  jmp    L146
L1:
  movsbl 0x1(%r13),%eax
  movsbl 0x2(%r13),%edi
  sub    $0x30,%eax
  imul   $0x64,%eax,%eax
  mov    %eax,0x1c(%rsp)
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L267
  movsbl 0x2(%r13),%edi
  add    $0x2,%r13
  lea    0x1(%r13),%r15
  jmp    L350
L267:
  movsbl 0x2(%r13),%eax
  mov    0x1c(%rsp),%ecx
  movsbl 0x3(%r13),%edi
  lea    -0xf0(%rax,%rax,4),%eax
  lea    (%rcx,%rax,2),%eax
  mov    %eax,0x1c(%rsp)
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L159
  movsbl 0x3(%r13),%edi
  add    $0x3,%r13
  lea    0x1(%r13),%r15
  jmp    L350
L159:
  movsbl 0x3(%r13),%eax
  mov    0x1c(%rsp),%ecx
  add    $0x4,%r13
  movsbl 0x0(%r13),%edi
  lea    0x1(%r13),%r15
  lea    -0x30(%rcx,%rax,1),%eax
  mov    %eax,0x1c(%rsp)
  jmp    L350
```

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