#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 */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ None;
int /*<<< orphan*/ XFlush(int /*<<< orphan*/ *);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/);
int /*<<< orphan*/ XRootWindow(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ XWarpPointer(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int, int);
void warp_pointer(int x, int y) {
  Display *dpy = XOpenDisplay(0);
  XWarpPointer(dpy, None, XRootWindow(dpy, 0), 0, 0, 0, 0, x, y);
  XFlush(dpy);
}


x86 assembly (clang, -O0):
<warp_pointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <XOpenDisplay@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1060 <XRootWindow@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
mov    -0x4(%rbp),%r10d
mov    -0x8(%rbp),%eax
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <XWarpPointer@plt>
mov    -0x10(%rbp),%rdi
call   1050 <XFlush@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<warp_pointer>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r15d
mov    %edi,%r14d
xor    %edi,%edi
call   1040 <XOpenDisplay@plt>
mov    %rax,%rbx
mov    0x2e8a(%rip),%rax
mov    (%rax),%ebp
mov    %rbx,%rdi
xor    %esi,%esi
call   1060 <XRootWindow@plt>
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %eax,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %r15
push   %r14
push   $0x0
call   1030 <XWarpPointer@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <XFlush@plt>

LLVM IR (-O0):
@None = global i32 0
define void @warp_pointer(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32* @XOpenDisplay(i32 0)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* @None
%9 = load i32*, i32** %5
%10 = call i32 @XRootWindow(i32* %9, i32 0)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @XWarpPointer(i32* %7, i32 %8, i32 %10, i32 0, i32 0, i32 0, i32 0, i32 %11, i32 %12)
%14 = load i32*, i32** %5
%15 = call i32 @XFlush(i32* %14)
ret void
}

LLVM IR (-O2):
@None = global i32 0
define void @warp_pointer(i32 %0, i32 %1) {
%3 = tail call i32* @XOpenDisplay(i32 0)
%4 = load i32, i32* @None
%5 = tail call i32 @XRootWindow(i32* %3, i32 0)
%6 = tail call i32 @XWarpPointer(i32* %3, i32 %4, i32 %5, i32 0, i32 0, i32 0, i32 0, i32 %0, i32 %1)
%7 = tail call i32 @XFlush(i32* %3)
ret void
}