user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  xor    %edx,%edx
  lea    D24(%rip),%r15
  push   %r14
  push   %r13
  lea    D42(%rip),%r13
  push   %r12
  lea    D30(%rip),%r12
  push   %rbp
  push   %rbx
  lea    D3(%rip),%rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    %dx,0x16(%rsp)
  lea    0xe(%rsp),%rbp
  movq   $0x0,0xe(%rsp)
  call   <printStudInfo@plt>
  lea    D97(%rip),%rdi
  call   <printf@plt>
L102:
  lea    D34(%rip),%r14
  jmp    L81
  nopl   (%rax)
L44:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L85
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L85
  mov    %r15,%rdi
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L54
L81:
  mov    %r12,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L44
L85:
  mov    %rbp,%rdi
  mov    %r12,%rsi
  call   <strcmp@plt>
  mov    $0x1e,%edi
  test   %rax,%rax
  jne    L35
L16:
  call   <printIntro@plt>
  lea    D48(%rip),%rdi
  call   <printf@plt>
  mov    $0x8,%esi
  mov    $0xa,%edi
  call   <calloc@plt>
  mov    %rax,%r12
  mov    %rax,%rbp
  lea    0x50(%rax),%rbx
  nopw   0x0(%rax,%rax,1)
L117:
  mov    $0x4,%esi
  mov    $0xa,%edi
  add    $0x8,%rbp
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  cmp    %rbx,%rbp
  jne    L117
  lea    D12(%rip),%rdi
  call   <printf@plt>
  nopl   0x0(%rax,%rax,1)
L5:
  mov    $0x4,%esi
  mov    %r12,%rdi
  call   <assignShip@plt>
  test   %eax,%eax
  je     L5
  nopl   0x0(%rax)
L74:
  mov    $0x5,%esi
  mov    %r12,%rdi
  call   <assignShip@plt>
  test   %eax,%eax
  je     L74
  mov    %r12,%rdi
  call   <dispGrid@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L137
  add    $0x28,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L35:
  mov    %rbp,%rdi
  lea    D3(%rip),%rsi
  call   <strcmp@plt>
  cmp    $0x1,%rax
  sbb    %edi,%edi
  and    $0x5,%edi
  add    $0x14,%edi
  jmp    L16
L54:
  mov    %rbx,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L102
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L102
  lea    D79(%rip),%rdi
  call   <printf@plt>
  jmp    L102
L137:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D24
type_guessed: string
name: extract_symbolic_data
arguments: label: D42
type_guessed: string
name: extract_symbolic_data
arguments: label: D30
type_guessed: string
name: extract_symbolic_data
arguments: label: D3
type_guessed: string
name: extract_symbolic_data
arguments: label: D97
type_guessed: string
name: extract_symbolic_data
arguments: label: D34
type_guessed: string
name: extract_symbolic_data
arguments: label: D48
type_guessed: string
name: extract_symbolic_data
arguments: label: D12
type_guessed: string
name: extract_symbolic_data
arguments: label: D79
type_guessed: string

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

tool: D42: hard

tool: D30: easy

tool: D3: normal

tool: D97: 
                Welcome to Battleship!                    



tool: D34: %s

tool: D48: Initializing board... 

tool: D12: now let's begin!



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


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