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

```asm
<main>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  movl   $0x0,0x4(%rsp)
  lea    D16(%rip),%rsi
  lea    D36(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  lea    0x4(%rsp),%rdx
  lea    D55(%rip),%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  mov    0x4(%rsp),%eax
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    0x4(%rsp),%eax
  lea    0x0(,%rax,4),%edi
  call   <malloc@plt>
  mov    %rax,%rbx
  mov    0x4(%rsp),%eax
  lea    0x0(,%rax,4),%edx
  mov    $0xffffffff,%esi
  mov    %rbx,%rdi
  call   <memset@plt>
  cmpl   $0x0,0x4(%rsp)
  jle    L162
  mov    %r12,%r13
  mov    $0x0,%ebp
  lea    D55(%rip),%r15
L167:
  mov    %r13,%rdx
  mov    %r15,%rsi
  mov    %r14,%rdi
  call   <fscanf@plt>
  add    $0x1,%ebp
  add    $0x4,%r13
  cmp    %ebp,0x4(%rsp)
  jg     L167
L162:
  mov    %r14,%rdi
  call   <fclose@plt>
  cmpl   $0x0,0x4(%rsp)
  jle    L14
  mov    %r12,%rsi
  mov    $0x1,%r8d
  mov    $0x0,%ebp
  mov    %rbx,%r9
  sub    %r12,%r9
  jmp    L98
L84:
  add    $0x1,%edx
  add    $0x4,%rax
  cmp    %edx,0x4(%rsp)
  jle    L165
L16:
  mov    (%rdi),%ecx
  cmp    (%rax),%ecx
  jne    L84
  add    $0x1,%ebp
  mov    %ecx,(%rsi,%r9,1)
  mov    (%rax),%ecx
  mov    %ecx,(%rax,%r9,1)
  movl   $0xffffffff,(%rax)
  jmp    L84
L165:
  add    $0x1,%r8
  add    $0x4,%rsi
  lea    -0x1(%r8),%eax
  cmp    %eax,0x4(%rsp)
  jle    L127
L98:
  mov    %rsi,%rdi
  cmpl   $0xffffffff,(%rsi)
  je     L165
  mov    %r8d,%edx
  cmp    %r8d,0x4(%rsp)
  jle    L127
  movslq %r8d,%rax
  lea    (%r12,%rax,4),%rax
  jmp    L16
L127:
  cmpl   $0x0,0x4(%rsp)
  jle    L45
  mov    $0x0,%r12d
  lea    D39(%rip),%r13
  jmp    L161
L56:
  add    $0x1,%r12d
  add    $0x4,%rbx
  cmp    %r12d,0x4(%rsp)
  jle    L45
L161:
  mov    (%rbx),%esi
  cmp    $0xffffffff,%esi
  je     L56
  mov    %r12d,%edx
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  jmp    L56
L45:
  test   %ebp,%ebp
  je     L14
L178:
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L50
  mov    $0x0,%eax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L14:
  lea    D2(%rip),%rdi
  call   <puts@plt>
  jmp    L178
L50:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D16
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D36
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D55
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D39
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D2
type_guessed: string

tool: D16: r

tool: D36: ./Data1.txt

tool: D55: %d

tool: D39: The value %d is repeated and appears at %d.


tool: D2: NO REPEATS FOUND.

assistant: ```c
int main(int argc, char *argv[]) {
  int *intData = NULL;
  int *intAppeared = NULL;
  int intSize = 0;
  int anyRepeats = 0;
  FILE *fileHandle = fopen("./Data1.txt", "r");
  {
    fscanf(fileHandle, "%d", &intSize);
    intData = (int *)(malloc(sizeof(int) * intSize));
    intAppeared = (int *)(malloc(sizeof(int) * intSize));
    memset(intAppeared, -1, intSize * sizeof(int));
    for (int indexCounter_outer = 0; indexCounter_outer < intSize; indexCounter_outer++) {
      fscanf(fileHandle, "%d", &intData[indexCounter_outer]);
    }
  }
  fclose(fileHandle);
  for (int indexCounter_outer = 0; indexCounter_outer < intSize; indexCounter_outer++) {
    if (intData[indexCounter_outer] != -1) {
      for (int indexCounter_inner = indexCounter_outer + 1; indexCounter_inner < intSize; indexCounter_inner++) {
        if (intData[indexCounter_outer] == intData[indexCounter_inner]) {
          anyRepeats++;
          intAppeared[indexCounter_outer] = intData[indexCounter_outer];
          intAppeared[indexCounter_inner] = intData[indexCounter_inner];
          intData[indexCounter_inner] = -1;
        }
      }
    }
  }
  for (int indexCounter = 0; indexCounter < intSize; indexCounter++) {
    if (intAppeared[indexCounter] != -1) {
      printf("The value %d is repeated and appears at %d.\n", intAppeared[indexCounter], indexCounter);
    }
  }
  if (!anyRepeats) {
    printf("NO REPEATS FOUND.\n");
  }
}
```