#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 l = 0, p = 7;
  scanf("%d", &l);
  if (l > 100)
    p += (l - 100) * 5 + 140 + 20;
  else if (l > 30)
    p += (l - 30) * 2 + 20;
  else if (l > 10)
    p += (l - 10);
  printf("%d", p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x7,-0xc(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x64,-0x8(%rbp)
jle    1173 <main+0x53>
mov    -0x8(%rbp),%eax
sub    $0x64,%eax
imul   $0x5,%eax,%eax
add    $0x8c,%eax
add    $0x14,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    11b4 <main+0x94>
cmpl   $0x1e,-0x8(%rbp)
jle    1194 <main+0x74>
mov    -0x8(%rbp),%eax
sub    $0x1e,%eax
shl    $0x1,%eax
add    $0x14,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    11af <main+0x8f>
cmpl   $0xa,-0x8(%rbp)
jle    11aa <main+0x8a>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    11af <main+0x8f>
jmp    11b4 <main+0x94>
mov    -0xc(%rbp),%esi
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
cmp    $0x65,%eax
jl     114e <main+0x2e>
lea    (%rax,%rax,4),%esi
add    $0xfffffeb3,%esi
jmp    1169 <main+0x49>
cmp    $0x1f,%eax
jl     115b <main+0x3b>
lea    (%rax,%rax,1),%esi
add    $0xffffffdf,%esi
jmp    1169 <main+0x49>
lea    -0x3(%rax),%ecx
cmp    $0xb,%eax
mov    $0x7,%esi
cmovge %ecx,%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\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 = load i32, i32* %1
%5 = icmp sgt i32 %4, 100
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = mul i32 %4, 5
%8 = add i32 %7, -333
br label %18
9: ; preds = %0
%10 = icmp sgt i32 %4, 30
br i1 %10, label %11, label %14
11: ; preds = %9
%12 = shl nuw nsw i32 %4, 1
%13 = add nsw i32 %12, -33
br label %18
14: ; preds = %9
%15 = icmp sgt i32 %4, 10
%16 = add nsw i32 %4, -3
%17 = select i1 %15, i32 %16, i32 7
br label %18
18: ; preds = %14, %11, %6
%19 = phi i32 [ %8, %6 ], [ %13, %11 ], [ %17, %14 ]
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
ret i32 0
}