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

```asm
<compute_fst>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x18(%rbp)
  movl   $0x0,-0x8(%rbp)
  movl   $0x0,-0x4(%rbp)
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x54,%eax
  je     L185
  cmp    $0x54,%eax
  jg     L9
  cmp    $0x53,%eax
  je     L46
  cmp    $0x53,%eax
  jg     L9
  cmp    $0x4d,%eax
  je     L138
  cmp    $0x50,%eax
  jne    L9
  addl   $0x2,-0x4(%rbp)
  jmp    L195
L185:
  addl   $0x6,-0x4(%rbp)
  jmp    L195
L46:
  addl   $0x3,-0x4(%rbp)
  nop
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x4c,%eax
  je     L105
  jmp    L142
L9:
  mov    $0xffffffff,%eax
  jmp    L33
L195:
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x4f,%eax
  je     L212
  mov    $0xffffffff,%eax
  jmp    L33
L212:
  nop
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x50,%eax
  je     L178
  mov    $0xffffffff,%eax
  jmp    L33
L142:
  cmp    $0x54,%eax
  jne    L119
  addl   $0x2,-0x4(%rbp)
  jmp    L195
L119:
  mov    $0xffffffff,%eax
  jmp    L33
L138:
  nop
  jmp    L258
L105:
  nop
L258:
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x4f,%eax
  je     L259
  mov    $0xffffffff,%eax
  jmp    L33
L259:
  nop
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x50,%eax
  je     L38
  cmp    $0x54,%eax
  jne    L110
  addl   $0x1,-0x4(%rbp)
  nop
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  cmp    $0x48,%eax
  jne    L137
  jmp    L241
L110:
  mov    $0xffffffff,%eax
  jmp    L33
L137:
  mov    $0xffffffff,%eax
  jmp    L33
L178:
  nop
  jmp    L241
L38:
  nop
L241:
  nop
  mov    -0x4(%rbp),%eax
L33:
  pop    %rbp
  ret
```

assistant: ```c
int compute_fst(const char *token) {
  int pos = 0;
  int total = 0;
NODE_0:
  pos++;
  switch (token[pos - 1]) {
  case 'P':
    total += 2;
    goto NODE_1;
  case 'T':
    total += 6;
    goto NODE_1;
  case 'S':
    total += 3;
    goto NODE_3;
  case 'M':
    goto NODE_4;
  default:
    return -1;
  }
NODE_1:
  pos++;
  switch (token[pos - 1]) {
  case 'O':
    goto NODE_2;
  default:
    return -1;
  }
NODE_2:
  pos++;
  switch (token[pos - 1]) {
  case 'P':
    goto NODE_7;
  default:
    return -1;
  }
NODE_3:
  pos++;
  switch (token[pos - 1]) {
  case 'T':
    total += 2;
    goto NODE_1;
  case 'L':
    goto NODE_4;
  default:
    return -1;
  }
NODE_4:
  pos++;
  switch (token[pos - 1]) {
  case 'O':
    goto NODE_5;
  default:
    return -1;
  }
NODE_5:
  pos++;
  switch (token[pos - 1]) {
  case 'T':
    total += 1;
    goto NODE_6;
  case 'P':
    goto NODE_7;
  default:
    return -1;
  }
NODE_6:
  pos++;
  switch (token[pos - 1]) {
  case 'H':
    goto NODE_7;
  default:
    return -1;
  }
NODE_7:
  goto END;
END:
  return total;
}
```