#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();
scalar_t__ memcmp(int *, int *, int);
int main() {
  int val1 = 432459243;
  int val2 = 234123423;
  if (memcmp(&val1, &val2, sizeof(int) / sizeof(char)) == 0) {
    abort();
  }
  if (memcmp(&val1, &val1, sizeof(int) / sizeof(char)) != 0) {
    abort();
  }
  if (memcmp(&val2, &val2, sizeof(int) / sizeof(char)) != 0) {
    abort();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x19c6cdeb,-0x4(%rbp)
movl   $0xdf4709f,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
jne    1159 <main+0x39>
mov    $0x0,%al
call   1030 <abort@plt>
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
mov    %rsi,%rdi
call   1040 <memcmp@plt>
cmp    $0x0,%rax
je     117b <main+0x5b>
mov    $0x0,%al
call   1030 <abort@plt>
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
mov    %rsi,%rdi
call   1040 <memcmp@plt>
cmp    $0x0,%rax
je     119d <main+0x7d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x19c6cdeb,0x4(%rsp)
19
movl   $0xdf4709f,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1040 <memcmp@plt>
test   %rax,%rax
je     1177 <main+0x57>
lea    0x4(%rsp),%rdi
mov    %rdi,%rsi
mov    $0x4,%edx
call   1040 <memcmp@plt>
test   %rax,%rax
jne    1177 <main+0x57>
mov    %rsp,%rdi
mov    %rdi,%rsi
mov    $0x4,%edx
call   1040 <memcmp@plt>
test   %rax,%rax
jne    1177 <main+0x57>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 432459243, i32* %1
store i32 234123423, i32* %2
%3 = call i64 @memcmp(i32* %1, i32* %2, i32 4)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
%8 = call i64 @memcmp(i32* %1, i32* %1, i32 4)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %7
%13 = call i64 @memcmp(i32* %2, i32* %2, i32 4)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %12
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 432459243, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 234123423, i32* %2
%5 = call i64 @memcmp(i32* %1, i32* %2, i32 4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
%10 = call i64 @memcmp(i32* %1, i32* %1, i32 4)
%11 = icmp eq i64 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = call i32 (...) @abort()
unreachable
14: ; preds = %9
%15 = call i64 @memcmp(i32* %2, i32* %2, i32 4)
%16 = icmp eq i64 %15, 0
br i1 %16, label %19, label %17
17: ; preds = %14
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %14
ret i32 0
}