user: 请从给定的汇编指令推导出C源代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x1,-0x14(%rbp)
  movq   $0x0,-0x10(%rbp)
  jmp    L105
L2:
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <system@plt>
  lea    D0(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D128(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D147(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D163(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D220(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D121(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D62(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D175(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D105(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D53(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D242(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D174(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D183(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D193(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D111(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D138(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D55(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D186(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D256(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D104(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    -0x18(%rbp),%rax
  mov    %rax,%rsi
  lea    D58(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x18(%rbp),%eax
  cmp    $0xe,%eax
  ja     L105
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D135(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D135(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <read_from_file@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <class_print@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <write_to_file@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <class_print@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <print_head@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <tail_print@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <name_search_print@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <print_nth@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <student_statistics@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <assignment_statistics@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <update_assignments@plt>
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <add_student@plt>
  mov    %rax,-0x10(%rbp)
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <remove_student@plt>
  mov    %rax,-0x10(%rbp)
  jmp    L105
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <num_students@plt>
  jmp    L105
  movl   $0x0,-0x14(%rbp)
  nop
L105:
  cmpl   $0x0,-0x14(%rbp)
  jne    L2
  lea    D39(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  lea    D36(%rip),%rax
  mov    %rax,%rdi
  call   <system@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L91
  call   <__stack_chk_fail@plt>
L91:
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D36
type: string
name: extract_symbolic_data
arguments: tag: D0
type: string
name: extract_symbolic_data
arguments: tag: D128
type: string
name: extract_symbolic_data
arguments: tag: D147
type: string
name: extract_symbolic_data
arguments: tag: D163
type: string
name: extract_symbolic_data
arguments: tag: D220
type: string
name: extract_symbolic_data
arguments: tag: D121
type: string
name: extract_symbolic_data
arguments: tag: D62
type: string
name: extract_symbolic_data
arguments: tag: D175
type: string
name: extract_symbolic_data
arguments: tag: D105
type: string
name: extract_symbolic_data
arguments: tag: D53
type: string
name: extract_symbolic_data
arguments: tag: D242
type: string
name: extract_symbolic_data
arguments: tag: D174
type: string
name: extract_symbolic_data
arguments: tag: D183
type: string
name: extract_symbolic_data
arguments: tag: D78
type: string
name: extract_symbolic_data
arguments: tag: D4
type: string
name: extract_symbolic_data
arguments: tag: D193
type: string
name: extract_symbolic_data
arguments: tag: D111
type: string
name: extract_symbolic_data
arguments: tag: D138
type: string
name: extract_symbolic_data
arguments: tag: D55
type: string
name: extract_symbolic_data
arguments: tag: D186
type: string
name: extract_symbolic_data
arguments: tag: D256
type: string
name: extract_symbolic_data
arguments: tag: D16
type: string
name: extract_symbolic_data
arguments: tag: D104
type: string
name: extract_symbolic_data
arguments: tag: D58
type: string
name: extract_symbolic_data
arguments: tag: D39
type: string

tool: D36: clear

tool: D0: ----------Gradebook Menu----------



tool: D128: Please note: Some functions will require pressing enter 

tool: D147: multiple times
in order to return to this menu.



tool: D163: ------------Read Write------------


tool: D220: 1 -- Load Gradebook from File


tool: D121: 2 -- Write Current Gradebook to File



tool: D62: -------View Grades Statistics-----


tool: D175: 3 -- View Entire Gradebook


tool: D105: 4 -- View the First Student's Information/Assignments


tool: D53: 5 -- View the Last Student's Information/Assignments


tool: D242: 6 -- View a Student's Information/Assignments by Name Search


tool: D174: 7 -- View the n'th Student's Information/Assignments


tool: D183: 8 -- View a specific Student's Statistics


tool: D78: 9 -- View a specific  Assignment's Statistics



tool: D4: ------------Add Grades------------


tool: D193: 10-- Add Assignment/s & Grade/s to Student



tool: D111: ---------Add Remove Students------


tool: D138: 11-- Add a New Student


tool: D55: 12-- Remove a Student



tool: D186: -----------Extra Functions--------


tool: D256: 13-- Display the Number of Students in the Class


tool: D16: 14-- Exit Program



tool: D104: Enter Selection: 

tool: D58: %d

tool: D39: 


assistant: ```c
int main(int argc, char **argv) {
  int menuloop = 1;
  struct student *head = NULL;
  while (menuloop != 0) {
    int menuchoice;
    system("clear");
    printf("----------Gradebook Menu----------\n\n");
    printf("Please note: Some functions will require pressing enter ");
    printf("multiple times\nin order to return to this menu.\n\n");
    printf("------------Read Write------------\n");
    printf("1 -- Load Gradebook from File\n");
    printf("2 -- Write Current Gradebook to File\n\n");
    printf("-------View Grades Statistics-----\n");
    printf("3 -- View Entire Gradebook\n");
    printf("4 -- View the First Student's Information/Assignments\n");
    printf("5 -- View the Last Student's Information/Assignments\n");
    printf("6 -- View a Student's Information/Assignments by Name Search\n");
    printf("7 -- View the n'th Student's Information/Assignments\n");
    printf("8 -- View a specific Student's Statistics\n");
    printf("9 -- View a specific  Assignment's Statistics\n\n");
    printf("------------Add Grades------------\n");
    printf("10-- Add Assignment/s & Grade/s to Student\n\n");
    printf("---------Add Remove Students------\n");
    printf("11-- Add a New Student\n");
    printf("12-- Remove a Student\n\n");
    printf("-----------Extra Functions--------\n");
    printf("13-- Display the Number of Students in the Class\n");
    printf("14-- Exit Program\n\n");
    printf("Enter Selection: ");
    scanf("%d", &menuchoice);
    switch (menuchoice) {
    case 1:
      head = read_from_file(head);
      class_print(head);
      break;
    case 2:
      write_to_file(head);
      break;
    case 3:
      class_print(head);
      break;
    case 4:
      print_head(head);
      break;
    case 5:
      tail_print(head);
      break;
    case 6:
      name_search_print(head);
      break;
    case 7:
      print_nth(head);
      break;
    case 8:
      student_statistics(head);
      break;
    case 9:
      assignment_statistics(head);
      break;
    case 10:
      update_assignments(head);
      break;
    case 11:
      head = add_student(head);
      break;
    case 12:
      head = remove_student(head);
      break;
    case 13:
      num_students(head);
      break;
    case 14:
      menuloop = 0;
      break;
    }
  }
  printf("\n");
  system("clear");
  return 0;
}
```