#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 /*<<< orphan*/ exit(int);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char *, char *);
int main() {
  char response[50];
  setbuf(stdout, NULL);
  setbuf(stdin, NULL);
  setbuf(stderr, NULL);
  puts("Discrete.");
  puts("The top math track.");
  puts("The best BCA students.");
  puts("The crème de la crème.");
  puts("We have high expectations.");
  puts("Answer all the questions correctly.");
  puts("Do not disappoint us.");
  printf("> ");
  gets(response);
  if (strcmp(response, "i will get an A")) {
    puts("I'm sorry, but you obviously don't care about grades.");
    puts("Therefore, you aren't motivated enough to be in our class.");
    puts("Goodbye.");
    exit(1);
  }
  puts("Your quiz have been posted to Schoology.");
  puts("You have twenty minutes.");
  puts("Good luck.");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <setbuf@plt>
mov    0x2e67(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <setbuf@plt>
mov    0x2e45(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <setbuf@plt>
lea    0xe5b(%rip),%rdi
call   1030 <puts@plt>
lea    0xe59(%rip),%rdi
call   1030 <puts@plt>
lea    0xe61(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6c(%rip),%rdi
call   1030 <puts@plt>
lea    0xe79(%rip),%rdi
call   1030 <puts@plt>
lea    0xe88(%rip),%rdi
call   1030 <puts@plt>
lea    0xea0(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaa(%rip),%rdi
call   1050 <printf@plt>
lea    -0x40(%rbp),%rdi
call   1070 <gets@plt>
lea    -0x40(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     124f <main+0xef>
lea    0xe8e(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
mov    0x2e4c(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <setbuf@plt>
lea    0xe64(%rip),%rdi
call   1030 <puts@plt>
lea    0xe62(%rip),%rdi
call   1030 <puts@plt>
lea    0xe6a(%rip),%rdi
call   1030 <puts@plt>
lea    0xe75(%rip),%rdi
call   1030 <puts@plt>
lea    0xe82(%rip),%rdi
call   1030 <puts@plt>
lea    0xe91(%rip),%rdi
call   1030 <puts@plt>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb3(%rip),%rdi
call   1050 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1070 <gets@plt>
lea    0xe9f(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    1240 <main+0xe0>
lea    0xf15(%rip),%rdi
call   1030 <puts@plt>
lea    0xf32(%rip),%rdi
call   1030 <puts@plt>
lea    0xf3f(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret
lea    0xe6f(%rip),%rdi
call   1030 <puts@plt>
lea    0xe99(%rip),%rdi
call   1030 <puts@plt>
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@stdin = global i32 0
@stderr = global i32 0
@.str = [10 x i8] c"Discrete.\00"
@.str.1 = [20 x i8] c"The top math track.\00"
@.str.2 = [23 x i8] c"The best BCA students.\00"
@.str.3 = [25 x i8] c"The cr\C3\A8me de la cr\C3\A8me.\00"
@.str.4 = [27 x i8] c"We have high expectations.\00"
@.str.5 = [36 x i8] c"Answer all the questions correctly.\00"
@.str.6 = [22 x i8] c"Do not disappoint us.\00"
@.str.7 = [3 x i8] c"> \00"
@.str.8 = [16 x i8] c"i will get an A\00"
@.str.9 = [54 x i8] c"I'm sorry, but you obviously don't care about grades.\00"
@.str.10 = [59 x i8] c"Therefore, you aren't motivated enough to be in our class.\00"
@.str.11 = [9 x i8] c"Goodbye.\00"
@.str.12 = [41 x i8] c"Your quiz have been posted to Schoology.\00"
@.str.13 = [25 x i8] c"You have twenty minutes.\00"
@.str.14 = [11 x i8] c"Good luck.\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = load i32, i32* @stdout
%3 = call i32 @setbuf(i32 %2, i32* null)
%4 = load i32, i32* @stdin
%5 = call i32 @setbuf(i32 %4, i32* null)
%6 = load i32, i32* @stderr
%7 = call i32 @setbuf(i32 %6, i32* null)
%8 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%16 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%17 = call i32 @gets(i8* %16)
%18 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%19 = call i64 @strcmp(i8* %18, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %26
21: ; preds = %0
%22 = call i32 @puts(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.9, i64 0, i64 0))
%23 = call i32 @puts(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0))
%24 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %0
%27 = call i32 @puts(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0))
%28 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0))
%29 = call i32 @puts(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@stdin = global i32 0
@stderr = global i32 0
@.str = [10 x i8] c"Discrete.\00"
@.str.1 = [20 x i8] c"The top math track.\00"
@.str.2 = [23 x i8] c"The best BCA students.\00"
@.str.3 = [25 x i8] c"The cr\C3\A8me de la cr\C3\A8me.\00"
@.str.4 = [27 x i8] c"We have high expectations.\00"
@.str.5 = [36 x i8] c"Answer all the questions correctly.\00"
@.str.6 = [22 x i8] c"Do not disappoint us.\00"
@.str.7 = [3 x i8] c"> \00"
@.str.8 = [16 x i8] c"i will get an A\00"
@.str.9 = [54 x i8] c"I'm sorry, but you obviously don't care about grades.\00"
@.str.10 = [59 x i8] c"Therefore, you aren't motivated enough to be in our class.\00"
@.str.11 = [9 x i8] c"Goodbye.\00"
@.str.12 = [41 x i8] c"Your quiz have been posted to Schoology.\00"
@.str.13 = [25 x i8] c"You have twenty minutes.\00"
@.str.14 = [11 x i8] c"Good luck.\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdout
%4 = tail call i32 @setbuf(i32 %3, i32* null)
%5 = load i32, i32* @stdin
%6 = tail call i32 @setbuf(i32 %5, i32* null)
%7 = load i32, i32* @stderr
%8 = tail call i32 @setbuf(i32 %7, i32* null)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0))
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.5, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%16 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%17 = call i32 @gets(i8* %2)
%18 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %25, label %20
20: ; preds = %0
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.9, i64 0, i64 0))
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.10, i64 0, i64 0))
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%24 = call i32 @exit(i32 1)
unreachable
25: ; preds = %0
%26 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.12, i64 0, i64 0))
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0))
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0))
ret i32 0
}