#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 idade;
  scanf("%d", &idade);
  if (idade < 5) {
    printf("SEM CATEGORIA\n");
  }
  if (idade >= 5 && idade <= 7) {
    printf("INFANTIL A\n");
  }
  if (idade >= 8 && idade <= 10) {
    printf("INFANTIL B\n");
  }
  if (idade >= 11 && idade <= 13) {
    printf("JUVENIL A\n");
  }
  if (idade >= 14 && idade <= 17) {
    printf("JUVENIL B\n");
  }
  if (idade >= 18) {
    printf("SENIOR\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x5,-0x8(%rbp)
jge    1155 <main+0x35>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x5,-0x8(%rbp)
jl     1175 <main+0x55>
cmpl   $0x7,-0x8(%rbp)
jg     1175 <main+0x55>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x8,-0x8(%rbp)
jl     1195 <main+0x75>
cmpl   $0xa,-0x8(%rbp)
jg     1195 <main+0x75>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xb,-0x8(%rbp)
jl     11b5 <main+0x95>
cmpl   $0xd,-0x8(%rbp)
jg     11b5 <main+0x95>
lea    0xe7a(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xe,-0x8(%rbp)
jl     11d5 <main+0xb5>
cmpl   $0x11,-0x8(%rbp)
jg     11d5 <main+0xb5>
lea    0xe65(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x12,-0x8(%rbp)
jl     11eb <main+0xcb>
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x4,%eax
jg     114b <main+0x2b>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
lea    -0x5(%rax),%ecx
cmp    $0x2,%ecx
ja     1163 <main+0x43>
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
lea    -0x8(%rax),%ecx
cmp    $0x2,%ecx
ja     117b <main+0x5b>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
lea    -0xb(%rax),%ecx
cmp    $0x2,%ecx
ja     1193 <main+0x73>
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
lea    -0xe(%rax),%ecx
cmp    $0x3,%ecx
ja     11ab <main+0x8b>
lea    0xe68(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
cmp    $0x12,%eax
jl     11bc <main+0x9c>
lea    0xe4c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [15 x i8] c"SEM CATEGORIA\0A\00"
@.str.2 = [12 x i8] c"INFANTIL A\0A\00"
@.str.3 = [12 x i8] c"INFANTIL B\0A\00"
@.str.4 = [11 x i8] c"JUVENIL A\0A\00"
@.str.5 = [11 x i8] c"JUVENIL B\0A\00"
@.str.6 = [8 x i8] c"SENIOR\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 5
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 7
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %14, %11, %8
%17 = load i32, i32* %2
%18 = icmp sge i32 %17, 8
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i32, i32* %2
%21 = icmp sle i32 %20, 10
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
br label %24
24: ; preds = %22, %19, %16
%25 = load i32, i32* %2
%26 = icmp sge i32 %25, 11
br i1 %26, label %27, label %32
27: ; preds = %24
%28 = load i32, i32* %2
%29 = icmp sle i32 %28, 13
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
br label %32
32: ; preds = %30, %27, %24
%33 = load i32, i32* %2
%34 = icmp sge i32 %33, 14
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = load i32, i32* %2
%37 = icmp sle i32 %36, 17
br i1 %37, label %38, label %40
38: ; preds = %35
%39 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
br label %40
40: ; preds = %38, %35, %32
%41 = load i32, i32* %2
%42 = icmp sge i32 %41, 18
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %45
45: ; preds = %43, %40
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [7 x i8] c"SENIOR\00"
@str.7 = [10 x i8] c"JUVENIL B\00"
@str.8 = [10 x i8] c"JUVENIL A\00"
@str.9 = [11 x i8] c"INFANTIL B\00"
@str.10 = [11 x i8] c"INFANTIL A\00"
@str.11 = [14 x i8] c"SEM CATEGORIA\00"
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 = icmp slt i32 %4, 5
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.11, i64 0, i64 0))
%8 = load i32, i32* %1
br label %9
9: ; preds = %6, %0
%10 = phi i32 [ %8, %6 ], [ %4, %0 ]
%11 = add i32 %10, -5
%12 = icmp ult i32 %11, 3
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.10, i64 0, i64 0))
%15 = load i32, i32* %1
br label %16
16: ; preds = %13, %9
%17 = phi i32 [ %15, %13 ], [ %10, %9 ]
%18 = add i32 %17, -8
%19 = icmp ult i32 %18, 3
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.9, i64 0, i64 0))
%22 = load i32, i32* %1
br label %23
23: ; preds = %20, %16
%24 = phi i32 [ %22, %20 ], [ %17, %16 ]
%25 = add i32 %24, -11
%26 = icmp ult i32 %25, 3
br i1 %26, label %27, label %30
27: ; preds = %23
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.8, i64 0, i64 0))
%29 = load i32, i32* %1
br label %30
30: ; preds = %27, %23
%31 = phi i32 [ %29, %27 ], [ %24, %23 ]
%32 = add i32 %31, -14
%33 = icmp ult i32 %32, 4
br i1 %33, label %34, label %37
34: ; preds = %30
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.7, i64 0, i64 0))
%36 = load i32, i32* %1
br label %37
37: ; preds = %34, %30
%38 = phi i32 [ %36, %34 ], [ %31, %30 ]
%39 = icmp sgt i32 %38, 17
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %42
42: ; preds = %40, %37
ret i32 0
}