#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 whitetoass(Display *d, Window w, unsigned int s, unsigned int *x,
                unsigned int *y, unsigned int *mv) {
  XSetForeground(d, DefaultGC(d, s), 0xFFFFFF);
  XDrawRectangle(d, w, DefaultGC(d, s), x[*mv], y[*mv], (8 - 1), (8 - 1));
}


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

x86 assembly (clang, -O2):
<whitetoass>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r13
mov    %r8,%r14
mov    %rcx,%r15
mov    %edx,%ebp
mov    %esi,%r12d
mov    %rdi,%rbx
mov    %edx,%esi
call   1040 <DefaultGC@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0xffffff,%edx
call   1050 <XSetForeground@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <DefaultGC@plt>
mov    0x0(%r13),%edx
mov    (%r15,%rdx,4),%ecx
mov    (%r14,%rdx,4),%r8d
movl   $0x7,(%rsp)
mov    %rbx,%rdi
mov    %r12d,%esi
mov    %eax,%edx
mov    $0x7,%r9d
call   1030 <XDrawRectangle@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @whitetoass(i32* %0, i32 %1, i32 %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i32* %0, i32** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%13 = load i32*, i32** %7
%14 = load i32*, i32** %7
%15 = load i32, i32* %9
%16 = call i32 @DefaultGC(i32* %14, i32 %15)
%17 = call i32 @XSetForeground(i32* %13, i32 %16, i32 16777215)
%18 = load i32*, i32** %7
%19 = load i32, i32* %8
%20 = load i32*, i32** %7
%21 = load i32, i32* %9
%22 = call i32 @DefaultGC(i32* %20, i32 %21)
%23 = load i32*, i32** %10
%24 = load i32*, i32** %12
%25 = load i32, i32* %24
%26 = zext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %23, i64 %26
%28 = load i32, i32* %27
%29 = load i32*, i32** %11
%30 = load i32*, i32** %12
%31 = load i32, i32* %30
%32 = zext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %29, i64 %32
%34 = load i32, i32* %33
%35 = call i32 @XDrawRectangle(i32* %18, i32 %19, i32 %22, i32 %28, i32 %34, i32 7, i32 7)
ret void
}

LLVM IR (-O2):
define void @whitetoass(i32* %0, i32 %1, i32 %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5) {
%7 = tail call i32 @DefaultGC(i32* %0, i32 %2)
%8 = tail call i32 @XSetForeground(i32* %0, i32 %7, i32 16777215)
%9 = tail call i32 @DefaultGC(i32* %0, i32 %2)
%10 = load i32, i32* %5
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %3, i64 %11
%13 = load i32, i32* %12
%14 = getelementptr inbounds i32, i32* %4, i64 %11
%15 = load i32, i32* %14
%16 = tail call i32 @XDrawRectangle(i32* %0, i32 %1, i32 %9, i32 %13, i32 %15, i32 7, i32 7)
ret void
}