#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, int, int);
main() {
  int vetor_1[8] = {1, 2, 3, 4, 5, 6, 7, 8},
      vetor_2[8] = {10, 20, 30, 40, 50, 60, 70, 80}, vetor_3[8], i = 0;
  while (i < 8) {
    vetor_3[i] = vetor_1[i] + vetor_2[i];
    printf("%d + %d = %d\n", vetor_1[i], vetor_2[i], vetor_3[i]);
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xec8(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xec5(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec2(%rip),%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x74(%rbp)
cmpl   $0x8,-0x74(%rbp)
jge    11d5 <main+0xc5>
movslq -0x74(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
movslq -0x74(%rbp),%rax
add    -0x50(%rbp,%rax,4),%ecx
movslq -0x74(%rbp),%rax
mov    %ecx,-0x70(%rbp,%rax,4)
movslq -0x74(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
movslq -0x74(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%edx
movslq -0x74(%rbp),%rax
mov    -0x70(%rbp,%rax,4),%ecx
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1181 <main+0x71>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
mov    $0xb,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x14,%edx
mov    $0x16,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x1e,%edx
mov    $0x21,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x28,%edx
mov    $0x2c,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x32,%edx
mov    $0x37,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x3c,%edx
mov    $0x42,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x46,%edx
mov    $0x4d,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x50,%edx
mov    $0x58,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.vetor_1 = [8 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8]
@__const.main.vetor_2 = [8 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50, i32 60, i32 70, i32 80]
@.str = [14 x i8] c"%d + %d = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i32]
%3 = alloca [8 x i32]
%4 = alloca [8 x i32]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [8 x i32]* %2 to i8*
%7 = bitcast [8 x i32]* %3 to i8*
store i32 0, i32* %5
br label %8
8: ; preds = %11, %0
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 8
br i1 %10, label %11, label %39
11: ; preds = %8
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 %13
%15 = load i32, i32* %14
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = add nsw i32 %15, %19
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %22
store i32 %20, i32* %23
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [8 x i32], [8 x i32]* %2, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %29
%31 = load i32, i32* %30
%32 = load i32, i32* %5
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %27, i32 %31, i32 %35)
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %8
39: ; preds = %8
%40 = load i32, i32* %1
ret i32 %40
}

LLVM IR (-O2):
@.str = [14 x i8] c"%d + %d = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 1, i32 10, i32 11)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 2, i32 20, i32 22)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 3, i32 30, i32 33)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 4, i32 40, i32 44)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 5, i32 50, i32 55)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 6, i32 60, i32 66)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 7, i32 70, i32 77)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 8, i32 80, i32 88)
ret i32 0
}