LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/screen.c
// Function: screen_probe_monitors
void screen_probe_monitors(struct screen *s) {
#if defined(RANDR) && (RANDR_MAJOR == 1) && (RANDR_MINOR >= 5)
        if (display.have_randr && !option.wholescreen) {
		int nmonitors;
		XRRMonitorInfo *monitors;
		// Populate list of active monitors
		LOG_XENTER("XRRGetMonitors(screen=%d)", s->screen);
		monitors = XRRGetMonitors(display.dpy, s->root, True, &nmonitors);
		if (monitors) {
			struct monitor *new_monitors = s->monitors;
			if (nmonitors != s->nmonitors) {
				// allocating in multiple of 4 should stop us
				// having to reallocate at all in the most
				// common uses
				int n = (nmonitors | 3) + 1;
				new_monitors = realloc(s->monitors, n * sizeof(struct monitor));
			}
			if (new_monitors) {
				s->monitors = new_monitors;
				for (int i = 0; i < nmonitors; i++) {
					LOG_XDEBUG("monitor %d: %dx%d+%d+%d\n", i, monitors[i].width, monitors[i].height, monitors[i].x, monitors[i].y);
					s->monitors[i].x = monitors[i].x;
					s->monitors[i].y = monitors[i].y;
					s->monitors[i].width = monitors[i].width;
					s->monitors[i].height = monitors[i].height;
					s->monitors[i].area = monitors[i].width * monitors[i].height;
				}
				s->nmonitors = nmonitors;
			}
			LOG_XLEAVE();
			XRRFreeMonitors(monitors);
			return;
		}
		LOG_XLEAVE();
	}
#endif

	s->nmonitors = 1;
	if (!s->monitors) {
		s->monitors = xmalloc(sizeof(struct monitor));
	}
	s->monitors[0].x = 0;
	s->monitors[0].y = 0;
	s->monitors[0].width = DisplayWidth(display.dpy, s->screen);
	s->monitors[0].height = DisplayHeight(display.dpy, s->screen);
	s->monitors[0].area = s->monitors[0].width * s->monitors[0].height;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x74b3(%rip), %r15      # 0x10738
cmpl $0x0, 0x180(%r15)
je 0x9348
leaq 0x7666(%rip), %rax      # 0x10900
cmpl $0x0, 0x34(%rax)
jne 0x9348
movq (%r15), %rdi
movq 0x10(%rbx), %rsi
leaq 0xc(%rsp), %rcx
movl $0x1, %edx
callq 0x4190
testq %rax, %rax
je 0x9348
movq %rax, %r14
movq 0x70(%rbx), %rax
movslq 0xc(%rsp), %rcx
cmpl 0x6c(%rbx), %ecx
je 0x92ec
orq $0x3, %rcx
leaq (%rcx,%rcx,4), %rcx
leaq 0x14(,%rcx,4), %rsi
movq %rax, %rdi
callq 0x46c0
testq %rax, %rax
je 0x933b
movq %rax, 0x70(%rbx)
movl 0xc(%rsp), %esi
testl %esi, %esi
jle 0x9338
addq $0x10, %rax
leaq 0x20(%r14), %rcx
xorl %edx, %edx
movl -0xc(%rcx), %esi
movl %esi, -0x10(%rax)
movl -0x8(%rcx), %esi
movl %esi, -0xc(%rax)
movl -0x4(%rcx), %esi
movl %esi, -0x8(%rax)
movl (%rcx), %edi
movl %edi, -0x4(%rax)
imull %esi, %edi
movl %edi, (%rax)
incq %rdx
movslq 0xc(%rsp), %rsi
addq $0x14, %rax
addq $0x38, %rcx
cmpq %rsi, %rdx
jl 0x9307
movl %esi, 0x6c(%rbx)
movq %r14, %rdi
callq 0x4300
testq %r14, %r14
jne 0x9394
movl $0x1, 0x6c(%rbx)
cmpq $0x0, 0x70(%rbx)
jne 0x9364
movl $0x14, %edi
callq 0xa0b0
movq %rax, 0x70(%rbx)
movq 0x70(%rbx), %rax
movq $0x0, (%rax)
movq (%r15), %rcx
movq 0xe8(%rcx), %rcx
movslq (%rbx), %rdx
shlq $0x7, %rdx
movl 0x18(%rcx,%rdx), %esi
movl %esi, 0x8(%rax)
movl 0x1c(%rcx,%rdx), %ecx
movl %ecx, 0xc(%rax)
imull %esi, %ecx
movl %ecx, 0x10(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/screen.c
// Function: screen_deinit
void screen_deinit(struct screen *s) {
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_SUPPORTED));
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_CLIENT_LIST));
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_CLIENT_LIST_STACKING));
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_NUMBER_OF_DESKTOPS));
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_DESKTOP_GEOMETRY));
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_DESKTOP_VIEWPORT));
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_CURRENT_DESKTOP));
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_ACTIVE_WINDOW));
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_WORKAREA));
	XDeleteProperty(display.dpy, s->root, X_ATOM(_NET_SUPPORTING_WM_CHECK));
	XDestroyWindow(display.dpy, s->supporting);
	free(s->monitors);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x738c(%rip), %r14      # 0x10738
movq 0x10(%rdi), %rsi
movq (%r14), %rdi
movq 0x40(%r14), %rdx
callq 0x42e0
movq 0x10(%rbx), %rsi
movq (%r14), %rdi
movq 0x48(%r14), %rdx
callq 0x42e0
movq 0x10(%rbx), %rsi
movq (%r14), %rdi
movq 0x50(%r14), %rdx
callq 0x42e0
movq 0x10(%rbx), %rsi
movq (%r14), %rdi
movq 0x58(%r14), %rdx
callq 0x42e0
movq 0x10(%rbx), %rsi
movq (%r14), %rdi
movq 0x60(%r14), %rdx
callq 0x42e0
movq 0x10(%rbx), %rsi
movq (%r14), %rdi
movq 0x68(%r14), %rdx
callq 0x42e0
movq 0x10(%rbx), %rsi
movq (%r14), %rdi
movq 0x70(%r14), %rdx
callq 0x42e0
movq 0x10(%rbx), %rsi
movq (%r14), %rdi
movq 0x78(%r14), %rdx
callq 0x42e0
movq 0x10(%rbx), %rsi
movq (%r14), %rdi
movq 0x80(%r14), %rdx
callq 0x42e0
movq 0x10(%rbx), %rsi
movq (%r14), %rdi
movq 0x88(%r14), %rdx
callq 0x42e0
movq (%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x4320
movq 0x70(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x42d0
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/screen.c
// Function: switch_vdesk
void switch_vdesk(struct screen *s, unsigned v) {
#ifdef DEBUG
	int nhidden = 0, nraised = 0;
#endif

	// Sanity check vdesk number.
	if (!valid_vdesk(v))
		return;

	// Selected == current?  Do nothing.
	if (v == s->vdesk)
		return;

	LOG_ENTER("switch_vdesk(screen=%d, from=%d, to=%d)", s->screen, s->vdesk, v);

	// If current client is not fixed, deselect it.  An enter event from
	// mapping clients may select a new one.
	if (current && !is_fixed(current)) {
		select_client(NULL);
	}

	for (struct list *iter = clients_tab_order; iter; iter = iter->next) {
		struct client *c = iter->data;
		if (c->screen != s)
			continue;
		if (c->vdesk == s->vdesk) {
			client_hide(c);
#ifdef DEBUG
			nhidden++;
#endif
		} else if (c->vdesk == v) {
			if (!c->is_dock || s->docks_visible)
				client_show(c);
#ifdef DEBUG
			nraised++;
#endif
		}
	}

	// Store previous vdesk, so that user may toggle back to it
	s->old_vdesk = s->vdesk;

	// Update current vdesk (including EWMH properties)
	s->vdesk = v;
	ewmh_set_net_current_desktop(s);

	LOG_DEBUG("%d hidden, %d raised\n", nhidden, nraised);
	LOG_LEAVE();
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
cmpl $-0x1, %esi
je 0x9488
leaq 0x747d(%rip), %rax      # 0x10900
cmpl %ebp, 0x2c(%rax)
jbe 0x948d
cmpl %ebp, 0x60(%rbx)
jne 0x9492
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7297(%rip), %rax      # 0x10730
movq (%rax), %rax
testq %rax, %rax
je 0x94ae
cmpl $-0x1, 0x20(%rax)
je 0x94ae
xorl %edi, %edi
callq 0x5868
leaq 0x7263(%rip), %rax      # 0x10718
movq (%rax), %r14
testq %r14, %r14
je 0x94f3
movq 0x8(%r14), %rdi
cmpq %rbx, 0x10(%rdi)
jne 0x94ee
movl 0x20(%rdi), %eax
cmpl 0x60(%rbx), %eax
jne 0x94d6
callq 0x55fa
jmp 0x94ee
cmpl %ebp, %eax
jne 0x94ee
cmpl $0x0, 0x94(%rdi)
je 0x94e9
cmpl $0x0, 0x68(%rbx)
je 0x94ee
callq 0x5692
movq (%r14), %r14
jmp 0x94b8
movl 0x60(%rbx), %eax
movl %eax, 0x64(%rbx)
movl %ebp, 0x60(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x7fae
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/screen.c
// Function: set_docks_visible
void set_docks_visible(struct screen *s, int is_visible) {
	LOG_ENTER("set_docks_visible(screen=%d, is_visible=%d)", s->screen, is_visible);

	s->docks_visible = is_visible;

	// Traverse client list and hide or show any docks on this screen as
	// appropriate.

	for (struct list *iter = clients_tab_order; iter; iter = iter->next) {
		struct client *c = iter->data;
		if (c->screen != s)
			continue;
		if (c->is_dock) {
			if (is_visible) {
				// XXX I've assumed that if you want to see
				// them, you also want them raised...
				if (is_fixed(c) || (c->vdesk == s->vdesk)) {
					client_show(c);
					client_raise(c);
				}
			} else {
				client_hide(c);
			}
		}
	}

	LOG_LEAVE();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, 0x68(%rdi)
leaq 0x71fe(%rip), %rax      # 0x10718
movq (%rax), %r12
testq %r12, %r12
je 0x9576
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%r12), %r15
cmpq %r14, 0x10(%r15)
je 0x953d
movq (%r12), %r12
testq %r12, %r12
jne 0x9527
jmp 0x9576
cmpl $0x0, 0x94(%r15)
je 0x9532
testl %ebx, %ebx
je 0x956c
movl 0x20(%r15), %eax
cmpl $-0x1, %eax
je 0x955a
cmpl 0x60(%r14), %eax
jne 0x9532
movq %r15, %rdi
callq 0x5692
movq %r15, %rdi
callq 0x56e7
jmp 0x9532
movq %r15, %rdi
callq 0x55fa
jmp 0x9532
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/screen.c
// Function: scan_clients_before_resize
void scan_clients_before_resize(struct screen *s) {
	for (struct list *iter = clients_tab_order; iter; iter = iter->next) {
		struct client *c = iter->data;
		// only handle clients on the screen being resized
		if (c->screen != s)
			continue;

		struct monitor *m = client_monitor(c, NULL);

		int mw = m->width;
		int mh = m->height;
		int cx = c->oldw ? c->oldx : c->x;
		int cy = c->oldh ? c->oldy : c->y;

		c->mon_offx = (double)(cx - m->x) / (double)mw;
		c->mon_offy = (double)(cy - m->y) / (double)mh;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0x718a(%rip), %rax      # 0x10718
movq (%rax), %r15
testq %r15, %r15
je 0x9612
movq %rdi, %rbx
movq 0x8(%r15), %r14
cmpq %rbx, 0x10(%r14)
jne 0x960a
movq %r14, %rdi
xorl %esi, %esi
callq 0x53e4
leaq 0x40(%r14), %rcx
cmpl $0x0, 0x48(%r14)
leaq 0x28(%r14), %rdx
cmoveq %rdx, %rcx
movl (%rcx), %ecx
leaq 0x44(%r14), %rdx
leaq 0x2c(%r14), %rsi
cmpl $0x0, 0x4c(%r14)
cmoveq %rsi, %rdx
subl (%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0x8(%rax), %xmm1
divsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sdl 0xc(%rax), %xmm1
movl (%rdx), %ecx
movsd %xmm0, 0x58(%r14)
subl 0x4(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x60(%r14)
movq (%r15), %r15
testq %r15, %r15
jne 0x9599
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/screen.c
// Function: fix_screen_after_resize
void fix_screen_after_resize(struct screen *s) {
	for (struct list *iter = clients_tab_order; iter; iter = iter->next) {
		struct client *c = iter->data;
		// only handle clients on the screen being resized
		if (c->screen != s)
			continue;
		Bool intersects;
		struct monitor *m = client_monitor(c, &intersects);

		if (c->oldw) {
			// horiz maximised: update width, update old x pos
			c->x = m->x - c->border;
			c->width = m->width;
			c->oldx = m->x + c->mon_offx * m->width;
		} else {
			// horiz normal: update x pos
			if (!intersects)
				c->x = m->x + c->mon_offx * m->width;
		}

		if (c->oldh) {
			// vert maximised: update height, update old y pos
			c->y = m->y - c->border;
			c->height = m->height;
			c->oldy = m->y + c->mon_offy * m->height;
		} else {
			// vert normal: update y pos
			if (!intersects)
				c->y = m->y + c->mon_offy * m->height;
		}
		client_moveresize(c);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x70f1(%rip), %rax      # 0x10718
movq (%rax), %r12
testq %r12, %r12
je 0x973d
movq %rdi, %rbx
leaq 0x4(%rsp), %r14
movq 0x8(%r12), %r15
cmpq %rbx, 0x10(%r15)
jne 0x96ea
movq %r15, %rdi
movq %r14, %rsi
callq 0x53e4
cmpl $0x0, 0x48(%r15)
je 0x9694
movl (%rax), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
subl 0x3c(%r15), %ecx
movl %ecx, 0x28(%r15)
movl 0x8(%rax), %ecx
movl %ecx, 0x30(%r15)
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
mulsd 0x58(%r15), %xmm0
addsd %xmm1, %xmm0
movl $0x40, %ecx
cvttsd2si %xmm0, %edx
movl %edx, (%r15,%rcx)
jmp 0x969b
cmpl $0x0, 0x4(%rsp)
je 0x96f9
cmpl $0x0, 0x4c(%r15)
je 0x96db
movl 0x4(%rax), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
subl 0x3c(%r15), %ecx
movl %ecx, 0x2c(%r15)
movl 0xc(%rax), %eax
movl %eax, 0x34(%r15)
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x60(%r15), %xmm0
addsd %xmm1, %xmm0
movl $0x44, %eax
cvttsd2si %xmm0, %ecx
movl %ecx, (%r15,%rax)
jmp 0x96e2
cmpl $0x0, 0x4(%rsp)
je 0x971c
movq %r15, %rdi
callq 0x6902
movq (%r12), %r12
testq %r12, %r12
jne 0x963b
jmp 0x973d
xorps %xmm1, %xmm1
cvtsi2sdl (%rax), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rax), %xmm0
mulsd 0x58(%r15), %xmm0
addsd %xmm1, %xmm0
movl $0x28, %ecx
jmp 0x968a
xorps %xmm1, %xmm1
cvtsi2sdl 0x4(%rax), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl 0xc(%rax), %xmm0
mulsd 0x60(%r15), %xmm0
addsd %xmm1, %xmm0
movl $0x2c, %eax
jmp 0x96d1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/screen.c
// Function: find_screen
struct screen *find_screen(Window root) {
	for (int i = 0; i < display.nscreens; i++) {
		if (display.screens[i].root == root)
			return &display.screens[i];
	}
	return NULL;
}

// Assembly:
leaq 0x6fe8(%rip), %rax      # 0x10738
movslq 0x188(%rax), %rcx
testq %rcx, %rcx
jle 0x9772
movq 0x190(%rax), %rax
cmpq %rdi, 0x10(%rax)
je 0x9774
addq $0x78, %rax
decq %rcx
jne 0x9763
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/screen.c
// Function: find_current_screen
struct screen *find_current_screen(void) {
	Window cur_root;
	Window dw;  // dummy
	int di;  // dummy
	unsigned dui;  // dummy

	// XQueryPointer is useful for getting the current pointer root
	XQueryPointer(display.dpy, display.screens[0].root, &cur_root, &dw, &di, &di, &di, &di, &dui);
	return find_screen(cur_root);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq 0x6fb7(%rip), %rbx      # 0x10738
movq (%rbx), %rdi
movq 0x190(%rbx), %rax
movq 0x10(%rax), %rsi
subq $0x8, %rsp
leaq 0x18(%rsp), %rax
leaq 0x1c(%rsp), %r8
leaq 0x10(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %r8, %r9
pushq %rax
pushq %r8
pushq %r8
callq 0x4600
addq $0x20, %rsp
movslq 0x188(%rbx), %rcx
testq %rcx, %rcx
jle 0x97df
movq 0x8(%rsp), %rdx
movq 0x190(%rbx), %rax
cmpq %rdx, 0x10(%rax)
je 0x97e1
addq $0x78, %rax
decq %rcx
jne 0x97d0
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/util.c
// Function: spawn
void spawn(const char *const cmd[]) {
	struct screen *current_screen = find_current_screen();
	pid_t pid;

	if (current_screen && current_screen->display)
		putenv(current_screen->display);
	if (!(pid = fork())) {
		// Put first fork in a new session
		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); break;
			default: _exit(0);
		}
	}
	if (pid > 0)
		wait(NULL);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9775
testq %rax, %rax
je 0x9806
movq 0x8(%rax), %rdi
testq %rdi, %rdi
je 0x9806
callq 0x4470
callq 0x4680
movl %eax, %ebp
testl %eax, %eax
jne 0x982a
callq 0x40b0
callq 0x4680
testl %eax, %eax
jne 0x9842
movq (%rbx), %rdi
movq %rbx, %rsi
callq 0x4150
testl %ebp, %ebp
jle 0x983b
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40d0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
xorl %edi, %edi
callq 0x4230
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/util.c
// Function: get_pointer_root_xy
Bool get_pointer_root_xy(Window w, int *x, int *y) {
	Window root_r, child_r;
	int root_x_r, root_y_r;
	int win_x_r, win_y_r;
	unsigned mask_r;
	if (!x)
		x = &root_x_r;
	if (!y)
		y = &root_y_r;
	return XQueryPointer(display.dpy, w, &root_r, &child_r, x, y, &win_x_r, &win_y_r, &mask_r);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rax
testq %rsi, %rsi
leaq 0x1c(%rsp), %r8
cmovneq %rsi, %r8
testq %rdx, %rdx
leaq 0x18(%rsp), %r9
cmovneq %rdx, %r9
leaq 0x6e5e(%rip), %rcx      # 0x10738
movq (%rcx), %rdi
subq $0x8, %rsp
leaq 0x14(%rsp), %r10
leaq 0x18(%rsp), %r11
leaq 0x1c(%rsp), %rbx
leaq 0x30(%rsp), %rdx
leaq 0x28(%rsp), %rcx
movq %rax, %rsi
pushq %r10
pushq %r11
pushq %rbx
callq 0x4600
addq $0x50, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/util.c
// Function: get_property
void *get_property(Window w, Atom property, Atom req_type,
		   unsigned long *nitems_return) {
	Atom actual_type;
	int actual_format;
	unsigned long bytes_after;
	unsigned char *prop;
	if (XGetWindowProperty(display.dpy, w, property,
			       0L, MAXIMUM_PROPERTY_LENGTH / 4, False,
			       req_type, &actual_type, &actual_format,
			       nitems_return, &bytes_after, &prop) == Success) {
		if (actual_type == req_type)
			return (void *)prop;
		XFree(prop);
	}
	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rax
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %rsi
leaq 0x6e0d(%rip), %rcx      # 0x10738
movq (%rcx), %rdi
leaq 0x8(%rsp), %r10
leaq 0x20(%rsp), %r11
leaq 0x1c(%rsp), %r15
leaq 0x10(%rsp), %r12
xorl %r14d, %r14d
movl $0x400, %r8d            # imm = 0x400
xorl %ecx, %ecx
xorl %r9d, %r9d
pushq %r10
pushq %r11
pushq %rax
pushq %r15
pushq %r12
pushq %rbx
callq 0x41c0
addq $0x30, %rsp
testl %eax, %eax
jne 0x997e
movq 0x8(%rsp), %r14
cmpq %rbx, 0x10(%rsp)
je 0x997e
movq %r14, %rdi
callq 0x4050
xorl %r14d, %r14d
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/util.c
// Function: window_normal_border
int window_normal_border(Window w) {
	int bw = option.bw;
	PropMwmHints *mprop;
	unsigned long nitems;
	if ( (mprop = get_property(w, X_ATOM(_MOTIF_WM_HINTS), X_ATOM(_MOTIF_WM_HINTS), &nitems)) ) {
		if (nitems >= PROP_MWM_HINTS_ELEMENTS
		    && (mprop->flags & MWM_HINTS_DECORATIONS)
		    && !(mprop->decorations & MWM_DECOR_ALL)
		    && !(mprop->decorations & MWM_DECOR_BORDER)) {
			bw = 0;
		}
		XFree(mprop);
	}
	return bw;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x6f67(%rip), %rax      # 0x10900
movl 0x28(%rax), %ebx
leaq 0x6d95(%rip), %rax      # 0x10738
movq 0x28(%rax), %rdx
leaq 0x8(%rsp), %rcx
movq %rdx, %rsi
callq 0x990d
testq %rax, %rax
je 0x99d7
cmpq $0x3, 0x8(%rsp)
jb 0x99cf
testb $0x2, (%rax)
je 0x99cf
xorl %ecx, %ecx
testb $0x3, 0x10(%rax)
cmovel %ecx, %ebx
movq %rax, %rdi
callq 0x4050
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/util.c
// Function: interruptibleXNextEvent
int interruptibleXNextEvent(XEvent *event) {
	fd_set fds;
	int rc;
	int dpy_fd = ConnectionNumber(display.dpy);
	for (;;) {
		if (XPending(display.dpy)) {
			XNextEvent(display.dpy, event);
			return 1;
		}
		FD_ZERO(&fds);
		FD_SET(dpy_fd, &fds);
		rc = select(dpy_fd + 1, &fds, NULL, NULL, NULL);
		if (rc < 0) {
			if (errno == EINTR) {
				return 0;
			} else {
				LOG_ERROR("interruptibleXNextEvent(): select()\n");
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x6d3e(%rip), %r12      # 0x10738
movq (%r12), %rdi
movl 0x10(%rdi), %r14d
callq 0x4770
testl %eax, %eax
je 0x9a21
movq (%r12), %rdi
movq %rbx, %rsi
callq 0x43d0
movl $0x1, %eax
jmp 0x9ab2
leal 0x3f(%r14), %eax
testl %r14d, %r14d
cmovnsl %r14d, %eax
movl %eax, %edx
andl $-0x40, %edx
movl %r14d, %ecx
subl %edx, %ecx
movl $0x1, %r13d
shlq %cl, %r13
sarl $0x6, %eax
movslq %eax, %rbp
incl %r14d
movq %rsp, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
orq %r13, (%rsp,%rbp,8)
movl %r14d, %edi
movq %r15, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4140
testl %eax, %eax
jns 0x9a9e
callq 0x44d0
cmpl $0x4, (%rax)
je 0x9ab0
callq 0x4925
movq (%r12), %rdi
callq 0x4770
testl %eax, %eax
je 0x9a4b
jmp 0x9a0b
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/util.c
// Function: discard_enter_events
void discard_enter_events(struct client *except) {
	XEvent tmp, putback_ev;
	int putback = 0;
	XSync(display.dpy, False);
	while (XCheckMaskEvent(display.dpy, EnterWindowMask, &tmp)) {
		if (tmp.xcrossing.window == except->parent) {
			memcpy(&putback_ev, &tmp, sizeof(XEvent));
			putback = 1;
		}
	}
	if (putback) {
		XPutBackEvent(display.dpy, &putback_ev);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rdi, %rbx
leaq 0x6c5b(%rip), %r12      # 0x10738
movq (%r12), %rdi
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x4500
movq (%r12), %rdi
movq %rsp, %rdx
movl $0x10, %esi
callq 0x4430
testl %eax, %eax
je 0x9b54
leaq 0xc0(%rsp), %r14
movq %rsp, %r15
movq 0x20(%rsp), %rax
cmpq 0x8(%rbx), %rax
jne 0x9b2a
movl $0xc0, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x4750
movl $0x1, %ebp
movq (%r12), %rdi
movl $0x10, %esi
movq %r15, %rdx
callq 0x4430
testl %eax, %eax
jne 0x9b0a
testl %ebp, %ebp
je 0x9b54
movq (%r12), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x4460
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/xconfig.c
// Function: xconfig_parse_line
void xconfig_parse_line(struct xconfig_option *options, const char *line) {
	// skip leading spaces
	while (isspace((int)*line))
		line++;

	// end of line or comment?
	if (*line == 0 || *line == '#')
		return;

	// from here on, work on a copy of the string
	char *linedup = xstrdup(line);

	// whitespace separates option from arguments
	char *optstr = strtok(linedup, "\t\n\v\f\r ");
	if (optstr == NULL) {
		goto done;
	}

	struct xconfig_option *opt = find_option(options, optstr);
	if (opt == NULL) {
		LOG_INFO("Ignoring unknown option `%s'\n", optstr);
		goto done;
	}

	char *arg;
	if (opt->type == XCONFIG_STR_LIST) {
		// special case: spaces here mean something
		arg = strtok(NULL, "\n\v\f\r");
		while (isspace(*arg)) {
			arg++;
		}
	} else {
		arg = strtok(NULL, "\t\n\v\f\r ");
	}

	set_option(opt, arg ? arg : "");
done:
	free(linedup);
	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r15
callq 0x4340
movq %rax, %r14
movq (%rax), %rax
decq %rbx
movsbq 0x1(%rbx), %rcx
incq %rbx
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x9b80
movzbl %cl, %eax
testl %eax, %eax
je 0x9b9b
cmpl $0x23, %eax
jne 0x9ba7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rbx, %rdi
callq 0xa128
movq %rax, %rbx
leaq 0x27d7(%rip), %rsi      # 0xc390
movq %rax, %rdi
callq 0x4580
testq %rax, %rax
je 0x9c3d
movq %rax, %r12
movq %r15, %rdi
movq %rax, %rsi
callq 0x9c50
testq %rax, %rax
je 0x9c06
movq %rax, %r15
cmpl $0x4, (%rax)
jne 0x9c19
leaq 0x27cd(%rip), %rsi      # 0xc3b5
xorl %edi, %edi
callq 0x4580
movq (%r14), %rcx
decq %rax
movsbq 0x1(%rax), %rdx
incq %rax
testb $0x20, 0x1(%rcx,%rdx,2)
jne 0x9bf5
jmp 0x9c27
leaq 0x278a(%rip), %rdi      # 0xc397
movq %r12, %rsi
xorl %eax, %eax
callq 0x4060
jmp 0x9c3d
leaq 0x2770(%rip), %rsi      # 0xc390
xorl %edi, %edi
callq 0x4580
testq %rax, %rax
leaq 0x1de8(%rip), %rsi      # 0xba19
cmovneq %rax, %rsi
movq %r15, %rdi
callq 0x9c86
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x42d0
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/xconfig.c
// Function: find_option
static struct xconfig_option *find_option(struct xconfig_option *options,
		const char *opt) {
	for (int i = 0; options[i].type != XCONFIG_END; i++) {
		if (0 == strcmp(options[i].name, opt)) {
			return &options[i];
		}
	}
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x7, (%rdi)
je 0x9c79
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rbx), %rdi
movq %r14, %rsi
callq 0x4540
testl %eax, %eax
je 0x9c7b
cmpl $0x7, 0x18(%rbx)
leaq 0x18(%rbx), %rbx
jne 0x9c5f
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/xconfig.c
// Function: xconfig_parse_file
enum xconfig_result xconfig_parse_file(struct xconfig_option *options,
		const char *filename) {
	char buf[256];
	char *line;
	FILE *cfg;
	cfg = fopen(filename, "r");
	if (cfg == NULL) return XCONFIG_FILE_ERROR;

	while ((line = fgets(buf, sizeof(buf), cfg))) {
		xconfig_parse_line(options, line);
	}
	fclose(cfg);
	return XCONFIG_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x13a9(%rip), %rsi      # 0xb26b
movq %rax, %rdi
callq 0x41f0
testq %rax, %rax
je 0x9f16
movq %rax, %r14
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rax, %rdx
callq 0x42a0
testq %rax, %rax
je 0x9f0a
movq %rsp, %r15
movq %rbx, %rdi
movq %rax, %rsi
callq 0x9b64
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x42a0
testq %rax, %rax
jne 0x9eea
movq %r14, %rdi
callq 0x45f0
xorl %eax, %eax
jmp 0x9f1b
movl $0x3, %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/xconfig.c
// Function: xconfig_parse_cli
enum xconfig_result xconfig_parse_cli(struct xconfig_option *options,
		int argc, char **argv, int *argn) {
	int _argn;
	const char *optstr;
	_argn = argn ? *argn : 1;

	while (_argn < argc) {
		// No leading '-' means end of options
		if (argv[_argn][0] != '-') {
			break;
		}

		// "--" ends options, per tradition
		if (0 == strcmp("--", argv[_argn])) {
			_argn++;
			break;
		}

		optstr = argv[_argn]+1;
		// Allow double '-' to introduce option
		if (*optstr == '-')
			optstr++;

		struct xconfig_option *opt = find_option(options, optstr);
		if (opt == NULL) {
			if (argn) *argn = _argn;
			return XCONFIG_BAD_OPTION;
		}

		// Option types with no argument
		if (opt->type == XCONFIG_BOOL || opt->type == XCONFIG_CALL_0) {
			set_option(opt, NULL);
			_argn++;
			continue;
		}

		// Option types with one argument
		if ((_argn + 1) >= argc) {
			if (argn)
				*argn = _argn;
			return XCONFIG_MISSING_ARG;
		}
		set_option(opt, 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 %rcx, %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %r15
testq %rcx, %rcx
je 0x9f48
movl (%rbx), %r12d
jmp 0x9f4e
movl $0x1, %r12d
cmpl %ebp, %r12d
jge 0xa01d
movslq %r12d, %rax
movq (%r14,%rax,8), %r13
cmpb $0x2d, (%r13)
jne 0xa01d
leaq 0x244a(%rip), %rdi      # 0xc3ba
movq %r13, %rsi
callq 0x4540
testl %eax, %eax
je 0xa01a
cmpb $0x2d, 0x1(%r13)
je 0x9f8c
incq %r13
jmp 0x9f90
addq $0x2, %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x9c50
testq %rax, %rax
je 0x9fbf
movl (%rax), %ecx
cmpl $0x5, %ecx
je 0x9fab
testl %ecx, %ecx
jne 0x9fd6
movq %rax, %rdi
xorl %esi, %esi
callq 0x9c86
incl %r12d
movl $0x2, %eax
jmp 0xa00b
movl $0x1, 0x4(%rsp)
testq %rbx, %rbx
je 0x9fcf
movl %r12d, (%rbx)
movl $0x1, %eax
jmp 0xa00b
leal 0x1(%r12), %ecx
cmpl %ebp, %ecx
jge 0x9ff6
movslq %ecx, %rcx
movq (%r14,%rcx,8), %rsi
movq %rax, %rdi
callq 0x9c86
addl $0x2, %r12d
xorl %eax, %eax
jmp 0xa00b
movl $0x1, %eax
movl $0x2, 0x4(%rsp)
testq %rbx, %rbx
je 0xa00b
movl %r12d, (%rbx)
testb $0x1, %al
jne 0xa036
cmpl %ebp, %r12d
jl 0x9f57
jmp 0xa01d
incl %r12d
xorl %eax, %eax
testq %rbx, %rbx
je 0xa027
movl %r12d, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%rsp), %eax
jmp 0xa027
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/xconfig.c
// Function: unset_option
static void unset_option(struct xconfig_option *option) {
	switch (option->type) {
	case XCONFIG_STRING:
		if (*(char **)option->dest.s) {
			free(*(char **)option->dest.s);
			*(char **)option->dest.s = NULL;
		}
		break;
	case XCONFIG_STR_LIST:
		if (*(char ***)option->dest.sl) {
			if ((*(char ***)option->dest.sl)[0]) {
				free((*(char ***)option->dest.sl)[0]);
			}
			free(*(char ***)option->dest.sl);
			*(char ***)option->dest.sl = NULL;
		}
		break;
	default:
		break;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
cmpl $0x4, %eax
je 0xa07b
cmpl $0x3, %eax
jne 0xa0ad
movq 0x10(%rbx), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xa0ad
addq $0x10, %rbx
jmp 0xa09e
movq 0x10(%rbx), %rax
movq (%rax), %rax
testq %rax, %rax
je 0xa0ad
addq $0x10, %rbx
movq (%rax), %rdi
testq %rdi, %rdi
je 0xa098
callq 0x42d0
movq (%rbx), %rax
movq (%rax), %rdi
callq 0x42d0
movq (%rbx), %rax
movq $0x0, (%rax)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/xmalloc.c
// Function: xmalloc
void *xmalloc(size_t s) {
	void *mem = malloc(s);
	if (!mem) {
		perror(NULL);
		exit(EXIT_FAILURE);
	}
	return mem;
}

// Assembly:
pushq %rax
callq 0x41e0
testq %rax, %rax
je 0xa0bd
popq %rcx
retq
callq 0x4947
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/xmalloc.c
// Function: xrealloc
void *xrealloc(void *p, size_t s) {
	void *mem = realloc(p, s);
	if (!mem && s != 0) {
		perror(NULL);
		exit(EXIT_FAILURE);
	}
	return mem;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x46c0
testq %rax, %rax
setne %cl
testq %rbx, %rbx
sete %dl
orb %cl, %dl
je 0xa0f4
popq %rbx
retq
callq 0x4957
// File: /workspace/github_c_makefile_star2_O1/mati75[P]evilwm/xmalloc.c
// Function: xstrdup
void *xmemdup(const void *p, size_t s) {
	if (!p)
		return NULL;
	void *mem = xmalloc(s);
	memcpy(mem, p, s);
	return mem;
}

// Assembly:
testq %rdi, %rdi
je 0xa15a
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x42f0
leaq 0x1(%rax), %r14
movq %r14, %rdi
callq 0xa0b0
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4750
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/jacereda[P]fsatrace/src/fsatrace.c
// Function: errv
static void
errv(const char *fmt, const char *pref, va_list ap)
{
	char fullpath[PATH_MAX];
	char *es = strerror(errno);
	procPath(fullpath);
	fprintf(stderr, "%s(%d): %s", basename(fullpath), getpid(), pref);
	vfprintf(stderr, fmt, ap);
	fprintf(stderr, ": %s\n", es);
	fflush(stderr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movq %rdx, 0x8(%rsp)
movq %rsi, %r12
movq %rdi, %r14
callq 0x1030
movl (%rax), %edi
callq 0x11f0
movq %rax, %r15
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x19b0
movq 0x2d89(%rip), %rbx      # 0x3ff8
movq (%rbx), %rbp
movq %r13, %rdi
callq 0x1160
movq %rax, %r13
callq 0x10a0
leaq 0xfc1(%rip), %rsi       # 0x224a
movq %rbp, %rdi
movq %r13, %rdx
movl %eax, %ecx
movq %r12, %r8
xorl %eax, %eax
callq 0x1140
movq (%rbx), %rdi
movq %r14, %rsi
movq 0x8(%rsp), %rdx
callq 0x11b0
movq (%rbx), %rdi
leaq 0xfa0(%rip), %rsi       # 0x2255
movq %r15, %rdx
xorl %eax, %eax
callq 0x1140
movq (%rbx), %rdi
callq 0x1170
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jacereda[P]fsatrace/src/fsatrace.c
// Function: uniq
static void
uniq(char *d, size_t *tot, const char *s, const char *last, size_t lastsz)
{
	const char *end = strchr(s, '\n');
	size_t	    sz = end - s;
	if (!end) {
		strcpy(d, s);
		*tot += strlen(s);
	} else if (sz != lastsz || strncmp(s, last, lastsz)) {
		memcpy(d, s, sz + 1);
		*tot += sz + 1;
		uniq(d + sz + 1, tot, end + 1, s, sz);
	} else
		uniq(d, tot, end + 1, last, lastsz);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbp
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, (%rsp)
movq %rdi, %r14
movq %r12, %r13
movq %r12, %rdi
movl $0xa, %esi
callq 0x10d0
testq %rax, %rax
je 0x1854
movq %rax, %r12
movq %rax, %r15
subq %r13, %r15
cmpq %rbp, %r15
jne 0x182a
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0x1040
testl %eax, %eax
jne 0x182a
incq %r12
jmp 0x17f0
leaq 0x1(%r15), %rbx
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1150
movq (%rsp), %rax
addq %rbx, (%rax)
addq %r15, %r14
incq %r14
incq %r12
movq %r13, %rbx
movq %r15, %rbp
jmp 0x17f0
movq %r14, %rdi
movq %r13, %rsi
callq 0x1060
movq %r13, %rdi
callq 0x10b0
movq (%rsp), %rcx
addq %rax, (%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jacereda[P]fsatrace/src/fsatrace.c
// Function: dump
static void
dump(const char *path, char *p, size_t sz)
{
	int	fd;
	ssize_t r = 0;
	if (strcmp(path, "-"))
		fd = open(path, O_CREAT | O_WRONLY | O_TRUNC, 0777);
	else
		fd = 1;
	if (fd >= 0)
		r = write(fd, p, sz);
	else
		error("Unable to open output file '%s'", path);
	if (r != sz)
		error("Short write (%d/%d)", r, sz);
	if (fd != 1)
		close(fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq 0x78a(%rip), %rsi       # 0x201e
callq 0x1130
testl %eax, %eax
je 0x18b5
movq %r14, %rdi
movl $0x241, %esi            # imm = 0x241
movl $0x1ff, %edx            # imm = 0x1FF
xorl %eax, %eax
callq 0x11a0
movl %eax, %ebp
jmp 0x18ba
movl $0x1, %ebp
testl %ebp, %ebp
js 0x18d0
movl %ebp, %edi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1090
movq %rax, %r15
jmp 0x18e4
leaq 0x984(%rip), %rdi       # 0x225b
xorl %r15d, %r15d
movq %r14, %rsi
xorl %eax, %eax
callq 0x191e
cmpq %rbx, %r15
je 0x18fd
leaq 0x98b(%rip), %rdi       # 0x227b
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x191e
cmpl $0x1, %ebp
jne 0x190d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1110
// File: /workspace/github_c_makefile_star2_O1/jacereda[P]fsatrace/src/unix/proc.c
// Function: procPath
void
procPath(char *fullpath)
{
#if defined __linux__
	char	exepath[64];
	ssize_t ret;
	snprintf(exepath, sizeof(exepath), "/proc/%d/exe", getpid());
	ret = readlink(exepath, fullpath, PATH_MAX);
	assert(ret != -1);
	fullpath[ret] = 0;
#else
	proc_pidpath(getpid(), fullpath, PATH_MAX);
#endif
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
callq 0x10a0
leaq 0x8c9(%rip), %rdx       # 0x228f
movq %rsp, %r14
movl $0x40, %esi
movq %r14, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x10e0
movl $0x1000, %edx           # imm = 0x1000
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1070
cmpq $-0x1, %rax
je 0x19fc
movb $0x0, (%rbx,%rax)
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x899(%rip), %rdi       # 0x229c
leaq 0x89c(%rip), %rsi       # 0x22a6
leaq 0x8a5(%rip), %rcx       # 0x22b6
movl $0x16, %edx
callq 0x1100
// File: /workspace/github_c_makefile_star2_O1/jacereda[P]fsatrace/src/unix/proc.c
// Function: procRun
enum procerr
procRun(unsigned nargs, char *const args[], int *rc)
{
	extern char **environ;
	int	      ret;
	int	      child;
	char	      so[PATH_MAX + 3];
	char	      fullpath[PATH_MAX];
	procPath(fullpath);
	snprintf(so, sizeof(so), "%s.so", fullpath);
#if defined __linux__
	setenv("LD_PRELOAD", so, 1);
#else
	setenv("DYLD_INSERT_LIBRARIES", so, 1);
	setenv("DYLD_FORCE_FLAT_NAMESPACE", "1", 1);
#endif

#if 0
	if (posix_spawnp(&child, args[0], 0, 0, args, environ))
		ret = ERR_PROC_FORK;
	else
		ret = waitchild(child, rc);
#else
	child = fork();
	switch (child) {
	case -1:
		ret = ERR_PROC_FORK;
		break;
	case 0:
		execvp(args[0], args);
		_exit(EXIT_FAILURE);
		break;
	default:
		ret = waitchild(child, rc);
	}
#endif
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x2010, %rsp           # imm = 0x2010
movq %rdx, %rbx
movq %rsi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x19b0
leaq 0x887(%rip), %rdx       # 0x22d9
leaq 0x1000(%rsp), %r12
movl $0x1003, %esi           # imm = 0x1003
movq %r12, %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x10e0
leaq 0x86c(%rip), %rdi       # 0x22df
movl $0x1, %ebp
movq %r12, %rsi
movl $0x1, %edx
callq 0x1080
callq 0x1210
cmpl $-0x1, %eax
je 0x1ae7
testl %eax, %eax
je 0x1af9
movl %eax, %edi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1190
cmpl $-0x1, %eax
je 0x1ad9
movl (%rbx), %ecx
movl %ecx, %eax
andl $0x7f, %eax
je 0x1ae0
movl %eax, %edx
shll $0x18, %edx
addl $0x1000000, %edx        # imm = 0x1000000
movl $0x3, %ebp
cmpl $0x1ffffff, %edx        # imm = 0x1FFFFFF
jg 0x1ae5
movl $0x6, %ebp
cmpb $0x7f, %cl
jne 0x1ae7
movzbl %ch, %eax
movl $0x4, %ebp
jmp 0x1ae5
movl $0x5, %ebp
jmp 0x1ae7
movzbl %ch, %eax
xorl %ebp, %ebp
movl %eax, (%rbx)
movl %ebp, %eax
addq $0x2010, %rsp           # imm = 0x2010
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq (%r14), %rdi
movq %r14, %rsi
callq 0x11c0
movl $0x1, %edi
callq 0x1050
nop
// File: /workspace/github_c_makefile_star2_O1/jacereda[P]fsatrace/src/unix/shm.c
// Function: shmInit
int
shmInit(struct shm *shm, const char *key, size_t sz, int root)
{
	int	     err = 0;
	struct priv *p = (struct priv *)shm->storage;
	char *	     shname = shm->name;
	assert(key);
	assert(sizeof(shm->storage) > sizeof(*p));
	snprintf(shname, sizeof(shm->storage), "/fsatrace%ld",
	    hash((unsigned char *)key));
	for (size_t i = 0, l = strlen(shname); i < l; i++)
		if (shname[i] == '/')
			shname[i] = '_';
	if (root)
		shm_unlink(shname); // Just in case, it might have crashed on a
				    // previous execution
	err +=
	    (-1 == (p->fd = shm_open(shname, (root * O_CREAT) | O_RDWR, 0666)))
	    << 0;
	err += (root && (-1 == ftruncate(p->fd, sz))) << 1;
	err += (MAP_FAILED ==
		   (shm->buf = mmap(
			0, sz, PROT_READ | PROT_WRITE, MAP_SHARED, p->fd, 0)))
	    << 2;
	p->sz = sz;
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x1c28
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %r15
movb (%rsi), %al
testb %al, %al
je 0x1b56
incq %rsi
movl $0x1505, %ecx           # imm = 0x1505
movq %rcx, %rdx
shlq $0x5, %rdx
addq %rcx, %rdx
movzbl %al, %ecx
addq %rdx, %rcx
movb (%rsi), %al
incq %rsi
testb %al, %al
jne 0x1b3b
jmp 0x1b5b
movl $0x1505, %ecx           # imm = 0x1505
leaq 0x7d0(%rip), %rdx       # 0x2332
movl $0x20, %esi
movq %r15, %rdi
xorl %eax, %eax
callq 0x10e0
movq %r15, %rdi
callq 0x10b0
testq %rax, %rax
je 0x1b94
xorl %ecx, %ecx
cmpb $0x2f, (%r15,%rcx)
jne 0x1b8c
movb $0x5f, (%r15,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x1b80
testl %ebp, %ebp
je 0x1ba0
movq %r15, %rdi
callq 0x1200
movl %ebp, %esi
shll $0x6, %esi
orl $0x2, %esi
movq %r15, %rdi
movl $0x1b6, %edx            # imm = 0x1B6
callq 0x11e0
movl %eax, %r15d
movl %eax, 0x1008(%r14)
testl %ebp, %ebp
je 0x1bda
movl %r15d, %edi
movq %rbx, %rsi
callq 0x10f0
xorl %ecx, %ecx
cmpl $-0x1, %eax
sete %cl
addl %ecx, %ecx
jmp 0x1bdc
xorl %ecx, %ecx
xorl %r12d, %r12d
cmpl $-0x1, %r15d
sete %r12b
orl %ecx, %r12d
movl 0x1008(%r14), %r8d
xorl %edi, %edi
movq %rbx, %rsi
movl $0x3, %edx
movl $0x1, %ecx
xorl %r9d, %r9d
callq 0x10c0
movq %rax, (%r14)
xorl %ecx, %ecx
cmpq $-0x1, %rax
sete %cl
leal (%r12,%rcx,4), %eax
movq %rbx, 0x1010(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6bb(%rip), %rdi       # 0x22ea
leaq 0x6b8(%rip), %rsi       # 0x22ee
leaq 0x6c0(%rip), %rcx       # 0x22fd
movl $0x22, %edx
callq 0x1100
// File: /workspace/github_c_makefile_star2_O1/jacereda[P]fsatrace/src/unix/shm.c
// Function: shmTerm
int
shmTerm(struct shm *shm, int root)
{
	struct priv *p = (struct priv *)shm->storage;
	int	     err = 0;
	err += (-1 == munmap(shm->buf, p->sz)) << 0;
	err += (-1 == close(p->fd)) << 1;
	err += (root && (-1 == shm_unlink(shm->name))) << 2;
	return err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
movq (%rdi), %rdi
movq 0x1010(%r14), %rsi
callq 0x1180
movl %eax, %ebx
movl 0x1008(%r14), %edi
callq 0x1110
movl %eax, %ebp
testl %r15d, %r15d
je 0x1c91
addq $0x8, %r14
movq %r14, %rdi
callq 0x1200
xorl %ecx, %ecx
cmpl $-0x1, %eax
sete %cl
shll $0x2, %ecx
jmp 0x1c93
xorl %ecx, %ecx
xorl %eax, %eax
cmpl $-0x1, %ebx
sete %al
xorl %edx, %edx
cmpl $-0x1, %ebp
sete %dl
leal (%rax,%rdx,2), %eax
orl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmdump.c
// Function: main
int
main(int argc, char *argv[])
{
	int ch, id;
	int opt_t = 0;
	int opt_s = 0;

	while ((ch = getopt(argc, argv, "st")) != -1) {
		switch (ch) {
		case 's':
			opt_s = 1;
			break;
		case 't':
			opt_t = 1;
			break;
		default:
			usage();
			return 1;
		}
	}
	argc -= optind;
	argv += optind;

	id = shmget(MEMID, MEMSIZE, 0);
	if (id == -1)
		err(1, "shmget");

	shmqueue = shmqueue_new(MEMID, 0, 1, 0);

	if (opt_s) {
		shmqueue_dump_statistics(shmqueue);
		return 0;
	}


	if (opt_t) {
		shmqueue_dump_tsv(shmqueue);
	} else {
		shmqueue_dumpall(shmqueue);
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
xorl %r15d, %r15d
movb $0x1, %r12b
leaq 0x1dd2(%rip), %r14      # 0x3004
movl %r15d, %ecx
movl %ecx, %r15d
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x10e0
movl $0x1, %ecx
cmpl $0x73, %eax
je 0x1235
cmpl $-0x1, %eax
je 0x125e
cmpl $0x74, %eax
jne 0x129f
xorl %r12d, %r12d
jmp 0x1232
movl $0x10000000, %esi       # imm = 0x10000000
movl $0x186a0, %edi          # imm = 0x186A0
xorl %edx, %edx
callq 0x1100
cmpl $-0x1, %eax
je 0x12cf
xorl %ebx, %ebx
movl $0x186a0, %edi          # imm = 0x186A0
xorl %esi, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x1821
movq %rax, 0x3e10(%rip)      # 0x50a0
movq %rax, %rdi
testl %r15d, %r15d
je 0x12bb
callq 0x174e
jmp 0x12b0
leaq 0x1d68(%rip), %rdi      # 0x300e
callq 0x1050
movl $0x1, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %r12b
je 0x12c8
callq 0x13a0
jmp 0x12b0
callq 0x1661
jmp 0x12b0
leaq 0x1d31(%rip), %rsi      # 0x3007
movl $0x1, %edi
xorl %eax, %eax
callq 0x10b0
nop
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_hash_string
uint32_t
shmqueue_hash_string(uint8_t *key)
{
	uint32_t hash = 0;
	uint8_t *p, c;

	p = key;

	while ((c = *p++) != 0)
		hash = (hash << 5) - hash + c;

	return hash;
}

// Assembly:
movb (%rdi), %cl
testb %cl, %cl
je 0x1307
incq %rdi
xorl %edx, %edx
movl %edx, %eax
movzbl %cl, %ecx
shll $0x5, %eax
subl %edx, %eax
addl %ecx, %eax
movb (%rdi), %cl
incq %rdi
movl %eax, %edx
testb %cl, %cl
jne 0x12f1
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_dumpitem
void
shmqueue_dumpitem(struct shmqueue_item *item)
{
	printf("      shi_hashidx=%d\n", item->shi_hashidx);
	printf("      shi_keyvalue.keysize=<%d>\n", item->shi_keyvalue.kv_keysize);
	printf("      shi_keyvalue.storagesize=%u\n", item->shi_keyvalue.kv_storagesize);
	printf("      shi_keyvalue.key(%p)=<%s>\n", KEYVALUE_KEY(&item->shi_keyvalue), KEYVALUE_KEY(&item->shi_keyvalue));
	printf("      shi_keyvalue.storage(%p)=<%s>\n", KEYVALUE_STORAGE(&item->shi_keyvalue), KEYVALUE_STORAGE(&item->shi_keyvalue));
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x20(%rdi), %esi
leaq 0x1d38(%rip), %rdi      # 0x3050
xorl %eax, %eax
callq 0x1070
movl 0x24(%rbx), %esi
leaq 0x1d3d(%rip), %rdi      # 0x3066
xorl %eax, %eax
callq 0x1070
movl 0x28(%rbx), %esi
leaq 0x1d4d(%rip), %rdi      # 0x3087
xorl %eax, %eax
callq 0x1070
leaq 0x2c(%rbx), %rdx
leaq 0x1d5e(%rip), %rdi      # 0x30aa
movq %rdx, %rsi
xorl %eax, %eax
callq 0x1070
movl 0x24(%rbx), %eax
leaq (%rbx,%rax), %rdx
addq $0x2c, %rdx
leaq 0x1d63(%rip), %rdi      # 0x30cb
movq %rdx, %rsi
xorl %eax, %eax
popq %rbx
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_dump_tsv
void
shmqueue_dump_tsv(struct shmqueue *shmq_header)
{
	struct shmqueue_header *header;
	struct shmqueue_item *item;

	header = shmq_header->header;

	for (item = RTAILQ_FIRST(&header->sha_lrulist, shmqueue_item);
	    item != NULL;
	    item = RTAILQ_NEXT(item, &header->sha_lrulist, shmqueue_item, shi_list)) {

		printf("%s\t", KEYVALUE_KEY(&item->shi_keyvalue));
		dumpdata(KEYVALUE_STORAGE(&item->shi_keyvalue), item->shi_keyvalue.kv_storagesize);
		printf("\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rdi), %rdx
movq 0x10(%rdx), %rbx
addq $0x10, %rdx
testq %rbx, %rbx
sete %al
movq %rdx, (%rsp)
addq %rdx, %rbx
sete %cl
orb %al, %cl
jne 0x173f
leaq 0x1d71(%rip), %r15      # 0x3407
movabsq $0x40000000000002d, %r14 # imm = 0x40000000000002D
leaq 0x2c(%rbx), %r12
leaq 0x1b3d(%rip), %rdi      # 0x31e8
movq %r12, %rsi
xorl %eax, %eax
callq 0x1070
movl 0x24(%rbx), %ebp
movl 0x28(%rbx), %r13d
leaq 0x1d3f(%rip), %rdi      # 0x3402
movl %r13d, %esi
xorl %eax, %eax
callq 0x1070
testq %r13, %r13
je 0x1710
addq %rbp, %r12
xorl %ebp, %ebp
movb (%r12,%rbp), %al
movzbl %al, %esi
leal -0x7f(%rsi), %eax
cmpb $-0x5f, %al
jb 0x16f3
leal -0x22(%rsi), %eax
cmpl $0x3a, %eax
ja 0x1707
btq %rax, %r14
jae 0x1707
movq %r15, %rdi
xorl %eax, %eax
callq 0x1070
incq %rbp
cmpl %ebp, %r13d
jne 0x16d7
jmp 0x1710
movl %esi, %edi
callq 0x1030
jmp 0x16fd
movl $0x22, %edi
callq 0x1030
movl $0xa, %edi
callq 0x1030
movq (%rbx), %rax
movq (%rsp), %rcx
leaq (%rax,%rcx), %rbx
testq %rax, %rax
cmoveq %rax, %rbx
testq %rbx, %rbx
jne 0x16a0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ryo[P]shmqueue/shmqueue.c
// Function: shmqueue_dump_statistics
void
shmqueue_dump_statistics(struct shmqueue *shmq_header)
{
	int i;

	for (i = 0; i < SHMQUEUE_NBUCKET; i++)
		printf("store (new)   success (bucket=%d): %llu\n", i, shmq_header->header->sha_stat.ss_store_new_success[i]);

	for (i = 0; i < SHMQUEUE_NBUCKET; i++)
		printf("store (reuse) success (bucket=%d): %llu\n", i, shmq_header->header->sha_stat.ss_store_reuse_success[i]);

	for (i = 0; i < SHMQUEUE_NBUCKET; i++)
		printf("store failure         (bucket=%d): %llu\n", i, shmq_header->header->sha_stat.ss_store_failure[i]);

	for (i = 0; i < SHMQUEUE_NBUCKET; i++)
		printf("fetch (peek) success  (bucket=%d): %llu\n", i, shmq_header->header->sha_stat.ss_fetch_success[i]);

	printf("fetch (peek) failure  (bucket=%d): %llu\n", i, shmq_header->header->sha_stat.ss_fetch_failure);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1a8f(%rip), %r14      # 0x31ec
xorl %r15d, %r15d
movq (%rbx), %rax
movq 0x40(%rax,%r15,8), %rdx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1070
incq %r15
cmpq $0x8, %r15
jne 0x1760
leaq 0x1a90(%rip), %r14      # 0x3215
xorl %r15d, %r15d
movq (%rbx), %rax
movq 0x80(%rax,%r15,8), %rdx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1070
incq %r15
cmpq $0x8, %r15
jne 0x1788
leaq 0x1a8e(%rip), %r14      # 0x323e
xorl %r15d, %r15d
movq (%rbx), %rax
movq 0xc0(%rax,%r15,8), %rdx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1070
incq %r15
cmpq $0x8, %r15
jne 0x17b3
leaq 0x1a8c(%rip), %r14      # 0x3267
xorl %r15d, %r15d
movq (%rbx), %rax
movq 0x100(%rax,%r15,8), %rdx
movq %r14, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x1070
incq %r15
cmpq $0x8, %r15
jne 0x17de
movq (%rbx), %rax
movq 0x140(%rax), %rdx
leaq 0x1a80(%rip), %rdi      # 0x3290
movl $0x8, %esi
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
jmp 0x1070