#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 CurrentTime;
int /*<<< orphan*/ False;
int /*<<< orphan*/ True;
int /*<<< orphan*/ XTestFakeButtonEvent(int /*<<< orphan*/ *, int,
                                        int /*<<< orphan*/, int);
int /*<<< orphan*/ XTestFakeMotionEvent(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/, int, int, int);
void click_the_mouse(Display *dpy, int x, int y) {
  XTestFakeMotionEvent(dpy, 0, x, y, CurrentTime);
  XTestFakeButtonEvent(dpy, 1, True, CurrentTime);
  XTestFakeButtonEvent(dpy, 1, False, 20);
}


x86 assembly (clang, -O0):
<click_the_mouse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    0x2ea5(%rip),%rax
mov    (%rax),%r8d
xor    %esi,%esi
call   1040 <XTestFakeMotionEvent@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e80(%rip),%rax
mov    (%rax),%edx
mov    0x2e87(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1030 <XTestFakeButtonEvent@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e68(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%esi
mov    $0x14,%ecx
call   1030 <XTestFakeButtonEvent@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<click_the_mouse>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rbx
mov    0x2eb6(%rip),%r14
mov    (%r14),%r8d
xor    %esi,%esi
call   1040 <XTestFakeMotionEvent@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edx
mov    (%r14),%ecx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <XTestFakeButtonEvent@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x14,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <XTestFakeButtonEvent@plt>

LLVM IR (-O0):
@CurrentTime = global i32 0
@True = global i32 0
@False = global i32 0
define void @click_the_mouse(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = load i32, i32* @CurrentTime
%11 = call i32 @XTestFakeMotionEvent(i32* %7, i32 0, i32 %8, i32 %9, i32 %10)
%12 = load i32*, i32** %4
%13 = load i32, i32* @True
%14 = load i32, i32* @CurrentTime
%15 = call i32 @XTestFakeButtonEvent(i32* %12, i32 1, i32 %13, i32 %14)
%16 = load i32*, i32** %4
%17 = load i32, i32* @False
%18 = call i32 @XTestFakeButtonEvent(i32* %16, i32 1, i32 %17, i32 20)
ret void
}

LLVM IR (-O2):
@CurrentTime = global i32 0
@True = global i32 0
@False = global i32 0
define void @click_the_mouse(i32* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @CurrentTime
%5 = tail call i32 @XTestFakeMotionEvent(i32* %0, i32 0, i32 %1, i32 %2, i32 %4)
%6 = load i32, i32* @True
%7 = load i32, i32* @CurrentTime
%8 = tail call i32 @XTestFakeButtonEvent(i32* %0, i32 1, i32 %6, i32 %7)
%9 = load i32, i32* @False
%10 = tail call i32 @XTestFakeButtonEvent(i32* %0, i32 1, i32 %9, i32 20)
ret void
}