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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  call   <initMap@plt>
  mov    %rax,%rbp
  mov    %rax,%rdi
  call   <banner@plt>
  movl   $0x0,0x4(%rsp)
  mov    $0x5,%ebx
  lea    D52(%rip),%r13
  lea    D76(%rip),%r12
  lea    D45(%rip),%r14
  lea    D43(%rip),%r15
  jmp    L52
L10:
  mov    %r15,%rdi
  call   <printf@plt>
L36:
  mov    $0x0,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L36
  add    $0x1,%ebx
  jmp    L70
L142:
  mov    %rbp,%rdi
  call   <check@plt>
  test   %rax,%rax
  jne    L100
  mov    %rbp,%rdi
  call   <outMap@plt>
  mov    %r14,%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <setNPC@plt>
  mov    %rbp,%rdi
  call   <outMap@plt>
  mov    %rbp,%rdi
  call   <check@plt>
  test   %rax,%rax
  jne    L100
L70:
  sub    $0x1,%ebx
  je     L100
L52:
  mov    %r13,%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  test   %rax,%rax
  jle    L10
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <setMap@plt>
  test   %rax,%rax
  je     L142
  add    $0x1,%ebx
  jmp    L70
L100:
  lea    D35(%rip),%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <check@plt>
  mov    %eax,%ebx
  test   %eax,%eax
  je     L153
  cmp    $0x1,%eax
  je     L144
  cmp    $0x2,%eax
  je     L84
L5:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %ebx,%edi
  call   <writeRecord@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L153:
  lea    D21(%rip),%rdi
  call   <printf@plt>
  jmp    L5
L144:
  lea    D17(%rip),%rdi
  call   <printf@plt>
  jmp    L5
L84:
  lea    D37(%rip),%rdi
  call   <printf@plt>
  jmp    L5
L17:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D52
datatype: string
name: read_data
arguments: data_tag: D76
datatype: string
name: read_data
arguments: data_tag: D45
datatype: string
name: read_data
arguments: data_tag: D43
datatype: string
name: read_data
arguments: data_tag: D35
datatype: string
name: read_data
arguments: data_tag: D21
datatype: string
name: read_data
arguments: data_tag: D17
datatype: string
name: read_data
arguments: data_tag: D37
datatype: string

tool: D52: Dein Zug: 

tool: D76: %d

tool: D45: Gegner ist am Zug:


tool: D43: 
Fehler bei der Eingabe!


tool: D35: Der Sieger ist...


tool: D21: Niemand


tool: D17: Der Spieler


tool: D37: Der Computer


assistant: ```c
int main(void) {
  char *map = initMap();
  banner(map);
  int input = 0;
  int turn;
  for (turn = 5; turn != 0; turn--) {
    printf("Dein Zug: ");
    if (scanf("%d", &input) <= 0) {
      printf("\nFehler bei der Eingabe!\n");
      while (getchar() != '\n')
        ;
      turn++;
      continue;
    }
    if (setMap(map, input) == 0) {
      if (check(map) != 0)
        break;
      outMap(map);
      printf("Gegner ist am Zug:\n");
      setNPC(map);
      outMap(map);
      if (check(map) != 0)
        break;
    } else {
      turn++;
    }
  }
  printf("Der Sieger ist...\n");
  int result = check(map);
  if (result == 0)
    printf("Niemand\n");
  else if (result == 1)
    printf("Der Spieler\n");
  else if (result == 2)
    printf("Der Computer\n");
  free(map);
  writeRecord(result);
  return 0;
}
```