#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 main(void) {
  int original[3] = {1, 2, 3};
  int copia[3] = {1, 1 + 1, 5};
  int i, son_iguales;
  son_iguales = 1;
  i = 0;
  while (i < 3 && son_iguales) {
    if (copia[i] != original[i]) {
      son_iguales = 0;
    }
    i++;
  }
  if (son_iguales) {
    printf("Son iguales\n");
  } else {
    printf("No son iguales \n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    0xed2(%rip),%rax
mov    %rax,-0x1c(%rbp)
mov    0xed0(%rip),%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x24(%rbp)
movl   $0x0,-0x20(%rbp)
xor    %eax,%eax
cmpl   $0x3,-0x20(%rbp)
mov    %al,-0x25(%rbp)
jge    116e <main+0x5e>
cmpl   $0x0,-0x24(%rbp)
setne  %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
test   $0x1,%al
jne    117e <main+0x6e>
jmp    11a9 <main+0x99>
movslq -0x20(%rbp),%rax
mov    -0x1c(%rbp,%rax,4),%eax
movslq -0x20(%rbp),%rcx
cmp    -0x10(%rbp,%rcx,4),%eax
je     119b <main+0x8b>
movl   $0x0,-0x24(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1155 <main+0x45>
cmpl   $0x0,-0x24(%rbp)
je     11c4 <main+0xb4>
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
jmp    11d0 <main+0xc0>
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [16 x i8] c"No son iguales \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}