#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 */
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*/ XCloseDisplay(int /*<<< orphan*/ *);
int /*<<< orphan*/ XFlush(int /*<<< orphan*/ *);
int /*<<< orphan*/ *XOpenDisplay(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*/ memset(TYPE_2__ *, int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ usleep(int);
void mouseClick(int button) {
  Display *display = XOpenDisplay(NULL);
  XEvent event;
  if (display == NULL) {
    printf("Errore nell'apertura del Display !!!\n");
    return;
  }
  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)
    printf("Errore nell\'invio dell\'evento !!!\n");
  XFlush(display);
  usleep(100000);
  event.type = ButtonRelease;
  event.xbutton.state = 0x100;
  if (XSendEvent(display, PointerWindow, True, 0xfff, &event) == 0)
    printf("Errore nell'invio dell'evento !!!\n");
  XFlush(display);
  XCloseDisplay(display);
}


x86 assembly (clang, -O0):
<mouseClick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <XOpenDisplay@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11d7 <mouseClick+0x37>
lea    0xe33(%rip),%rdi
call   1040 <printf@plt>
jmp    139a <mouseClick+0x1fa>
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1050 <memset@plt>
mov    0x2de2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    0x2de8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rdi
call   10a0 <DefaultScreen@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,%esi
call   1080 <RootWindow@plt>
mov    -0x58(%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     12ee <mouseClick+0x14e>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%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    1283 <mouseClick+0xe3>
mov    -0x10(%rbp),%rdi
mov    0x2cdf(%rip),%rax
mov    (%rax),%esi
mov    0x2ce6(%rip),%rax
mov    (%rax),%edx
mov    $0xfff,%ecx
lea    -0x50(%rbp),%r8
call   1030 <XSendEvent@plt>
cmp    $0x0,%rax
jne    1328 <mouseClick+0x188>
lea    0xd03(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1090 <XFlush@plt>
mov    $0x186a0,%edi
call   10c0 <usleep@plt>
mov    0x2c7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
movl   $0x100,-0x4c(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2c7f(%rip),%rax
mov    (%rax),%esi
mov    0x2c86(%rip),%rax
mov    (%rax),%edx
mov    $0xfff,%ecx
lea    -0x50(%rbp),%r8
call   1030 <XSendEvent@plt>
cmp    $0x0,%rax
jne    1388 <mouseClick+0x1e8>
lea    0xca3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1090 <XFlush@plt>
mov    -0x10(%rbp),%rdi
call   10b0 <XCloseDisplay@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    %edi,%ebp
xor    %edi,%edi
call   1060 <XOpenDisplay@plt>
test   %rax,%rax
je     133b <mouseClick+0x19b>
mov    %rax,%rbx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1050 <memset@plt>
mov    0x2df5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x40(%rsp)
mov    %ebp,0x8(%rsp)
mov    0x2dfc(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x38(%rsp)
mov    %rbx,%rdi
call   10a0 <DefaultScreen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1080 <RootWindow@plt>
lea    0x28(%rsp),%rdx
lea    0x30(%rsp),%rcx
lea    0x1c(%rsp),%r8
lea    0x18(%rsp),%r9
lea    0x14(%rsp),%r10
lea    0x10(%rsp),%r11
lea    0xc(%rsp),%rbp
sub    $0x8,%rsp
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %r9,%r14
mov    %rbp,%r13
push   %rbp
mov    %r11,%r12
push   %r11
mov    %r10,%r15
push   %r10
call   1070 <XQueryPointer@plt>
add    $0x20,%rsp
mov    0x30(%rsp),%rsi
mov    %rsi,0x20(%rsp)
test   %rsi,%rsi
je     1295 <mouseClick+0xf5>
lea    0x20(%rsp),%rbp
nop
mov    %rsi,0x30(%rsp)
sub    $0x8,%rsp
mov    %rbx,%rdi
lea    0x30(%rsp),%rdx
mov    %rbp,%rcx
lea    0x24(%rsp),%r8
mov    %r14,%r9
push   %r13
push   %r12
push   %r15
call   1070 <XQueryPointer@plt>
add    $0x20,%rsp
mov    0x20(%rsp),%rsi
test   %rsi,%rsi
jne    1260 <mouseClick+0xc0>
mov    0x2d3c(%rip),%r14
mov    (%r14),%esi
mov    0x2d42(%rip),%rbp
mov    0x0(%rbp),%edx
lea    0x8(%rsp),%r8
mov    %rbx,%rdi
mov    $0xfff,%ecx
call   1030 <XSendEvent@plt>
test   %rax,%rax
jne    12cc <mouseClick+0x12c>
lea    0xd39(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1090 <XFlush@plt>
mov    $0x186a0,%edi
call   10c0 <usleep@plt>
mov    0x2cdb(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x40(%rsp)
movl   $0x100,0xc(%rsp)
mov    (%r14),%esi
mov    0x0(%rbp),%edx
lea    0x8(%rsp),%r8
mov    %rbx,%rdi
mov    $0xfff,%ecx
call   1030 <XSendEvent@plt>
test   %rax,%rax
jne    131c <mouseClick+0x17c>
lea    0xce9(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1090 <XFlush@plt>
mov    %rbx,%rdi
call   10b0 <XCloseDisplay@plt>
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xce0(%rip),%rdi
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

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