#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_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ y;
  int /*<<< orphan*/ x;
  int /*<<< orphan*/ window;
  int /*<<< orphan*/ event;
};
typedef TYPE_1__ XGravityEvent;
typedef int /*<<< orphan*/ XEvent;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/,
                           int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void do_GravityNotify(FILE *out_f, XEvent *eventp) {
  XGravityEvent *e = (XGravityEvent *)eventp;
  fprintf(out_f, "    event 0x%lx, window 0x%lx, (%d,%d)\n", e->event,
          e->window, e->x, e->y);
}


x86 assembly (clang, -O0):
<do_GravityNotify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%edx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%r8d
mov    -0x18(%rbp),%rax
mov    (%rax),%r9d
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_GravityNotify>:
mov    0xc(%rsi),%edx
mov    0x8(%rsi),%ecx
mov    (%rsi),%r9d
mov    0x4(%rsi),%r8d
lea    0xedc(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32, i32, i32, i32 }
@.str = [40 x i8] c" event 0x%lx, window 0x%lx, (%d,%d)\0A\00"
define void @do_GravityNotify(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca %struct.TYPE_2__*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = bitcast i32* %6 to %struct.TYPE_2__*
store %struct.TYPE_2__* %7, %struct.TYPE_2__** %5
%8 = load i32*, i32** %3
%9 = load %struct.TYPE_2__*, %struct.TYPE_2__** %5
%10 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %9, i32 0, i32 3
%11 = load i32, i32* %10
%12 = load %struct.TYPE_2__*, %struct.TYPE_2__** %5
%13 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %12, i32 0, i32 2
%14 = load i32, i32* %13
%15 = load %struct.TYPE_2__*, %struct.TYPE_2__** %5
%16 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %15, i32 0, i32 1
%17 = load i32, i32* %16
%18 = load %struct.TYPE_2__*, %struct.TYPE_2__** %5
%19 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %18, i32 0, i32 0
%20 = load i32, i32* %19
%21 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %14, i32 %17, i32 %20)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c" event 0x%lx, window 0x%lx, (%d,%d)\0A\00"
define void @do_GravityNotify(i32* nocapture %0, i32* nocapture %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 3
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %1, i64 2
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %1, i64 1
%8 = load i32, i32* %7
%9 = load i32, i32* %1
%10 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6, i32 %8, i32 %9)
ret void
}