#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 *, ...);
int main() {
  int numeroFuncionario, horasTrabalhadas, numeroFilhos;
  float valorHora, valorSalarioFamilia;
  scanf("%i", &numeroFuncionario);
  scanf("%i", &horasTrabalhadas);
  scanf("%f", &valorHora);
  scanf("%i", &numeroFilhos);
  scanf("%f", &valorSalarioFamilia);
  float valorSalario =
      horasTrabalhadas * valorHora + numeroFilhos * valorSalarioFamilia;
  printf("NUMERO DO FUNCIONARIO = %i\n", numeroFuncionario);
  printf("SALARIO TOTAL = %.2f\n", valorSalario);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb0(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe9b(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe8c(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cvtsi2ssl -0x8(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
cvtsi2ssl -0xc(%rbp),%xmm1
mulss  -0x14(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
lea    0xe62(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xed2(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xeb0(%rip),%r14
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cvtsi2ssl 0x10(%rsp),%xmm1
cvtsi2ssl 0xc(%rsp),%xmm0
mulss  0x4(%rsp),%xmm0
mulss  0x8(%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssl 0x14(%rsp),%xmm0
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
lea    0xe65(%rip),%rdi
movss  (%rsp),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"NUMERO DO FUNCIONARIO = %i\0A\00"
@.str.3 = [22 x i8] c"SALARIO TOTAL = %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%12 = load i32, i32* %2
%13 = sitofp i32 %12 to float
%14 = load float, float* %4
%15 = load i32, i32* %3
%16 = sitofp i32 %15 to float
%17 = load float, float* %5
%18 = fmul float %16, %17
%19 = call float @llvm.fmuladd.f32(float %13, float %14, float %18)
store float %19, float* %6
%20 = load i32, i32* %1
%21 = sitofp i32 %20 to float
%22 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), float %21)
%23 = load float, float* %6
%24 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), float %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [28 x i8] c"NUMERO DO FUNCIONARIO = %i\0A\00"
@.str.3 = [22 x i8] c"SALARIO TOTAL = %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast i32* %3 to i8*
%9 = bitcast float* %4 to i8*
%10 = bitcast float* %5 to i8*
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %5)
%16 = load i32, i32* %2
%17 = sitofp i32 %16 to float
%18 = load float, float* %4
%19 = load i32, i32* %3
%20 = sitofp i32 %19 to float
%21 = load float, float* %5
%22 = fmul float %21, %20
%23 = call float @llvm.fmuladd.f32(float %17, float %18, float %22)
%24 = load i32, i32* %1
%25 = sitofp i32 %24 to float
%26 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), float %25)
%27 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0), float %23)
ret i32 0
}