#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 *);
void main() {
  int score;
  printf("Please input the score between 0 and 100:\n");
  scanf("%d", &score);
  (score >= 90)   ? (printf("A\n"))
  : (score >= 60) ? (printf("B\n"))
                  : printf("C\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x5a,-0x4(%rbp)
jl     115f <main+0x3f>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
jmp    118f <main+0x6f>
cmpl   $0x3c,-0x4(%rbp)
jl     117d <main+0x5d>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    %eax,-0x8(%rbp)
jmp    118c <main+0x6c>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedb(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x3c,%eax
lea    0xee3(%rip),%rcx
lea    0xeda(%rip),%rdx
cmovge %rcx,%rdx
cmp    $0x5a,%eax
lea    0xed0(%rip),%rdi
cmovl  %rdx,%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [43 x i8] c"Please input the score between 0 and 100:\0A\00"
@.str.1 = [3 x i8] c"%d\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"
define void @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sge i32 %4, 90
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %17
8: ; preds = %0
%9 = load i32, i32* %1
%10 = icmp sge i32 %9, 60
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %15
13: ; preds = %8
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
%16 = phi i32 [ %12, %11 ], [ %14, %13 ]
br label %17
17: ; preds = %15, %6
%18 = phi i32 [ %7, %6 ], [ %16, %15 ]
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [42 x i8] c"Please input the score between 0 and 100:\00"
@str.5 = [2 x i8] c"C\00"
@str.6 = [2 x i8] c"B\00"
@str.7 = [2 x i8] c"A\00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 89
%7 = icmp sgt i32 %5, 59
%8 = select i1 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.5, i64 0, i64 0)
%9 = select i1 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.7, i64 0, i64 0), i8* %8
%10 = call i32 @puts(i8* dereferenceable(1) %9)
ret void
}