#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 */

/* Variables and functions */
int InputInfo(char **, char **);
int /*<<< orphan*/ OutputInfo(char **, char **, int *);
int /*<<< orphan*/ RandomCall(char **, char **, int *);
int /*<<< orphan*/ SumScore(char **, char **, int *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  char stuName[100][20];
  char stuID[100][10];
  int stuScore[100];
  int stuAbsentNum[100] = {0};
  int stuNum, courseHours, i;
  stuNum = InputInfo(stuName, stuID);
  printf("Please input the number of lessons. \n");
  scanf("%d", &courseHours);
  for (i = 0; i < courseHours; i++) {
    RandomCall(stuName, stuID, stuAbsentNum);
  }
  SumScore(stuName, stuID, stuAbsentNum);
  OutputInfo(stuName, stuID, stuScore);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf00,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xef0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1070 <memset@plt>
lea    -0x7e0(%rbp),%rdi
lea    -0xbd0(%rbp),%rsi
call   1050 <InputInfo@plt>
mov    %eax,-0xef4(%rbp)
lea    0xe4b(%rip),%rdi
call   1060 <printf@plt>
lea    0xe65(%rip),%rdi
lea    -0xef8(%rbp),%rsi
call   1090 <scanf@plt>
movl   $0x0,-0xefc(%rbp)
mov    -0xefc(%rbp),%eax
cmp    -0xef8(%rbp),%eax
jge    1217 <main+0xa7>
lea    -0x7e0(%rbp),%rdi
lea    -0xbd0(%rbp),%rsi
lea    -0xef0(%rbp),%rdx
call   1040 <RandomCall@plt>
mov    -0xefc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xefc(%rbp)
jmp    11d7 <main+0x67>
lea    -0x7e0(%rbp),%rdi
lea    -0xbd0(%rbp),%rsi
lea    -0xef0(%rbp),%rdx
call   1080 <SumScore@plt>
lea    -0x7e0(%rbp),%rdi
lea    -0xbd0(%rbp),%rsi
lea    -0xd60(%rbp),%rdx
call   1030 <OutputInfo@plt>
xor    %eax,%eax
add    $0xf00,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xef8,%rsp
lea    0x10(%rsp),%rdi
xor    %ebp,%ebp
mov    $0x190,%edx
xor    %esi,%esi
call   1070 <memset@plt>
lea    0x720(%rsp),%rdi
lea    0x1a0(%rsp),%rsi
call   1060 <InputInfo@plt>
lea    0xe57(%rip),%rdi
call   1040 <puts@plt>
lea    0xe48(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1090 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11f7 <main+0x87>
lea    0x720(%rsp),%r14
lea    0x1a0(%rsp),%r15
lea    0x10(%rsp),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1050 <RandomCall@plt>
add    $0x1,%ebp
cmp    0xc(%rsp),%ebp
jl     11e0 <main+0x70>
lea    0x720(%rsp),%rbx
lea    0x1a0(%rsp),%r14
lea    0x10(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1080 <SumScore@plt>
lea    0x590(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <OutputInfo@plt>
xor    %eax,%eax
add    $0xef8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Please input the number of lessons. \0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x [20 x i8]]
%3 = alloca [100 x [10 x i8]]
%4 = alloca [100 x i32]
%5 = alloca [100 x i32]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = bitcast [100 x i32]* %5 to i8*
%10 = getelementptr inbounds [100 x [20 x i8]], [100 x [20 x i8]]* %2, i64 0, i64 0
%11 = bitcast [20 x i8]* %10 to i8**
%12 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %3, i64 0, i64 0
%13 = bitcast [10 x i8]* %12 to i8**
%14 = call i32 @InputInfo(i8** %11, i8** %13)
store i32 %14, i32* %6
%15 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %7)
store i32 0, i32* %8
br label %17
17: ; preds = %28, %0
%18 = load i32, i32* %8
%19 = load i32, i32* %7
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %31
21: ; preds = %17
%22 = getelementptr inbounds [100 x [20 x i8]], [100 x [20 x i8]]* %2, i64 0, i64 0
%23 = bitcast [20 x i8]* %22 to i8**
%24 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %3, i64 0, i64 0
%25 = bitcast [10 x i8]* %24 to i8**
%26 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 0
%27 = call i32 @RandomCall(i8** %23, i8** %25, i32* %26)
br label %28
28: ; preds = %21
%29 = load i32, i32* %8
%30 = add nsw i32 %29, 1
store i32 %30, i32* %8
br label %17
31: ; preds = %17
%32 = getelementptr inbounds [100 x [20 x i8]], [100 x [20 x i8]]* %2, i64 0, i64 0
%33 = bitcast [20 x i8]* %32 to i8**
%34 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %3, i64 0, i64 0
%35 = bitcast [10 x i8]* %34 to i8**
%36 = getelementptr inbounds [100 x i32], [100 x i32]* %5, i64 0, i64 0
%37 = call i32 @SumScore(i8** %33, i8** %35, i32* %36)
%38 = getelementptr inbounds [100 x [20 x i8]], [100 x [20 x i8]]* %2, i64 0, i64 0
%39 = bitcast [20 x i8]* %38 to i8**
%40 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %3, i64 0, i64 0
%41 = bitcast [10 x i8]* %40 to i8**
%42 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%43 = call i32 @OutputInfo(i8** %39, i8** %41, i32* %42)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [37 x i8] c"Please input the number of lessons. \00"
define i32 @main() {
%1 = alloca [100 x [20 x i8]]
%2 = alloca [100 x [10 x i8]]
%3 = alloca [100 x i32]
%4 = alloca [100 x i32]
%5 = alloca i32
%6 = getelementptr inbounds [100 x [20 x i8]], [100 x [20 x i8]]* %1, i64 0, i64 0, i64 0
%7 = getelementptr inbounds [100 x [10 x i8]], [100 x [10 x i8]]* %2, i64 0, i64 0, i64 0
%8 = bitcast [100 x i32]* %3 to i8*
%9 = bitcast [100 x i32]* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = bitcast [100 x [20 x i8]]* %1 to i8**
%12 = bitcast [100 x [10 x i8]]* %2 to i8**
%13 = call i32 @InputInfo(i8** %11, i8** %12)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%16 = load i32, i32* %5
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %26
18: ; preds = %0
%19 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
br label %20
20: ; preds = %18, %20
%21 = phi i32 [ 0, %18 ], [ %23, %20 ]
%22 = call i32 @RandomCall(i8** %11, i8** %12, i32* %19)
%23 = add nuw nsw i32 %21, 1
%24 = load i32, i32* %5
%25 = icmp slt i32 %23, %24
br i1 %25, label %20, label %26
26: ; preds = %20, %0
%27 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%28 = call i32 @SumScore(i8** %11, i8** %12, i32* %27)
%29 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 0
%30 = call i32 @OutputInfo(i8** %11, i8** %12, i32* %29)
ret i32 0
}