LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/parse.c
// Function: parse_rectangle
bool parse_rectangle(char *s, xcb_rectangle_t *r)
{
	uint16_t w, h;
	int16_t x, y;
	if (sscanf(s, "%hux%hu+%hi+%hi", &w, &h, &x, &y) != 4) {
		return false;
	}
	r->width = w;
	r->height = h;
	r->x = x;
	r->y = y;
	return true;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
leaq 0x97bf(%rip), %rsi      # 0x20aad
leaq 0xe(%rsp), %rdx
leaq 0xc(%rsp), %rcx
leaq 0xa(%rsp), %r8
leaq 0x8(%rsp), %r9
xorl %eax, %eax
callq 0x41c0
cmpl $0x4, %eax
jne 0x17331
movzwl 0xe(%rsp), %ecx
movw %cx, 0x4(%rbx)
movzwl 0xc(%rsp), %ecx
movw %cx, 0x6(%rbx)
movzwl 0xa(%rsp), %ecx
movw %cx, (%rbx)
movzwl 0x8(%rsp), %ecx
movw %cx, 0x2(%rbx)
cmpl $0x4, %eax
sete %al
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/parse.c
// Function: parse_monitor_modifiers
bool parse_monitor_modifiers(char *desc, monitor_select_t *sel)
{
	char *tok;
	while ((tok = strrchr(desc, CAT_CHR)) != NULL) {
		tok[0] = '\0';
		tok++;
		if (streq("occupied", tok)) {
			sel->occupied = OPTION_TRUE;
		} else if (streq("!occupied", tok)) {
			sel->occupied = OPTION_FALSE;
		GET_MOD(focused)
		} else {
			return false;
		}
	}
	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
movl $0x2e, %esi
callq 0x4560
movq %rax, %rbx
movb $0x1, %al
testq %rbx, %rbx
je 0x177fe
leaq 0x94bc(%rip), %r12      # 0x20c2b
leaq 0x94b4(%rip), %r13      # 0x20c2a
leaq 0x94b8(%rip), %rbp      # 0x20c35
movb $0x0, (%rbx)
incq %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4820
testl %eax, %eax
je 0x177cd
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4820
testl %eax, %eax
je 0x177d6
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4820
testl %eax, %eax
je 0x177df
leaq 0x947d(%rip), %rdi      # 0x20c34
movq %rbx, %rsi
callq 0x4820
testl %eax, %eax
jne 0x1780d
movl $0x2, 0x4(%r14)
jmp 0x177e7
movl $0x1, (%r14)
jmp 0x177e7
movl $0x2, (%r14)
jmp 0x177e7
movl $0x1, 0x4(%r14)
movq %r15, %rdi
movl $0x2e, %esi
callq 0x4560
movq %rax, %rbx
testq %rax, %rax
jne 0x1777d
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
jmp 0x177fe
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_state
void query_state(FILE *rsp)
{
	fprintf(rsp, "{");
	fprintf(rsp, "\"focusedMonitorId\":%u,", mon->id);
	if (pri_mon != NULL) {
		fprintf(rsp, "\"primaryMonitorId\":%u,", pri_mon->id);
	}
	fprintf(rsp, "\"clientsCount\":%i,", clients_count);
	fprintf(rsp, "\"monitors\":");
	fprintf(rsp, "[");
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		query_monitor(m, rsp);
		if (m->next != NULL) {
			fprintf(rsp, ",");
		}
	}
	fprintf(rsp, "]");
	fprintf(rsp,",");
	fprintf(rsp, "\"focusHistory\":");
	query_history(rsp);
	fprintf(rsp,",");
	fprintf(rsp, "\"stackingList\":");
	query_stack(rsp);
	if (restart) {
		fprintf(rsp,",");
		fprintf(rsp, "\"eventSubscribers\":");
		query_subscribers(rsp);
	}
	fprintf(rsp, "}");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x7b, %edi
movq %rbx, %rsi
callq 0x4420
leaq 0x11525(%rip), %rax     # 0x29710
movq (%rax), %rax
movl 0x20(%rax), %edx
leaq 0x8b94(%rip), %rsi      # 0x20d8c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a30
leaq 0x114ef(%rip), %rax     # 0x296f8
movq (%rax), %rax
testq %rax, %rax
je 0x18225
movl 0x20(%rax), %edx
leaq 0x8b88(%rip), %rsi      # 0x20da3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a30
leaq 0x114c8(%rip), %rax     # 0x296f4
movl (%rax), %edx
leaq 0x8b85(%rip), %rsi      # 0x20dba
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a30
leaq 0x8b87(%rip), %rdi      # 0x20dcd
movl $0xb, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x49e0
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x4420
leaq 0x1149c(%rip), %rax     # 0x29708
movq (%rax), %r14
testq %r14, %r14
je 0x18299
movq %r14, %rdi
movq %rbx, %rsi
callq 0x18350
cmpq $0x0, 0x78(%r14)
je 0x18299
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x4420
movq 0x78(%r14), %r14
jmp 0x1826f
movl $0x5d, %edi
movq %rbx, %rsi
callq 0x4420
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x4420
leaq 0x8b1f(%rip), %rdi      # 0x20dd9
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x49e0
movq %rbx, %rdi
callq 0x18536
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x4420
leaq 0x8b01(%rip), %rdi      # 0x20de9
movl $0xf, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x49e0
movq %rbx, %rdi
callq 0x18592
leaq 0x113d7(%rip), %rax     # 0x296e0
cmpb $0x0, (%rax)
je 0x1833c
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x4420
leaq 0x8ad7(%rip), %rdi      # 0x20df9
movl $0x13, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x49e0
movq %rbx, %rdi
callq 0x185fe
movl $0x7d, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4420
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_history
void query_history(FILE *rsp)
{
	fprintf(rsp, "[");
	for (history_t *h = history_head; h != NULL; h = h->next) {
		query_coordinates(&h->loc, rsp);
		if (h->next != NULL) {
			fprintf(rsp, ",");
		}
	}
	fprintf(rsp, "]");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x4420
leaq 0x111d7(%rip), %rax     # 0x29728
movq (%rax), %r14
testq %r14, %r14
je 0x1857e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x18e2b
cmpq $0x0, 0x28(%r14)
je 0x1857e
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x4420
movq 0x28(%r14), %r14
jmp 0x18554
movl $0x5d, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4420
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_stack
void query_stack(FILE *rsp)
{
	fprintf(rsp, "[");
	for (stacking_list_t *s = stack_head; s != NULL; s = s->next) {
		fprintf(rsp, "%u", s->node->id);
		if (s->next != NULL) {
			fprintf(rsp, ",");
		}
	}
	fprintf(rsp, "]");
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x4420
leaq 0x1119a(%rip), %rax     # 0x29748
movq (%rax), %r15
testq %r15, %r15
je 0x185ec
leaq 0x8012(%rip), %r14      # 0x205cf
movq (%r15), %rax
movl (%rax), %edx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x4a30
cmpq $0x0, 0x10(%r15)
je 0x185ec
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x4420
movq 0x10(%r15), %r15
testq %r15, %r15
jne 0x185bd
movl $0x5d, %edi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4420
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_subscribers
void query_subscribers(FILE *rsp)
{
	fprintf(rsp, "[");
	for (subscriber_list_t *s = subscribe_head; s != NULL; s = s->next) {
		fprintf(rsp, "{\"fileDescriptor\": %i", fileno(s->stream));
		if (s->fifo_path != NULL) {
			fprintf(rsp, ",\"fifoPath\":\"%s\"", s->fifo_path);
		}
		fprintf(rsp, ",\"field\":%i,\"count\":%i}", s->field, s->count);
		if (s->next != NULL) {
			fprintf(rsp, ",");
		}
	}
	fprintf(rsp, "]");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x4420
leaq 0x1113a(%rip), %rax     # 0x29758
movq (%rax), %r13
testq %r13, %r13
je 0x1869b
leaq 0x8adf(%rip), %r14      # 0x2110c
leaq 0x8aff(%rip), %r15      # 0x21133
leaq 0x8ae7(%rip), %r12      # 0x21122
movq (%r13), %rdi
callq 0x4060
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
xorl %eax, %eax
callq 0x4a30
movq 0x8(%r13), %rdx
testq %rdx, %rdx
je 0x18669
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x4a30
movl 0x10(%r13), %edx
movl 0x14(%r13), %ecx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x4a30
cmpq $0x0, 0x20(%r13)
je 0x1869b
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x4420
movq 0x20(%r13), %r13
testq %r13, %r13
jne 0x1863b
movl $0x5d, %edi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4420
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_desktop
void query_desktop(desktop_t *d, FILE *rsp)
{
	fprintf(rsp, "{");
	fprintf(rsp, "\"name\":\"%s\",", d->name);
	fprintf(rsp, "\"id\":%u,", d->id);
	fprintf(rsp, "\"layout\":\"%s\",", LAYOUT_STR(d->layout));
	fprintf(rsp, "\"userLayout\":\"%s\",", LAYOUT_STR(d->user_layout));
	fprintf(rsp, "\"windowGap\":%i,", d->window_gap);
	fprintf(rsp, "\"borderWidth\":%u,", d->border_width);
	fprintf(rsp, "\"focusedNodeId\":%u,", d->focus != NULL ? d->focus->id : 0);
	fprintf(rsp, "\"padding\":");
	query_padding(d->padding, rsp);
	fprintf(rsp,",");
	fprintf(rsp, "\"root\":");
	query_node(d->root, rsp);
	fprintf(rsp, "}");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x7b, %edi
callq 0x4420
leaq 0x86e4(%rip), %rsi      # 0x20e0d
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4a30
movl 0x20(%r14), %edx
leaq 0x86d7(%rip), %rsi      # 0x20e1a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a30
cmpl $0x0, 0x24(%r14)
leaq 0x84fc(%rip), %r12      # 0x20c55
leaq 0x84fc(%rip), %r15      # 0x20c5c
movq %r15, %rdx
cmoveq %r12, %rdx
leaq 0x873e(%rip), %rsi      # 0x20eac
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a30
cmpl $0x0, 0x28(%r14)
cmoveq %r12, %r15
leaq 0x8733(%rip), %rsi      # 0x20ebb
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4a30
movl 0x60(%r14), %edx
leaq 0x86af(%rip), %rsi      # 0x20e4f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a30
movl 0x64(%r14), %edx
leaq 0x86aa(%rip), %rsi      # 0x20e5f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a30
movq 0x38(%r14), %rax
testq %rax, %rax
je 0x187ca
movl (%rax), %ebp
leaq 0x86fd(%rip), %rsi      # 0x20ece
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x4a30
leaq 0x86a4(%rip), %rdi      # 0x20e88
movl $0xa, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x49e0
movq 0x50(%r14), %rdx
movq 0x58(%r14), %r8
movq %rdx, %rcx
shrq $0x20, %rcx
movq %r8, %r9
shrq $0x20, %r9
leaq 0x88a1(%rip), %rsi      # 0x210b4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4a30
movl $0x2c, %edi
movq %rbx, %rsi
callq 0x4420
leaq 0x86b1(%rip), %rdi      # 0x20ee2
movl $0x7, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x49e0
movq 0x30(%r14), %rdi
movq %rbx, %rsi
callq 0x18864
movl $0x7d, %edi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4420
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_presel
void query_presel(presel_t *p, FILE *rsp)
{
	if (p == NULL) {
		fprintf(rsp, "null");
	} else {
		fprintf(rsp, "{\"splitDir\":\"%s\",\"splitRatio\":%lf}", SPLIT_DIR_STR(p->split_dir), p->split_ratio);
	}
}

// Assembly:
movq %rsi, %rcx
testq %rdi, %rdi
je 0x18b3e
movl 0x8(%rdi), %eax
testl %eax, %eax
je 0x18b54
cmpl $0x1, %eax
jne 0x18b5d
leaq 0x8705(%rip), %rdx      # 0x21241
jmp 0x18b72
leaq 0x83a5(%rip), %rdi      # 0x20eea
movl $0x4, %esi
movl $0x1, %edx
jmp 0x49e0
leaq 0x6b0e(%rip), %rdx      # 0x1f669
jmp 0x18b72
cmpl $0x2, %eax
leaq 0x6b08(%rip), %rax      # 0x1f66f
leaq 0x6b07(%rip), %rdx      # 0x1f675
cmoveq %rax, %rdx
movsd (%rdi), %xmm0
leaq 0x8425(%rip), %rsi      # 0x20fa2
movq %rcx, %rdi
movb $0x1, %al
jmp 0x4a30
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_node_ids
int query_node_ids(coordinates_t *mon_ref, coordinates_t *desk_ref, coordinates_t* ref, coordinates_t *trg, monitor_select_t *mon_sel, desktop_select_t *desk_sel, node_select_t *sel, FILE *rsp)
{
	int count = 0;
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		coordinates_t loc = {m, NULL, NULL};
		if ((trg->monitor != NULL && m != trg->monitor) ||
		    (mon_sel != NULL && !monitor_matches(&loc, mon_ref, mon_sel))) {
			continue;
		}
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			coordinates_t loc = {m, d, NULL};
			if ((trg->desktop != NULL && d != trg->desktop) ||
			    (desk_sel != NULL && !desktop_matches(&loc, desk_ref, desk_sel))) {
				continue;
			}
			count += query_node_ids_in(d->root, d, m, ref, trg, sel, rsp);
		}
	}
	return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x10(%rsp)
leaq 0x10891(%rip), %rax     # 0x29708
movq (%rax), %rbp
testq %rbp, %rbp
je 0x18f59
movq %r9, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %r8, 0x8(%rsp)
xorl %r14d, %r14d
movq %rbp, 0x30(%rsp)
leaq 0x38(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq (%r15), %rax
testq %rax, %rax
setne %cl
cmpq %rax, %rbp
setne %al
testb %al, %cl
jne 0x18f4a
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x18ed3
leaq 0x30(%rsp), %rdi
callq 0x18f6e
testb %al, %al
je 0x18f4a
movq 0x60(%rbp), %r13
testq %r13, %r13
je 0x18f4a
movq %rbp, 0x18(%rsp)
movq %r13, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x18efd
cmpq %rax, %r13
jne 0x18f44
testq %rbx, %rbx
je 0x18f18
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
callq 0x18fb4
testb %al, %al
je 0x18f44
movq 0x30(%r13), %rdi
movq 0x88(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
movq 0x80(%rsp), %r9
callq 0x19106
addl %eax, %r14d
movq 0x48(%r13), %r13
jmp 0x18ed7
movq 0x78(%rbp), %rbp
testq %rbp, %rbp
jne 0x18e94
jmp 0x18f5c
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: monitor_matches
bool monitor_matches(coordinates_t *loc, __attribute__((unused)) coordinates_t *ref, monitor_select_t *sel)
{
	if (sel->occupied != OPTION_NONE &&
	    loc->monitor->desk->root == NULL
	    ? sel->occupied == OPTION_TRUE
	    : sel->occupied == OPTION_FALSE) {
		return false;
	}

	if (sel->focused != OPTION_NONE &&
	    loc->monitor != mon
	    ? sel->focused == OPTION_TRUE
	    : sel->focused == OPTION_FALSE) {
		return false;
	}

	return true;
}

// Assembly:
movl (%rdx), %eax
testl %eax, %eax
je 0x18f8e
movq (%rdi), %rcx
movq 0x58(%rcx), %rcx
cmpq $0x0, 0x30(%rcx)
je 0x18f89
cmpl $0x2, %eax
jne 0x18f8e
jmp 0x18fa9
cmpl $0x1, %eax
je 0x18fa9
movl 0x4(%rdx), %eax
testl %eax, %eax
je 0x18fb1
movq (%rdi), %rcx
leaq 0x10771(%rip), %rdx     # 0x29710
cmpq (%rdx), %rcx
je 0x18fac
cmpl $0x1, %eax
jne 0x18fb1
xorl %eax, %eax
retq
cmpl $0x2, %eax
je 0x18fa9
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_node_ids_in
int query_node_ids_in(node_t *n, desktop_t *d, monitor_t *m, coordinates_t *ref, coordinates_t *trg, node_select_t *sel, FILE *rsp)
{
	int count = 0;
	if (n == NULL) {
		return 0;
	} else {
		coordinates_t loc = {m, d, n};
		if ((trg->node == NULL || n == trg->node) &&
		    (sel == NULL || node_matches(&loc, ref, sel))) {
			fprintf(rsp, "0x%08X\n", n->id);
			count++;
		}
		count += query_node_ids_in(n->first_child, d, m, ref, trg, sel, rsp);
		count += query_node_ids_in(n->second_child, d, m, ref, trg, sel, rsp);
	}
	return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, 0x8(%rsp)
testq %rdi, %rdi
je 0x191cf
movq %r9, %rbx
movq %r8, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbp
xorl %r15d, %r15d
movq %r12, 0x10(%rsp)
movq %r13, 0x18(%rsp)
movq %rbp, 0x20(%rsp)
movq 0x10(%r14), %rax
testq %rax, %rax
setne %dl
cmpq %rbp, %rax
setne %al
movl $0x0, %ecx
testb %al, %dl
jne 0x19197
testq %rbx, %rbx
je 0x1917c
leaq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
callq 0x191e4
movl $0x0, %ecx
testb %al, %al
je 0x19197
movl (%rbp), %edx
movq 0x60(%rsp), %rdi
leaq 0x6631(%rip), %rsi      # 0x1f7bc
xorl %eax, %eax
callq 0x4a30
movl $0x1, %ecx
addl %ecx, %r15d
movq 0x30(%rbp), %rdi
movq 0x60(%rsp), %rax
movq %rax, (%rsp)
movq %r13, %rsi
movq %r12, %rdx
movq 0x8(%rsp), %rcx
movq %r14, %r8
movq %rbx, %r9
callq 0x19106
movq 0x38(%rbp), %rbp
addl %eax, %r15d
testq %rbp, %rbp
jne 0x19134
jmp 0x191d2
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_desktop_ids
int query_desktop_ids(coordinates_t* mon_ref, coordinates_t *ref, coordinates_t *trg, monitor_select_t *mon_sel, desktop_select_t *sel, desktop_printer_t printer, FILE *rsp)
{
	int count = 0;
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		coordinates_t loc = {m, NULL, NULL};
		if ((trg->monitor != NULL && m != trg->monitor) ||
		    (mon_sel != NULL && !monitor_matches(&loc, mon_ref, mon_sel))) {
			continue;
		}
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			coordinates_t loc = {m, d, NULL};
			if ((trg->desktop != NULL && d != trg->desktop) ||
			    (sel != NULL && !desktop_matches(&loc, ref, sel))) {
				continue;
			}
			printer(d, rsp);
			count++;
		}
	}
	return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x10(%rsp)
leaq 0x100dd(%rip), %rax     # 0x29708
movq (%rax), %r13
testq %r13, %r13
je 0x196ed
movq %r9, %rbx
movq %r8, %r14
movq %rdx, %r12
movq %rcx, 0x8(%rsp)
xorl %ebp, %ebp
movq %r13, 0x30(%rsp)
leaq 0x38(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq (%r12), %rax
testq %rax, %rax
setne %cl
cmpq %rax, %r13
setne %al
testb %al, %cl
jne 0x196de
movq 0x8(%rsp), %rdx
testq %rdx, %rdx
je 0x19683
leaq 0x30(%rsp), %rdi
callq 0x18f6e
testb %al, %al
je 0x196de
movq 0x60(%r13), %r15
testq %r15, %r15
je 0x196de
movq %r13, 0x18(%rsp)
movq %r15, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x196ae
cmpq %rax, %r15
jne 0x196d8
testq %r14, %r14
je 0x196c9
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x18fb4
testb %al, %al
je 0x196d8
movq %r15, %rdi
movq 0x80(%rsp), %rsi
callq *%rbx
incl %ebp
movq 0x48(%r15), %r15
jmp 0x19687
movq 0x78(%r13), %r13
testq %r13, %r13
jne 0x19647
jmp 0x196ef
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: query_monitor_ids
int query_monitor_ids(coordinates_t *ref, coordinates_t *trg, monitor_select_t *sel, monitor_printer_t printer, FILE *rsp)
{
	int count = 0;
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		coordinates_t loc = {m, NULL, NULL};
		if ((trg->monitor != NULL && m != trg->monitor) ||
		    (sel != NULL && !monitor_matches(&loc, ref, sel))) {
			continue;
		}
		printer(m, rsp);
		count++;
	}
	return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r8, 0x8(%rsp)
leaq 0xffee(%rip), %rax      # 0x29708
movq (%rax), %r13
testq %r13, %r13
je 0x19782
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
xorl %ebp, %ebp
leaq 0x18(%rsp), %rbx
xorps %xmm0, %xmm0
movq %r13, 0x10(%rsp)
movups %xmm0, (%rbx)
movq (%r12), %rax
testq %rax, %rax
setne %cl
cmpq %rax, %r13
setne %al
testb %al, %cl
jne 0x19777
testq %r15, %r15
je 0x19767
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0x18f6e
testb %al, %al
je 0x19774
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq *%r14
incl %ebp
xorps %xmm0, %xmm0
movq 0x78(%r13), %r13
testq %r13, %r13
jne 0x19735
jmp 0x19784
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: print_ignore_request
void print_ignore_request(state_transition_t st, FILE *rsp)
{
	if (st == 0) {
		fprintf(rsp, "none");
	} else {
		unsigned int cnt = 0;
		if (st & STATE_TRANSITION_ENTER) {
			fprintf(rsp, "enter");
			cnt++;
		}
		if (st & STATE_TRANSITION_EXIT) {
			fprintf(rsp, "%sexit", cnt > 0 ? "," : "");
		}
	}
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
testl %edi, %edi
je 0x19829
movl %edi, %ebp
testb $0x1, %bpl
je 0x1981c
leaq 0x7d78(%rip), %rdi      # 0x21582
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x49e0
testb $0x2, %bpl
jne 0x19848
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x7255(%rip), %rdi      # 0x20a85
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x49e0
testb $0x1, %bpl
leaq 0x7d05(%rip), %rax      # 0x21558
leaq 0x7790(%rip), %rdx      # 0x20fea
cmoveq %rax, %rdx
leaq 0x78e6(%rip), %rsi      # 0x2114b
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4a30
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: print_modifier_mask
void print_modifier_mask(uint16_t m, FILE *rsp)
{
	switch (m) {
		case XCB_MOD_MASK_SHIFT:
			fprintf(rsp, "shift");
			break;
		case XCB_MOD_MASK_CONTROL:
			fprintf(rsp, "control");
			break;
		case XCB_MOD_MASK_LOCK:
			fprintf(rsp, "lock");
			break;
		case XCB_MOD_MASK_1:
			fprintf(rsp, "mod1");
			break;
		case XCB_MOD_MASK_2:
			fprintf(rsp, "mod2");
			break;
		case XCB_MOD_MASK_3:
			fprintf(rsp, "mod3");
			break;
		case XCB_MOD_MASK_4:
			fprintf(rsp, "mod4");
			break;
		case XCB_MOD_MASK_5:
			fprintf(rsp, "mod5");
			break;
	}
}

// Assembly:
movq %rsi, %rcx
cmpl $0xf, %edi
jg 0x198a6
decl %edi
cmpl $0x7, %edi
ja 0x19913
leaq 0x74a9(%rip), %rax      # 0x20d38
movslq (%rax,%rdi,4), %rdx
addq %rax, %rdx
jmpq *%rdx
leaq 0x719e(%rip), %rdi      # 0x20a3d
movl $0x5, %esi
jmp 0x19909
cmpl $0x3f, %edi
jg 0x198be
cmpl $0x10, %edi
je 0x198f4
cmpl $0x20, %edi
jne 0x19913
leaq 0x719e(%rip), %rdi      # 0x20a5a
jmp 0x19904
cmpl $0x40, %edi
je 0x198fd
cmpl $0x80, %edi
jne 0x19913
leaq 0x7192(%rip), %rdi      # 0x20a64
jmp 0x19904
leaq 0x7175(%rip), %rdi      # 0x20a50
jmp 0x19904
leaq 0x7167(%rip), %rdi      # 0x20a4b
jmp 0x19904
leaq 0x7156(%rip), %rdi      # 0x20a43
movl $0x7, %esi
jmp 0x19909
leaq 0x715a(%rip), %rdi      # 0x20a55
jmp 0x19904
leaq 0x715b(%rip), %rdi      # 0x20a5f
movl $0x4, %esi
movl $0x1, %edx
jmp 0x49e0
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: print_button_index
void print_button_index(int8_t b, FILE *rsp)
{
	switch (b) {
		case XCB_BUTTON_INDEX_ANY:
			fprintf(rsp, "any");
			break;
		case XCB_BUTTON_INDEX_1:
			fprintf(rsp, "button1");
			break;
		case XCB_BUTTON_INDEX_2:
			fprintf(rsp, "button2");
			break;
		case XCB_BUTTON_INDEX_3:
			fprintf(rsp, "button3");
			break;
		case -1:
			fprintf(rsp, "none");
			break;
	}
}

// Assembly:
incl %edi
cmpl $0x4, %edi
ja 0x19972
movq %rsi, %rcx
leaq 0x7433(%rip), %rax      # 0x20d58
movslq (%rax,%rdi,4), %rdx
addq %rax, %rdx
jmpq *%rdx
leaq 0x7150(%rip), %rdi      # 0x20a85
movl $0x4, %esi
jmp 0x19968
leaq 0x713a(%rip), %rdi      # 0x20a7d
jmp 0x19955
leaq 0x7121(%rip), %rdi      # 0x20a6d
jmp 0x19955
leaq 0x7120(%rip), %rdi      # 0x20a75
movl $0x7, %esi
jmp 0x19968
leaq 0x7106(%rip), %rdi      # 0x20a69
movl $0x3, %esi
movl $0x1, %edx
jmp 0x49e0
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: print_pointer_action
void print_pointer_action(pointer_action_t a, FILE *rsp)
{
	switch (a) {
		case ACTION_MOVE:
			fprintf(rsp, "move");
			break;
		case ACTION_RESIZE_SIDE:
			fprintf(rsp, "resize_side");
			break;
		case ACTION_RESIZE_CORNER:
			fprintf(rsp, "resize_corner");
			break;
		case ACTION_FOCUS:
			fprintf(rsp, "focus");
			break;
		case ACTION_NONE:
			fprintf(rsp, "none");
			break;
	}
}

// Assembly:
cmpl $0x4, %edi
ja 0x199d6
movq %rsi, %rcx
movl %edi, %eax
leaq 0x73e8(%rip), %rdx      # 0x20d6c
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
leaq 0x70f1(%rip), %rdi      # 0x20a85
jmp 0x199ab
leaq 0x70ed(%rip), %rdi      # 0x20a8a
movl $0xd, %esi
jmp 0x199cc
leaq 0x647c(%rip), %rdi      # 0x1fe27
movl $0x4, %esi
jmp 0x199cc
leaq 0x70df(%rip), %rdi      # 0x20a98
movl $0xb, %esi
jmp 0x199cc
leaq 0x62fe(%rip), %rdi      # 0x1fcc5
movl $0x5, %esi
movl $0x1, %edx
jmp 0x49e0
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: resolve_rule_consequence
void resolve_rule_consequence(rule_consequence_t *csq)
{
	coordinates_t ref = {mon, mon->desk, mon->desk->focus};
	coordinates_t dst = {NULL, NULL, NULL};
	monitor_t *monitor = monitor_from_desc(csq->monitor_desc, &ref, &dst) != SELECTOR_OK ? NULL : dst.monitor;
	desktop_t *desktop = desktop_from_desc(csq->desktop_desc, &ref, &dst) != SELECTOR_OK ? NULL : dst.desktop;
	node_t *node = node_from_desc(csq->node_desc, &ref, &dst) != SELECTOR_OK ? NULL : dst.node;

#define PRINT_OBJECT_ID(name) \
	if (name == NULL) { \
		csq->name##_desc[0] = '\0'; \
	} else { \
		snprintf(csq->name##_desc, 11, "0x%08X", name->id); \
	}
	PRINT_OBJECT_ID(monitor)
	PRINT_OBJECT_ID(desktop)
	PRINT_OBJECT_ID(node)
#undef PRINT_OBJECT_ID
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0xfd21(%rip), %rax      # 0x29710
movq (%rax), %rax
leaq 0x30(%rsp), %r12
movq %rax, (%r12)
movq 0x58(%rax), %rax
movq %rax, 0x8(%r12)
movq 0x38(%rax), %rax
movq %rax, 0x10(%r12)
xorl %eax, %eax
leaq 0x10(%rsp), %r13
movq %rax, 0x10(%r13)
xorps %xmm0, %xmm0
movaps %xmm0, (%r13)
addq $0x300, %rdi            # imm = 0x300
movq %rdi, (%rsp)
movq %r12, %rsi
movq %r13, %rdx
callq 0x19b1a
testl %eax, %eax
setne %r15b
movq (%r13), %rbp
leaq 0x400(%rbx), %rdi
movq %rdi, 0x8(%rsp)
movq %r12, %rsi
movq %r13, %rdx
callq 0x19eaf
movl $0x0, %r14d
testl %eax, %eax
jne 0x19a66
movq 0x18(%rsp), %r14
addq $0x500, %rbx            # imm = 0x500
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1a2ed
testl %eax, %eax
movl $0x0, %r12d
jne 0x19a8a
movq 0x20(%rsp), %r12
testq %rbp, %rbp
sete %al
orb %al, %r15b
cmpb $0x1, %r15b
jne 0x19aa2
movq (%rsp), %rax
movb $0x0, (%rax)
jmp 0x19abc
movl 0x20(%rbp), %ecx
leaq 0x76a6(%rip), %rdx      # 0x21152
movl $0xb, %esi
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x4110
testq %r14, %r14
je 0x19adf
movl 0x20(%r14), %ecx
leaq 0x7686(%rip), %rdx      # 0x21152
movl $0xb, %esi
movq 0x8(%rsp), %rdi
xorl %eax, %eax
callq 0x4110
jmp 0x19ae7
movq 0x8(%rsp), %rax
movb $0x0, (%rax)
testq %r12, %r12
je 0x19b08
movl (%r12), %ecx
leaq 0x765b(%rip), %rdx      # 0x21152
movl $0xb, %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4110
jmp 0x19b0b
movb $0x0, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: locate_leaf
bool locate_leaf(xcb_window_t win, coordinates_t *loc)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
				if (n->id == win) {
					loc->monitor = m;
					loc->desktop = d;
					loc->node = n;
					return true;
				}
			}
		}
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xeb66(%rip), %rax      # 0x29708
movq (%rax), %r14
testq %r14, %r14
je 0x1abe7
movq %rsi, %rbx
movl %edi, %ebp
movq 0x60(%r14), %r15
testq %r15, %r15
je 0x1abde
movq 0x30(%r15), %rdi
callq 0x920c
testq %rax, %rax
je 0x1abd8
cmpl %ebp, (%rax)
je 0x1abeb
movq 0x30(%r15), %rsi
movq %rax, %rdi
callq 0x926e
jmp 0x1abc1
movq 0x48(%r15), %r15
jmp 0x1abb3
movq 0x78(%r14), %r14
testq %r14, %r14
jne 0x1abaf
xorl %eax, %eax
jmp 0x1abf8
movq %r14, (%rbx)
movq %r15, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: locate_desktop
bool locate_desktop(char *name, coordinates_t *loc)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			if (streq(d->name, name)) {
				loc->monitor = m;
				loc->desktop = d;
				return true;
			}
		}
	}
	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xeaf6(%rip), %rax      # 0x29708
movq (%rax), %r12
testq %r12, %r12
je 0x1ac49
movq %rsi, %rbx
movq %rdi, %r14
movq 0x60(%r12), %r15
testq %r15, %r15
je 0x1ac3f
movq %r15, %rdi
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1ac4d
movq 0x48(%r15), %r15
jmp 0x1ac25
movq 0x78(%r12), %r12
testq %r12, %r12
jne 0x1ac20
xorl %eax, %eax
jmp 0x1ac56
movq %r12, (%rbx)
movq %r15, 0x8(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: desktop_from_index
bool desktop_from_index(uint16_t idx, coordinates_t *loc, monitor_t *mm)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		if (mm != NULL && m != mm) {
			continue;
		}
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next, idx--) {
			if (idx == 1) {
				loc->monitor = m;
				loc->desktop = d;
				loc->node = NULL;
				return true;
			}
		}
	}
	return false;
}

// Assembly:
leaq 0xea9f(%rip), %rax      # 0x29708
movq (%rax), %rax
testq %rax, %rax
je 0x1acb2
testq %rdx, %rdx
setne %cl
cmpq %rdx, %rax
setne %r8b
testb %r8b, %cl
jne 0x1ac9a
movq 0x60(%rax), %rcx
testq %rcx, %rcx
je 0x1ac9a
cmpw $0x1, %di
je 0x1aca0
decl %edi
movq 0x48(%rcx), %rcx
jmp 0x1ac87
movq 0x78(%rax), %rax
jmp 0x1ac6c
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
movq $0x0, 0x10(%rsi)
movb $0x1, %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: desktop_from_id
bool desktop_from_id(uint32_t id, coordinates_t *loc, monitor_t *mm)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		if (mm != NULL && m != mm) {
			continue;
		}
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			if (d->id == id) {
				loc->monitor = m;
				loc->desktop = d;
				loc->node = NULL;
				return true;
			}
		}
	}
	return false;
}

// Assembly:
leaq 0xea4c(%rip), %rax      # 0x29708
movq (%rax), %rax
testq %rax, %rax
je 0x1ad02
testq %rdx, %rdx
setne %cl
cmpq %rdx, %rax
setne %r8b
testb %r8b, %cl
jne 0x1acea
movq 0x60(%rax), %rcx
testq %rcx, %rcx
je 0x1acea
cmpl %edi, 0x20(%rcx)
je 0x1acf0
movq 0x48(%rcx), %rcx
jmp 0x1acda
movq 0x78(%rax), %rax
jmp 0x1acbf
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
movq $0x0, 0x10(%rsi)
movb $0x1, %al
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: desktop_from_name
bool desktop_from_name(char *name, coordinates_t *ref, coordinates_t *dst, desktop_select_t *sel, int *hits)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			if (streq(d->name, name)) {
				if (hits != NULL) {
					(*hits)++;
				}
				coordinates_t loc = {m, d, NULL};
				if (desktop_matches(&loc, ref, sel)) {
					dst->monitor = m;
					dst->desktop = d;
					return true;
				}
			}
		}
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0xe9ee(%rip), %rax      # 0x29708
movq (%rax), %rbp
testq %rbp, %rbp
je 0x1ad89
movq %r8, %r14
movq %rcx, %r15
movq %rsi, %r12
movq %rdi, %r13
movq %rdx, 0x8(%rsp)
movq 0x60(%rbp), %rbx
testq %rbx, %rbx
je 0x1ad80
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4820
testl %eax, %eax
jne 0x1ad7a
testq %r14, %r14
je 0x1ad53
incl (%r14)
movq %rbp, 0x10(%rsp)
movq %rbx, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x18fb4
testb %al, %al
jne 0x1ad8d
movq 0x48(%rbx), %rbx
jmp 0x1ad37
movq 0x78(%rbp), %rbp
testq %rbp, %rbp
jne 0x1ad33
xorl %eax, %eax
jmp 0x1ad9b
movq 0x8(%rsp), %rax
movq %rbp, (%rax)
movq %rbx, 0x8(%rax)
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: locate_monitor
bool locate_monitor(char *name, coordinates_t *loc)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		if (streq(m->name, name)) {
			loc->monitor = m;
			return true;
		}
	}
	return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
leaq 0xe952(%rip), %rax      # 0x29708
movq (%rax), %r15
testq %r15, %r15
je 0x1addc
movq %rsi, %rbx
movq %rdi, %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
je 0x1ade0
movq 0x78(%r15), %r15
testq %r15, %r15
jne 0x1adc4
xorl %eax, %eax
jmp 0x1ade5
movq %r15, (%rbx)
movb $0x1, %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: monitor_from_index
bool monitor_from_index(int idx, coordinates_t *loc)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next, idx--) {
		if (idx == 1) {
			loc->monitor = m;
			loc->desktop = NULL;
			loc->node = NULL;
			return true;
		}
	}
	return false;
}

// Assembly:
leaq 0xe916(%rip), %rax      # 0x29708
movq (%rax), %rax
testq %rax, %rax
je 0x1ae04
decl %edi
je 0x1ae07
movq 0x78(%rax), %rax
jmp 0x1adf5
xorl %eax, %eax
retq
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: monitor_from_id
bool monitor_from_id(uint32_t id, coordinates_t *loc)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		if (m->id == id) {
			loc->monitor = m;
			loc->desktop = NULL;
			loc->node = NULL;
			return true;
		}
	}
	return false;
}

// Assembly:
leaq 0xe8ed(%rip), %rax      # 0x29708
movq (%rax), %rax
testq %rax, %rax
je 0x1ae2e
cmpl %edi, 0x20(%rax)
je 0x1ae31
movq 0x78(%rax), %rax
jmp 0x1ae1e
xorl %eax, %eax
retq
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movb $0x1, %al
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/query.c
// Function: locate_window
bool locate_window(xcb_window_t win, coordinates_t *loc)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
				if (n->client == NULL) {
					continue;
				}
				if (n->id == win) {
					loc->monitor = m;
					loc->desktop = d;
					loc->node = n;
					return true;
				}
			}
		}
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xe8bc(%rip), %rax      # 0x29708
movq (%rax), %r14
testq %r14, %r14
je 0x1ae98
movq %rsi, %rbx
movl %edi, %ebp
movq 0x60(%r14), %r15
testq %r15, %r15
je 0x1ae8f
movq 0x30(%r15), %rdi
callq 0x920c
testq %rax, %rax
je 0x1ae89
cmpq $0x0, 0x48(%rax)
je 0x1ae7b
cmpl %ebp, (%rax)
je 0x1ae9c
movq 0x30(%r15), %rsi
movq %rax, %rdi
callq 0x926e
jmp 0x1ae6b
movq 0x48(%r15), %r15
jmp 0x1ae5d
movq 0x78(%r14), %r14
testq %r14, %r14
jne 0x1ae59
xorl %eax, %eax
jmp 0x1aea9
movq %r14, (%rbx)
movq %r15, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/restore.c
// Function: restore_history
void restore_history(jsmntok_t **t, char *json)
{
	int s = (*t)->size;
	(*t)++;

	for (int i = 0; i < s; i++) {
		coordinates_t loc = {NULL, NULL, NULL};
		restore_coordinates(&loc, t, json);
		if (loc.monitor != NULL && loc.desktop != NULL) {
			history_add(loc.monitor, loc.desktop, loc.node, true);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq (%rdi), %rax
movl 0xc(%rax), %ebp
addq $0x10, %rax
movq %rax, (%rdi)
testl %ebp, %ebp
jle 0x1b807
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1c822
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1b803
movq 0x10(%rsp), %rdx
movl $0x1, %ecx
callq 0xd4f6
decl %ebp
jne 0x1b7ba
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/restore.c
// Function: restore_stack
void restore_stack(jsmntok_t **t, char *json)
{
	int s = (*t)->size;
	(*t)++;

	for (int i = 0; i < s; i++) {
		uint32_t id;
		sscanf(json + (*t)->start, "%u", &id);
		coordinates_t loc;
		if (locate_window(id, &loc)) {
			stack_insert_after(stack_tail, loc.node);
		}
		(*t)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %rax
movl 0xc(%rax), %ebp
leaq 0x10(%rax), %rcx
movq %rcx, (%rdi)
testl %ebp, %ebp
jle 0x1b88e
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x4d91(%rip), %r15      # 0x205cf
leaq 0xc(%rsp), %r12
leaq 0x10(%rsp), %r13
movslq 0x14(%rax), %rdi
addq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x41c0
movl 0xc(%rsp), %edi
movq %r13, %rsi
callq 0x1ae3e
testb %al, %al
je 0x1b880
leaq 0xdecd(%rip), %rax      # 0x29740
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0xd008
movq (%r14), %rax
leaq 0x10(%rax), %rcx
movq %rcx, (%r14)
decl %ebp
jne 0x1b848
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/restore.c
// Function: restore_subscribers
void restore_subscribers(jsmntok_t **t, char *json)
{
	int s = (*t)->size;
	(*t)++;

	for (int i = 0; i < s; i++) {
		subscriber_list_t *s = make_subscriber(NULL, NULL, 0, 0);
		restore_subscriber(s, t, json);
		add_subscriber(s);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq (%rdi), %rax
movl 0xc(%rax), %ebp
addq $0x10, %rax
movq %rax, (%rdi)
testl %ebp, %ebp
jle 0x1b8e5
movq %rsi, %rbx
movq %rdi, %r14
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1e33c
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1c95e
movq %r15, %rdi
callq 0x1e416
decl %ebp
jne 0x1b8bb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/restore.c
// Function: restore_padding
void restore_padding(padding_t *p, jsmntok_t **t, char *json)
{
	int s = (*t)->size;
	(*t)++;

	for (int i = 0; i < s; i++) {
		if (keyeq("top", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%i", &p->top);
		} else if (keyeq("right", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%i", &p->right);
		} else if (keyeq("bottom", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%i", &p->bottom);
		} else if (keyeq("left", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%i", &p->left);
		}
		(*t)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq (%rsi), %rbp
movl 0xc(%rbp), %r13d
addq $0x10, %rbp
movq %rbp, (%rsi)
testl %r13d, %r13d
jle 0x1ba1b
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xc(%rdi), %rax
movq %rax, (%rsp)
leaq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x4(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x3c18(%rip), %r12      # 0x1f557
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1b96e
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x57b9(%rip), %rsi      # 0x2111f
movq %r15, %rdx
jmp 0x1ba01
leaq 0x50b6(%rip), %rdi      # 0x20a2b
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1b9a0
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x5786(%rip), %rsi      # 0x2111f
movq 0x10(%rsp), %rdx
jmp 0x1ba01
leaq 0x5063(%rip), %rdi      # 0x20a0a
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1b9d2
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x5754(%rip), %rsi      # 0x2111f
movq 0x8(%rsp), %rdx
jmp 0x1ba01
leaq 0x505f(%rip), %rdi      # 0x20a38
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1ba08
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x5722(%rip), %rsi      # 0x2111f
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movq (%r14), %rbp
addq $0x10, %rbp
movq %rbp, (%r14)
decl %r13d
jne 0x1b93f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/restore.c
// Function: restore_rectangle
void restore_rectangle(xcb_rectangle_t *r, jsmntok_t **t, char *json)
{
	int s = (*t)->size;
	(*t)++;

	for (int i = 0; i < s; i++) {
		if (keyeq("x", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%hi", &r->x);
		} else if (keyeq("y", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%hi", &r->y);
		} else if (keyeq("width", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%hu", &r->width);
		} else if (keyeq("height", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%hu", &r->height);
		}
		(*t)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq (%rsi), %rbp
movl 0xc(%rbp), %r13d
addq $0x10, %rbp
movq %rbp, (%rsi)
testl %r13d, %r13d
jle 0x1bb55
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x6(%rdi), %rax
movq %rax, (%rsp)
leaq 0x4(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x2(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x3860(%rip), %r12      # 0x1f2d9
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1baa8
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x5019(%rip), %rsi      # 0x20ab9
movq %r15, %rdx
jmp 0x1bb3b
leaq 0x521a(%rip), %rdi      # 0x20cc9
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1bada
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x4fe6(%rip), %rsi      # 0x20ab9
movq 0x10(%rsp), %rdx
jmp 0x1bb3b
leaq 0x5a29(%rip), %rdi      # 0x2150a
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1bb0c
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x4fa4(%rip), %rsi      # 0x20aa9
movq 0x8(%rsp), %rdx
jmp 0x1bb3b
leaq 0x5a01(%rip), %rdi      # 0x21514
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1bb42
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x4f72(%rip), %rsi      # 0x20aa9
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movq (%r14), %rbp
addq $0x10, %rbp
movq %rbp, (%r14)
decl %r13d
jne 0x1ba79
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/restore.c
// Function: restore_constraints
void restore_constraints(constraints_t *c, jsmntok_t **t, char *json)
{
	int s = (*t)->size;
	(*t)++;

	for (int i = 0; i < s; i++) {
		if (keyeq("min_width", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%hu", &c->min_width);
		} else if (keyeq("min_height", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%hu", &c->min_height);
		}
		(*t)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r12
movl 0xc(%r12), %ebp
addq $0x10, %r12
movq %r12, (%rsi)
testl %ebp, %ebp
jle 0x1c44f
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2(%rdi), %rax
movq %rax, (%rsp)
leaq 0x512b(%rip), %r13      # 0x21506
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1c409
leaq 0x10(%r12), %rax
movq %rax, (%r14)
movslq 0x14(%r12), %rdi
addq %rbx, %rdi
leaq 0x46a5(%rip), %rsi      # 0x20aa9
movq %r15, %rdx
jmp 0x1c43a
leaq 0x5100(%rip), %rdi      # 0x21510
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1c441
leaq 0x10(%r12), %rax
movq %rax, (%r14)
movslq 0x14(%r12), %rdi
addq %rbx, %rdi
leaq 0x4673(%rip), %rsi      # 0x20aa9
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movq (%r14), %r12
addq $0x10, %r12
movq %r12, (%r14)
decl %ebp
jne 0x1c3db
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/restore.c
// Function: restore_coordinates
void restore_coordinates(coordinates_t *loc, jsmntok_t **t, char *json)
{
	int s = (*t)->size;
	(*t)++;
	uint32_t id = 0;

	for (int i = 0; i < s; i++) {
		if (keyeq("monitorId", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%u", &id);
			loc->monitor = find_monitor(id);
		} else if (keyeq("desktopId", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%u", &id);
			loc->desktop = find_desktop_in(id, loc->monitor);
		} else if (keyeq("nodeId", *t, json)) {
			(*t)++;
			sscanf(json + (*t)->start, "%u", &id);
			loc->node = find_by_id_in(loc->desktop != NULL ? loc->desktop->root : NULL, id);
		}
		(*t)++;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r13
movl 0xc(%r13), %ebp
addq $0x10, %r13
movq %r13, (%rsi)
movl $0x0, 0x4(%rsp)
testl %ebp, %ebp
jle 0x1c94f
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x4cde(%rip), %r12      # 0x21539
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1c89f
leaq 0x10(%r13), %rax
movq %rax, (%r14)
movslq 0x14(%r13), %rdi
addq %rbx, %rdi
leaq 0x3d4d(%rip), %rsi      # 0x205cf
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movl 0x4(%rsp), %edi
callq 0x70e5
movq %rax, (%r15)
jmp 0x1c93d
leaq 0x4c9d(%rip), %rdi      # 0x21543
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1c8e8
leaq 0x10(%r13), %rax
movq %rax, (%r14)
movslq 0x14(%r13), %rdi
addq %rbx, %rdi
leaq 0x3d05(%rip), %rsi      # 0x205cf
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movl 0x4(%rsp), %edi
movq (%r15), %rsi
callq 0x82b0
movq %rax, 0x8(%r15)
jmp 0x1c93d
leaq 0x4c5e(%rip), %rdi      # 0x2154d
movq %r13, %rsi
movq %rbx, %rdx
callq 0x1b3b2
testb %al, %al
je 0x1c93d
leaq 0x10(%r13), %rax
movq %rax, (%r14)
movslq 0x14(%r13), %rdi
addq %rbx, %rdi
leaq 0x3cbc(%rip), %rsi      # 0x205cf
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x1c92e
movq 0x30(%rax), %rdi
jmp 0x1c930
xorl %edi, %edi
movl 0x4(%rsp), %esi
callq 0xadf0
movq %rax, 0x10(%r15)
movq (%r14), %r13
addq $0x10, %r13
movq %r13, (%r14)
decl %ebp
jne 0x1c85b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/rule.c
// Function: add_rule
void add_rule(rule_t *r)
 {
	if (rule_head == NULL) {
		rule_head = rule_tail = r;
	} else {
		rule_tail->next = r;
		r->prev = rule_tail;
		rule_tail = r;
	}
}

// Assembly:
leaq 0xcc62(%rip), %rax      # 0x29738
cmpq $0x0, (%rax)
je 0x1caf6
leaq 0xcc4d(%rip), %rax      # 0x29730
movq (%rax), %rax
movq %rdi, 0x410(%rax)
movq %rax, 0x408(%rdi)
jmp 0x1caf9
movq %rdi, (%rax)
leaq 0xcc30(%rip), %rax      # 0x29730
movq %rdi, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O3/baskerville[P]bspwm/src/rule.c
// Function: remove_rule
void remove_rule(rule_t *r)
{
	if (r == NULL) {
		return;
	}
	rule_t *prev = r->prev;
	rule_t *next = r->next;
	if (prev != NULL) {
		prev->next = next;
	}
	if (next != NULL) {
		next->prev = prev;
	}
	if (r == rule_head) {
		rule_head = next;
	}
	if (r == rule_tail) {
		rule_tail = prev;
	}
	free(r);
}

// Assembly:
testq %rdi, %rdi
je 0x1cb56
movq 0x408(%rdi), %rax
movq 0x410(%rdi), %rcx
testq %rax, %rax
je 0x1cb23
movq %rcx, 0x410(%rax)
testq %rcx, %rcx
je 0x1cb2f
movq %rax, 0x408(%rcx)
leaq 0xcc02(%rip), %rdx      # 0x29738
cmpq %rdi, (%rdx)
jne 0x1cb3e
movq %rcx, (%rdx)
leaq 0xcbeb(%rip), %rcx      # 0x29730
cmpq %rdi, (%rcx)
jne 0x4460
movq %rax, (%rcx)
jmp 0x4460
retq