#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*/ leggiVettore(int *, int);
int /*<<< orphan*/ stampaVettore(int *, int);
int main(void) {
  int a[5];
  int b[5];
  int c[5];
  int i;
  leggiVettore(a, 5);
  leggiVettore(b, 5);
  stampaVettore(a, 5);
  stampaVettore(b, 5);
  for (i = 0; i < 5; i++) {
    c[i] = a[i] + b[i];
  }
  stampaVettore(c, 5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <leggiVettore@plt>
lea    -0x40(%rbp),%rdi
mov    $0x5,%esi
call   1040 <leggiVettore@plt>
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1030 <stampaVettore@plt>
lea    -0x40(%rbp),%rdi
mov    $0x5,%esi
call   1030 <stampaVettore@plt>
movl   $0x0,-0x64(%rbp)
cmpl   $0x5,-0x64(%rbp)
jge    119e <main+0x7e>
movslq -0x64(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%ecx
movslq -0x64(%rbp),%rax
add    -0x40(%rbp,%rax,4),%ecx
movslq -0x64(%rbp),%rax
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    116e <main+0x4e>
lea    -0x60(%rbp),%rdi
mov    $0x5,%esi
call   1030 <stampaVettore@plt>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x58,%rsp
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x5,%esi
call   1040 <leggiVettore@plt>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <leggiVettore@plt>
mov    %r14,%rdi
mov    $0x5,%esi
call   1030 <stampaVettore@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <stampaVettore@plt>
movdqa 0x20(%rsp),%xmm0
paddd  0x40(%rsp),%xmm0
movdqa %xmm0,(%rsp)
mov    0x30(%rsp),%eax
add    0x50(%rsp),%eax
mov    %eax,0x10(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <stampaVettore@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
%4 = alloca [5 x i32]
%5 = alloca i32
store i32 0, i32* %1
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%7 = call i32 @leggiVettore(i32* %6, i32 5)
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%9 = call i32 @leggiVettore(i32* %8, i32 5)
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%11 = call i32 @stampaVettore(i32* %10, i32 5)
%12 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%13 = call i32 @stampaVettore(i32* %12, i32 5)
store i32 0, i32* %5
br label %14
14: ; preds = %30, %0
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 5
br i1 %16, label %17, label %33
17: ; preds = %14
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = add nsw i32 %21, %25
%27 = load i32, i32* %5
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %28
store i32 %26, i32* %29
br label %30
30: ; preds = %17
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 1
store i32 %32, i32* %5
br label %14
33: ; preds = %14
%34 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%35 = call i32 @stampaVettore(i32* %34, i32 5)
%36 = load i32, i32* %1
ret i32 %36
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [5 x i32]
%2 = alloca [5 x i32]
%3 = alloca [5 x i32]
%4 = bitcast [5 x i32]* %1 to i8*
%5 = bitcast [5 x i32]* %2 to i8*
%6 = bitcast [5 x i32]* %3 to i8*
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%8 = call i32 @leggiVettore(i32* %7, i32 5)
%9 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%10 = call i32 @leggiVettore(i32* %9, i32 5)
%11 = call i32 @stampaVettore(i32* %7, i32 5)
%12 = call i32 @stampaVettore(i32* %9, i32 5)
%13 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 0
%14 = bitcast [5 x i32]* %1 to <4 x i32>*
%15 = load <4 x i32>, <4 x i32>* %14
%16 = bitcast [5 x i32]* %2 to <4 x i32>*
%17 = load <4 x i32>, <4 x i32>* %16
%18 = add nsw <4 x i32> %17, %15
%19 = bitcast [5 x i32]* %3 to <4 x i32>*
store <4 x i32> %18, <4 x i32>* %19
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 4
%21 = load i32, i32* %20
%22 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 4
%23 = load i32, i32* %22
%24 = add nsw i32 %23, %21
%25 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 4
store i32 %24, i32* %25
%26 = call i32 @stampaVettore(i32* %13, i32 5)
ret i32 0
}