#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*/ escreve_vet(int *, int);
int /*<<< orphan*/ le_vet(int *, int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  int vet1[3];
  int vet2[4];
  printf("Digite os dados do primeiro vetor\n");
  le_vet(vet1, 3);
  printf("\nDigite os dados do segundo vetor\n");
  le_vet(vet2, 4);
  printf("\nPrimeiro vetor\n");
  escreve_vet(vet1, 3);
  printf("\nSegundo vetor\n");
  escreve_vet(vet2, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1050 <printf@plt>
lea    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1040 <le_vet@plt>
lea    0xec3(%rip),%rdi
call   1050 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1040 <le_vet@plt>
lea    0xecc(%rip),%rdi
call   1050 <printf@plt>
lea    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1030 <escreve_vet@plt>
lea    0xec3(%rip),%rdi
call   1050 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1030 <escreve_vet@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
lea    0xec2(%rip),%rdi
call   1030 <puts@plt>
lea    0x4(%rsp),%r14
mov    %r14,%rdi
mov    $0x3,%esi
call   1050 <le_vet@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <le_vet@plt>
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
mov    %r14,%rdi
mov    $0x3,%esi
call   1040 <escreve_vet@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <escreve_vet@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Digite os dados do primeiro vetor\0A\00"
@.str.1 = [35 x i8] c"\0ADigite os dados do segundo vetor\0A\00"
@.str.2 = [17 x i8] c"\0APrimeiro vetor\0A\00"
@.str.3 = [16 x i8] c"\0ASegundo vetor\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
%3 = alloca [4 x i32]
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%6 = call i32 @le_vet(i32* %5, i32 3)
%7 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%9 = call i32 @le_vet(i32* %8, i32 4)
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%12 = call i32 @escreve_vet(i32* %11, i32 3)
%13 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%15 = call i32 @escreve_vet(i32* %14, i32 4)
ret i32 0
}

LLVM IR (-O2):
@str = [34 x i8] c"Digite os dados do primeiro vetor\00"
@str.4 = [34 x i8] c"\0ADigite os dados do segundo vetor\00"
@str.5 = [16 x i8] c"\0APrimeiro vetor\00"
@str.6 = [15 x i8] c"\0ASegundo vetor\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [4 x i32]
%3 = bitcast [3 x i32]* %1 to i8*
%4 = bitcast [4 x i32]* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%7 = call i32 @le_vet(i32* %6, i32 3)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str.4, i64 0, i64 0))
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%10 = call i32 @le_vet(i32* %9, i32 4)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.5, i64 0, i64 0))
%12 = call i32 @escreve_vet(i32* %6, i32 3)
%13 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.6, i64 0, i64 0))
%14 = call i32 @escreve_vet(i32* %9, i32 4)
ret i32 0
}