#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 */
struct edid_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ DDC_Deinit();
int /*<<< orphan*/ DDC_Init(char *);
int /*<<< orphan*/ DDC_ProbeEdid();
int memcmp(char *, char *, int);
int /*<<< orphan*/ print_usage();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  struct edid_info *pinfo = NULL;
  int interval = 0;
  int ret = 0;
  char a[] = {0x00, 0x02};
  char b[] = {0x00, 0x02};
  int i = memcmp(a, b, 2);
  printf("ret = %d\n", i);
  return 0;
  if (argc == 1) {
    DDC_Init("/dev/i2c-2");
    DDC_ProbeEdid();
    DDC_Deinit();
    return 0;
  } else
    print_usage();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    0xead(%rip),%ax
mov    %ax,-0x22(%rbp)
mov    0xea4(%rip),%ax
mov    %ax,-0x24(%rbp)
lea    -0x22(%rbp),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x2,%edx
call   1040 <memcmp@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%esi
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x200,0x6(%rsp)
movw   $0x200,0x4(%rsp)
lea    0x6(%rsp),%rdi
lea    0x4(%rsp),%rsi
mov    $0x2,%edx
call   1040 <memcmp@plt>
lea    0xeb6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.edid_info = type { i32 }
@__const.main.a = [2 x i8] c"\00\02"
@__const.main.b = [2 x i8] c"\00\02"
@.str = [10 x i8] c"ret = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.edid_info*
%7 = alloca i32
%8 = alloca i32
%9 = alloca [2 x i8]
%10 = alloca [2 x i8]
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.edid_info* null, %struct.edid_info** %6
store i32 0, i32* %7
store i32 0, i32* %8
%12 = bitcast [2 x i8]* %9 to i8*
%13 = bitcast [2 x i8]* %10 to i8*
%14 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%15 = getelementptr inbounds [2 x i8], [2 x i8]* %10, i64 0, i64 0
%16 = call i32 @memcmp(i8* %14, i8* %15, i32 2)
store i32 %16, i32* %11
%17 = load i32, i32* %11
%18 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
%struct.edid_info = type { i32 }
@.str = [10 x i8] c"ret = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i16
%4 = alloca i16
%5 = bitcast i16* %3 to i8*
store i16 512, i16* %3
%6 = bitcast i16* %4 to i8*
store i16 512, i16* %4
%7 = call i32 @memcmp(i8* %5, i8* %6, i32 2)
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}