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

```asm
<decodefmt>:
  endbr64
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x8,%rsp
  movl   $0xffffffff,(%rsi)
  mov    $0x23,%esi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L39
  lea    D61(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%rbx
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L1
L190:
  mov    %eax,0x0(%rbp)
  movb   $0x0,(%rbx)
L39:
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   (%rax)
L1:
  lea    D52(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L16
  lea    D37(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L81
  lea    D16(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L95
  lea    D84(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L29
  lea    D88(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L69
  lea    D78(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L67
  lea    D82(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L56
  lea    D14(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L87
  lea    D89(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L39
  mov    $0xa,%eax
  jmp    L190
  nopl   0x0(%rax)
L16:
  mov    $0x1,%eax
  jmp    L190
  nopw   0x0(%rax,%rax,1)
L81:
  mov    $0x2,%eax
  jmp    L190
  nopw   0x0(%rax,%rax,1)
L95:
  mov    $0x3,%eax
  jmp    L190
  nopw   0x0(%rax,%rax,1)
L29:
  mov    $0x4,%eax
  jmp    L190
  nopw   0x0(%rax,%rax,1)
L69:
  mov    $0x5,%eax
  jmp    L190
L67:
  mov    $0x6,%eax
  jmp    L190
L56:
  mov    $0x7,%eax
  jmp    L190
L87:
  mov    $0x9,%eax
  jmp    L190
```

tool_calls: name: extract_symbolic_data
arguments: tag: D61
type_guessed: string
name: extract_symbolic_data
arguments: tag: D52
type_guessed: string
name: extract_symbolic_data
arguments: tag: D37
type_guessed: string
name: extract_symbolic_data
arguments: tag: D16
type_guessed: string
name: extract_symbolic_data
arguments: tag: D84
type_guessed: string
name: extract_symbolic_data
arguments: tag: D88
type_guessed: string
name: extract_symbolic_data
arguments: tag: D78
type_guessed: string
name: extract_symbolic_data
arguments: tag: D82
type_guessed: string
name: extract_symbolic_data
arguments: tag: D14
type_guessed: string
name: extract_symbolic_data
arguments: tag: D89
type_guessed: string

tool: D61: #rtcm2

tool: D52: #rtcm3

tool: D37: #nov

tool: D16: #oem3

tool: D84: #ubx

tool: D88: #ss2

tool: D78: #hemis

tool: D82: #stq

tool: D14: #javad

tool: D89: #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';
  }
}
```