user: 请将以下的汇编代码转换成C语言代码:

```asm
<decodefmt>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x20(%rbp),%rax
  movl   $0xffffffff,(%rax)
  mov    -0x18(%rbp),%rax
  mov    $0x23,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L202
  mov    -0x8(%rbp),%rax
  lea    D51(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L149
  mov    -0x20(%rbp),%rax
  movl   $0x0,(%rax)
  jmp    L94
L149:
  mov    -0x8(%rbp),%rax
  lea    D5(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L53
  mov    -0x20(%rbp),%rax
  movl   $0x1,(%rax)
  jmp    L94
L53:
  mov    -0x8(%rbp),%rax
  lea    D54(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L146
  mov    -0x20(%rbp),%rax
  movl   $0x2,(%rax)
  jmp    L94
L146:
  mov    -0x8(%rbp),%rax
  lea    D83(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L158
  mov    -0x20(%rbp),%rax
  movl   $0x3,(%rax)
  jmp    L94
L158:
  mov    -0x8(%rbp),%rax
  lea    D93(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L180
  mov    -0x20(%rbp),%rax
  movl   $0x4,(%rax)
  jmp    L94
L180:
  mov    -0x8(%rbp),%rax
  lea    D0(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L132
  mov    -0x20(%rbp),%rax
  movl   $0x5,(%rax)
  jmp    L94
L132:
  mov    -0x8(%rbp),%rax
  lea    D66(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L49
  mov    -0x20(%rbp),%rax
  movl   $0x6,(%rax)
  jmp    L94
L49:
  mov    -0x8(%rbp),%rax
  lea    D44(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L166
  mov    -0x20(%rbp),%rax
  movl   $0x7,(%rax)
  jmp    L94
L166:
  mov    -0x8(%rbp),%rax
  lea    D11(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L159
  mov    -0x20(%rbp),%rax
  movl   $0x9,(%rax)
  jmp    L94
L159:
  mov    -0x8(%rbp),%rax
  lea    D64(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L107
  mov    -0x20(%rbp),%rax
  movl   $0xa,(%rax)
L94:
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L202
L107:
  nop
L202:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D51
type_infered: string
name: extract_symbolic_data
arguments: label: D5
type_infered: string
name: extract_symbolic_data
arguments: label: D54
type_infered: string
name: extract_symbolic_data
arguments: label: D83
type_infered: string
name: extract_symbolic_data
arguments: label: D93
type_infered: string
name: extract_symbolic_data
arguments: label: D0
type_infered: string
name: extract_symbolic_data
arguments: label: D66
type_infered: string
name: extract_symbolic_data
arguments: label: D44
type_infered: string
name: extract_symbolic_data
arguments: label: D11
type_infered: string
name: extract_symbolic_data
arguments: label: D64
type_infered: string

tool: D51: #rtcm2

tool: D5: #rtcm3

tool: D54: #nov

tool: D83: #oem3

tool: D93: #ubx

tool: D0: #ss2

tool: D66: #hemis

tool: D44: #stq

tool: D11: #javad

tool: D64: #nvs

assistant: ```c
void decodefmt(char *path, int *fmt) {
  char *p;
  *fmt = -1;
  if ((p = strrchr(path, '#'))) {
    if (!strcmp(p, "#rtcm2"))
      *fmt = 0;
    else if (!strcmp(p, "#rtcm3"))
      *fmt = 1;
    else if (!strcmp(p, "#nov"))
      *fmt = 2;
    else if (!strcmp(p, "#oem3"))
      *fmt = 3;
    else if (!strcmp(p, "#ubx"))
      *fmt = 4;
    else if (!strcmp(p, "#ss2"))
      *fmt = 5;
    else if (!strcmp(p, "#hemis"))
      *fmt = 6;
    else if (!strcmp(p, "#stq"))
      *fmt = 7;
    else if (!strcmp(p, "#javad"))
      *fmt = 9;
    else if (!strcmp(p, "#nvs"))
      *fmt = 10;
    else
      return;
    *p = '\0';
  }
}
```