LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/main.c
// Function: parse_modifiers
static unsigned int parse_modifiers(char *s) {
	static struct {
		const char *name;
		unsigned int mask;
	} modifiers[9] = {
		{ "shift", ShiftMask },
		{ "lock", LockMask },
		{ "control", ControlMask },
		{ "alt", Mod1Mask },
		{ "mod1", Mod1Mask },
		{ "mod2", Mod2Mask },
		{ "mod3", Mod3Mask },
		{ "mod4", Mod4Mask },
		{ "mod5", Mod5Mask }
	};
	char *tmp = strtok(s, ",+");
	unsigned int ret = 0;
	int i;
	if (!tmp)
		return 0;
	do {
		for (i = 0; i < 9; i++) {
			if (!strcmp(modifiers[i].name, tmp))
				ret |= modifiers[i].mask;
		}
		tmp = strtok(NULL, ",+");
	} while (tmp);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x3689(%rip), %rsi      # 0x974d
callq 0x35d0
testq %rax, %rax
je 0x6121
movq %rax, %r15
xorl %ebx, %ebx
pushq $0x8
popq %r12
leaq 0x366f(%rip), %r14      # 0x974d
leaq 0x6c4b(%rip), %r13      # 0xcd30
movq %r12, %rbp
cmpq $0x98, %rbp
je 0x610d
movq -0x8(%rbp,%r13), %rdi
movq %r15, %rsi
callq 0x3310
testl %eax, %eax
jne 0x6107
orl (%rbp,%r13), %ebx
addq $0x10, %rbp
jmp 0x60e8
xorl %edi, %edi
movq %r14, %rsi
callq 0x35d0
movq %rax, %r15
testq %rax, %rax
jne 0x60e5
jmp 0x6123
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/main.c
// Function: set_app
static void set_app(const char *arg) {
	Application *new = xmalloc(sizeof(Application));
	char *tmp;
	new->res_name = new->res_class = NULL;
	new->geometry_mask = 0;
	new->is_dock = 0;
#ifdef VWM
	new->vdesk = VDESK_NONE;
#endif
	if ((tmp = strchr(arg, '/'))) {
		*(tmp++) = 0;
	}
	if (strlen(arg) > 0) {
		new->res_name = xmalloc(strlen(arg)+1);
		strcpy(new->res_name, arg);
	}
	if (tmp && strlen(tmp) > 0) {
		new->res_class = xmalloc(strlen(tmp)+1);
		strcpy(new->res_class, tmp);
	}
	applications = list_prepend(applications, new);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r15
pushq $0x30
popq %rdi
callq 0x6073
movq %rax, %rbx
movabsq $-0x200000000, %rax     # imm = 0xFFFFFFFE00000000
movq %rax, 0x24(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andl $0x0, 0x10(%rbx)
pushq $0x2f
popq %rsi
movq %r15, %rdi
callq 0x3200
testq %rax, %rax
je 0x617a
movq %rax, %r14
incq %r14
movb $0x0, (%rax)
jmp 0x617d
xorl %r14d, %r14d
movq %r15, %rdi
callq 0x31e0
testq %rax, %rax
je 0x61a3
incq %rax
movq %rax, %rdi
callq 0x6073
movq %rax, (%rbx)
movq %rax, %rdi
movq %r15, %rsi
callq 0x3100
testq %r14, %r14
je 0x61cf
movq %r14, %rdi
callq 0x31e0
testq %rax, %rax
je 0x61cf
incq %rax
movq %rax, %rdi
callq 0x6073
movq %rax, 0x8(%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0x3100
movq 0x75ba(%rip), %rdi      # 0xd790
movq %rbx, %rsi
callq 0x585c
movq %rax, 0x75ab(%rip)      # 0xd790
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/main.c
// Function: set_app_geometry
static void set_app_geometry(const char *arg) {
	if (applications) {
		Application *app = applications->data;
		app->geometry_mask = XParseGeometry(arg,
				&app->x, &app->y, &app->width, &app->height);
	}
}

// Assembly:
movq 0x759e(%rip), %rax      # 0xd790
testq %rax, %rax
je 0x6215
pushq %rbx
movq 0x8(%rax), %rbx
leaq 0x14(%rbx), %rsi
leaq 0x18(%rbx), %rdx
leaq 0x1c(%rbx), %rcx
leaq 0x20(%rbx), %r8
callq 0x31b0
movl %eax, 0x10(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/main.c
// Function: set_app_vdesk
static void set_app_vdesk(const char *arg) {
	unsigned int v = atoi(arg);
	if (applications && valid_vdesk(v)) {
		Application *app = applications->data;
		app->vdesk = v;
	}
}

// Assembly:
pushq %rax
callq 0x3630
movq 0x7555(%rip), %rcx      # 0xd790
testq %rcx, %rcx
setne %dl
leal 0x1(%rax), %esi
cmpl $0x9, %esi
setb %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x625b
movq 0x8(%rcx), %rcx
movl %eax, 0x28(%rcx)
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/misc.c
// Function: spawn
void spawn(const char *const cmd[]) {
	ScreenInfo *current_screen = find_current_screen();
	pid_t pid;

	if (current_screen && current_screen->display)
		putenv(current_screen->display);
	if (!(pid = fork())) {
		setsid();
		switch (fork()) {
			/* execvp()'s prototype is (char *const *) suggesting that it
			 * modifies the contents of the strings.  The prototype is this
			 * way due to SUS maintaining compatability with older code.
			 * However, execvp guarantees not to modify argv, so the following
			 * cast is valid. */
			case 0: execvp(cmd[0], (char *const *)cmd);
			default: _exit(0);
		}
	}
	if (pid > 0)
		wait(NULL);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x7c95
testq %rax, %rax
je 0x6290
movq 0x60(%rax), %rdi
testq %rdi, %rdi
je 0x6290
callq 0x32f0
callq 0x3720
testl %eax, %eax
je 0x62a5
jle 0x62a3
xorl %edi, %edi
popq %rbx
jmp 0x3700
popq %rbx
retq
callq 0x32b0
callq 0x3720
testl %eax, %eax
jne 0x62be
movq (%rbx), %rdi
movq %rbx, %rsi
callq 0x3620
xorl %edi, %edi
callq 0x30e0
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/misc.c
// Function: handle_xerror
int handle_xerror(Display *dsply, XErrorEvent *e) {
	Client *c;
	(void)dsply;  /* unused */

	LOG_ENTER("handle_xerror(error=%d, request=%d/%d, resourceid=%lx)", e->error_code, e->request_code, e->minor_code, e->resourceid);

	if (ignore_xerror) {
		LOG_DEBUG("ignoring...\n");
		LOG_LEAVE();
		return 0;
	}
	/* If this error actually occurred while setting up the new
	 * window, best let make_new_client() know not to bother */
	if (initialising != None && e->resourceid == initialising) {
		LOG_DEBUG("error caught while initialising window=%lx\n", initialising);
		initialising = None;
		LOG_LEAVE();
		return 0;
	}
	if (e->error_code == BadAccess && e->request_code == X_ChangeWindowAttributes) {
		LOG_ERROR("root window unavailable (maybe another wm is running?)\n");
		exit(1);
	}

	c = find_client(e->resourceid);
	if (c) {
		LOG_DEBUG("flagging client for removal\n");
		c->remove = 1;
		need_client_tidy = 1;
	} else {
		LOG_DEBUG("unknown error: not handling\n");
	}
	LOG_LEAVE();
	return 0;
}

// Assembly:
pushq %rax
cmpl $0x0, 0x7549(%rip)      # 0xd824
jne 0x6322
leaq 0x74d4(%rip), %rax      # 0xd7b8
cmpq $0x0, (%rax)
je 0x62fc
movq 0x10(%rsi), %rcx
cmpq (%rax), %rcx
jne 0x62fc
movq $0x0, (%rax)
jmp 0x6322
cmpb $0xa, 0x20(%rsi)
jne 0x6308
cmpb $0x2, 0x21(%rsi)
je 0x6326
movq 0x10(%rsi), %rdi
callq 0x386c
testq %rax, %rax
je 0x6322
pushq $0x1
popq %rcx
movl %ecx, 0x7c(%rax)
movl %ecx, 0x74fe(%rip)      # 0xd820
xorl %eax, %eax
popq %rcx
retq
movq 0x6ccb(%rip), %rax      # 0xcff8
movq (%rax), %rcx
leaq 0x342e(%rip), %rdi      # 0x9765
pushq $0x37
popq %rsi
pushq $0x1
popq %rdx
callq 0x3670
pushq $0x1
popq %rdi
callq 0x3660
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/misc.c
// Function: discard_enter_events
void discard_enter_events(Client *except) {
	XEvent tmp, putback_ev;
	int putback = 0;
	XSync(dpy, False);
	while (XCheckMaskEvent(dpy, EnterWindowMask, &tmp)) {
		if (tmp.xcrossing.window == except->parent) {
			memcpy(&putback_ev, &tmp, sizeof(XEvent));
			putback = 1;
		}
	}
	if (putback) {
		XPutBackEvent(dpy, &putback_ev);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdi, %rbx
leaq 0x747b(%rip), %r13      # 0xd7e0
movq (%r13), %rdi
xorl %esi, %esi
callq 0x3490
movb $0x1, %bpl
pushq $0x10
popq %r14
leaq 0xc8(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r13), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x35e0
testl %eax, %eax
je 0x63b9
movq 0xe8(%rsp), %rax
cmpq 0x8(%rbx), %rax
jne 0x6384
movl $0xc0, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x3380
xorl %ebp, %ebp
jmp 0x6384
testb $0x1, %bpl
jne 0x63cd
movq (%r13), %rdi
leaq 0x8(%rsp), %rsi
callq 0x34c0
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/new.c
// Function: get_wm_normal_hints
long get_wm_normal_hints(Client *c) {
	XSizeHints *size;
	long flags;
	long dummy;
	size = XAllocSizeHints();

	LOG_XENTER("XGetWMNormalHints(window=%lx)", c->window);
	XGetWMNormalHints(dpy, c->window, size, &dummy);
	debug_wm_normal_hints(size);
	LOG_XLEAVE();
	flags = size->flags;
	if (flags & PMinSize) {
		c->min_width = size->min_width;
		c->min_height = size->min_height;
	} else {
		c->min_width = c->min_height = 0;
	}
	if (flags & PMaxSize) {
		c->max_width = size->max_width;
		c->max_height = size->max_height;
	} else {
		c->max_width = c->max_height = 0;
	}
	if (flags & PBaseSize) {
		c->base_width = size->base_width;
		c->base_height = size->base_height;
	} else {
		c->base_width = c->min_width;
		c->base_height = c->min_height;
	}
	c->width_inc = c->height_inc = 1;
	if (flags & PResizeInc) {
		c->width_inc = size->width_inc ? size->width_inc : 1;
		c->height_inc = size->height_inc ? size->height_inc : 1;
	}
	if (!(flags & PMinSize)) {
		c->min_width = c->base_width + c->width_inc;
		c->min_height = c->base_height + c->height_inc;
	}
	if (flags & PWinGravity) {
		c->win_gravity_hint = size->win_gravity;
	} else {
		c->win_gravity_hint = NorthWestGravity;
	}
	c->win_gravity = c->win_gravity_hint;
	XFree(size);
	return flags;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x3400
movq %rax, %r14
leaq 0x6bcf(%rip), %rax      # 0xd7e0
movq (%rax), %rdi
movq (%rbx), %rsi
leaq 0x8(%rsp), %rcx
movq %r14, %rdx
callq 0x31c0
movq (%r14), %r15
xorl %eax, %eax
movl $0x0, %ecx
testb $0x10, %r15b
je 0x6c3c
movl 0x18(%r14), %ecx
movl 0x1c(%r14), %eax
movl %eax, 0x4c(%rbx)
movl %ecx, 0x48(%rbx)
xorps %xmm0, %xmm0
testb $0x20, %r15b
je 0x6c51
movsd 0x20(%r14), %xmm0
movlps %xmm0, 0x50(%rbx)
btl $0x8, %r15d
jae 0x6c64
movl 0x40(%r14), %ecx
movl 0x44(%r14), %eax
movl %ecx, 0x60(%rbx)
movl %eax, 0x64(%rbx)
movabsq $0x100000001, %rdx      # imm = 0x100000001
movq %rdx, 0x58(%rbx)
testb $0x40, %r15b
jne 0x6c85
pushq $0x1
popq %rdx
movl %edx, %esi
jmp 0x6c9f
movl 0x28(%r14), %esi
cmpl $0x1, %esi
adcl $0x0, %esi
movl %esi, 0x58(%rbx)
movl 0x2c(%r14), %edx
cmpl $0x1, %edx
adcl $0x0, %edx
movl %edx, 0x5c(%rbx)
testb $0x10, %r15b
jne 0x6caf
addl %ecx, %esi
movl %esi, 0x48(%rbx)
addl %eax, %edx
movl %edx, 0x4c(%rbx)
btl $0x9, %r15d
jb 0x6cbb
pushq $0x1
popq %rax
jmp 0x6cbf
movl 0x48(%r14), %eax
movl %eax, 0x68(%rbx)
movl %eax, 0x6c(%rbx)
movq %r14, %rdi
callq 0x3210
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: draw_outline
static void draw_outline(Client *c) {
#ifndef INFOBANNER_MOVERESIZE
	char buf[27];
	int width_inc = c->width_inc, height_inc = c->height_inc;
#endif  /* ndef INFOBANNER_MOVERESIZE */

	XDrawRectangle(dpy, c->screen->root, c->screen->invert_gc,
		c->x - c->border, c->y - c->border,
		c->width + 2*c->border-1, c->height + 2*c->border-1);

#ifndef INFOBANNER_MOVERESIZE
	snprintf(buf, sizeof(buf), "%dx%d+%d+%d", (c->width-c->base_width)/width_inc,
			(c->height-c->base_height)/height_inc, c->x, c->y);
	XDrawString(dpy, c->screen->root, c->screen->invert_gc,
		c->x + c->width - XTextWidth(font, buf, strlen(buf)) - SPACE,
		c->y + c->height - SPACE,
		buf, strlen(buf));
#endif  /* ndef INFOBANNER_MOVERESIZE */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movl 0x58(%rdi), %r14d
movl 0x5c(%rdi), %ebp
leaq 0x68b1(%rip), %r15      # 0xd7e0
movq (%r15), %rdi
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x18(%rax), %rdx
movl 0x24(%rbx), %ecx
movl 0x34(%rbx), %eax
subl %eax, %ecx
movl 0x28(%rbx), %r8d
subl %eax, %r8d
leal -0x1(,%rax,2), %eax
movl 0x2c(%rbx), %r9d
addl %eax, %r9d
addl 0x30(%rbx), %eax
movl %eax, (%rsp)
callq 0x3120
movl 0x2c(%rbx), %eax
subl 0x60(%rbx), %eax
cltd
idivl %r14d
movl %eax, %ecx
movl 0x30(%rbx), %eax
subl 0x64(%rbx), %eax
cltd
idivl %ebp
movl 0x24(%rbx), %r9d
movl 0x28(%rbx), %edx
movl %edx, (%rsp)
leaq 0x295c(%rip), %rdx      # 0x98e8
leaq 0x10(%rsp), %r14
pushq $0x1b
popq %rsi
movq %r14, %rdi
movl %eax, %r8d
xorl %eax, %eax
callq 0x3240
movq (%r15), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rbx), %rax
movq 0x8(%rax), %r12
movq 0x18(%rax), %r13
movl 0x24(%rbx), %ebp
leaq 0x6829(%rip), %rax      # 0xd7e8
movq (%rax), %r15
addl 0x2c(%rbx), %ebp
movq %r14, %rdi
callq 0x31e0
movq %r15, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x3610
subl %eax, %ebp
addl $-0x3, %ebp
movl 0x28(%rbx), %eax
movl 0x30(%rbx), %ecx
leal (%rax,%rcx), %ebx
addl $-0x3, %ebx
movq %r14, %rdi
callq 0x31e0
movl %eax, (%rsp)
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
movq %r14, %r9
callq 0x34e0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: moveresize
void moveresize(Client *c) {
	client_raise(c);
	XMoveResizeWindow(dpy, c->parent, c->x - c->border, c->y - c->border,
			c->width, c->height);
	XMoveResizeWindow(dpy, c->window, 0, 0, c->width, c->height);
	send_config(c);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x391b
leaq 0x67b0(%rip), %r14      # 0xd7e0
movq (%r14), %rdi
movq 0x8(%rbx), %rsi
movl 0x24(%rbx), %edx
movl 0x34(%rbx), %eax
subl %eax, %edx
movl 0x28(%rbx), %ecx
subl %eax, %ecx
movl 0x2c(%rbx), %r8d
movl 0x30(%rbx), %r9d
callq 0x3250
movq (%r14), %rdi
movq (%rbx), %rsi
movl 0x2c(%rbx), %r8d
movl 0x30(%rbx), %r9d
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x3250
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x39f2
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: predicate_keyrepeatpress
static Bool predicate_keyrepeatpress(Display *dummy, XEvent *ev, XPointer arg) {
	(void) dummy;
	XEvent* release_event = (XEvent*) arg;
	if (ev->type != KeyPress)
		return False;
	if (release_event->xkey.keycode != ev->xkey.keycode)
		return False;
	return release_event->xkey.time == ev->xkey.time;
}

// Assembly:
xorl %eax, %eax
cmpl $0x2, (%rsi)
jne 0x73ee
movl 0x54(%rdx), %ecx
cmpl 0x54(%rsi), %ecx
jne 0x73ee
movq 0x38(%rdx), %rcx
xorl %eax, %eax
cmpq 0x38(%rsi), %rcx
sete %al
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: next
void next(void) {
	struct list *newl = list_find(clients_tab_order, current);
	Client *newc = current;
	do {
		if (newl) {
			newl = newl->next;
			if (!newl && !current)
				return;
		}
		if (!newl)
			newl = clients_tab_order;
		if (!newl)
			return;
		newc = newl->data;
		if (newc == current)
			return;
	}
#ifdef VWM
	/* NOTE: Checking against newc->screen->vdesk implies we can Alt+Tab
	 * across screen boundaries.  Is this what we want? */
	while ((!is_fixed(newc) && (newc->vdesk != newc->screen->vdesk)) || (newc->is_dock && !newc->screen->docks_visible));
#else
	while (0);
#endif
	if (!newc)
		return;
	client_show(newc);
	client_raise(newc);
	select_client(newc);
#ifdef WARP_POINTER
	setmouse(newc->window, newc->width + newc->border - 1,
			newc->height + newc->border - 1);
#endif
	discard_enter_events(newc);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x5cf0(%rip), %rbx      # 0xd798
movq (%rbx), %rdi
leaq 0x5cfe(%rip), %r14      # 0xd7b0
movq (%r14), %rsi
callq 0x58e2
movq (%r14), %rcx
movq (%rbx), %rdx
testq %rax, %rax
je 0x7ad5
movq (%rax), %rax
movq %rax, %rsi
orq %rcx, %rsi
jne 0x7ad7
jmp 0x7b6d
xorl %eax, %eax
testq %rax, %rax
cmoveq %rdx, %rax
testq %rax, %rax
je 0x7b6d
movq 0x8(%rax), %rbx
cmpq %rcx, %rbx
je 0x7b6d
movl 0x74(%rbx), %esi
cmpl $-0x1, %esi
je 0x7b01
movq 0x10(%rbx), %rdi
cmpl 0x40(%rdi), %esi
jne 0x7ac0
cmpl $0x0, 0x78(%rbx)
je 0x7b11
movq 0x10(%rbx), %rsi
cmpl $0x0, 0x68(%rsi)
je 0x7ac0
movq %rbx, %rdi
callq 0x38f8
movq %rbx, %rdi
callq 0x391b
movq %rbx, %rdi
callq 0x3adc
leaq 0x5cb0(%rip), %rax      # 0xd7e0
movq (%rax), %rdi
movq (%rbx), %rdx
movl 0x34(%rbx), %eax
decl %eax
movl 0x2c(%rbx), %ecx
addl %eax, %ecx
addl 0x30(%rbx), %eax
andl $0x0, (%rsp)
movl %eax, 0x10(%rsp)
movl %ecx, 0x8(%rsp)
xorl %esi, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x32c0
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x634a
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: switch_vdesk
void switch_vdesk(ScreenInfo *s, unsigned int v) {
	struct list *iter;
#ifdef DEBUG
	int hidden = 0, raised = 0;
#endif

	if (v == s->vdesk)
		return;
	LOG_ENTER("switch_vdesk(screen=%d, from=%d, to=%d)", s->screen, s->vdesk, v);
	if (current && !is_fixed(current)) {
		select_client(NULL);
	}
	for (iter = clients_tab_order; iter; iter = iter->next) {
		Client *c = iter->data;
		if (c->screen != s)
			continue;
		if (c->vdesk == s->vdesk) {
			client_hide(c);
#ifdef DEBUG
			hidden++;
#endif
		} else if (c->vdesk == v) {
			if (!c->is_dock || s->docks_visible)
				client_show(c);
#ifdef DEBUG
			raised++;
#endif
		}
	}
	/* cache the value of the current vdesk, so that user may toggle back to it */
	s->old_vdesk = s->vdesk;
	s->vdesk = v;
	ewmh_set_net_current_desktop(s);
	LOG_DEBUG("%d hidden, %d raised\n", hidden, raised);
	LOG_LEAVE();
}

// Assembly:
cmpl %esi, 0x40(%rdi)
jne 0x7b7b
retq
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x5c25(%rip), %rax      # 0xd7b0
movq (%rax), %rax
testq %rax, %rax
je 0x7ba0
cmpl $-0x1, 0x74(%rax)
je 0x7ba0
xorl %edi, %edi
callq 0x3adc
leaq 0x5bf1(%rip), %r14      # 0xd798
movq (%r14), %r14
testq %r14, %r14
je 0x7bdf
movq 0x8(%r14), %rdi
cmpq %rbx, 0x10(%rdi)
jne 0x7ba7
movl 0x74(%rdi), %eax
cmpl 0x40(%rbx), %eax
jne 0x7bc8
callq 0x388e
jmp 0x7ba7
cmpl %ebp, %eax
jne 0x7ba7
cmpl $0x0, 0x78(%rdi)
je 0x7bd8
cmpl $0x0, 0x68(%rbx)
je 0x7ba7
callq 0x38f8
jmp 0x7ba7
movl 0x40(%rbx), %eax
movl %eax, 0x58(%rbx)
movl %ebp, 0x40(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x55c1
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: set_docks_visible
void set_docks_visible(ScreenInfo *s, int is_visible) {
	struct list *iter;

	LOG_ENTER("set_docks_visible(screen=%d, is_visible=%d)", s->screen, is_visible);
	s->docks_visible = is_visible;
	for (iter = clients_tab_order; iter; iter = iter->next) {
		Client *c = iter->data;
		if (c->screen != s)
			continue;
		if (c->is_dock) {
			if (is_visible) {
#ifdef VWM
				if (is_fixed(c) || (c->vdesk == s->vdesk)) {
#endif
					client_show(c);
					client_raise(c);
#ifdef VWM
				}
#endif
			} else {
				client_hide(c);
			}
		}
	}
	LOG_LEAVE();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl %esi, 0x68(%rdi)
leaq 0x5b8d(%rip), %r12      # 0xd798
movq (%r12), %r12
testq %r12, %r12
je 0x7c55
movq 0x8(%r12), %r15
cmpq %r14, 0x10(%r15)
jne 0x7c0b
cmpl $0x0, 0x78(%r15)
je 0x7c0b
testl %ebx, %ebx
je 0x7c4b
movl 0x74(%r15), %eax
cmpl $-0x1, %eax
je 0x7c39
cmpl 0x40(%r14), %eax
jne 0x7c0b
movq %r15, %rdi
callq 0x38f8
movq %r15, %rdi
callq 0x391b
jmp 0x7c0b
movq %r15, %rdi
callq 0x388e
jmp 0x7c0b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: find_screen
ScreenInfo *find_screen(Window root) {
	int i;
	for (i = 0; i < num_screens; i++) {
		if (screens[i].root == root)
			return &screens[i];
	}
	return NULL;
}

// Assembly:
leaq 0x5b88(%rip), %rax      # 0xd7f0
movslq (%rax), %rcx
leaq 0x5b86(%rip), %rax      # 0xd7f8
movq (%rax), %rdx
addq $-0x70, %rdx
pushq $-0x1
popq %rsi
incq %rsi
cmpq %rcx, %rsi
jge 0x7c92
leaq 0x70(%rdx), %rax
cmpq %rdi, 0x78(%rdx)
movq %rax, %rdx
jne 0x7c7c
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: grab_keys_for_screen
void grab_keys_for_screen(ScreenInfo *s) {
	int i;
	/* Release any previous grabs */
	XUngrabKey(dpy, AnyKey, AnyModifier, s->root);
	/* Grab key combinations we're interested in */
	for (i = 0; i < NUM_GRABS; i++) {
		grab_keysym(s->root, grabmask1, keys_to_grab[i]);
	}
	for (i = 0; i < NUM_ALT_GRABS; i++) {
		grab_keysym(s->root, grabmask1 | altmask, alt_keys_to_grab[i]);
	}
	grab_keysym(s->root, grabmask2, KEY_NEXT);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x5ae1(%rip), %rax      # 0xd7e0
movq (%rax), %rdi
movq 0x8(%rbx), %rcx
xorl %r15d, %r15d
xorl %esi, %esi
movl $0x8000, %edx           # imm = 0x8000
callq 0x3600
leaq 0x56b4(%rip), %r14      # 0xd3d0
leaq 0x1abd(%rip), %r12      # 0x97e0
cmpq $0xe0, %r15
je 0x7d42
movq 0x8(%rbx), %rdi
movl (%r14), %esi
movq (%r15,%r12), %rdx
callq 0x7d8c
addq $0x8, %r15
jmp 0x7d23
xorl %r15d, %r15d
leaq 0x568c(%rip), %r12      # 0xd3d8
leaq 0x1b6d(%rip), %r13      # 0x98c0
movq 0x8(%rbx), %rdi
cmpq $0x28, %r15
je 0x7d73
movl (%r12), %esi
orl (%r14), %esi
movq (%r15,%r13), %rdx
callq 0x7d8c
addq $0x8, %r15
jmp 0x7d53
leaq 0x565a(%rip), %rax      # 0xd3d4
movl (%rax), %esi
movl $0xff09, %edx           # imm = 0xFF09
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x7d8c
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: grab_keysym
static void grab_keysym(Window w, unsigned int mask, KeySym keysym) {
	KeyCode keycode = XKeysymToKeycode(dpy, keysym);
	XGrabKey(dpy, keycode, mask, w, True,
			GrabModeAsync, GrabModeAsync);
	XGrabKey(dpy, keycode, mask|LockMask, w, True,
			GrabModeAsync, GrabModeAsync);
	if (numlockmask) {
		XGrabKey(dpy, keycode, mask|numlockmask, w, True,
				GrabModeAsync, GrabModeAsync);
		XGrabKey(dpy, keycode, mask|numlockmask|LockMask, w, True,
				GrabModeAsync, GrabModeAsync);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x5a3d(%rip), %r12      # 0xd7e0
movq (%r12), %rdi
movq %rdx, %rsi
callq 0x33a0
movq (%r12), %rdi
movzbl %al, %r15d
pushq $0x1
popq %r14
movl %r14d, (%rsp)
movl %r15d, %esi
movl %ebp, %edx
movq %rbx, %rcx
movl %r14d, %r8d
movl %r14d, %r9d
callq 0x33d0
movq (%r12), %rdi
movl %ebp, %edx
orl $0x2, %edx
movl %r14d, (%rsp)
movl %r15d, %esi
movq %rbx, %rcx
movl %r14d, %r8d
movl %r14d, %r9d
callq 0x33d0
leaq 0x5989(%rip), %r13      # 0xd780
movl (%r13), %edx
testl %edx, %edx
je 0x7e3c
movq (%r12), %rdi
orl %ebp, %edx
movl %r14d, (%rsp)
movl %r15d, %esi
movq %rbx, %rcx
movl %r14d, %r8d
movl %r14d, %r9d
callq 0x33d0
movq (%r12), %rdi
orl (%r13), %ebp
orl $0x2, %ebp
movl %r14d, (%rsp)
movl %r15d, %esi
movl %ebp, %edx
movq %rbx, %rcx
movl %r14d, %r8d
movl %r14d, %r9d
callq 0x33d0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/xconfig.c
// Function: xconfig_parse_file
enum xconfig_result xconfig_parse_file(struct xconfig_option *options,
		const char *filename) {
	struct xconfig_option *option;
	char buf[256];
	char *line, *opt, *arg;
	FILE *cfg;
	cfg = fopen(filename, "r");
	if (cfg == NULL) return XCONFIG_FILE_ERROR;
	while ((line = fgets(buf, sizeof(buf), cfg))) {
		while (isspace((int)*line))
			line++;
		if (*line == 0 || *line == '#')
			continue;
		opt = strtok(line, "\t\n\v\f\r =");
		if (opt == NULL) continue;
		option = find_option(options, opt);
		if (option == NULL) {
			fclose(cfg);
			return XCONFIG_BAD_OPTION;
		}
		if (option->type == XCONFIG_STR_LIST) {
			/* special case: spaces here mean something */
			arg = strtok(NULL, "\n\v\f\r");
			while (isspace(*arg) || *arg == '=') {
				arg++;
			}
		} else {
			arg = strtok(NULL, "\t\n\v\f\r =");
		}
		set_option(option, arg);
	}
	fclose(cfg);
	return XCONFIG_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rax
movq %rdi, %r14
leaq 0x1aa2(%rip), %rsi      # 0x990c
movq %rax, %rdi
callq 0x35c0
testq %rax, %rax
je 0x7f4d
movq %rax, %rbx
movq %rsp, %r12
leaq 0x1a86(%rip), %r13      # 0x990e
movq %r12, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdx
callq 0x32d0
testq %rax, %rax
je 0x7f40
movq %rax, %r15
callq 0x3740
movq %rax, %rbp
movq (%rax), %rax
decq %r15
movsbq 0x1(%r15), %rcx
incq %r15
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x7eb2
movzbl %cl, %eax
testl %eax, %eax
je 0x7e88
cmpl $0x23, %eax
je 0x7e88
movq %r15, %rdi
movq %r13, %rsi
callq 0x35d0
testq %rax, %rax
je 0x7e88
movq %r14, %rdi
movq %rax, %rsi
callq 0x7f6e
testq %rax, %rax
je 0x7f66
movq %rax, %r15
cmpl $0x3, (%rax)
jne 0x7f26
xorl %edi, %edi
leaq 0x1a18(%rip), %rsi      # 0x9916
callq 0x35d0
movq (%rbp), %rcx
decq %rax
movsbq 0x1(%rax), %rdx
incq %rax
cmpq $0x3d, %rdx
je 0x7f0a
movzwl (%rcx,%rdx,2), %edx
andl $0x2000, %edx           # imm = 0x2000
jne 0x7f0a
jmp 0x7f30
xorl %edi, %edi
movq %r13, %rsi
callq 0x35d0
movq %r15, %rdi
movq %rax, %rsi
callq 0x7fa5
jmp 0x7e88
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x31a0
jmp 0x7f51
pushq $0x3
popq %r14
movl %r14d, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rax
movl %eax, %r14d
jmp 0x7f43
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/xconfig.c
// Function: set_option
static void set_option(struct xconfig_option *option, const char *arg) {
	switch (option->type) {
		case XCONFIG_BOOL:
			*(int *)option->dest = 1;
			break;
		case XCONFIG_INT:
			*(int *)option->dest = strtol(arg, NULL, 0);
			break;
		case XCONFIG_STRING:
			*(char **)option->dest = strdup(arg);
			break;
		case XCONFIG_STR_LIST:
			*(char ***)option->dest = split_string(arg);
			break;
		case XCONFIG_CALL_0:
			((void (*)(void))option->dest)();
			break;
		case XCONFIG_CALL_1:
			((void (*)(const char *))option->dest)(arg);
			break;
		default:
			break;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl (%rdi), %eax
cmpq $0x5, %rax
ja 0x81ae
movq %rsi, %rbx
movq %rdi, (%rsp)
leaq 0x1927(%rip), %rcx      # 0x98f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsp), %rax
movq 0x10(%rax), %rax
movl $0x1, (%rax)
jmp 0x81ae
movq (%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x10(%rax)
movq %rbx, %rdi
callq 0x36c0
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movq %rax, (%rcx)
jmp 0x81ae
movq %rbx, %rdi
callq 0x31e0
leaq 0x1(%rax), %rdi
callq 0x3430
testq %rax, %rax
je 0x81a1
movq $0x0, 0x30(%rsp)
pushq $0x2
popq %r13
pushq $0x1
popq %rbp
xorl %edx, %edx
movq $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq %rax, 0x28(%rsp)
movq %rax, %r14
movq %rdx, 0x18(%rsp)
movzbl (%rbx), %r15d
cmpl $0x5c, %r15d
je 0x806e
testl %r15d, %r15d
jne 0x8078
jmp 0x809d
movb 0x1(%rbx), %al
movq %r13, %rcx
testb %al, %al
jne 0x8092
movsbq %r15b, %r12
callq 0x3740
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
movq %rbp, %rcx
movl %r15d, %eax
jne 0x809d
addq %rcx, %rbx
movb %al, (%r14)
incq %r14
jmp 0x805d
movb $0x0, (%r14)
movq 0x10(%rsp), %rax
cmpb $0x0, (%rax)
je 0x80c5
movq 0x18(%rsp), %rax
leal 0x1(%rax), %r15d
movq 0x30(%rsp), %rcx
cmpl %ecx, %r15d
jge 0x80cf
movq 0x8(%rsp), %rcx
jmp 0x810e
movq 0x18(%rsp), %rax
movl %eax, %r15d
jmp 0x8126
movl %r15d, 0x24(%rsp)
movslq %ecx, %rax
leaq 0x20(,%rax,8), %rsi
movq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rcx, %r15
callq 0x3510
testq %rax, %rax
je 0x818f
addl $0x4, %r15d
movq %r15, 0x30(%rsp)
movq %rax, %rcx
movq 0x18(%rsp), %rax
movl 0x24(%rsp), %r15d
cltq
movq %rcx, 0x8(%rsp)
movq 0x10(%rsp), %rdx
movq %rdx, (%rcx,%rax,8)
incq %r14
movq %r14, 0x10(%rsp)
callq 0x3740
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x8131
movl %r15d, %edx
testb %cl, %cl
jne 0x8058
testl %r15d, %r15d
je 0x8197
movslq %r15d, %rax
movq 0x8(%rsp), %rcx
andq $0x0, (%rcx,%rax,8)
jmp 0x81a3
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x3360
movq (%rsp), %rcx
movq 0x10(%rcx), %rcx
movl %eax, (%rcx)
jmp 0x81ae
movq %rbx, %rdi
movq (%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *0x10(%rax)
movq %r12, %rdi
callq 0x3090
movq 0x28(%rsp), %rdi
callq 0x3090
xorl %ecx, %ecx
movq (%rsp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/xconfig.c
// Function: xconfig_parse_cli
enum xconfig_result xconfig_parse_cli(struct xconfig_option *options,
		int argc, char **argv, int *argn) {
	struct xconfig_option *option;
	int _argn;
	char *optstr;
	_argn = argn ? *argn : 1;

	while (_argn < argc) {
		if (argv[_argn][0] != '-') {
			break;
		}
		if (0 == strcmp("--", argv[_argn])) {
			_argn++;
			break;
		}
		optstr = argv[_argn]+1;
		if (*optstr == '-') optstr++;
		option = find_option(options, optstr);
		if (option == NULL) {
			if (argn) *argn = _argn;
			return XCONFIG_BAD_OPTION;
		}
		if (option->type == XCONFIG_BOOL
				|| option->type == XCONFIG_CALL_0) {
			set_option(option, NULL);
			_argn++;
			continue;
		}
		if ((_argn + 1) >= argc) {
			if (argn) *argn = _argn;
			return XCONFIG_MISSING_ARG;
		}
		set_option(option, argv[_argn+1]);
		_argn += 2;
	}
	if (argn) *argn = _argn;
	return XCONFIG_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
pushq $0x1
popq %rbx
movl %ebx, %r12d
testq %rcx, %rcx
je 0x81de
movl (%rcx), %r12d
movq %rcx, (%rsp)
cmpl %ebp, %r12d
jge 0x8255
movslq %r12d, %rax
movq (%r14,%rax,8), %rsi
cmpb $0x2d, (%rsi)
jne 0x8255
movzbl 0x1(%rsi), %eax
subl $0x2d, %eax
jne 0x8200
movzbl 0x2(%rsi), %eax
negl %eax
testl %eax, %eax
je 0x8252
cmpb $0x2d, 0x1(%rsi)
je 0x8211
incq %rsi
jmp 0x8215
addq $0x2, %rsi
movq %r15, %rdi
callq 0x7f6e
testq %rax, %rax
je 0x8259
testl $0xfffffffb, (%rax)     # imm = 0xFFFFFFFB
jne 0x8231
xorl %esi, %esi
movl %ebx, %r13d
jmp 0x8245
leal 0x1(%r12), %ecx
cmpl %ebp, %ecx
jge 0x825d
movslq %ecx, %rcx
movq (%r14,%rcx,8), %rsi
pushq $0x2
popq %r13
movq %rax, %rdi
callq 0x7fa5
addl %r13d, %r12d
jmp 0x81e2
incl %r12d
xorl %eax, %eax
jmp 0x8260
pushq $0x1
jmp 0x825f
pushq $0x2
popq %rax
movq (%rsp), %rcx
testq %rcx, %rcx
je 0x826c
movl %r12d, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/giometti[P]mastering_UNIX_programming/chapter_02/async.c
// Function: main
int main(void)
{
	int fd, n;
	char buf[MAX_SIZE];
	int ret;

	ret = open("data.bin", O_WRONLY | O_CREAT,
			S_IWUSR);
	if (ret < 0) {
		perror("open");
		return -1;
	}
	fd = ret;

	for (n = 0; n < 128; n++) {
		ret = write(fd, buf, n);
		if (ret < 0) {
			perror("write");
			return -1;
		}
	}

	close(fd);

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1000, %rsp           # imm = 0x1000
leaq 0xe65(%rip), %rdi       # 0x2004
pushq $0x41
popq %rsi
movl $0x80, %edx
xorl %eax, %eax
callq 0x1070
testl %eax, %eax
js 0x11f6
movl %eax, %ebx
xorl %r14d, %r14d
movq %rsp, %r15
cmpq $0x80, %r14
je 0x11e0
movl %ebx, %edi
movq %r15, %rsi
movq %r14, %rdx
callq 0x1040
incq %r14
testl %eax, %eax
jns 0x11ba
leaq 0xe34(%rip), %rdi       # 0x2012
jmp 0x11fd
movl %ebx, %edi
callq 0x1050
xorl %eax, %eax
addq $0x1000, %rsp           # imm = 0x1000
popq %rbx
popq %r14
popq %r15
retq
leaq 0xe10(%rip), %rdi       # 0x200d
callq 0x1080
pushq $-0x1
popq %rax
jmp 0x11e9
nop
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_json.c
// Function: cat
static void cat(FILE *fp) {
  char errbuf[200];

  toml_table_t *tab = toml_parse_file(fp, errbuf, sizeof(errbuf));
  if (!tab) {
    fprintf(stderr, "ERROR: %s\n", errbuf);
    exit(1);
  }

  print_table(tab);
  printf("\n");

  toml_free(tab);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movq %rsp, %rsi
movl $0xc8, %edx
callq 0x2cac
testq %rax, %rax
je 0x13eb
movq %rax, %rbx
movq %rax, %rdi
callq 0x140e
pushq $0xa
popq %rdi
callq 0x1040
movq %rbx, %rdi
callq 0x2ca7
addq $0xd0, %rsp
popq %rbx
retq
movq 0x6c06(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
leaq 0x3c5b(%rip), %rsi      # 0x5057
movq %rsp, %rdx
xorl %eax, %eax
callq 0x1160
pushq $0x1
popq %rdi
callq 0x11c0
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_json.c
// Function: print_table
static void print_table(toml_table_t *curtab) {
  int i;
  const char *key;
  const char *raw;
  toml_array_t *arr;
  toml_table_t *tab;

  printf("{");
  for (i = 0; 0 != (key = toml_key_in(curtab, i)); i++) {

    printf("%s\"", i > 0 ? "," : "");
    print_escape_string(key);
    printf("\":");

    if (0 != (raw = toml_raw_in(curtab, key))) {
      print_raw(raw);
    } else if (0 != (arr = toml_array_in(curtab, key))) {
      print_array(arr);
    } else if (0 != (tab = toml_table_in(curtab, key))) {
      print_table(tab);
    } else {
      abort();
    }
  }
  printf("}");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x7b
popq %rdi
callq 0x1040
leaq 0x3c3b(%rip), %r13      # 0x5066
leaq 0x3c30(%rip), %r14      # 0x5062
leaq 0x3c2f(%rip), %r15      # 0x5068
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x2f2a
testq %rax, %rax
je 0x14d0
movq %rax, %r12
testl %ebp, %ebp
movq %r13, %rsi
leaq 0x430d(%rip), %rax      # 0x576a
cmoveq %rax, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
movq %r12, %rdi
callq 0x14eb
movq %r15, %rdi
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x300a
testq %rax, %rax
je 0x1497
movq %rax, %rdi
callq 0x158a
jmp 0x14c9
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3061
testq %rax, %rax
je 0x14b1
movq %rax, %rdi
callq 0x17c2
jmp 0x14c9
movq %rbx, %rdi
movq %r12, %rsi
callq 0x30af
testq %rax, %rax
je 0x14e6
movq %rax, %rdi
callq 0x140e
incl %ebp
jmp 0x143b
pushq $0x7d
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1040
callq 0x1050
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_json.c
// Function: print_escape_string
static void print_escape_string(const char *s) {
  for (; *s; s++) {
    int ch = *s;
    switch (ch) {
    case '\b':
      printf("\\b");
      break;
    case '\t':
      printf("\\t");
      break;
    case '\n':
      printf("\\n");
      break;
    case '\f':
      printf("\\f");
      break;
    case '\r':
      printf("\\r");
      break;
    case '"':
      printf("\\\"");
      break;
    case '\\':
      printf("\\\\");
      break;
    default:
      printf("%c", ch);
      break;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3b04(%rip), %r12      # 0x5004
leaq 0x3b67(%rip), %r13      # 0x506e
leaq 0x3b63(%rip), %rbp      # 0x5071
leaq 0x3b5f(%rip), %r14      # 0x5074
leaq 0x3b5b(%rip), %r15      # 0x5077
jmp 0x1569
leaq 0x3b46(%rip), %rdi      # 0x506b
jmp 0x155f
cmpl $0x22, %eax
je 0x1558
cmpl $0x5c, %eax
jne 0x153a
leaq 0x3b45(%rip), %rdi      # 0x507d
jmp 0x155f
movsbl %al, %edi
callq 0x1040
jmp 0x1566
movq %r14, %rdi
jmp 0x155f
movq %r15, %rdi
jmp 0x155f
movq %rbp, %rdi
jmp 0x155f
movq %r13, %rdi
jmp 0x155f
leaq 0x3b1b(%rip), %rdi      # 0x507a
xorl %eax, %eax
callq 0x10d0
incq %rbx
movzbl (%rbx), %eax
cmpq $0xd, %rax
ja 0x1527
movslq (%r12,%rax,4), %rcx
addq %r12, %rcx
jmpq *%rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cktan[P]tomlc99/toml_json.c
// Function: print_array
static void print_array(toml_array_t *curarr) {
  if (toml_array_kind(curarr) == 't') {
    print_table_array(curarr);
    return;
  }

  printf("[");

  const char *raw;
  toml_array_t *arr;
  toml_table_t *tab;

  const int n = toml_array_nelem(curarr);
  for (int i = 0; i < n; i++) {
    printf("%s", i > 0 ? "," : "");

    if (0 != (arr = toml_array_at(curarr, i))) {
      print_array(arr);
      continue;
    }

    if (0 != (tab = toml_table_at(curarr, i))) {
      print_table(tab);
      continue;
    }

    raw = toml_raw_at(curarr, i);
    if (raw) {
      print_raw(raw);
      continue;
    }

    fflush(stdout);
    fprintf(stderr, "ERROR: unable to decode value in array\n");
    exit(1);
  }

  printf("]");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3119
movl %eax, %ebp
pushq $0x5b
popq %rdi
callq 0x1040
cmpb $0x74, %bpl
jne 0x1831
leaq 0x3f7e(%rip), %r12      # 0x576a
leaq 0x3873(%rip), %r13      # 0x5066
leaq 0x3b67(%rip), %r14      # 0x5361
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3174
testq %rax, %rax
je 0x18c4
movq %rax, %r15
testl %ebp, %ebp
movq %r13, %rsi
cmoveq %r12, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
movq %r15, %rdi
callq 0x140e
incl %ebp
jmp 0x17fc
movq %rbx, %rdi
callq 0x3130
movl %eax, %ebp
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
leaq 0x3f21(%rip), %r12      # 0x576a
leaq 0x3816(%rip), %r13      # 0x5066
leaq 0x3b0a(%rip), %r14      # 0x5361
xorl %r15d, %r15d
cmpl %r15d, %ebp
je 0x18c4
testl %r15d, %r15d
movq %r13, %rsi
cmoveq %r12, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x10d0
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3158
testq %rax, %rax
je 0x188d
movq %rax, %rdi
callq 0x17c2
jmp 0x18bf
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3174
testq %rax, %rax
je 0x18a7
movq %rax, %rdi
callq 0x140e
jmp 0x18bf
movq %rbx, %rdi
movl %r15d, %esi
callq 0x30fd
testq %rax, %rax
je 0x18da
movq %rax, %rdi
callq 0x158a
incl %r15d
jmp 0x185a
pushq $0x5d
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1040
movq 0x66ef(%rip), %rax      # 0x7fd0
movq (%rax), %rdi
callq 0x1190
movq 0x6708(%rip), %rax      # 0x7ff8
movq (%rax), %rcx
leaq 0x38ce(%rip), %rdi      # 0x51c8
pushq $0x27
popq %rsi
pushq $0x1
popq %rdx
callq 0x11d0
pushq $0x1
popq %rdi
callq 0x11c0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/mvermeulen[P]wspy/topdown.c
// Function: parse_intel_event
unsigned long parse_intel_event(char *description){
  char *desc = strdup(description);
  char *name,*val;
  unsigned long value;
  union intel_raw_cpu_format result;
  result.config = 0;
  
  for (name = strtok(desc,",\n");name;name = strtok(NULL,",\n")){
    if (val = strchr(name,'=')){ // expected format "desc=value"
      *val = 0; // null terminator for name
      val++;
      value = strtol(val,NULL,16);
      
      if (!strcmp(name,"event")){
	result.event = value;
      } else if (!strcmp(name,"umask")){
	result.umask = value;
      } else if (!strcmp(name,"cmask")){
	result.cmask = value;	
      } else if (!strcmp(name,"period")){
	// appears in some Intel perf list output, but not sure of purpose, ignore...
      } else {
	fatal("unimplemented %s in parse_intel_event\n",name);
      }
    }
  }
  debug2("parse_event(\"%s\") = %lx\n",description,result.config);
  
  return result.config;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
callq 0x32f0
movq %rax, %rdi
leaq 0x77d6(%rip), %r14      # 0xb538
pushq $0x3d
popq %rbp
pushq $0x10
popq %r15
leaq 0x77cb(%rip), %r12      # 0xb53b
movl $0x0, 0xc(%rsp)
movq %r14, %rsi
callq 0x3280
testq %rax, %rax
je 0x3e69
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
callq 0x30d0
movl $0x0, %edi
testq %rax, %rax
je 0x3d78
movb $0x0, (%rax)
incq %rax
movq %rax, %rdi
xorl %esi, %esi
movl %r15d, %edx
callq 0x31f0
movq %rax, %r13
movq %rbx, %rdi
movq %r12, %rsi
callq 0x31a0
testl %eax, %eax
je 0x3e1f
movq %rbx, %rdi
leaq 0x7772(%rip), %rsi      # 0xb541
callq 0x31a0
testl %eax, %eax
je 0x3e2f
movq %rbx, %rdi
leaq 0x7765(%rip), %rsi      # 0xb547
callq 0x31a0
testl %eax, %eax
je 0x3e4e
movq %rbx, %rdi
leaq 0x7758(%rip), %rsi      # 0xb54d
callq 0x31a0
movl $0x0, %edi
testl %eax, %eax
je 0x3d78
leaq 0x7746(%rip), %rdi      # 0xb554
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8f2f
xorl %edi, %edi
jmp 0x3d78
movzbl %r13b, %eax
movl 0xc(%rsp), %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
jmp 0x3e41
shll $0x8, %r13d
movzwl %r13w, %eax
movl 0xc(%rsp), %ecx
andl $0xffff00ff, %ecx       # imm = 0xFFFF00FF
orl %eax, %ecx
movl %ecx, 0xc(%rsp)
xorl %edi, %edi
jmp 0x3d78
shll $0x18, %r13d
movl 0xc(%rsp), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
orl %r13d, %eax
movl %eax, 0xc(%rsp)
xorl %edi, %edi
jmp 0x3d78
movl 0xc(%rsp), %ebx
leaq 0x7707(%rip), %rdi      # 0xb57b
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x94bd
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mvermeulen[P]wspy/topdown.c
// Function: parse_amd_event
unsigned long parse_amd_event(char *description){
  char *desc = strdup(description);
  char *name,*val;
  unsigned long value;
  union amd_raw_cpu_format result;
  struct stat statbuf;
  result.config = 0;
  
  for (name = strtok(desc,",\n");name;name = strtok(NULL,",\n")){
    if (val = strchr(name,'=')){ // expected format "desc=value"
      *val = 0; // null terminator for name
      val++;
      value = strtol(val,NULL,16);
      
      if (!strcmp(name,"event")){
	result.event = value;
	result.event2 = value>>8;
      } else if (!strcmp(name,"umask")){
	result.umask = value;
      } else if (!strcmp(name,"cmask")){
	result.cmask = value;
      } else if (!strcmp(name,"requires")){
	// the value encodes the name of the type field...
	debug("checking for %s\n",val);
	if (stat(val,&statbuf) ==-1){
	  fatal("%s not found, is the perf module for this device loaded in the kernel?\n");
	}
      } else {
	fatal("unimplemented %s in parse_amd_event\n",name);
      }
    }
  }
  debug2("parse_event(\"%s\") = %lx\n",description,result.config);
  
  return result.config;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, (%rsp)
callq 0x32f0
movq %rax, %rdi
leaq 0x767f(%rip), %r14      # 0xb538
pushq $0x3d
popq %rbp
xorl %r12d, %r12d
movq %r14, %rsi
callq 0x3280
testq %rax, %rax
je 0x4006
movq %rax, %rbx
movq %rax, %rdi
movl %ebp, %esi
callq 0x30d0
movl $0x0, %edi
testq %rax, %rax
je 0x3ebf
movq %rax, %r15
movb $0x0, (%rax)
incq %r15
movq %r15, %rdi
xorl %esi, %esi
pushq $0x10
popq %rdx
callq 0x31f0
movq %rax, %r13
movq %rbx, %rdi
leaq 0x7631(%rip), %rsi      # 0xb53b
callq 0x31a0
testl %eax, %eax
je 0x3fb1
movq %rbx, %rdi
leaq 0x7620(%rip), %rsi      # 0xb541
callq 0x31a0
testl %eax, %eax
je 0x3fd2
movq %rbx, %rdi
leaq 0x760f(%rip), %rsi      # 0xb547
callq 0x31a0
testl %eax, %eax
je 0x3feb
movq %rbx, %rdi
leaq 0x7645(%rip), %rsi      # 0xb594
callq 0x31a0
testl %eax, %eax
je 0x3f70
leaq 0x7697(%rip), %rdi      # 0xb5f6
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8f2f
xorl %edi, %edi
jmp 0x3ebf
leaq 0x7626(%rip), %rdi      # 0xb59d
movq %r15, %rsi
xorl %eax, %eax
callq 0x93c0
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x31e0
movl $0x0, %edi
cmpl $-0x1, %eax
jne 0x3ebf
leaq 0x760b(%rip), %rdi      # 0xb5ae
xorl %eax, %eax
callq 0x8f2f
xorl %edi, %edi
jmp 0x3ebf
movzbl %r13b, %eax
movabsq $-0xf00000100, %rcx     # imm = 0xFFFFFFF0FFFFFF00
andq %rcx, %r12
orq %rax, %r12
andl $0xf00, %r13d           # imm = 0xF00
shlq $0x18, %r13
jmp 0x3ffc
shll $0x8, %r13d
movzwl %r13w, %eax
andq $-0xff01, %r12          # imm = 0xFFFF00FF
orq %rax, %r12
xorl %edi, %edi
jmp 0x3ebf
shll $0x18, %r13d
movabsq $-0xff000001, %rax      # imm = 0xFFFFFFFF00FFFFFF
andq %rax, %r12
orq %r13, %r12
xorl %edi, %edi
jmp 0x3ebf
leaq 0x756e(%rip), %rdi      # 0xb57b
movq (%rsp), %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x94bd
movq %r12, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mvermeulen[P]wspy/topdown.c
// Function: setup_raw_events
int setup_raw_events(void){
  int i;
  struct raw_event *events;
  unsigned int num_events;
  switch(cpu_info->vendor){
  case VENDOR_AMD:
    events = amd_raw_events;
    num_events = sizeof(amd_raw_events)/sizeof(amd_raw_events[0]);
    for (i=0;i<num_events;i++){
      if (events[i].use & counter_mask)
	events[i].raw.config = parse_amd_event(events[i].description);
    }    
    break;
  case VENDOR_INTEL:
    events = intel_raw_events;
    num_events = sizeof(intel_raw_events)/sizeof(intel_raw_events[0]);
    for (i=0;i<num_events;i++){
      if (events[i].use & counter_mask)
	events[i].raw.config = parse_intel_event(events[i].description);
    }        
    break;
  default:
    warning("Unknown CPU, no events parsed\n");
    break;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xe134(%rip), %rax      # 0x12170
movq (%rax), %rax
movl (%rax), %eax
cmpl $0x1, %eax
je 0x4083
cmpl $0x2, %eax
jne 0x40c1
pushq $0x18
popq %rbx
leaq 0xc74b(%rip), %r14      # 0x107a0
leaq 0xc178(%rip), %r15      # 0x101d4
cmpq $0x2d8, %rbx            # imm = 0x2D8
je 0x40bb
movl (%r15), %eax
testl %eax, -0x4(%rbx,%r14)
je 0x407d
movq -0x10(%rbx,%r14), %rdi
callq 0x3d40
movq %rax, (%rbx,%r14)
addq $0x20, %rbx
jmp 0x405c
pushq $0x18
popq %rbx
leaq 0xc9d3(%rip), %r14      # 0x10a60
leaq 0xc140(%rip), %r15      # 0x101d4
cmpq $0x558, %rbx            # imm = 0x558
je 0x40bb
movl (%r15), %eax
testl %eax, -0x4(%rbx,%r14)
je 0x40b5
movq -0x10(%rbx,%r14), %rdi
callq 0x3e95
movq %rax, (%rbx,%r14)
addq $0x20, %rbx
jmp 0x4094
popq %rbx
popq %r14
popq %r15
retq
leaq 0x7553(%rip), %rdi      # 0xb61b
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x9121
// File: /workspace/github_c_makefile_star2_O2/mvermeulen[P]wspy/topdown.c
// Function: launch_child
int launch_child(int argc,char *const argv[],char *const envp[]){
  pid_t child;
  int len;
  char *p,*path;
  char pathbuf[1024];

  if (pipe(child_pipe) == -1) fatal("pipe creation failed\n");
  switch(child = fork()){
  case 0: // child
    if (treeflag){
      debug("ptrace(PTRACE_TRACEME,0)\n");
      ptrace(PTRACE_TRACEME,0,NULL,NULL);
    }
    close(child_pipe[1]); // close writing end
    read(child_pipe[0],pathbuf,sizeof(pathbuf)); // wait until the parent has written
    execve(argv[0],argv,envp);
    // if argv[0] fails, look in path
    path = strdup(getenv("PATH"));
    len = strlen(argv[0]);
    p = strtok(path,":\n");
    if (p){
      do {
	strncpy(pathbuf,p,sizeof(pathbuf)-len-2);
	strcat(pathbuf,"/");
	strcat(pathbuf,argv[0]);
	execve(pathbuf,argv,envp);
	p = strtok(NULL,":\n");
      } while (p);
      // exec failed
      return 1;
    }
    break;
  case -1:
    fatal("fork failed\n");
    return 1;
  default:
    // parent
    close(child_pipe[0]); // close reading end
    child_pid = child;
    is_still_running = 1;
    break;
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdx, %rbx
movq %rsi, %r14
leaq 0xd04a(%rip), %rdi      # 0x1113c
callq 0x3140
cmpl $-0x1, %eax
jne 0x410a
leaq 0x7537(%rip), %rdi      # 0xb63a
xorl %eax, %eax
callq 0x8f2f
callq 0x3340
cmpl $-0x1, %eax
je 0x4210
movl %eax, %ebp
testl %eax, %eax
jne 0x4223
leaq 0xcfc7(%rip), %rax      # 0x110f0
cmpl $0x0, (%rax)
je 0x414b
leaq 0x751b(%rip), %rdi      # 0xb650
xorl %eax, %eax
callq 0x93c0
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x3230
movl 0xcfef(%rip), %edi      # 0x11140
callq 0x3130
movl 0xcfe0(%rip), %edi      # 0x1113c
movq %rsp, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x3160
movq (%r14), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3180
leaq 0x74ec(%rip), %rdi      # 0xb66a
callq 0x3030
movq %rax, %rdi
callq 0x32f0
movq %rax, %r12
movq (%r14), %rdi
callq 0x30b0
movq %rax, %r15
leaq 0x74cf(%rip), %rsi      # 0xb66f
movq %r12, %rdi
callq 0x3280
testq %rax, %rax
je 0x423e
movslq %r15d, %rcx
movl $0x3fe, %r15d           # imm = 0x3FE
subq %rcx, %r15
movq %rsp, %r12
leaq 0x74a8(%rip), %r13      # 0xb66f
pushq $0x1
popq %rbp
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x3050
movq %r12, %rdi
callq 0x30b0
movw $0x2f, (%rsp,%rax)
movq (%r14), %rsi
movq %r12, %rdi
callq 0x32b0
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3180
xorl %edi, %edi
movq %r13, %rsi
callq 0x3280
testq %rax, %rax
jne 0x41ca
jmp 0x4240
leaq 0x745b(%rip), %rdi      # 0xb672
xorl %eax, %eax
callq 0x8f2f
pushq $0x1
popq %rbp
jmp 0x4240
movl 0xcf13(%rip), %edi      # 0x1113c
callq 0x3130
movl %ebp, 0xcf04(%rip)      # 0x11138
movl $0x1, 0xcf06(%rip)      # 0x11144
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq