user: Translate the below assembly code into C programming language:

```asm
<main>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    D43(%rip),%rdi
  call   <printf@plt>
  lea    0x4(%rsp),%rsi
  lea    D65(%rip),%rdi
  call   <scanf@plt>
  mov    $0x4,%esi
  mov    0x4(%rsp),%edi
  call   <calloc@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L66
L41:
  cmpl   $0x0,0x4(%rsp)
  jle    L73
  mov    %r13,%rbp
  mov    $0x0,%ebx
  lea    D87(%rip),%r14
  lea    D65(%rip),%r12
L71:
  add    $0x1,%ebx
  mov    %ebx,%esi
  mov    %r14,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %rbp,%rsi
  mov    %r12,%rdi
  call   <scanf@plt>
  add    $0x4,%rbp
  cmp    0x4(%rsp),%ebx
  jl     L71
L73:
  lea    D27(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x0,0x4(%rsp)
  jle    L89
  mov    %r13,%rbp
  mov    $0x0,%ebx
  lea    D34(%rip),%r12
L8:
  mov    0x0(%rbp),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%ebx
  add    $0x4,%rbp
  cmp    %ebx,0x4(%rsp)
  jg     L8
L89:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x4(%rsp),%eax
  mov    %eax,%esi
  shr    $0x1f,%esi
  add    %eax,%esi
  sar    %esi
  shl    $0x2,%esi
  mov    %r13,%rdi
  call   <realloc@plt>
  mov    %rax,%rbp
  test   %r13,%r13
  je     L82
L67:
  lea    D77(%rip),%rdi
  call   <puts@plt>
  cmpl   $0x1,0x4(%rsp)
  jle    L59
  mov    $0x0,%ebx
  lea    D34(%rip),%r12
L19:
  mov    0x0(%rbp,%rbx,4),%esi
  mov    %r12,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  mov    0x4(%rsp),%eax
  mov    %eax,%edx
  shr    $0x1f,%edx
  add    %eax,%edx
  sar    %edx
  cmp    %ebx,%edx
  jg     L19
L59:
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L78
  mov    $0x0,%eax
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L66:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L41
L82:
  mov    $0x0,%edi
  call   <free@plt>
  lea    D47(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  mov    $0x0,%ebp
  jmp    L67
L78:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D43
type_infered: string
name: disassemble_data
arguments: data_tag: D65
type_infered: string
name: disassemble_data
arguments: data_tag: D87
type_infered: string
name: disassemble_data
arguments: data_tag: D27
type_infered: string
name: disassemble_data
arguments: data_tag: D34
type_infered: string
name: disassemble_data
arguments: data_tag: D77
type_infered: string
name: disassemble_data
arguments: data_tag: D47
type_infered: string

tool: D43: Enter size of array: 

tool: D65: %d

tool: D87: Enter number #%d: 

tool: D27: Original Array Contents: 

tool: D34: %d 

tool: D77: Resized Array Contents: 

tool: D47: Error reallocating memory

assistant: ```c
int main() {
  int arraySize, n;
  int *dataPtr;
  int *resizedArray = NULL;
  printf("Enter size of array: ");
  scanf("%d", &arraySize);
  dataPtr = (int *)calloc(arraySize, sizeof(int));
  if (dataPtr == NULL)
    exit(1);
  for (n = 0; n < arraySize; n++) {
    printf("Enter number #%d: ", n + 1);
    scanf("%d", &dataPtr[n]);
  }
  printf("Original Array Contents: \n");
  for (n = 0; n < arraySize; n++)
    printf("%d ", dataPtr[n]);
  printf("\n");
  resizedArray = (int *)realloc(dataPtr, (arraySize / 2) * sizeof(int));
  if (dataPtr != NULL) {
    dataPtr = resizedArray;
    resizedArray = NULL;
  } else {
    free(dataPtr);
    puts("Error reallocating memory");
    exit(1);
  }
  printf("Resized Array Contents: \n");
  for (n = 0; n < (arraySize / 2); n++)
    printf("%d ", dataPtr[n]);
  printf("\n");
  free(dataPtr);
  return 0;
}
```