#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 *, float *);
int main() {
  float v, vt;
  printf("\nQual o valor do salario?\n");
  scanf("%f", &v);
  if (v > 1000) {
    vt = v + (v * 5 / 100);
    printf("\nO salario e: %.2f\n", vt);
  } else {
    vt = v + (v * 7 / 100);
    printf("\nO salario e: %.2f\n", vt);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xea6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11a6 <main+0x86>
movss  -0x8(%rbp),%xmm0
movss  0xe9c(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe87(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe94(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    11e4 <main+0xc4>
movss  -0x8(%rbp),%xmm0
movss  0xe55(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
movss  0xe44(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe51(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeef(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
xor    %eax,%eax
ucomiss 0xea3(%rip),%xmm0
seta   %al
lea    0xea1(%rip),%rcx
movss  (%rcx,%rax,4),%xmm1
mulss  %xmm0,%xmm1
divss  0xe8c(%rip),%xmm1
addss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe89(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\0AQual o valor do salario?\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [20 x i8] c"\0AO salario e: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%6 = load float, float* %2
%7 = fcmp ogt float %6, 1.000000e+03
br i1 %7, label %8, label %17
8: ; preds = %0
%9 = load float, float* %2
%10 = load float, float* %2
%11 = fmul float %10, 5.000000e+00
%12 = fdiv float %11, 1.000000e+02
%13 = fadd float %9, %12
store float %13, float* %3
%14 = load float, float* %3
%15 = fpext float %14 to double
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %15)
br label %26
17: ; preds = %0
%18 = load float, float* %2
%19 = load float, float* %2
%20 = fmul float %19, 7.000000e+00
%21 = fdiv float %20, 1.000000e+02
%22 = fadd float %18, %21
store float %22, float* %3
%23 = load float, float* %3
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %24)
br label %26
26: ; preds = %17, %8
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [20 x i8] c"\0AO salario e: %.2f\0A\00"
@str = [26 x i8] c"\0AQual o valor do salario?\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fcmp ogt float %5, 1.000000e+03
%7 = select i1 %6, float 5.000000e+00, float 7.000000e+00
%8 = fmul float %5, %7
%9 = fdiv float %8, 1.000000e+02
%10 = fadd float %5, %9
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), double %11)
ret i32 0
}