#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;
  }
  if (salario > 1000 && salario <= 2000) {
    salario = salario * 1.10;
  }
  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     116f <main+0x4f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xea6(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe84(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11b5 <main+0x95>
movss  0xe77(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11b5 <main+0x95>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe68(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe42(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11e9 <main+0xc9>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe3c(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xe2e(%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
jb     115b <main+0x3b>
cvtss2sd %xmm0,%xmm0
mulsd  0xeb7(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
ucomiss 0xe9e(%rip),%xmm0
jbe    1187 <main+0x67>
movss  0xe98(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     1187 <main+0x67>
cvtss2sd %xmm0,%xmm0
mulsd  0xe93(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
ucomiss 0xe76(%rip),%xmm0
jbe    11a6 <main+0x86>
cvtss2sd %xmm0,%xmm0
mulsd  0xe7c(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
lea    0xe76(%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 %11
11: ; preds = %6, %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 %22
22: ; preds = %17, %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
%31 = load float, float* %2
%32 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), float %31)
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 %10
10: ; preds = %6, %0
%11 = phi float [ %9, %6 ], [ %4, %0 ]
%12 = fcmp ogt float %11, 1.000000e+03
%13 = fcmp ole float %11, 2.000000e+03
%14 = and i1 %12, %13
br i1 %14, label %15, label %19
15: ; preds = %10
%16 = fpext float %11 to double
%17 = fmul double %16, 1.100000e+00
%18 = fptrunc double %17 to float
store float %18, float* %1
br label %19
19: ; preds = %15, %10
%20 = phi float [ %18, %15 ], [ %11, %10 ]
%21 = fcmp ogt float %20, 2.000000e+03
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = fpext float %20 to double
%24 = fmul double %23, 1.050000e+00
%25 = fptrunc double %24 to float
store float %25, float* %1
br label %26
26: ; preds = %22, %19
%27 = phi float [ %25, %22 ], [ %20, %19 ]
%28 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), float %27)
ret i32 0
}