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

```asm
<latlon2ul>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  mov    %rax,-0x8(%rbp)
  jmp    L96
L304:
  mov    -0x18(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %ecx,%eax
  mov    %eax,-0x18(%rbp)
L96:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L304
  jmp    L106
L346:
  addq   $0x1,-0x8(%rbp)
L106:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L346
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L15
  jmp    L287
L343:
  mov    -0x14(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %ecx,%eax
  mov    %eax,-0x14(%rbp)
L287:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L343
  jmp    L179
L49:
  addq   $0x1,-0x8(%rbp)
L179:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L49
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L195
  jmp    L277
L26:
  mov    -0x10(%rbp),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %ecx,%eax
  mov    %eax,-0x10(%rbp)
L277:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  jne    L26
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L159
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L159
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  imul   $0x64,%eax,%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L159
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  mov    %edx,%eax
  shl    $0x2,%eax
  add    %edx,%eax
  add    %eax,%eax
  add    %eax,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isdigit@plt>
  test   %rax,%rax
  je     L159
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  add    %eax,-0xc(%rbp)
  jmp    L159
L104:
  addq   $0x1,-0x8(%rbp)
L159:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L104
  jmp    L81
L296:
  addq   $0x1,-0x8(%rbp)
L81:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L296
  jmp    L239
L15:
  nop
  jmp    L239
L195:
  nop
L239:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x45,%eax
  cmp    $0x32,%eax
  seta   %dl
  test   %dl,%dl
  jne    L238
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%rdx
  movabs $0x4400000044000,%rax
  and    %rdx,%rax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  jne    L209
  movabs $0x20100000201,%rax
  and    %rdx,%rax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  je     L238
  mov    -0x18(%rbp),%eax
  imul   $0x3c,%eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  imul   $0x3c,%eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  imul   $0x3e8,%eax,%eax
  lea    -0x80000000(%rax),%edx
  mov    -0xc(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L329
L209:
  mov    -0x18(%rbp),%eax
  imul   $0x3c,%eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  imul   $0x3c,%eax,%edx
  mov    -0x10(%rbp),%eax
  add    %edx,%eax
  imul   $0xfffffc18,%eax,%eax
  add    $0x80000000,%eax
  sub    -0xc(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L329
L238:
  movl   $0x0,-0x1c(%rbp)
  nop
L329:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x45,%eax
  cmp    $0x32,%eax
  seta   %dl
  test   %dl,%dl
  jne    L340
  mov    $0x1,%edx
  mov    %eax,%ecx
  shl    %cl,%rdx
  movabs $0x4000100040001,%rax
  and    %rdx,%rax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  jne    L46
  movabs $0x420000004200,%rax
  and    %rdx,%rax
  test   %rax,%rax
  setne  %al
  test   %al,%al
  je     L340
  mov    -0x30(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L322
L46:
  mov    -0x30(%rbp),%rax
  movl   $0x2,(%rax)
  jmp    L322
L340:
  mov    -0x30(%rbp),%rax
  movl   $0x0,(%rax)
  nop
L322:
  addq   $0x1,-0x8(%rbp)
  jmp    L165
L290:
  addq   $0x1,-0x8(%rbp)
L165:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L290
  jmp    L13
L169:
  addq   $0x1,-0x8(%rbp)
L13:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movzbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L169
  mov    -0x28(%rbp),%rax
  mov    -0x8(%rbp),%rdx
  mov    %rdx,(%rax)
  mov    -0x1c(%rbp),%eax
  leave
  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((unsigned char)*cp))
    deg = deg * 10 + (*cp++ - '0');
  while (isspace((unsigned char)*cp))
    cp++;
  if (!(isdigit((unsigned char)*cp)))
    goto fndhemi;
  while (isdigit((unsigned char)*cp))
    min = min * 10 + (*cp++ - '0');
  while (isspace((unsigned char)*cp))
    cp++;
  if (!(isdigit((unsigned char)*cp)))
    goto fndhemi;
  while (isdigit((unsigned char)*cp))
    secs = secs * 10 + (*cp++ - '0');
  if (*cp == '.') {
    cp++;
    if (isdigit((unsigned char)*cp)) {
      secsfrac = (*cp++ - '0') * 100;
      if (isdigit((unsigned char)*cp)) {
        secsfrac += (*cp++ - '0') * 10;
        if (isdigit((unsigned char)*cp)) {
          secsfrac += (*cp++ - '0');
        }
      }
    }
  }
  while (!isspace((unsigned char)*cp))
    cp++;
  while (isspace((unsigned char)*cp))
    cp++;
fndhemi:
  switch (*cp) {
  case 'N':
  case 'n':
  case 'E':
  case 'e':
    retval = ((u_int32_t)1 << 31) + (((((deg * 60) + min) * 60) + secs) * 1000) + secsfrac;
    break;
  case 'S':
  case 's':
  case 'W':
  case 'w':
    retval = ((u_int32_t)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((unsigned char)*cp))
    cp++;
  while (isspace((unsigned char)*cp))
    cp++;
  *latlonstrptr = cp;
  return (retval);
}
```