#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 *, double *);
int /*<<< orphan*/ system(char *);
int main() {
  double salar, reajuste;
  scanf("%lf", &salar);
  if (salar <= 2000)
    printf("Isento\n");
  else {
    if (salar <= 3000) {
      salar = salar - 2000;
      reajuste = salar * 0.08;
      printf("R$ %.2lf\n", reajuste);
    } else if (salar <= 4500) {
      salar = salar - 2000;
      reajuste = 1000 * 0.08;
      salar = salar - 1000;
      reajuste = reajuste + salar * 0.18;
      printf("R$ %.2lf\n", reajuste);
    } else if (salar > 4500) {
      salar = salar - 2000;
      reajuste = 1000 * 0.08;
      salar = salar - 1000;
      reajuste = reajuste + 1500 * 0.18;
      salar = salar - 1500;
      reajuste = reajuste + salar * 0.28;
      printf("R$ %.2lf\n", reajuste);
    }
  }
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf0a(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movsd  0xea9(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1175 <main+0x45>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1304 <main+0x1d4>
movsd  0xe8b(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11c8 <main+0x98>
movsd  -0x10(%rbp),%xmm0
movsd  0xe6b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xea2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xea0(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    12ff <main+0x1cf>
movsd  0xe40(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     124b <main+0x11b>
movsd  -0x10(%rbp),%xmm0
movsd  0xe18(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe3f(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe25(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xe1a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe1d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    12fa <main+0x1ca>
movsd  -0x10(%rbp),%xmm0
movsd  0xdb8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12f5 <main+0x1c5>
movsd  -0x10(%rbp),%xmm0
movsd  0xd91(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xdb8(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xd9e(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xd85(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xd66(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xd43(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xd6e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    12fa <main+0x1ca>
jmp    12ff <main+0x1cf>
jmp    1304 <main+0x1d4>
lea    0xd5b(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf10(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
movsd  (%rsp),%xmm0
movsd  0xea3(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11bc <main+0x7c>
movsd  0xe9d(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11ca <main+0x8a>
movsd  0xea7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11e1 <main+0xa1>
ucomisd 0xe99(%rip),%xmm0
jbe    1214 <main+0xd4>
addsd  0xe7b(%rip),%xmm0
addsd  0xe8b(%rip),%xmm0
addsd  0xe9b(%rip),%xmm0
movsd  %xmm0,(%rsp)
mulsd  0xe96(%rip),%xmm0
addsd  0xe96(%rip),%xmm0
jmp    1206 <main+0xc6>
lea    0xea9(%rip),%rdi
call   1030 <puts@plt>
jmp    1214 <main+0xd4>
addsd  0xe3e(%rip),%xmm0
movsd  %xmm0,(%rsp)
mulsd  0xe39(%rip),%xmm0
jmp    1206 <main+0xc6>
addsd  0xe27(%rip),%xmm0
addsd  0xe37(%rip),%xmm0
movsd  %xmm0,(%rsp)
mulsd  0xe32(%rip),%xmm0
addsd  0xe32(%rip),%xmm0
lea    0xe4f(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe4b(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.2 = [10 x i8] c"R$ %.2lf\0A\00"
@.str.3 = [6 x i8] c"pause\00"
@str = [7 x i8] c"Isento\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fcmp ugt double %4, 2.000000e+03
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %29
8: ; preds = %0
%9 = fcmp ugt double %4, 3.000000e+03
br i1 %9, label %14, label %10
10: ; preds = %8
%11 = fadd double %4, -2.000000e+03
store double %11, double* %1
%12 = fmul double %11, 8.000000e-02
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %12)
br label %29
14: ; preds = %8
%15 = fcmp ugt double %4, 4.500000e+03
br i1 %15, label %21, label %16
16: ; preds = %14
%17 = fadd double %4, -2.000000e+03
%18 = fadd double %17, -1.000000e+03
store double %18, double* %1
%19 = call double @llvm.fmuladd.f64(double %18, double 1.800000e-01, double 8.000000e+01)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %19)
br label %29
21: ; preds = %14
%22 = fcmp ogt double %4, 4.500000e+03
br i1 %22, label %23, label %29
23: ; preds = %21
%24 = fadd double %4, -2.000000e+03
%25 = fadd double %24, -1.000000e+03
%26 = fadd double %25, -1.500000e+03
store double %26, double* %1
%27 = call double @llvm.fmuladd.f64(double %26, double 2.800000e-01, double 3.500000e+02)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %27)
br label %29
29: ; preds = %10, %21, %23, %16, %6
%30 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}