user: Please show me the C implementation that matches the assembly code listed below:

```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,%r15d
  mov    %eax,0x14(%rsp)
  call   <atoi@plt>
  mov    %r15d,%esi
  movl   $0x5,0x20(%rsp)
  mov    %eax,%edi
  mov    %eax,%r13d
  movl   $0x5,0x24(%rsp)
  call   <createRoom@plt>
  mov    %rax,0x18(%rsp)
  mov    %rax,%rbx
  xor    %eax,%eax
  call   <initscr@plt>
  xor    %eax,%eax
  call   <noecho@plt>
  test   %r13d,%r13d
  jle    L147
  mov    %r15d,%ecx
  test   %r15d,%r15d
  jle    L147
  mov    %rbx,%r15
  xor    %ebp,%ebp
  movslq %ecx,%r12
  cs nopw 0x0(%rax,%rax,1)
L67:
  xor    %ebx,%ebx
  nopw   0x0(%rax,%rax,1)
L21:
  mov    (%r15),%rax
  mov    %ebx,%esi
  mov    %ebp,%edi
  movsbl (%rax,%rbx,1),%edx
  add    $0x1,%rbx
  call   <mvaddch@plt>
  cmp    %rbx,%r12
  jne    L21
  add    $0x1,%ebp
  add    $0x8,%r15
  cmp    %ebp,%r13d
  jne    L67
L147:
  mov    0x24(%rsp),%esi
  mov    0x20(%rsp),%edi
  mov    $0x40,%edx
  call   <mvaddch@plt>
  mov    0x24(%rsp),%esi
  mov    0x20(%rsp),%edi
  call   <move@plt>
  xor    %eax,%eax
  call   <refresh@plt>
  lea    0x24(%rsp),%rax
  movslq 0x14(%rsp),%r12
  mov    %rax,(%rsp)
  lea    0x20(%rsp),%rax
  mov    %rax,0x8(%rsp)
  jmp    L9
  nopl   (%rax)
L125:
  cmp    $0x2,%al
  je     L130
  cmp    $0x3,%al
  je     L124
L148:
  mov    0x24(%rsp),%esi
  mov    0x20(%rsp),%edi
  call   <move@plt>
  xor    %eax,%eax
  call   <refresh@plt>
  cmp    $0x71,%bl
  je     L98
L9:
  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    L125
  mov    (%rsp),%rdx
  mov    0x8(%rsp),%rsi
  mov    %ebp,%edi
  call   <movePlayer@plt>
  jmp    L148
  nopl   (%rax)
L130:
  xor    %esi,%esi
  mov    $0x1e,%edi
  call   <move@plt>
  lea    D7(%rip),%rdi
  call   <printw@plt>
  jmp    L148
  nopw   0x0(%rax,%rax,1)
L98:
  xor    %eax,%eax
  call   <endwin@plt>
  mov    0x18(%rsp),%rdi
  mov    %r13d,%esi
  call   <destroyRoom@plt>
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0x38,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L124:
  xor    %eax,%eax
  call   <clear@plt>
  test   %r13d,%r13d
  jle    L148
  cmpl   $0x0,0x14(%rsp)
  jle    L148
  mov    0x18(%rsp),%r15
  xor    %ebp,%ebp
  nopw   0x0(%rax,%rax,1)
L10:
  xor    %r14d,%r14d
  nopl   0x0(%rax,%rax,1)
L114:
  mov    (%r15),%rax
  mov    %r14d,%esi
  mov    %ebp,%edi
  movsbl (%rax,%r14,1),%edx
  add    $0x1,%r14
  call   <mvaddch@plt>
  cmp    %r12,%r14
  jne    L114
  add    $0x1,%ebp
  add    $0x8,%r15
  cmp    %ebp,%r13d
  jne    L10
  jmp    L148
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D7
type_infered: string

tool: D7: 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;
}
```