LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/menu.c
// Function: menu_init
void
menu_init(struct screen_ctx *sc)
{
	XGCValues	 gv;

	sc->menuwin = XCreateSimpleWindow(X_Dpy, sc->rootwin, 0, 0, 1, 1,
	    Conf.bwidth,
	    sc->color[CWM_COLOR_FG_MENU].pixel,
	    sc->color[CWM_COLOR_BG_MENU].pixel);

	gv.foreground =
	    sc->color[CWM_COLOR_FG_MENU].pixel^sc->color[CWM_COLOR_BG_MENU].pixel;
	gv.background = sc->color[CWM_COLOR_BG_MENU].pixel;
	gv.function = GXxor;

	sc->gc = XCreateGC(X_Dpy, sc->menuwin,
	    GCForeground|GCBackground|GCFunction, &gv);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0xf62c(%rip), %r14      # 0x16848
movq (%r14), %rdi
leaq 0xd53a(%rip), %rax      # 0x14760
movl 0x54(%rax), %eax
movq 0x18(%rbx), %rsi
subq $0x8, %rsp
pushq $0x1
popq %r8
xorl %edx, %edx
xorl %ecx, %ecx
movl %r8d, %r9d
pushq 0x80(%rbx)
pushq 0x70(%rbx)
pushq %rax
callq 0x5270
addq $0x20, %rsp
movq %rax, 0x20(%rbx)
movq 0x80(%rbx), %rdx
movq 0x70(%rbx), %rsi
xorq %rdx, %rsi
leaq 0x8(%rsp), %rcx
movq %rsi, 0x10(%rcx)
movq %rdx, 0x18(%rcx)
movl $0x6, (%rcx)
movq (%r14), %rdi
pushq $0xd
popq %rdx
movq %rax, %rsi
callq 0x5540
movq %rax, 0x98(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/menu.c
// Function: menu_calc_entry
static int
menu_calc_entry(struct screen_ctx *sc, struct menu_ctx *mc, int x, int y)
{
	int	 entry;

	entry = y / font_height(sc);

	/* in bounds? */
	if (x <= 0 || x > mc->width || y <= 0 ||
	    y > font_height(sc) * mc->num || entry < 0 || entry >= mc->num)
		entry = -1;

	if (mc->hasprompt && entry == 0)
		entry = -1;

	return (entry);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r14d
movl %edx, %r12d
movq %rsi, %rbx
movq %rdi, %r15
callq 0xba35
movl %eax, %ecx
movl %r14d, %eax
xorl %edx, %edx
divl %ecx
testl %r12d, %r12d
jle 0x7f27
testl %r14d, %r14d
jle 0x7f27
cmpl %r12d, 0xec(%rbx)
jl 0x7f27
movl %eax, %ebp
movq %r15, %rdi
callq 0xba35
movl 0xf0(%rbx), %ecx
cmpl %ecx, %ebp
jge 0x7f27
imull %eax, %ecx
cmpl %r14d, %ecx
jae 0x7f2a
pushq $-0x1
popq %rbp
xorl %eax, %eax
cmpl 0xcc(%rbx), %eax
sbbl %eax, %eax
orl %ebp, %eax
testl %ebp, %ebp
cmovnel %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/search.c
// Function: strsubmatch
static int
strsubmatch(char *sub, char *str, int zeroidx)
{
	size_t	 len, sublen;
	u_int	 n, flen;

	if (sub == NULL || str == NULL)
		return (0);

	len = strlen(str);
	sublen = strlen(sub);

	if (sublen > len)
		return (0);

	if (!zeroidx)
		flen = len - sublen;
	else
		flen = 0;

	for (n = 0; n <= flen; n++)
		if (strncasecmp(sub, str + n, sublen) == 0)
			return (1);

	return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rsi, %rsi
sete %cl
xorl %ebp, %ebp
orb %al, %cl
jne 0x8152
movl %edx, %r13d
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x5320
movq %rax, %r15
movq %r14, %rdi
callq 0x5320
cmpq %rax, %r15
jb 0x8152
movq %rax, %r12
subl %r12d, %r15d
xorl %ebp, %ebp
testl %r13d, %r13d
cmovnel %ebp, %r15d
xorl %r13d, %r13d
cmpl %r15d, %r13d
ja 0x8152
movl %r13d, %esi
addq %rbx, %rsi
movq %r14, %rdi
movq %r12, %rdx
callq 0x55d0
incl %r13d
testl %eax, %eax
jne 0x8132
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/search.c
// Function: search_print_client
void
search_print_client(struct menu *mi, int list)
{
	struct client_ctx	*cc;
	char			 flag = ' ';

	cc = mi->ctx;

	if (cc == client_current())
		flag = '!';
	else if (cc->flags & CLIENT_HIDDEN)
		flag = '&';

	if (list)
		cc->matchname = cc->name;

	(void)snprintf(mi->print, sizeof(mi->print), "%c%s", flag,
	    cc->matchname);

	if (!list && cc->matchname != cc->name &&
	    strlen(mi->print) < sizeof(mi->print) - 1) {
		const char	*marker = "";
		char		 buf[MENU_MAXENTRY + 1];
		int		 diff;

		diff = sizeof(mi->print) - 1 - strlen(mi->print);

		/* One for the ':' */
		diff -= 1;

		if (strlen(cc->name) > diff) {
			marker = "..";
			diff -= 2;
		} else {
			diff = strlen(cc->name);
		}

		(void)strlcpy(buf, mi->print, sizeof(buf));
		(void)snprintf(mi->print, sizeof(mi->print),
		    "%s:%.*s%s", buf, diff, cc->name, marker);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq 0x88(%rdi), %r12
callq 0x6b6a
cmpq %rax, %r12
je 0x819b
testb $0x1, 0xa8(%r12)
pushq $0x20
popq %rax
pushq $0x26
popq %rcx
cmovel %eax, %ecx
jmp 0x819e
pushq $0x21
popq %rcx
testl %ebp, %ebp
je 0x81b4
movq 0xd8(%r12), %r8
movq %r8, 0xe8(%r12)
jmp 0x81bc
movq 0xe8(%r12), %r8
addq $0x53, %rbx
leaq 0x5f92(%rip), %rdx      # 0xe159
pushq $0x33
popq %rsi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x50b0
testl %ebp, %ebp
je 0x81e7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xd8(%r12), %r15
cmpq %r15, 0xe8(%r12)
je 0x81d8
movq %rbx, %rdi
callq 0x5320
cmpq $0x31, %rax
ja 0x81d8
movq %rax, %r14
movq %r15, %rdi
callq 0x5320
pushq $0x31
popq %rcx
subq %r14, %rcx
pushq $0x2f
popq %rbp
subl %r14d, %ebp
cmpq %rcx, %rax
leaq 0x5f36(%rip), %rcx      # 0xe15e
leaq 0x5f43(%rip), %r13      # 0xe172
cmovaq %rcx, %r13
cmovbel %eax, %ebp
leaq 0x10(%rsp), %r14
pushq $0x33
popq %r15
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0xcd50
movq 0xd8(%r12), %r9
movq %r13, (%rsp)
leaq 0x5f01(%rip), %rdx      # 0xe161
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x50b0
jmp 0x81d8
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/search.c
// Function: search_match_text
void
search_match_text(struct menu_q *menuq, struct menu_q *resultq, char *search)
{
	struct menu	*mi;

	TAILQ_INIT(resultq);

	TAILQ_FOREACH(mi, menuq, entry)
		if (strsubmatch(search, mi->text, 0))
			TAILQ_INSERT_TAIL(resultq, mi, resultentry);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
andq $0x0, (%rsi)
movq %rsi, %r12
movq %r12, 0x8(%r14)
movq (%r15), %r15
testq %r15, %r15
je 0x82c1
leaq 0x20(%r15), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x80e2
testl %eax, %eax
je 0x8294
andq $0x0, 0x10(%r15)
movq %r12, 0x18(%r15)
movq %r15, (%r12)
leaq 0x10(%r15), %r12
jmp 0x8290
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/search.c
// Function: search_match_exec
void
search_match_exec(struct menu_q *menuq, struct menu_q *resultq, char *search)
{
	struct menu	*mi, *mj;

	TAILQ_INIT(resultq);

	TAILQ_FOREACH(mi, menuq, entry) {
		if (strsubmatch(search, mi->text, 1) == 0 &&
		    fnmatch(search, mi->text, 0) == FNM_NOMATCH)
				continue;
		for (mj = TAILQ_FIRST(resultq); mj != NULL;
		     mj = TAILQ_NEXT(mj, resultentry)) {
			if (strcasecmp(mi->text, mj->text) < 0) {
				TAILQ_INSERT_BEFORE(mj, mi, resultentry);
				break;
			}
		}
		if (mj == NULL)
			TAILQ_INSERT_TAIL(resultq, mi, resultentry);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
andq $0x0, (%rsi)
movq %rdx, %r14
movq %rdi, %r15
movq %rsi, 0x8(%rsi)
pushq $0x1
popq %rbp
movq (%r15), %r15
testq %r15, %r15
je 0x8373
leaq 0x20(%r15), %r12
movq %r14, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x80e2
testl %eax, %eax
jne 0x831b
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x5300
cmpl $0x1, %eax
je 0x82ec
movq %rbx, %r13
movq (%r13), %r13
testq %r13, %r13
je 0x833d
leaq 0x20(%r13), %rsi
movq %r12, %rdi
callq 0x51a0
testl %eax, %eax
js 0x8357
addq $0x10, %r13
jmp 0x831e
leaq 0x10(%r15), %rax
andq $0x0, 0x10(%r15)
movq 0x8(%rbx), %rcx
movq %rcx, 0x18(%r15)
movq %r15, (%rcx)
movq %rax, 0x8(%rbx)
jmp 0x82ec
movq 0x18(%r13), %rax
leaq 0x10(%r15), %rcx
movq %rax, 0x18(%r15)
movq %r13, 0x10(%r15)
movq %r15, (%rax)
movq %rcx, 0x18(%r13)
jmp 0x82ec
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/util.c
// Function: u_spawn
void
u_spawn(char *argstr)
{
	switch (fork()) {
	case 0:
		u_exec(argstr);
		err(1, "%s", argstr);
		break;
	case -1:
		warn("fork");
	default:
		break;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x57a0
cmpl $-0x1, %eax
je 0x8398
testl %eax, %eax
je 0x83a7
popq %rbx
retq
leaq 0x5dcc(%rip), %rdi      # 0xe16b
xorl %eax, %eax
popq %rbx
jmp 0x5870
movq %rbx, %rdi
callq 0x83c3
leaq 0x6569(%rip), %rsi      # 0xe91f
pushq $0x1
popq %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x54b0
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/util.c
// Function: u_exec
void
u_exec(char *argstr)
{
	char	*args[MAXARGLEN], **ap = args;
	char	**end = &args[MAXARGLEN - 1], *tmp;

	while (ap < end && (*ap = strsep(&argstr, " \t")) != NULL) {
		if (**ap == '\0')
			continue;
		ap++;
		if (argstr != NULL) {
			/* deal with quoted strings */
			switch(argstr[0]) {
			case '"':
			case '\'':
				if ((tmp = strchr(argstr + 1, argstr[0]))
				    != NULL) {
					*(tmp++) = '\0';
					*(ap++) = ++argstr;
					argstr = tmp;
				}
				break;
			default:
				break;
			}
		}
	}

	*ap = NULL;
	(void)setsid();
	(void)execvp(args[0], args);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xb8, %rsp
leaq 0x8(%rsp), %rbx
movq %rdi, (%rbx)
xorl %r12d, %r12d
leaq 0x5d8d(%rip), %r14      # 0xe170
movq %r12, %r15
cmpq $0x97, %r12
jg 0x8455
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5780
movq %rax, 0x10(%rsp,%r15)
testq %rax, %rax
je 0x8455
cmpb $0x0, (%rax)
je 0x83ef
leaq 0x8(%r15), %r12
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x83e3
movzbl (%rdi), %esi
cmpl $0x27, %esi
je 0x8424
cmpl $0x22, %esi
jne 0x83e3
incq %rdi
callq 0x5520
testq %rax, %rax
je 0x83e3
movq %rax, %rcx
incq %rcx
movb $0x0, (%rax)
movq 0x8(%rsp), %rax
incq %rax
movq %rax, 0x18(%rsp,%r15)
addq $0x10, %r15
movq %rcx, 0x8(%rsp)
movq %r15, %r12
jmp 0x83e3
andq $0x0, 0x10(%rsp,%r15)
callq 0x50c0
leaq 0x10(%rsp), %rsi
movq (%rsi), %rdi
callq 0x5170
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_key_grab
void
xu_key_grab(Window win, int mask, int keysym)
{
	KeyCode	 code;
	int	 i;

	code = XKeysymToKeycode(X_Dpy, keysym);
	if ((XkbKeycodeToKeysym(X_Dpy, code, 0, 0) != keysym) &&
	    (XkbKeycodeToKeysym(X_Dpy, code, 0, 1) == keysym))
		mask |= ShiftMask;

	for (i = 0; i < nitems(ign_mods); i++)
		XGrabKey(X_Dpy, code, (mask | ign_mods[i]), win,
		    True, GrabModeAsync, GrabModeAsync);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xe208(%rip), %r13      # 0x16848
movq (%r13), %rdi
movslq %edx, %r15
movq %r15, %rsi
callq 0x56e0
movq (%r13), %rdi
movzbl %al, %ebp
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5260
cmpq %r15, %rax
jne 0x866b
movq %r13, %r12
jmp 0x8688
movq %r13, %r12
movq (%r13), %rdi
pushq $0x1
popq %rcx
movl %ebp, %esi
xorl %edx, %edx
callq 0x5260
xorl %ecx, %ecx
cmpq %r15, %rax
sete %cl
orl %ecx, %ebx
xorl %r13d, %r13d
pushq $0x1
popq %r15
cmpq $0x10, %r13
je 0x86c4
movq (%r12), %rdi
leaq 0x5af0(%rip), %rax      # 0xe190
movl (%r13,%rax), %edx
orl %ebx, %edx
movl $0x1, (%rsp)
movl %ebp, %esi
movq %r14, %rcx
movl %r15d, %r8d
movl %r15d, %r9d
callq 0x5760
addq $0x4, %r13
jmp 0x868f
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_key_ungrab
void
xu_key_ungrab(Window win, int mask, int keysym)
{
	KeyCode	 code;
	int	 i;

	code = XKeysymToKeycode(X_Dpy, keysym);
	if ((XkbKeycodeToKeysym(X_Dpy, code, 0, 0) != keysym) &&
	    (XkbKeycodeToKeysym(X_Dpy, code, 0, 1) == keysym))
		mask |= ShiftMask;

	for (i = 0; i < nitems(ign_mods); i++)
		XUngrabKey(X_Dpy, code, (mask | ign_mods[i]), win);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xe15e(%rip), %r12      # 0x16848
movq (%r12), %rdi
movslq %edx, %r15
movq %r15, %rsi
callq 0x56e0
movq (%r12), %rdi
movzbl %al, %ebp
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5260
cmpq %r15, %rax
je 0x872a
movq (%r12), %rdi
pushq $0x1
popq %rcx
movl %ebp, %esi
xorl %edx, %edx
callq 0x5260
xorl %ecx, %ecx
cmpq %r15, %rax
sete %cl
orl %ecx, %ebx
xorl %r15d, %r15d
leaq 0x5a5c(%rip), %r13      # 0xe190
cmpq $0x10, %r15
je 0x8754
movq (%r12), %rdi
movl (%r15,%r13), %edx
orl %ebx, %edx
movl %ebp, %esi
movq %r14, %rcx
callq 0x5250
addq $0x4, %r15
jmp 0x8734
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_configure
void
xu_configure(struct client_ctx *cc)
{
	XConfigureEvent	 ce;

	ce.type = ConfigureNotify;
	ce.event = cc->win;
	ce.window = cc->win;
	ce.x = cc->geom.x;
	ce.y = cc->geom.y;
	ce.width = cc->geom.w;
	ce.height = cc->geom.h;
	ce.border_width = cc->bwidth;
	ce.above = None;
	ce.override_redirect = 0;

	XSendEvent(X_Dpy, cc->win, False, StructureNotifyMask, (XEvent *)&ce);
}

// Assembly:
subq $0x58, %rsp
movq %rsp, %r8
movl $0x16, (%r8)
movq 0x38(%rdi), %rsi
movq %rsi, 0x20(%r8)
movq %rsi, 0x28(%r8)
movups 0x54(%rdi), %xmm0
movups %xmm0, 0x30(%r8)
movl 0x50(%rdi), %eax
movl %eax, 0x40(%r8)
andq $0x0, 0x48(%r8)
andl $0x0, 0x50(%r8)
leaq 0xe0aa(%rip), %rax      # 0x16848
movq (%rax), %rdi
movl $0x20000, %ecx          # imm = 0x20000
xorl %edx, %edx
callq 0x55e0
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_sendmsg
void
xu_sendmsg(Window win, Atom atm, long val)
{
	XEvent	 e;

	(void)memset(&e, 0, sizeof(e));
	e.xclient.type = ClientMessage;
	e.xclient.window = win;
	e.xclient.message_type = atm;
	e.xclient.format = 32;
	e.xclient.data.l[0] = val;
	e.xclient.data.l[1] = CurrentTime;

	XSendEvent(X_Dpy, win, False, 0, &e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movl $0xc0, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x5090
movl $0x21, (%r12)
movq %r15, 0x20(%r12)
movq %r14, 0x28(%r12)
movl $0x20, 0x30(%r12)
movq %rbx, 0x38(%r12)
leaq 0xe044(%rip), %rax      # 0x16848
movq (%rax), %rdi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r12, %r8
callq 0x55e0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_getprop
int
xu_getprop(Window win, Atom atm, Atom type, long len, u_char **p)
{
	Atom	 realtype;
	u_long	 n, extra;
	int	 format;

	if (XGetWindowProperty(X_Dpy, win, atm, 0L, len, False, type,
	    &realtype, &format, &n, &extra, p) != Success || *p == NULL)
		return (-1);

	if (n == 0)
		XFree(*p);

	return (n);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %r8, %rbx
movq %rcx, %r8
movq %rdx, %rax
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0xe004(%rip), %rcx      # 0x16848
movq (%rcx), %rdi
leaq 0x10(%rsp), %r10
movq %rsp, %r11
leaq 0xc(%rsp), %r14
leaq 0x18(%rsp), %r15
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %rbx
pushq %r10
pushq %r11
pushq %r14
pushq %r15
pushq %rax
callq 0x51e0
addq $0x30, %rsp
movl %eax, %ecx
pushq $-0x1
popq %rax
testl %ecx, %ecx
je 0x8884
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x887a
movq (%rsp), %rax
testq %rax, %rax
jne 0x887a
callq 0x5060
movq (%rsp), %rax
jmp 0x887a
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_getstrprop
int
xu_getstrprop(Window win, Atom atm, char **text) {
	XTextProperty	 prop;
	char		**list;
	int		 nitems = 0;

	*text = NULL;

	XGetTextProperty(X_Dpy, win, &prop, atm);
	if (!prop.nitems)
		return (0);

	if (Xutf8TextPropertyToTextList(X_Dpy, &prop, &list,
	    &nitems) == Success && nitems > 0 && *list) {
		if (nitems > 1) {
			XTextProperty    prop2;
			if (Xutf8TextListToTextProperty(X_Dpy, list, nitems,
			    XUTF8StringStyle, &prop2) == Success) {
				*text = xstrdup((const char *)prop2.value);
				XFree(prop2.value);
			}
		} else {
			*text = xstrdup(*list);
		}
		XFreeStringList(list);
	}

	XFree(prop.value);

	return (nitems);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
andl $0x0, 0x4(%rsp)
movq %rdx, %rbx
andq $0x0, (%rdx)
movq %rsi, %rcx
movq %rdi, %rsi
leaq 0xdf86(%rip), %r15      # 0x16848
movq (%r15), %rdi
leaq 0x30(%rsp), %r14
movq %r14, %rdx
callq 0x5340
cmpq $0x0, 0x18(%r14)
je 0x8946
movq (%r15), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdx
leaq 0x4(%rsp), %r14
movq %r14, %rcx
callq 0x5380
testl %eax, %eax
sete %al
movl (%r14), %edx
testl %edx, %edx
setg %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x895c
movq 0x8(%rsp), %rsi
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x895c
cmpl $0x2, %edx
jb 0x894a
movq (%r15), %rdi
pushq $0x4
popq %rcx
leaq 0x10(%rsp), %r8
callq 0x5480
testl %eax, %eax
jne 0x8952
movq 0x10(%rsp), %rdi
callq 0x6055
movq %rax, (%rbx)
movq 0x10(%rsp), %rdi
callq 0x5060
jmp 0x8952
xorl %eax, %eax
jmp 0x896a
callq 0x6055
movq %rax, (%rbx)
movq 0x8(%rsp), %rdi
callq 0x5630
movq 0x30(%rsp), %rdi
callq 0x5060
movl 0x4(%rsp), %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_getstate
int
xu_getstate(struct client_ctx *cc, int *state)
{
	long	*p = NULL;

	if (xu_getprop(cc->win, cwmh[WM_STATE].atom, cwmh[WM_STATE].atom, 2L,
	    (u_char **)&p) <= 0)
		return (-1);

	*state = (int)*p;
	XFree((char *)p);

	return (0);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %r8
andq $0x0, (%r8)
movq %rsi, %rbx
movq 0x38(%rdi), %rdi
movq 0xbb08(%rip), %rdx      # 0x14498
pushq $0x2
popq %rcx
movq %rdx, %rsi
callq 0x8825
testl %eax, %eax
jle 0x89b1
movq 0x8(%rsp), %rdi
movl (%rdi), %eax
movl %eax, (%rbx)
callq 0x5060
xorl %eax, %eax
jmp 0x89b4
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_setstate
void
xu_setstate(struct client_ctx *cc, int state)
{
	long	 dat[2];

	dat[0] = state;
	dat[1] = None;

	cc->state = state;
	XChangeProperty(X_Dpy, cc->win,
	    cwmh[WM_STATE].atom, cwmh[WM_STATE].atom, 32,
	    PropModeReplace, (unsigned char *)dat, 2);
}

// Assembly:
subq $0x18, %rsp
movslq %esi, %rax
movq %rsp, %r10
movq %rax, (%r10)
andq $0x0, 0x8(%r10)
movl %eax, 0xac(%rdi)
leaq 0xde6f(%rip), %rax      # 0x16848
movq (%rax), %rax
movq 0x38(%rdi), %rsi
movq 0xbab1(%rip), %rcx      # 0x14498
pushq $0x20
popq %r8
movq %rax, %rdi
movq %rcx, %rdx
xorl %r9d, %r9d
pushq $0x2
pushq %r10
callq 0x5740
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_getatoms
void
xu_getatoms(void)
{
	int	 i;

	for (i = 0; i < nitems(cwmh); i++)
		cwmh[i].atom = XInternAtom(X_Dpy, cwmh[i].name, False);
	for (i = 0; i < nitems(ewmh); i++)
		ewmh[i].atom = XInternAtom(X_Dpy, ewmh[i].name, False);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
pushq $0x8
popq %r14
leaq 0xde36(%rip), %rbx      # 0x16848
leaq 0xba77(%rip), %r15      # 0x14490
cmpq $0x68, %r14
je 0x8a38
movq (%rbx), %rdi
movq -0x8(%r14,%r15), %rsi
xorl %edx, %edx
callq 0x5690
movq %rax, (%r14,%r15)
addq $0x10, %r14
jmp 0x8a19
pushq $0x8
popq %r14
leaq 0xbaad(%rip), %r15      # 0x144f0
cmpq $0xe8, %r14
je 0x8a65
movq (%rbx), %rdi
movq -0x8(%r14,%r15), %rsi
xorl %edx, %edx
callq 0x5690
movq %rax, (%r14,%r15)
addq $0x10, %r14
jmp 0x8a43
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_ewmh_net_supported
void
xu_ewmh_net_supported(struct screen_ctx *sc)
{
	Atom	 atom[EWMH_NITEMS];
	int	 i;

	for (i = 0; i < nitems(ewmh); i++)
		atom[i] = ewmh[i].atom;

	XChangeProperty(X_Dpy, sc->rootwin, ewmh[_NET_SUPPORTED].atom,
	    XA_ATOM, 32, PropModeReplace, (unsigned char *)atom, EWMH_NITEMS);
}

// Assembly:
subq $0x78, %rsp
xorl %eax, %eax
leaq 0xba78(%rip), %rcx      # 0x144f0
cmpq $0x70, %rax
je 0x8a8d
movq 0x8(%rcx,%rax,2), %rdx
movq %rdx, (%rsp,%rax)
addq $0x8, %rax
jmp 0x8a78
leaq 0xddb4(%rip), %rax      # 0x16848
movq (%rax), %rax
movq 0x18(%rdi), %rsi
movq 0xba56(%rip), %rdx      # 0x144f8
movq %rsp, %r10
pushq $0x4
popq %rcx
pushq $0x20
popq %r8
movq %rax, %rdi
xorl %r9d, %r9d
pushq $0xe
pushq %r10
callq 0x5740
addq $0x88, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_ewmh_net_supported_wm_check
void
xu_ewmh_net_supported_wm_check(struct screen_ctx *sc)
{
	Window	 w;

	w = XCreateSimpleWindow(X_Dpy, sc->rootwin, -1, -1, 1, 1, 0, 0, 0);
	XChangeProperty(X_Dpy, sc->rootwin, ewmh[_NET_SUPPORTING_WM_CHECK].atom,
	    XA_WINDOW, 32, PropModeReplace, (unsigned char *)&w, 1);
	XChangeProperty(X_Dpy, w, ewmh[_NET_SUPPORTING_WM_CHECK].atom,
	    XA_WINDOW, 32, PropModeReplace, (unsigned char *)&w, 1);
	XChangeProperty(X_Dpy, w, ewmh[_NET_WM_NAME].atom,
	    XA_WM_NAME, 8, PropModeReplace, (unsigned char *)WMNAME, strlen(WMNAME));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0xdd6f(%rip), %r15      # 0x16848
movq (%r15), %rdi
movq 0x18(%r14), %rsi
subq $0x20, %rsp
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $-0x1
popq %rcx
pushq $0x1
popq %rbx
movl %ecx, %edx
movl %ebx, %r8d
movl %ebx, %r9d
callq 0x5270
addq $0x20, %rsp
leaq 0x8(%rsp), %r12
movq %rax, (%r12)
movq (%r15), %rdi
movq 0x18(%r14), %rsi
movq 0xb9ea(%rip), %rdx      # 0x14508
pushq $0x21
popq %r14
pushq $0x20
popq %rbp
movq %r14, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq %rbx
pushq %r12
callq 0x5740
popq %rcx
popq %rdx
movq (%r15), %rdi
movq (%r12), %rsi
movq 0xb9c2(%rip), %rdx      # 0x14508
movq %r14, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq %rbx
pushq %r12
callq 0x5740
popq %rcx
popq %rdx
movq (%r15), %rdi
movq (%r12), %rsi
movq 0xba51(%rip), %rdx      # 0x145b8
leaq 0x578e(%rip), %rax      # 0xe2fc
pushq $0x27
popq %rcx
pushq $0x8
popq %r8
xorl %r9d, %r9d
pushq $0x3
pushq %rax
callq 0x5740
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_ewmh_net_workarea
void
xu_ewmh_net_workarea(struct screen_ctx *sc)
{
	long	 workareas[CALMWM_NGROUPS][4];
	int	 i;

	for (i = 0; i < CALMWM_NGROUPS; i++) {
		workareas[i][0] = sc->work.x;
		workareas[i][1] = sc->work.y;
		workareas[i][2] = sc->work.w;
		workareas[i][3] = sc->work.h;
	}

	XChangeProperty(X_Dpy, sc->rootwin, ewmh[_NET_WORKAREA].atom,
	    XA_CARDINAL, 32, PropModeReplace, (unsigned char *)workareas,
	    CALMWM_NGROUPS * 4);
}

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movdqu 0xb4(%rdi), %xmm0
pxor %xmm2, %xmm2
pxor %xmm3, %xmm3
pcmpgtd %xmm0, %xmm3
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
pcmpgtd %xmm1, %xmm2
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
xorl %eax, %eax
cmpq $0x120, %rax            # imm = 0x120
je 0x8c20
movdqa %xmm0, (%rsp,%rax)
movdqa %xmm1, 0x10(%rsp,%rax)
addq $0x20, %rax
jmp 0x8c07
leaq 0xdc21(%rip), %rax      # 0x16848
movq (%rax), %rax
movq 0x18(%rdi), %rsi
movq 0xb973(%rip), %rdx      # 0x145a8
movq %rsp, %r10
pushq $0x6
popq %rcx
pushq $0x20
popq %r8
movq %rax, %rdi
xorl %r9d, %r9d
pushq $0x24
pushq %r10
callq 0x5740
addq $0x138, %rsp            # imm = 0x138
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_ewmh_net_client_list
void
xu_ewmh_net_client_list(struct screen_ctx *sc)
{
	struct client_ctx	*cc;
	Window			*winlist;
	int			 i = 0, j = 0;

	TAILQ_FOREACH(cc, &Clientq, entry)
		i++;
	if (i == 0)
		return;

	winlist = xmalloc(i * sizeof(*winlist));
	TAILQ_FOREACH(cc, &Clientq, entry)
		winlist[j++] = cc->win;
	XChangeProperty(X_Dpy, sc->rootwin, ewmh[_NET_CLIENT_LIST].atom,
	    XA_WINDOW, 32, PropModeReplace, (unsigned char *)winlist, i);
	xfree(winlist);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xb81b(%rip), %rax      # 0x14480
pushq $-0x8
popq %rdi
pushq $-0x1
popq %r15
movq (%rax), %rax
addq $0x8, %rdi
incl %r15d
testq %rax, %rax
jne 0x8c6c
testl %r15d, %r15d
je 0x8cde
callq 0x6014
movq %rax, %r14
leaq 0xb7f1(%rip), %rax      # 0x14480
movq %r14, %rcx
movq (%rax), %rax
testq %rax, %rax
je 0x8ca7
movq 0x38(%rax), %rdx
movq %rdx, (%rcx)
addq $0x8, %rcx
jmp 0x8c92
leaq 0xdb9a(%rip), %rax      # 0x16848
movq (%rax), %rdi
movq 0x18(%rbx), %rsi
movq 0xb86c(%rip), %rdx      # 0x14528
pushq $0x21
popq %rcx
pushq $0x20
popq %r8
xorl %r9d, %r9d
pushq %r15
pushq %r14
callq 0x5740
popq %rcx
popq %rdx
movq %r14, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x6050
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xutil.c
// Function: xu_ewmh_net_wm_desktop
void
xu_ewmh_net_wm_desktop(struct client_ctx *cc)
{
	struct group_ctx	*gc = cc->group;
	long			 no = 0xffffffff;

	if (gc)
		no = gc->shortcut - 1;

	XChangeProperty(X_Dpy, cc->win, ewmh[_NET_WM_DESKTOP].atom,
	    XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&no, 1);
}

// Assembly:
pushq %rax
movq 0xf0(%rdi), %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movq %rcx, (%rsp)
testq %rax, %rax
je 0x8e75
movslq 0x20(%rax), %rax
decq %rax
movq %rax, (%rsp)
leaq 0xd9cc(%rip), %rax      # 0x16848
movq (%rax), %rax
movq 0x38(%rdi), %rsi
movq 0xb73e(%rip), %rdx      # 0x145c8
movq %rsp, %r10
pushq $0x6
popq %rcx
pushq $0x20
popq %r8
movq %rax, %rdi
xorl %r9d, %r9d
pushq $0x1
pushq %r10
callq 0x5740
popq %rcx
popq %rdx
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/conf.c
// Function: conf_cmd_add
void
conf_cmd_add(struct conf *c, char *image, char *label, int flags)
{
	/* "term" and "lock" have special meanings. */

	if (strcmp(label, "term") == 0)
		(void)strlcpy(c->termpath, image, sizeof(c->termpath));
	else if (strcmp(label, "lock") == 0)
		(void)strlcpy(c->lockpath, image, sizeof(c->lockpath));
	else {
		struct cmd *cmd = xmalloc(sizeof(*cmd));
		cmd->flags = flags;
		(void)strlcpy(cmd->image, image, sizeof(cmd->image));
		(void)strlcpy(cmd->label, label, sizeof(cmd->label));
		TAILQ_INSERT_TAIL(&c->cmdq, cmd, entry);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x5407(%rip), %rsi      # 0xe331
movq %rdx, %rdi
callq 0x5610
testl %eax, %eax
je 0x8f9d
leaq 0x53fa(%rip), %rsi      # 0xe337
movq %r15, %rdi
callq 0x5610
testl %eax, %eax
je 0x8fa6
movl $0x1118, %edi           # imm = 0x1118
callq 0x6014
movq %rax, %r12
movl %ebp, 0x10(%rax)
leaq 0x14(%rax), %rdi
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rsi
callq 0xcd50
leaq 0x1014(%r12), %rdi
movl $0x100, %edx            # imm = 0x100
movq %r15, %rsi
callq 0xcd50
andq $0x0, (%r12)
movq 0x38(%rbx), %rax
movq %rax, 0x8(%r12)
movq %r12, (%rax)
movq %r12, 0x38(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addq $0xe0, %rbx
jmp 0x8fad
addq $0x10e0, %rbx           # imm = 0x10E0
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcd50
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/conf.c
// Function: conf_init
void
conf_init(struct conf *c)
{
	int	i;

	c->flags = 0;
	c->bwidth = CONF_BWIDTH;
	c->mamount = CONF_MAMOUNT;
	c->snapdist = CONF_SNAPDIST;

	TAILQ_INIT(&c->ignoreq);
	TAILQ_INIT(&c->cmdq);
	TAILQ_INIT(&c->keybindingq);
	TAILQ_INIT(&c->autogroupq);
	TAILQ_INIT(&c->mousebindingq);

	for (i = 0; i < nitems(kb_binds); i++)
		conf_bindname(c, kb_binds[i].key, kb_binds[i].func);

	for (i = 0; i < nitems(m_binds); i++)
		conf_mousebind(c, m_binds[i].key, m_binds[i].func);

	for (i = 0; i < nitems(color_binds); i++)
		c->color[i].name = xstrdup(color_binds[i].name);

	/* Default term/lock */
	(void)strlcpy(c->termpath, "xterm", sizeof(c->termpath));
	(void)strlcpy(c->lockpath, "xlock", sizeof(c->lockpath));

	c->font = xstrdup(CONF_FONT);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movaps 0x52d7(%rip), %xmm0     # 0xe320
movups %xmm0, 0x50(%rdi)
andq $0x0, 0x20(%rdi)
leaq 0x20(%rdi), %rax
movq %rax, 0x28(%rdi)
leaq 0x30(%rdi), %rax
andq $0x0, 0x30(%rdi)
movq %rax, 0x38(%rdi)
andq $0x0, (%rdi)
movq %rdi, 0x8(%rdi)
leaq 0x10(%rdi), %rax
andq $0x0, 0x10(%rdi)
movq %rax, 0x18(%rdi)
andq $0x0, 0x40(%rdi)
leaq 0x40(%rdi), %rax
movq %rax, 0x48(%rdi)
pushq $0x8
popq %r14
leaq 0x9c3c(%rip), %r15      # 0x12cd0
cmpq $0x398, %r14            # imm = 0x398
je 0x90b4
movq -0x8(%r14,%r15), %rsi
movq (%r14,%r15), %rdx
movq %rbx, %rdi
callq 0x9141
addq $0x10, %r14
jmp 0x9094
xorl %r14d, %r14d
leaq 0x9fa2(%rip), %r15      # 0x13060
cmpq $0x80, %r14
je 0x90de
movq (%r14,%r15), %rsi
movq 0x8(%r14,%r15), %rdx
movq %rbx, %rdi
callq 0x934b
addq $0x10, %r14
jmp 0x90be
xorl %r14d, %r14d
leaq 0x9ff8(%rip), %r15      # 0x130e0
cmpq $0x70, %r14
je 0x9102
movq (%r14,%r15), %rdi
callq 0x6055
movq %rax, 0x70(%rbx,%r14)
addq $0x10, %r14
jmp 0x90e8
movw $0x6d, 0xe4(%rbx)
movl $0x72657478, 0xe0(%rbx) # imm = 0x72657478
movl $0x636f6c78, 0x10e0(%rbx) # imm = 0x636F6C78
movw $0x6b, 0x10e4(%rbx)
leaq 0x520d(%rip), %rdi      # 0xe33c
callq 0x6055
movq %rax, 0x20e0(%rbx)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/conf.c
// Function: conf_mousebind
void
conf_mousebind(struct conf *c, char *name, char *binding)
{
	struct mousebinding	*current_binding;
	char			*substring, *tmp;
	const char		*errstr;
	int			 iter;

	current_binding = xcalloc(1, sizeof(*current_binding));

	if ((substring = strchr(name, '-')) != NULL) {
		for (iter = 0; iter < nitems(bind_mods); iter++) {
			if ((tmp = strchr(name, bind_mods[iter].chr)) !=
			    NULL && tmp < substring) {
				current_binding->modmask |=
				    bind_mods[iter].mask;
			}
		}

		/* skip past the modifiers */
		substring++;
	} else
		substring = name;

	current_binding->button = strtonum(substring, 1, 3, &errstr);
	if (errstr)
		warnx("number of buttons is %s: %s", errstr, substring);

	conf_mouseunbind(c, current_binding);

	if (strcmp("unmap", binding) == 0)
		return;

	for (iter = 0; iter < nitems(name_to_mousefunc); iter++) {
		if (strcmp(name_to_mousefunc[iter].tag, binding) != 0)
			continue;

		current_binding->context = name_to_mousefunc[iter].context;
		current_binding->callback = name_to_mousefunc[iter].handler;
		TAILQ_INSERT_TAIL(&c->mousebindingq, current_binding, entry);
		return;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x28
popq %rsi
callq 0x6032
movq %rax, %r15
pushq $0x2d
popq %rsi
movq %r12, %rdi
callq 0x5520
testq %rax, %rax
je 0x93cd
movq %rax, %r13
movq %rbp, 0x8(%rsp)
xorl %ebp, %ebp
leaq 0x542f(%rip), %r14      # 0xe7c0
cmpq $0x4, %rbp
je 0x93c2
movsbl (%r14,%rbp,8), %esi
movq %r12, %rdi
callq 0x5520
testq %rax, %rax
sete %cl
cmpq %r13, %rax
setae %al
orb %cl, %al
jne 0x93bd
movl 0x4(%r14,%rbp,8), %eax
orl %eax, 0x18(%r15)
incq %rbp
jmp 0x9391
incq %r13
movq %r13, %r12
movq 0x8(%rsp), %rbp
pushq $0x1
popq %rsi
pushq $0x3
popq %rdx
leaq 0x10(%rsp), %r13
movq %r12, %rdi
movq %r13, %rcx
callq 0xd240
movl %eax, 0x1c(%r15)
movq (%r13), %rsi
testq %rsi, %rsi
je 0x9401
leaq 0x4fb9(%rip), %rdi      # 0xe3b0
movq %r12, %rdx
xorl %eax, %eax
callq 0x5140
movq 0x40(%rbx), %r14
addq $0x48, %rbx
testq %r14, %r14
je 0x9442
movq %r14, %rdi
movq (%r14), %r14
movl 0x18(%rdi), %eax
cmpl 0x18(%r15), %eax
jne 0x9409
movl 0x1c(%rdi), %eax
cmpl 0x1c(%r15), %eax
jne 0x9409
leaq 0x8(%r14), %rax
testq %r14, %r14
movq 0x8(%rdi), %rcx
cmoveq %rbx, %rax
movq %rcx, (%rax)
movq %r14, (%rcx)
callq 0x6050
jmp 0x9409
leaq 0x4f61(%rip), %rdi      # 0xe3aa
movq %rbp, %rsi
callq 0x5610
testl %eax, %eax
je 0x94a1
xorl %ecx, %ecx
leaq 0x9cf2(%rip), %r14      # 0x13150
leaq 0x18(%rcx), %r12
cmpq $0xf0, %r12
je 0x94a1
movq (%rcx,%r14), %rdi
movq %rbp, %rsi
callq 0x5610
movq %r12, %rcx
testl %eax, %eax
jne 0x945e
movl -0x8(%r12,%r14), %eax
movl %eax, 0x20(%r15)
movq -0x10(%r12,%r14), %rax
movq %rax, 0x10(%r15)
andq $0x0, (%r15)
movq (%rbx), %rax
movq %rax, 0x8(%r15)
movq %r15, (%rax)
movq %r15, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/conf.c
// Function: conf_clear
void
conf_clear(struct conf *c)
{
	struct autogroupwin	*ag;
	struct keybinding	*kb;
	struct winmatch		*wm;
	struct cmd		*cmd;
	struct mousebinding	*mb;
	int			 i;

	while ((cmd = TAILQ_FIRST(&c->cmdq)) != NULL) {
		TAILQ_REMOVE(&c->cmdq, cmd, entry);
		xfree(cmd);
	}

	while ((kb = TAILQ_FIRST(&c->keybindingq)) != NULL) {
		TAILQ_REMOVE(&c->keybindingq, kb, entry);
		xfree(kb);
	}

	while ((ag = TAILQ_FIRST(&c->autogroupq)) != NULL) {
		TAILQ_REMOVE(&c->autogroupq, ag, entry);
		xfree(ag->class);
		if (ag->name)
			xfree(ag->name);
		xfree(ag);
	}

	while ((wm = TAILQ_FIRST(&c->ignoreq)) != NULL) {
		TAILQ_REMOVE(&c->ignoreq, wm, entry);
		xfree(wm);
	}

	while ((mb = TAILQ_FIRST(&c->mousebindingq)) != NULL) {
		TAILQ_REMOVE(&c->mousebindingq, mb, entry);
		xfree(mb);
	}

	for (i = 0; i < CWM_COLOR_MAX; i++)
		xfree(c->color[i].name);

	xfree(c->font);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x9501
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
leaq 0x8(%rax), %rdx
testq %rax, %rax
cmoveq %r14, %rdx
movq %rcx, (%rdx)
movq %rax, (%rcx)
callq 0x6050
jmp 0x94bc
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
testq %rax, %rax
movq %rax, %rdx
cmoveq %rbx, %rdx
movq %rcx, 0x8(%rdx)
movq %rax, (%rcx)
callq 0x6050
movq (%rbx), %rdi
testq %rdi, %rdi
jne 0x94e4
leaq 0x18(%rbx), %r15
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x954f
movq (%r14), %rax
leaq 0x8(%rax), %rcx
testq %rax, %rax
cmoveq %r15, %rcx
movq 0x8(%r14), %rdx
movq %rdx, (%rcx)
movq %rax, (%rdx)
movq 0x10(%r14), %rdi
callq 0x6050
movq 0x18(%r14), %rdi
testq %rdi, %rdi
je 0x9545
callq 0x6050
movq %r14, %rdi
callq 0x6050
jmp 0x950d
leaq 0x28(%rbx), %r14
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x957b
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
leaq 0x8(%rax), %rdx
testq %rax, %rax
cmoveq %r14, %rdx
movq %rcx, (%rdx)
movq %rax, (%rcx)
callq 0x6050
jmp 0x9553
leaq 0x48(%rbx), %r14
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x95a7
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
leaq 0x8(%rax), %rdx
testq %rax, %rax
cmoveq %r14, %rdx
movq %rcx, (%rdx)
movq %rax, (%rcx)
callq 0x6050
jmp 0x957f
xorl %r14d, %r14d
cmpq $0x70, %r14
je 0x95c0
movq 0x70(%rbx,%r14), %rdi
callq 0x6050
addq $0x10, %r14
jmp 0x95aa
movq 0x20e0(%rbx), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x6050
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/conf.c
// Function: conf_setup
void
conf_setup(struct conf *c, const char *conf_file)
{
	char		 conf_path[MAXPATHLEN];
	char		*home;
	struct stat	 sb;
	int		 parse = 0;

	conf_init(c);

	if (conf_file == NULL) {
		if ((home = getenv("HOME")) == NULL)
			errx(1, "No HOME directory.");

		(void)snprintf(conf_path, sizeof(conf_path), "%s/%s",
		    home, CONFFILE);

		if (stat(conf_path, &sb) == 0 && (sb.st_mode & S_IFREG))
			parse = 1;
	} else {
		if (stat(conf_file, &sb) == -1 || !(sb.st_mode & S_IFREG))
			errx(1, "%s: %s", conf_file, strerror(errno));
		else {
			(void)strlcpy(conf_path, conf_file, sizeof(conf_path));
			parse = 1;
		}
	}

	if (parse && (parse_config(conf_path, c) == -1))
		warnx("config file %s has errors, not loading", conf_path);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1098, %rsp           # imm = 0x1098
movq %rsi, %r14
movq %rdi, %rbx
callq 0x903a
testq %r14, %r14
je 0x964c
movq %rsp, %rsi
movq %r14, %rdi
callq 0x5840
cmpl $-0x1, %eax
je 0x96a6
testb $-0x80, 0x19(%rsp)
je 0x96a6
leaq 0x90(%rsp), %rdi
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rsi
callq 0xcd50
leaq 0x90(%rsp), %rdi
movq %rbx, %rsi
callq 0xcb27
cmpl $-0x1, %eax
jne 0x969b
leaq 0x4d43(%rip), %rdi      # 0xe37e
leaq 0x90(%rsp), %rsi
xorl %eax, %eax
callq 0x5140
jmp 0x969b
leaq 0x4d06(%rip), %rdi      # 0xe359
callq 0x5550
testq %rax, %rax
je 0x96c9
leaq 0x4d0d(%rip), %rdx      # 0xe371
leaq 0x4d0c(%rip), %r8       # 0xe377
leaq 0x90(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
movq %rax, %rcx
xorl %eax, %eax
callq 0x50b0
movq %rsp, %rsi
movq %r14, %rdi
callq 0x5840
testl %eax, %eax
jne 0x969b
testb $-0x80, 0x19(%rsp)
jne 0x961f
addq $0x1098, %rsp           # imm = 0x1098
popq %rbx
popq %r14
retq
callq 0x5580
movl (%rax), %edi
callq 0x5490
leaq 0x4d0c(%rip), %rsi      # 0xe3c5
pushq $0x1
popq %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x56f0
leaq 0x4c8e(%rip), %rsi      # 0xe35e
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x56f0
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/conf.c
// Function: conf_client
void
conf_client(struct client_ctx *cc)
{
	struct winmatch	*wm;
	char		*wname = cc->name;
	int		 ignore = 0;

	TAILQ_FOREACH(wm, &Conf.ignoreq, entry) {
		if (strncasecmp(wm->title, wname, strlen(wm->title)) == 0) {
			ignore = 1;
			break;
		}
	}

	cc->bwidth = ignore ? 0 : Conf.bwidth;
	cc->flags |= ignore ? CLIENT_IGNORE : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xb071(%rip), %rax      # 0x14760
leaq 0x20(%rax), %r13
movq 0xd8(%rdi), %r14
pushq $0x2
popq %rbp
xorl %r12d, %r12d
movq (%r13), %r13
testq %r13, %r13
je 0x9729
leaq 0x10(%r13), %r15
movq %r15, %rdi
callq 0x5320
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x55d0
testl %eax, %eax
jne 0x9700
jmp 0x972b
xorl %ebp, %ebp
testq %r13, %r13
jne 0x973b
leaq 0xb029(%rip), %rax      # 0x14760
movl 0x54(%rax), %r12d
movl %r12d, 0x50(%rbx)
orl %ebp, 0xa8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/conf.c
// Function: conf_grab_mouse
void
conf_grab_mouse(struct client_ctx *cc)
{
	struct mousebinding	*mb;
	int			 button;

	TAILQ_FOREACH(mb, &Conf.mousebindingq, entry) {
		if (mb->context != MOUSEBIND_CTX_WIN)
			continue;

		switch(mb->button) {
		case 1:
			button = Button1;
			break;
		case 2:
			button = Button2;
			break;
		case 3:
			button = Button3;
			break;
		default:
			warnx("strange button in mousebinding\n");
			continue;
		}
		xu_btn_grab(cc->win, mb->modmask, button);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xaf9f(%rip), %r15      # 0x14760
addq $0x40, %r15
leaq 0x4c00(%rip), %r14      # 0xe3cc
movq (%r15), %r15
testq %r15, %r15
je 0x9802
cmpl $0x2, 0x20(%r15)
jne 0x97cc
movl 0x1c(%r15), %edx
leal -0x1(%rdx), %eax
cmpl $0x3, %eax
jae 0x97f6
movq 0x38(%rbx), %rdi
movl 0x18(%r15), %esi
callq 0x84ee
jmp 0x97cc
movq %r14, %rdi
xorl %eax, %eax
callq 0x5140
jmp 0x97cc
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xevents.c
// Function: xev_handle_keypress
static void
xev_handle_keypress(XEvent *ee)
{
	XKeyEvent		*e = &ee->xkey;
	struct client_ctx	*cc = NULL, fakecc;
	struct keybinding	*kb;
	KeySym			 keysym, skeysym;
	int			 modshift;

	keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
	skeysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 1);

	/* we don't care about caps lock and numlock here */
	e->state &= ~(LockMask | Mod2Mask);

	TAILQ_FOREACH(kb, &Conf.keybindingq, entry) {
		if (keysym != kb->keysym && skeysym == kb->keysym)
			modshift = ShiftMask;
		else
			modshift = 0;

		if ((kb->modmask | modshift) != e->state)
			continue;

		if ((kb->keycode != 0 && kb->keysym == NoSymbol &&
		    kb->keycode == e->keycode) || kb->keysym ==
		    (modshift == 0 ? keysym : skeysym))
			break;
	}

	if (kb == NULL)
		return;
	if (kb->flags & KBFLAG_NEEDCLIENT) {
		if (((cc = client_find(e->window)) == NULL) &&
		    (cc = client_current()) == NULL)
			return;
	} else {
		cc = &fakecc;
		cc->sc = screen_fromroot(e->window);
	}

	(*kb->callback)(cc, &kb->argument);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdi, %rbx
leaq 0xd02a(%rip), %r15      # 0x16848
movq (%r15), %rdi
movzbl 0x54(%rbx), %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5260
movq %rax, %r14
movq (%r15), %rdi
movzbl 0x54(%rbx), %esi
pushq $0x1
popq %rcx
xorl %edx, %edx
callq 0x5260
movl 0x50(%rbx), %ecx
andl $-0x13, %ecx
movl %ecx, 0x50(%rbx)
leaq 0xaf0e(%rip), %r15      # 0x14760
movq (%r15), %r15
testq %r15, %r15
je 0x98e0
movl 0x24(%r15), %esi
movslq %esi, %rdx
cmpq %rdx, %r14
setne %dil
cmpq %rdx, %rax
sete %r8b
andb %dil, %r8b
movzbl %r8b, %edi
orl 0x20(%r15), %edi
cmpl %ecx, %edi
jne 0x9852
movl 0x28(%r15), %edi
testl %edi, %edi
sete %r8b
testl %esi, %esi
setne %sil
orb %r8b, %sil
jne 0x989c
cmpl 0x54(%rbx), %edi
je 0x98a6
cmpq %rdx, %r14
je 0x98a6
cmpq %rdx, %rax
jne 0x9852
testb $0x1, 0x2c(%r15)
movq 0x20(%rbx), %rdi
jne 0x98c1
callq 0x5e5c
leaq 0x8(%rsp), %rdi
movq %rax, 0x30(%rdi)
jmp 0x98d8
callq 0x6074
testq %rax, %rax
jne 0x98d5
callq 0x6b6a
testq %rax, %rax
je 0x98e0
movq %rax, %rdi
leaq 0x18(%r15), %rsi
callq *0x10(%r15)
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xevents.c
// Function: xev_handle_keyrelease
static void
xev_handle_keyrelease(XEvent *ee)
{
	XKeyEvent		*e = &ee->xkey;
	struct screen_ctx	*sc;
	struct client_ctx	*cc;
	int			 i, keysym;

	sc = screen_fromroot(e->root);
	cc = client_current();

	keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
	for (i = 0; i < nitems(modkeys); i++) {
		if (keysym == modkeys[i]) {
			client_cycle_leave(sc, cc);
			break;
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
movq 0x28(%rdi), %rdi
callq 0x5e5c
movq %rax, %rbx
callq 0x6b6a
movq %rax, %r14
leaq 0xcf38(%rip), %rax      # 0x16848
movq (%rax), %rdi
movzbl 0x54(%r15), %esi
xorl %r15d, %r15d
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x5260
cltq
leaq 0x4eb3(%rip), %rcx      # 0xe7e0
cmpq $0x30, %r15
je 0x9950
leaq 0x8(%r15), %rdx
cmpq (%r15,%rcx), %rax
movq %rdx, %r15
jne 0x992d
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x7080
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xevents.c
// Function: xev_handle_buttonpress
static void
xev_handle_buttonpress(XEvent *ee)
{
	XButtonEvent		*e = &ee->xbutton;
	struct client_ctx	*cc, fakecc;
	struct screen_ctx	*sc;
	struct mousebinding	*mb;

	sc = screen_fromroot(e->root);
	cc = client_find(e->window);

	/* Ignore caps lock and numlock */
	e->state &= ~(Mod2Mask | LockMask);

	TAILQ_FOREACH(mb, &Conf.mousebindingq, entry) {
		if (e->button == mb->button && e->state == mb->modmask)
			break;
	}

	if (mb == NULL)
		return;
	if (mb->context == MOUSEBIND_CTX_ROOT) {
		if (e->window != sc->rootwin)
			return;
		cc = &fakecc;
		cc->sc = screen_fromroot(e->window);
	} else if (cc == NULL) /* (mb->context == MOUSEBIND_CTX_WIN */
		return;

	(*mb->callback)(cc, e);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x5e5c
movq %rax, %r14
movq 0x20(%rbx), %rdi
callq 0x6074
movl 0x50(%rbx), %ecx
andl $-0x13, %ecx
movl %ecx, 0x50(%rbx)
leaq 0xadd6(%rip), %r15      # 0x14760
addq $0x40, %r15
movq (%r15), %r15
testq %r15, %r15
je 0x99d8
movl 0x54(%rbx), %edx
cmpl 0x1c(%r15), %edx
jne 0x998e
cmpl 0x18(%r15), %ecx
jne 0x998e
cmpl $0x1, 0x20(%r15)
jne 0x99c9
movq 0x20(%rbx), %rdi
cmpq 0x18(%r14), %rdi
jne 0x99d8
callq 0x5e5c
movq %rax, %rcx
leaq 0x8(%rsp), %rax
movq %rcx, 0x30(%rax)
jmp 0x99ce
testq %rax, %rax
je 0x99d8
movq %rax, %rdi
movq %rbx, %rsi
callq *0x10(%r15)
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xevents.c
// Function: xev_handle_unmapnotify
static void
xev_handle_unmapnotify(XEvent *ee)
{
	XUnmapEvent		*e = &ee->xunmap;
	XEvent			ev;
	struct client_ctx	*cc;

	/* XXX, we need a recursive locking wrapper around grab server */
	XGrabServer(X_Dpy);
	if ((cc = client_find(e->window)) != NULL) {
		/*
		 * If it's going to die anyway, nuke it.
		 *
		 * Else, if it's a synthetic event delete state, since they
		 * want it to be withdrawn. ICCM recommends you withdraw on
		 * this even if we haven't alredy been told to iconify, to
		 * deal with legacy clients.
		 */
		if (XCheckTypedWindowEvent(X_Dpy, cc->win,
		    DestroyNotify, &ev) || e->send_event != 0) {
			client_delete(cc);
		} else
			client_hide(cc);
	}
	XUngrabServer(X_Dpy);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xc0, %rsp
movq %rdi, %rbx
leaq 0xcdd6(%rip), %r15      # 0x16848
movq (%r15), %rdi
callq 0x5120
movq 0x28(%rbx), %rdi
callq 0x6074
testq %rax, %rax
je 0x9aaf
movq %rax, %r14
movq (%r15), %rdi
movq 0x38(%rax), %rsi
pushq $0x11
popq %rdx
movq %rsp, %rcx
callq 0x5100
testl %eax, %eax
jne 0x9aa7
cmpl $0x0, 0x10(%rbx)
je 0x9ac4
movq %r14, %rdi
callq 0x68e8
movq (%r15), %rdi
callq 0x5420
addq $0xc0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
callq 0x686a
jmp 0x9aaf
// File: /workspace/github_c_makefile_star2_O2/zenlinux[P]cwm/xevents.c
// Function: xev_handle_maprequest
static void
xev_handle_maprequest(XEvent *ee)
{
	XMapRequestEvent	*e = &ee->xmaprequest;
	struct client_ctx	*cc = NULL, *old_cc;
	XWindowAttributes	 xattr;

	if ((old_cc = client_current()) != NULL)
		client_ptrsave(old_cc);

	if ((cc = client_find(e->window)) == NULL) {
		XGetWindowAttributes(X_Dpy, e->window, &xattr);
		cc = client_new(e->window, screen_fromroot(xattr.root), 1);
	}

	if ((cc->flags & CLIENT_IGNORE) == 0)
		client_ptrwarp(cc);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
callq 0x6b6a
testq %rax, %rax
je 0x9aed
movq %rax, %rdi
callq 0x6f15
movq 0x28(%rbx), %rdi
callq 0x6074
testq %rax, %rax
jne 0x9b2f
leaq 0xcd46(%rip), %rax      # 0x16848
movq (%rax), %rdi
movq 0x28(%rbx), %rsi
movq %rsp, %r14
movq %r14, %rdx
callq 0x5710
movq 0x28(%rbx), %rbx
movq 0x20(%r14), %rdi
callq 0x5e5c
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x608a
testb $0x2, 0xa8(%rax)
jne 0x9b40
movq %rax, %rdi
callq 0x6eaa
addq $0x88, %rsp
popq %rbx
popq %r14
retq