#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 */
typedef int /*<<< orphan*/ nums;

/* Variables and functions */
scalar_t__ memcmp(int *, int *, int);
int /*<<< orphan*/ printf(char *);
int main() {
  int nums[] = {1, 2, 3, 4};
  int nums2[] = {1, 2, 3, 4};
  int nums3[] = {1, 2, 3, 6};
  if (memcmp(nums, nums2, sizeof(nums)) == 0)
    printf("They are equal.\n");
  else
    printf("They are not equal.\n");
  if (memcmp(nums, nums3, sizeof(nums)) == 0)
    printf("They are equal.\n");
  else
    printf("They are not equal.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb1(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeae(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xeab(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x10,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
jne    119e <main+0x7e>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    11aa <main+0x8a>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x10,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
jne    11d7 <main+0xb7>
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
jmp    11e3 <main+0xc3>
lea    0xe53(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
movaps 0xed0(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps 0xecf(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x20(%rsp),%r14
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
mov    $0x10,%edx
call   1040 <memcmp@plt>
test   %rax,%rax
lea    0xece(%rip),%r15
lea    0xeb3(%rip),%rbx
mov    %rbx,%rdi
cmove  %r15,%rdi
call   1030 <puts@plt>
mov    %rsp,%rsi
mov    %r14,%rdi
mov    $0x10,%edx
call   1040 <memcmp@plt>
test   %rax,%rax
cmove  %r15,%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.nums = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@__const.main.nums2 = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@__const.main.nums3 = [4 x i32] [i32 1, i32 2, i32 3, i32 6]
@.str = [17 x i8] c"They are equal.\0A\00"
@.str.1 = [21 x i8] c"They are not equal.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
%3 = alloca [4 x i32]
%4 = alloca [4 x i32]
store i32 0, i32* %1
%5 = bitcast [4 x i32]* %2 to i8*
%6 = bitcast [4 x i32]* %3 to i8*
%7 = bitcast [4 x i32]* %4 to i8*
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%10 = call i64 @memcmp(i32* %8, i32* %9, i32 16)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %16
14: ; preds = %0
%15 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %4, i64 0, i64 0
%19 = call i64 @memcmp(i32* %17, i32* %18, i32 16)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %16
%22 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %25
23: ; preds = %16
%24 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %25
25: ; preds = %23, %21
ret i32 0
}

LLVM IR (-O2):
@__const.main.nums2 = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@__const.main.nums3 = [4 x i32] [i32 1, i32 2, i32 3, i32 6]
@str.2 = [20 x i8] c"They are not equal.\00"
@str.4 = [16 x i8] c"They are equal.\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = alloca [4 x i32]
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %1 to i8*
%5 = bitcast [4 x i32]* %2 to i8*
%6 = bitcast [4 x i32]* %3 to i8*
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%9 = call i64 @memcmp(i32* %7, i32* %8, i32 16)
%10 = icmp eq i64 %9, 0
%11 = select i1 %10, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0)
%12 = call i32 @puts(i8* dereferenceable(1) %11)
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%14 = call i64 @memcmp(i32* %7, i32* %13, i32 16)
%15 = icmp eq i64 %14, 0
%16 = select i1 %15, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.2, i64 0, i64 0)
%17 = call i32 @puts(i8* dereferenceable(1) %16)
ret i32 0
}