#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 *, ...);
main() {
  int nad, inss, salario;
  float vha, desconto, salario_liquido;
  printf("VHA: ");
  scanf("%f", &vha);
  printf("NAD: ");
  scanf("%i", &nad);
  printf("INSS: ");
  scanf("%i", &inss);
  salario = vha * nad;
  desconto = salario * inss / 100;
  salario_liquido = salario - desconto;
  printf("\nSalario: %i", salario);
  printf("\nDesconto: %f", desconto);
  printf("\nSalario liquido: %f", salario_liquido);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea0(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  -0x10(%rbp),%xmm0
cvtsi2ssl -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
cvtsi2ssl -0xc(%rbp),%xmm0
subss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe3b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe32(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xeb9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec2(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
cvtsi2ssl 0xc(%rsp),%xmm0
mulss  0x4(%rsp),%xmm0
cvttss2si %xmm0,%esi
mov    0x8(%rsp),%eax
imul   %esi,%eax
cltq
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
cvtsi2ss %eax,%xmm1
movss  %xmm1,(%rsp)
cvttps2dq %xmm0,%xmm0
cvtdq2ps %xmm0,%xmm0
subss  %xmm1,%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xe3f(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe35(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movaps 0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe2c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"VHA: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [6 x i8] c"NAD: \00"
@.str.3 = [3 x i8] c"%i\00"
@.str.4 = [7 x i8] c"INSS: \00"
@.str.5 = [13 x i8] c"\0ASalario: %i\00"
@.str.6 = [14 x i8] c"\0ADesconto: %f\00"
@.str.7 = [21 x i8] c"\0ASalario liquido: %f\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*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%13 = load float, float* %4
%14 = load i32, i32* %1
%15 = sitofp i32 %14 to float
%16 = fmul float %13, %15
%17 = fptosi float %16 to i32
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = load i32, i32* %2
%20 = mul nsw i32 %18, %19
%21 = sdiv i32 %20, 100
%22 = sitofp i32 %21 to float
store float %22, float* %5
%23 = load i32, i32* %3
%24 = sitofp i32 %23 to float
%25 = load float, float* %5
%26 = fsub float %24, %25
store float %26, float* %6
%27 = load i32, i32* %3
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %27)
%29 = load float, float* %5
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), double %30)
%32 = load float, float* %6
%33 = fpext float %32 to double
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"VHA: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [6 x i8] c"NAD: \00"
@.str.3 = [3 x i8] c"%i\00"
@.str.4 = [7 x i8] c"INSS: \00"
@.str.5 = [13 x i8] c"\0ASalario: %i\00"
@.str.6 = [14 x i8] c"\0ADesconto: %f\00"
@.str.7 = [21 x i8] c"\0ASalario liquido: %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%13 = load float, float* %3
%14 = load i32, i32* %1
%15 = sitofp i32 %14 to float
%16 = fmul float %13, %15
%17 = fptosi float %16 to i32
%18 = load i32, i32* %2
%19 = mul nsw i32 %18, %17
%20 = sdiv i32 %19, 100
%21 = sitofp i32 %20 to float
%22 = sitofp i32 %17 to float
%23 = fsub float %22, %21
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i32 %17)
%25 = fpext float %21 to double
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), double %25)
%27 = fpext float %23 to double
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double %27)
ret i32 0
}