#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ insere_vetor(int, char **, float *, float *, float *, int *,
                                int *, int *, int *, float *);
scalar_t__ malloc(int);
int /*<<< orphan*/ print_vetor(int, char **, float *, float *, float *, int *,
                               int *, int *, int *, float *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int main(int arc, char const *argv[]) {
  char nome[100][100];
  float *salario, *ref, *val, *de;
  int *hed, *hen, *nd, *fal, n;
  printf("Digite o numero de funcionarios: ");
  scanf("%d", &n);
  fflush(stdin);
  hed = (int *)malloc(n * sizeof(int *));
  hen = (int *)malloc(n * sizeof(int *));
  nd = (int *)malloc(n * sizeof(int *));
  fal = (int *)malloc(n * sizeof(int *));
  de = (float *)malloc(n * sizeof(float *));
  salario = (float *)malloc(n * sizeof(float *));
  ref = (float *)malloc(n * sizeof(float *));
  val = (float *)malloc(n * sizeof(float *));
  insere_vetor(n, nome, salario, ref, val, hed, hen, nd, fal, de);
  printf("\n");
  print_vetor(n, nome, salario, ref, val, hed, hen, nd, fal, de);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x2798,%rsp
movl   $0x0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    0xe7f(%rip),%rdi
call   1050 <printf@plt>
lea    0xe95(%rip),%rdi
lea    -0x2774(%rbp),%rsi
call   1080 <scanf@plt>
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
movslq -0x2774(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x2758(%rbp)
movslq -0x2774(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x2760(%rbp)
movslq -0x2774(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x2768(%rbp)
movslq -0x2774(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x2770(%rbp)
movslq -0x2774(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x2750(%rbp)
movslq -0x2774(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x2738(%rbp)
movslq -0x2774(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x2740(%rbp)
movslq -0x2774(%rbp),%rax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x2748(%rbp)
mov    -0x2774(%rbp),%edi
lea    -0x2730(%rbp),%rsi
mov    -0x2738(%rbp),%rdx
mov    -0x2740(%rbp),%rcx
mov    -0x2748(%rbp),%r8
mov    -0x2758(%rbp),%r9
mov    -0x2760(%rbp),%rbx
mov    -0x2768(%rbp),%r11
mov    -0x2770(%rbp),%r10
mov    -0x2750(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <insere_vetor@plt>
lea    0xd52(%rip),%rdi
call   1050 <printf@plt>
mov    -0x2774(%rbp),%edi
lea    -0x2730(%rbp),%rsi
mov    -0x2738(%rbp),%rdx
mov    -0x2740(%rbp),%rcx
mov    -0x2748(%rbp),%r8
mov    -0x2758(%rbp),%r9
mov    -0x2760(%rbp),%rbx
mov    -0x2768(%rbp),%r11
mov    -0x2770(%rbp),%r10
mov    -0x2750(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1040 <print_vetor@plt>
xor    %eax,%eax
add    $0x2798,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2748,%rsp
lea    0xe78(%rip),%rdi
call   1060 <printf@plt>
lea    0xe8e(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1090 <scanf@plt>
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,%r12
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,%rbp
mov    %rax,0x20(%rsp)
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    %rax,0x18(%rsp)
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
mov    0xc(%rsp),%edi
shl    $0x3,%edi
call   1070 <malloc@plt>
mov    %rax,%r15
mov    0xc(%rsp),%edi
lea    0x30(%rsp),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %rax,%r8
mov    %r12,%r9
push   %rbp
push   %r13
mov    %r13,%rbx
push   0x20(%rsp)
mov    0x40(%rsp),%r13
push   %r13
call   1030 <insere_vetor@plt>
add    $0x20,%rsp
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    0xc(%rsp),%edi
lea    0x30(%rsp),%rsi
mov    0x18(%rsp),%rdx
mov    %r14,%rcx
mov    %r15,%r8
mov    %r12,%r9
push   0x20(%rsp)
push   %rbx
push   0x20(%rsp)
push   %r13
call   1050 <print_vetor@plt>
add    $0x20,%rsp
xor    %eax,%eax
add    $0x2748,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Digite o numero de funcionarios: \00"
@.str.1 = [3 x i8] c"%d\00"
@stdin = global i32 0
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x [100 x i8]]
%7 = alloca float*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %15)
%18 = load i32, i32* @stdin
%19 = call i32 @fflush(i32 %18)
%20 = load i32, i32* %15
%21 = sext i32 %20 to i64
%22 = mul i64 %21, 8
%23 = trunc i64 %22 to i32
%24 = call i64 @malloc(i32 %23)
%25 = inttoptr i64 %24 to i32*
store i32* %25, i32** %11
%26 = load i32, i32* %15
%27 = sext i32 %26 to i64
%28 = mul i64 %27, 8
%29 = trunc i64 %28 to i32
%30 = call i64 @malloc(i32 %29)
%31 = inttoptr i64 %30 to i32*
store i32* %31, i32** %12
%32 = load i32, i32* %15
%33 = sext i32 %32 to i64
%34 = mul i64 %33, 8
%35 = trunc i64 %34 to i32
%36 = call i64 @malloc(i32 %35)
%37 = inttoptr i64 %36 to i32*
store i32* %37, i32** %13
%38 = load i32, i32* %15
%39 = sext i32 %38 to i64
%40 = mul i64 %39, 8
%41 = trunc i64 %40 to i32
%42 = call i64 @malloc(i32 %41)
%43 = inttoptr i64 %42 to i32*
store i32* %43, i32** %14
%44 = load i32, i32* %15
%45 = sext i32 %44 to i64
%46 = mul i64 %45, 8
%47 = trunc i64 %46 to i32
%48 = call i64 @malloc(i32 %47)
%49 = inttoptr i64 %48 to float*
store float* %49, float** %10
%50 = load i32, i32* %15
%51 = sext i32 %50 to i64
%52 = mul i64 %51, 8
%53 = trunc i64 %52 to i32
%54 = call i64 @malloc(i32 %53)
%55 = inttoptr i64 %54 to float*
store float* %55, float** %7
%56 = load i32, i32* %15
%57 = sext i32 %56 to i64
%58 = mul i64 %57, 8
%59 = trunc i64 %58 to i32
%60 = call i64 @malloc(i32 %59)
%61 = inttoptr i64 %60 to float*
store float* %61, float** %8
%62 = load i32, i32* %15
%63 = sext i32 %62 to i64
%64 = mul i64 %63, 8
%65 = trunc i64 %64 to i32
%66 = call i64 @malloc(i32 %65)
%67 = inttoptr i64 %66 to float*
store float* %67, float** %9
%68 = load i32, i32* %15
%69 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %6, i64 0, i64 0
%70 = bitcast [100 x i8]* %69 to i8**
%71 = load float*, float** %7
%72 = load float*, float** %8
%73 = load float*, float** %9
%74 = load i32*, i32** %11
%75 = load i32*, i32** %12
%76 = load i32*, i32** %13
%77 = load i32*, i32** %14
%78 = load float*, float** %10
%79 = call i32 @insere_vetor(i32 %68, i8** %70, float* %71, float* %72, float* %73, i32* %74, i32* %75, i32* %76, i32* %77, float* %78)
%80 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%81 = load i32, i32* %15
%82 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %6, i64 0, i64 0
%83 = bitcast [100 x i8]* %82 to i8**
%84 = load float*, float** %7
%85 = load float*, float** %8
%86 = load float*, float** %9
%87 = load i32*, i32** %11
%88 = load i32*, i32** %12
%89 = load i32*, i32** %13
%90 = load i32*, i32** %14
%91 = load float*, float** %10
%92 = call i32 @print_vetor(i32 %81, i8** %83, float* %84, float* %85, float* %86, i32* %87, i32* %88, i32* %89, i32* %90, float* %91)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"Digite o numero de funcionarios: \00"
@.str.1 = [3 x i8] c"%d\00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x [100 x i8]]
%4 = alloca i32
%5 = getelementptr inbounds [100 x [100 x i8]], [100 x [100 x i8]]* %3, i64 0, i64 0, i64 0
%6 = bitcast i32* %4 to i8*
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%9 = load i32, i32* @stdin
%10 = call i32 @fflush(i32 %9)
%11 = load i32, i32* %4
%12 = shl i32 %11, 3
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to i32*
%15 = load i32, i32* %4
%16 = shl i32 %15, 3
%17 = call i64 @malloc(i32 %16)
%18 = inttoptr i64 %17 to i32*
%19 = load i32, i32* %4
%20 = shl i32 %19, 3
%21 = call i64 @malloc(i32 %20)
%22 = inttoptr i64 %21 to i32*
%23 = load i32, i32* %4
%24 = shl i32 %23, 3
%25 = call i64 @malloc(i32 %24)
%26 = inttoptr i64 %25 to i32*
%27 = load i32, i32* %4
%28 = shl i32 %27, 3
%29 = call i64 @malloc(i32 %28)
%30 = inttoptr i64 %29 to float*
%31 = load i32, i32* %4
%32 = shl i32 %31, 3
%33 = call i64 @malloc(i32 %32)
%34 = inttoptr i64 %33 to float*
%35 = load i32, i32* %4
%36 = shl i32 %35, 3
%37 = call i64 @malloc(i32 %36)
%38 = inttoptr i64 %37 to float*
%39 = load i32, i32* %4
%40 = shl i32 %39, 3
%41 = call i64 @malloc(i32 %40)
%42 = inttoptr i64 %41 to float*
%43 = load i32, i32* %4
%44 = bitcast [100 x [100 x i8]]* %3 to i8**
%45 = call i32 @insere_vetor(i32 %43, i8** %44, float* %34, float* %38, float* %42, i32* %14, i32* %18, i32* %22, i32* %26, float* %30)
%46 = call i32 @putchar(i32 10)
%47 = load i32, i32* %4
%48 = call i32 @print_vetor(i32 %47, i8** %44, float* %34, float* %38, float* %42, i32* %14, i32* %18, i32* %22, i32* %26, float* %30)
ret i32 0
}