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

```asm
<mainMenu>:
  endbr64
  push   %r15
  lea    D5(%rip),%r15
  push   %r14
  lea    D63(%rip),%r14
  push   %r13
  lea    D20(%rip),%r13
  push   %r12
  lea    D78(%rip),%r12
  push   %rbp
  lea    D46(%rip),%rbp
  push   %rbx
  lea    D22(%rip),%rbx
  sub    $0x18,%rsp
  mov    %edi,0xc(%rsp)
L10:
  xor    %eax,%eax
  call   <clear@plt>
  mov    %rbp,%rdi
  call   <printw@plt>
  mov    %rbx,%rdi
  call   <printw@plt>
  mov    %r15,%rdi
  call   <printw@plt>
  mov    %rbx,%rdi
  call   <printw@plt>
  mov    %r14,%rdi
  call   <printw@plt>
  mov    %rbx,%rdi
  call   <printw@plt>
  mov    %r13,%rdi
  call   <printw@plt>
  mov    %r12,%rdi
  call   <printw@plt>
  lea    D67(%rip),%rdi
  call   <printw@plt>
  mov    %rbx,%rdi
  call   <printw@plt>
  mov    %rbp,%rdi
  call   <printw@plt>
  xor    %eax,%eax
  call   <refresh@plt>
  xor    %eax,%eax
  call   <getch@plt>
  cmp    $0x32,%al
  je     L18
  cmp    $0x33,%al
  je     L3
  cmp    $0x31,%al
  je     L36
  lea    D12(%rip),%rdi
  call   <printw@plt>
  xor    %eax,%eax
  call   <refresh@plt>
  jmp    L10
  nopl   (%rax)
L18:
  xor    %eax,%eax
  call   <sendHelp@plt>
  jmp    L10
  nopl   0x0(%rax)
L36:
  mov    0xc(%rsp),%edi
  call   <start_game@plt>
  jmp    L10
  cs nopw 0x0(%rax,%rax,1)
L3:
  lea    D70(%rip),%rdi
  call   <printw@plt>
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10f0 <refresh@plt>
```

tool_calls: name: parse_data
arguments: tag: D5
datatype: string
name: parse_data
arguments: tag: D63
datatype: string
name: parse_data
arguments: tag: D20
datatype: string
name: parse_data
arguments: tag: D78
datatype: string
name: parse_data
arguments: tag: D46
datatype: string
name: parse_data
arguments: tag: D22
datatype: string
name: parse_data
arguments: tag: D67
datatype: string
name: parse_data
arguments: tag: D12
datatype: string
name: parse_data
arguments: tag: D70
datatype: string

tool: D5: # Welcome to PACMAN ! ! !   #


tool: D63: # Choose an option:         #


tool: D20: # 1. Start Game             #


tool: D78: # 2. Help                   #


tool: D46: # # # # # # # # # # # # # # #


tool: D22: #                           #


tool: D67: # 3. Exit                   #


tool: D12: Wrong option. Try again


tool: D70: Goodbye.....



assistant: ```c
void mainMenu(int server_socket) {
  char choice;
  do {
    clear();
    printw("# # # # # # # # # # # # # # #\n");
    printw("#                           #\n");
    printw("# Welcome to PACMAN ! ! !   #\n");
    printw("#                           #\n");
    printw("# Choose an option:         #\n");
    printw("#                           #\n");
    printw("# 1. Start Game             #\n");
    printw("# 2. Help                   #\n");
    printw("# 3. Exit                   #\n");
    printw("#                           #\n");
    printw("# # # # # # # # # # # # # # #\n");
    refresh();
    choice = getch();
    switch (choice) {
    case '1':
      start_game(server_socket);
      break;
    case '2':
      sendHelp();
      break;
    case '3':
      printw("Goodbye.....\n\n");
      refresh();
      break;
    default:
      printw("Wrong option. Try again\n");
      refresh();
      break;
    }
  } while (choice != '3');
}
```