#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct student {
  int dummy;
};

/* Variables and functions */
struct student *add_student(struct student *);
int /*<<< orphan*/ assignment_statistics(struct student *);
int /*<<< orphan*/ class_print(struct student *);
int /*<<< orphan*/ name_search_print(struct student *);
int /*<<< orphan*/ num_students(struct student *);
int /*<<< orphan*/ print_head(struct student *);
int /*<<< orphan*/ print_nth(struct student *);
int /*<<< orphan*/ printf(char *);
struct student *read_from_file(struct student *);
struct student *remove_student(struct student *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ student_statistics(struct student *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ tail_print(struct student *);
int /*<<< orphan*/ update_assignments(struct student *);
int /*<<< orphan*/ write_to_file(struct student *);
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;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     145f <main+0x25f>
lea    0xe02(%rip),%rdi
call   1070 <system@plt>
lea    0xdfc(%rip),%rdi
call   1080 <printf@plt>
lea    0xe15(%rip),%rdi
call   1080 <printf@plt>
lea    0xe42(%rip),%rdi
call   1080 <printf@plt>
lea    0xe68(%rip),%rdi
call   1080 <printf@plt>
lea    0xe80(%rip),%rdi
call   1080 <printf@plt>
lea    0xe93(%rip),%rdi
call   1080 <printf@plt>
lea    0xeae(%rip),%rdi
call   1080 <printf@plt>
lea    0xec6(%rip),%rdi
call   1080 <printf@plt>
lea    0xed6(%rip),%rdi
call   1080 <printf@plt>
lea    0xf01(%rip),%rdi
call   1080 <printf@plt>
lea    0xf2b(%rip),%rdi
call   1080 <printf@plt>
lea    0xf5d(%rip),%rdi
call   1080 <printf@plt>
lea    0xf87(%rip),%rdi
call   1080 <printf@plt>
lea    0xfa6(%rip),%rdi
call   1080 <printf@plt>
lea    0xfca(%rip),%rdi
call   1080 <printf@plt>
lea    0xfe2(%rip),%rdi
call   1080 <printf@plt>
lea    0x1003(%rip),%rdi
call   1080 <printf@plt>
lea    0x101b(%rip),%rdi
call   1080 <printf@plt>
lea    0x1027(%rip),%rdi
call   1080 <printf@plt>
lea    0x1033(%rip),%rdi
call   1080 <printf@plt>
lea    0x104b(%rip),%rdi
call   1080 <printf@plt>
lea    0x1071(%rip),%rdi
call   1080 <printf@plt>
lea    0x1079(%rip),%rdi
call   1080 <printf@plt>
lea    0x107f(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   10e0 <scanf@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0xd,%eax
ja     145a <main+0x25a>
mov    -0x30(%rbp),%rax
lea    0xc81(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x20(%rbp),%rdi
call   1030 <read_from_file@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1100 <class_print@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   1090 <write_to_file@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   1100 <class_print@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   10f0 <print_head@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   1060 <tail_print@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   1110 <name_search_print@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   10c0 <print_nth@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   10d0 <student_statistics@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   10b0 <assignment_statistics@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   1040 <update_assignments@plt>
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   1120 <add_student@plt>
mov    %rax,-0x20(%rbp)
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   1050 <remove_student@plt>
mov    %rax,-0x20(%rbp)
jmp    145a <main+0x25a>
mov    -0x20(%rbp),%rdi
call   10a0 <num_students@plt>
jmp    145a <main+0x25a>
movl   $0x0,-0x14(%rbp)
jmp    1225 <main+0x25>
lea    0xbfb(%rip),%rdi
call   1080 <printf@plt>
lea    0xbc6(%rip),%rdi
call   1070 <system@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %r15d,%r15d
lea    0x117b(%rip),%r12
lea    0xe3b(%rip),%r13
lea    0xe46(%rip),%rbx
lea    0x4(%rsp),%rbp
lea    0xdb1(%rip),%r14
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   10c0 <num_students@plt>
nopl   0x0(%rax)
lea    0xdd1(%rip),%rdi
call   1090 <system@plt>
lea    0xe19(%rip),%rdi
call   1050 <puts@plt>
lea    0xdbf(%rip),%rdi
call   10a0 <printf@plt>
lea    0xe25(%rip),%rdi
call   1050 <puts@plt>
lea    0xe4a(%rip),%rdi
call   1050 <puts@plt>
lea    0xe61(%rip),%rdi
call   1050 <puts@plt>
lea    0xe73(%rip),%rdi
call   1050 <puts@plt>
lea    0xe8d(%rip),%rdi
call   1050 <puts@plt>
lea    0xea4(%rip),%rdi
call   1050 <puts@plt>
lea    0xeb3(%rip),%rdi
call   1050 <puts@plt>
lea    0xedd(%rip),%rdi
call   1050 <puts@plt>
lea    0xf06(%rip),%rdi
call   1050 <puts@plt>
lea    0xf37(%rip),%rdi
call   1050 <puts@plt>
lea    0xf60(%rip),%rdi
call   1050 <puts@plt>
lea    0xf7e(%rip),%rdi
call   1050 <puts@plt>
lea    0xfa1(%rip),%rdi
call   1050 <puts@plt>
lea    0xfb8(%rip),%rdi
call   1050 <puts@plt>
lea    0xfd8(%rip),%rdi
call   1050 <puts@plt>
lea    0xfef(%rip),%rdi
call   1050 <puts@plt>
lea    0xffa(%rip),%rdi
call   1050 <puts@plt>
lea    0x1005(%rip),%rdi
call   1050 <puts@plt>
lea    0x101c(%rip),%rdi
call   1050 <puts@plt>
mov    %r12,%rdi
call   1050 <puts@plt>
mov    %r13,%rdi
call   10a0 <printf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1100 <scanf@plt>
mov    0x4(%rsp),%eax
add    $0xffffffff,%eax
cmp    $0xd,%eax
ja     1260 <main+0x40>
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
mov    %r15,%rdi
call   1040 <read_from_file@plt>
mov    %rax,%r15
mov    %rax,%rdi
call   1120 <class_print@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   10b0 <write_to_file@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   1120 <class_print@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   1110 <print_head@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   1080 <tail_print@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   1130 <name_search_print@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   10e0 <print_nth@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   10f0 <student_statistics@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   10d0 <assignment_statistics@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   1060 <update_assignments@plt>
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   1140 <add_student@plt>
mov    %rax,%r15
jmp    1260 <main+0x40>
mov    %r15,%rdi
call   1070 <remove_student@plt>
mov    %rax,%r15
jmp    1260 <main+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xbde(%rip),%rdi
call   1090 <system@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.student = type { i32 }
@.str = [6 x i8] c"clear\00"
@.str.1 = [37 x i8] c"----------Gradebook Menu----------\0A\0A\00"
@.str.2 = [57 x i8] c"Please note: Some functions will require pressing enter \00"
@.str.3 = [50 x i8] c"multiple times\0Ain order to return to this menu.\0A\0A\00"
@.str.4 = [36 x i8] c"------------Read Write------------\0A\00"
@.str.5 = [31 x i8] c"1 -- Load Gradebook from File\0A\00"
@.str.6 = [39 x i8] c"2 -- Write Current Gradebook to File\0A\0A\00"
@.str.7 = [36 x i8] c"-------View Grades Statistics-----\0A\00"
@.str.8 = [28 x i8] c"3 -- View Entire Gradebook\0A\00"
@.str.9 = [55 x i8] c"4 -- View the First Student's Information/Assignments\0A\00"
@.str.10 = [54 x i8] c"5 -- View the Last Student's Information/Assignments\0A\00"
@.str.11 = [62 x i8] c"6 -- View a Student's Information/Assignments by Name Search\0A\00"
@.str.12 = [54 x i8] c"7 -- View the n'th Student's Information/Assignments\0A\00"
@.str.13 = [43 x i8] c"8 -- View a specific Student's Statistics\0A\00"
@.str.14 = [48 x i8] c"9 -- View a specific Assignment's Statistics\0A\0A\00"
@.str.15 = [36 x i8] c"------------Add Grades------------\0A\00"
@.str.16 = [45 x i8] c"10-- Add Assignment/s & Grade/s to Student\0A\0A\00"
@.str.17 = [36 x i8] c"---------Add Remove Students------\0A\00"
@.str.18 = [24 x i8] c"11-- Add a New Student\0A\00"
@.str.19 = [24 x i8] c"12-- Remove a Student\0A\0A\00"
@.str.20 = [36 x i8] c"-----------Extra Functions--------\0A\00"
@.str.21 = [50 x i8] c"13-- Display the Number of Students in the Class\0A\00"
@.str.22 = [20 x i8] c"14-- Exit Program\0A\0A\00"
@.str.23 = [18 x i8] c"Enter Selection: \00"
@.str.24 = [3 x i8] c"%d\00"
@.str.25 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.student*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1, i32* %6
store %struct.student* null, %struct.student** %7
br label %9
9: ; preds = %81, %2
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %82
12: ; preds = %9
%13 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.3, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.5, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.6, i64 0, i64 0))
%20 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.7, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.8, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.9, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.10, i64 0, i64 0))
%24 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.11, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.12, i64 0, i64 0))
%26 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.13, i64 0, i64 0))
%27 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.14, i64 0, i64 0))
%28 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.15, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.16, i64 0, i64 0))
%30 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0))
%31 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.18, i64 0, i64 0))
%32 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.19, i64 0, i64 0))
%33 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.20, i64 0, i64 0))
%34 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.21, i64 0, i64 0))
%35 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0))
%36 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.23, i64 0, i64 0))
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0), i32* %8)
%38 = load i32, i32* %8
switch i32 %38, label %81 [
i32 1, label %39
i32 2, label %44
i32 3, label %47
i32 4, label %50
i32 5, label %53
i32 6, label %56
i32 7, label %59
i32 8, label %62
i32 9, label %65
i32 10, label %68
i32 11, label %71
i32 12, label %74
i32 13, label %77
i32 14, label %80
]
39: ; preds = %12
%40 = load %struct.student*, %struct.student** %7
%41 = call %struct.student* @read_from_file(%struct.student* %40)
store %struct.student* %41, %struct.student** %7
%42 = load %struct.student*, %struct.student** %7
%43 = call i32 @class_print(%struct.student* %42)
br label %81
44: ; preds = %12
%45 = load %struct.student*, %struct.student** %7
%46 = call i32 @write_to_file(%struct.student* %45)
br label %81
47: ; preds = %12
%48 = load %struct.student*, %struct.student** %7
%49 = call i32 @class_print(%struct.student* %48)
br label %81
50: ; preds = %12
%51 = load %struct.student*, %struct.student** %7
%52 = call i32 @print_head(%struct.student* %51)
br label %81
53: ; preds = %12
%54 = load %struct.student*, %struct.student** %7
%55 = call i32 @tail_print(%struct.student* %54)
br label %81
56: ; preds = %12
%57 = load %struct.student*, %struct.student** %7
%58 = call i32 @name_search_print(%struct.student* %57)
br label %81
59: ; preds = %12
%60 = load %struct.student*, %struct.student** %7
%61 = call i32 @print_nth(%struct.student* %60)
br label %81
62: ; preds = %12
%63 = load %struct.student*, %struct.student** %7
%64 = call i32 @student_statistics(%struct.student* %63)
br label %81
65: ; preds = %12
%66 = load %struct.student*, %struct.student** %7
%67 = call i32 @assignment_statistics(%struct.student* %66)
br label %81
68: ; preds = %12
%69 = load %struct.student*, %struct.student** %7
%70 = call i32 @update_assignments(%struct.student* %69)
br label %81
71: ; preds = %12
%72 = load %struct.student*, %struct.student** %7
%73 = call %struct.student* @add_student(%struct.student* %72)
store %struct.student* %73, %struct.student** %7
br label %81
74: ; preds = %12
%75 = load %struct.student*, %struct.student** %7
%76 = call %struct.student* @remove_student(%struct.student* %75)
store %struct.student* %76, %struct.student** %7
br label %81
77: ; preds = %12
%78 = load %struct.student*, %struct.student** %7
%79 = call i32 @num_students(%struct.student* %78)
br label %81
80: ; preds = %12
store i32 0, i32* %6
br label %81
81: ; preds = %12, %80, %77, %74, %71, %68, %65, %62, %59, %56, %53, %50, %47, %44, %39
br label %9
82: ; preds = %9
%83 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i64 0, i64 0))
%84 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.student = type { i32 }
@.str = [6 x i8] c"clear\00"
@.str.2 = [57 x i8] c"Please note: Some functions will require pressing enter \00"
@.str.23 = [18 x i8] c"Enter Selection: \00"
@.str.24 = [3 x i8] c"%d\00"
@str = [36 x i8] c"----------Gradebook Menu----------\0A\00"
@str.26 = [49 x i8] c"multiple times\0Ain order to return to this menu.\0A\00"
@str.27 = [35 x i8] c"------------Read Write------------\00"
@str.28 = [30 x i8] c"1 -- Load Gradebook from File\00"
@str.29 = [38 x i8] c"2 -- Write Current Gradebook to File\0A\00"
@str.30 = [35 x i8] c"-------View Grades Statistics-----\00"
@str.31 = [27 x i8] c"3 -- View Entire Gradebook\00"
@str.32 = [54 x i8] c"4 -- View the First Student's Information/Assignments\00"
@str.33 = [53 x i8] c"5 -- View the Last Student's Information/Assignments\00"
@str.34 = [61 x i8] c"6 -- View a Student's Information/Assignments by Name Search\00"
@str.35 = [53 x i8] c"7 -- View the n'th Student's Information/Assignments\00"
@str.36 = [42 x i8] c"8 -- View a specific Student's Statistics\00"
@str.37 = [47 x i8] c"9 -- View a specific Assignment's Statistics\0A\00"
@str.38 = [35 x i8] c"------------Add Grades------------\00"
@str.39 = [44 x i8] c"10-- Add Assignment/s & Grade/s to Student\0A\00"
@str.40 = [35 x i8] c"---------Add Remove Students------\00"
@str.41 = [23 x i8] c"11-- Add a New Student\00"
@str.42 = [23 x i8] c"12-- Remove a Student\0A\00"
@str.43 = [35 x i8] c"-----------Extra Functions--------\00"
@str.44 = [49 x i8] c"13-- Display the Number of Students in the Class\00"
@str.45 = [19 x i8] c"14-- Exit Program\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
br label %5
5: ; preds = %60, %2
%6 = phi %struct.student* [ null, %2 ], [ %61, %60 ]
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.26, i64 0, i64 0))
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.27, i64 0, i64 0))
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.28, i64 0, i64 0))
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.29, i64 0, i64 0))
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.30, i64 0, i64 0))
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.31, i64 0, i64 0))
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str.32, i64 0, i64 0))
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.33, i64 0, i64 0))
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str.34, i64 0, i64 0))
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.35, i64 0, i64 0))
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.36, i64 0, i64 0))
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.37, i64 0, i64 0))
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.38, i64 0, i64 0))
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.39, i64 0, i64 0))
%24 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.40, i64 0, i64 0))
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.41, i64 0, i64 0))
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.42, i64 0, i64 0))
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.43, i64 0, i64 0))
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.44, i64 0, i64 0))
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.45, i64 0, i64 0))
%30 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.23, i64 0, i64 0))
%31 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.24, i64 0, i64 0), i32* %3)
%32 = load i32, i32* %3
switch i32 %32, label %60 [
i32 1, label %33
i32 2, label %36
i32 3, label %38
i32 4, label %40
i32 5, label %42
i32 6, label %44
i32 7, label %46
i32 8, label %48
i32 9, label %50
i32 10, label %52
i32 11, label %54
i32 12, label %56
i32 13, label %58
i32 14, label %62
]
33: ; preds = %5
%34 = call %struct.student* @read_from_file(%struct.student* %6)
%35 = call i32 @class_print(%struct.student* %34)
br label %60
36: ; preds = %5
%37 = call i32 @write_to_file(%struct.student* %6)
br label %60
38: ; preds = %5
%39 = call i32 @class_print(%struct.student* %6)
br label %60
40: ; preds = %5
%41 = call i32 @print_head(%struct.student* %6)
br label %60
42: ; preds = %5
%43 = call i32 @tail_print(%struct.student* %6)
br label %60
44: ; preds = %5
%45 = call i32 @name_search_print(%struct.student* %6)
br label %60
46: ; preds = %5
%47 = call i32 @print_nth(%struct.student* %6)
br label %60
48: ; preds = %5
%49 = call i32 @student_statistics(%struct.student* %6)
br label %60
50: ; preds = %5
%51 = call i32 @assignment_statistics(%struct.student* %6)
br label %60
52: ; preds = %5
%53 = call i32 @update_assignments(%struct.student* %6)
br label %60
54: ; preds = %5
%55 = call %struct.student* @add_student(%struct.student* %6)
br label %60
56: ; preds = %5
%57 = call %struct.student* @remove_student(%struct.student* %6)
br label %60
58: ; preds = %5
%59 = call i32 @num_students(%struct.student* %6)
br label %60
60: ; preds = %5, %58, %56, %54, %52, %50, %48, %46, %44, %42, %40, %38, %36, %33
%61 = phi %struct.student* [ %6, %5 ], [ %6, %58 ], [ %57, %56 ], [ %55, %54 ], [ %6, %52 ], [ %6, %50 ], [ %6, %48 ], [ %6, %46 ], [ %6, %44 ], [ %6, %42 ], [ %6, %40 ], [ %6, %38 ], [ %6, %36 ], [ %34, %33 ]
br label %5
62: ; preds = %5
%63 = call i32 @putchar(i32 10)
%64 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}