user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<sscanf_lat_lon>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x30,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %rdx,%r12
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rcx
  mov    %rsp,%rdx
  lea    0x26(%rsp),%rax
  push   %rax
  lea    0x20(%rsp),%rax
  push   %rax
  lea    0x18(%rsp),%r9
  lea    0x34(%rsp),%r8
  lea    D98(%rip),%rsi
  mov    $0x0,%eax
  call   <sscanf@plt>
  add    $0x10,%rsp
  cmp    $0x6,%eax
  jne    L112
  movsd  0x10(%rsp),%xmm0
  divsd  D102(%rip),%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movzbl 0x24(%rsp),%edx
  and    $0xffffffdf,%edx
  cmp    $0x53,%dl
  jne    L74
  xorpd  D116(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp)
L30:
  movsd  0x18(%rsp),%xmm0
  divsd  D102(%rip),%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%r12)
  movzbl 0x26(%rsp),%eax
  and    $0xffffffdf,%eax
  cmp    $0x57,%al
  je     L140
  cmp    $0x45,%al
  sete   %al
  movzbl %al,%eax
  add    %eax,%eax
L65:
  mov    0x28(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L164
  add    $0x30,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L74:
  mov    $0x0,%eax
  cmp    $0x4e,%dl
  je     L30
  jmp    L65
L140:
  xorpd  D116(%rip),%xmm0
  movsd  %xmm0,(%r12)
  mov    $0x2,%eax
  jmp    L65
L112:
  lea    0x24(%rsp),%rcx
  mov    %rsp,%rdx
  lea    0x26(%rsp),%r9
  lea    0x8(%rsp),%r8
  lea    D57(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  cmp    $0x4,%eax
  jne    L72
  movsd  (%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movzbl 0x24(%rsp),%edx
  and    $0xffffffdf,%edx
  cmp    $0x53,%dl
  jne    L124
  xorpd  D116(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp)
L162:
  movsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%r12)
  movzbl 0x26(%rsp),%edx
  and    $0xffffffdf,%edx
  cmp    $0x57,%dl
  je     L179
  mov    $0x0,%eax
  movsd  D59(%rip),%xmm1
  cmp    $0x45,%dl
  jne    L65
L191:
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%r12)
  mov    $0x2,%eax
  jmp    L65
L124:
  mov    $0x0,%eax
  cmp    $0x4e,%dl
  je     L162
  jmp    L65
L179:
  movsd  D5(%rip),%xmm1
  jmp    L191
L72:
  lea    0x8(%rsp),%rcx
  mov    %rsp,%rdx
  lea    D75(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x0,%eax
  call   <sscanf@plt>
  cmp    $0x2,%eax
  je     L122
  mov    %rsp,%rdx
  lea    D114(%rip),%rsi
  mov    %rbx,%rdi
  call   <lat_lon_decode@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L65
  lea    0x8(%rsp),%rdx
  lea    D100(%rip),%rsi
  mov    %rbx,%rdi
  call   <lat_lon_decode@plt>
  mov    %rax,%rdx
  mov    $0x0,%eax
  test   %rdx,%rdx
  je     L65
  movsd  (%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%r12)
  mov    $0x2,%eax
  jmp    L65
L122:
  movsd  (%rsp),%xmm0
  movsd  %xmm0,0x0(%rbp)
  movsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%r12)
  jmp    L65
L164:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D98
datatype: string
name: extract_symbolic_data
arguments: data_tag: D102
datatype: f64
name: extract_symbolic_data
arguments: data_tag: D116
datatype: byte[16]
name: extract_symbolic_data
arguments: data_tag: D57
datatype: string
name: extract_symbolic_data
arguments: data_tag: D59
datatype: byte[8]
name: extract_symbolic_data
arguments: data_tag: D5
datatype: byte[8]
name: extract_symbolic_data
arguments: data_tag: D75
datatype: string
name: extract_symbolic_data
arguments: data_tag: D114
datatype: string
name: extract_symbolic_data
arguments: data_tag: D100
datatype: string

tool: D98: %lf %lf %s %lf %lf %s

tool: D102: 60

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

tool: D57: %lf %s %lf %s

tool: {"D59": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D5": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: D75: %lf %lf

tool: D114: NSns

tool: D100: EWew

assistant: ```c
int sscanf_lat_lon(char *readln, double *lat, double *lon) {
  double dlat, dlon, mlat, mlon;
  char ns[2], ew[2];
  if (sscanf(readln, "%lf %lf %s %lf %lf %s", &dlat, &mlat, ns, &dlon, &mlon, ew) == 6) {
    *lat = (dlat + mlat / 60.);
    if (*ns == 's' || *ns == 'S')
      *lat = -*lat;
    else if (*ns != 'n' && *ns != 'N')
      return 0;
    *lon = (dlon + mlon / 60.);
    if (*ew == 'w' || *ew == 'W')
      *lon = -*lon;
    else if (*ew != 'e' && *ew != 'E')
      return 0;
    return 2;
  } else if (sscanf(readln, "%lf %s %lf %s", &dlat, ns, &dlon, ew) == 4) {
    *lat = dlat;
    if (*ns == 's' || *ns == 'S')
      *lat = -*lat;
    else if (*ns != 'n' && *ns != 'N')
      return 0;
    *lon = dlon;
    if (*ew == 'w' || *ew == 'W')
      *lon = -*lon;
    else if (*ew != 'e' && *ew != 'E')
      return 0;
    *lon = dlon * (*ew == 'e' || *ew == 'E' ? 1 : -1);
    return 2;
  } else if (sscanf(readln, "%lf %lf", &dlat, &dlon) == 2) {
    *lat = dlat;
    *lon = dlon;
    return 2;
  } else if (lat_lon_decode(readln, "NSns", &dlat) && lat_lon_decode(readln, "EWew", &dlon)) {
    *lat = dlat;
    *lon = dlon;
    return 2;
  } else
    return 0;
}
```