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

```asm
<checkFileContent>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rdi,%r13
  mov    %rsi,%r14
  mov    $0x5f5e100,%edi
  call   <allocMemory@plt>
  mov    %rax,%rbp
  mov    $0x1,%r12d
  mov    $0x0,%r15d
  jmp    L130
L178:
  movsbl 0x0(%rbp,%rbx,1),%edx
  mov    %rbx,%rcx
  mov    %r12,%rsi
  lea    D13(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  lea    D31(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L18:
  lea    0x1(%rbx),%rdx
  movzbl 0x1(%rbp,%rbx,1),%eax
  test   %al,%al
  je     L84
  mov    %rdx,%rbx
L70:
  mov    %eax,%edx
  and    $0xffffffdf,%edx
  cmp    $0xa,%dl
  je     L18
  cmp    $0x2d,%al
  je     L18
  mov    %r14,%rsi
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpb   $0x0,0x0(%rbp,%rbx,1)
  jne    L178
  lea    D70(%rip),%rdi
  call   <puts@plt>
  jmp    L178
L84:
  cmpb   $0xa,0x0(%rbp,%rbx,1)
  cmovne %rdx,%rbx
  mov    %rbx,%rsi
  lea    D12(%rip),%rdi
  call   <printf@plt>
  cmp    $0xa,%rbx
  ja     L14
  test   %rbx,%rbx
  je     L137
L34:
  test   %r15,%r15
  je     L171
  cmp    %rbx,%r15
  je     L74
L122:
  mov    %r14,%rsi
  lea    D10(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rsi
  lea    D102(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L127:
  add    $0x1,%r12
L130:
  mov    %r13,%rdx
  mov    $0x5f5e100,%esi
  mov    %rbp,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  je     L71
  movzbl 0x0(%rbp),%eax
  mov    $0x0,%ebx
  test   %al,%al
  jne    L70
  cmpb   $0xa,-0x1(%rbp)
  je     L19
  mov    $0x0,%esi
  lea    D12(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
L137:
  mov    %r14,%rsi
  lea    D139(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  test   %r15,%r15
  je     L127
  jmp    L122
L171:
  mov    %rbx,%r15
  jmp    L127
L74:
  mov    %rbx,%r15
  jmp    L127
L19:
  mov    $0xffffffffffffffff,%rsi
  lea    D12(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffffffffffff,%rbx
L14:
  mov    %r14,%rsi
  lea    D86(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xa,%esi
  lea    D100(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r12,%rsi
  lea    D89(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbx,%rsi
  lea    D58(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    $0x0,%edi
  call   <exit@plt>
  jmp    L34
L71:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %r13,%rdi
  call   <rewind@plt>
  mov    %r15,%rax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: retrieve_data
arguments: label: D13
type_infered: string
name: retrieve_data
arguments: label: D31
type_infered: string
name: retrieve_data
arguments: label: D43
type_infered: string
name: retrieve_data
arguments: label: D70
type_infered: string
name: retrieve_data
arguments: label: D12
type_infered: string
name: retrieve_data
arguments: label: D10
type_infered: string
name: retrieve_data
arguments: label: D102
type_infered: string
name: retrieve_data
arguments: label: D139
type_infered: string
name: retrieve_data
arguments: label: D86
type_infered: string
name: retrieve_data
arguments: label: D100
type_infered: string
name: retrieve_data
arguments: label: D89
type_infered: string
name: retrieve_data
arguments: label: D58
type_infered: string

tool: D13: 
(row #%d has character(%d) 

tool: D31: @ column %d)



tool: D43: 
Error: Processed file %s has character(s) other than "*" or "-"

tool: D70: 
[DEBUG] '\0' == row[checkIndex] =(

tool: D12: 
checkIndex == %d after while



tool: D10: 
Error: Processed file %s has rows with different lengths


tool: D102: (row #%d)


tool: D139: 
Error: Processed file %s has an empty row


tool: D86: 
Error: Processed file %s has too long row of characters


tool: D100: Maximum allowed amount of characters per row is: %d


tool: D89: (row #%d had 

tool: D58: %d characters)



assistant: ```c
unsigned long long checkFileContent(FILE *gridFile, char *fileName) {
  char *row;
  unsigned long long rowLen = 0;
  unsigned long long checkIndex = 0;
  unsigned long long rowCounter = 0;
  row = allocMemory(100000000);
  while (NULL != fgets(row, 100000000, gridFile)) {
    while ('\0' != row[checkIndex]) {
      if (row[checkIndex] != '-' && row[checkIndex] != '*' && row[checkIndex] != '\n') {
        printf("\nError: Processed file %s has character(s) other than \"*\" or \"-\"", fileName);
        if ('\0' == row[checkIndex]) {
          printf("\n[DEBUG] \'\\0\' == row[checkIndex] =(\n");
        }
        printf("\n(row #%d has character(%d) ", rowCounter + 1, row[checkIndex], checkIndex);
        printf("@ column %d)\n\n", checkIndex);
        free(row);
        fclose(gridFile);
        exit(0);
      }
      checkIndex++;
    }
    if ('\n' == row[checkIndex - 1]) {
      checkIndex--;
    }
    printf("\ncheckIndex == %d after while\n\n", checkIndex);
    if (checkIndex > 10) {
      printf("\nError: Processed file %s has too long row of characters\n", fileName);
      printf("Maximum allowed amount of characters per row is: %d\n", 10);
      printf("(row #%d had ", rowCounter + 1);
      printf("%d characters)\n\n", checkIndex);
      free(row);
      fclose(gridFile);
      exit(0);
    }
    if (0 == checkIndex) {
      printf("\nError: Processed file %s has an empty row\n", fileName);
      free(row);
      fclose(gridFile);
      exit(0);
    }
    if (0 == rowLen) {
      rowLen = checkIndex;
    }
    if (checkIndex != rowLen) {
      printf("\nError: Processed file %s has rows with different lengths\n", fileName);
      printf("(row #%d)\n", rowCounter + 1);
      free(row);
      fclose(gridFile);
      exit(0);
    }
    rowCounter++;
    checkIndex = 0;
  }
  free(row);
  rewind(gridFile);
  return rowLen;
}
```