#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int in;
  scanf("%d", &in);
  if (in >= 90)
    printf("A");
  else if (in >= 80)
    printf("B");
  else if (in >= 70)
    printf("C");
  else
    printf("D");
  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>
cmpl   $0x5a,-0x14(%rbp)
jl     1161 <main+0x41>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    11ad <main+0x8d>
cmpl   $0x50,-0x14(%rbp)
jl     117c <main+0x5c>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
jmp    11a8 <main+0x88>
cmpl   $0x46,-0x14(%rbp)
jl     1197 <main+0x77>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
jmp    11a3 <main+0x83>
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
jmp    11a8 <main+0x88>
jmp    11ad <main+0x8d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    $0x41,%edi
cmp    $0x59,%eax
jg     1159 <main+0x39>
mov    $0x42,%edi
cmp    $0x4f,%eax
jg     1159 <main+0x39>
xor    %ecx,%ecx
cmp    $0x46,%eax
setge  %cl
mov    $0x44,%edi
sub    %ecx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"C\00"
@.str.4 = [2 x i8] c"D\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
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%8 = load i32, i32* %6
%9 = icmp sge i32 %8, 90
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %26
12: ; preds = %2
%13 = load i32, i32* %6
%14 = icmp sge i32 %13, 80
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %25
17: ; preds = %12
%18 = load i32, i32* %6
%19 = icmp sge i32 %18, 70
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %24
22: ; preds = %17
%23 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
br label %25
25: ; preds = %24, %15
br label %26
26: ; preds = %25, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 89
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = icmp sgt i32 %6, 79
br i1 %9, label %13, label %10
10: ; preds = %8
%11 = icmp sgt i32 %6, 69
%12 = select i1 %11, i32 67, i32 68
br label %13
13: ; preds = %10, %8, %2
%14 = phi i32 [ 65, %2 ], [ 66, %8 ], [ %12, %10 ]
%15 = call i32 @putchar(i32 %14)
ret i32 0
}