#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 rs;
  scanf("%d", &rs);
  int r = rs / 10;
  int s = rs % 10;
  switch (s) {
  case 1:
    printf("Faint signals, barely perceptible, ");
    break;
  case 2:
    printf("Very weak signals, ");
    break;
  case 3:
    printf("Weak signals, ");
    break;
  case 4:
    printf("Fair signals, ");
    break;
  case 5:
    printf("Fairly good signals, ");
    break;
  case 6:
    printf("Good signals, ");
    break;
  case 7:
    printf("Moderately strong signals, ");
    break;
  case 8:
    printf("Strong signals, ");
    break;
  case 9:
    printf("Extremely strong signals, ");
  }
  switch (r) {
  case 1:
    printf("unreadable.");
    break;
  case 2:
    printf("barely readable, occasional words distinguishable.");
    break;
  case 3:
    printf("readable with considerable difficulty.");
    break;
  case 4:
    printf("readable with practically no difficulty.");
    break;
  case 5:
    printf("perfectly readable.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf02(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movslq -0x8(%rbp),%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
movslq -0x8(%rbp),%rcx
mov    %ecx,%eax
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rdx
add    %ecx,%edx
add    %edx,%edx
mov    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x8,%eax
ja     123d <main+0x11d>
mov    -0x18(%rbp),%rax
lea    0xe60(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
jmp    123d <main+0x11d>
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
jmp    123d <main+0x11d>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
jmp    123d <main+0x11d>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    123d <main+0x11d>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    123d <main+0x11d>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    123d <main+0x11d>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
jmp    123d <main+0x11d>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
jmp    123d <main+0x11d>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x4,%eax
ja     12b6 <main+0x196>
mov    -0x20(%rbp),%rax
lea    0xdc7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
jmp    12b6 <main+0x196>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    12b6 <main+0x196>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
jmp    12b6 <main+0x196>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
jmp    12b6 <main+0x196>
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rcx
imul   $0x66666667,%rcx,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x22,%rbx
add    %eax,%ebx
lea    (%rbx,%rbx,1),%eax
lea    (%rax,%rax,4),%eax
not    %eax
add    %ecx,%eax
cmp    $0x8,%eax
ja     1173 <main+0x53>
cltq
lea    0x1005(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
cmp    $0x4,%ebx
ja     1191 <main+0x71>
movslq %ebx,%rax
lea    0x100b(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [36 x i8] c"Faint signals, barely perceptible, \00"
@.str.2 = [20 x i8] c"Very weak signals, \00"
@.str.3 = [15 x i8] c"Weak signals, \00"
@.str.4 = [15 x i8] c"Fair signals, \00"
@.str.5 = [22 x i8] c"Fairly good signals, \00"
@.str.6 = [15 x i8] c"Good signals, \00"
@.str.7 = [28 x i8] c"Moderately strong signals, \00"
@.str.8 = [17 x i8] c"Strong signals, \00"
@.str.9 = [27 x i8] c"Extremely strong signals, \00"
@.str.10 = [12 x i8] c"unreadable.\00"
@.str.11 = [51 x i8] c"barely readable, occasional words distinguishable.\00"
@.str.12 = [39 x i8] c"readable with considerable difficulty.\00"
@.str.13 = [41 x i8] c"readable with practically no difficulty.\00"
@.str.14 = [20 x i8] c"perfectly readable.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 10
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = srem i32 %8, 10
store i32 %9, i32* %4
%10 = load i32, i32* %4
switch i32 %10, label %29 [
i32 1, label %11
i32 2, label %13
i32 3, label %15
i32 4, label %17
i32 5, label %19
i32 6, label %21
i32 7, label %23
i32 8, label %25
i32 9, label %27
]
11: ; preds = %0
%12 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %29
13: ; preds = %0
%14 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %29
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
br label %29
17: ; preds = %0
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
br label %29
19: ; preds = %0
%20 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %29
21: ; preds = %0
%22 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0))
br label %29
23: ; preds = %0
%24 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0))
br label %29
25: ; preds = %0
%26 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0))
br label %29
27: ; preds = %0
%28 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0))
br label %29
29: ; preds = %27, %0, %25, %23, %21, %19, %17, %15, %13, %11
%30 = load i32, i32* %3
switch i32 %30, label %41 [
i32 1, label %31
i32 2, label %33
i32 3, label %35
i32 4, label %37
i32 5, label %39
]
31: ; preds = %29
%32 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0))
br label %41
33: ; preds = %29
%34 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.11, i64 0, i64 0))
br label %41
35: ; preds = %29
%36 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.12, i64 0, i64 0))
br label %41
37: ; preds = %29
%38 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.13, i64 0, i64 0))
br label %41
39: ; preds = %29
%40 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0))
br label %41
41: ; preds = %39, %29, %37, %35, %33, %31
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [36 x i8] c"Faint signals, barely perceptible, \00"
@.str.2 = [20 x i8] c"Very weak signals, \00"
@.str.3 = [15 x i8] c"Weak signals, \00"
@.str.4 = [15 x i8] c"Fair signals, \00"
@.str.5 = [22 x i8] c"Fairly good signals, \00"
@.str.6 = [15 x i8] c"Good signals, \00"
@.str.7 = [28 x i8] c"Moderately strong signals, \00"
@.str.8 = [17 x i8] c"Strong signals, \00"
@.str.9 = [27 x i8] c"Extremely strong signals, \00"
@.str.10 = [12 x i8] c"unreadable.\00"
@.str.11 = [51 x i8] c"barely readable, occasional words distinguishable.\00"
@.str.12 = [39 x i8] c"readable with considerable difficulty.\00"
@.str.13 = [41 x i8] c"readable with practically no difficulty.\00"
@.str.14 = [20 x i8] c"perfectly readable.\00"
@reltable.main = [9 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([36 x i8]* @.str.1 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.2 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.3 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.4 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.5 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([15 x i8]* @.str.6 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([28 x i8]* @.str.7 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([17 x i8]* @.str.8 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([27 x i8]* @.str.9 to i64), i64 ptrtoint ([9 x i32]* @reltable.main to i64)) to i32)]
@reltable.main.16 = [5 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([12 x i8]* @.str.10 to i64), i64 ptrtoint ([5 x i32]* @reltable.main.16 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([51 x i8]* @.str.11 to i64), i64 ptrtoint ([5 x i32]* @reltable.main.16 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([39 x i8]* @.str.12 to i64), i64 ptrtoint ([5 x i32]* @reltable.main.16 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([41 x i8]* @.str.13 to i64), i64 ptrtoint ([5 x i32]* @reltable.main.16 to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([20 x i8]* @.str.14 to i64), i64 ptrtoint ([5 x i32]* @reltable.main.16 to i64)) to i32)]
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = sdiv i32 %4, 10
%6 = srem i32 %4, 10
%7 = add nsw i32 %6, -1
%8 = icmp ult i32 %7, 9
br i1 %8, label %9, label %14
9: ; preds = %0
%10 = sext i32 %7 to i64
%11 = shl i64 %10, 2
%12 = call i8* @llvm.load.relative.i64(i8* bitcast ([9 x i32]* @reltable.main to i8*), i64 %11)
%13 = call i32 @printf(i8* dereferenceable(1) %12)
br label %14
14: ; preds = %0, %9
%15 = add nsw i32 %5, -1
%16 = icmp ult i32 %15, 5
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = sext i32 %15 to i64
%19 = shl i64 %18, 2
%20 = call i8* @llvm.load.relative.i64(i8* bitcast ([5 x i32]* @reltable.main.16 to i8*), i64 %19)
%21 = call i32 @printf(i8* dereferenceable(1) %20)
br label %22
22: ; preds = %14, %17
ret i32 0
}