#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*/ abort();
void compare_int4(int *a, int *b) {
  int i;
  for (i = 0; i < 4; ++i)
    if (a[i] != b[i])
      abort();
}


x86 assembly (clang, -O0):
<compare_int4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1167 <compare_int4+0x57>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
je     1154 <compare_int4+0x44>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1159 <compare_int4+0x49>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <compare_int4+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int4>:
push   %rax
mov    (%rdi),%eax
cmp    (%rsi),%eax
jne    1131 <compare_int4+0x21>
mov    0x4(%rdi),%eax
cmp    0x4(%rsi),%eax
jne    1131 <compare_int4+0x21>
mov    0x8(%rdi),%eax
cmp    0x8(%rsi),%eax
jne    1131 <compare_int4+0x21>
mov    0xc(%rdi),%eax
cmp    0xc(%rsi),%eax
jne    1131 <compare_int4+0x21>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @compare_int4(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %24, %2
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 4
br i1 %8, label %9, label %27
9: ; preds = %6
%10 = load i32*, i32** %3
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
%14 = load i32, i32* %13
%15 = load i32*, i32** %4
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = icmp ne i32 %14, %19
br i1 %20, label %21, label %23
21: ; preds = %9
%22 = call i32 (...) @abort()
unreachable
23: ; preds = %9
br label %24
24: ; preds = %23
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %6
27: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @compare_int4(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %25
6: ; preds = %2
%7 = getelementptr inbounds i32, i32* %0, i64 1
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %1, i64 1
%10 = load i32, i32* %9
%11 = icmp eq i32 %8, %10
br i1 %11, label %12, label %25
12: ; preds = %6
%13 = getelementptr inbounds i32, i32* %0, i64 2
%14 = load i32, i32* %13
%15 = getelementptr inbounds i32, i32* %1, i64 2
%16 = load i32, i32* %15
%17 = icmp eq i32 %14, %16
br i1 %17, label %18, label %25
18: ; preds = %12
%19 = getelementptr inbounds i32, i32* %0, i64 3
%20 = load i32, i32* %19
%21 = getelementptr inbounds i32, i32* %1, i64 3
%22 = load i32, i32* %21
%23 = icmp eq i32 %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
ret void
25: ; preds = %18, %12, %6, %2
%26 = tail call i32 (...) @abort()
unreachable
}