#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 salarios[5];
  char nome[5][30];
  int i = 0;
  for (i = 0; i < 5; i++) {
    printf("Digite o nome do Funcionário %d:\n", i + 1);
    scanf("%s", nome[i]);
    printf("Digite o salário do funcionário %d:\n", i + 1);
    scanf("%f", &salarios[i]);
  }
  printf("Nome\tSalario Bruto\tSalario Liquido\n");
  printf("-----------------------------------------\n");
  for (i = 0; i < 5; i++) {
    printf("%s\t%.2f\t\t%.2f\n", nome[i], salarios[i], salarios[i] * 0.8);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc4(%rbp)
movl   $0x0,-0xc4(%rbp)
cmpl   $0x5,-0xc4(%rbp)
jge    11d8 <main+0xb8>
mov    -0xc4(%rbp),%esi
add    $0x1,%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0xc4(%rbp),%rax
lea    -0xc0(%rbp),%rsi
imul   $0x1e,%rax,%rax
add    %rax,%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc4(%rbp),%esi
add    $0x1,%esi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0xc4(%rbp),%rax
lea    -0x20(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1146 <main+0x26>
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc4(%rbp)
cmpl   $0x5,-0xc4(%rbp)
jge    1270 <main+0x150>
movslq -0xc4(%rbp),%rax
lea    -0xc0(%rbp),%rsi
imul   $0x1e,%rax,%rax
add    %rax,%rsi
movslq -0xc4(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
movslq -0xc4(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xdb6(%rip),%xmm2
mulsd  %xmm2,%xmm1
lea    0xe52(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    11fe <main+0xde>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
lea    0xec0(%rip),%r13
mov    %r13,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rbx
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xeba(%rip),%rbp
mov    %rbp,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecb(%rip),%r14
mov    %rsp,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r13,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x3e(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbp,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r13,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x5c(%rsp),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbp,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r13,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x7a(%rsp),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbp,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xc(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %r13,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x98(%rsp),%r13
mov    %rbx,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbp,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xdcd(%rip),%rdi
call   1030 <puts@plt>
lea    0xde4(%rip),%rdi
call   1030 <puts@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xd41(%rip),%xmm1
lea    0xd92(%rip),%rbx
mov    %rbx,%rdi
lea    0x20(%rsp),%rsi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xd16(%rip),%xmm1
mov    %rbx,%rdi
lea    0x3e(%rsp),%rsi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xcf2(%rip),%xmm1
mov    %rbx,%rdi
mov    %r12,%rsi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movaps %xmm0,%xmm1
mulsd  0xcd0(%rip),%xmm1
mov    %rbx,%rdi
mov    %r15,%rsi
mov    $0x2,%al
call   1040 <printf@plt>
movss  0x10(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcb1(%rip),%xmm1
mulsd  %xmm0,%xmm1
mov    %rbx,%rdi
mov    %r13,%rsi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Digite o nome do Funcion\C3\A1rio %d:\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [39 x i8] c"Digite o sal\C3\A1rio do funcion\C3\A1rio %d:\0A\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.4 = [36 x i8] c"Nome\09Salario Bruto\09Salario Liquido\0A\00"
@.str.5 = [43 x i8] c"-----------------------------------------\0A\00"
@.str.6 = [15 x i8] c"%s\09%.2f\09\09%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x float]
%3 = alloca [5 x [30 x i8]]
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
store i32 0, i32* %4
br label %5
5: ; preds = %24, %0
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %27
8: ; preds = %5
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %4
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [5 x [30 x i8]], [5 x [30 x i8]]* %3, i64 0, i64 %13
%15 = getelementptr inbounds [30 x i8], [30 x i8]* %14, i64 0, i64 0
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %21
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %22)
br label %24
24: ; preds = %8
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %5
27: ; preds = %5
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %4
br label %30
30: ; preds = %50, %27
%31 = load i32, i32* %4
%32 = icmp slt i32 %31, 5
br i1 %32, label %33, label %53
33: ; preds = %30
%34 = load i32, i32* %4
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [5 x [30 x i8]], [5 x [30 x i8]]* %3, i64 0, i64 %35
%37 = getelementptr inbounds [30 x i8], [30 x i8]* %36, i64 0, i64 0
%38 = load i32, i32* %4
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %39
%41 = load float, float* %40
%42 = fpext float %41 to double
%43 = load i32, i32* %4
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [5 x float], [5 x float]* %2, i64 0, i64 %44
%46 = load float, float* %45
%47 = fpext float %46 to double
%48 = fmul double %47, 8.000000e-01
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %37, double %42, double %48)
br label %50
50: ; preds = %33
%51 = load i32, i32* %4
%52 = add nsw i32 %51, 1
store i32 %52, i32* %4
br label %30
53: ; preds = %30
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"Digite o nome do Funcion\C3\A1rio %d:\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [39 x i8] c"Digite o sal\C3\A1rio do funcion\C3\A1rio %d:\0A\00"
@.str.3 = [3 x i8] c"%f\00"
@.str.6 = [15 x i8] c"%s\09%.2f\09\09%.2f\0A\00"
@str = [35 x i8] c"Nome\09Salario Bruto\09Salario Liquido\00"
@str.7 = [42 x i8] c"-----------------------------------------\00"
define i32 @main() {
%1 = alloca [5 x float]
%2 = alloca [5 x [30 x i8]]
%3 = bitcast [5 x float]* %1 to i8*
%4 = getelementptr inbounds [5 x [30 x i8]], [5 x [30 x i8]]* %2, i64 0, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 1)
%8 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 0
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 2)
%11 = getelementptr inbounds [5 x [30 x i8]], [5 x [30 x i8]]* %2, i64 0, i64 1, i64 0
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 2)
%14 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 1
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %14)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 3)
%17 = getelementptr inbounds [5 x [30 x i8]], [5 x [30 x i8]]* %2, i64 0, i64 2, i64 0
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 3)
%20 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 2
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %20)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 4)
%23 = getelementptr inbounds [5 x [30 x i8]], [5 x [30 x i8]]* %2, i64 0, i64 3, i64 0
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %23)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 4)
%26 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 3
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %26)
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 5)
%29 = getelementptr inbounds [5 x [30 x i8]], [5 x [30 x i8]]* %2, i64 0, i64 4, i64 0
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %29)
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0), i32 5)
%32 = getelementptr inbounds [5 x float], [5 x float]* %1, i64 0, i64 4
%33 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), float* %32)
%34 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.7, i64 0, i64 0))
%36 = load float, float* %8
%37 = fpext float %36 to double
%38 = fmul double %37, 8.000000e-01
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %4, double %37, double %38)
%40 = load float, float* %14
%41 = fpext float %40 to double
%42 = fmul double %41, 8.000000e-01
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %11, double %41, double %42)
%44 = load float, float* %20
%45 = fpext float %44 to double
%46 = fmul double %45, 8.000000e-01
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %17, double %45, double %46)
%48 = load float, float* %26
%49 = fpext float %48 to double
%50 = fmul double %49, 8.000000e-01
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %23, double %49, double %50)
%52 = load float, float* %32
%53 = fpext float %52 to double
%54 = fmul double %53, 8.000000e-01
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.6, i64 0, i64 0), i8* %29, double %53, double %54)
ret i32 0
}