#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 *, float *);
int main() {
  float a, t;
  scanf("%f", &a);
  if (a >= 0 && a <= 2000) {
    printf("Isento\n");
  } else if (a >= 2000.01 && a <= 3000) {
    t = (a - 2000) * 0.08;
    printf("R$ %0.2f\n", t);
  } else if (a >= 3000.01 && a <= 4500) {
    t = (1000 * 0.08) + ((a - 3000) * 0.18);
    printf("R$ %0.2f\n", t);
  } else if (a > 4500) {
    t = (1000 * 0.08) + (1500 * 0.18) + (a - 4500) * 0.28;
    printf("R$ %0.2f\n", t);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf12(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1175 <main+0x55>
movss  0xea8(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1175 <main+0x55>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12d9 <main+0x1b9>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe8a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11e8 <main+0xc8>
movss  0xe6c(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11e8 <main+0xc8>
movss  -0x8(%rbp),%xmm0
movss  0xe51(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe81(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe77(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    12d4 <main+0x1b4>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe1f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1267 <main+0x147>
movss  0xdfd(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1267 <main+0x147>
movss  -0x8(%rbp),%xmm0
movss  0xde2(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdfe(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdfa(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdf8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    12cf <main+0x1af>
movss  -0x8(%rbp),%xmm0
movss  0xd94(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    12ca <main+0x1aa>
movss  -0x8(%rbp),%xmm0
movss  0xd7e(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd86(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd82(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd90(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    12cf <main+0x1af>
jmp    12d4 <main+0x1b4>
jmp    12d9 <main+0x1b9>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf18(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     116e <main+0x3e>
movss  0xea8(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     116e <main+0x3e>
lea    0xef9(%rip),%rdi
call   1030 <puts@plt>
jmp    1212 <main+0xe2>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
movss  0xe87(%rip),%xmm2
ucomiss %xmm0,%xmm2
jb     11a2 <main+0x72>
ucomisd 0xe8e(%rip),%xmm1
jb     11a2 <main+0x72>
addss  0xe80(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xea8(%rip),%xmm0
jmp    11fc <main+0xcc>
movss  0xe5e(%rip),%xmm2
ucomiss %xmm0,%xmm2
jb     11d7 <main+0xa7>
ucomisd 0xe69(%rip),%xmm1
jb     11d7 <main+0xa7>
addss  0xe4f(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe6b(%rip),%xmm0
addsd  0xe6b(%rip),%xmm0
jmp    11fc <main+0xcc>
ucomiss 0xe2a(%rip),%xmm0
jbe    1212 <main+0xe2>
addss  0xe24(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xe34(%rip),%xmm0
addsd  0xe34(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe48(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [8 x i8] c"Isento\0A\00"
@.str.2 = [10 x i8] c"R$ %0.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%5 = load float, float* %2
%6 = fcmp oge float %5, 0.000000e+00
br i1 %6, label %7, label %12
7: ; preds = %0
%8 = load float, float* %2
%9 = fcmp ole float %8, 2.000000e+03
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %59
12: ; preds = %7, %0
%13 = load float, float* %2
%14 = fpext float %13 to double
%15 = fcmp oge double %14, 2.000010e+03
br i1 %15, label %16, label %28
16: ; preds = %12
%17 = load float, float* %2
%18 = fcmp ole float %17, 3.000000e+03
br i1 %18, label %19, label %28
19: ; preds = %16
%20 = load float, float* %2
%21 = fsub float %20, 2.000000e+03
%22 = fpext float %21 to double
%23 = fmul double %22, 8.000000e-02
%24 = fptrunc double %23 to float
store float %24, float* %3
%25 = load float, float* %3
%26 = fpext float %25 to double
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %26)
br label %58
28: ; preds = %16, %12
%29 = load float, float* %2
%30 = fpext float %29 to double
%31 = fcmp oge double %30, 3.000010e+03
br i1 %31, label %32, label %44
32: ; preds = %28
%33 = load float, float* %2
%34 = fcmp ole float %33, 4.500000e+03
br i1 %34, label %35, label %44
35: ; preds = %32
%36 = load float, float* %2
%37 = fsub float %36, 3.000000e+03
%38 = fpext float %37 to double
%39 = call double @llvm.fmuladd.f64(double %38, double 1.800000e-01, double 8.000000e+01)
%40 = fptrunc double %39 to float
store float %40, float* %3
%41 = load float, float* %3
%42 = fpext float %41 to double
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %42)
br label %57
44: ; preds = %32, %28
%45 = load float, float* %2
%46 = fcmp ogt float %45, 4.500000e+03
br i1 %46, label %47, label %56
47: ; preds = %44
%48 = load float, float* %2
%49 = fsub float %48, 4.500000e+03
%50 = fpext float %49 to double
%51 = call double @llvm.fmuladd.f64(double %50, double 2.800000e-01, double 3.500000e+02)
%52 = fptrunc double %51 to float
store float %52, float* %3
%53 = load float, float* %3
%54 = fpext float %53 to double
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %54)
br label %56
56: ; preds = %47, %44
br label %57
57: ; preds = %56, %35
br label %58
58: ; preds = %57, %19
br label %59
59: ; preds = %58, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.2 = [10 x i8] c"R$ %0.2f\0A\00"
@str = [7 x i8] c"Isento\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fcmp oge float %4, 0.000000e+00
%6 = fcmp ole float %4, 2.000000e+03
%7 = and i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %42
10: ; preds = %0
%11 = fpext float %4 to double
%12 = fcmp oge double %11, 2.000010e+03
%13 = fcmp ole float %4, 3.000000e+03
%14 = and i1 %13, %12
br i1 %14, label %15, label %22
15: ; preds = %10
%16 = fadd float %4, -2.000000e+03
%17 = fpext float %16 to double
%18 = fmul double %17, 8.000000e-02
%19 = fptrunc double %18 to float
%20 = fpext float %19 to double
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %20)
br label %42
22: ; preds = %10
%23 = fcmp oge double %11, 3.000010e+03
%24 = fcmp ole float %4, 4.500000e+03
%25 = and i1 %24, %23
br i1 %25, label %26, label %33
26: ; preds = %22
%27 = fadd float %4, -3.000000e+03
%28 = fpext float %27 to double
%29 = call double @llvm.fmuladd.f64(double %28, double 1.800000e-01, double 8.000000e+01)
%30 = fptrunc double %29 to float
%31 = fpext float %30 to double
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %31)
br label %42
33: ; preds = %22
%34 = fcmp ogt float %4, 4.500000e+03
br i1 %34, label %35, label %42
35: ; preds = %33
%36 = fadd float %4, -4.500000e+03
%37 = fpext float %36 to double
%38 = call double @llvm.fmuladd.f64(double %37, double 2.800000e-01, double 3.500000e+02)
%39 = fptrunc double %38 to float
%40 = fpext float %39 to double
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %40)
br label %42
42: ; preds = %15, %33, %35, %26, %8
ret i32 0
}