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

```asm
<get_code>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%rbx
  call   <read_separator@plt>
  mov    $0x0,%ebp
  test   %rax,%rax
  je     L56
L151:
  mov    %ebp,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L56:
  mov    %rbx,%rdi
  call   <read_word@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L151
  lea    D1(%rip),%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  mov    $0x1,%ebp
  test   %rax,%rax
  jne    L108
L31:
  mov    %rbx,%rdi
  call   <free@plt>
  jmp    L151
L108:
  lea    D64(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x2,%ebp
  test   %rax,%rax
  je     L31
  lea    D189(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x3,%ebp
  test   %rax,%rax
  je     L31
  lea    D112(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x4,%ebp
  test   %rax,%rax
  je     L31
  lea    D141(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x5,%ebp
  test   %rax,%rax
  je     L31
  lea    D75(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x6,%ebp
  test   %rax,%rax
  je     L31
  lea    D29(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x7,%ebp
  test   %rax,%rax
  je     L31
  lea    D157(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x8,%ebp
  test   %rax,%rax
  je     L31
  lea    D72(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x9,%ebp
  test   %rax,%rax
  je     L31
  lea    D220(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0xa,%ebp
  test   %rax,%rax
  je     L31
  lea    D18(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0xb,%ebp
  test   %rax,%rax
  je     L31
  lea    D184(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0xc,%ebp
  test   %rax,%rax
  je     L31
  lea    D243(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0xd,%ebp
  test   %rax,%rax
  je     L31
  lea    D27(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0xe,%ebp
  test   %rax,%rax
  je     L31
  lea    D98(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0xf,%ebp
  test   %rax,%rax
  je     L31
  lea    D156(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x10,%ebp
  test   %rax,%rax
  je     L31
  lea    D205(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x11,%ebp
  test   %rax,%rax
  je     L31
  lea    D7(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x12,%ebp
  test   %rax,%rax
  je     L31
  lea    D165(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x13,%ebp
  test   %rax,%rax
  je     L31
  lea    D32(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x14,%ebp
  test   %rax,%rax
  je     L31
  lea    D190(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x15,%ebp
  test   %rax,%rax
  je     L31
  lea    D55(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x16,%ebp
  test   %rax,%rax
  je     L31
  lea    D233(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x17,%ebp
  test   %rax,%rax
  je     L31
  lea    D119(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  mov    $0x18,%ebp
  test   %rax,%rax
  je     L31
  lea    D128(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  cmp    $0x1,%rax
  sbb    %ebp,%ebp
  and    $0x19,%ebp
  jmp    L31
```

tool_calls: name: parse_data
arguments: tag: D1
type_guessed: string
name: parse_data
arguments: tag: D64
type_guessed: string
name: parse_data
arguments: tag: D189
type_guessed: string
name: parse_data
arguments: tag: D112
type_guessed: string
name: parse_data
arguments: tag: D141
type_guessed: string
name: parse_data
arguments: tag: D75
type_guessed: string
name: parse_data
arguments: tag: D29
type_guessed: string
name: parse_data
arguments: tag: D157
type_guessed: string
name: parse_data
arguments: tag: D72
type_guessed: string
name: parse_data
arguments: tag: D220
type_guessed: string
name: parse_data
arguments: tag: D18
type_guessed: string
name: parse_data
arguments: tag: D184
type_guessed: string
name: parse_data
arguments: tag: D243
type_guessed: string
name: parse_data
arguments: tag: D27
type_guessed: string
name: parse_data
arguments: tag: D98
type_guessed: string
name: parse_data
arguments: tag: D156
type_guessed: string
name: parse_data
arguments: tag: D205
type_guessed: string
name: parse_data
arguments: tag: D7
type_guessed: string
name: parse_data
arguments: tag: D165
type_guessed: string
name: parse_data
arguments: tag: D32
type_guessed: string
name: parse_data
arguments: tag: D190
type_guessed: string
name: parse_data
arguments: tag: D55
type_guessed: string
name: parse_data
arguments: tag: D233
type_guessed: string
name: parse_data
arguments: tag: D119
type_guessed: string
name: parse_data
arguments: tag: D128
type_guessed: string

tool: D1: OK

tool: D64: ERR

tool: D189: PING

tool: D112: ECHO

tool: D141: PROGRAM

tool: D75: VERSION

tool: D29: PASSWORD

tool: D157: FREE

tool: D72: TEAM

tool: D220: READY

tool: D18: START

tool: D184: WAITING

tool: D243: NEXT

tool: D27: TEAMSTARTINFO

tool: D98: WHO

tool: D156: LOCAL

tool: D205: NETWORK

tool: D7: NOBODY

tool: D165: SENDMAP

tool: D32: RECVMAP

tool: D190: SENDCONFIG

tool: D55: RECVCONFIG

tool: D233: CHATTALK

tool: D119: CHATLISTEN

tool: D128: QUIT

assistant: ```c
int get_code(char **message) {
  char *command;
  int result = 0;
  if (read_separator(message) == 0) {
    if ((command = read_word(message)) != NULL) {
      if (strcmp((command), ("OK")) == 0) {
        result = 1;
      } else if (strcmp((command), ("ERR")) == 0) {
        result = 2;
      } else if (strcmp((command), ("PING")) == 0) {
        result = 3;
      } else if (strcmp((command), ("ECHO")) == 0) {
        result = 4;
      } else if (strcmp((command), ("PROGRAM")) == 0) {
        result = 5;
      } else if (strcmp((command), ("VERSION")) == 0) {
        result = 6;
      } else if (strcmp((command), ("PASSWORD")) == 0) {
        result = 7;
      } else if (strcmp((command), ("FREE")) == 0) {
        result = 8;
      } else if (strcmp((command), ("TEAM")) == 0) {
        result = 9;
      } else if (strcmp((command), ("READY")) == 0) {
        result = 10;
      } else if (strcmp((command), ("START")) == 0) {
        result = 11;
      } else if (strcmp((command), ("WAITING")) == 0) {
        result = 12;
      } else if (strcmp((command), ("NEXT")) == 0) {
        result = 13;
      } else if (strcmp((command), ("TEAMSTARTINFO")) == 0) {
        result = 14;
      } else if (strcmp((command), ("WHO")) == 0) {
        result = 15;
      } else if (strcmp((command), ("LOCAL")) == 0) {
        result = 16;
      } else if (strcmp((command), ("NETWORK")) == 0) {
        result = 17;
      } else if (strcmp((command), ("NOBODY")) == 0) {
        result = 18;
      } else if (strcmp((command), ("SENDMAP")) == 0) {
        result = 19;
      } else if (strcmp((command), ("RECVMAP")) == 0) {
        result = 20;
      } else if (strcmp((command), ("SENDCONFIG")) == 0) {
        result = 21;
      } else if (strcmp((command), ("RECVCONFIG")) == 0) {
        result = 22;
      } else if (strcmp((command), ("CHATTALK")) == 0) {
        result = 23;
      } else if (strcmp((command), ("CHATLISTEN")) == 0) {
        result = 24;
      } else if (strcmp((command), ("QUIT")) == 0) {
        result = 25;
      }
      free(command);
    }
  }
  return result;
}
```