#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);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float salary;
  scanf("%f", &salary);
  printf("Novo salario: %.2f\n", (salary <= 400)    ? salary * 1.15
                                 : (salary <= 800)  ? salary * 1.12
                                 : (salary <= 1200) ? salary * 1.1
                                 : (salary <= 2000) ? salary * 1.07
                                                    : salary * 1.04);
  printf("Reajuste ganho: %.2f\n", (salary <= 400)    ? salary * 0.15
                                   : (salary <= 800)  ? salary * 0.12
                                   : (salary <= 1200) ? salary * 0.1
                                   : (salary <= 2000) ? salary * 0.07
                                                      : salary * 0.04);
  printf("Em percentual: %i %%\n", (salary <= 400)    ? 15
                                   : (salary <= 800)  ? 12
                                   : (salary <= 1200) ? 10
                                   : (salary <= 2000) ? 7
                                                      : 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf2a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xeb9(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1170 <main+0x50>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xece(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    123b <main+0x11b>
movss  0xe8c(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11a1 <main+0x81>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe95(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1231 <main+0x111>
movss  0xe5f(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11d2 <main+0xb2>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe5c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1227 <main+0x107>
movss  0xe32(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1203 <main+0xe3>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe23(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    121d <main+0xfd>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdfc(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%esi
lea    0xe18(%rip),%rdi
call   1030 <printf@plt>
movss  0xda8(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1281 <main+0x161>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xde5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    134c <main+0x22c>
movss  0xd7b(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     12b2 <main+0x192>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdac(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
jmp    1342 <main+0x222>
movss  0xd4e(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     12e3 <main+0x1c3>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd73(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
jmp    1338 <main+0x218>
movss  0xd21(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1314 <main+0x1f4>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd3a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    132e <main+0x20e>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd13(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%esi
lea    0xd1b(%rip),%rdi
call   1030 <printf@plt>
movss  0xc97(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1380 <main+0x260>
mov    $0xf,%eax
mov    %eax,-0x4c(%rbp)
jmp    13ea <main+0x2ca>
movss  0xc7c(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     139f <main+0x27f>
mov    $0xc,%eax
mov    %eax,-0x50(%rbp)
jmp    13e4 <main+0x2c4>
movss  0xc61(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     13be <main+0x29e>
mov    $0xa,%eax
mov    %eax,-0x54(%rbp)
jmp    13de <main+0x2be>
movss  -0x8(%rbp),%xmm1
movss  0xc41(%rip),%xmm0
mov    $0x4,%eax
mov    $0x7,%ecx
ucomiss %xmm1,%xmm0
cmovae %ecx,%eax
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%esi
lea    0xc99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf38(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  0xec0(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    117a <main+0x5a>
movss  0xeb7(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1188 <main+0x68>
movss  0xeae(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1196 <main+0x76>
movss  0xea5(%rip),%xmm1
ucomiss %xmm0,%xmm1
cvtss2sd %xmm0,%xmm0
jae    11a4 <main+0x84>
mulsd  0xeb8(%rip),%xmm0
jmp    11ac <main+0x8c>
cvtss2sd %xmm0,%xmm0
mulsd  0xe8a(%rip),%xmm0
jmp    11ac <main+0x8c>
cvtss2sd %xmm0,%xmm0
mulsd  0xe84(%rip),%xmm0
jmp    11ac <main+0x8c>
cvtss2sd %xmm0,%xmm0
mulsd  0xe7e(%rip),%xmm0
jmp    11ac <main+0x8c>
mulsd  0xe7c(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
movss  0xe36(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1204 <main+0xe4>
movss  0xe2d(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1212 <main+0xf2>
movss  0xe24(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1220 <main+0x100>
movss  0xe1b(%rip),%xmm1
ucomiss %xmm0,%xmm1
cvtss2sd %xmm0,%xmm0
jae    122e <main+0x10e>
mulsd  0xe56(%rip),%xmm0
jmp    1236 <main+0x116>
cvtss2sd %xmm0,%xmm0
mulsd  0xe28(%rip),%xmm0
jmp    1236 <main+0x116>
cvtss2sd %xmm0,%xmm0
mulsd  0xe22(%rip),%xmm0
jmp    1236 <main+0x116>
cvtss2sd %xmm0,%xmm0
mulsd  0xe1c(%rip),%xmm0
jmp    1236 <main+0x116>
mulsd  0xe1a(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
mov    $0xf,%esi
movss  0xda7(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1298 <main+0x178>
mov    $0xc,%esi
movss  0xd99(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1298 <main+0x178>
mov    $0xa,%esi
movss  0xd8b(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1298 <main+0x178>
movss  0xd82(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
lea    (%rax,%rax,2),%esi
or     $0x4,%esi
lea    0xdee(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [20 x i8] c"Novo salario: %.2f\0A\00"
@.str.2 = [22 x i8] c"Reajuste ganho: %.2f\0A\00"
@.str.3 = [22 x i8] c"Em percentual: %i %%\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = fcmp ole float %4, 4.000000e+02
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fmul double %8, 1.150000e+00
br label %41
10: ; preds = %0
%11 = load float, float* %2
%12 = fcmp ole float %11, 8.000000e+02
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load float, float* %2
%15 = fpext float %14 to double
%16 = fmul double %15, 1.120000e+00
br label %39
17: ; preds = %10
%18 = load float, float* %2
%19 = fcmp ole float %18, 1.200000e+03
br i1 %19, label %20, label %24
20: ; preds = %17
%21 = load float, float* %2
%22 = fpext float %21 to double
%23 = fmul double %22, 1.100000e+00
br label %37
24: ; preds = %17
%25 = load float, float* %2
%26 = fcmp ole float %25, 2.000000e+03
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = load float, float* %2
%29 = fpext float %28 to double
%30 = fmul double %29, 1.070000e+00
br label %35
31: ; preds = %24
%32 = load float, float* %2
%33 = fpext float %32 to double
%34 = fmul double %33, 1.040000e+00
br label %35
35: ; preds = %31, %27
%36 = phi double [ %30, %27 ], [ %34, %31 ]
br label %37
37: ; preds = %35, %20
%38 = phi double [ %23, %20 ], [ %36, %35 ]
br label %39
39: ; preds = %37, %13
%40 = phi double [ %16, %13 ], [ %38, %37 ]
br label %41
41: ; preds = %39, %6
%42 = phi double [ %9, %6 ], [ %40, %39 ]
%43 = fptosi double %42 to i32
%44 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %43)
%45 = load float, float* %2
%46 = fcmp ole float %45, 4.000000e+02
br i1 %46, label %47, label %51
47: ; preds = %41
%48 = load float, float* %2
%49 = fpext float %48 to double
%50 = fmul double %49, 1.500000e-01
br label %82
51: ; preds = %41
%52 = load float, float* %2
%53 = fcmp ole float %52, 8.000000e+02
br i1 %53, label %54, label %58
54: ; preds = %51
%55 = load float, float* %2
%56 = fpext float %55 to double
%57 = fmul double %56, 1.200000e-01
br label %80
58: ; preds = %51
%59 = load float, float* %2
%60 = fcmp ole float %59, 1.200000e+03
br i1 %60, label %61, label %65
61: ; preds = %58
%62 = load float, float* %2
%63 = fpext float %62 to double
%64 = fmul double %63, 1.000000e-01
br label %78
65: ; preds = %58
%66 = load float, float* %2
%67 = fcmp ole float %66, 2.000000e+03
br i1 %67, label %68, label %72
68: ; preds = %65
%69 = load float, float* %2
%70 = fpext float %69 to double
%71 = fmul double %70, 7.000000e-02
br label %76
72: ; preds = %65
%73 = load float, float* %2
%74 = fpext float %73 to double
%75 = fmul double %74, 4.000000e-02
br label %76
76: ; preds = %72, %68
%77 = phi double [ %71, %68 ], [ %75, %72 ]
br label %78
78: ; preds = %76, %61
%79 = phi double [ %64, %61 ], [ %77, %76 ]
br label %80
80: ; preds = %78, %54
%81 = phi double [ %57, %54 ], [ %79, %78 ]
br label %82
82: ; preds = %80, %47
%83 = phi double [ %50, %47 ], [ %81, %80 ]
%84 = fptosi double %83 to i32
%85 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %84)
%86 = load float, float* %2
%87 = fcmp ole float %86, 4.000000e+02
br i1 %87, label %88, label %89
88: ; preds = %82
br label %106
89: ; preds = %82
%90 = load float, float* %2
%91 = fcmp ole float %90, 8.000000e+02
br i1 %91, label %92, label %93
92: ; preds = %89
br label %104
93: ; preds = %89
%94 = load float, float* %2
%95 = fcmp ole float %94, 1.200000e+03
br i1 %95, label %96, label %97
96: ; preds = %93
br label %102
97: ; preds = %93
%98 = load float, float* %2
%99 = fcmp ole float %98, 2.000000e+03
%100 = zext i1 %99 to i64
%101 = select i1 %99, i32 7, i32 4
br label %102
102: ; preds = %97, %96
%103 = phi i32 [ 10, %96 ], [ %101, %97 ]
br label %104
104: ; preds = %102, %92
%105 = phi i32 [ 12, %92 ], [ %103, %102 ]
br label %106
106: ; preds = %104, %88
%107 = phi i32 [ 15, %88 ], [ %105, %104 ]
%108 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), i32 %107)
ret i32 0
}

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