#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*/ DefaultGC(int /*<<< orphan*/ *, unsigned int);
int /*<<< orphan*/ XDrawRectangle(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int /*<<< orphan*/, unsigned int,
                                  unsigned int, int, int);
int /*<<< orphan*/ XSetForeground(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int);
void draweatpoint(Display *d, Window w, unsigned int s, unsigned int *xrand,
                  unsigned int *yrand) {
  XSetForeground(d, DefaultGC(d, s), 0x00FF00);
  XDrawRectangle(d, w, DefaultGC(d, s), *xrand, *yrand, (8 - 1), (8 - 1));
}


x86 assembly (clang, -O0):
<draweatpoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <DefaultGC@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
mov    $0xff00,%edx
call   1050 <XSetForeground@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1040 <DefaultGC@plt>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
mov    (%rax),%r8d
mov    $0x7,%r9d
movl   $0x7,(%rsp)
call   1030 <XDrawRectangle@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draweatpoint>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8,%r14
mov    %rcx,%r12
mov    %edx,%ebp
mov    %esi,%r15d
mov    %rdi,%rbx
mov    %edx,%esi
call   1040 <DefaultGC@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0xff00,%edx
call   1050 <XSetForeground@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <DefaultGC@plt>
mov    (%r12),%ecx
mov    (%r14),%r8d
movl   $0x7,(%rsp)
mov    %rbx,%rdi
mov    %r15d,%esi
mov    %eax,%edx
mov    $0x7,%r9d
call   1030 <XDrawRectangle@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @draweatpoint(i32* %0, i32 %1, i32 %2, i32* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32*
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %6
%13 = load i32, i32* %8
%14 = call i32 @DefaultGC(i32* %12, i32 %13)
%15 = call i32 @XSetForeground(i32* %11, i32 %14, i32 65280)
%16 = load i32*, i32** %6
%17 = load i32, i32* %7
%18 = load i32*, i32** %6
%19 = load i32, i32* %8
%20 = call i32 @DefaultGC(i32* %18, i32 %19)
%21 = load i32*, i32** %9
%22 = load i32, i32* %21
%23 = load i32*, i32** %10
%24 = load i32, i32* %23
%25 = call i32 @XDrawRectangle(i32* %16, i32 %17, i32 %20, i32 %22, i32 %24, i32 7, i32 7)
ret void
}

LLVM IR (-O2):
define void @draweatpoint(i32* %0, i32 %1, i32 %2, i32* nocapture %3, i32* nocapture %4) {
%6 = tail call i32 @DefaultGC(i32* %0, i32 %2)
%7 = tail call i32 @XSetForeground(i32* %0, i32 %6, i32 65280)
%8 = tail call i32 @DefaultGC(i32* %0, i32 %2)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = tail call i32 @XDrawRectangle(i32* %0, i32 %1, i32 %8, i32 %9, i32 %10, i32 7, i32 7)
ret void
}