#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 idade;
  char sexo;
  float salario, salario_liquido;
  printf("Sexo: ");
  scanf("%c", &sexo);
  printf("Idade: ");
  scanf("%i", &idade);
  printf("salario: ");
  scanf("%f", &salario);
  if (sexo == 'm')
    if (idade == 23)
      salario_liquido = salario + (salario * 6 / 100);
    else
      salario_liquido = salario + (salario * 10 / 100);
  else if (idade == 21)
    salario_liquido = salario + (salario * 8 / 100);
  else if (idade == 36)
    salario_liquido = salario + (salario * 12 / 100);
  else
    salario_liquido = salario + (salario * 18 / 100);
  printf("Salario Liquido: %f", salario_liquido);
}


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    0xedb(%rip),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x9(%rbp),%eax
cmp    $0x6d,%eax
jne    11fe <main+0xde>
cmpl   $0x17,-0x8(%rbp)
jne    11d2 <main+0xb2>
movss  -0x10(%rbp),%xmm0
movss  0xe61(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movss  0xe40(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    11f9 <main+0xd9>
movss  -0x10(%rbp),%xmm0
movss  0xe31(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movss  0xe14(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    129b <main+0x17b>
cmpl   $0x15,-0x8(%rbp)
jne    1234 <main+0x114>
movss  -0x10(%rbp),%xmm0
movss  0xdf7(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movss  0xdde(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1296 <main+0x176>
cmpl   $0x24,-0x8(%rbp)
jne    126a <main+0x14a>
movss  -0x10(%rbp),%xmm0
movss  0xdbd(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movss  0xda8(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1291 <main+0x171>
movss  -0x10(%rbp),%xmm0
movss  0xd8d(%rip),%xmm1
mulss  -0x10(%rbp),%xmm1
movss  0xd7c(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1296 <main+0x176>
jmp    129b <main+0x17b>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xd8c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xeed(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    0xf(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmpb   $0x6d,0xf(%rsp)
mov    0x14(%rsp),%eax
jne    11a7 <main+0x87>
movss  0x10(%rsp),%xmm0
cmp    $0x17,%eax
jne    11c1 <main+0xa1>
movss  0xe6b(%rip),%xmm1
jmp    11e9 <main+0xc9>
cmp    $0x24,%eax
je     11cb <main+0xab>
cmp    $0x15,%eax
jne    11db <main+0xbb>
movss  0x10(%rsp),%xmm0
movss  0xe45(%rip),%xmm1
jmp    11e9 <main+0xc9>
movss  0xe43(%rip),%xmm1
jmp    11e9 <main+0xc9>
movss  0x10(%rsp),%xmm0
movss  0xe27(%rip),%xmm1
jmp    11e9 <main+0xc9>
movss  0x10(%rsp),%xmm0
movss  0xe1f(%rip),%xmm1
mulss  %xmm0,%xmm1
divss  0xe1f(%rip),%xmm1
addss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xe30(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Sexo: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [8 x i8] c"Idade: \00"
@.str.3 = [3 x i8] c"%i\00"
@.str.4 = [10 x i8] c"salario: \00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [20 x i8] c"Salario Liquido: %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %2)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %4)
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 109
br i1 %14, label %15, label %31
15: ; preds = %0
%16 = load i32, i32* %2
%17 = icmp eq i32 %16, 23
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = load float, float* %4
%20 = load float, float* %4
%21 = fmul float %20, 6.000000e+00
%22 = fdiv float %21, 1.000000e+02
%23 = fadd float %19, %22
store float %23, float* %5
br label %30
24: ; preds = %15
%25 = load float, float* %4
%26 = load float, float* %4
%27 = fmul float %26, 1.000000e+01
%28 = fdiv float %27, 1.000000e+02
%29 = fadd float %25, %28
store float %29, float* %5
br label %30
30: ; preds = %24, %18
br label %57
31: ; preds = %0
%32 = load i32, i32* %2
%33 = icmp eq i32 %32, 21
br i1 %33, label %34, label %40
34: ; preds = %31
%35 = load float, float* %4
%36 = load float, float* %4
%37 = fmul float %36, 8.000000e+00
%38 = fdiv float %37, 1.000000e+02
%39 = fadd float %35, %38
store float %39, float* %5
br label %56
40: ; preds = %31
%41 = load i32, i32* %2
%42 = icmp eq i32 %41, 36
br i1 %42, label %43, label %49
43: ; preds = %40
%44 = load float, float* %4
%45 = load float, float* %4
%46 = fmul float %45, 1.200000e+01
%47 = fdiv float %46, 1.000000e+02
%48 = fadd float %44, %47
store float %48, float* %5
br label %55
49: ; preds = %40
%50 = load float, float* %4
%51 = load float, float* %4
%52 = fmul float %51, 1.800000e+01
%53 = fdiv float %52, 1.000000e+02
%54 = fadd float %50, %53
store float %54, float* %5
br label %55
55: ; preds = %49, %43
br label %56
56: ; preds = %55, %34
br label %57
57: ; preds = %56, %30
%58 = load float, float* %5
%59 = fpext float %58 to double
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), double %59)
%61 = load i32, i32* %1
ret i32 %61
}

LLVM IR (-O2):
@.str = [7 x i8] c"Sexo: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [8 x i8] c"Idade: \00"
@.str.3 = [3 x i8] c"%i\00"
@.str.4 = [10 x i8] c"salario: \00"
@.str.5 = [3 x i8] c"%f\00"
@.str.6 = [20 x i8] c"Salario Liquido: %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca float
%4 = bitcast i32* %1 to i8*
%5 = bitcast float* %3 to i8*
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), float* %3)
%12 = load i8, i8* %2
%13 = icmp eq i8 %12, 109
%14 = load i32, i32* %1
br i1 %13, label %15, label %22
15: ; preds = %0
%16 = icmp eq i32 %14, 23
%17 = load float, float* %3
br i1 %16, label %18, label %20
18: ; preds = %15
%19 = fmul float %17, 6.000000e+00
br label %32
20: ; preds = %15
%21 = fmul float %17, 1.000000e+01
br label %32
22: ; preds = %0
switch i32 %14, label %29 [
i32 21, label %23
i32 36, label %26
]
23: ; preds = %22
%24 = load float, float* %3
%25 = fmul float %24, 8.000000e+00
br label %32
26: ; preds = %22
%27 = load float, float* %3
%28 = fmul float %27, 1.200000e+01
br label %32
29: ; preds = %22
%30 = load float, float* %3
%31 = fmul float %30, 1.800000e+01
br label %32
32: ; preds = %23, %29, %26, %18, %20
%33 = phi float [ %25, %23 ], [ %31, %29 ], [ %28, %26 ], [ %19, %18 ], [ %21, %20 ]
%34 = phi float [ %24, %23 ], [ %30, %29 ], [ %27, %26 ], [ %17, %18 ], [ %17, %20 ]
%35 = fdiv float %33, 1.000000e+02
%36 = fadd float %34, %35
%37 = fpext float %36 to double
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), double %37)
ret i32 0
}