#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 /*<<< orphan*/ system(char *);
main() {
  float salario_bruto, salario_limite = 1200, salario_liquido, desconto = 0.07;
  printf("Qual o seu salario bruto (R$)? ");
  scanf("%f", &salario_bruto);
  if (salario_bruto <= salario_limite) {
    salario_liquido = salario_bruto - (salario_bruto * desconto);
  } else {
    salario_liquido = salario_bruto;
  }
  printf("O seu salario liquido e R$ %.2f\n", salario_liquido);
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xeac(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     11b8 <main+0x88>
movss  -0x8(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    11c2 <main+0x92>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe59(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe6c(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm0
movss  0xea2(%rip),%xmm1
mulss  %xmm0,%xmm1
addss  %xmm0,%xmm1
movaps %xmm0,%xmm2
cmpnless 0xe92(%rip),%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
lea    0xea2(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xeb5(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Qual o seu salario bruto (R$)? \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [33 x i8] c"O seu salario liquido e R$ %.2f\0A\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store float 1.200000e+03, float* %3
store float 0x3FB1EB8520000000, float* %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%8 = load float, float* %2
%9 = load float, float* %3
%10 = fcmp ole float %8, %9
br i1 %10, label %11, label %17
11: ; preds = %0
%12 = load float, float* %2
%13 = load float, float* %2
%14 = load float, float* %5
%15 = fneg float %13
%16 = call float @llvm.fmuladd.f32(float %15, float %14, float %12)
store float %16, float* %4
br label %19
17: ; preds = %0
%18 = load float, float* %2
store float %18, float* %4
br label %19
19: ; preds = %17, %11
%20 = load float, float* %4
%21 = fpext float %20 to double
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), double %21)
%23 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%24 = load i32, i32* %1
ret i32 %24
}

LLVM IR (-O2):
@.str = [32 x i8] c"Qual o seu salario bruto (R$)? \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [33 x i8] c"O seu salario liquido e R$ %.2f\0A\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 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 ugt float %5, 1.200000e+03
%7 = fneg float %5
%8 = call float @llvm.fmuladd.f32(float %7, float 0x3FB1EB8520000000, float %5)
%9 = select i1 %6, float %5, float %8
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), double %10)
%12 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}