#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 score;
  printf("please input:\n");
  scanf("%d", &score);
  if (score >= 60) {
    printf("ok\n");
  } else {
    printf("sorry\n");
  }
  switch (score / 10) {
  case 10:
  case 9:
    printf("优秀\n");
    break;
  case 8:
    printf("良好\n");
    break;
  case 7:
    printf("还行\n");
    break;
  case 6:
    printf("及格\n");
    break;
  default:
    printf("不及格\n");
  }
}


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    0xed7(%rip),%rdi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x3c,-0x14(%rbp)
jl     116d <main+0x4d>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
jmp    1179 <main+0x59>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
movslq -0x14(%rbp),%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
sar    $0x22,%rcx
mov    %ecx,%edx
shr    $0x3f,%rax
mov    %eax,%ecx
mov    %edx,%eax
lea    -0x6(%rax,%rcx,1),%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x4,%eax
ja     1200 <main+0xe0>
mov    -0x20(%rbp),%rax
lea    0xe4d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
jmp    120c <main+0xec>
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
jmp    120c <main+0xec>
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
jmp    120c <main+0xec>
lea    0xe56(%rip),%rdi
call   1030 <printf@plt>
jmp    120c <main+0xec>
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%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>
cmpl   $0x3c,0x4(%rsp)
lea    0xeec(%rip),%rax
lea    0xec0(%rip),%rdi
cmovge %rax,%rdi
call   1030 <puts@plt>
movslq 0x4(%rsp),%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
sar    $0x22,%rcx
shr    $0x3f,%rax
add    %ecx,%eax
add    $0xfffffffa,%eax
cmp    $0x4,%eax
ja     118d <main+0x6d>
cltq
lea    0xeb8(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
jmp    1194 <main+0x74>
lea    0xe98(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"please input:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"ok\0A\00"
@.str.3 = [7 x i8] c"sorry\0A\00"
@.str.4 = [8 x i8] c"\E4\BC\98\E7\A7\80\0A\00"
@.str.5 = [8 x i8] c"\E8\89\AF\E5\A5\BD\0A\00"
@.str.6 = [8 x i8] c"\E8\BF\98\E8\A1\8C\0A\00"
@.str.7 = [8 x i8] c"\E5\8F\8A\E6\A0\BC\0A\00"
@.str.8 = [11 x i8] c"\E4\B8\8D\E5\8F\8A\E6\A0\BC\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
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%9 = load i32, i32* %6
%10 = icmp sge i32 %9, 60
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
%16 = load i32, i32* %6
%17 = sdiv i32 %16, 10
switch i32 %17, label %26 [
i32 10, label %18
i32 9, label %18
i32 8, label %20
i32 7, label %22
i32 6, label %24
]
18: ; preds = %15, %15
%19 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %28
20: ; preds = %15
%21 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %28
22: ; preds = %15
%23 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %28
24: ; preds = %15
%25 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
br label %28
26: ; preds = %15
%27 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
br label %28
28: ; preds = %26, %24, %22, %20, %18
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [14 x i8] c"please input:\00"
@str.9 = [6 x i8] c"sorry\00"
@str.10 = [7 x i8] c"\E5\8F\8A\E6\A0\BC\00"
@str.11 = [7 x i8] c"\E8\BF\98\E8\A1\8C\00"
@str.12 = [7 x i8] c"\E8\89\AF\E5\A5\BD\00"
@str.13 = [7 x i8] c"\E4\BC\98\E7\A7\80\00"
@str.14 = [10 x i8] c"\E4\B8\8D\E5\8F\8A\E6\A0\BC\00"
@str.15 = [3 x i8] c"ok\00"
@reltable.main = [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.10 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.11 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.12 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.13 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @str.13 to i64), i64 ptrtoint ([5 x i32]* @reltable.main to i64)) to i32)]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 59
%9 = select i1 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.15, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str.9, i64 0, i64 0)
%10 = call i32 @puts(i8* dereferenceable(1) %9)
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 10
%13 = add nsw i32 %12, -6
%14 = icmp ult i32 %13, 5
br i1 %14, label %15, label %19
15: ; preds = %2
%16 = sext i32 %13 to i64
%17 = shl i64 %16, 2
%18 = call i8* @llvm.load.relative.i64(i8* bitcast ([5 x i32]* @reltable.main to i8*), i64 %17)
br label %19
19: ; preds = %2, %15
%20 = phi i8* [ %18, %15 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.14, i64 0, i64 0), %2 ]
%21 = call i32 @puts(i8* dereferenceable(1) %20)
ret i32 0
}