#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 <= 2000) {
    salario = salario * 1.10;
  } else {
    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    11cc <main+0xac>
movss  0xe88(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11a9 <main+0x89>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe79(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11c7 <main+0xa7>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe4e(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11cc <main+0xac>
movss  -0x8(%rbp),%xmm0
lea    0xe4b(%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    1160 <main+0x40>
movss  0xeb7(%rip),%xmm1
ucomiss %xmm0,%xmm1
cvtss2sd %xmm0,%xmm0
jae    116e <main+0x4e>
mulsd  0xeba(%rip),%xmm0
jmp    1176 <main+0x56>
cvtss2sd %xmm0,%xmm0
mulsd  0xe9c(%rip),%xmm0
jmp    1176 <main+0x56>
mulsd  0xe9a(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
lea    0xe9c(%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 %25
11: ; preds = %0
%12 = load float, float* %2
%13 = fcmp ole float %12, 2.000000e+03
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load float, float* %2
%16 = fpext float %15 to double
%17 = fmul double %16, 1.100000e+00
%18 = fptrunc double %17 to float
store float %18, float* %2
br label %24
19: ; preds = %11
%20 = load float, float* %2
%21 = fpext float %20 to double
%22 = fmul double %21, 1.050000e+00
%23 = fptrunc double %22 to float
store float %23, float* %2
br label %24
24: ; preds = %19, %14
br label %25
25: ; preds = %24, %6
%26 = load float, float* %2
%27 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), float %26)
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 %19
10: ; preds = %0
%11 = fcmp ugt float %4, 2.000000e+03
%12 = fpext float %4 to double
br i1 %11, label %16, label %13
13: ; preds = %10
%14 = fmul double %12, 1.100000e+00
%15 = fptrunc double %14 to float
store float %15, float* %1
br label %19
16: ; preds = %10
%17 = fmul double %12, 1.050000e+00
%18 = fptrunc double %17 to float
store float %18, float* %1
br label %19
19: ; preds = %13, %16, %6
%20 = phi float [ %15, %13 ], [ %18, %16 ], [ %9, %6 ]
%21 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), float %20)
ret i32 0
}