user: 请将以下的汇编代码转换成C语言代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x22(%rbp)
  movw   $0x0,-0x1a(%rbp)
  movl   $0x0,-0x34(%rbp)
  mov    $0x0,%eax
  call   <printStudInfo@plt>
  lea    D40(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L149
L74:
  lea    D92(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x22(%rbp),%rax
  mov    %rax,%rsi
  lea    D133(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    -0x22(%rbp),%rax
  lea    D8(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L149
  lea    -0x22(%rbp),%rax
  lea    D61(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L149
  lea    -0x22(%rbp),%rax
  lea    D66(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L149
  lea    D137(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L149:
  lea    -0x22(%rbp),%rax
  lea    D8(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L152
  lea    -0x22(%rbp),%rax
  lea    D61(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L152
  lea    -0x22(%rbp),%rax
  lea    D66(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L74
L152:
  lea    -0x22(%rbp),%rax
  lea    D8(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L168
  movl   $0x1e,-0x38(%rbp)
  jmp    L0
L168:
  lea    -0x22(%rbp),%rax
  lea    D61(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L132
  movl   $0x19,-0x38(%rbp)
  jmp    L0
L132:
  movl   $0x14,-0x38(%rbp)
L0:
  mov    -0x38(%rbp),%eax
  mov    %eax,%edi
  call   <printIntro@plt>
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0x8,%esi
  mov    $0xa,%edi
  call   <calloc@plt>
  mov    %rax,-0x30(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L84
L111:
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    $0x4,%esi
  mov    $0xa,%edi
  call   <calloc@plt>
  mov    %rax,(%rbx)
  addl   $0x1,-0x3c(%rbp)
L84:
  cmpl   $0x9,-0x3c(%rbp)
  jle    L111
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  jmp    L85
L97:
  mov    -0x30(%rbp),%rax
  mov    $0x4,%esi
  mov    %rax,%rdi
  call   <assignShip@plt>
  mov    %eax,-0x34(%rbp)
L85:
  cmpl   $0x0,-0x34(%rbp)
  je     L97
  movl   $0x0,-0x34(%rbp)
  jmp    L171
L110:
  mov    -0x30(%rbp),%rax
  mov    $0x5,%esi
  mov    %rax,%rdi
  call   <assignShip@plt>
  mov    %eax,-0x34(%rbp)
L171:
  cmpl   $0x0,-0x34(%rbp)
  je     L110
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <dispGrid@plt>
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L172
  call   <__stack_chk_fail@plt>
L172:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: label: D40
type_guessed: string
name: extract_symbolic_data
arguments: label: D92
type_guessed: string
name: extract_symbolic_data
arguments: label: D133
type_guessed: string
name: extract_symbolic_data
arguments: label: D8
type_guessed: string
name: extract_symbolic_data
arguments: label: D61
type_guessed: string
name: extract_symbolic_data
arguments: label: D66
type_guessed: string
name: extract_symbolic_data
arguments: label: D137
type_guessed: string
name: extract_symbolic_data
arguments: label: D58
type_guessed: string
name: extract_symbolic_data
arguments: label: D10
type_guessed: string

tool: D40: 
                Welcome to Battleship!                    



tool: D92: Enter difficulty level of game (easy, normal, hard): 

tool: D133: %s

tool: D8: easy

tool: D61: normal

tool: D66: hard

tool: D137: Invalid input. Response is case sensitive. Please select again.


tool: D58: Initializing board... 

tool: D10: now let's begin!



assistant: ```c
int main(void) {
  int **board;
  int i;
  int j;
  char level[10] = "";
  int maxTries;
  int validLoc = 0;
  printStudInfo();
  printf("\n                Welcome to Battleship!                    \n\n");
  while ((strcmp(level, "easy")) && (strcmp(level, "normal")) && (strcmp(level, "hard"))) {
    printf("Enter difficulty level of game (easy, normal, hard): ");
    scanf("%s", level);
    if ((strcmp(level, "easy")) && (strcmp(level, "normal")) && (strcmp(level, "hard"))) {
      printf("Invalid input. Response is case sensitive. Please select again.\n");
    }
  }
  if (!strcmp(level, "easy")) {
    maxTries = 30;
  } else if (!strcmp(level, "normal")) {
    maxTries = 25;
  } else {
    maxTries = 20;
  }
  printIntro(maxTries);
  printf("Initializing board... ");
  board = calloc(10, sizeof(int *));
  for (i = 0; i < 10; i++) {
    board[i] = calloc(10, sizeof(int));
  }
  printf("now let's begin!\n\n");
  while (!validLoc) {
    validLoc = assignShip(board, 4);
  }
  validLoc = 0;
  while (!validLoc) {
    validLoc = assignShip(board, 5);
  }
  dispGrid(board);
  return 0;
}
```