#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() {
  float actsueld, nuevsueld, aument;
  char nmbr[20], depr[20];
  printf("¿Cuál es su primer nombre?: ");
  scanf("%s", &nmbr);
  printf("¿En cuál departamento trabaja?: ");
  scanf("%s", &depr);
  printf("¿Cuál es su sueldo actual?: ");
  scanf("%f", &actsueld);
  if (actsueld <= 900000) {
    aument = actsueld * 20 / 100;
  }
  if (900000 < actsueld && actsueld <= 1300000) {
    aument = actsueld * 10 / 100;
  }
  if (1300000 < actsueld && actsueld <= 1800000) {
    aument = actsueld * 5 / 100;
  }
  if (actsueld > 1800000) {
    aument = actsueld * 4 / 100;
  }
  nuevsueld = actsueld + aument;
  printf("\nNombre del empleado: %s\n", nmbr);
  printf("\nDepartamento: %s\n", depr);
  printf("\nSueldo actual: %f\n", actsueld);
  printf("\nAumento: %f\n", aument);
  printf("\nSueldo nuevo: %f\n", nuevsueld);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedb(%rip),%rdi
lea    -0x50(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf00(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movss  0xe69(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     11bf <main+0x9f>
movss  0xe5f(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xe4e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xe34(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1205 <main+0xe5>
movss  0xe2f(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1205 <main+0xe5>
movss  0xe21(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xe08(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xdfa(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    124b <main+0x12b>
movss  0xdf1(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     124b <main+0x12b>
movss  0xde3(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xdc2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xdbc(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    127f <main+0x15f>
movss  0xdb3(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xd8e(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xdee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x50(%rbp),%rsi
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdf2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdef(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xde6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xef4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf05(%rip),%rbx
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xef2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xef8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf09(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm1
movss  0xe6b(%rip),%xmm0
ucomiss %xmm1,%xmm0
jb     11ae <main+0x8e>
movss  0xe62(%rip),%xmm2
mulss  %xmm1,%xmm2
divss  0xe5a(%rip),%xmm2
ucomiss 0xe4b(%rip),%xmm1
jbe    11d8 <main+0xb8>
movss  0xe4d(%rip),%xmm0
ucomiss %xmm1,%xmm0
jb     11d8 <main+0xb8>
movss  0xe44(%rip),%xmm2
mulss  %xmm1,%xmm2
divss  0xe30(%rip),%xmm2
ucomiss 0xe2d(%rip),%xmm1
jbe    1202 <main+0xe2>
movss  0xe2b(%rip),%xmm0
ucomiss %xmm1,%xmm0
jb     1202 <main+0xe2>
movss  0xe22(%rip),%xmm2
mulss  %xmm1,%xmm2
divss  0xe06(%rip),%xmm2
ucomiss 0xe0b(%rip),%xmm1
jbe    121f <main+0xff>
movss  0xe09(%rip),%xmm2
mulss  %xmm1,%xmm2
divss  0xde9(%rip),%xmm2
movss  %xmm2,0x8(%rsp)
addss  %xmm2,%xmm1
movss  %xmm1,0xc(%rsp)
lea    0xe51(%rip),%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe58(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe4a(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe40(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"\C2\BFCu\C3\A1l es su primer nombre?: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [35 x i8] c"\C2\BFEn cu\C3\A1l departamento trabaja?: \00"
@.str.3 = [31 x i8] c"\C2\BFCu\C3\A1l es su sueldo actual?: \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [26 x i8] c"\0ANombre del empleado: %s\0A\00"
@.str.6 = [19 x i8] c"\0ADepartamento: %s\0A\00"
@.str.7 = [20 x i8] c"\0ASueldo actual: %f\0A\00"
@.str.8 = [14 x i8] c"\0AAumento: %f\0A\00"
@.str.9 = [19 x i8] c"\0ASueldo nuevo: %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca [20 x i8]
%6 = alloca [20 x i8]
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 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), [20 x i8]* %5)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [20 x i8]* %6)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %2)
%13 = load float, float* %2
%14 = fcmp ole float %13, 9.000000e+05
br i1 %14, label %15, label %19
15: ; preds = %0
%16 = load float, float* %2
%17 = fmul float %16, 2.000000e+01
%18 = fdiv float %17, 1.000000e+02
store float %18, float* %4
br label %19
19: ; preds = %15, %0
%20 = load float, float* %2
%21 = fcmp olt float 9.000000e+05, %20
br i1 %21, label %22, label %29
22: ; preds = %19
%23 = load float, float* %2
%24 = fcmp ole float %23, 1.300000e+06
br i1 %24, label %25, label %29
25: ; preds = %22
%26 = load float, float* %2
%27 = fmul float %26, 1.000000e+01
%28 = fdiv float %27, 1.000000e+02
store float %28, float* %4
br label %29
29: ; preds = %25, %22, %19
%30 = load float, float* %2
%31 = fcmp olt float 1.300000e+06, %30
br i1 %31, label %32, label %39
32: ; preds = %29
%33 = load float, float* %2
%34 = fcmp ole float %33, 1.800000e+06
br i1 %34, label %35, label %39
35: ; preds = %32
%36 = load float, float* %2
%37 = fmul float %36, 5.000000e+00
%38 = fdiv float %37, 1.000000e+02
store float %38, float* %4
br label %39
39: ; preds = %35, %32, %29
%40 = load float, float* %2
%41 = fcmp ogt float %40, 1.800000e+06
br i1 %41, label %42, label %46
42: ; preds = %39
%43 = load float, float* %2
%44 = fmul float %43, 4.000000e+00
%45 = fdiv float %44, 1.000000e+02
store float %45, float* %4
br label %46
46: ; preds = %42, %39
%47 = load float, float* %2
%48 = load float, float* %4
%49 = fadd float %47, %48
store float %49, float* %3
%50 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i8* %50)
%52 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8* %52)
%54 = load float, float* %2
%55 = fpext float %54 to double
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), double %55)
%57 = load float, float* %4
%58 = fpext float %57 to double
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), double %58)
%60 = load float, float* %3
%61 = fpext float %60 to double
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), double %61)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"\C2\BFCu\C3\A1l es su primer nombre?: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [35 x i8] c"\C2\BFEn cu\C3\A1l departamento trabaja?: \00"
@.str.3 = [31 x i8] c"\C2\BFCu\C3\A1l es su sueldo actual?: \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [26 x i8] c"\0ANombre del empleado: %s\0A\00"
@.str.6 = [19 x i8] c"\0ADepartamento: %s\0A\00"
@.str.7 = [20 x i8] c"\0ASueldo actual: %f\0A\00"
@.str.8 = [14 x i8] c"\0AAumento: %f\0A\00"
@.str.9 = [19 x i8] c"\0ASueldo nuevo: %f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca [20 x i8]
%3 = alloca [20 x i8]
%4 = bitcast float* %1 to i8*
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 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), [20 x i8]* %2)
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [20 x i8]* %3)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %1)
%13 = load float, float* %1
%14 = fcmp ugt float %13, 9.000000e+05
br i1 %14, label %18, label %15
15: ; preds = %0
%16 = fmul float %13, 2.000000e+01
%17 = fdiv float %16, 1.000000e+02
br label %18
18: ; preds = %15, %0
%19 = phi float [ %17, %15 ], [ undef, %0 ]
%20 = fcmp ogt float %13, 9.000000e+05
%21 = fcmp ole float %13, 1.300000e+06
%22 = and i1 %20, %21
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = fmul float %13, 1.000000e+01
%25 = fdiv float %24, 1.000000e+02
br label %26
26: ; preds = %23, %18
%27 = phi float [ %25, %23 ], [ %19, %18 ]
%28 = fcmp ogt float %13, 1.300000e+06
%29 = fcmp ole float %13, 1.800000e+06
%30 = and i1 %28, %29
br i1 %30, label %31, label %34
31: ; preds = %26
%32 = fmul float %13, 5.000000e+00
%33 = fdiv float %32, 1.000000e+02
br label %34
34: ; preds = %31, %26
%35 = phi float [ %33, %31 ], [ %27, %26 ]
%36 = fcmp ogt float %13, 1.800000e+06
br i1 %36, label %37, label %40
37: ; preds = %34
%38 = fmul float %13, 4.000000e+00
%39 = fdiv float %38, 1.000000e+02
br label %40
40: ; preds = %37, %34
%41 = phi float [ %39, %37 ], [ %35, %34 ]
%42 = fadd float %13, %41
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i8* %5)
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i8* %6)
%45 = load float, float* %1
%46 = fpext float %45 to double
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), double %46)
%48 = fpext float %41 to double
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), double %48)
%50 = fpext float %42 to double
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), double %50)
ret i32 0
}