#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 *, ...);
int main() {
  char resp;
  do {
    int cont = 1, tinss;
    char s, nome[50];
    float sal, novosala, val;
    printf("\n digite o nome do funcionario; ");
    scanf("%s", &nome);
    printf("\n digite o salario do funcionario: ");
    scanf("%f", &sal);
    if (sal <= 500) {
      novosala = sal - ((sal / 100) * 8);
      val = (sal / 100) * 8;
      tinss = 8;
    } else if (sal > 500 && sal <= 1000) {
      novosala = sal - ((sal / 100) * 10);
      val = (sal / 100) * 10;
      tinss = 10;
    } else if (sal > 1000) {
      novosala = sal - ((sal / 100) * 12);
      val = (sal / 100) * 12;
      tinss = 12;
    }
    printf("\n Nome: %s \n", nome);
    printf("\n Salario bruto: %f \n", sal);
    printf("\n Taxa de INSS: %d% \n", tinss);
    printf("\n Valor de INSS %f \n", val);
    printf("\n Salario liquido: %f \n", novosala);
    printf("\n deseja continuar ? \n");
    scanf("%s", &resp);
    cont = cont + 1;
  } while (resp == 's');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xedf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
lea    -0x54(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  0xe82(%rip),%xmm0
ucomiss -0x54(%rbp),%xmm0
jb     11ee <main+0xce>
movss  -0x54(%rbp),%xmm1
movss  -0x54(%rbp),%xmm0
movss  0xe72(%rip),%xmm2
divss  %xmm2,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xe61(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x54(%rbp),%xmm0
movss  0xe3f(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe3b(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movl   $0x8,-0x10(%rbp)
jmp    12fd <main+0x1dd>
movss  -0x54(%rbp),%xmm0
movss  0xe05(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    127c <main+0x15c>
movss  0xdf8(%rip),%xmm0
ucomiss -0x54(%rbp),%xmm0
jb     127c <main+0x15c>
movss  -0x54(%rbp),%xmm1
movss  -0x54(%rbp),%xmm0
movss  0xde4(%rip),%xmm2
divss  %xmm2,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xdcf(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x54(%rbp),%xmm0
movss  0xdb1(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xda9(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movl   $0xa,-0x10(%rbp)
jmp    12f8 <main+0x1d8>
movss  -0x54(%rbp),%xmm0
movss  0xd7b(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    12f3 <main+0x1d3>
movss  -0x54(%rbp),%xmm1
movss  -0x54(%rbp),%xmm0
movss  0xd68(%rip),%xmm2
divss  %xmm2,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xd4b(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x58(%rbp)
movss  -0x54(%rbp),%xmm0
movss  0xd35(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xd25(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0x5c(%rbp)
movl   $0xc,-0x10(%rbp)
jmp    12f8 <main+0x1d8>
jmp    12fd <main+0x1dd>
lea    -0x50(%rbp),%rsi
lea    0xd5b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x54(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd51(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xd56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x5c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd55(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x58(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd53(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xd5d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xcbf(%rip),%rdi
lea    -0x5(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x73,%eax
je     112f <main+0xf>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xef4(%rip),%r15
lea    0x10(%rsp),%rbx
lea    0xf60(%rip),%r14
lea    0xf71(%rip),%r12
lea    0x3(%rsp),%r13
jmp    1220 <main+0xf0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movaps %xmm0,%xmm1
divss  0xe89(%rip),%xmm1
mulss  0xe85(%rip),%xmm1
subss  %xmm1,%xmm0
mov    $0x8,%ebp
movaps %xmm0,%xmm2
movss  %xmm1,0x8(%rsp)
movss  %xmm2,0x4(%rsp)
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xebb(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb7(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
cmpb   $0x73,0x3(%rsp)
jne    12ea <main+0x1ba>
lea    0xdf1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xdfa(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe10(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0xd96(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    1170 <main+0x40>
ucomiss %xmm1,%xmm0
jbe    12b0 <main+0x180>
movss  0xd8c(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     12b0 <main+0x180>
movaps %xmm0,%xmm1
divss  0xd74(%rip),%xmm1
mulss  0xd7c(%rip),%xmm1
subss  %xmm1,%xmm0
mov    $0xa,%ebp
jmp    118c <main+0x5c>
cs nopw 0x0(%rax,%rax,1)
ucomiss 0xd55(%rip),%xmm0
movss  0x8(%rsp),%xmm1
movss  0x4(%rsp),%xmm2
jbe    118f <main+0x5f>
movaps %xmm0,%xmm1
divss  0xd30(%rip),%xmm1
mulss  0xd34(%rip),%xmm1
subss  %xmm1,%xmm0
mov    $0xc,%ebp
jmp    118c <main+0x5c>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"\0A digite o nome do funcionario; \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [36 x i8] c"\0A digite o salario do funcionario: \00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [13 x i8] c"\0A Nome: %s \0A\00"
@.str.5 = [22 x i8] c"\0A Salario bruto: %f \0A\00"
@.str.6 = [22 x i8] c"\0A Taxa de INSS: %d% \0A\00"
@.str.7 = [21 x i8] c"\0A Valor de INSS %f \0A\00"
@.str.8 = [24 x i8] c"\0A Salario liquido: %f \0A\00"
@.str.9 = [23 x i8] c"\0A deseja continuar ? \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
%6 = alloca [50 x i8]
%7 = alloca float
%8 = alloca float
%9 = alloca float
store i32 0, i32* %1
br label %10
10: ; preds = %73, %0
store i32 1, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [50 x i8]* %6)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %7)
%15 = load float, float* %7
%16 = fcmp ole float %15, 5.000000e+02
br i1 %16, label %17, label %26
17: ; preds = %10
%18 = load float, float* %7
%19 = load float, float* %7
%20 = fdiv float %19, 1.000000e+02
%21 = fneg float %20
%22 = call float @llvm.fmuladd.f32(float %21, float 8.000000e+00, float %18)
store float %22, float* %8
%23 = load float, float* %7
%24 = fdiv float %23, 1.000000e+02
%25 = fmul float %24, 8.000000e+00
store float %25, float* %9
store i32 8, i32* %4
br label %55
26: ; preds = %10
%27 = load float, float* %7
%28 = fcmp ogt float %27, 5.000000e+02
br i1 %28, label %29, label %41
29: ; preds = %26
%30 = load float, float* %7
%31 = fcmp ole float %30, 1.000000e+03
br i1 %31, label %32, label %41
32: ; preds = %29
%33 = load float, float* %7
%34 = load float, float* %7
%35 = fdiv float %34, 1.000000e+02
%36 = fneg float %35
%37 = call float @llvm.fmuladd.f32(float %36, float 1.000000e+01, float %33)
store float %37, float* %8
%38 = load float, float* %7
%39 = fdiv float %38, 1.000000e+02
%40 = fmul float %39, 1.000000e+01
store float %40, float* %9
store i32 10, i32* %4
br label %54
41: ; preds = %29, %26
%42 = load float, float* %7
%43 = fcmp ogt float %42, 1.000000e+03
br i1 %43, label %44, label %53
44: ; preds = %41
%45 = load float, float* %7
%46 = load float, float* %7
%47 = fdiv float %46, 1.000000e+02
%48 = fneg float %47
%49 = call float @llvm.fmuladd.f32(float %48, float 1.200000e+01, float %45)
store float %49, float* %8
%50 = load float, float* %7
%51 = fdiv float %50, 1.000000e+02
%52 = fmul float %51, 1.200000e+01
store float %52, float* %9
store i32 12, i32* %4
br label %53
53: ; preds = %44, %41
br label %54
54: ; preds = %53, %32
br label %55
55: ; preds = %54, %17
%56 = getelementptr inbounds [50 x i8], [50 x i8]* %6, i64 0, i64 0
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %56)
%58 = load float, float* %7
%59 = fpext float %58 to double
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %59)
%61 = load i32, i32* %4
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %61)
%63 = load float, float* %9
%64 = fpext float %63 to double
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double %64)
%66 = load float, float* %8
%67 = fpext float %66 to double
%68 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), double %67)
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.9, i64 0, i64 0))
%70 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%71 = load i32, i32* %3
%72 = add nsw i32 %71, 1
store i32 %72, i32* %3
br label %73
73: ; preds = %55
%74 = load i8, i8* %2
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 115
br i1 %76, label %10, label %77
77: ; preds = %73
%78 = load i32, i32* %1
ret i32 %78
}

LLVM IR (-O2):
@.str = [33 x i8] c"\0A digite o nome do funcionario; \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [36 x i8] c"\0A digite o salario do funcionario: \00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [13 x i8] c"\0A Nome: %s \0A\00"
@.str.5 = [22 x i8] c"\0A Salario bruto: %f \0A\00"
@.str.6 = [22 x i8] c"\0A Taxa de INSS: %d% \0A\00"
@.str.7 = [21 x i8] c"\0A Valor de INSS %f \0A\00"
@.str.8 = [24 x i8] c"\0A Salario liquido: %f \0A\00"
@str = [22 x i8] c"\0A deseja continuar ? \00"
define i32 @main() {
%1 = alloca i8
%2 = alloca [50 x i8]
%3 = alloca float
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = bitcast float* %3 to i8*
br label %6
6: ; preds = %37, %0
%7 = phi i32 [ undef, %0 ], [ %38, %37 ]
%8 = phi float [ undef, %0 ], [ %39, %37 ]
%9 = phi float [ undef, %0 ], [ %40, %37 ]
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [50 x i8]* %2)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %3)
%14 = load float, float* %3
%15 = fcmp ugt float %14, 5.000000e+02
br i1 %15, label %21, label %16
16: ; preds = %6
%17 = fdiv float %14, 1.000000e+02
%18 = fneg float %17
%19 = call float @llvm.fmuladd.f32(float %18, float 8.000000e+00, float %14)
%20 = fmul float %17, 8.000000e+00
br label %37
21: ; preds = %6
%22 = fcmp ogt float %14, 5.000000e+02
%23 = fcmp ole float %14, 1.000000e+03
%24 = and i1 %22, %23
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = fdiv float %14, 1.000000e+02
%27 = fneg float %26
%28 = call float @llvm.fmuladd.f32(float %27, float 1.000000e+01, float %14)
%29 = fmul float %26, 1.000000e+01
br label %37
30: ; preds = %21
%31 = fcmp ogt float %14, 1.000000e+03
br i1 %31, label %32, label %37
32: ; preds = %30
%33 = fdiv float %14, 1.000000e+02
%34 = fneg float %33
%35 = call float @llvm.fmuladd.f32(float %34, float 1.200000e+01, float %14)
%36 = fmul float %33, 1.200000e+01
br label %37
37: ; preds = %25, %32, %30, %16
%38 = phi i32 [ 8, %16 ], [ 10, %25 ], [ 12, %32 ], [ %7, %30 ]
%39 = phi float [ %19, %16 ], [ %28, %25 ], [ %35, %32 ], [ %8, %30 ]
%40 = phi float [ %20, %16 ], [ %29, %25 ], [ %36, %32 ], [ %9, %30 ]
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* %4)
%42 = load float, float* %3
%43 = fpext float %42 to double
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %43)
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), i32 %38)
%46 = fpext float %40 to double
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), double %46)
%48 = fpext float %39 to double
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), double %48)
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%51 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%52 = load i8, i8* %1
%53 = icmp eq i8 %52, 115
br i1 %53, label %6, label %54
54: ; preds = %37
ret i32 0
}