#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(void) {
  float h, hT, ir, inss, sind, sl, sb;
  printf("Quanto você ganha por hora: \n");
  scanf("%f", &h);
  printf("Quantas horas você trabalha por Mês? \n");
  scanf("%f", &hT);
  sb = h * hT;
  ir = sb * 0.11;
  inss = sb * 0.08;
  sind = sb * 0.05;
  printf("Seu salário bruto é: %.2f\n", sb);
  printf("Você paga %.2f para o IR\n", ir);
  printf("Você paga %.2f para o INSS\n", inss);
  printf("Você paga %.2f para o sindicato\n", sind);
  printf("E seu salario Liquido fica em: %.2f\n", (sb - (ir + inss + sind)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe85(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe5f(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe39(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe7f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe85(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe89(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe8f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x20(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
addss  -0x14(%rbp),%xmm1
addss  -0x18(%rbp),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe87(%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    $0x30,%rsp
lea    0xf7b(%rip),%rdi
call   1030 <puts@plt>
lea    0xed0(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xf79(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
mulss  0x8(%rsp),%xmm0
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
movlhps %xmm0,%xmm1
mulpd  0xe6e(%rip),%xmm1
cvtpd2ps %xmm1,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  0xe6c(%rip),%xmm1
mulsd  %xmm0,%xmm1
cvtsd2ss %xmm1,%xmm1
movss  %xmm1,(%rsp)
lea    0xe63(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movaps 0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe69(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movaps 0x10(%rsp),%xmm0
shufps $0x55,%xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xe64(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe6a(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movaps 0x20(%rsp),%xmm0
addss  0x10(%rsp),%xmm0
addss  (%rsp),%xmm0
movaps %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe5d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"Quanto voc\C3\AA ganha por hora: \0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [41 x i8] c"Quantas horas voc\C3\AA trabalha por M\C3\AAs? \0A\00"
@.str.3 = [29 x i8] c"Seu sal\C3\A1rio bruto \C3\A9: %.2f\0A\00"
@.str.4 = [27 x i8] c"Voc\C3\AA paga %.2f para o IR\0A\00"
@.str.5 = [29 x i8] c"Voc\C3\AA paga %.2f para o INSS\0A\00"
@.str.6 = [34 x i8] c"Voc\C3\AA paga %.2f para o sindicato\0A\00"
@.str.7 = [37 x i8] c"E seu salario Liquido fica em: %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%13 = load float, float* %2
%14 = load float, float* %3
%15 = fmul float %13, %14
store float %15, float* %8
%16 = load float, float* %8
%17 = fpext float %16 to double
%18 = fmul double %17, 1.100000e-01
%19 = fptrunc double %18 to float
store float %19, float* %4
%20 = load float, float* %8
%21 = fpext float %20 to double
%22 = fmul double %21, 8.000000e-02
%23 = fptrunc double %22 to float
store float %23, float* %5
%24 = load float, float* %8
%25 = fpext float %24 to double
%26 = fmul double %25, 5.000000e-02
%27 = fptrunc double %26 to float
store float %27, float* %6
%28 = load float, float* %8
%29 = fpext float %28 to double
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double %29)
%31 = load float, float* %4
%32 = fpext float %31 to double
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %32)
%34 = load float, float* %5
%35 = fpext float %34 to double
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), double %35)
%37 = load float, float* %6
%38 = fpext float %37 to double
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), double %38)
%40 = load float, float* %8
%41 = load float, float* %4
%42 = load float, float* %5
%43 = fadd float %41, %42
%44 = load float, float* %6
%45 = fadd float %43, %44
%46 = fsub float %40, %45
%47 = fpext float %46 to double
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), double %47)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [29 x i8] c"Seu sal\C3\A1rio bruto \C3\A9: %.2f\0A\00"
@.str.4 = [27 x i8] c"Voc\C3\AA paga %.2f para o IR\0A\00"
@.str.5 = [29 x i8] c"Voc\C3\AA paga %.2f para o INSS\0A\00"
@.str.6 = [34 x i8] c"Voc\C3\AA paga %.2f para o sindicato\0A\00"
@.str.7 = [37 x i8] c"E seu salario Liquido fica em: %.2f\0A\00"
@str = [30 x i8] c"Quanto voc\C3\AA ganha por hora: \00"
@str.8 = [40 x i8] c"Quantas horas voc\C3\AA trabalha por M\C3\AAs? \00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.8, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%9 = load float, float* %1
%10 = load float, float* %2
%11 = fmul float %9, %10
%12 = fpext float %11 to double
%13 = insertelement <2 x double> poison, double %12, i64 0
%14 = shufflevector <2 x double> %13, <2 x double> poison, <2 x i32> zeroinitializer
%15 = fmul <2 x double> %14, <double 1.100000e-01, double 8.000000e-02>
%16 = fptrunc <2 x double> %15 to <2 x float>
%17 = fmul double %12, 5.000000e-02
%18 = fptrunc double %17 to float
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double %12)
%20 = extractelement <2 x float> %16, i64 0
%21 = fpext float %20 to double
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), double %21)
%23 = extractelement <2 x float> %16, i64 1
%24 = fpext float %23 to double
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0), double %24)
%26 = fpext float %18 to double
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), double %26)
%28 = fadd float %20, %23
%29 = fadd float %28, %18
%30 = fsub float %11, %29
%31 = fpext float %30 to double
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), double %31)
ret i32 0
}