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

```asm
<main>:
  endbr64
  push   %r15
  lea    D15(%rip),%r15
  push   %r14
  lea    D11(%rip),%r14
  push   %r13
  push   %r12
  lea    D55(%rip),%r12
  push   %rbp
  push   %rbx
  mov    $0x5,%ebx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%r13
  call   <initMap@plt>
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <banner@plt>
  movl   $0x0,0x4(%rsp)
  jmp    L112
  nopl   0x0(%rax,%rax,1)
L152:
  test   %ebx,%ebx
  je     L58
L112:
  mov    %r14,%rdi
  call   <printf@plt>
  mov    %r13,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  test   %rax,%rax
  jle    L61
  mov    0x4(%rsp),%esi
  mov    %rbp,%rdi
  call   <setMap@plt>
  test   %rax,%rax
  jne    L152
  mov    %rbp,%rdi
  call   <check@plt>
  test   %rax,%rax
  jne    L58
  mov    %rbp,%rdi
  call   <outMap@plt>
  mov    %r15,%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    L58
  sub    $0x1,%ebx
  test   %ebx,%ebx
  jne    L112
  nopw   0x0(%rax,%rax,1)
L58:
  lea    D27(%rip),%rdi
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <check@plt>
  mov    %eax,%r12d
  test   %eax,%eax
  je     L141
  cmp    $0x1,%eax
  je     L30
  cmp    $0x2,%eax
  je     L91
L93:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r12d,%edi
  call   <writeRecord@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L140
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L61:
  lea    D30(%rip),%rdi
  call   <printf@plt>
  nopl   0x0(%rax)
L7:
  xor    %eax,%eax
  call   <getchar@plt>
  cmp    $0xa,%al
  jne    L7
  jmp    L152
L141:
  lea    D63(%rip),%rdi
  call   <printf@plt>
  jmp    L93
L91:
  lea    D33(%rip),%rdi
  call   <printf@plt>
  jmp    L93
L30:
  lea    D66(%rip),%rdi
  call   <printf@plt>
  jmp    L93
L140:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D15
datatype: string
name: disassemble_data
arguments: data_label: D11
datatype: string
name: disassemble_data
arguments: data_label: D55
datatype: string
name: disassemble_data
arguments: data_label: D27
datatype: string
name: disassemble_data
arguments: data_label: D30
datatype: string
name: disassemble_data
arguments: data_label: D63
datatype: string
name: disassemble_data
arguments: data_label: D33
datatype: string
name: disassemble_data
arguments: data_label: D66
datatype: string

tool: D15: Gegner ist am Zug:


tool: D11: Dein Zug: 

tool: D55: %d

tool: D27: Der Sieger ist...


tool: D30: 
Fehler bei der Eingabe!


tool: D63: Niemand


tool: D33: Der Computer


tool: D66: Der Spieler


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;
}
```