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

```asm
<main>:
  endbr64
  push   %r15
  lea    D179(%rip),%r15
  push   %r14
  push   %r13
  lea    D126(%rip),%r13
  push   %r12
  lea    D99(%rip),%r12
  push   %rbp
  xor    %ebp,%ebp
  push   %rbx
  lea    D198(%rip),%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x8(%rsp)
  xor    %eax,%eax
  lea    0x4(%rsp),%r14
  nopl   (%rax)
L143:
  mov    %r12,%rdi
  call   <system@plt>
  lea    D14(%rip),%rdi
  call   <printf@plt>
  lea    D94(%rip),%rdi
  call   <printf@plt>
  lea    D57(%rip),%rdi
  call   <printf@plt>
  lea    D36(%rip),%rdi
  call   <printf@plt>
  lea    D71(%rip),%rdi
  call   <printf@plt>
  lea    D221(%rip),%rdi
  call   <printf@plt>
  lea    D267(%rip),%rdi
  call   <printf@plt>
  lea    D4(%rip),%rdi
  call   <printf@plt>
  lea    D107(%rip),%rdi
  call   <printf@plt>
  lea    D100(%rip),%rdi
  call   <printf@plt>
  lea    D151(%rip),%rdi
  call   <printf@plt>
  lea    D152(%rip),%rdi
  call   <printf@plt>
  lea    D88(%rip),%rdi
  call   <printf@plt>
  lea    D134(%rip),%rdi
  call   <printf@plt>
  lea    D175(%rip),%rdi
  call   <printf@plt>
  lea    D95(%rip),%rdi
  call   <printf@plt>
  lea    D155(%rip),%rdi
  call   <printf@plt>
  lea    D214(%rip),%rdi
  call   <printf@plt>
  lea    D140(%rip),%rdi
  call   <printf@plt>
  lea    D149(%rip),%rdi
  call   <printf@plt>
  lea    D260(%rip),%rdi
  call   <printf@plt>
  mov    %r15,%rdi
  call   <printf@plt>
  lea    D63(%rip),%rdi
  call   <printf@plt>
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <scanf@plt>
  cmpl   $0xe,0x4(%rsp)
  ja     L143
  mov    0x4(%rsp),%eax
  movslq (%rbx,%rax,4),%rax
  add    %rbx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
  lea    D206(%rip),%rdi
  call   <printf@plt>
  mov    %r12,%rdi
  call   <system@plt>
  mov    0x8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L1
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
  mov    %rbp,%rdi
  call   <num_students@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <remove_student@plt>
  mov    %rax,%rbp
  jmp    L143
  nopl   0x0(%rax,%rax,1)
  mov    %rbp,%rdi
  call   <add_student@plt>
  mov    %rax,%rbp
  jmp    L143
  mov    %rbp,%rdi
  call   <update_assignments@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <assignment_statistics@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <student_statistics@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <print_nth@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <name_search_print@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <tail_print@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <print_head@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <class_print@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <write_to_file@plt>
  jmp    L143
  nopl   (%rax)
  mov    %rbp,%rdi
  call   <read_from_file@plt>
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <class_print@plt>
  jmp    L143
L1:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: label: D179
type: string
name: disassemble_data
arguments: label: D126
type: string
name: disassemble_data
arguments: label: D99
type: string
name: disassemble_data
arguments: label: D14
type: string
name: disassemble_data
arguments: label: D94
type: string
name: disassemble_data
arguments: label: D57
type: string
name: disassemble_data
arguments: label: D36
type: string
name: disassemble_data
arguments: label: D71
type: string
name: disassemble_data
arguments: label: D221
type: string
name: disassemble_data
arguments: label: D267
type: string
name: disassemble_data
arguments: label: D4
type: string
name: disassemble_data
arguments: label: D107
type: string
name: disassemble_data
arguments: label: D100
type: string
name: disassemble_data
arguments: label: D151
type: string
name: disassemble_data
arguments: label: D152
type: string
name: disassemble_data
arguments: label: D88
type: string
name: disassemble_data
arguments: label: D134
type: string
name: disassemble_data
arguments: label: D175
type: string
name: disassemble_data
arguments: label: D95
type: string
name: disassemble_data
arguments: label: D155
type: string
name: disassemble_data
arguments: label: D214
type: string
name: disassemble_data
arguments: label: D140
type: string
name: disassemble_data
arguments: label: D149
type: string
name: disassemble_data
arguments: label: D260
type: string
name: disassemble_data
arguments: label: D63
type: string
name: disassemble_data
arguments: label: D206
type: string

tool: D179: 14-- Exit Program



tool: D126: %d

tool: D99: clear

tool: D14: ----------Gradebook Menu----------



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

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



tool: D36: ------------Read Write------------


tool: D71: 1 -- Load Gradebook from File


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



tool: D267: -------View Grades Statistics-----


tool: D4: 3 -- View Entire Gradebook


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


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


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


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


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


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



tool: D175: ------------Add Grades------------


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



tool: D155: ---------Add Remove Students------


tool: D214: 11-- Add a New Student


tool: D140: 12-- Remove a Student



tool: D149: -----------Extra Functions--------


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


tool: D63: Enter Selection: 

tool: D206: 


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;
}
```