#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 *);
main() {
  double salar, Nsalar, reajuste;
  scanf("%lf", &salar);
  if (salar >= 0 && salar <= 400) {
    reajuste = salar * 0.15;
    Nsalar = salar + reajuste;
    printf("Novo salario: %.2lf\n", Nsalar);
    printf("Reajuste ganho: %.2lf\n", reajuste);
    printf("Em percentual: 15 %%\n");
  } else if (salar > 400 && salar <= 800) {
    reajuste = salar * 0.12;
    Nsalar = salar + reajuste;
    printf("Novo salario: %.2lf\n", Nsalar);
    printf("Reajuste ganho: %.2lf\n", reajuste);
    printf("Em percentual: 12 %%\n");
  } else if (salar > 800 && salar <= 1200) {
    reajuste = salar * 0.10;
    Nsalar = salar + reajuste;
    printf("Novo salario: %.2lf\n", Nsalar);
    printf("Reajuste ganho: %.2lf\n", reajuste);
    printf("Em percentual: 10 %%\n");
  } else if (salar > 1200 && salar <= 2000) {
    reajuste = salar * 0.07;
    Nsalar = salar + reajuste;
    printf("Novo salario: %.2lf\n", Nsalar);
    printf("Reajuste ganho: %.2lf\n", reajuste);
    printf("Em percentual: 7 %%\n");
  } else {
    reajuste = salar * 0.04;
    Nsalar = salar + reajuste;
    printf("Novo salario: %.2lf\n", Nsalar);
    printf("Reajuste ganho: %.2lf\n", reajuste);
    printf("Em percentual: 4 %%\n");
  }
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf02(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11ce <main+0x9e>
movsd  0xe97(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     11ce <main+0x9e>
movsd  0xec4(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xeab(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xead(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13be <main+0x28e>
movsd  -0x10(%rbp),%xmm0
movsd  0xe25(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1252 <main+0x122>
movsd  0xe1b(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1252 <main+0x122>
movsd  0xe38(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe27(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xe29(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13b9 <main+0x289>
movsd  -0x10(%rbp),%xmm0
movsd  0xda9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    12d6 <main+0x1a6>
movsd  0xd9f(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     12d6 <main+0x1a6>
movsd  0xdac(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xda3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xda5(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xdda(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13b4 <main+0x284>
movsd  -0x10(%rbp),%xmm0
movsd  0xd2d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    135a <main+0x22a>
movsd  0xd23(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     135a <main+0x22a>
movsd  0xd20(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xd1f(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xd21(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xd6c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13af <main+0x27f>
movsd  0xcbe(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xcc5(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  -0x20(%rbp),%xmm0
lea    0xcc7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xd27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13b4 <main+0x284>
jmp    13b9 <main+0x289>
jmp    13be <main+0x28e>
lea    0xd1f(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xf0c(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1178 <main+0x48>
movsd  0xeaa(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     1178 <main+0x48>
lea    0xf0d(%rip),%rbx
movsd  0xe8d(%rip),%xmm1
jmp    120c <main+0xdc>
ucomisd 0xe88(%rip),%xmm0
jbe    11a1 <main+0x71>
movsd  0xe8e(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     11a1 <main+0x71>
lea    0xef7(%rip),%rbx
movsd  0xe71(%rip),%xmm1
jmp    120c <main+0xdc>
ucomisd 0xe6f(%rip),%xmm0
jbe    11ca <main+0x9a>
movsd  0xe75(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     11ca <main+0x9a>
lea    0xee4(%rip),%rbx
movsd  0xe58(%rip),%xmm1
jmp    120c <main+0xdc>
ucomisd 0xe56(%rip),%xmm0
seta   %al
movsd  0xe53(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
test   %cl,%al
jne    11f2 <main+0xc2>
movsd  0xe50(%rip),%xmm1
jmp    11fa <main+0xca>
movsd  0xe3e(%rip),%xmm1
lea    0xeb9(%rip),%rax
lea    0xec7(%rip),%rbx
cmovne %rax,%rbx
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
addsd  %xmm1,%xmm0
lea    0xe2c(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe33(%rip),%rdi
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe99(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [21 x i8] c"Novo salario: %.2lf\0A\00"
@.str.2 = [23 x i8] c"Reajuste ganho: %.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"
@.str.8 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%6 = load double, double* %2
%7 = fcmp oge double %6, 0.000000e+00
br i1 %7, label %8, label %22
8: ; preds = %0
%9 = load double, double* %2
%10 = fcmp ole double %9, 4.000000e+02
br i1 %10, label %11, label %22
11: ; preds = %8
%12 = load double, double* %2
%13 = fmul double %12, 1.500000e-01
store double %13, double* %4
%14 = load double, double* %2
%15 = load double, double* %4
%16 = fadd double %14, %15
store double %16, double* %3
%17 = load double, double* %3
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %17)
%19 = load double, double* %4
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
br label %87
22: ; preds = %8, %0
%23 = load double, double* %2
%24 = fcmp ogt double %23, 4.000000e+02
br i1 %24, label %25, label %39
25: ; preds = %22
%26 = load double, double* %2
%27 = fcmp ole double %26, 8.000000e+02
br i1 %27, label %28, label %39
28: ; preds = %25
%29 = load double, double* %2
%30 = fmul double %29, 1.200000e-01
store double %30, double* %4
%31 = load double, double* %2
%32 = load double, double* %4
%33 = fadd double %31, %32
store double %33, double* %3
%34 = load double, double* %3
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %34)
%36 = load double, double* %4
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %36)
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0))
br label %86
39: ; preds = %25, %22
%40 = load double, double* %2
%41 = fcmp ogt double %40, 8.000000e+02
br i1 %41, label %42, label %56
42: ; preds = %39
%43 = load double, double* %2
%44 = fcmp ole double %43, 1.200000e+03
br i1 %44, label %45, label %56
45: ; preds = %42
%46 = load double, double* %2
%47 = fmul double %46, 1.000000e-01
store double %47, double* %4
%48 = load double, double* %2
%49 = load double, double* %4
%50 = fadd double %48, %49
store double %50, double* %3
%51 = load double, double* %3
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %51)
%53 = load double, double* %4
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %53)
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %85
56: ; preds = %42, %39
%57 = load double, double* %2
%58 = fcmp ogt double %57, 1.200000e+03
br i1 %58, label %59, label %73
59: ; preds = %56
%60 = load double, double* %2
%61 = fcmp ole double %60, 2.000000e+03
br i1 %61, label %62, label %73
62: ; preds = %59
%63 = load double, double* %2
%64 = fmul double %63, 7.000000e-02
store double %64, double* %4
%65 = load double, double* %2
%66 = load double, double* %4
%67 = fadd double %65, %66
store double %67, double* %3
%68 = load double, double* %3
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %68)
%70 = load double, double* %4
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %70)
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
br label %84
73: ; preds = %59, %56
%74 = load double, double* %2
%75 = fmul double %74, 4.000000e-02
store double %75, double* %4
%76 = load double, double* %2
%77 = load double, double* %4
%78 = fadd double %76, %77
store double %78, double* %3
%79 = load double, double* %3
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %79)
%81 = load double, double* %4
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %81)
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0))
br label %84
84: ; preds = %73, %62
br label %85
85: ; preds = %84, %45
br label %86
86: ; preds = %85, %28
br label %87
87: ; preds = %86, %11
%88 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [21 x i8] c"Novo salario: %.2lf\0A\00"
@.str.2 = [23 x i8] c"Reajuste ganho: %.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"
@.str.8 = [6 x i8] c"pause\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 oge double %4, 0.000000e+00
%6 = fcmp ole double %4, 4.000000e+02
%7 = and i1 %5, %6
br i1 %7, label %22, label %8
8: ; preds = %0
%9 = fcmp ogt double %4, 4.000000e+02
%10 = fcmp ole double %4, 8.000000e+02
%11 = and i1 %9, %10
br i1 %11, label %22, label %12
12: ; preds = %8
%13 = fcmp ogt double %4, 8.000000e+02
%14 = fcmp ole double %4, 1.200000e+03
%15 = and i1 %13, %14
br i1 %15, label %22, label %16
16: ; preds = %12
%17 = fcmp ogt double %4, 1.200000e+03
%18 = fcmp ole double %4, 2.000000e+03
%19 = and i1 %17, %18
%20 = select i1 %19, double 7.000000e-02, double 4.000000e-02
%21 = select i1 %19, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0)
br label %22
22: ; preds = %16, %12, %8, %0
%23 = phi double [ 1.500000e-01, %0 ], [ 1.200000e-01, %8 ], [ 1.000000e-01, %12 ], [ %20, %16 ]
%24 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), %0 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), %8 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), %12 ], [ %21, %16 ]
%25 = fmul double %4, %23
%26 = fadd double %4, %25
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %26)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %25)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %24)
%30 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}