#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;
  scanf(" %lf", &vr);
  if (vr <= 400.00) {
    printf("Novo salario: %0.2lf\n", vr * 1.15);
    printf("Reajuste ganho: %0.2lf\n", (vr * 1.15) - vr);
    printf("Em percentual: 15 %%\n");
  } else if (vr <= 800.00) {
    printf("Novo salario: %0.2lf\n", vr * 1.12);
    printf("Reajuste ganho: %0.2lf\n", (vr * 1.12) - vr);
    printf("Em percentual: 12 %%\n");
  } else if (vr <= 1200.00) {
    printf("Novo salario: %0.2lf\n", vr * 1.10);
    printf("Reajuste ganho: %0.2lf\n", (vr * 1.10) - vr);
    printf("Em percentual: 10 %%\n");
  } else if (vr <= 2000.00) {
    printf("Novo salario: %0.2lf\n", vr * 1.07);
    printf("Reajuste ganho: %0.2lf\n", (vr * 1.07) - vr);
    printf("Em percentual: 7 %%\n");
  } else {
    printf("Novo salario: %0.2lf\n", vr * 1.04);
    printf("Reajuste ganho: %0.2lf\n", (vr * 1.04) - vr);
    printf("Em percentual: 4 %%\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf12(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  0xeb9(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11bf <main+0x9f>
movsd  0xee6(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xee7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xeaa(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xebe(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13b6 <main+0x296>
movsd  0xe41(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     123f <main+0x11f>
movsd  0xe5e(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xe67(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe22(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xe3e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13b1 <main+0x291>
movsd  0xdc9(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     12bf <main+0x19f>
movsd  0xdd6(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xde7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xd9a(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xdbe(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13ac <main+0x28c>
movsd  0xd51(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     133f <main+0x21f>
movsd  0xd4e(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xd67(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xd12(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xd3e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13a7 <main+0x287>
movsd  0xcd9(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xcfa(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xc9d(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xcd1(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    13ac <main+0x28c>
jmp    13b1 <main+0x291>
jmp    13b6 <main+0x296>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf1c(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0xebc(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11bc <main+0x9c>
movsd  0xebe(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    11f8 <main+0xd8>
movsd  0xebc(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1231 <main+0x111>
movsd  0xeba(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    126a <main+0x14a>
mulsd  0xeb8(%rip),%xmm0
lea    0xebe(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0xe9c(%rip),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
lea    0xf1b(%rip),%rbx
jmp    12a1 <main+0x181>
mulsd  0xe44(%rip),%xmm0
lea    0xe82(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0xe28(%rip),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
lea    0xe88(%rip),%rbx
jmp    12a1 <main+0x181>
mulsd  0xe18(%rip),%xmm0
lea    0xe46(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0xdfc(%rip),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
lea    0xe62(%rip),%rbx
jmp    12a1 <main+0x181>
mulsd  0xdef(%rip),%xmm0
lea    0xe0d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0xdd3(%rip),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
lea    0xe3f(%rip),%rbx
jmp    12a1 <main+0x181>
mulsd  0xdc6(%rip),%xmm0
lea    0xdd4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0xdaa(%rip),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
lea    0xe1c(%rip),%rbx
lea    0xdbb(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c" %lf\00"
@.str.1 = [22 x i8] c"Novo salario: %0.2lf\0A\00"
@.str.2 = [24 x i8] c"Reajuste ganho: %0.2lf\0A\00"
@.str.3 = [22 x i8] c"Em percentual: 15 %%\0A\00"
@.str.4 = [22 x i8] c"Em percentual: 12 %%\0A\00"
@.str.5 = [22 x i8] c"Em percentual: 10 %%\0A\00"
@.str.6 = [21 x i8] c"Em percentual: 7 %%\0A\00"
@.str.7 = [21 x i8] c"Em percentual: 4 %%\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %2)
%4 = load double, double* %2
%5 = fcmp ole double %4, 4.000000e+02
br i1 %5, label %6, label %16
6: ; preds = %0
%7 = load double, double* %2
%8 = fmul double %7, 1.150000e+00
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %8)
%10 = load double, double* %2
%11 = load double, double* %2
%12 = fneg double %11
%13 = call double @llvm.fmuladd.f64(double %10, double 1.150000e+00, double %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %68
16: ; preds = %0
%17 = load double, double* %2
%18 = fcmp ole double %17, 8.000000e+02
br i1 %18, label %19, label %29
19: ; preds = %16
%20 = load double, double* %2
%21 = fmul double %20, 1.120000e+00
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %21)
%23 = load double, double* %2
%24 = load double, double* %2
%25 = fneg double %24
%26 = call double @llvm.fmuladd.f64(double %23, double 1.120000e+00, double %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
br label %67
29: ; preds = %16
%30 = load double, double* %2
%31 = fcmp ole double %30, 1.200000e+03
br i1 %31, label %32, label %42
32: ; preds = %29
%33 = load double, double* %2
%34 = fmul double %33, 1.100000e+00
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %34)
%36 = load double, double* %2
%37 = load double, double* %2
%38 = fneg double %37
%39 = call double @llvm.fmuladd.f64(double %36, double 1.100000e+00, double %38)
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %39)
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %66
42: ; preds = %29
%43 = load double, double* %2
%44 = fcmp ole double %43, 2.000000e+03
br i1 %44, label %45, label %55
45: ; preds = %42
%46 = load double, double* %2
%47 = fmul double %46, 1.070000e+00
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %47)
%49 = load double, double* %2
%50 = load double, double* %2
%51 = fneg double %50
%52 = call double @llvm.fmuladd.f64(double %49, double 1.070000e+00, double %51)
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %52)
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
br label %65
55: ; preds = %42
%56 = load double, double* %2
%57 = fmul double %56, 1.040000e+00
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %57)
%59 = load double, double* %2
%60 = load double, double* %2
%61 = fneg double %60
%62 = call double @llvm.fmuladd.f64(double %59, double 1.040000e+00, double %61)
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %62)
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
br label %65
65: ; preds = %55, %45
br label %66
66: ; preds = %65, %32
br label %67
67: ; preds = %66, %19
br label %68
68: ; preds = %67, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c" %lf\00"
@.str.1 = [22 x i8] c"Novo salario: %0.2lf\0A\00"
@.str.2 = [24 x i8] c"Reajuste ganho: %0.2lf\0A\00"
@.str.3 = [22 x i8] c"Em percentual: 15 %%\0A\00"
@.str.4 = [22 x i8] c"Em percentual: 12 %%\0A\00"
@.str.5 = [22 x i8] c"Em percentual: 10 %%\0A\00"
@.str.6 = [21 x i8] c"Em percentual: 7 %%\0A\00"
@.str.7 = [21 x i8] c"Em percentual: 4 %%\0A\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 ugt double %4, 4.000000e+02
br i1 %5, label %12, label %6
6: ; preds = %0
%7 = fmul double %4, 1.150000e+00
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %7)
%9 = load double, double* %1
%10 = fneg double %9
%11 = call double @llvm.fmuladd.f64(double %9, double 1.150000e+00, double %10)
br label %42
12: ; preds = %0
%13 = fcmp ugt double %4, 8.000000e+02
br i1 %13, label %20, label %14
14: ; preds = %12
%15 = fmul double %4, 1.120000e+00
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %15)
%17 = load double, double* %1
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double %17, double 1.120000e+00, double %18)
br label %42
20: ; preds = %12
%21 = fcmp ugt double %4, 1.200000e+03
br i1 %21, label %28, label %22
22: ; preds = %20
%23 = fmul double %4, 1.100000e+00
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %23)
%25 = load double, double* %1
%26 = fneg double %25
%27 = call double @llvm.fmuladd.f64(double %25, double 1.100000e+00, double %26)
br label %42
28: ; preds = %20
%29 = fcmp ugt double %4, 2.000000e+03
br i1 %29, label %36, label %30
30: ; preds = %28
%31 = fmul double %4, 1.070000e+00
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %31)
%33 = load double, double* %1
%34 = fneg double %33
%35 = call double @llvm.fmuladd.f64(double %33, double 1.070000e+00, double %34)
br label %42
36: ; preds = %28
%37 = fmul double %4, 1.040000e+00
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), double %37)
%39 = load double, double* %1
%40 = fneg double %39
%41 = call double @llvm.fmuladd.f64(double %39, double 1.040000e+00, double %40)
br label %42
42: ; preds = %14, %30, %36, %22, %6
%43 = phi double [ %19, %14 ], [ %35, %30 ], [ %41, %36 ], [ %27, %22 ], [ %11, %6 ]
%44 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), %14 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), %30 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), %36 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), %22 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), %6 ]
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), double %43)
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %44)
ret i32 0
}