#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(int argc, char const *argv[]) {
  float salary;
  scanf("%f", &salary);
  float tax_sum = 0;
  if (salary > 4500.0) {
    tax_sum += (salary - 4500.0) * 0.28;
  }
  if (salary > 3000.0) {
    if (salary - 3000.0 > 1500.0) {
      tax_sum += 1500.0 * 0.18;
    } else {
      tax_sum += (salary - 3000.0) * 0.18;
    }
  }
  if (salary > 2000.0) {
    if (salary - 2000.0 > 1000.0) {
      tax_sum += 1000.0 * 0.08;
    } else {
      tax_sum += (salary - 2000.0) * 0.08;
    }
  }
  if (tax_sum > 0) {
    printf("R$ %.2f\n", tax_sum);
  } else {
    printf("Isento\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xf13(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea1(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11a0 <main+0x80>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe86(%rip),%xmm1
subsd  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xe79(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe5f(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1241 <main+0x121>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe44(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe40(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1205 <main+0xe5>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe35(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    123c <main+0x11c>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdfa(%rip),%xmm1
subsd  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xdf5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1241 <main+0x121>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdde(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12e2 <main+0x1c2>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdc3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xdbf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12a6 <main+0x186>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdb4(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    12dd <main+0x1bd>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd79(%rip),%xmm1
subsd  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xd74(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    12e2 <main+0x1c2>
movss  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    130f <main+0x1ef>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd50(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    131d <main+0x1fd>
lea    0xd46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf20(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm1
xorps  %xmm0,%xmm0
ucomiss 0xeae(%rip),%xmm1
ja     116f <main+0x3f>
ucomiss 0xea9(%rip),%xmm1
ja     119e <main+0x6e>
ucomiss 0xea8(%rip),%xmm1
ja     11ea <main+0xba>
jmp    1221 <main+0xf1>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
addsd  0xe9a(%rip),%xmm0
mulsd  0xe9a(%rip),%xmm0
xorpd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
ucomiss 0xe68(%rip),%xmm1
jbe    115d <main+0x2d>
xorps  %xmm2,%xmm2
cvtss2sd %xmm1,%xmm2
addsd  0xe7b(%rip),%xmm2
ucomisd 0xe7b(%rip),%xmm2
jbe    11ca <main+0x9a>
addss  0xe49(%rip),%xmm0
ucomiss 0xe46(%rip),%xmm1
ja     11ea <main+0xba>
jmp    1221 <main+0xf1>
mulsd  0xe66(%rip),%xmm2
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
ucomiss 0xe24(%rip),%xmm1
jbe    1221 <main+0xf1>
cvtss2sd %xmm1,%xmm1
addsd  0xe4a(%rip),%xmm1
ucomisd 0xe4a(%rip),%xmm1
jbe    120a <main+0xda>
addss  0xe08(%rip),%xmm0
jmp    1221 <main+0xf1>
mulsd  0xe3e(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    123d <main+0x10d>
cvtss2sd %xmm0,%xmm0
lea    0xe27(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1249 <main+0x119>
lea    0xe20(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

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