#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 */
typedef struct TYPE_7__ TYPE_3__;
typedef struct TYPE_6__ TYPE_2__;
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
typedef scalar_t__ XPointer;
struct TYPE_6__ {
  scalar_t__ window;
};
struct TYPE_5__ {
  scalar_t__ type;
};
struct TYPE_7__ {
  TYPE_2__ xvisibility;
  TYPE_1__ xany;
};
typedef TYPE_3__ XEvent;
typedef scalar_t__ Window;
typedef int /*<<< orphan*/ Display;
typedef int Bool;

/* Variables and functions */
scalar_t__ MapNotify;
Bool MapNotify_event_p(Display *dpy, XEvent *event, XPointer window) {
  return (event->xany.type == MapNotify &&
          event->xvisibility.window == (Window)window);
}


x86 assembly (clang, -O0):
<MapNotify_event_p>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rcx
xor    %eax,%eax
mov    0x2ec7(%rip),%rdx
cmp    (%rdx),%rcx
mov    %al,-0x19(%rbp)
jne    113e <MapNotify_event_p+0x3e>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MapNotify_event_p>:
mov    0x8(%rsi),%rcx
mov    0x2edd(%rip),%rdi
xor    %eax,%eax
cmp    (%rdi),%rcx
jne    111a <MapNotify_event_p+0x1a>
xor    %eax,%eax
cmp    %rdx,(%rsi)
sete   %al
ret

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

LLVM IR (-O2):
%struct.TYPE_7__ = type { %struct.TYPE_6__, %struct.TYPE_5__ }
%struct.TYPE_6__ = type { i64 }
%struct.TYPE_5__ = type { i64 }
@MapNotify = global i64 0
define i32 @MapNotify_event_p(i32* nocapture readnone %0, %struct.TYPE_7__* nocapture %1, i64 %2) {
%4 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %1, i64 0, i32 1, i32 0
%5 = load i64, i64* %4
%6 = load i64, i64* @MapNotify
%7 = icmp eq i64 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = getelementptr inbounds %struct.TYPE_7__, %struct.TYPE_7__* %1, i64 0, i32 0, i32 0
%10 = load i64, i64* %9
%11 = icmp eq i64 %10, %2
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %8, %3
%14 = phi i32 [ 0, %3 ], [ %12, %8 ]
ret i32 %14
}