#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 Sb, Sl, ir, fgts, inss, irDesc, h, vH, total;
  printf("Insira quantas horas você trabalha por dia:  \n");
  scanf("%f", &h);
  printf("Insira o valor de sua hora; \n");
  scanf("%f", &vH);
  Sb = (h * vH);
  if (Sb <= 900) {
    irDesc = 0;
  } else if (Sb > 901 && Sb <= 1500) {
    irDesc = 5;
  } else if (Sb > 1500 && Sb <= 2500) {
    irDesc = 10;
  } else if (Sb > 2500) {
    irDesc = 20;
  }
  ir = (Sb * irDesc) / 100;
  inss = (Sb * 10) / 100;
  fgts = (Sb * 11) / 100;
  total = (ir + inss + fgts);
  printf("Salario bruto:  (%.2f * %.2f)  R$%.2f\n", h, vH, Sb);
  printf("IR:   %.2f\n", ir);
  printf("INSS: %.2f\n", inss);
  printf("FGTS:  %.2f\n", fgts);
  printf("Total de descontos: %.2f\n", total);
  printf("Salario liquido: %.2f\n", (Sb - total));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf10(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x20(%rbp),%xmm0
mulss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe7e(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1199 <main+0x79>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    123f <main+0x11f>
movss  -0x8(%rbp),%xmm0
movss  0xe5e(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11d3 <main+0xb3>
movss  0xe51(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11d3 <main+0xb3>
movss  0xe4f(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    123a <main+0x11a>
movss  -0x8(%rbp),%xmm0
movss  0xe28(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    120d <main+0xed>
movss  0xe1b(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     120d <main+0xed>
movss  0xe11(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1235 <main+0x115>
movss  -0x8(%rbp),%xmm0
movss  0xdf2(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1230 <main+0x110>
movss  0xde5(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    1235 <main+0x115>
jmp    123a <main+0x11a>
jmp    123f <main+0x11f>
movss  -0x8(%rbp),%xmm0
mulss  -0x1c(%rbp),%xmm0
movss  0xdcb(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xdb2(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xdad(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xda0(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xd8f(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0x18(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x24(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xda9(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdb9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdae(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xda3(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd99(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
subss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd97(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0xf94(%rip),%rdi
call   1030 <puts@plt>
lea    0xf08(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xfa3(%rip),%rdi
call   1030 <puts@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movaps %xmm0,%xmm4
mulss  %xmm1,%xmm4
xorps  %xmm5,%xmm5
movss  0xe74(%rip),%xmm2
ucomiss %xmm4,%xmm2
jae    11eb <main+0xbb>
ucomiss 0xe6c(%rip),%xmm4
jbe    11b1 <main+0x81>
movss  0xe6a(%rip),%xmm2
ucomiss %xmm4,%xmm2
jb     11b1 <main+0x81>
movss  0xe59(%rip),%xmm5
jmp    11eb <main+0xbb>
movss  0xe57(%rip),%xmm2
xor    %eax,%eax
ucomiss %xmm4,%xmm2
setae  %al
lea    0xe54(%rip),%rcx
movss  (%rcx,%rax,4),%xmm2
movss  0xe37(%rip),%xmm5
cmpltss %xmm4,%xmm5
andps  %xmm5,%xmm2
movss  0xe2f(%rip),%xmm3
andnps %xmm3,%xmm5
orps   %xmm2,%xmm5
mulss  %xmm4,%xmm5
divss  0xe21(%rip),%xmm5
movaps %xmm5,0x20(%rsp)
movaps %xmm4,%xmm3
shufps $0x0,%xmm4,%xmm3
mulps  0xe26(%rip),%xmm3
divps  0xe2f(%rip),%xmm3
movaps %xmm3,0x40(%rsp)
movaps %xmm3,%xmm2
shufps $0x55,%xmm3,%xmm2
movaps %xmm2,0x30(%rsp)
addss  %xmm5,%xmm2
addss  %xmm3,%xmm2
movaps %xmm2,0x10(%rsp)
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
cvtss2sd %xmm4,%xmm2
lea    0xe0e(%rip),%rdi
mov    $0x3,%al
movaps %xmm4,0x50(%rsp)
call   1040 <printf@plt>
movaps 0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe19(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movaps 0x30(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe0e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movaps 0x40(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe03(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movaps 0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdf9(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movaps 0x50(%rsp),%xmm0
subss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdf6(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [48 x i8] c"Insira quantas horas voc\C3\AA trabalha por dia: \0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [30 x i8] c"Insira o valor de sua hora; \0A\00"
@.str.3 = [39 x i8] c"Salario bruto: (%.2f * %.2f) R$%.2f\0A\00"
@.str.4 = [12 x i8] c"IR: %.2f\0A\00"
@.str.5 = [12 x i8] c"INSS: %.2f\0A\00"
@.str.6 = [13 x i8] c"FGTS: %.2f\0A\00"
@.str.7 = [26 x i8] c"Total de descontos: %.2f\0A\00"
@.str.8 = [23 x i8] c"Salario liquido: %.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
%9 = alloca float
%10 = alloca float
store i32 0, i32* %1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %8)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %9)
%15 = load float, float* %8
%16 = load float, float* %9
%17 = fmul float %15, %16
store float %17, float* %2
%18 = load float, float* %2
%19 = fcmp ole float %18, 9.000000e+02
br i1 %19, label %20, label %21
20: ; preds = %0
store float 0.000000e+00, float* %7
br label %42
21: ; preds = %0
%22 = load float, float* %2
%23 = fcmp ogt float %22, 9.010000e+02
br i1 %23, label %24, label %28
24: ; preds = %21
%25 = load float, float* %2
%26 = fcmp ole float %25, 1.500000e+03
br i1 %26, label %27, label %28
27: ; preds = %24
store float 5.000000e+00, float* %7
br label %41
28: ; preds = %24, %21
%29 = load float, float* %2
%30 = fcmp ogt float %29, 1.500000e+03
br i1 %30, label %31, label %35
31: ; preds = %28
%32 = load float, float* %2
%33 = fcmp ole float %32, 2.500000e+03
br i1 %33, label %34, label %35
34: ; preds = %31
store float 1.000000e+01, float* %7
br label %40
35: ; preds = %31, %28
%36 = load float, float* %2
%37 = fcmp ogt float %36, 2.500000e+03
br i1 %37, label %38, label %39
38: ; preds = %35
store float 2.000000e+01, float* %7
br label %39
39: ; preds = %38, %35
br label %40
40: ; preds = %39, %34
br label %41
41: ; preds = %40, %27
br label %42
42: ; preds = %41, %20
%43 = load float, float* %2
%44 = load float, float* %7
%45 = fmul float %43, %44
%46 = fdiv float %45, 1.000000e+02
store float %46, float* %4
%47 = load float, float* %2
%48 = fmul float %47, 1.000000e+01
%49 = fdiv float %48, 1.000000e+02
store float %49, float* %6
%50 = load float, float* %2
%51 = fmul float %50, 1.100000e+01
%52 = fdiv float %51, 1.000000e+02
store float %52, float* %5
%53 = load float, float* %4
%54 = load float, float* %6
%55 = fadd float %53, %54
%56 = load float, float* %5
%57 = fadd float %55, %56
store float %57, float* %10
%58 = load float, float* %8
%59 = fpext float %58 to double
%60 = load float, float* %9
%61 = fpext float %60 to double
%62 = load float, float* %2
%63 = fpext float %62 to double
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), double %59, double %61, double %63)
%65 = load float, float* %4
%66 = fpext float %65 to double
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), double %66)
%68 = load float, float* %6
%69 = fpext float %68 to double
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), double %69)
%71 = load float, float* %5
%72 = fpext float %71 to double
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), double %72)
%74 = load float, float* %10
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), double %75)
%77 = load float, float* %2
%78 = load float, float* %10
%79 = fsub float %77, %78
%80 = fpext float %79 to double
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), double %80)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.3 = [39 x i8] c"Salario bruto: (%.2f * %.2f) R$%.2f\0A\00"
@.str.4 = [12 x i8] c"IR: %.2f\0A\00"
@.str.5 = [12 x i8] c"INSS: %.2f\0A\00"
@.str.6 = [13 x i8] c"FGTS: %.2f\0A\00"
@.str.7 = [26 x i8] c"Total de descontos: %.2f\0A\00"
@.str.8 = [23 x i8] c"Salario liquido: %.2f\0A\00"
@str = [47 x i8] c"Insira quantas horas voc\C3\AA trabalha por dia: \00"
@str.9 = [29 x i8] c"Insira o valor de sua hora; \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 ([47 x i8], [47 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 ([29 x i8], [29 x i8]* @str.9, 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 = fcmp ugt float %11, 9.000000e+02
br i1 %12, label %13, label %22
13: ; preds = %0
%14 = fcmp ogt float %11, 9.010000e+02
%15 = fcmp ole float %11, 1.500000e+03
%16 = and i1 %14, %15
br i1 %16, label %22, label %17
17: ; preds = %13
%18 = fcmp ogt float %11, 1.500000e+03
%19 = fcmp ole float %11, 2.500000e+03
%20 = and i1 %18, %19
%21 = select i1 %20, float 1.000000e+01, float 2.000000e+01
br label %22
22: ; preds = %17, %13, %0
%23 = phi float [ 0.000000e+00, %0 ], [ 5.000000e+00, %13 ], [ %21, %17 ]
%24 = fmul float %11, %23
%25 = fdiv float %24, 1.000000e+02
%26 = insertelement <2 x float> poison, float %11, i64 0
%27 = shufflevector <2 x float> %26, <2 x float> poison, <2 x i32> zeroinitializer
%28 = fmul <2 x float> %27, <float 1.100000e+01, float 1.000000e+01>
%29 = fdiv <2 x float> %28, <float 1.000000e+02, float 1.000000e+02>
%30 = extractelement <2 x float> %29, i64 1
%31 = fadd float %30, %25
%32 = extractelement <2 x float> %29, i64 0
%33 = fadd float %32, %31
%34 = fpext float %9 to double
%35 = fpext float %10 to double
%36 = fpext float %11 to double
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), double %34, double %35, double %36)
%38 = fpext float %25 to double
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), double %38)
%40 = fpext float %30 to double
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), double %40)
%42 = fpext float %32 to double
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), double %42)
%44 = fpext float %33 to double
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), double %44)
%46 = fsub float %11, %33
%47 = fpext float %46 to double
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), double %47)
ret i32 0
}