#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 main(void) {
  double salario, z;
  scanf("%lf", &salario);
  if (salario <= 2000.00) {
    printf("Isento\n");
  } else if (salario <= 3000.00) {
    z = ((salario - 2000) * 0.08);
    printf("R$ %.2lf\n", z);
  } else if (salario <= 4500.00) {
    z = ((salario - 3000) * 0.18 + 1000 * 0.08);
    printf("R$ %.2lf\n", z);
  } else {
    z = ((salario - 4500) * 0.28 + 1000 * 0.08 + 1500 * 0.18);
    printf("R$ %.2lf\n", z);
  }
  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   1040 <scanf@plt>
movsd  0xeb9(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1165 <main+0x45>
lea    0xeeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1262 <main+0x142>
movsd  0xe9b(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11b2 <main+0x92>
movsd  -0x10(%rbp),%xmm0
movsd  0xe7b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xea7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xea6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    125d <main+0x13d>
movsd  0xe56(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     120b <main+0xeb>
movsd  -0x10(%rbp),%xmm0
movsd  0xe36(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe52(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe3e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe4d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1258 <main+0x138>
movsd  -0x10(%rbp),%xmm0
movsd  0xdf8(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xdfc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdf8(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xddc(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xdfb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    125d <main+0x13d>
jmp    1262 <main+0x142>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf20(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
movsd  0xeb3(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1191 <main+0x61>
movsd  0xead(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    119f <main+0x6f>
movsd  0xeb7(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11b1 <main+0x81>
addsd  0xec9(%rip),%xmm0
mulsd  0xec9(%rip),%xmm0
addsd  0xeb1(%rip),%xmm0
addsd  0xec1(%rip),%xmm0
jmp    11c9 <main+0x99>
lea    0xece(%rip),%rdi
call   1030 <puts@plt>
jmp    11d7 <main+0xa7>
addsd  0xe69(%rip),%xmm0
mulsd  0xe69(%rip),%xmm0
jmp    11c9 <main+0x99>
addsd  0xe6f(%rip),%xmm0
mulsd  0xe6f(%rip),%xmm0
addsd  0xe6f(%rip),%xmm0
lea    0xe8c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@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"
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 %36
9: ; preds = %0
%10 = load double, double* %2
%11 = fcmp ole double %10, 3.000000e+03
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load double, double* %2
%14 = fsub double %13, 2.000000e+03
%15 = fmul double %14, 8.000000e-02
store double %15, double* %3
%16 = load double, double* %3
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %16)
br label %35
18: ; preds = %9
%19 = load double, double* %2
%20 = fcmp ole double %19, 4.500000e+03
br i1 %20, label %21, label %27
21: ; preds = %18
%22 = load double, double* %2
%23 = fsub double %22, 3.000000e+03
%24 = call double @llvm.fmuladd.f64(double %23, double 1.800000e-01, double 8.000000e+01)
store double %24, double* %3
%25 = load double, double* %3
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %25)
br label %34
27: ; preds = %18
%28 = load double, double* %2
%29 = fsub double %28, 4.500000e+03
%30 = call double @llvm.fmuladd.f64(double %29, double 2.800000e-01, double 8.000000e+01)
%31 = fadd double %30, 2.700000e+02
store double %31, double* %3
%32 = load double, double* %3
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %32)
br label %34
34: ; preds = %27, %21
br label %35
35: ; preds = %34, %12
br label %36
36: ; preds = %35, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.2 = [10 x i8] c"R$ %.2lf\0A\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 %25
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
%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 %25
14: ; preds = %8
%15 = fcmp ugt double %4, 4.500000e+03
br i1 %15, label %20, label %16
16: ; preds = %14
%17 = fadd double %4, -3.000000e+03
%18 = call double @llvm.fmuladd.f64(double %17, double 1.800000e-01, double 8.000000e+01)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %18)
br label %25
20: ; preds = %14
%21 = fadd double %4, -4.500000e+03
%22 = call double @llvm.fmuladd.f64(double %21, double 2.800000e-01, double 8.000000e+01)
%23 = fadd double %22, 2.700000e+02
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %23)
br label %25
25: ; preds = %10, %20, %16, %6
ret i32 0
}