user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<get_door>:
  endbr64
  push   %rbp
  lea    D31(%rip),%rsi
  mov    %rdi,%rbp
  call   <str_cmp@plt>
  test   %eax,%eax
  jne    L114
L75:
  xor    %eax,%eax
L40:
  pop    %rbp
  ret
  nopl   0x0(%rax)
L114:
  lea    D53(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L75
  lea    D76(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  jne    L126
L63:
  mov    $0x1,%eax
  pop    %rbp
  ret
  nopl   (%rax)
L126:
  lea    D75(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L63
  lea    D64(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L130
  lea    D104(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L130
  lea    D181(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L56
  lea    D5(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L56
  lea    D13(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L158
  lea    D90(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L158
  lea    D182(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L45
  lea    D67(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L45
  lea    D16(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L161
  lea    D121(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L161
  lea    D37(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L48
  lea    D112(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L48
  lea    D176(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L35
  lea    D3(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  test   %eax,%eax
  je     L35
  lea    D30(%rip),%rsi
  mov    %rbp,%rdi
  call   <str_cmp@plt>
  mov    %eax,%r8d
  mov    $0x9,%eax
  test   %r8d,%r8d
  je     L40
  mov    %rbp,%rdi
  lea    D107(%rip),%rsi
  call   <str_cmp@plt>
  pop    %rbp
  cmp    $0x1,%eax
  sbb    %eax,%eax
  and    $0xa,%eax
  sub    $0x1,%eax
  ret
  nopl   0x0(%rax)
L130:
  mov    $0x2,%eax
  pop    %rbp
  ret
L56:
  mov    $0x3,%eax
  pop    %rbp
  ret
L158:
  mov    $0x4,%eax
  pop    %rbp
  ret
L45:
  mov    $0x5,%eax
  pop    %rbp
  ret
L161:
  mov    $0x6,%eax
  pop    %rbp
  ret
L35:
  mov    $0x8,%eax
  pop    %rbp
  ret
L48:
  mov    $0x7,%eax
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: label: D31
datatype: string
name: parse_data
arguments: label: D53
datatype: string
name: parse_data
arguments: label: D76
datatype: string
name: parse_data
arguments: label: D75
datatype: string
name: parse_data
arguments: label: D64
datatype: string
name: parse_data
arguments: label: D104
datatype: string
name: parse_data
arguments: label: D181
datatype: string
name: parse_data
arguments: label: D5
datatype: string
name: parse_data
arguments: label: D13
datatype: string
name: parse_data
arguments: label: D90
datatype: string
name: parse_data
arguments: label: D182
datatype: string
name: parse_data
arguments: label: D67
datatype: string
name: parse_data
arguments: label: D16
datatype: string
name: parse_data
arguments: label: D121
datatype: string
name: parse_data
arguments: label: D37
datatype: string
name: parse_data
arguments: label: D112
datatype: string
name: parse_data
arguments: label: D176
datatype: string
name: parse_data
arguments: label: D3
datatype: string
name: parse_data
arguments: label: D30
datatype: string
name: parse_data
arguments: label: D107
datatype: string

tool: D31: n

tool: D53: north

tool: D76: e

tool: D75: east

tool: D64: s

tool: D104: south

tool: D181: w

tool: D5: west

tool: D13: u

tool: D90: up

tool: D182: d

tool: D67: down

tool: D16: ne

tool: D121: northeast

tool: D37: nw

tool: D112: northwest

tool: D176: se

tool: D3: southeast

tool: D30: sw

tool: D107: southwest

assistant: ```c
int get_door(const char *arg) {
  int door;
  if (!str_cmp(arg, "n") || !str_cmp(arg, "north"))
    door = 0;
  else if (!str_cmp(arg, "e") || !str_cmp(arg, "east"))
    door = 1;
  else if (!str_cmp(arg, "s") || !str_cmp(arg, "south"))
    door = 2;
  else if (!str_cmp(arg, "w") || !str_cmp(arg, "west"))
    door = 3;
  else if (!str_cmp(arg, "u") || !str_cmp(arg, "up"))
    door = 4;
  else if (!str_cmp(arg, "d") || !str_cmp(arg, "down"))
    door = 5;
  else if (!str_cmp(arg, "ne") || !str_cmp(arg, "northeast"))
    door = 6;
  else if (!str_cmp(arg, "nw") || !str_cmp(arg, "northwest"))
    door = 7;
  else if (!str_cmp(arg, "se") || !str_cmp(arg, "southeast"))
    door = 8;
  else if (!str_cmp(arg, "sw") || !str_cmp(arg, "southwest"))
    door = 9;
  else
    door = -1;
  return door;
}
```