#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 *, char *, int *);
int main() {
  char m;
  int n, a, b;
  scanf("%c %d", &m, &n);
  if (m == 'A' || m == 'a' || m == 'B' || m == 'b' || m == 'C' || m == 'c' ||
      m == 'D' || m == 'd' || m == 'E' || m == 'e') {
    a = n / 100;
    switch (a) {
    case 1:
      printf("Bahan Monitor ");
      break;
    case 2:
      printf("Bahan Monitor ");
      break;
    case 3:
      printf("Bahan Monitor ");
      break;
    case 4:
      printf("Bahan Motherboard ");
      break;
    case 5:
      printf("Bahan Motherboard ");
      break;
    case 6:
      printf("Bahan Motherboard ");
      break;
    case 8:
      printf("Bahan Mouse ");
      break;
    case 7:
      printf("Bahan Mouse ");
      break;
    case 9:
      printf("Bahan Mouse ");
      break;
    }
    b = n % 100;
    if (b > 50) {
      printf("Lokal ");
    } else {
      printf("Impor ");
    }
    printf("Kualitas ");
    switch (m) {
    case 'A':
      printf("Super\n");
      break;
    case 'a':
      printf("Super\n");
      break;
    case 'B':
      printf("Bagus\n");
      break;
    case 'b':
      printf("Bagus\n");
      break;
    case 'C':
      printf("Normal\n");
      break;
    case 'c':
      printf("Normal\n");
      break;
    case 'D':
      printf("Kurang Bagus\n");
      break;
    case 'd':
      printf("Kurang Bagus\n");
      break;
    case 'E':
      printf("Buruk\n");
      break;
    case 'e':
      printf("Buruk\n");
      break;
    }
  } else {
    printf("Bukan Produk Yang Dibutuhkan !\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf82(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
je     11c5 <main+0xa5>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
je     11c5 <main+0xa5>
movsbl -0x5(%rbp),%eax
cmp    $0x42,%eax
je     11c5 <main+0xa5>
movsbl -0x5(%rbp),%eax
cmp    $0x62,%eax
je     11c5 <main+0xa5>
movsbl -0x5(%rbp),%eax
cmp    $0x43,%eax
je     11c5 <main+0xa5>
movsbl -0x5(%rbp),%eax
cmp    $0x63,%eax
je     11c5 <main+0xa5>
movsbl -0x5(%rbp),%eax
cmp    $0x44,%eax
je     11c5 <main+0xa5>
movsbl -0x5(%rbp),%eax
cmp    $0x64,%eax
je     11c5 <main+0xa5>
movsbl -0x5(%rbp),%eax
cmp    $0x45,%eax
je     11c5 <main+0xa5>
movsbl -0x5(%rbp),%eax
cmp    $0x65,%eax
jne    13b2 <main+0x292>
movslq -0xc(%rbp),%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x8,%eax
ja     129d <main+0x17d>
mov    -0x20(%rbp),%rax
lea    0xe00(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    129d <main+0x17d>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    129d <main+0x17d>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    129d <main+0x17d>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
jmp    129d <main+0x17d>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
jmp    129d <main+0x17d>
lea    0xe68(%rip),%rdi
call   1030 <printf@plt>
jmp    129d <main+0x17d>
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
jmp    129d <main+0x17d>
lea    0xe59(%rip),%rdi
call   1030 <printf@plt>
jmp    129d <main+0x17d>
lea    0xe48(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
cmpl   $0x32,-0x14(%rbp)
jle    12c6 <main+0x1a6>
lea    0xe31(%rip),%rdi
call   1030 <printf@plt>
jmp    12d2 <main+0x1b2>
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
lea    0xe22(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x5(%rbp),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x24,%eax
ja     13ad <main+0x28d>
mov    -0x28(%rbp),%rax
lea    0xd25(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xdf6(%rip),%rdi
call   1030 <printf@plt>
jmp    13ad <main+0x28d>
lea    0xde5(%rip),%rdi
call   1030 <printf@plt>
jmp    13ad <main+0x28d>
lea    0xdea(%rip),%rdi
call   1030 <printf@plt>
jmp    13ad <main+0x28d>
lea    0xdd9(%rip),%rdi
call   1030 <printf@plt>
jmp    13ad <main+0x28d>
lea    0xdb9(%rip),%rdi
call   1030 <printf@plt>
jmp    13ad <main+0x28d>
lea    0xda8(%rip),%rdi
call   1030 <printf@plt>
jmp    13ad <main+0x28d>
lea    0xd9f(%rip),%rdi
call   1030 <printf@plt>
jmp    13ad <main+0x28d>
lea    0xd8e(%rip),%rdi
call   1030 <printf@plt>
jmp    13ad <main+0x28d>
lea    0xd8b(%rip),%rdi
call   1030 <printf@plt>
jmp    13ad <main+0x28d>
lea    0xd7a(%rip),%rdi
call   1030 <printf@plt>
jmp    13be <main+0x29e>
lea    0xd70(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf80(%rip),%rdi
lea    0x3(%rsp),%rsi
lea    0x4(%rsp),%rdx
call   1050 <scanf@plt>
lea    0xfb7(%rip),%rdi
mov    0x3(%rsp),%al
add    $0xbf,%al
cmp    $0x24,%al
ja     1233 <main+0x103>
movzbl %al,%eax
movabs $0x1f0000001f,%rcx
bt     %rax,%rcx
jae    1233 <main+0x103>
movslq 0x4(%rsp),%rax
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
sar    $0x25,%rcx
shr    $0x3f,%rax
add    %ecx,%eax
add    $0xffffffff,%eax
cmp    $0x8,%eax
ja     11a9 <main+0x79>
cltq
lea    0xef7(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1040 <printf@plt>
movslq 0x4(%rsp),%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
cmp    $0x33,%eax
lea    0xf1c(%rip),%rax
lea    0xf1c(%rip),%rdi
cmovge %rax,%rdi
call   1040 <printf@plt>
lea    0xf13(%rip),%rdi
call   1040 <printf@plt>
movsbl 0x3(%rsp),%eax
add    $0xffffffbf,%eax
cmp    $0x24,%eax
ja     1238 <main+0x108>
lea    0xf3d(%rip),%rdi
lea    0xdf8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xf19(%rip),%rdi
jmp    1233 <main+0x103>
lea    0xf16(%rip),%rdi
jmp    1233 <main+0x103>
lea    0xf00(%rip),%rdi
jmp    1233 <main+0x103>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%c %d\00"
@.str.1 = [15 x i8] c"Bahan Monitor \00"
@.str.2 = [19 x i8] c"Bahan Motherboard \00"
@.str.3 = [13 x i8] c"Bahan Mouse \00"
@.str.4 = [7 x i8] c"Lokal \00"
@.str.5 = [7 x i8] c"Impor \00"
@.str.6 = [10 x i8] c"Kualitas \00"
@.str.7 = [7 x i8] c"Super\0A\00"
@.str.8 = [7 x i8] c"Bagus\0A\00"
@.str.9 = [8 x i8] c"Normal\0A\00"
@.str.10 = [14 x i8] c"Kurang Bagus\0A\00"
@.str.11 = [7 x i8] c"Buruk\0A\00"
@.str.12 = [32 x i8] c"Bukan Produk Yang Dibutuhkan !\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %2, i32* %3)
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 65
br i1 %9, label %46, label %10
10: ; preds = %0
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 97
br i1 %13, label %46, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 66
br i1 %17, label %46, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 98
br i1 %21, label %46, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 67
br i1 %25, label %46, label %26
26: ; preds = %22
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 99
br i1 %29, label %46, label %30
30: ; preds = %26
%31 = load i8, i8* %2
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 68
br i1 %33, label %46, label %34
34: ; preds = %30
%35 = load i8, i8* %2
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 100
br i1 %37, label %46, label %38
38: ; preds = %34
%39 = load i8, i8* %2
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 69
br i1 %41, label %46, label %42
42: ; preds = %38
%43 = load i8, i8* %2
%44 = sext i8 %43 to i32
%45 = icmp eq i32 %44, 101
br i1 %45, label %46, label %102
46: ; preds = %42, %38, %34, %30, %26, %22, %18, %14, %10, %0
%47 = load i32, i32* %3
%48 = sdiv i32 %47, 100
store i32 %48, i32* %4
%49 = load i32, i32* %4
switch i32 %49, label %68 [
i32 1, label %50
i32 2, label %52
i32 3, label %54
i32 4, label %56
i32 5, label %58
i32 6, label %60
i32 8, label %62
i32 7, label %64
i32 9, label %66
]
50: ; preds = %46
%51 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %68
52: ; preds = %46
%53 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %68
54: ; preds = %46
%55 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %68
56: ; preds = %46
%57 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %68
58: ; preds = %46
%59 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %68
60: ; preds = %46
%61 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
br label %68
62: ; preds = %46
%63 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %68
64: ; preds = %46
%65 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %68
66: ; preds = %46
%67 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %68
68: ; preds = %46, %66, %64, %62, %60, %58, %56, %54, %52, %50
%69 = load i32, i32* %3
%70 = srem i32 %69, 100
store i32 %70, i32* %5
%71 = load i32, i32* %5
%72 = icmp sgt i32 %71, 50
br i1 %72, label %73, label %75
73: ; preds = %68
%74 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %77
75: ; preds = %68
%76 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %77
77: ; preds = %75, %73
%78 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%79 = load i8, i8* %2
%80 = sext i8 %79 to i32
switch i32 %80, label %101 [
i32 65, label %81
i32 97, label %83
i32 66, label %85
i32 98, label %87
i32 67, label %89
i32 99, label %91
i32 68, label %93
i32 100, label %95
i32 69, label %97
i32 101, label %99
]
81: ; preds = %77
%82 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %101
83: ; preds = %77
%84 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
br label %101
85: ; preds = %77
%86 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %101
87: ; preds = %77
%88 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %101
89: ; preds = %77
%90 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %101
91: ; preds = %77
%92 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
br label %101
93: ; preds = %77
%94 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %101
95: ; preds = %77
%96 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.10, i64 0, i64 0))
br label %101
97: ; preds = %77
%98 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
br label %101
99: ; preds = %77
%100 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
br label %101
101: ; preds = %77, %99, %97, %95, %93, %91, %89, %87, %85, %83, %81
br label %104
102: ; preds = %42
%103 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0))
br label %104
104: ; preds = %102, %101
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%c %d\00"
@.str.1 = [15 x i8] c"Bahan Monitor \00"
@.str.2 = [19 x i8] c"Bahan Motherboard \00"
@.str.3 = [13 x i8] c"Bahan Mouse \00"
@.str.4 = [7 x i8] c"Lokal \00"
@.str.5 = [7 x i8] c"Impor \00"
@.str.6 = [10 x i8] c"Kualitas \00"
@str = [31 x i8] c"Bukan Produk Yang Dibutuhkan !\00"
@str.14 = [6 x i8] c"Buruk\00"
@str.16 = [13 x i8] c"Kurang Bagus\00"
@str.18 = [7 x i8] c"Normal\00"
@str.20 = [6 x i8] c"Bagus\00"
@str.22 = [6 x i8] c"Super\00"
@reltable.main = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.1 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.1 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.1 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.2 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.2 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([19 x i8]* @.str.2 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32)]
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %2)
%5 = load i8, i8* %1
switch i8 %5, label %34 [
i8 101, label %6
i8 100, label %6
i8 99, label %6
i8 98, label %6
i8 97, label %6
i8 69, label %6
i8 68, label %6
i8 67, label %6
i8 66, label %6
i8 65, label %6
]
6: ; preds = %0, %0, %0, %0, %0, %0, %0, %0, %0, %0
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 100
%9 = add nsw i32 %8, -1
%10 = icmp ult i32 %9, 9
br i1 %10, label %11, label %16
11: ; preds = %6
%12 = sext i32 %9 to i64
%13 = shl i64 %12, 2
%14 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.main to i8*), i64 %13)
%15 = call i32 @printf(i8* dereferenceable(1) %14)
br label %16
16: ; preds = %6, %11
%17 = load i32, i32* %2
%18 = srem i32 %17, 100
%19 = icmp sgt i32 %18, 50
%20 = select i1 %19, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0)
%21 = call i32 @printf(i8* dereferenceable(1) %20)
%22 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%23 = load i8, i8* %1
%24 = sext i8 %23 to i32
switch i32 %24, label %37 [
i32 65, label %34
i32 97, label %25
i32 66, label %26
i32 98, label %27
i32 67, label %28
i32 99, label %29
i32 68, label %30
i32 100, label %31
i32 69, label %32
i32 101, label %33
]
25: ; preds = %16
br label %34
26: ; preds = %16
br label %34
27: ; preds = %16
br label %34
28: ; preds = %16
br label %34
29: ; preds = %16
br label %34
30: ; preds = %16
br label %34
31: ; preds = %16
br label %34
32: ; preds = %16
br label %34
33: ; preds = %16
br label %34
34: ; preds = %0, %16, %33, %32, %31, %30, %29, %28, %27, %26, %25
%35 = phi i8* [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.22, i64 0, i64 0), %25 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.20, i64 0, i64 0), %26 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.20, i64 0, i64 0), %27 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.18, i64 0, i64 0), %28 ], [ getelementptr inbounds ([7 x i8], [7 x i8]* @str.18, i64 0, i64 0), %29 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @str.16, i64 0, i64 0), %30 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @str.16, i64 0, i64 0), %31 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.14, i64 0, i64 0), %32 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.14, i64 0, i64 0), %33 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @str.22, i64 0, i64 0), %16 ], [ getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0), %0 ]
%36 = call i32 @puts(i8* dereferenceable(1) %35)
br label %37
37: ; preds = %34, %16
ret i32 0
}