user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x70,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%r14
  movl   $0x6,-0x78(%rbp)
  movl   $0x0,-0x74(%rbp)
  mov    -0x78(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x68(%rbp)
  movslq %edx,%rax
  mov    %rax,-0x90(%rbp)
  movq   $0x0,-0x88(%rbp)
  movslq %edx,%rax
  mov    %rax,%rcx
  mov    $0x0,%ebx
  movslq %edx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L185:
  cmp    %rdx,%rsp
  je     L126
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L185
L126:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L6
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L6:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x78(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x58(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  movslq %eax,%rdx
  mov    %rdx,%r10
  mov    $0x0,%r11d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L123:
  cmp    %rdx,%rsp
  je     L133
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L123
L133:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L63
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L63:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x50(%rbp)
  mov    -0x78(%rbp),%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0x48(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r8
  mov    $0x0,%r9d
  movslq %eax,%rdx
  mov    %rdx,%rsi
  mov    $0x0,%edi
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%ebx
  mov    $0x0,%edx
  div    %rbx
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L31:
  cmp    %rdx,%rsp
  je     L120
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L31
L120:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L102
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L102:
  mov    %rsp,%rax
  add    $0x3,%rax
  shr    $0x2,%rax
  shl    $0x2,%rax
  mov    %rax,-0x40(%rbp)
  lea    -0x70(%rbp),%rax
  mov    %rax,-0x38(%rbp)
  lea    -0x80(%rbp),%rax
  mov    %rax,-0x30(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L40
L4:
  mov    $0x64,%edi
  call   <malloc@plt>
  mov    %rax,%rcx
  mov    -0x60(%rbp),%rax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  mov    %rcx,(%rax,%rdx,8)
  mov    -0x60(%rbp),%rax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,8),%rax
  test   %rax,%rax
  jne    L149
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L24
L149:
  addl   $0x1,-0x7c(%rbp)
L40:
  mov    -0x7c(%rbp),%eax
  cmp    -0x78(%rbp),%eax
  jl     L4
  movl   $0x0,-0x7c(%rbp)
  jmp    L60
L46:
  mov    $0x64,%edi
  call   <malloc@plt>
  mov    %rax,%rcx
  mov    -0x50(%rbp),%rax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  mov    %rcx,(%rax,%rdx,8)
  mov    -0x50(%rbp),%rax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,8),%rax
  test   %rax,%rax
  jne    L150
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L24
L150:
  addl   $0x1,-0x7c(%rbp)
L60:
  mov    -0x7c(%rbp),%eax
  cmp    -0x78(%rbp),%eax
  jl     L46
  lea    D65(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x40(%rbp),%rax
  lea    0x14(%rax),%rbx
  mov    -0x60(%rbp),%rax
  mov    0x28(%rax),%r8
  mov    -0x40(%rbp),%rax
  lea    0x10(%rax),%r11
  mov    -0x60(%rbp),%rax
  mov    0x20(%rax),%rdi
  mov    -0x40(%rbp),%rax
  lea    0xc(%rax),%r10
  mov    -0x60(%rbp),%rax
  mov    0x18(%rax),%rsi
  mov    -0x40(%rbp),%rax
  lea    0x8(%rax),%r9
  mov    -0x60(%rbp),%rax
  mov    0x10(%rax),%r12
  mov    -0x40(%rbp),%rax
  lea    0x4(%rax),%r13
  mov    -0x60(%rbp),%rax
  mov    0x8(%rax),%rcx
  mov    -0x40(%rbp),%rdx
  mov    -0x60(%rbp),%rax
  mov    (%rax),%rax
  sub    $0x8,%rsp
  push   %rbx
  push   %r8
  push   %r11
  push   %rdi
  push   %r10
  push   %rsi
  push   %r9
  mov    %r12,%r9
  mov    %r13,%r8
  mov    %rax,%rsi
  lea    D2(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  add    $0x40,%rsp
  mov    -0x78(%rbp),%edx
  mov    -0x60(%rbp),%rcx
  mov    -0x40(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <validateData@plt>
  mov    %eax,-0x78(%rbp)
  mov    -0x30(%rbp),%r8
  mov    -0x38(%rbp),%rdi
  mov    -0x50(%rbp),%rcx
  mov    -0x78(%rbp),%edx
  mov    -0x60(%rbp),%rsi
  mov    -0x40(%rbp),%rax
  mov    %r8,%r9
  mov    %rdi,%r8
  mov    %rax,%rdi
  call   <findFaiures@plt>
  mov    %eax,-0x74(%rbp)
  mov    -0x70(%rbp),%rax
  movq   %rax,%xmm0
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x80(%rbp),%eax
  mov    %eax,%esi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    -0x74(%rbp),%eax
  mov    %eax,%esi
  lea    D14(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  movl   $0x0,-0x7c(%rbp)
  jmp    L190
L168:
  mov    -0x50(%rbp),%rax
  mov    -0x7c(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,8),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  addl   $0x1,-0x7c(%rbp)
L190:
  mov    -0x7c(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  jl     L168
  mov    $0x0,%eax
L24:
  mov    %r14,%rsp
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L187
  call   <__stack_chk_fail@plt>
L187:
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: label: D1
type: string
name: parse_data
arguments: label: D65
type: string
name: parse_data
arguments: label: D2
type: string
name: parse_data
arguments: label: D3
type: string
name: parse_data
arguments: label: D41
type: string
name: parse_data
arguments: label: D14
type: string

tool: D1: Memory allocation failed.

tool: D65: Please enter the names and grades of 6 students.

tool: D2: %s %d %s %d %s %d %s %d %s %d %s %d

tool: D3: 
Average grade : %lf


tool: D41: 
Maximal grade : %d


tool: D14: 
%d students failed:


assistant: ```c
int main(void) {
  int i, size = 6, number_of_failed_students = 0;
  char *names[size], *failed[size];
  int grades[size];
  double avg;
  double *average = &avg;
  int max;
  int *maximal = &max;
  for (i = 0; i < size; i++) {
    names[i] = (char *)malloc(100 * sizeof(char));
    if (names[i] == NULL) {
      printf("Memory allocation failed.\n");
      return 1;
    }
  }
  for (i = 0; i < size; i++) {
    failed[i] = (char *)malloc(100 * sizeof(char));
    if (failed[i] == NULL) {
      printf("Memory allocation failed.\n");
      return 1;
    }
  }
  printf("Please enter the names and grades of 6 students.\n");
  scanf("%s %d %s %d %s %d %s %d %s %d %s %d", names[0], &grades[0], names[1], &grades[1], names[2], &grades[2], names[3], &grades[3], names[4], &grades[4], names[5], &grades[5]);
  size = validateData(grades, names, size);
  number_of_failed_students = findFaiures(grades, names, size, failed, average, maximal);
  printf("\nAverage grade : %lf\n", avg);
  printf("\nMaximal grade : %d\n", max);
  printf("\n%d students failed:\n", number_of_failed_students);
  for (i = 0; i < number_of_failed_students; i++) {
    printf("%s\n", failed[i]);
  }
  return 0;
}
```