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

/* Variables and functions */
int /*<<< orphan*/ DefaultRootWindow(int /*<<< orphan*/ *);
int /*<<< orphan*/ None;
int /*<<< orphan*/ XCloseDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ XFlush(int /*<<< orphan*/ *);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ XWarpPointer(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, long, long);
long strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char **argv) {
  if (argc != 3) {
    return 0;
  }
  long x = strtol(argv[1], NULL, 10);
  long y = strtol(argv[2], NULL, 10);
  Display *display = XOpenDisplay(NULL);
  if (display == NULL) {
    return 1;
  }
  Window window = DefaultRootWindow(display);
  XWarpPointer(display, None, window, 0, 0, 0, 0, x, y);
  XFlush(display);
  XCloseDisplay(display);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     118c <main+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1240 <main+0xe0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,-0x20(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <XOpenDisplay@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    11e4 <main+0x84>
movl   $0x1,-0x4(%rbp)
jmp    1240 <main+0xe0>
mov    -0x28(%rbp),%rdi
call   1030 <DefaultRootWindow@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2ded(%rip),%rax
mov    (%rax),%esi
mov    -0x2c(%rbp),%edx
mov    -0x18(%rbp),%r10
mov    -0x20(%rbp),%rax
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1040 <XWarpPointer@plt>
mov    -0x28(%rbp),%rdi
call   1070 <XFlush@plt>
mov    -0x28(%rbp),%rdi
call   1080 <XCloseDisplay@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %r15d,%r15d
cmp    $0x3,%edi
jne    11f8 <main+0x98>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
xor    %r15d,%r15d
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,%r14
mov    0x10(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1060 <strtol@plt>
mov    %rax,%r12
xor    %edi,%edi
call   1050 <XOpenDisplay@plt>
test   %rax,%rax
je     11f2 <main+0x92>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <DefaultRootWindow@plt>
mov    0x2e2a(%rip),%rcx
mov    (%rcx),%esi
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %eax,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %r12
push   %r14
push   $0x0
call   1040 <XWarpPointer@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
call   1070 <XFlush@plt>
mov    %rbx,%rdi
call   1080 <XCloseDisplay@plt>
jmp    11f8 <main+0x98>
mov    $0x1,%r15d
mov    %r15d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@None = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 3
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 0, i32* %3
br label %39
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i64 @strtol(i8* %16, i32* null, i32 10)
store i64 %17, i64* %6
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = call i64 @strtol(i8* %20, i32* null, i32 10)
store i64 %21, i64* %7
%22 = call i32* @XOpenDisplay(i32* null)
store i32* %22, i32** %8
%23 = load i32*, i32** %8
%24 = icmp eq i32* %23, null
br i1 %24, label %25, label %26
25: ; preds = %13
store i32 1, i32* %3
br label %39
26: ; preds = %13
%27 = load i32*, i32** %8
%28 = call i32 @DefaultRootWindow(i32* %27)
store i32 %28, i32* %9
%29 = load i32*, i32** %8
%30 = load i32, i32* @None
%31 = load i32, i32* %9
%32 = load i64, i64* %6
%33 = load i64, i64* %7
%34 = call i32 @XWarpPointer(i32* %29, i32 %30, i32 %31, i32 0, i32 0, i32 0, i32 0, i64 %32, i64 %33)
%35 = load i32*, i32** %8
%36 = call i32 @XFlush(i32* %35)
%37 = load i32*, i32** %8
%38 = call i32 @XCloseDisplay(i32* %37)
store i32 0, i32* %3
br label %39
39: ; preds = %26, %25, %12
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
@None = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %19
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @strtol(i8* nocapture %6, i32* null, i32 10)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i64 @strtol(i8* nocapture %9, i32* null, i32 10)
%11 = tail call i32* @XOpenDisplay(i32* null)
%12 = icmp eq i32* %11, null
br i1 %12, label %19, label %13
13: ; preds = %4
%14 = tail call i32 @DefaultRootWindow(i32* %11)
%15 = load i32, i32* @None
%16 = tail call i32 @XWarpPointer(i32* %11, i32 %15, i32 %14, i32 0, i32 0, i32 0, i32 0, i64 %7, i64 %10)
%17 = tail call i32 @XFlush(i32* %11)
%18 = tail call i32 @XCloseDisplay(i32* %11)
br label %19
19: ; preds = %13, %4, %2
%20 = phi i32 [ 0, %2 ], [ 0, %13 ], [ 1, %4 ]
ret i32 %20
}