#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *);
scalar_t__ scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int s;
  while (scanf("%d", &s) != EOF) {
    if (s > 100 || s < 0)
      printf("Score is error!\n");
    else if (s >= 90)
      printf("A\n");
    else if (s >= 80)
      printf("B\n");
    else if (s >= 70)
      printf("C\n");
    else if (s >= 60)
      printf("D\n");
    else {
      printf("E\n");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e9b(%rip),%rcx
cmp    (%rcx),%rax
je     120c <main+0xec>
cmpl   $0x64,-0x14(%rbp)
jg     116a <main+0x4a>
cmpl   $0x0,-0x14(%rbp)
jge    117b <main+0x5b>
lea    0xe92(%rip),%rdi
call   1030 <printf@plt>
jmp    1207 <main+0xe7>
cmpl   $0x5a,-0x14(%rbp)
jl     1196 <main+0x76>
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
jmp    1202 <main+0xe2>
cmpl   $0x50,-0x14(%rbp)
jl     11b1 <main+0x91>
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
jmp    11fd <main+0xdd>
cmpl   $0x46,-0x14(%rbp)
jl     11cc <main+0xac>
lea    0xe58(%rip),%rdi
call   1030 <printf@plt>
jmp    11f8 <main+0xd8>
cmpl   $0x3c,-0x14(%rbp)
jl     11e7 <main+0xc7>
lea    0xe40(%rip),%rdi
call   1030 <printf@plt>
jmp    11f3 <main+0xd3>
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
jmp    11f8 <main+0xd8>
jmp    11fd <main+0xdd>
jmp    1202 <main+0xe2>
jmp    1207 <main+0xe7>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2ea5(%rip),%r15
cmp    (%r15),%rax
jne    1159 <main+0x39>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xead(%rip),%r12
lea    0xe99(%rip),%r14
lea    0x4(%rsp),%rbx
lea    0xe98(%rip),%r13
lea    0xe8f(%rip),%rbp
jmp    1195 <main+0x75>
nopl   0x0(%rax)
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r15),%rax
je     1148 <main+0x28>
mov    0x4(%rsp),%eax
mov    %r12,%rdi
cmp    $0x64,%eax
ja     1180 <main+0x60>
mov    %r13,%rdi
cmp    $0x59,%eax
ja     1180 <main+0x60>
mov    %rbp,%rdi
cmp    $0x4f,%eax
ja     1180 <main+0x60>
lea    0xe4f(%rip),%rdi
cmp    $0x45,%eax
ja     1180 <main+0x60>
lea    0xe41(%rip),%rdi
cmp    $0x3c,%eax
jae    1180 <main+0x60>
lea    0xe33(%rip),%rdi
jmp    1180 <main+0x60>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [17 x i8] c"Score is error!\0A\00"
@.str.2 = [3 x i8] c"A\0A\00"
@.str.3 = [3 x i8] c"B\0A\00"
@.str.4 = [3 x i8] c"C\0A\00"
@.str.5 = [3 x i8] c"D\0A\00"
@.str.6 = [3 x i8] c"E\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %45, %2
%8 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%9 = load i64, i64* @EOF
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %46
11: ; preds = %7
%12 = load i32, i32* %6
%13 = icmp sgt i32 %12, 100
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %6
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %14, %11
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %45
19: ; preds = %14
%20 = load i32, i32* %6
%21 = icmp sge i32 %20, 90
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %44
24: ; preds = %19
%25 = load i32, i32* %6
%26 = icmp sge i32 %25, 80
br i1 %26, label %27, label %29
27: ; preds = %24
%28 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %43
29: ; preds = %24
%30 = load i32, i32* %6
%31 = icmp sge i32 %30, 70
br i1 %31, label %32, label %34
32: ; preds = %29
%33 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %42
34: ; preds = %29
%35 = load i32, i32* %6
%36 = icmp sge i32 %35, 60
br i1 %36, label %37, label %39
37: ; preds = %34
%38 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0))
br label %41
39: ; preds = %34
%40 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
br label %41
41: ; preds = %39, %37
br label %42
42: ; preds = %41, %32
br label %43
43: ; preds = %42, %27
br label %44
44: ; preds = %43, %22
br label %45
45: ; preds = %44, %17
br label %7
46: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@str = [2 x i8] c"E\00"
@str.7 = [2 x i8] c"D\00"
@str.8 = [2 x i8] c"C\00"
@str.9 = [2 x i8] c"B\00"
@str.10 = [2 x i8] c"A\00"
@str.11 = [16 x i8] c"Score is error!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %26, label %8
8: ; preds = %2, %20
%9 = load i32, i32* %3
%10 = icmp ugt i32 %9, 100
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = icmp ugt i32 %9, 89
br i1 %12, label %20, label %13
13: ; preds = %11
%14 = icmp ugt i32 %9, 79
br i1 %14, label %20, label %15
15: ; preds = %13
%16 = icmp ugt i32 %9, 69
br i1 %16, label %20, label %17
17: ; preds = %15
%18 = icmp ugt i32 %9, 59
%19 = select i1 %18, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0)
br label %20
20: ; preds = %17, %15, %13, %11, %8
%21 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.11, i64 0, i64 0), %8 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.10, i64 0, i64 0), %11 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.9, i64 0, i64 0), %13 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0), %15 ], [ %19, %17 ]
%22 = call i32 @puts(i8* dereferenceable(1) %21)
%23 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%24 = load i64, i64* @EOF
%25 = icmp eq i64 %23, %24
br i1 %25, label %26, label %8
26: ; preds = %20, %2
ret i32 0
}