#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 flock {
  scalar_t__ l_whence;
  scalar_t__ l_start;
  scalar_t__ l_len;
};

/* Variables and functions */
int are_flocks_sane(struct flock *src, struct flock *cpy) {
  return ((src->l_whence == cpy->l_whence) && (src->l_start == cpy->l_start) &&
          (src->l_len == cpy->l_len));
}


x86 assembly (clang, -O0):
<are_flocks_sane>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
mov    %al,-0x11(%rbp)
jne    1156 <are_flocks_sane+0x56>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rcx
mov    -0x10(%rbp),%rdx
xor    %eax,%eax
cmp    0x8(%rdx),%rcx
mov    %al,-0x11(%rbp)
jne    1156 <are_flocks_sane+0x56>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    0x10(%rcx),%rax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<are_flocks_sane>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
jne    1121 <are_flocks_sane+0x21>
mov    0x8(%rdi),%rcx
cmp    0x8(%rsi),%rcx
jne    1121 <are_flocks_sane+0x21>
mov    0x10(%rdi),%rcx
xor    %eax,%eax
cmp    0x10(%rsi),%rcx
sete   %al
ret

LLVM IR (-O0):
%struct.flock = type { i64, i64, i64 }
define i32 @are_flocks_sane(%struct.flock* %0, %struct.flock* %1) {
%3 = alloca %struct.flock*
%4 = alloca %struct.flock*
store %struct.flock* %0, %struct.flock** %3
store %struct.flock* %1, %struct.flock** %4
%5 = load %struct.flock*, %struct.flock** %3
%6 = getelementptr inbounds %struct.flock, %struct.flock* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = load %struct.flock*, %struct.flock** %4
%9 = getelementptr inbounds %struct.flock, %struct.flock* %8, i32 0, i32 0
%10 = load i64, i64* %9
%11 = icmp eq i64 %7, %10
br i1 %11, label %12, label %28
12: ; preds = %2
%13 = load %struct.flock*, %struct.flock** %3
%14 = getelementptr inbounds %struct.flock, %struct.flock* %13, i32 0, i32 1
%15 = load i64, i64* %14
%16 = load %struct.flock*, %struct.flock** %4
%17 = getelementptr inbounds %struct.flock, %struct.flock* %16, i32 0, i32 1
%18 = load i64, i64* %17
%19 = icmp eq i64 %15, %18
br i1 %19, label %20, label %28
20: ; preds = %12
%21 = load %struct.flock*, %struct.flock** %3
%22 = getelementptr inbounds %struct.flock, %struct.flock* %21, i32 0, i32 2
%23 = load i64, i64* %22
%24 = load %struct.flock*, %struct.flock** %4
%25 = getelementptr inbounds %struct.flock, %struct.flock* %24, i32 0, i32 2
%26 = load i64, i64* %25
%27 = icmp eq i64 %23, %26
br label %28
28: ; preds = %20, %12, %2
%29 = phi i1 [ false, %12 ], [ false, %2 ], [ %27, %20 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
%struct.flock = type { i64, i64, i64 }
define i32 @are_flocks_sane(%struct.flock* nocapture %0, %struct.flock* nocapture %1) {
%3 = getelementptr inbounds %struct.flock, %struct.flock* %0, i64 0, i32 0
%4 = load i64, i64* %3
%5 = getelementptr inbounds %struct.flock, %struct.flock* %1, i64 0, i32 0
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
br i1 %7, label %8, label %21
8: ; preds = %2
%9 = getelementptr inbounds %struct.flock, %struct.flock* %0, i64 0, i32 1
%10 = load i64, i64* %9
%11 = getelementptr inbounds %struct.flock, %struct.flock* %1, i64 0, i32 1
%12 = load i64, i64* %11
%13 = icmp eq i64 %10, %12
br i1 %13, label %14, label %21
14: ; preds = %8
%15 = getelementptr inbounds %struct.flock, %struct.flock* %0, i64 0, i32 2
%16 = load i64, i64* %15
%17 = getelementptr inbounds %struct.flock, %struct.flock* %1, i64 0, i32 2
%18 = load i64, i64* %17
%19 = icmp eq i64 %16, %18
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %14, %8, %2
%22 = phi i32 [ 0, %8 ], [ 0, %2 ], [ %20, %14 ]
ret i32 %22
}