#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*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int False;
int /*<<< orphan*/ None;
int /*<<< orphan*/ RootWindow(int /*<<< orphan*/ *, int);
int ScreenCount(int /*<<< orphan*/ *);
int True;
int /*<<< orphan*/ XCloseDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ XFlush(int /*<<< orphan*/ *);
int /*<<< orphan*/ *XOpenDisplay(int /*<<< orphan*/ *);
int XQueryPointer(int /*<<< orphan*/ *, int /*<<< orphan*/,
                  int /*<<< orphan*/ *, int /*<<< orphan*/ *, int *, int *,
                  int *, int *, unsigned int *);
int /*<<< orphan*/ XWarpPointer(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int, int);
int atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ exit_usage(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  int delay = 15;
  int timeout = 0;
  int deltaX = 50;
  int deltaT = 5;
  bool countdown;
  if (argc > 5) {
    exit_usage("invalid number of arguments");
  } else if (argc == 5) {
    delay = atoi(argv[1]);
    timeout = atoi(argv[2]);
    deltaX = atoi(argv[3]);
    deltaT = atoi(argv[4]);
  } else if (argc == 4) {
    delay = atoi(argv[1]);
    timeout = atoi(argv[2]);
    deltaX = atoi(argv[3]);
  } else if (argc == 3) {
    delay = atoi(argv[1]);
    timeout = atoi(argv[2]);
  } else if (argc == 2) {
    delay = atoi(argv[1]);
  }
  if (timeout == 0)
    countdown = False;
  else {
    countdown = True;
    if (deltaT > timeout)
      exit_usage("deltaT too large for timeout");
  }
  Display *display = XOpenDisplay(NULL);
  if (display == NULL) {
    fprintf(stderr, "Error opening display!!!\n");
    exit(EXIT_FAILURE);
  }
  int number_of_screens = ScreenCount(display);
  Window *root_windows;
  root_windows = (Window *)malloc(sizeof(Window) * number_of_screens);
  int ii;
  for (ii = 0; ii < number_of_screens; ii++) {
    root_windows[ii] = RootWindow(display, ii);
  }
  Window root_return, child_return;
  int root_x, root_y, win_x, win_y;
  unsigned int mask_return;
  while (timeout >= 0) {
    bool mouse_found = false;
    for (ii = 0; ii < number_of_screens; ii++) {
      mouse_found =
          XQueryPointer(display, root_windows[ii], &root_return, &child_return,
                        &root_x, &root_y, &win_x, &win_y, &mask_return);
      if (mouse_found)
        break;
    }
    if (!mouse_found) {
      fprintf(stderr, "No mouse found.\n");
      exit(EXIT_FAILURE);
    }
    XWarpPointer(display, None, *(root_windows + ii), 0, 0, 0, 0,
                 root_x + deltaX, root_y + deltaX);
    XFlush(display);
    if (deltaT > 0)
      sleep(deltaT);
    XWarpPointer(display, None, *(root_windows + ii), 0, 0, 0, 0, root_x,
                 root_y);
    XFlush(display);
    sleep(delay);
    if (countdown)
      timeout = timeout - delay + deltaT;
  }
  free(root_windows);
  XCloseDisplay(display);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xf,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x32,-0x1c(%rbp)
movl   $0x5,-0x20(%rbp)
cmpl   $0x5,-0x8(%rbp)
jle    1230 <main+0x50>
lea    0xdda(%rip),%rdi
call   1040 <exit_usage@plt>
jmp    131b <main+0x13b>
cmpl   $0x5,-0x8(%rbp)
jne    127f <main+0x9f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x20(%rbp)
jmp    1316 <main+0x136>
cmpl   $0x4,-0x8(%rbp)
jne    12be <main+0xde>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x1c(%rbp)
jmp    1311 <main+0x131>
cmpl   $0x3,-0x8(%rbp)
jne    12ed <main+0x10d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    130c <main+0x12c>
cmpl   $0x2,-0x8(%rbp)
jne    1307 <main+0x127>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10d0 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    130c <main+0x12c>
jmp    1311 <main+0x131>
jmp    1316 <main+0x136>
jmp    131b <main+0x13b>
cmpl   $0x0,-0x18(%rbp)
jne    1336 <main+0x156>
mov    0x2cbc(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
jmp    135f <main+0x17f>
mov    0x2c9b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    135a <main+0x17a>
lea    0xcc7(%rip),%rdi
call   1040 <exit_usage@plt>
jmp    135f <main+0x17f>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <XOpenDisplay@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    139a <main+0x1ba>
mov    0x2c4a(%rip),%rax
mov    (%rax),%edi
lea    0xcb2(%rip),%rsi
call   1080 <fprintf@plt>
mov    0x2c2d(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
mov    -0x30(%rbp),%rdi
call   1060 <ScreenCount@plt>
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x40(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    13f3 <main+0x213>
mov    -0x30(%rbp),%rdi
mov    -0x44(%rbp),%esi
call   10b0 <RootWindow@plt>
mov    %eax,%edx
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    13c0 <main+0x1e0>
jmp    13f8 <main+0x218>
cmpl   $0x0,-0x18(%rbp)
jl     1574 <main+0x394>
movl   $0x0,-0x64(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    147f <main+0x29f>
mov    -0x30(%rbp),%rdi
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    -0x48(%rbp),%rdx
lea    -0x4c(%rbp),%rcx
lea    -0x50(%rbp),%r8
lea    -0x54(%rbp),%r9
lea    -0x58(%rbp),%r11
lea    -0x5c(%rbp),%r10
lea    -0x60(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1090 <XQueryPointer@plt>
mov    %eax,-0x64(%rbp)
cmpl   $0x0,-0x64(%rbp)
je     146c <main+0x28c>
jmp    147f <main+0x29f>
jmp    1471 <main+0x291>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1410 <main+0x230>
cmpl   $0x0,-0x64(%rbp)
jne    14ac <main+0x2cc>
mov    0x2b38(%rip),%rax
mov    (%rax),%edi
lea    0xbba(%rip),%rsi
call   1080 <fprintf@plt>
mov    0x2b1b(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
mov    -0x30(%rbp),%rdi
mov    0x2b29(%rip),%rax
mov    (%rax),%esi
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x50(%rbp),%r10d
add    -0x1c(%rbp),%r10d
mov    -0x54(%rbp),%eax
add    -0x1c(%rbp),%eax
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1050 <XWarpPointer@plt>
mov    -0x30(%rbp),%rdi
call   10c0 <XFlush@plt>
cmpl   $0x0,-0x20(%rbp)
jle    150b <main+0x32b>
mov    -0x20(%rbp),%edi
call   1100 <sleep@plt>
mov    -0x30(%rbp),%rdi
mov    0x2aca(%rip),%rax
mov    (%rax),%esi
mov    -0x40(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x50(%rbp),%r10d
mov    -0x54(%rbp),%eax
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1050 <XWarpPointer@plt>
mov    -0x30(%rbp),%rdi
call   10c0 <XFlush@plt>
mov    -0x14(%rbp),%edi
call   1100 <sleep@plt>
cmpl   $0x0,-0x24(%rbp)
je     156f <main+0x38f>
mov    -0x18(%rbp),%eax
sub    -0x14(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    13f8 <main+0x218>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   10f0 <XCloseDisplay@plt>
mov    0x2a2b(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
cmp    $0x6,%edi
jl     1242 <main+0x62>
lea    0xe16(%rip),%rdi
call   1040 <exit_usage@plt>
mov    $0x5,%r15d
movl   $0x32,0xc(%rsp)
movl   $0xf,0x8(%rsp)
mov    0x2dcc(%rip),%rax
mov    (%rax),%r13d
xor    %ebp,%ebp
xor    %edi,%edi
call   1070 <XOpenDisplay@plt>
test   %rax,%rax
jne    127e <main+0x9e>
mov    0x2d94(%rip),%rax
mov    (%rax),%edi
lea    0xe0c(%rip),%rsi
jmp    142d <main+0x24d>
mov    $0x5,%r15d
movl   $0x32,0xc(%rsp)
add    $0xfffffffe,%edi
cmp    $0x3,%edi
ja     145e <main+0x27e>
mov    %rsi,%rbx
lea    0xd9a(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
mov    0x8(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,0x8(%rsp)
jmp    1215 <main+0x35>
mov    %rax,%r14
mov    %rax,%rdi
call   1060 <ScreenCount@plt>
mov    %eax,%r12d
lea    0x0(,%r12,4),%edi
call   10a0 <malloc@plt>
mov    %rax,%rbx
test   %r12d,%r12d
jle    1419 <main+0x239>
mov    %ebp,0x14(%rsp)
mov    %r15d,0x10(%rsp)
mov    %r12d,%r15d
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
mov    %ebp,%esi
call   10b0 <RootWindow@plt>
mov    %eax,(%rbx,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%r15
jne    12c0 <main+0xe0>
cmpl   $0x0,0x14(%rsp)
js     1440 <main+0x260>
test   %r12d,%r12d
jle    141d <main+0x23d>
mov    0x10(%rsp),%eax
sub    0x8(%rsp),%eax
test   %r13d,%r13d
cmove  %r13d,%eax
mov    %eax,0x20(%rsp)
lea    0x1c(%rsp),%r12
lea    0x18(%rsp),%r13
jmp    135f <main+0x17f>
nopl   0x0(%rax)
mov    0x2cc9(%rip),%rax
mov    (%rax),%esi
mov    (%rbx,%rbp,4),%edx
mov    0x1c(%rsp),%eax
mov    0x18(%rsp),%ebp
sub    $0x8,%rsp
mov    %r14,%rdi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %rbp
push   %rax
push   $0x0
call   1050 <XWarpPointer@plt>
add    $0x20,%rsp
mov    %r14,%rdi
call   10c0 <XFlush@plt>
mov    0x8(%rsp),%edi
call   1100 <sleep@plt>
mov    0x20(%rsp),%eax
add    %eax,0x14(%rsp)
js     1440 <main+0x260>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%rbx,%rbp,4),%esi
sub    $0x8,%rsp
mov    %r14,%rdi
lea    0x3c(%rsp),%rdx
lea    0x38(%rsp),%rcx
mov    %r12,%r8
mov    %r13,%r9
lea    0x2c(%rsp),%rax
push   %rax
lea    0x38(%rsp),%rax
push   %rax
lea    0x44(%rsp),%rax
push   %rax
call   1090 <XQueryPointer@plt>
add    $0x20,%rsp
test   %eax,%eax
jne    13c0 <main+0x1e0>
add    $0x1,%rbp
cmp    %rbp,%r15
jne    1370 <main+0x190>
jmp    141d <main+0x23d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x2c19(%rip),%rax
mov    (%rax),%esi
mov    (%rbx,%rbp,4),%edx
mov    0x1c(%rsp),%r10d
mov    0xc(%rsp),%ecx
add    %ecx,%r10d
mov    0x18(%rsp),%eax
add    %ecx,%eax
sub    $0x8,%rsp
mov    %r14,%rdi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %rax
push   %r10
push   $0x0
call   1050 <XWarpPointer@plt>
add    $0x20,%rsp
mov    %r14,%rdi
call   10c0 <XFlush@plt>
mov    0x10(%rsp),%edi
test   %edi,%edi
jle    1310 <main+0x130>
call   1100 <sleep@plt>
jmp    1310 <main+0x130>
test   %ebp,%ebp
js     1440 <main+0x260>
mov    0x2ba4(%rip),%rax
mov    (%rax),%edi
lea    0xc36(%rip),%rsi
call   1080 <fprintf@plt>
mov    0x2b87(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   10f0 <XCloseDisplay@plt>
mov    0x2b61(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
movl   $0xf,0x8(%rsp)
jmp    1215 <main+0x35>
mov    0x8(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,0x8(%rsp)
mov    0x10(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,%ebp
movl   $0x32,0xc(%rsp)
jmp    14b2 <main+0x2d2>
mov    0x8(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,0x8(%rsp)
mov    0x10(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,%ebp
mov    0x18(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,0xc(%rsp)
mov    $0x5,%r15d
test   %ebp,%ebp
je     1215 <main+0x35>
jmp    14fb <main+0x31b>
mov    0x8(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,0x8(%rsp)
mov    0x10(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,%ebp
mov    0x18(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,0xc(%rsp)
mov    0x20(%rbx),%rdi
call   10d0 <atoi@plt>
mov    %eax,%r15d
test   %ebp,%ebp
je     1215 <main+0x35>
mov    0x2ad6(%rip),%rax
mov    (%rax),%r13d
cmp    %ebp,%r15d
jle    1221 <main+0x41>
lea    0xb17(%rip),%rdi
call   1040 <exit_usage@plt>
jmp    1221 <main+0x41>

LLVM IR (-O0):
@.str = [28 x i8] c"invalid number of arguments\00"
@False = global i32 0
@True = global i32 0
@.str.1 = [29 x i8] c"deltaT too large for timeout\00"
@stderr = global i32 0
@.str.2 = [26 x i8] c"Error opening display!!!\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [17 x i8] c"No mouse found.\0A\00"
@None = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 15, i32* %6
store i32 0, i32* %7
store i32 50, i32* %8
store i32 5, i32* %9
%23 = load i32, i32* %4
%24 = icmp sgt i32 %23, 5
br i1 %24, label %25, label %27
25: ; preds = %2
%26 = call i32 @exit_usage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %87
27: ; preds = %2
%28 = load i32, i32* %4
%29 = icmp eq i32 %28, 5
br i1 %29, label %30, label %47
30: ; preds = %27
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = call i32 @atoi(i8* %33)
store i32 %34, i32* %6
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 2
%37 = load i8*, i8** %36
%38 = call i32 @atoi(i8* %37)
store i32 %38, i32* %7
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 3
%41 = load i8*, i8** %40
%42 = call i32 @atoi(i8* %41)
store i32 %42, i32* %8
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 4
%45 = load i8*, i8** %44
%46 = call i32 @atoi(i8* %45)
store i32 %46, i32* %9
br label %86
47: ; preds = %27
%48 = load i32, i32* %4
%49 = icmp eq i32 %48, 4
br i1 %49, label %50, label %63
50: ; preds = %47
%51 = load i8**, i8*** %5
%52 = getelementptr inbounds i8*, i8** %51, i64 1
%53 = load i8*, i8** %52
%54 = call i32 @atoi(i8* %53)
store i32 %54, i32* %6
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 2
%57 = load i8*, i8** %56
%58 = call i32 @atoi(i8* %57)
store i32 %58, i32* %7
%59 = load i8**, i8*** %5
%60 = getelementptr inbounds i8*, i8** %59, i64 3
%61 = load i8*, i8** %60
%62 = call i32 @atoi(i8* %61)
store i32 %62, i32* %8
br label %85
63: ; preds = %47
%64 = load i32, i32* %4
%65 = icmp eq i32 %64, 3
br i1 %65, label %66, label %75
66: ; preds = %63
%67 = load i8**, i8*** %5
%68 = getelementptr inbounds i8*, i8** %67, i64 1
%69 = load i8*, i8** %68
%70 = call i32 @atoi(i8* %69)
store i32 %70, i32* %6
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds i8*, i8** %71, i64 2
%73 = load i8*, i8** %72
%74 = call i32 @atoi(i8* %73)
store i32 %74, i32* %7
br label %84
75: ; preds = %63
%76 = load i32, i32* %4
%77 = icmp eq i32 %76, 2
br i1 %77, label %78, label %83
78: ; preds = %75
%79 = load i8**, i8*** %5
%80 = getelementptr inbounds i8*, i8** %79, i64 1
%81 = load i8*, i8** %80
%82 = call i32 @atoi(i8* %81)
store i32 %82, i32* %6
br label %83
83: ; preds = %78, %75
br label %84
84: ; preds = %83, %66
br label %85
85: ; preds = %84, %50
br label %86
86: ; preds = %85, %30
br label %87
87: ; preds = %86, %25
%88 = load i32, i32* %7
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %87
%91 = load i32, i32* @False
store i32 %91, i32* %10
br label %100
92: ; preds = %87
%93 = load i32, i32* @True
store i32 %93, i32* %10
%94 = load i32, i32* %9
%95 = load i32, i32* %7
%96 = icmp sgt i32 %94, %95
br i1 %96, label %97, label %99
97: ; preds = %92
%98 = call i32 @exit_usage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %99
99: ; preds = %97, %92
br label %100
100: ; preds = %99, %90
%101 = call i32* @XOpenDisplay(i32* null)
store i32* %101, i32** %11
%102 = load i32*, i32** %11
%103 = icmp eq i32* %102, null
br i1 %103, label %104, label %109
104: ; preds = %100
%105 = load i32, i32* @stderr
%106 = call i32 @fprintf(i32 %105, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%107 = load i32, i32* @EXIT_FAILURE
%108 = call i32 @exit(i32 %107)
unreachable
109: ; preds = %100
%110 = load i32*, i32** %11
%111 = call i32 @ScreenCount(i32* %110)
store i32 %111, i32* %12
%112 = load i32, i32* %12
%113 = sext i32 %112 to i64
%114 = mul i64 4, %113
%115 = trunc i64 %114 to i32
%116 = call i64 @malloc(i32 %115)
%117 = inttoptr i64 %116 to i32*
store i32* %117, i32** %13
store i32 0, i32* %14
br label %118
118: ; preds = %130, %109
%119 = load i32, i32* %14
%120 = load i32, i32* %12
%121 = icmp slt i32 %119, %120
br i1 %121, label %122, label %133
122: ; preds = %118
%123 = load i32*, i32** %11
%124 = load i32, i32* %14
%125 = call i32 @RootWindow(i32* %123, i32 %124)
%126 = load i32*, i32** %13
%127 = load i32, i32* %14
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i32, i32* %126, i64 %128
store i32 %125, i32* %129
br label %130
130: ; preds = %122
%131 = load i32, i32* %14
%132 = add nsw i32 %131, 1
store i32 %132, i32* %14
br label %118
133: ; preds = %118
br label %134
134: ; preds = %210, %133
%135 = load i32, i32* %7
%136 = icmp sge i32 %135, 0
br i1 %136, label %137, label %211
137: ; preds = %134
store i32 0, i32* %22
store i32 0, i32* %14
br label %138
138: ; preds = %154, %137
%139 = load i32, i32* %14
%140 = load i32, i32* %12
%141 = icmp slt i32 %139, %140
br i1 %141, label %142, label %157
142: ; preds = %138
%143 = load i32*, i32** %11
%144 = load i32*, i32** %13
%145 = load i32, i32* %14
%146 = sext i32 %145 to i64
%147 = getelementptr inbounds i32, i32* %144, i64 %146
%148 = load i32, i32* %147
%149 = call i32 @XQueryPointer(i32* %143, i32 %148, i32* %15, i32* %16, i32* %17, i32* %18, i32* %19, i32* %20, i32* %21)
store i32 %149, i32* %22
%150 = load i32, i32* %22
%151 = icmp ne i32 %150, 0
br i1 %151, label %152, label %153
152: ; preds = %142
br label %157
153: ; preds = %142
br label %154
154: ; preds = %153
%155 = load i32, i32* %14
%156 = add nsw i32 %155, 1
store i32 %156, i32* %14
br label %138
157: ; preds = %152, %138
%158 = load i32, i32* %22
%159 = icmp ne i32 %158, 0
br i1 %159, label %165, label %160
160: ; preds = %157
%161 = load i32, i32* @stderr
%162 = call i32 @fprintf(i32 %161, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%163 = load i32, i32* @EXIT_FAILURE
%164 = call i32 @exit(i32 %163)
unreachable
165: ; preds = %157
%166 = load i32*, i32** %11
%167 = load i32, i32* @None
%168 = load i32*, i32** %13
%169 = load i32, i32* %14
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds i32, i32* %168, i64 %170
%172 = load i32, i32* %171
%173 = load i32, i32* %17
%174 = load i32, i32* %8
%175 = add nsw i32 %173, %174
%176 = load i32, i32* %18
%177 = load i32, i32* %8
%178 = add nsw i32 %176, %177
%179 = call i32 @XWarpPointer(i32* %166, i32 %167, i32 %172, i32 0, i32 0, i32 0, i32 0, i32 %175, i32 %178)
%180 = load i32*, i32** %11
%181 = call i32 @XFlush(i32* %180)
%182 = load i32, i32* %9
%183 = icmp sgt i32 %182, 0
br i1 %183, label %184, label %187
184: ; preds = %165
%185 = load i32, i32* %9
%186 = call i32 @sleep(i32 %185)
br label %187
187: ; preds = %184, %165
%188 = load i32*, i32** %11
%189 = load i32, i32* @None
%190 = load i32*, i32** %13
%191 = load i32, i32* %14
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds i32, i32* %190, i64 %192
%194 = load i32, i32* %193
%195 = load i32, i32* %17
%196 = load i32, i32* %18
%197 = call i32 @XWarpPointer(i32* %188, i32 %189, i32 %194, i32 0, i32 0, i32 0, i32 0, i32 %195, i32 %196)
%198 = load i32*, i32** %11
%199 = call i32 @XFlush(i32* %198)
%200 = load i32, i32* %6
%201 = call i32 @sleep(i32 %200)
%202 = load i32, i32* %10
%203 = icmp ne i32 %202, 0
br i1 %203, label %204, label %210
204: ; preds = %187
%205 = load i32, i32* %7
%206 = load i32, i32* %6
%207 = sub nsw i32 %205, %206
%208 = load i32, i32* %9
%209 = add nsw i32 %207, %208
store i32 %209, i32* %7
br label %210
210: ; preds = %204, %187
br label %134
211: ; preds = %134
%212 = load i32*, i32** %13
%213 = call i32 @free(i32* %212)
%214 = load i32*, i32** %11
%215 = call i32 @XCloseDisplay(i32* %214)
%216 = load i32, i32* @EXIT_SUCCESS
%217 = call i32 @exit(i32 %216)
unreachable
}

LLVM IR (-O2):
@.str = [28 x i8] c"invalid number of arguments\00"
@False = global i32 0
@True = global i32 0
@.str.1 = [29 x i8] c"deltaT too large for timeout\00"
@stderr = global i32 0
@.str.2 = [26 x i8] c"Error opening display!!!\0A\00"
@EXIT_FAILURE = global i32 0
@.str.3 = [17 x i8] c"No mouse found.\0A\00"
@None = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = icmp sgt i32 %0, 5
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 @exit_usage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %54
13: ; preds = %2
switch i32 %0, label %54 [
i32 5, label %14
i32 4, label %27
i32 3, label %37
i32 2, label %44
]
14: ; preds = %13
%15 = getelementptr inbounds i8*, i8** %1, i64 1
%16 = load i8*, i8** %15
%17 = tail call i32 @atoi(i8* %16)
%18 = getelementptr inbounds i8*, i8** %1, i64 2
%19 = load i8*, i8** %18
%20 = tail call i32 @atoi(i8* %19)
%21 = getelementptr inbounds i8*, i8** %1, i64 3
%22 = load i8*, i8** %21
%23 = tail call i32 @atoi(i8* %22)
%24 = getelementptr inbounds i8*, i8** %1, i64 4
%25 = load i8*, i8** %24
%26 = tail call i32 @atoi(i8* %25)
br label %48
27: ; preds = %13
%28 = getelementptr inbounds i8*, i8** %1, i64 1
%29 = load i8*, i8** %28
%30 = tail call i32 @atoi(i8* %29)
%31 = getelementptr inbounds i8*, i8** %1, i64 2
%32 = load i8*, i8** %31
%33 = tail call i32 @atoi(i8* %32)
%34 = getelementptr inbounds i8*, i8** %1, i64 3
%35 = load i8*, i8** %34
%36 = tail call i32 @atoi(i8* %35)
br label %48
37: ; preds = %13
%38 = getelementptr inbounds i8*, i8** %1, i64 1
%39 = load i8*, i8** %38
%40 = tail call i32 @atoi(i8* %39)
%41 = getelementptr inbounds i8*, i8** %1, i64 2
%42 = load i8*, i8** %41
%43 = tail call i32 @atoi(i8* %42)
br label %48
44: ; preds = %13
%45 = getelementptr inbounds i8*, i8** %1, i64 1
%46 = load i8*, i8** %45
%47 = tail call i32 @atoi(i8* %46)
br label %54
48: ; preds = %14, %37, %27
%49 = phi i32 [ %26, %14 ], [ 5, %27 ], [ 5, %37 ]
%50 = phi i32 [ %23, %14 ], [ %36, %27 ], [ 50, %37 ]
%51 = phi i32 [ %20, %14 ], [ %33, %27 ], [ %43, %37 ]
%52 = phi i32 [ %17, %14 ], [ %30, %27 ], [ %40, %37 ]
%53 = icmp eq i32 %51, 0
br i1 %53, label %54, label %59
54: ; preds = %13, %44, %11, %48
%55 = phi i32 [ %52, %48 ], [ 15, %13 ], [ %47, %44 ], [ 15, %11 ]
%56 = phi i32 [ %50, %48 ], [ 50, %13 ], [ 50, %44 ], [ 50, %11 ]
%57 = phi i32 [ %49, %48 ], [ 5, %13 ], [ 5, %44 ], [ 5, %11 ]
%58 = load i32, i32* @False
br label %64
59: ; preds = %48
%60 = load i32, i32* @True
%61 = icmp sgt i32 %49, %51
br i1 %61, label %62, label %64
62: ; preds = %59
%63 = tail call i32 @exit_usage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
br label %64
64: ; preds = %59, %62, %54
%65 = phi i32 [ %55, %54 ], [ %52, %62 ], [ %52, %59 ]
%66 = phi i32 [ 0, %54 ], [ %51, %62 ], [ %51, %59 ]
%67 = phi i32 [ %56, %54 ], [ %50, %62 ], [ %50, %59 ]
%68 = phi i32 [ %57, %54 ], [ %49, %62 ], [ %49, %59 ]
%69 = phi i32 [ %58, %54 ], [ %60, %62 ], [ %60, %59 ]
%70 = tail call i32* @XOpenDisplay(i32* null)
%71 = icmp eq i32* %70, null
br i1 %71, label %72, label %77
72: ; preds = %64
%73 = load i32, i32* @stderr
%74 = tail call i32 @fprintf(i32 %73, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%75 = load i32, i32* @EXIT_FAILURE
%76 = tail call i32 @exit(i32 %75)
unreachable
77: ; preds = %64
%78 = tail call i32 @ScreenCount(i32* %70)
%79 = shl i32 %78, 2
%80 = tail call i64 @malloc(i32 %79)
%81 = inttoptr i64 %80 to i32*
%82 = icmp sgt i32 %78, 0
br i1 %82, label %83, label %101
83: ; preds = %77
%84 = zext i32 %78 to i64
br label %85
85: ; preds = %83, %85
%86 = phi i64 [ 0, %83 ], [ %90, %85 ]
%87 = trunc i64 %86 to i32
%88 = tail call i32 @RootWindow(i32* %70, i32 %87)
%89 = getelementptr inbounds i32, i32* %81, i64 %86
store i32 %88, i32* %89
%90 = add nuw nsw i64 %86, 1
%91 = icmp eq i64 %90, %84
br i1 %91, label %92, label %85
92: ; preds = %85
%93 = bitcast i32* %3 to i8*
%94 = bitcast i32* %4 to i8*
%95 = bitcast i32* %5 to i8*
%96 = bitcast i32* %6 to i8*
%97 = bitcast i32* %7 to i8*
%98 = bitcast i32* %8 to i8*
%99 = bitcast i32* %9 to i8*
%100 = icmp sgt i32 %66, -1
br i1 %100, label %110, label %156
101: ; preds = %77
%102 = bitcast i32* %3 to i8*
%103 = bitcast i32* %4 to i8*
%104 = bitcast i32* %5 to i8*
%105 = bitcast i32* %6 to i8*
%106 = bitcast i32* %7 to i8*
%107 = bitcast i32* %8 to i8*
%108 = bitcast i32* %9 to i8*
%109 = icmp sgt i32 %66, -1
br i1 %109, label %128, label %156
110: ; preds = %92
%111 = icmp sgt i32 %68, 0
br i1 %82, label %112, label %128
112: ; preds = %110
%113 = sub i32 %68, %65
%114 = icmp eq i32 %69, 0
%115 = zext i32 %78 to i64
%116 = select i1 %114, i32 0, i32 %113
br label %117
117: ; preds = %112, %146
%118 = phi i32 [ %154, %146 ], [ %66, %112 ]
br label %119
119: ; preds = %117, %125
%120 = phi i64 [ 0, %117 ], [ %126, %125 ]
%121 = getelementptr inbounds i32, i32* %81, i64 %120
%122 = load i32, i32* %121
%123 = call i32 @XQueryPointer(i32* %70, i32 %122, i32* %3, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8, i32* %9)
%124 = icmp eq i32 %123, 0
br i1 %124, label %125, label %133
125: ; preds = %119
%126 = add nuw nsw i64 %120, 1
%127 = icmp eq i64 %126, %115
br i1 %127, label %128, label %119
128: ; preds = %125, %101, %110
%129 = load i32, i32* @stderr
%130 = call i32 @fprintf(i32 %129, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%131 = load i32, i32* @EXIT_FAILURE
%132 = call i32 @exit(i32 %131)
unreachable
133: ; preds = %119
%134 = load i32, i32* @None
%135 = and i64 %120, 4294967295
%136 = getelementptr inbounds i32, i32* %81, i64 %135
%137 = load i32, i32* %136
%138 = load i32, i32* %5
%139 = add nsw i32 %138, %67
%140 = load i32, i32* %6
%141 = add nsw i32 %140, %67
%142 = call i32 @XWarpPointer(i32* %70, i32 %134, i32 %137, i32 0, i32 0, i32 0, i32 0, i32 %139, i32 %141)
%143 = call i32 @XFlush(i32* %70)
br i1 %111, label %144, label %146
144: ; preds = %133
%145 = call i32 @sleep(i32 %68)
br label %146
146: ; preds = %144, %133
%147 = load i32, i32* @None
%148 = load i32, i32* %136
%149 = load i32, i32* %5
%150 = load i32, i32* %6
%151 = call i32 @XWarpPointer(i32* %70, i32 %147, i32 %148, i32 0, i32 0, i32 0, i32 0, i32 %149, i32 %150)
%152 = call i32 @XFlush(i32* %70)
%153 = call i32 @sleep(i32 %65)
%154 = add i32 %118, %116
%155 = icmp sgt i32 %154, -1
br i1 %155, label %117, label %156
156: ; preds = %146, %101, %92
%157 = call i32 @free(i32* %81)
%158 = call i32 @XCloseDisplay(i32* %70)
%159 = load i32, i32* @EXIT_SUCCESS
%160 = call i32 @exit(i32 %159)
unreachable
}