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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    0x8(%rsi),%rdi
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  call   <atoi@plt>
  mov    0x10(%rbx),%rdi
  mov    %eax,%r14d
  call   <atoi@plt>
  mov    %r14d,%esi
  movl   $0x5,0x20(%rsp)
  mov    %eax,%edi
  mov    %eax,%ebx
  mov    %eax,0x4(%rsp)
  movl   $0x5,0x24(%rsp)
  call   <createRoom@plt>
  mov    %rax,0x18(%rsp)
  mov    %rax,%r15
  xor    %eax,%eax
  call   <initscr@plt>
  xor    %eax,%eax
  call   <noecho@plt>
  test   %ebx,%ebx
  jle    L126
  xor    %ebp,%ebp
  movslq %r14d,%r12
  nopl   0x0(%rax)
L128:
  xor    %ebx,%ebx
  test   %r14d,%r14d
  jle    L12
  nopw   0x0(%rax,%rax,1)
L54:
  mov    (%r15),%rax
  mov    %ebx,%esi
  mov    %ebp,%edi
  movsbl (%rax,%rbx,1),%edx
  add    $0x1,%rbx
  call   <mvaddch@plt>
  cmp    %r12,%rbx
  jne    L54
L12:
  add    $0x1,%ebp
  add    $0x8,%r15
  cmp    %ebp,0x4(%rsp)
  jne    L128
L126:
  mov    0x24(%rsp),%esi
  mov    0x20(%rsp),%edi
  mov    $0x40,%edx
  movslq %r14d,%r12
  call   <mvaddch@plt>
  mov    0x24(%rsp),%esi
  mov    0x20(%rsp),%edi
  call   <move@plt>
  xor    %eax,%eax
  call   <refresh@plt>
  lea    0x24(%rsp),%rax
  mov    %rax,0x8(%rsp)
  lea    0x20(%rsp),%rax
  mov    %rax,0x10(%rsp)
  jmp    L43
  nopl   (%rax)
L142:
  cmp    $0x2,%al
  je     L55
  cmp    $0x3,%al
  je     L22
L96:
  mov    0x24(%rsp),%esi
  mov    0x20(%rsp),%edi
  call   <move@plt>
  xor    %eax,%eax
  call   <refresh@plt>
  cmp    $0x71,%bl
  je     L159
L43:
  xor    %eax,%eax
  call   <refresh@plt>
  xor    %eax,%eax
  call   <getch@plt>
  mov    0x24(%rsp),%edx
  mov    0x20(%rsp),%esi
  movsbl %al,%ebp
  mov    %ebp,%edi
  mov    %ebp,%ebx
  call   <checkInput@plt>
  cmp    $0x1,%al
  jne    L142
  mov    0x8(%rsp),%rdx
  mov    0x10(%rsp),%rsi
  mov    %ebp,%edi
  call   <movePlayer@plt>
  jmp    L96
  cs nopw 0x0(%rax,%rax,1)
L55:
  xor    %esi,%esi
  mov    $0x1e,%edi
  call   <move@plt>
  lea    D6(%rip),%rdi
  call   <printw@plt>
  jmp    L96
  nopw   0x0(%rax,%rax,1)
L159:
  xor    %eax,%eax
  call   <endwin@plt>
  mov    0x4(%rsp),%esi
  mov    0x18(%rsp),%rdi
  call   <destroyRoom@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L115
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  xor    %eax,%eax
  call   <clear@plt>
  cmpl   $0x0,0x4(%rsp)
  jle    L96
  mov    0x18(%rsp),%r15
  xor    %ebp,%ebp
  nop
L3:
  xor    %r13d,%r13d
  test   %r14d,%r14d
  jle    L131
  nopl   0x0(%rax,%rax,1)
L157:
  mov    (%r15),%rax
  mov    %r13d,%esi
  mov    %ebp,%edi
  movsbl (%rax,%r13,1),%edx
  add    $0x1,%r13
  call   <mvaddch@plt>
  cmp    %r13,%r12
  jne    L157
L131:
  add    $0x1,%ebp
  add    $0x8,%r15
  cmp    %ebp,0x4(%rsp)
  jne    L3
  jmp    L96
L115:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D6
datatype: string

tool: D6: hello

assistant: ```c
int main(int argc, char **argv) {
  char **room1;
  char input;
  char condition;
  int x1 = atoi(argv[1]);
  int y1 = atoi(argv[2]);
  int heroY = 5;
  int heroX = 5;
  room1 = createRoom(y1, x1);
  initscr();
  noecho();
  for (int i = 0; i < y1; i++) {
    for (int k = 0; k < x1; k++) {
      mvaddch(i, k, room1[i][k]);
    }
  }
  mvaddch(heroY, heroX, '@');
  move(heroY, heroX);
  refresh();
  while (input != 'q') {
    refresh();
    input = getch();
    condition = checkInput(input, heroY, heroX);
    if (condition == 1) {
      movePlayer(input, &heroY, &heroX);
    } else if (condition == 2) {
      move(30, 0);
      printw("hello");
    } else if (condition == 3) {
      clear();
      for (int i = 0; i < y1; i++) {
        for (int k = 0; k < x1; k++) {
          mvaddch(i, k, room1[i][k]);
        }
      }
    }
    move(heroY, heroX);
    refresh();
  }
  endwin();
  destroyRoom(room1, y1);
  return 0;
}
```