#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int consumo, total;
  total = 7;
  scanf("%d", &consumo);
  if (consumo > 10 && consumo < 31) {
    total = total + (consumo - 10) * 1;
  }
  if (consumo > 30 && consumo < 101) {
    total = total + 20 + (consumo - 30) * 2;
  }
  if (consumo > 100) {
    total = total + 20 + 140 + (consumo - 100) * 5;
  }
  printf("%d\n", total);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7,-0xc(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0xa,-0x8(%rbp)
jle    116b <main+0x4b>
cmpl   $0x1f,-0x8(%rbp)
jge    116b <main+0x4b>
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0xa,%ecx
shl    $0x0,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1e,-0x8(%rbp)
jle    1193 <main+0x73>
cmpl   $0x65,-0x8(%rbp)
jge    1193 <main+0x73>
mov    -0xc(%rbp),%eax
add    $0x14,%eax
mov    -0x8(%rbp),%ecx
sub    $0x1e,%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x64,-0x8(%rbp)
jle    11b6 <main+0x96>
mov    -0xc(%rbp),%eax
add    $0x14,%eax
add    $0x8c,%eax
mov    -0x8(%rbp),%ecx
sub    $0x64,%ecx
imul   $0x5,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe43(%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
lea    -0xb(%rax),%ecx
lea    -0x3(%rax),%edx
cmp    $0x14,%ecx
mov    $0x7,%ecx
cmovb  %edx,%ecx
lea    -0x1f(%rax),%edx
xor    %edi,%edi
cmp    $0x46,%edx
lea    -0x28(%rax,%rax,1),%edx
cmovae %edi,%edx
add    %ecx,%edx
cmp    $0x65,%eax
lea    -0x154(%rax,%rax,4),%esi
cmovl  %edi,%esi
add    %edx,%esi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\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 = add i32 %4, -11
%6 = icmp ult i32 %5, 20
%7 = add nsw i32 %4, -3
%8 = select i1 %6, i32 %7, i32 7
%9 = add i32 %4, -31
%10 = icmp ult i32 %9, 70
%11 = shl i32 %4, 1
%12 = add i32 %11, -40
%13 = select i1 %10, i32 %12, i32 0
%14 = add i32 %8, %13
%15 = icmp sgt i32 %4, 100
%16 = mul i32 %4, 5
%17 = add i32 %16, -340
%18 = select i1 %15, i32 %17, i32 0
%19 = add i32 %14, %18
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %19)
ret i32 0
}