#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 < 10) {
    printf("R$ 30,00\n");
  }
  if (idade >= 10 && idade <= 29) {
    printf("R$ 60,00\n");
  }
  if (idade >= 30 && idade <= 45) {
    printf("R$ 120,00\n");
  }
  if (idade >= 46 && idade <= 59) {
    printf("R$ 150,00\n");
  }
  if (idade >= 60 && idade <= 65) {
    printf("R$ 250,00\n");
  }
  if (idade > 65) {
    printf("R$ 400,00\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   $0xa,-0x8(%rbp)
jge    1155 <main+0x35>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xa,-0x8(%rbp)
jl     1175 <main+0x55>
cmpl   $0x1d,-0x8(%rbp)
jg     1175 <main+0x55>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x1e,-0x8(%rbp)
jl     1195 <main+0x75>
cmpl   $0x2d,-0x8(%rbp)
jg     1195 <main+0x75>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x2e,-0x8(%rbp)
jl     11b5 <main+0x95>
cmpl   $0x3b,-0x8(%rbp)
jg     11b5 <main+0x95>
lea    0xe72(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x3c,-0x8(%rbp)
jl     11d5 <main+0xb5>
cmpl   $0x41,-0x8(%rbp)
jg     11d5 <main+0xb5>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x41,-0x8(%rbp)
jle    11eb <main+0xcb>
lea    0xe52(%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    $0x9,%eax
jg     114b <main+0x2b>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
lea    -0xa(%rax),%ecx
cmp    $0x13,%ecx
ja     1163 <main+0x43>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
lea    -0x1e(%rax),%ecx
cmp    $0xf,%ecx
ja     117b <main+0x5b>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
lea    -0x2e(%rax),%ecx
cmp    $0xd,%ecx
ja     1193 <main+0x73>
lea    0xe8d(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
lea    -0x3c(%rax),%ecx
cmp    $0x5,%ecx
ja     11ab <main+0x8b>
lea    0xe6b(%rip),%rdi
call   1030 <puts@plt>
mov    0x4(%rsp),%eax
cmp    $0x42,%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 = [10 x i8] c"R$ 30,00\0A\00"
@.str.2 = [10 x i8] c"R$ 60,00\0A\00"
@.str.3 = [11 x i8] c"R$ 120,00\0A\00"
@.str.4 = [11 x i8] c"R$ 150,00\0A\00"
@.str.5 = [11 x i8] c"R$ 250,00\0A\00"
@.str.6 = [11 x i8] c"R$ 400,00\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, 10
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 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, 10
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 29
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 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, 30
br i1 %18, label %19, label %24
19: ; preds = %16
%20 = load i32, i32* %2
%21 = icmp sle i32 %20, 45
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 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, 46
br i1 %26, label %27, label %32
27: ; preds = %24
%28 = load i32, i32* %2
%29 = icmp sle i32 %28, 59
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, 60
br i1 %34, label %35, label %40
35: ; preds = %32
%36 = load i32, i32* %2
%37 = icmp sle i32 %36, 65
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 sgt i32 %41, 65
br i1 %42, label %43, label %45
43: ; preds = %40
%44 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 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 = [10 x i8] c"R$ 400,00\00"
@str.7 = [10 x i8] c"R$ 250,00\00"
@str.8 = [10 x i8] c"R$ 150,00\00"
@str.9 = [10 x i8] c"R$ 120,00\00"
@str.10 = [9 x i8] c"R$ 60,00\00"
@str.11 = [9 x i8] c"R$ 30,00\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, 10
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 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, -10
%12 = icmp ult i32 %11, 20
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 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, -30
%19 = icmp ult i32 %18, 16
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 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, -46
%26 = icmp ult i32 %25, 14
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, -60
%33 = icmp ult i32 %32, 6
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, 65
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
br label %42
42: ; preds = %40, %37
ret i32 0
}