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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x4,-0x18(%rbp)
  cmpl   $0x2,-0x34(%rbp)
  je     L36
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x0,%eax
  jmp    L51
L36:
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  lea    D44(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L90
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D29(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L51
L90:
  mov    -0x10(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  lea    -0x24(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x1,%edx
  mov    %rax,%rdi
  call   <fread@plt>
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  jne    L85
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L51
L85:
  movl   $0x1,-0x1c(%rbp)
L57:
  mov    -0x10(%rbp),%rdx
  mov    -0x18(%rbp),%esi
  lea    -0x20(%rbp),%rax
  mov    %rdx,%rcx
  mov    $0x1,%edx
  mov    %rax,%rdi
  call   <fread@plt>
  mov    %eax,-0x14(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L8
  addl   $0x1,-0x1c(%rbp)
  mov    -0x24(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jle    L9
  mov    -0x20(%rbp),%ecx
  mov    -0x24(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x1c(%rbp),%eax
  mov    %ecx,%r8d
  mov    %edx,%ecx
  mov    %eax,%edx
  lea    D19(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
  jmp    L51
L9:
  mov    -0x20(%rbp),%eax
  mov    %eax,-0x24(%rbp)
  jmp    L57
L8:
  nop
  mov    -0x40(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D32(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x0,%eax
L51:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L39
  call   <__stack_chk_fail@plt>
L39:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D1
datatype: string
name: extract_symbolic_data
arguments: data_label: D44
datatype: string
name: extract_symbolic_data
arguments: data_label: D29
datatype: string
name: extract_symbolic_data
arguments: data_label: D6
datatype: string
name: extract_symbolic_data
arguments: data_label: D19
datatype: string
name: extract_symbolic_data
arguments: data_label: D32
datatype: string

tool: D1: Usage: ./verify <datafile>

tool: D44: r

tool: D29: Can't open datafile %s


tool: D6: No data in %s


tool: D19: Failed: items %u, %u: %u > %u


tool: D32: Data in %s are sorted


assistant: ```c
int main(int argc, char **argv) {
  FILE *fp;
  int nbytes, val1, val2, i;
  int intSize = sizeof(int);
  if (argc != 2) {
    printf("Usage: ./verify <datafile>\n");
    return 0;
  }
  if (!(fp = fopen(argv[1], "r"))) {
    printf("Can't open datafile %s\n", argv[1]);
    return 0;
  }
  nbytes = fread(&val1, intSize, 1, fp);
  if (nbytes == 0) {
    printf("No data in %s\n", argv[1]);
    return 0;
  }
  i = 1;
  while (1) {
    nbytes = fread(&val2, intSize, 1, fp);
    if (nbytes == 0)
      break;
    i++;
    if (val1 > val2) {
      printf("Failed: items %u, %u: %u > %u\n", i - 1, i, val1, val2);
      return 0;
    }
    val1 = val2;
  }
  printf("Data in %s are sorted\n", argv[1]);
}
```