int main() {
  float w[100];
  float q[100];
  float t[100];
  float p[100];
  float e[100];
  float total[100];
  char grade[100][3];
  char name[100][40];
  char specificName[40];
  int found;
  char filename[40] = {"student.dat"};
  char filename2[40] = {"analysis.dat"};
  int ReadInput;
  int loop = 0;
  ReadInput = read(filename, name, w, q, t, p, e);
  if (ReadInput == 0) {
    computeTotal(w, q, t, p, e, total);
    computeGrades(total, grade);
    display(name, w, q, t, p, e, total, grade);
    printf("\n");
    displayReport(grade);
    printf("\n");
    displayDistribution(total, grade);
    printf("\n");
    while (loop == 0) {
      printf("Please enter the student's name you are looking for, or 'close' "
             "to close the program: ");
      scanf(" %[^\n]", specificName);
      if (strcmp(specificName, "close") == 0) {
        loop = 1;
        break;
      }
      found = search(name, specificName);
      if (found != -1) {
        printf("%s got %s\n", name[found], grade[found]);
      } else {
        printf("Error, student not found!\n");
      }
      memset(specificName, '\0', 40);
      found = -1;
    }
    write(filename2, name, w, q, t, p, e, total, grade);
  } else if (ReadInput == -1)
    printf("Error reading the file!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1af0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1aa0(%rbp),%rdi
lea    0xe10(%rip),%rsi
mov    $0x28,%edx
call   10c0 <memcpy@plt>
lea    -0x1ad0(%rbp),%rdi
lea    0xe28(%rip),%rsi
mov    $0x28,%edx
call   10c0 <memcpy@plt>
movl   $0x0,-0x1ad8(%rbp)
lea    -0x1aa0(%rbp),%rdi
lea    -0x1a40(%rbp),%rsi
lea    -0x1a0(%rbp),%rdx
lea    -0x330(%rbp),%rcx
lea    -0x4c0(%rbp),%r8
lea    -0x650(%rbp),%r9
lea    -0x7e0(%rbp),%rax
mov    %rax,(%rsp)
mov    $0x0,%al
call   10a0 <read@plt>
mov    %eax,-0x1ad4(%rbp)
cmpl   $0x0,-0x1ad4(%rbp)
jne    148f <main+0x2bf>
lea    -0x1a0(%rbp),%rdi
lea    -0x330(%rbp),%rsi
lea    -0x4c0(%rbp),%rdx
lea    -0x650(%rbp),%rcx
lea    -0x7e0(%rbp),%r8
lea    -0x970(%rbp),%r9
mov    $0x0,%al
call   1050 <computeTotal@plt>
lea    -0x970(%rbp),%rdi
lea    -0xaa0(%rbp),%rsi
mov    $0x0,%al
call   10f0 <computeGrades@plt>
lea    -0x1a40(%rbp),%rdi
lea    -0x1a0(%rbp),%rsi
lea    -0x330(%rbp),%rdx
lea    -0x4c0(%rbp),%rcx
lea    -0x650(%rbp),%r8
lea    -0x7e0(%rbp),%r9
lea    -0x970(%rbp),%r10
lea    -0xaa0(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1040 <display@plt>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0xaa0(%rbp),%rdi
mov    $0x0,%al
call   1080 <displayReport@plt>
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x970(%rbp),%rdi
lea    -0xaa0(%rbp),%rsi
mov    $0x0,%al
call   10d0 <displayDistribution@plt>
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x1ad8(%rbp)
jne    1436 <main+0x266>
lea    0xcfe(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x1a70(%rbp),%rsi
lea    0xd40(%rip),%rdi
mov    $0x0,%al
call   10e0 <scanf@plt>
lea    -0x1a70(%rbp),%rdi
lea    0xd32(%rip),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%eax
jne    13a1 <main+0x1d1>
movl   $0x1,-0x1ad8(%rbp)
jmp    1436 <main+0x266>
lea    -0x1a40(%rbp),%rdi
lea    -0x1a70(%rbp),%rsi
mov    $0x0,%al
call   1070 <search@plt>
mov    %eax,-0x1a74(%rbp)
cmpl   $0xffffffff,-0x1a74(%rbp)
je     1406 <main+0x236>
movslq -0x1a74(%rbp),%rax
lea    -0x1a40(%rbp),%rsi
imul   $0x28,%rax,%rax
add    %rax,%rsi
movslq -0x1a74(%rbp),%rax
lea    -0xaa0(%rbp),%rdx
imul   $0x3,%rax,%rax
add    %rax,%rdx
lea    0xcc2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    1414 <main+0x244>
lea    0xcba(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x1a70(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1090 <memset@plt>
movl   $0xffffffff,-0x1a74(%rbp)
ff ff ff
jmp    1346 <main+0x176>
lea    -0x1ad0(%rbp),%rdi
lea    -0x1a40(%rbp),%rsi
lea    -0x1a0(%rbp),%rdx
lea    -0x330(%rbp),%rcx
lea    -0x4c0(%rbp),%r8
lea    -0x650(%rbp),%r9
lea    -0x7e0(%rbp),%r11
lea    -0x970(%rbp),%r10
lea    -0xaa0(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1030 <write@plt>
jmp    14af <main+0x2df>
cmpl   $0xffffffff,-0x1ad4(%rbp)
jne    14aa <main+0x2da>
lea    0xc3f(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    14af <main+0x2df>
xor    %eax,%eax
add    $0x1af0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1ac8,%rsp
movaps 0xe38(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xe1c(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movq   $0x0,0x80(%rsp)
movaps 0xe44(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe28(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movq   $0x0,0x50(%rsp)
sub    $0x8,%rsp
lea    0x358(%rsp),%rbp
lea    0x68(%rsp),%rdi
lea    0xb28(%rsp),%rsi
lea    0x808(%rsp),%rdx
lea    0x678(%rsp),%rcx
lea    0x1c8(%rsp),%r8
lea    0x4e8(%rsp),%r9
xor    %eax,%eax
push   %rbp
call   10b0 <read@plt>
add    $0x10,%rsp
cmp    $0xffffffff,%eax
je     1407 <main+0x247>
test   %eax,%eax
jne    146c <main+0x2ac>
lea    0x800(%rsp),%r12
lea    0x670(%rsp),%r13
lea    0x1c0(%rsp),%rdx
lea    0x4e0(%rsp),%r15
lea    0x350(%rsp),%r14
lea    0x990(%rsp),%rbp
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r15,%rcx
mov    %r14,%r8
mov    %rbp,%r9
xor    %eax,%eax
call   1070 <computeTotal@plt>
lea    0x90(%rsp),%rbx
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10e0 <computeGrades@plt>
lea    0xb20(%rsp),%rdi
mov    %r12,%rsi
mov    %r13,%rdx
lea    0x1c0(%rsp),%rcx
mov    %r15,%r8
mov    %r14,%r9
xor    %eax,%eax
push   %rbx
push   %rbp
call   1060 <display@plt>
add    $0x10,%rsp
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   10a0 <displayReport@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10c0 <displayDistribution@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xd2c(%rip),%rdi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xd75(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   10d0 <scanf@plt>
mov    $0x736f6c63,%ebp
mov    (%rsp),%eax
xor    %ebp,%eax
movzwl 0x4(%rsp),%ecx
xor    $0x65,%ecx
or     %eax,%ecx
je     1415 <main+0x255>
lea    0xb20(%rsp),%r13
mov    %rsp,%rbx
lea    0xce8(%rip),%r14
lea    0xd38(%rip),%r15
lea    0xd3e(%rip),%r12
jmp    13c9 <main+0x209>
lea    0xd58(%rip),%rdi
call   1040 <puts@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movq   $0x0,0x20(%rsp)
mov    %r14,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   10d0 <scanf@plt>
mov    (%rsp),%eax
xor    %ebp,%eax
movzwl 0x4(%rsp),%ecx
xor    $0x65,%ecx
or     %eax,%ecx
je     1415 <main+0x255>
mov    %r13,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1090 <search@plt>
cmp    $0xffffffff,%eax
je     1380 <main+0x1c0>
cltq
lea    (%rax,%rax,4),%rcx
lea    (%rsp,%rcx,8),%rsi
add    $0xb20,%rsi
lea    (%rax,%rax,2),%rax
lea    (%rsp,%rax,1),%rdx
add    $0x90,%rdx
mov    %r12,%rdi
xor    %eax,%eax
call   1080 <printf@plt>
jmp    138c <main+0x1cc>
lea    0xcb9(%rip),%rdi
call   1040 <puts@plt>
jmp    146c <main+0x2ac>
sub    $0x8,%rsp
lea    0x38(%rsp),%rdi
lea    0xb28(%rsp),%rsi
lea    0x808(%rsp),%rdx
lea    0x678(%rsp),%rcx
lea    0x1c8(%rsp),%r8
lea    0x4e8(%rsp),%r9
xor    %eax,%eax
lea    0x98(%rsp),%rbp
push   %rbp
lea    0x9a0(%rsp),%rbp
push   %rbp
lea    0x368(%rsp),%rbp
push   %rbp
call   1050 <write@plt>
add    $0x20,%rsp
xor    %eax,%eax
add    $0x1ac8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.filename = [40 x i8] c"student.dat\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.filename2 = [40 x i8] c"analysis.dat\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [2 x i8] c"\0A\00"
@.str.1 = [87 x i8] c"Please enter the student's name you are looking for, or 'close' to close the program: \00"
@.str.2 = [7 x i8] c" %[^\0A]\00"
@.str.3 = [6 x i8] c"close\00"
@.str.4 = [11 x i8] c"%s got %s\0A\00"
@.str.5 = [27 x i8] c"Error, student not found!\0A\00"
@.str.6 = [25 x i8] c"Error reading the file!\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x float]
%3 = alloca [100 x float]
%4 = alloca [100 x float]
%5 = alloca [100 x float]
%6 = alloca [100 x float]
%7 = alloca [100 x float]
%8 = alloca [100 x [3 x i8]]
%9 = alloca [100 x [40 x i8]]
%10 = alloca [40 x i8]
%11 = alloca i32
%12 = alloca [40 x i8]
%13 = alloca [40 x i8]
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %1
%16 = bitcast [40 x i8]* %12 to i8*
%17 = bitcast [40 x i8]* %13 to i8*
store i32 0, i32* %15
%18 = getelementptr inbounds [40 x i8], [40 x i8]* %12, i64 0, i64 0
%19 = getelementptr inbounds [100 x [40 x i8]], [100 x [40 x i8]]* %9, i64 0, i64 0
%20 = getelementptr inbounds [100 x float], [100 x float]* %2, i64 0, i64 0
%21 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 0
%22 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 0
%23 = getelementptr inbounds [100 x float], [100 x float]* %5, i64 0, i64 0
%24 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%25 = call i32 (i8*, [40 x i8]*, float*, float*, float*, float*, float*, ...) bitcast (i32 (...)* @read to i32 (i8*, [40 x i8]*, float*, float*, float*, float*, float*, ...)*)(i8* %18, [40 x i8]* %19, float* %20, float* %21, float* %22, float* %23, float* %24)
store i32 %25, i32* %14
%26 = load i32, i32* %14
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %98
28: ; preds = %0
%29 = getelementptr inbounds [100 x float], [100 x float]* %2, i64 0, i64 0
%30 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 0
%31 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 0
%32 = getelementptr inbounds [100 x float], [100 x float]* %5, i64 0, i64 0
%33 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%34 = getelementptr inbounds [100 x float], [100 x float]* %7, i64 0, i64 0
%35 = call i32 (float*, float*, float*, float*, float*, float*, ...) bitcast (i32 (...)* @computeTotal to i32 (float*, float*, float*, float*, float*, float*, ...)*)(float* %29, float* %30, float* %31, float* %32, float* %33, float* %34)
%36 = getelementptr inbounds [100 x float], [100 x float]* %7, i64 0, i64 0
%37 = getelementptr inbounds [100 x [3 x i8]], [100 x [3 x i8]]* %8, i64 0, i64 0
%38 = call i32 (float*, [3 x i8]*, ...) bitcast (i32 (...)* @computeGrades to i32 (float*, [3 x i8]*, ...)*)(float* %36, [3 x i8]* %37)
%39 = getelementptr inbounds [100 x [40 x i8]], [100 x [40 x i8]]* %9, i64 0, i64 0
%40 = getelementptr inbounds [100 x float], [100 x float]* %2, i64 0, i64 0
%41 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 0
%42 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 0
%43 = getelementptr inbounds [100 x float], [100 x float]* %5, i64 0, i64 0
%44 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%45 = getelementptr inbounds [100 x float], [100 x float]* %7, i64 0, i64 0
%46 = getelementptr inbounds [100 x [3 x i8]], [100 x [3 x i8]]* %8, i64 0, i64 0
%47 = call i32 ([40 x i8]*, float*, float*, float*, float*, float*, float*, [3 x i8]*, ...) bitcast (i32 (...)* @display to i32 ([40 x i8]*, float*, float*, float*, float*, float*, float*, [3 x i8]*, ...)*)([40 x i8]* %39, float* %40, float* %41, float* %42, float* %43, float* %44, float* %45, [3 x i8]* %46)
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%49 = getelementptr inbounds [100 x [3 x i8]], [100 x [3 x i8]]* %8, i64 0, i64 0
%50 = call i32 ([3 x i8]*, ...) bitcast (i32 (...)* @displayReport to i32 ([3 x i8]*, ...)*)([3 x i8]* %49)
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%52 = getelementptr inbounds [100 x float], [100 x float]* %7, i64 0, i64 0
%53 = getelementptr inbounds [100 x [3 x i8]], [100 x [3 x i8]]* %8, i64 0, i64 0
%54 = call i32 (float*, [3 x i8]*, ...) bitcast (i32 (...)* @displayDistribution to i32 (float*, [3 x i8]*, ...)*)(float* %52, [3 x i8]* %53)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %56
56: ; preds = %85, %28
%57 = load i32, i32* %15
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %87
59: ; preds = %56
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.1, i64 0, i64 0))
%61 = getelementptr inbounds [40 x i8], [40 x i8]* %10, i64 0, i64 0
%62 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %61)
%63 = getelementptr inbounds [40 x i8], [40 x i8]* %10, i64 0, i64 0
%64 = call i32 @strcmp(i8* %63, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %67
66: ; preds = %59
store i32 1, i32* %15
br label %87
67: ; preds = %59
%68 = getelementptr inbounds [100 x [40 x i8]], [100 x [40 x i8]]* %9, i64 0, i64 0
%69 = getelementptr inbounds [40 x i8], [40 x i8]* %10, i64 0, i64 0
%70 = call i32 ([40 x i8]*, i8*, ...) bitcast (i32 (...)* @search to i32 ([40 x i8]*, i8*, ...)*)([40 x i8]* %68, i8* %69)
store i32 %70, i32* %11
%71 = load i32, i32* %11
%72 = icmp ne i32 %71, -1
br i1 %72, label %73, label %83
73: ; preds = %67
%74 = load i32, i32* %11
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [100 x [40 x i8]], [100 x [40 x i8]]* %9, i64 0, i64 %75
%77 = getelementptr inbounds [40 x i8], [40 x i8]* %76, i64 0, i64 0
%78 = load i32, i32* %11
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [100 x [3 x i8]], [100 x [3 x i8]]* %8, i64 0, i64 %79
%81 = getelementptr inbounds [3 x i8], [3 x i8]* %80, i64 0, i64 0
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %77, i8* %81)
br label %85
83: ; preds = %67
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0))
br label %85
85: ; preds = %83, %73
%86 = getelementptr inbounds [40 x i8], [40 x i8]* %10, i64 0, i64 0
store i32 -1, i32* %11
br label %56
87: ; preds = %66, %56
%88 = getelementptr inbounds [40 x i8], [40 x i8]* %13, i64 0, i64 0
%89 = getelementptr inbounds [100 x [40 x i8]], [100 x [40 x i8]]* %9, i64 0, i64 0
%90 = getelementptr inbounds [100 x float], [100 x float]* %2, i64 0, i64 0
%91 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 0
%92 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 0
%93 = getelementptr inbounds [100 x float], [100 x float]* %5, i64 0, i64 0
%94 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%95 = getelementptr inbounds [100 x float], [100 x float]* %7, i64 0, i64 0
%96 = getelementptr inbounds [100 x [3 x i8]], [100 x [3 x i8]]* %8, i64 0, i64 0
%97 = call i32 (i8*, [40 x i8]*, float*, float*, float*, float*, float*, float*, [3 x i8]*, ...) bitcast (i32 (...)* @write to i32 (i8*, [40 x i8]*, float*, float*, float*, float*, float*, float*, [3 x i8]*, ...)*)(i8* %88, [40 x i8]* %89, float* %90, float* %91, float* %92, float* %93, float* %94, float* %95, [3 x i8]* %96)
br label %104
98: ; preds = %0
%99 = load i32, i32* %14
%100 = icmp eq i32 %99, -1
br i1 %100, label %101, label %103
101: ; preds = %98
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
br label %103
103: ; preds = %101, %98
br label %104
104: ; preds = %103, %87
ret i32 0
}

LLVM IR (-O2):
@__const.main.filename = [40 x i8] c"student.dat\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.filename2 = [40 x i8] c"analysis.dat\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str.1 = [87 x i8] c"Please enter the student's name you are looking for, or 'close' to close the program: \00"
@.str.2 = [7 x i8] c" %[^\0A]\00"
@.str.3 = [6 x i8] c"close\00"
@.str.4 = [11 x i8] c"%s got %s\0A\00"
@str = [24 x i8] c"Error reading the file!\00"
@str.7 = [26 x i8] c"Error, student not found!\00"
define i32 @main() {
%1 = alloca [100 x float]
%2 = alloca [100 x float]
%3 = alloca [100 x float]
%4 = alloca [100 x float]
%5 = alloca [100 x float]
%6 = alloca [100 x float]
%7 = alloca [100 x [3 x i8]]
%8 = alloca [100 x [40 x i8]]
%9 = alloca [40 x i8]
%10 = alloca [40 x i8]
%11 = alloca [40 x i8]
%12 = bitcast [100 x float]* %1 to i8*
%13 = bitcast [100 x float]* %2 to i8*
%14 = bitcast [100 x float]* %3 to i8*
%15 = bitcast [100 x float]* %4 to i8*
%16 = bitcast [100 x float]* %5 to i8*
%17 = bitcast [100 x float]* %6 to i8*
%18 = getelementptr inbounds [100 x [3 x i8]], [100 x [3 x i8]]* %7, i64 0, i64 0, i64 0
%19 = getelementptr inbounds [100 x [40 x i8]], [100 x [40 x i8]]* %8, i64 0, i64 0, i64 0
%20 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 0
%21 = getelementptr inbounds [40 x i8], [40 x i8]* %10, i64 0, i64 0
%22 = getelementptr inbounds [40 x i8], [40 x i8]* %11, i64 0, i64 0
%23 = getelementptr inbounds [100 x [40 x i8]], [100 x [40 x i8]]* %8, i64 0, i64 0
%24 = getelementptr inbounds [100 x float], [100 x float]* %1, i64 0, i64 0
%25 = getelementptr inbounds [100 x float], [100 x float]* %2, i64 0, i64 0
%26 = getelementptr inbounds [100 x float], [100 x float]* %3, i64 0, i64 0
%27 = getelementptr inbounds [100 x float], [100 x float]* %4, i64 0, i64 0
%28 = getelementptr inbounds [100 x float], [100 x float]* %5, i64 0, i64 0
%29 = call i32 (i8*, [40 x i8]*, float*, float*, float*, float*, float*, ...) bitcast (i32 (...)* @read to i32 (i8*, [40 x i8]*, float*, float*, float*, float*, float*, ...)*)(i8* %21, [40 x i8]* %23, float* %24, float* %25, float* %26, float* %27, float* %28)
switch i32 %29, label %64 [
i32 0, label %30
i32 -1, label %62
]
30: ; preds = %0
%31 = getelementptr inbounds [100 x float], [100 x float]* %6, i64 0, i64 0
%32 = call i32 (float*, float*, float*, float*, float*, float*, ...) bitcast (i32 (...)* @computeTotal to i32 (float*, float*, float*, float*, float*, float*, ...)*)(float* %24, float* %25, float* %26, float* %27, float* %28, float* %31)
%33 = getelementptr inbounds [100 x [3 x i8]], [100 x [3 x i8]]* %7, i64 0, i64 0
%34 = call i32 (float*, [3 x i8]*, ...) bitcast (i32 (...)* @computeGrades to i32 (float*, [3 x i8]*, ...)*)(float* %31, [3 x i8]* %33)
%35 = call i32 ([40 x i8]*, float*, float*, float*, float*, float*, float*, [3 x i8]*, ...) bitcast (i32 (...)* @display to i32 ([40 x i8]*, float*, float*, float*, float*, float*, float*, [3 x i8]*, ...)*)([40 x i8]* %23, float* %24, float* %25, float* %26, float* %27, float* %28, float* %31, [3 x i8]* %33)
%36 = call i32 @putchar(i32 10)
%37 = call i32 ([3 x i8]*, ...) bitcast (i32 (...)* @displayReport to i32 ([3 x i8]*, ...)*)([3 x i8]* %33)
%38 = call i32 @putchar(i32 10)
%39 = call i32 (float*, [3 x i8]*, ...) bitcast (i32 (...)* @displayDistribution to i32 (float*, [3 x i8]*, ...)*)(float* %31, [3 x i8]* %33)
%40 = call i32 @putchar(i32 10)
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @.str.1, i64 0, i64 0))
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %20)
%43 = call i32 @bcmp(i8* dereferenceable(6) %20, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 6)
%44 = icmp eq i32 %43, 0
br i1 %44, label %60, label %45
45: ; preds = %30, %55
%46 = call i32 ([40 x i8]*, i8*, ...) bitcast (i32 (...)* @search to i32 ([40 x i8]*, i8*, ...)*)([40 x i8]* %23, i8* %20)
%47 = icmp eq i32 %46, -1
br i1 %47, label %53, label %48
48: ; preds = %45
%49 = sext i32 %46 to i64
%50 = getelementptr inbounds [100 x [40 x i8]], [100 x [40 x i8]]* %8, i64 0, i64 %49, i64 0
%51 = getelementptr inbounds [100 x [3 x i8]], [100 x [3 x i8]]* %7, i64 0, i64 %49, i64 0
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* %50, i8* %51)
br label %55
53: ; preds = %45
%54 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.7, i64 0, i64 0))
br label %55
55: ; preds = %53, %48
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @.str.1, i64 0, i64 0))
%57 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %20)
%58 = call i32 @bcmp(i8* dereferenceable(6) %20, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 6)
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %45
60: ; preds = %55, %30
%61 = call i32 (i8*, [40 x i8]*, float*, float*, float*, float*, float*, float*, [3 x i8]*, ...) bitcast (i32 (...)* @write to i32 (i8*, [40 x i8]*, float*, float*, float*, float*, float*, float*, [3 x i8]*, ...)*)(i8* %22, [40 x i8]* %23, float* %24, float* %25, float* %26, float* %27, float* %28, float* %31, [3 x i8]* %33)
br label %64
62: ; preds = %0
%63 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %64
64: ; preds = %0, %62, %60
ret i32 0
}