#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 *, float);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float salario;
  scanf("%f", &salario);
  if (salario <= 1000) {
    salario = salario * 1.15;
  } else if (salario > 1000 && salario <= 2000) {
    salario = salario * 1.10;
  } else if (salario > 2000) {
    salario = salario * 1.05;
  }
  printf("O novo salário é de: %f\n", salario);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  0xeb9(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1174 <main+0x54>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11fd <main+0xdd>
movss  -0x8(%rbp),%xmm0
movss  0xe7f(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11bf <main+0x9f>
movss  0xe72(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11bf <main+0x9f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe63(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11f8 <main+0xd8>
movss  -0x8(%rbp),%xmm0
movss  0xe38(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11f3 <main+0xd3>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe22(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11f8 <main+0xd8>
jmp    11fd <main+0xdd>
movss  -0x8(%rbp),%xmm0
lea    0xe1a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  0xec0(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1169 <main+0x49>
ucomiss 0xeb4(%rip),%xmm0
jbe    1177 <main+0x57>
movss  0xeae(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1177 <main+0x57>
cvtss2sd %xmm0,%xmm0
mulsd  0xeb1(%rip),%xmm0
jmp    118c <main+0x6c>
cvtss2sd %xmm0,%xmm0
mulsd  0xe93(%rip),%xmm0
jmp    118c <main+0x6c>
ucomiss 0xe86(%rip),%xmm0
jbe    1196 <main+0x76>
cvtss2sd %xmm0,%xmm0
mulsd  0xe84(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [27 x i8] c"O novo sal\C3\A1rio \C3\A9 de: %f\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, 1.000000e+03
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load float, float* %2
%8 = fpext float %7 to double
%9 = fmul double %8, 1.150000e+00
%10 = fptrunc double %9 to float
store float %10, float* %2
br label %32
11: ; preds = %0
%12 = load float, float* %2
%13 = fcmp ogt float %12, 1.000000e+03
br i1 %13, label %14, label %22
14: ; preds = %11
%15 = load float, float* %2
%16 = fcmp ole float %15, 2.000000e+03
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = load float, float* %2
%19 = fpext float %18 to double
%20 = fmul double %19, 1.100000e+00
%21 = fptrunc double %20 to float
store float %21, float* %2
br label %31
22: ; preds = %14, %11
%23 = load float, float* %2
%24 = fcmp ogt float %23, 2.000000e+03
br i1 %24, label %25, label %30
25: ; preds = %22
%26 = load float, float* %2
%27 = fpext float %26 to double
%28 = fmul double %27, 1.050000e+00
%29 = fptrunc double %28 to float
store float %29, float* %2
br label %30
30: ; preds = %25, %22
br label %31
31: ; preds = %30, %17
br label %32
32: ; preds = %31, %6
%33 = load float, float* %2
%34 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), float %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [27 x i8] c"O novo sal\C3\A1rio \C3\A9 de: %f\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, 1.000000e+03
br i1 %5, label %10, label %6
6: ; preds = %0
%7 = fpext float %4 to double
%8 = fmul double %7, 1.150000e+00
%9 = fptrunc double %8 to float
store float %9, float* %1
br label %24
10: ; preds = %0
%11 = fcmp ogt float %4, 1.000000e+03
%12 = fcmp ole float %4, 2.000000e+03
%13 = and i1 %11, %12
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = fpext float %4 to double
%16 = fmul double %15, 1.100000e+00
%17 = fptrunc double %16 to float
store float %17, float* %1
br label %24
18: ; preds = %10
%19 = fcmp ogt float %4, 2.000000e+03
br i1 %19, label %20, label %24
20: ; preds = %18
%21 = fpext float %4 to double
%22 = fmul double %21, 1.050000e+00
%23 = fptrunc double %22 to float
store float %23, float* %1
br label %24
24: ; preds = %14, %20, %18, %6
%25 = phi float [ %17, %14 ], [ %23, %20 ], [ %4, %18 ], [ %9, %6 ]
%26 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), float %25)
ret i32 0
}