#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_6__ TYPE_2__;
typedef struct TYPE_5__ TYPE_1__;

/* Type definitions */
struct timespec {
  int member_1;
  int /*<<< orphan*/ member_0;
};
typedef int /*<<< orphan*/ event;
struct TYPE_5__ {
  int button;
  int state;
  int /*<<< orphan*/ y;
  int /*<<< orphan*/ x;
  int /*<<< orphan*/ y_root;
  int /*<<< orphan*/ x_root;
  scalar_t__ subwindow;
  int /*<<< orphan*/ root;
  scalar_t__ window;
  int /*<<< orphan*/ same_screen;
};
struct TYPE_6__ {
  TYPE_1__ xbutton;
  int /*<<< orphan*/ type;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ ButtonPress;
int /*<<< orphan*/ ButtonRelease;
int /*<<< orphan*/ DefaultScreen(int /*<<< orphan*/ *);
int /*<<< orphan*/ PointerWindow;
scalar_t__ RootWindow(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ True;
int /*<<< orphan*/ XFlush(int /*<<< orphan*/ *);
int /*<<< orphan*/ XQueryPointer(int /*<<< orphan*/ *, scalar_t__,
                                 int /*<<< orphan*/ *, scalar_t__ *,
                                 int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                 int *);
scalar_t__ XSendEvent(int /*<<< orphan*/ *, int /*<<< orphan*/,
                      int /*<<< orphan*/, int, TYPE_2__ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ memset(TYPE_2__ *, int, int);
scalar_t__ nanosleep(struct timespec *, struct timespec *);
int /*<<< orphan*/ stderr;
void mouseClick(Display *display, int button) {
  XEvent event;
  memset(&event, 0x00, sizeof(event));
  event.type = ButtonPress;
  event.xbutton.button = button;
  event.xbutton.same_screen = True;
  XQueryPointer(display, RootWindow(display, DefaultScreen(display)),
                &event.xbutton.root, &event.xbutton.window,
                &event.xbutton.x_root, &event.xbutton.y_root, &event.xbutton.x,
                &event.xbutton.y, &event.xbutton.state);
  event.xbutton.subwindow = event.xbutton.window;
  while (event.xbutton.subwindow) {
    event.xbutton.window = event.xbutton.subwindow;
    XQueryPointer(display, event.xbutton.window, &event.xbutton.root,
                  &event.xbutton.subwindow, &event.xbutton.x_root,
                  &event.xbutton.y_root, &event.xbutton.x, &event.xbutton.y,
                  &event.xbutton.state);
  }
  if (XSendEvent(display, PointerWindow, True, 0xfff, &event) == 0) {
    fprintf(stderr, "Error: Failed button down event\n");
  }
  XFlush(display);
  struct timespec wait = {0, 100000000};
  while (nanosleep(&wait, &wait))
    ;
  event.type = ButtonRelease;
  event.xbutton.state = 0x100;
  if (XSendEvent(display, PointerWindow, True, 0xfff, &event) == 0) {
    fprintf(stderr, "Error: Failed button up event\n");
  }
  XFlush(display);
}


x86 assembly (clang, -O0):
<mouseClick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1050 <memset@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    0x2e2d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rdi
call   10a0 <DefaultScreen@plt>
mov    -0x68(%rbp),%rdi
mov    %eax,%esi
call   1080 <RootWindow@plt>
mov    -0x60(%rbp),%rdi
mov    %rax,%rsi
lea    -0x50(%rbp),%rdx
add    $0x20,%rdx
lea    -0x50(%rbp),%rcx
add    $0x28,%rcx
lea    -0x50(%rbp),%r8
add    $0x14,%r8
lea    -0x50(%rbp),%r9
add    $0x10,%r9
lea    -0x50(%rbp),%r11
add    $0xc,%r11
lea    -0x50(%rbp),%r10
add    $0x8,%r10
lea    -0x50(%rbp),%rax
add    $0x4,%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1070 <XQueryPointer@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     12a9 <mouseClick+0x129>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
lea    -0x50(%rbp),%rdx
add    $0x20,%rdx
lea    -0x50(%rbp),%rcx
add    $0x18,%rcx
lea    -0x50(%rbp),%r8
add    $0x14,%r8
lea    -0x50(%rbp),%r9
add    $0x10,%r9
lea    -0x50(%rbp),%r11
add    $0xc,%r11
lea    -0x50(%rbp),%r10
add    $0x8,%r10
lea    -0x50(%rbp),%rax
add    $0x4,%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1070 <XQueryPointer@plt>
jmp    123e <mouseClick+0xbe>
mov    -0x8(%rbp),%rdi
mov    0x2d1c(%rip),%rax
mov    (%rax),%esi
mov    0x2d2b(%rip),%rax
mov    (%rax),%edx
mov    $0xfff,%ecx
lea    -0x50(%rbp),%r8
call   1030 <XSendEvent@plt>
cmp    $0x0,%rax
jne    12ec <mouseClick+0x16c>
mov    0x2cfa(%rip),%rax
mov    (%rax),%edi
lea    0xd19(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1090 <XFlush@plt>
mov    0xd44(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    -0x58(%rbp),%rsi
mov    %rsi,%rdi
call   1040 <nanosleep@plt>
cmp    $0x0,%rax
je     131b <mouseClick+0x19b>
jmp    1300 <mouseClick+0x180>
mov    0x2c96(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
movl   $0x100,-0x4c(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2c97(%rip),%rax
mov    (%rax),%esi
mov    0x2ca6(%rip),%rax
mov    (%rax),%edx
mov    $0xfff,%ecx
lea    -0x50(%rbp),%r8
call   1030 <XSendEvent@plt>
cmp    $0x0,%rax
jne    1371 <mouseClick+0x1f1>
mov    0x2c75(%rip),%rax
mov    (%rax),%edi
lea    0xcb5(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1090 <XFlush@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mouseClick>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %esi,%ebx
mov    %rdi,%r12
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1050 <memset@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x38(%rsp)
mov    %ebx,(%rsp)
mov    0x2e2f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x30(%rsp)
mov    %r12,%rdi
call   10a0 <DefaultScreen@plt>
mov    %r12,%rdi
mov    %eax,%esi
call   1080 <RootWindow@plt>
lea    0x20(%rsp),%rdx
lea    0x28(%rsp),%rcx
lea    0x14(%rsp),%r8
lea    0x10(%rsp),%r9
lea    0xc(%rsp),%r10
lea    0x8(%rsp),%r11
lea    0x4(%rsp),%rbx
sub    $0x8,%rsp
mov    %r12,%rdi
mov    %rax,%rsi
mov    %r9,%r14
mov    %rbx,%rbp
push   %rbx
mov    %r11,%r13
push   %r11
mov    %r10,%r15
push   %r10
call   1070 <XQueryPointer@plt>
add    $0x20,%rsp
mov    0x28(%rsp),%rsi
mov    %rsi,0x18(%rsp)
test   %rsi,%rsi
je     1264 <mouseClick+0xe4>
lea    0x18(%rsp),%rbx
nopl   0x0(%rax)
mov    %rsi,0x28(%rsp)
sub    $0x8,%rsp
mov    %r12,%rdi
lea    0x28(%rsp),%rdx
mov    %rbx,%rcx
lea    0x1c(%rsp),%r8
mov    %r14,%r9
push   %rbp
push   %r13
push   %r15
call   1070 <XQueryPointer@plt>
add    $0x20,%rsp
mov    0x18(%rsp),%rsi
test   %rsi,%rsi
jne    1230 <mouseClick+0xb0>
mov    0x2d65(%rip),%r14
mov    (%r14),%esi
mov    0x2d73(%rip),%rbp
mov    0x0(%rbp),%edx
mov    %rsp,%r8
mov    %r12,%rdi
mov    $0xfff,%ecx
call   1030 <XSendEvent@plt>
test   %rax,%rax
jne    12a2 <mouseClick+0x122>
mov    0x2d44(%rip),%rax
mov    (%rax),%edi
lea    0xd63(%rip),%rsi
call   1060 <fprintf@plt>
mov    %r12,%rdi
call   1090 <XFlush@plt>
movabs $0x5f5e10000000000,%rax
e1 f5 05
mov    %rax,0x40(%rsp)
lea    0x40(%rsp),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1040 <nanosleep@plt>
test   %rax,%rax
jne    12c0 <mouseClick+0x140>
mov    0x2ce1(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x38(%rsp)
movl   $0x100,0x4(%rsp)
mov    (%r14),%esi
mov    0x0(%rbp),%edx
mov    %rsp,%r8
mov    %r12,%rdi
mov    $0xfff,%ecx
call   1030 <XSendEvent@plt>
test   %rax,%rax
jne    1315 <mouseClick+0x195>
mov    0x2cd1(%rip),%rax
mov    (%rax),%edi
lea    0xd11(%rip),%rsi
call   1060 <fprintf@plt>
mov    %r12,%rdi
call   1090 <XFlush@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
%struct.TYPE_6__ = type { %struct.TYPE_5__, i32 }
%struct.TYPE_5__ = type { i32, i32, i32, i32, i32, i32, i64, i32, i64, i32 }
@ButtonPress = global i32 0
@True = global i32 0
@PointerWindow = global i32 0
@stderr = global i32 0
@.str = [33 x i8] c"Error: Failed button down event\0A\00"
@__const.mouseClick.wait = %struct.timespec { i32 0, i32 100000000 }
@ButtonRelease = global i32 0
@.str.1 = [31 x i8] c"Error: Failed button up event\0A\00"
define void @mouseClick(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca %struct.TYPE_6__
%6 = alloca %struct.timespec
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = call i32 @memset(%struct.TYPE_6__* %5, i32 0, i32 64)
%8 = load i32, i32* @ButtonPress
%9 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 1
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%12 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %11, i32 0, i32 0
store i32 %10, i32* %12
%13 = load i32, i32* @True
%14 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%15 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %14, i32 0, i32 9
store i32 %13, i32* %15
%16 = load i32*, i32** %3
%17 = load i32*, i32** %3
%18 = load i32*, i32** %3
%19 = call i32 @DefaultScreen(i32* %18)
%20 = call i64 @RootWindow(i32* %17, i32 %19)
%21 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%22 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %21, i32 0, i32 7
%23 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%24 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %23, i32 0, i32 8
%25 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%26 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %25, i32 0, i32 5
%27 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%28 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %27, i32 0, i32 4
%29 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%30 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %29, i32 0, i32 3
%31 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%32 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %31, i32 0, i32 2
%33 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%34 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %33, i32 0, i32 1
%35 = call i32 @XQueryPointer(i32* %16, i64 %20, i32* %22, i64* %24, i32* %26, i32* %28, i32* %30, i32* %32, i32* %34)
%36 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%37 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %36, i32 0, i32 8
%38 = load i64, i64* %37
%39 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%40 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %39, i32 0, i32 6
store i64 %38, i64* %40
br label %41
41: ; preds = %46, %2
%42 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%43 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %42, i32 0, i32 6
%44 = load i64, i64* %43
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %71
46: ; preds = %41
%47 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%48 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %47, i32 0, i32 6
%49 = load i64, i64* %48
%50 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%51 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %50, i32 0, i32 8
store i64 %49, i64* %51
%52 = load i32*, i32** %3
%53 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%54 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %53, i32 0, i32 8
%55 = load i64, i64* %54
%56 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%57 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %56, i32 0, i32 7
%58 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%59 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %58, i32 0, i32 6
%60 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%61 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %60, i32 0, i32 5
%62 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%63 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %62, i32 0, i32 4
%64 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%65 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %64, i32 0, i32 3
%66 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%67 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %66, i32 0, i32 2
%68 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%69 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %68, i32 0, i32 1
%70 = call i32 @XQueryPointer(i32* %52, i64 %55, i32* %57, i64* %59, i32* %61, i32* %63, i32* %65, i32* %67, i32* %69)
br label %41
71: ; preds = %41
%72 = load i32*, i32** %3
%73 = load i32, i32* @PointerWindow
%74 = load i32, i32* @True
%75 = call i64 @XSendEvent(i32* %72, i32 %73, i32 %74, i32 4095, %struct.TYPE_6__* %5)
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %80
77: ; preds = %71
%78 = load i32, i32* @stderr
%79 = call i32 @fprintf(i32 %78, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %80
80: ; preds = %77, %71
%81 = load i32*, i32** %3
%82 = call i32 @XFlush(i32* %81)
%83 = bitcast %struct.timespec* %6 to i8*
br label %84
84: ; preds = %87, %80
%85 = call i64 @nanosleep(%struct.timespec* %6, %struct.timespec* %6)
%86 = icmp ne i64 %85, 0
br i1 %86, label %87, label %88
87: ; preds = %84
br label %84
88: ; preds = %84
%89 = load i32, i32* @ButtonRelease
%90 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 1
store i32 %89, i32* %90
%91 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %5, i32 0, i32 0
%92 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %91, i32 0, i32 1
store i32 256, i32* %92
%93 = load i32*, i32** %3
%94 = load i32, i32* @PointerWindow
%95 = load i32, i32* @True
%96 = call i64 @XSendEvent(i32* %93, i32 %94, i32 %95, i32 4095, %struct.TYPE_6__* %5)
%97 = icmp eq i64 %96, 0
br i1 %97, label %98, label %101
98: ; preds = %88
%99 = load i32, i32* @stderr
%100 = call i32 @fprintf(i32 %99, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %101
101: ; preds = %98, %88
%102 = load i32*, i32** %3
%103 = call i32 @XFlush(i32* %102)
ret void
}

LLVM IR (-O2):
%struct.TYPE_6__ = type { %struct.TYPE_5__, i32 }
%struct.TYPE_5__ = type { i32, i32, i32, i32, i32, i32, i64, i32, i64, i32 }
%struct.timespec = type { i32, i32 }
@ButtonPress = global i32 0
@True = global i32 0
@PointerWindow = global i32 0
@stderr = global i32 0
@.str = [33 x i8] c"Error: Failed button down event\0A\00"
@ButtonRelease = global i32 0
@.str.1 = [31 x i8] c"Error: Failed button up event\0A\00"
define void @mouseClick(i32* %0, i32 %1) {
%3 = alloca %struct.TYPE_6__
%4 = alloca i64
%5 = bitcast i64* %4 to %struct.timespec*
%6 = bitcast %struct.TYPE_6__* %3 to i8*
%7 = call i32 @memset(%struct.TYPE_6__* %3, i32 0, i32 64)
%8 = load i32, i32* @ButtonPress
%9 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 1
store i32 %8, i32* %9
%10 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 0
store i32 %1, i32* %10
%11 = load i32, i32* @True
%12 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 9
store i32 %11, i32* %12
%13 = call i32 @DefaultScreen(i32* %0)
%14 = call i64 @RootWindow(i32* %0, i32 %13)
%15 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 7
%16 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 8
%17 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 5
%18 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 4
%19 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 3
%20 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 2
%21 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 1
%22 = call i32 @XQueryPointer(i32* %0, i64 %14, i32* %15, i64* %16, i32* %17, i32* %18, i32* %19, i32* %20, i32* %21)
%23 = load i64, i64* %16
%24 = getelementptr inbounds %struct.TYPE_6__, %struct.TYPE_6__* %3, i64 0, i32 0, i32 6
store i64 %23, i64* %24
%25 = icmp eq i64 %23, 0
br i1 %25, label %31, label %26
26: ; preds = %2, %26
%27 = phi i64 [ %29, %26 ], [ %23, %2 ]
store i64 %27, i64* %16
%28 = call i32 @XQueryPointer(i32* %0, i64 %27, i32* %15, i64* %24, i32* %17, i32* %18, i32* %19, i32* %20, i32* %21)
%29 = load i64, i64* %24
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %26
31: ; preds = %26, %2
%32 = load i32, i32* @PointerWindow
%33 = load i32, i32* @True
%34 = call i64 @XSendEvent(i32* %0, i32 %32, i32 %33, i32 4095, %struct.TYPE_6__* %3)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %31
%37 = load i32, i32* @stderr
%38 = call i32 @fprintf(i32 %37, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %39
39: ; preds = %36, %31
%40 = call i32 @XFlush(i32* %0)
%41 = bitcast i64* %4 to i8*
store i64 429496729600000000, i64* %4
br label %42
42: ; preds = %42, %39
%43 = call i64 @nanosleep(%struct.timespec* %5, %struct.timespec* %5)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %42
45: ; preds = %42
%46 = load i32, i32* @ButtonRelease
store i32 %46, i32* %9
store i32 256, i32* %21
%47 = load i32, i32* @PointerWindow
%48 = load i32, i32* @True
%49 = call i64 @XSendEvent(i32* %0, i32 %47, i32 %48, i32 4095, %struct.TYPE_6__* %3)
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %45
%52 = load i32, i32* @stderr
%53 = call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
br label %54
54: ; preds = %51, %45
%55 = call i32 @XFlush(i32* %0)
ret void
}