#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() {
  double VR, total = 0.00, provi = 0.00;
  scanf(" %lf", &VR);
  if (VR > 2000) {
    while (VR > 2000.00) {
      if (VR > 4500.00) {
        provi = VR - 4500.00;
        VR -= provi;
        total = total + (provi * 0.28);
      } else if (VR > 3000.00) {
        provi = VR - 3000.00;
        VR -= provi;
        total = total + (provi * 0.18);
      } else if (VR > 2000.00) {
        provi = VR - 2000.00;
        VR -= provi;
        total = total + (provi * 0.08);
      }
    }
    printf("R$ %0.2lf\n", total);
  } else
    printf("Isento\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xeea(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  0xea4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12d0 <main+0x1b0>
jmp    116b <main+0x4b>
movsd  -0x10(%rbp),%xmm0
movsd  0xe88(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12b8 <main+0x198>
movsd  -0x10(%rbp),%xmm0
movsd  0xe79(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11e6 <main+0xc6>
movsd  -0x10(%rbp),%xmm0
movsd  0xe62(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xe54(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    12b3 <main+0x193>
movsd  -0x10(%rbp),%xmm0
movsd  0xe1d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    124a <main+0x12a>
movsd  -0x10(%rbp),%xmm0
movsd  0xe06(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xde8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    12ae <main+0x18e>
movsd  -0x10(%rbp),%xmm0
movsd  0xda9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12a9 <main+0x189>
movsd  -0x10(%rbp),%xmm0
movsd  0xd92(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  0xd7c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    12ae <main+0x18e>
jmp    12b3 <main+0x193>
jmp    116b <main+0x4b>
movsd  -0x18(%rbp),%xmm0
lea    0xd71(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    12de <main+0x1be>
lea    0xd69(%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    0xf10(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
movsd  (%rsp),%xmm7
ucomisd 0xeb3(%rip),%xmm7
jbe    1219 <main+0xe9>
xorpd  %xmm0,%xmm0
movsd  0xea9(%rip),%xmm2
movsd  0xed1(%rip),%xmm3
movsd  0xed1(%rip),%xmm4
movsd  0xe89(%rip),%xmm5
movsd  0xe91(%rip),%xmm6
movsd  0xea0(%rip),%xmm8
movsd  0xe9f(%rip),%xmm9
movsd  0xe7e(%rip),%xmm10
movsd  0xe7d(%rip),%xmm11
jmp    11cf <main+0x9f>
cs nopw 0x0(%rax,%rax,1)
nop
movapd %xmm7,%xmm1
addsd  %xmm3,%xmm1
subsd  %xmm1,%xmm7
movsd  %xmm7,(%rsp)
mulsd  %xmm4,%xmm1
addsd  %xmm1,%xmm0
ucomisd %xmm5,%xmm7
jbe    1227 <main+0xf7>
ucomisd %xmm2,%xmm7
ja     11b0 <main+0x80>
ucomisd %xmm6,%xmm7
jbe    1200 <main+0xd0>
movapd %xmm7,%xmm1
addsd  %xmm8,%xmm1
subsd  %xmm1,%xmm7
movsd  %xmm7,(%rsp)
mulsd  %xmm9,%xmm1
jmp    11c5 <main+0x95>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm7,%xmm1
addsd  %xmm10,%xmm1
subsd  %xmm1,%xmm7
movsd  %xmm7,(%rsp)
mulsd  %xmm11,%xmm1
jmp    11c5 <main+0x95>
lea    0xe38(%rip),%rdi
call   1030 <puts@plt>
jmp    1235 <main+0x105>
lea    0xe1f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c" %lf\00"
@.str.1 = [11 x i8] c"R$ %0.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 ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fcmp ogt double %4, 2.000000e+03
br i1 %5, label %6, label %30
6: ; preds = %0, %24
%7 = phi double [ %26, %24 ], [ 0.000000e+00, %0 ]
%8 = phi double [ %25, %24 ], [ %4, %0 ]
%9 = fcmp ogt double %8, 4.500000e+03
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = fadd double %8, -4.500000e+03
%12 = fsub double %8, %11
store double %12, double* %1
%13 = call double @llvm.fmuladd.f64(double %11, double 2.800000e-01, double %7)
br label %24
14: ; preds = %6
%15 = fcmp ogt double %8, 3.000000e+03
br i1 %15, label %16, label %20
16: ; preds = %14
%17 = fadd double %8, -3.000000e+03
%18 = fsub double %8, %17
store double %18, double* %1
%19 = call double @llvm.fmuladd.f64(double %17, double 1.800000e-01, double %7)
br label %24
20: ; preds = %14
%21 = fadd double %8, -2.000000e+03
%22 = fsub double %8, %21
store double %22, double* %1
%23 = call double @llvm.fmuladd.f64(double %21, double 8.000000e-02, double %7)
br label %24
24: ; preds = %16, %20, %10
%25 = phi double [ %12, %10 ], [ %18, %16 ], [ %22, %20 ]
%26 = phi double [ %13, %10 ], [ %19, %16 ], [ %23, %20 ]
%27 = fcmp ogt double %25, 2.000000e+03
br i1 %27, label %6, label %28
28: ; preds = %24
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), double %26)
br label %32
30: ; preds = %0
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
ret i32 0
}