#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 a;
  scanf("%lf", &a);
  if (a <= 400.00) {
    printf("Novo salario: %.2lf\n", a * 0.15 + a);
    printf("Reajuste ganho: %.2lf\n", a * 0.15);
    printf("Em percentual: 15 %\n");
  } else if (a <= 800.00) {
    printf("Novo salario: %.2lf\n", a * 0.12 + a);
    printf("Reajuste ganho: %.2lf\n", a * 0.12);
    printf("Em percentual: 12 %\n");
  } else if (a <= 1200.00) {
    printf("Novo salario: %.2lf\n", a * 0.10 + a);
    printf("Reajuste ganho: %.2lf\n", a * 0.10);
    printf("Em percentual: 10 %\n");
  } else if (a <= 2000.00) {
    printf("Novo salario: %.2lf\n", a * 0.07 + a);
    printf("Reajuste ganho: %.2lf\n", a * 0.07);
    printf("Em percentual: 7 %\n");
  } else if (a > 2000.00) {
    printf("Novo salario: %.2lf\n", a * 0.04 + a);
    printf("Reajuste ganho: %.2lf\n", a * 0.04);
    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     11a8 <main+0x88>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xedc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xed9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xebe(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xed3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    135f <main+0x23f>
movsd  0xe58(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1211 <main+0xf1>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe6b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xe70(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe4d(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xe6a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    135a <main+0x23a>
movsd  0xdf7(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     127a <main+0x15a>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xdfa(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xe07(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xddc(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xe01(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1355 <main+0x235>
movsd  0xd96(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     12e3 <main+0x1c3>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xd89(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xd9e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xd6b(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xd98(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1350 <main+0x230>
movsd  -0x10(%rbp),%xmm0
movsd  0xd28(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    134b <main+0x22b>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xd14(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
lea    0xd31(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xcf6(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
lea    0xd2b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1350 <main+0x230>
jmp    1355 <main+0x235>
jmp    135a <main+0x23a>
jmp    135f <main+0x23f>
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),%xmm1
movsd  0xebc(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    11c6 <main+0xa6>
movsd  0xebe(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    11fe <main+0xde>
movsd  0xebc(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    1233 <main+0x113>
movsd  0xeba(%rip),%xmm0
ucomisd %xmm1,%xmm0
jae    1268 <main+0x148>
ucomisd 0xea8(%rip),%xmm1
jbe    12b3 <main+0x193>
movapd %xmm1,%xmm0
mulsd  0xea6(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xea7(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe8c(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
lea    0xf0a(%rip),%rbx
jmp    129b <main+0x17b>
movapd %xmm1,%xmm0
mulsd  0xe36(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xe6f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe1c(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
lea    0xe7f(%rip),%rbx
jmp    129b <main+0x17b>
movapd %xmm1,%xmm0
mulsd  0xe0e(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xe37(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xdf4(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
lea    0xe5c(%rip),%rbx
jmp    129b <main+0x17b>
movapd %xmm1,%xmm0
mulsd  0xde9(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xe02(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xdcf(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
lea    0xe3c(%rip),%rbx
jmp    129b <main+0x17b>
movapd %xmm1,%xmm0
mulsd  0xdc4(%rip),%xmm0
addsd  %xmm1,%xmm0
lea    0xdcd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xdaa(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
lea    0xe1c(%rip),%rbx
lea    0xdbf(%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 = [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 = [21 x i8] c"Em percentual: 15 %\0A\00"
@.str.4 = [21 x i8] c"Em percentual: 12 %\0A\00"
@.str.5 = [21 x i8] c"Em percentual: 10 %\0A\00"
@.str.6 = [20 x i8] c"Em percentual: 7 %\0A\00"
@.str.7 = [20 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 ([4 x i8], [4 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 %15
6: ; preds = %0
%7 = load double, double* %2
%8 = load double, double* %2
%9 = call double @llvm.fmuladd.f64(double %7, double 1.500000e-01, double %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %9)
%11 = load double, double* %2
%12 = fmul double %11, 1.500000e-01
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0))
br label %67
15: ; preds = %0
%16 = load double, double* %2
%17 = fcmp ole double %16, 8.000000e+02
br i1 %17, label %18, label %27
18: ; preds = %15
%19 = load double, double* %2
%20 = load double, double* %2
%21 = call double @llvm.fmuladd.f64(double %19, double 1.200000e-01, double %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %21)
%23 = load double, double* %2
%24 = fmul double %23, 1.200000e-01
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %24)
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
br label %66
27: ; preds = %15
%28 = load double, double* %2
%29 = fcmp ole double %28, 1.200000e+03
br i1 %29, label %30, label %39
30: ; preds = %27
%31 = load double, double* %2
%32 = load double, double* %2
%33 = call double @llvm.fmuladd.f64(double %31, double 1.000000e-01, double %32)
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %33)
%35 = load double, double* %2
%36 = fmul double %35, 1.000000e-01
%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 ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
br label %65
39: ; preds = %27
%40 = load double, double* %2
%41 = fcmp ole double %40, 2.000000e+03
br i1 %41, label %42, label %51
42: ; preds = %39
%43 = load double, double* %2
%44 = load double, double* %2
%45 = call double @llvm.fmuladd.f64(double %43, double 7.000000e-02, double %44)
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %45)
%47 = load double, double* %2
%48 = fmul double %47, 7.000000e-02
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
br label %64
51: ; preds = %39
%52 = load double, double* %2
%53 = fcmp ogt double %52, 2.000000e+03
br i1 %53, label %54, label %63
54: ; preds = %51
%55 = load double, double* %2
%56 = load double, double* %2
%57 = call double @llvm.fmuladd.f64(double %55, double 4.000000e-02, double %56)
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %57)
%59 = load double, double* %2
%60 = fmul double %59, 4.000000e-02
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %60)
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
br label %63
63: ; preds = %54, %51
br label %64
64: ; preds = %63, %42
br label %65
65: ; preds = %64, %30
br label %66
66: ; preds = %65, %18
br label %67
67: ; preds = %66, %6
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 = [21 x i8] c"Em percentual: 15 %\0A\00"
@.str.4 = [21 x i8] c"Em percentual: 12 %\0A\00"
@.str.5 = [21 x i8] c"Em percentual: 10 %\0A\00"
@.str.6 = [20 x i8] c"Em percentual: 7 %\0A\00"
@.str.7 = [20 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 ([4 x i8], [4 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 %11, label %6
6: ; preds = %0
%7 = call double @llvm.fmuladd.f64(double %4, double 1.500000e-01, double %4)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %7)
%9 = load double, double* %1
%10 = fmul double %9, 1.500000e-01
br label %39
11: ; preds = %0
%12 = fcmp ugt double %4, 8.000000e+02
br i1 %12, label %18, label %13
13: ; preds = %11
%14 = call double @llvm.fmuladd.f64(double %4, double 1.200000e-01, double %4)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %14)
%16 = load double, double* %1
%17 = fmul double %16, 1.200000e-01
br label %39
18: ; preds = %11
%19 = fcmp ugt double %4, 1.200000e+03
br i1 %19, label %25, label %20
20: ; preds = %18
%21 = call double @llvm.fmuladd.f64(double %4, double 1.000000e-01, double %4)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %21)
%23 = load double, double* %1
%24 = fmul double %23, 1.000000e-01
br label %39
25: ; preds = %18
%26 = fcmp ugt double %4, 2.000000e+03
br i1 %26, label %32, label %27
27: ; preds = %25
%28 = call double @llvm.fmuladd.f64(double %4, double 7.000000e-02, double %4)
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %28)
%30 = load double, double* %1
%31 = fmul double %30, 7.000000e-02
br label %39
32: ; preds = %25
%33 = fcmp ogt double %4, 2.000000e+03
br i1 %33, label %34, label %44
34: ; preds = %32
%35 = call double @llvm.fmuladd.f64(double %4, double 4.000000e-02, double %4)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), double %35)
%37 = load double, double* %1
%38 = fmul double %37, 4.000000e-02
br label %39
39: ; preds = %6, %20, %34, %27, %13
%40 = phi double [ %17, %13 ], [ %31, %27 ], [ %38, %34 ], [ %24, %20 ], [ %10, %6 ]
%41 = phi i8* [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), %13 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), %27 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), %34 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), %20 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), %6 ]
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %40)
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %41)
br label %44
44: ; preds = %39, %32
ret i32 0
}