#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 strength = 0;
  scanf("%d", &strength);
  printf("+-----+\n");
  if (strength >= 90) {
    printf("|-  4G|\n");
  } else if (strength >= 60) {
    printf("|-  3G|\n");
  } else if (strength >= 20) {
    printf("|-   E|\n");
  } else {
    printf("|    E|\n");
  }
  if (strength == 100) {
    printf("|--   |\n");
    printf("|---  |\n");
    printf("|---- |\n");
    printf("|-----|\n");
  } else if (strength >= 80) {
    printf("|--   |\n");
    printf("|---  |\n");
    printf("|---- |\n");
    printf("|     |\n");
  } else if (strength >= 60) {
    printf("|--   |\n");
    printf("|---  |\n");
    printf("|     |\n");
    printf("|     |\n");
  } else if (strength >= 40) {
    printf("|--   |\n");
    printf("|     |\n");
    printf("|     |\n");
    printf("|     |\n");
  } else {
    printf("|     |\n");
    printf("|     |\n");
    printf("|     |\n");
    printf("|     |\n");
  }
  printf("+-----+");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x5a,-0x8(%rbp)
jl     116d <main+0x4d>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
jmp    11b9 <main+0x99>
cmpl   $0x3c,-0x8(%rbp)
jl     1188 <main+0x68>
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
jmp    11b4 <main+0x94>
cmpl   $0x14,-0x8(%rbp)
jl     11a3 <main+0x83>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
jmp    11af <main+0x8f>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
jmp    11b4 <main+0x94>
jmp    11b9 <main+0x99>
cmpl   $0x64,-0x8(%rbp)
jne    11f8 <main+0xd8>
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
lea    0xe63(%rip),%rdi
call   1030 <printf@plt>
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
jmp    12f4 <main+0x1d4>
cmpl   $0x50,-0x8(%rbp)
jl     1237 <main+0x117>
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
lea    0xe24(%rip),%rdi
call   1030 <printf@plt>
lea    0xe21(%rip),%rdi
call   1030 <printf@plt>
lea    0xe27(%rip),%rdi
call   1030 <printf@plt>
jmp    12ef <main+0x1cf>
cmpl   $0x3c,-0x8(%rbp)
jl     1276 <main+0x156>
lea    0xde8(%rip),%rdi
call   1030 <printf@plt>
lea    0xde5(%rip),%rdi
call   1030 <printf@plt>
lea    0xdf4(%rip),%rdi
call   1030 <printf@plt>
lea    0xde8(%rip),%rdi
call   1030 <printf@plt>
jmp    12ea <main+0x1ca>
cmpl   $0x28,-0x8(%rbp)
jl     12b5 <main+0x195>
lea    0xda9(%rip),%rdi
call   1030 <printf@plt>
lea    0xdc1(%rip),%rdi
call   1030 <printf@plt>
lea    0xdb5(%rip),%rdi
call   1030 <printf@plt>
lea    0xda9(%rip),%rdi
call   1030 <printf@plt>
jmp    12e5 <main+0x1c5>
lea    0xd98(%rip),%rdi
call   1030 <printf@plt>
lea    0xd8c(%rip),%rdi
call   1030 <printf@plt>
lea    0xd80(%rip),%rdi
call   1030 <printf@plt>
lea    0xd74(%rip),%rdi
call   1030 <printf@plt>
jmp    12ea <main+0x1ca>
jmp    12ef <main+0x1cf>
jmp    12f4 <main+0x1d4>
lea    0xd62(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xeb8(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xeaa(%rip),%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%eax
cmp    $0x59,%eax
jle    1170 <main+0x40>
lea    0xedd(%rip),%rdi
jmp    1193 <main+0x63>
cmp    $0x3b,%eax
jle    117e <main+0x4e>
lea    0xec7(%rip),%rdi
jmp    1193 <main+0x63>
cmp    $0x14,%eax
lea    0xeb3(%rip),%rax
lea    0xe7c(%rip),%rdi
cmovge %rax,%rdi
call   1030 <puts@plt>
mov    0xc(%rsp),%eax
lea    0xe88(%rip),%r15
lea    0xe79(%rip),%r14
lea    0xe6a(%rip),%rdi
cmp    $0x64,%eax
jne    11bf <main+0x8f>
lea    0xe76(%rip),%rbx
jmp    11f9 <main+0xc9>
cmp    $0x4f,%eax
jle    11cd <main+0x9d>
lea    0xe48(%rip),%rbx
jmp    11f9 <main+0xc9>
cmp    $0x3b,%eax
jle    11de <main+0xae>
lea    0xe3a(%rip),%r15
mov    %r15,%rbx
jmp    11f9 <main+0xc9>
cmp    $0x28,%eax
lea    0xe33(%rip),%rdi
lea    0xe24(%rip),%r14
cmovl  %r14,%rdi
mov    %r14,%r15
mov    %r14,%rbx
call   1030 <puts@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xde6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [9 x i8] c"+-----+\0A\00"
@.str.2 = [9 x i8] c"|- 4G|\0A\00"
@.str.3 = [9 x i8] c"|- 3G|\0A\00"
@.str.4 = [9 x i8] c"|- E|\0A\00"
@.str.5 = [9 x i8] c"| E|\0A\00"
@.str.6 = [9 x i8] c"|-- |\0A\00"
@.str.7 = [9 x i8] c"|--- |\0A\00"
@.str.8 = [9 x i8] c"|---- |\0A\00"
@.str.9 = [9 x i8] c"|-----|\0A\00"
@.str.10 = [9 x i8] c"| |\0A\00"
@.str.11 = [8 x i8] c"+-----+\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 90
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %23
9: ; preds = %0
%10 = load i32, i32* %2
%11 = icmp sge i32 %10, 60
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
br label %22
14: ; preds = %9
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 20
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
br label %21
19: ; preds = %14
%20 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
br label %22
22: ; preds = %21, %12
br label %23
23: ; preds = %22, %7
%24 = load i32, i32* %2
%25 = icmp eq i32 %24, 100
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%28 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%29 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%30 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
br label %63
31: ; preds = %23
%32 = load i32, i32* %2
%33 = icmp sge i32 %32, 80
br i1 %33, label %34, label %39
34: ; preds = %31
%35 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%36 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%37 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%38 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
br label %62
39: ; preds = %31
%40 = load i32, i32* %2
%41 = icmp sge i32 %40, 60
br i1 %41, label %42, label %47
42: ; preds = %39
%43 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%44 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%45 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%46 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
br label %61
47: ; preds = %39
%48 = load i32, i32* %2
%49 = icmp sge i32 %48, 40
br i1 %49, label %50, label %55
50: ; preds = %47
%51 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%52 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%53 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%54 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
br label %60
55: ; preds = %47
%56 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%57 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%58 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%59 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
br label %60
60: ; preds = %55, %50
br label %61
61: ; preds = %60, %42
br label %62
62: ; preds = %61, %34
br label %63
63: ; preds = %62, %26
%64 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [8 x i8] c"+-----+\00"
@str.12 = [8 x i8] c"| E|\00"
@str.28 = [8 x i8] c"| |\00"
@str.29 = [8 x i8] c"|-- |\00"
@str.30 = [8 x i8] c"|--- |\00"
@str.31 = [8 x i8] c"|---- |\00"
@str.32 = [8 x i8] c"|-----|\00"
@str.33 = [8 x i8] c"|- E|\00"
@str.34 = [8 x i8] c"|- 3G|\00"
@str.35 = [8 x i8] c"|- 4G|\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 89
br i1 %6, label %12, label %7
7: ; preds = %0
%8 = icmp sgt i32 %5, 59
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = icmp sgt i32 %5, 19
%11 = select i1 %10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.33, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.12, i64 0, i64 0)
br label %12
12: ; preds = %9, %7, %0
%13 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.35, i64 0, i64 0), %0 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.34, i64 0, i64 0), %7 ], [ %11, %9 ]
%14 = call i32 @puts(i8* dereferenceable(1) %13)
%15 = load i32, i32* %1
%16 = icmp eq i32 %15, 100
br i1 %16, label %27, label %17
17: ; preds = %12
%18 = icmp sgt i32 %15, 79
br i1 %18, label %27, label %19
19: ; preds = %17
%20 = icmp sgt i32 %15, 59
br i1 %20, label %27, label %21
21: ; preds = %19
%22 = icmp sgt i32 %15, 39
%23 = select i1 %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.29, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0)
%24 = select i1 %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0)
%25 = select i1 %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0)
%26 = select i1 %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0)
br label %27
27: ; preds = %21, %19, %17, %12
%28 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.29, i64 0, i64 0), %12 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.29, i64 0, i64 0), %17 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.29, i64 0, i64 0), %19 ], [ %23, %21 ]
%29 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.30, i64 0, i64 0), %12 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.30, i64 0, i64 0), %17 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.30, i64 0, i64 0), %19 ], [ %24, %21 ]
%30 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.31, i64 0, i64 0), %12 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.31, i64 0, i64 0), %17 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0), %19 ], [ %25, %21 ]
%31 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.32, i64 0, i64 0), %12 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0), %17 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @str.28, i64 0, i64 0), %19 ], [ %26, %21 ]
%32 = call i32 @puts(i8* dereferenceable(1) %28)
%33 = call i32 @puts(i8* dereferenceable(1) %29)
%34 = call i32 @puts(i8* dereferenceable(1) %30)
%35 = call i32 @puts(i8* dereferenceable(1) %31)
%36 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}