LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/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
movq %rsi, %r14
movq %rdi, %r15
leaq 0xedc0(%rip), %rbx      # 0x28708
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x19968
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4820
testl %eax, %eax
je 0x19965
addq $0x78, %rbx
jmp 0x19948
movq %rbx, (%r14)
testq %rbx, %rbx
setne %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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:
decl %edi
leaq 0xed8b(%rip), %rax      # 0x28708
movq (%rax), %rax
testq %rax, %rax
je 0x1999a
subl $0x1, %edi
jb 0x19990
addq $0x78, %rax
jmp 0x1997d
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
testq %rax, %rax
setne %al
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xed60(%rip), %rax      # 0x28708
movq (%rax), %rax
testq %rax, %rax
je 0x199c5
cmpl %edi, 0x20(%rax)
je 0x199bb
addq $0x78, %rax
jmp 0x199a8
movq %rax, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
testq %rax, %rax
setne %al
retq
// File: /workspace/github_c_makefile_star2_O2/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
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xed29(%rip), %r14      # 0x28708
movq (%r14), %r14
testq %r14, %r14
je 0x19a31
leaq 0x60(%r14), %r15
movq (%r15), %r15
testq %r15, %r15
je 0x19a20
movq 0x30(%r15), %rdi
callq 0x8e72
testq %rax, %rax
je 0x19a1a
cmpq $0x0, 0x48(%rax)
je 0x19a0c
cmpl %ebp, (%rax)
je 0x19a26
movq 0x30(%r15), %rsi
movq %rax, %rdi
callq 0x8ed0
jmp 0x199fc
addq $0x48, %r15
jmp 0x199eb
addq $0x78, %r14
jmp 0x199df
movq %r14, (%rbx)
movq %r15, 0x8(%rbx)
movq %rax, 0x10(%rbx)
testq %r14, %r14
setne %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0xc(%rax), %ecx
addq $0x10, %rax
xorl %r12d, %r12d
testl %ecx, %ecx
cmovgl %ecx, %r12d
movq %rax, (%rdi)
movq %rsp, %r15
pushq $0x1
popq %rbp
subl $0x1, %r12d
jb 0x1a381
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1b3a7
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
testq %rdi, %rdi
setne %al
testq %rsi, %rsi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1a336
movq 0x10(%rsp), %rdx
movl %ebp, %ecx
callq 0xc9b6
jmp 0x1a336
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0xc(%rax), %ebp
leaq 0x10(%rax), %rcx
movq %rcx, (%rdi)
xorl %ecx, %ecx
testl %ebp, %ebp
cmovlel %ecx, %ebp
leaq 0x5212(%rip), %r15      # 0x1f5cf
leaq 0xc(%rsp), %r12
leaq 0x10(%rsp), %r13
subl $0x1, %ebp
jb 0x1a410
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 0x199cc
testb %al, %al
je 0x1a404
leaq 0xe349(%rip), %rax      # 0x28740
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
callq 0xc578
movq (%r14), %rax
leaq 0x10(%rax), %rcx
movq %rcx, (%r14)
jmp 0x1a3c7
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %rax
movl 0xc(%rax), %ebp
addq $0x10, %rax
movq %rax, (%rdi)
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
subl $0x1, %ebp
jb 0x1a46d
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x1cd20
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1b4ef
movq %r15, %rdi
callq 0x1cdf2
jmp 0x1a440
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rbp
movl 0xc(%rbp), %r13d
addq $0x10, %rbp
movq %rbp, (%rsi)
leaq 0xc(%rdi), %rax
movq %rax, (%rsp)
leaq 0x8(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x4(%rdi), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
testl %r13d, %r13d
cmovlel %eax, %r13d
leaq 0x4090(%rip), %r12      # 0x1e557
subl $0x1, %r13d
jb 0x1a5a9
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1a500
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x5c27(%rip), %rsi      # 0x2011f
movq %r15, %rdx
jmp 0x1a593
leaq 0x5524(%rip), %rdi      # 0x1fa2b
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1a532
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x5bf4(%rip), %rsi      # 0x2011f
movq 0x10(%rsp), %rdx
jmp 0x1a593
leaq 0x54d1(%rip), %rdi      # 0x1fa0a
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1a564
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x5bc2(%rip), %rsi      # 0x2011f
movq 0x8(%rsp), %rdx
jmp 0x1a593
leaq 0x54cd(%rip), %rdi      # 0x1fa38
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1a59a
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x5b90(%rip), %rsi      # 0x2011f
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movq (%r14), %rbp
addq $0x10, %rbp
movq %rbp, (%r14)
jmp 0x1a4c7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rbp
movl 0xc(%rbp), %r13d
addq $0x10, %rbp
movq %rbp, (%rsi)
leaq 0x6(%rdi), %rax
movq %rax, (%rsp)
leaq 0x4(%rdi), %rax
movq %rax, 0x8(%rsp)
leaq 0x2(%rdi), %rax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
testl %r13d, %r13d
cmovlel %eax, %r13d
leaq 0x3cd2(%rip), %r12      # 0x1e2d9
subl $0x1, %r13d
jb 0x1a6e9
movq %r12, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1a640
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x5481(%rip), %rsi      # 0x1fab9
movq %r15, %rdx
jmp 0x1a6d3
leaq 0x5682(%rip), %rdi      # 0x1fcc9
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1a672
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x544e(%rip), %rsi      # 0x1fab9
movq 0x10(%rsp), %rdx
jmp 0x1a6d3
leaq 0x5e91(%rip), %rdi      # 0x2050a
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1a6a4
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x540c(%rip), %rsi      # 0x1faa9
movq 0x8(%rsp), %rdx
jmp 0x1a6d3
leaq 0x5e69(%rip), %rdi      # 0x20514
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1a6da
leaq 0x10(%rbp), %rax
movq %rax, (%r14)
movslq 0x14(%rbp), %rdi
addq %rbx, %rdi
leaq 0x53da(%rip), %rsi      # 0x1faa9
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movq (%r14), %rbp
addq $0x10, %rbp
movq %rbp, (%r14)
jmp 0x1a607
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %r12
movl 0xc(%r12), %ebp
addq $0x10, %r12
movq %r12, (%rsi)
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
leaq 0x2(%rdi), %rax
movq %rax, (%rsp)
leaq 0x55a3(%rip), %r13      # 0x20506
subl $0x1, %ebp
jb 0x1afda
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1af96
leaq 0x10(%r12), %rax
movq %rax, (%r14)
movslq 0x14(%r12), %rdi
addq %rbx, %rdi
leaq 0x4b18(%rip), %rsi      # 0x1faa9
movq %r15, %rdx
jmp 0x1afc7
leaq 0x5573(%rip), %rdi      # 0x20510
movq %r12, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1afce
leaq 0x10(%r12), %rax
movq %rax, (%r14)
movslq 0x14(%r12), %rdi
addq %rbx, %rdi
leaq 0x4ae6(%rip), %rsi      # 0x1faa9
movq (%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movq (%r14), %r12
addq $0x10, %r12
movq %r12, (%r14)
jmp 0x1af63
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %r12
movl 0xc(%r12), %ebp
addq $0x10, %r12
movq %r12, (%rsi)
leaq 0x4(%rsp), %rax
andl $0x0, (%rax)
xorl %eax, %eax
testl %ebp, %ebp
cmovlel %eax, %ebp
leaq 0x5159(%rip), %r13      # 0x20539
subl $0x1, %ebp
jb 0x1b4e0
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1b42f
leaq 0x10(%r12), %rax
movq %rax, (%r14)
movslq 0x14(%r12), %rdi
addq %rbx, %rdi
leaq 0x41bd(%rip), %rsi      # 0x1f5cf
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movl 0x4(%rsp), %edi
callq 0x6fb9
movq %rax, (%r15)
jmp 0x1b4d1
leaq 0x510d(%rip), %rdi      # 0x20543
movq %r12, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1b47a
leaq 0x10(%r12), %rax
movq %rax, (%r14)
movslq 0x14(%r12), %rdi
addq %rbx, %rdi
leaq 0x4173(%rip), %rsi      # 0x1f5cf
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movl 0x4(%rsp), %edi
movq (%r15), %rsi
callq 0x8045
movq %rax, 0x8(%r15)
jmp 0x1b4d1
leaq 0x50cc(%rip), %rdi      # 0x2054d
movq %r12, %rsi
movq %rbx, %rdx
callq 0x19f32
testb %al, %al
je 0x1b4d1
leaq 0x10(%r12), %rax
movq %rax, (%r14)
movslq 0x14(%r12), %rdi
addq %rbx, %rdi
leaq 0x4128(%rip), %rsi      # 0x1f5cf
leaq 0x4(%rsp), %rdx
xorl %eax, %eax
callq 0x41c0
movq 0x8(%r15), %rax
testq %rax, %rax
je 0x1b4c2
movq 0x30(%rax), %rdi
jmp 0x1b4c4
xorl %edi, %edi
movl 0x4(%rsp), %esi
callq 0xa74e
movq %rax, 0x10(%r15)
movq (%r14), %r12
addq $0x10, %r12
movq %r12, (%r14)
jmp 0x1b3e0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 0xd0cc(%rip), %rax      # 0x28738
cmpq $0x0, (%rax)
je 0x1b68c
leaq 0xd0b7(%rip), %rax      # 0x28730
movq (%rax), %rax
movq %rdi, 0x410(%rax)
movq %rax, 0x408(%rdi)
jmp 0x1b68f
movq %rdi, (%rax)
leaq 0xd09a(%rip), %rax      # 0x28730
movq %rdi, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/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 0x1b6ec
movq 0x408(%rdi), %rax
movq 0x410(%rdi), %rcx
testq %rax, %rax
je 0x1b6b9
movq %rcx, 0x410(%rax)
testq %rcx, %rcx
je 0x1b6c5
movq %rax, 0x408(%rcx)
leaq 0xd06c(%rip), %rdx      # 0x28738
cmpq %rdi, (%rdx)
jne 0x1b6d4
movq %rcx, (%rdx)
leaq 0xd055(%rip), %rcx      # 0x28730
cmpq %rdi, (%rcx)
jne 0x4460
movq %rax, (%rcx)
jmp 0x4460
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: remove_rule_by_cause
void remove_rule_by_cause(char *cause)
{
	rule_t *r = rule_head;
	struct tokenize_state state;
	char *class_name = tokenize_with_escape(&state, cause, COL_TOK[0]);
	char *instance_name = tokenize_with_escape(&state, NULL, COL_TOK[0]);
	char *name = tokenize_with_escape(&state, NULL, COL_TOK[0]);
	if (!class_name || !instance_name || !name) {
		free(class_name);
		free(instance_name);
		free(name);
		return;
	}

	while (r != NULL) {
		rule_t *next = r->next;
		if ((class_name != NULL && (streq(class_name, MATCH_ANY) || streq(r->class_name, class_name))) &&
		    (instance_name == NULL || streq(instance_name, MATCH_ANY) || streq(r->instance_name, instance_name)) &&
		    (name == NULL || streq(name, MATCH_ANY) || streq(r->name, name))) {
			remove_rule(r);
		}
		r = next;
	}
	free(class_name);
	free(instance_name);
	free(name);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rsi
leaq 0xd033(%rip), %rax      # 0x28738
movq (%rax), %r13
movq %rsp, %r15
pushq $0x3a
popq %rbp
movq %r15, %rdi
movl %ebp, %edx
callq 0x5f96
movq %rax, %rbx
movq %r15, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x5f96
movq %rax, %r14
movq %r15, %rdi
xorl %esi, %esi
movl %ebp, %edx
callq 0x5f96
movq %rax, %r15
testq %rbx, %rbx
setne %al
testq %r14, %r14
setne %cl
andb %al, %cl
testq %r15, %r15
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x1b7c8
testq %r13, %r13
je 0x1b7c8
movq %r13, %r12
movq 0x410(%r13), %r13
cmpb $0x2a, (%rbx)
jne 0x1b76d
cmpb $0x0, 0x1(%rbx)
je 0x1b77c
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4820
testl %eax, %eax
jne 0x1b753
cmpb $0x2a, (%r14)
jne 0x1b789
cmpb $0x0, 0x1(%r14)
je 0x1b79d
leaq 0x100(%r12), %rdi
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
jne 0x1b753
cmpb $0x2a, (%r15)
jne 0x1b7aa
cmpb $0x0, 0x1(%r15)
je 0x1b7be
leaq 0x200(%r12), %rdi
movq %r15, %rsi
callq 0x4820
testl %eax, %eax
jne 0x1b753
movq %r12, %rdi
callq 0x1b69a
jmp 0x1b753
movq %rbx, %rdi
callq 0x4460
movq %r14, %rdi
callq 0x4460
movq %r15, %rdi
callq 0x4460
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: remove_rule_by_index
bool remove_rule_by_index(int idx)
{
	for (rule_t *r = rule_head; r != NULL; r = r->next, idx--) {
		if (idx == 0) {
			remove_rule(r);
			return true;
		}
	}
	return false;
}

// Assembly:
pushq %rbx
leaq 0xcf41(%rip), %rbx      # 0x28738
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x1b815
subl $0x1, %edi
jb 0x1b80d
addq $0x410, %rbx            # imm = 0x410
jmp 0x1b7f7
movq %rbx, %rdi
callq 0x1b69a
testq %rbx, %rbx
setne %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: make_rule_consequence
rule_consequence_t *make_rule_consequence(void)
{
	rule_consequence_t *rc = calloc(1, sizeof(rule_consequence_t));
	rc->manage = rc->focus = rc->border = true;
	rc->layer = NULL;
	rc->state = NULL;
	rc->rect = NULL;
	rc->honor_size_hints = HONOR_SIZE_HINTS_DEFAULT;
	return rc;
}

// Assembly:
pushq %rax
pushq $0x1
popq %rdi
movl $0x638, %esi            # imm = 0x638
callq 0x48b0
movb $0x1, 0x62d(%rax)
movw $0x101, 0x62b(%rax)     # imm = 0x101
movl $0x4, 0x620(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: make_pending_rule
pending_rule_t *make_pending_rule(int fd, xcb_window_t win, rule_consequence_t *csq)
{
	pending_rule_t *pr = calloc(1, sizeof(pending_rule_t));
	pr->prev = pr->next = NULL;
	pr->event_head = pr->event_tail = NULL;
	pr->fd = fd;
	pr->win = win;
	pr->csq = csq;
	return pr;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r14d
pushq $0x1
popq %rdi
pushq $0x30
popq %rsi
callq 0x48b0
movl %r14d, (%rax)
movl %ebp, 0x4(%rax)
movq %rbx, 0x8(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: add_pending_rule
void add_pending_rule(pending_rule_t *pr)
{
	if (pr == NULL) {
		return;
	}
	if (pending_rule_head == NULL) {
		pending_rule_head = pending_rule_tail = pr;
	} else {
		pending_rule_tail->next = pr;
		pr->prev = pending_rule_tail;
		pending_rule_tail = pr;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x1b8a0
leaq 0xce5f(%rip), %rax      # 0x286d8
cmpq $0x0, (%rax)
je 0x1b893
leaq 0xceda(%rip), %rax      # 0x28760
movq (%rax), %rcx
movq %rdi, 0x28(%rcx)
movq %rcx, 0x20(%rdi)
jmp 0x1b89d
leaq 0xcec6(%rip), %rcx      # 0x28760
movq %rdi, (%rcx)
movq %rdi, (%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: remove_pending_rule
void remove_pending_rule(pending_rule_t *pr)
{
	if (pr == NULL) {
		return;
	}
	pending_rule_t *a = pr->prev;
	pending_rule_t *b = pr->next;
	if (a != NULL) {
		a->next = b;
	}
	if (b != NULL) {
		b->prev = a;
	}
	if (pr == pending_rule_head) {
		pending_rule_head = b;
	}
	if (pr == pending_rule_tail) {
		pending_rule_tail = a;
	}
	close(pr->fd);
	free(pr->csq);
	event_queue_t *eq = pr->event_head;
	while (eq != NULL) {
		event_queue_t *next = eq->next;
		free(eq);
		eq = next;
	}
	free(pr);
}

// Assembly:
testq %rdi, %rdi
je 0x1b91b
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rcx
testq %rax, %rax
je 0x1b8be
movq %rcx, 0x28(%rax)
testq %rcx, %rcx
je 0x1b8c7
movq %rax, 0x20(%rcx)
leaq 0xce0a(%rip), %rdx      # 0x286d8
cmpq %rbx, (%rdx)
jne 0x1b8d6
movq %rcx, (%rdx)
leaq 0xce83(%rip), %rcx      # 0x28760
cmpq %rbx, (%rcx)
jne 0x1b8e5
movq %rax, (%rcx)
movl (%rbx), %edi
callq 0x4150
movq 0x8(%rbx), %rdi
callq 0x4460
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x1b90c
movq 0x30(%rdi), %r14
callq 0x4460
movq %r14, %rdi
jmp 0x1b8f9
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4460
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: postpone_event
void postpone_event(pending_rule_t *pr, xcb_generic_event_t *evt)
{
	event_queue_t *eq = make_event_queue(evt);
	if (pr->event_tail == NULL) {
		pr->event_head = pr->event_tail = eq;
	} else {
		pr->event_tail->next = eq;
		eq->prev = pr->event_tail;
		pr->event_tail = eq;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1b945
movq 0x18(%rbx), %rcx
testq %rcx, %rcx
je 0x1b93b
movq %rax, 0x30(%rcx)
movq %rcx, 0x28(%rax)
jmp 0x1b93f
movq %rax, 0x10(%rbx)
movq %rax, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: apply_window_type
void _apply_window_type(xcb_window_t win, rule_consequence_t *csq)
{
	xcb_ewmh_get_atoms_reply_t win_type;
	if (xcb_ewmh_get_wm_window_type_reply(ewmh, xcb_ewmh_get_wm_window_type(ewmh, win), &win_type, NULL) == 1) {
		for (unsigned int i = 0; i < win_type.atoms_len; i++) {
			xcb_atom_t a = win_type.atoms[i];
			if (a == ewmh->_NET_WM_WINDOW_TYPE_TOOLBAR ||
			    a == ewmh->_NET_WM_WINDOW_TYPE_UTILITY) {
				csq->focus = false;
			} else if (a == ewmh->_NET_WM_WINDOW_TYPE_DIALOG) {
				SET_CSQ_STATE(STATE_FLOATING);
				csq->center = true;
			} else if (a == ewmh->_NET_WM_WINDOW_TYPE_DOCK ||
			           a == ewmh->_NET_WM_WINDOW_TYPE_DESKTOP ||
			           a == ewmh->_NET_WM_WINDOW_TYPE_NOTIFICATION) {
				csq->manage = false;
				if (a == ewmh->_NET_WM_WINDOW_TYPE_DESKTOP) {
					window_lower(win);
				}
			}
		}
		xcb_ewmh_get_atoms_reply_wipe(&win_type);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0xd4ac(%rip), %r12      # 0x28e30
movq (%r12), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x40d0
movq %rsp, %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x41a0
cmpb $0x1, %al
jne 0x1ba5f
xorl %r13d, %r13d
pushq $0x1
popq %r14
pushq $0x4
popq %r15
movl (%rsp), %eax
cmpq %rax, %r13
jae 0x1ba57
movq 0x8(%rsp), %rax
movl (%rax,%r13,4), %eax
movq (%r12), %rcx
cmpl 0xd8(%rcx), %eax
je 0x1b9dd
cmpl 0xe0(%rcx), %eax
jne 0x1b9e9
movb $0x0, 0x62c(%rbx)
incq %r13
jmp 0x1b9b4
cmpl 0xe8(%rcx), %eax
jne 0x1ba1e
movq 0x618(%rbx), %rax
testq %rax, %rax
jne 0x1ba0f
movq %r14, %rdi
movq %r15, %rsi
callq 0x48b0
movq %rax, 0x618(%rbx)
movl $0x2, (%rax)
movb $0x1, 0x629(%rbx)
jmp 0x1b9e4
movl 0xd0(%rcx), %edx
cmpl 0xd4(%rcx), %eax
jne 0x1ba39
movb $0x0, 0x62b(%rbx)
cmpl %edx, %eax
jne 0x1b9e4
jmp 0x1ba44
cmpl %edx, %eax
jne 0x1ba4d
movb $0x0, 0x62b(%rbx)
movl %ebp, %edi
callq 0x104ab
jmp 0x1b9e4
cmpl 0xf8(%rcx), %eax
jne 0x1b9e4
jmp 0x1ba2c
movq %rsp, %rdi
callq 0x4b10
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: apply_window_state
void _apply_window_state(xcb_window_t win, rule_consequence_t *csq)
{
	xcb_ewmh_get_atoms_reply_t win_state;
	if (xcb_ewmh_get_wm_state_reply(ewmh, xcb_ewmh_get_wm_state(ewmh, win), &win_state, NULL) == 1) {
		for (unsigned int i = 0; i < win_state.atoms_len; i++) {
			xcb_atom_t a = win_state.atoms[i];
			if (a == ewmh->_NET_WM_STATE_FULLSCREEN) {
				SET_CSQ_STATE(STATE_FULLSCREEN);
			} else if (a == ewmh->_NET_WM_STATE_BELOW) {
				SET_CSQ_LAYER(LAYER_BELOW);
			} else if (a == ewmh->_NET_WM_STATE_ABOVE) {
				SET_CSQ_LAYER(LAYER_ABOVE);
			} else if (a == ewmh->_NET_WM_STATE_STICKY) {
				csq->sticky = true;
			}
		}
		xcb_ewmh_get_atoms_reply_wipe(&win_state);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movl %edi, %esi
leaq 0xd3a8(%rip), %r15      # 0x28e30
movq (%r15), %r14
movq %r14, %rdi
callq 0x43a0
movq %rsp, %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x40b0
cmpb $0x1, %al
jne 0x1bb76
movq 0x8(%rsp), %r12
movq (%r15), %r13
xorl %ebp, %ebp
pushq $0x1
popq %r14
pushq $0x4
popq %r15
movl (%rsp), %eax
cmpq %rax, %rbp
jae 0x1bb6e
movl (%r12,%rbp,4), %eax
cmpl 0x128(%r13), %eax
jne 0x1bafb
movq 0x618(%rbx), %rax
testq %rax, %rax
jne 0x1baf3
movq %r14, %rdi
movq %r15, %rsi
callq 0x48b0
movq %rax, 0x618(%rbx)
movl $0x3, (%rax)
jmp 0x1bb66
cmpl 0x130(%r13), %eax
jne 0x1bb27
movq 0x610(%rbx), %rax
testq %rax, %rax
jne 0x1bb22
movq %r14, %rdi
movq %r15, %rsi
callq 0x48b0
movq %rax, 0x610(%rbx)
andl $0x0, (%rax)
jmp 0x1bb66
cmpl 0x12c(%r13), %eax
jne 0x1bb56
movq 0x610(%rbx), %rax
testq %rax, %rax
jne 0x1bb4e
movq %r14, %rdi
movq %r15, %rsi
callq 0x48b0
movq %rax, 0x610(%rbx)
movl $0x2, (%rax)
jmp 0x1bb66
cmpl 0x10c(%r13), %eax
jne 0x1bb66
movb $0x1, 0x625(%rbx)
incq %rbp
jmp 0x1babc
movq %rsp, %rdi
callq 0x4b10
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: apply_transient
void _apply_transient(xcb_window_t win, rule_consequence_t *csq)
{
	xcb_window_t transient_for = XCB_NONE;
	xcb_icccm_get_wm_transient_for_reply(dpy, xcb_icccm_get_wm_transient_for(dpy, win), &transient_for, NULL);
	if (transient_for != XCB_NONE) {
		SET_CSQ_STATE(STATE_FLOATING);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %r14
andl $0x0, (%r14)
movq %rsi, %rbx
movl %edi, %esi
leaq 0xcb25(%rip), %rax      # 0x286c8
movq (%rax), %r15
movq %r15, %rdi
callq 0x4730
movq %r15, %rdi
movl %eax, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x4620
cmpl $0x0, (%r14)
je 0x1bbe7
movq 0x618(%rbx), %rax
testq %rax, %rax
jne 0x1bbe1
pushq $0x1
popq %rdi
pushq $0x4
popq %rsi
callq 0x48b0
movq %rax, 0x618(%rbx)
movl $0x2, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: apply_hints
void _apply_hints(xcb_window_t win, rule_consequence_t *csq)
{
	xcb_size_hints_t size_hints;
	if (xcb_icccm_get_wm_normal_hints_reply(dpy, xcb_icccm_get_wm_normal_hints(dpy, win), &size_hints, NULL) == 1) {
		if ((size_hints.flags & (XCB_ICCCM_SIZE_HINT_P_MIN_SIZE | XCB_ICCCM_SIZE_HINT_P_MAX_SIZE)) &&
		    size_hints.min_width == size_hints.max_width && size_hints.min_height == size_hints.max_height) {
			SET_CSQ_STATE(STATE_FLOATING);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movl %edi, %esi
leaq 0xcac4(%rip), %rax      # 0x286c8
movq (%rax), %r14
movq %r14, %rdi
callq 0x49a0
movq %rsp, %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x4b20
cmpb $0x1, %al
jne 0x1bc60
testb $0x30, (%rsp)
je 0x1bc60
movl 0x14(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jne 0x1bc60
movl 0x18(%rsp), %eax
cmpl 0x20(%rsp), %eax
jne 0x1bc60
movq 0x618(%rbx), %rax
testq %rax, %rax
jne 0x1bc5a
pushq $0x1
popq %rdi
pushq $0x4
popq %rsi
callq 0x48b0
movq %rax, 0x618(%rbx)
movl $0x2, (%rax)
addq $0x48, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: apply_class
void _apply_class(xcb_window_t win, rule_consequence_t *csq)
{
	xcb_icccm_get_wm_class_reply_t reply;
	if (xcb_icccm_get_wm_class_reply(dpy, xcb_icccm_get_wm_class(dpy, win), &reply, NULL) == 1) {
		snprintf(csq->class_name, sizeof(csq->class_name), "%s", reply.class_name);
		snprintf(csq->instance_name, sizeof(csq->instance_name), "%s", reply.instance_name);
		xcb_icccm_get_wm_class_reply_wipe(&reply);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movl %edi, %esi
leaq 0xca4b(%rip), %rax      # 0x286c8
movq (%rax), %r14
movq %r14, %rdi
callq 0x4940
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x4a20
cmpb $0x1, %al
jne 0x1bce3
leaq 0x8(%rsp), %r14
movq 0x8(%r14), %rcx
leaq 0x239a(%rip), %r15      # 0x1e047
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4110
addq $0x100, %rbx            # imm = 0x100
movq (%r14), %rcx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4110
movq %r14, %rdi
callq 0x4480
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: apply_name
void _apply_name(xcb_window_t win, rule_consequence_t *csq)
{
	xcb_icccm_get_text_property_reply_t reply;
	if (xcb_icccm_get_wm_name_reply(dpy, xcb_icccm_get_wm_name(dpy, win), &reply, NULL) == 1) {
		snprintf(csq->name, sizeof(csq->name), "%s", reply.name);
		xcb_icccm_get_text_property_reply_wipe(&reply);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %esi
leaq 0xc9c8(%rip), %rax      # 0x286c8
movq (%rax), %r14
movq %r14, %rdi
callq 0x40a0
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x4260
cmpb $0x1, %al
jne 0x1bd4e
addq $0x200, %rbx            # imm = 0x200
leaq 0x8(%rsp), %r14
movq 0x10(%r14), %rcx
leaq 0x2310(%rip), %rdx      # 0x1e047
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4110
movq %r14, %rdi
callq 0x4830
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: apply_rules
void apply_rules(xcb_window_t win, rule_consequence_t *csq)
{
	_apply_window_type(win, csq);
	_apply_window_state(win, csq);
	_apply_transient(win, csq);
	_apply_hints(win, csq);
	_apply_class(win, csq);
	_apply_name(win, csq);

	rule_t *rule = rule_head;
	while (rule != NULL) {
		rule_t *next = rule->next;
		if ((streq(rule->class_name, MATCH_ANY) || streq(rule->class_name, csq->class_name)) &&
		    (streq(rule->instance_name, MATCH_ANY) || streq(rule->instance_name, csq->instance_name)) &&
		    (streq(rule->name, MATCH_ANY) || streq(rule->name, csq->name))) {
			char effect[MAXLEN];
			snprintf(effect, sizeof(effect), "%s", rule->effect);
			parse_keys_values(effect, csq);
			if (rule->one_shot) {
				remove_rule(rule);
				break;
			}
		}
		rule = next;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rbx
movl %edi, %ebp
callq 0x1b96a
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1ba6e
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1bb85
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1bbf1
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1bc68
movl %ebp, %edi
movq %rbx, %rsi
callq 0x1bced
leaq 0xc548(%rip), %rax      # 0x28738
movq (%rax), %r12
leaq 0x100(%rbx), %r14
leaq 0x200(%rbx), %r15
movq %rsp, %r13
testq %r12, %r12
je 0x1c2ba
movq %r12, %rbp
movq 0x410(%r12), %r12
cmpb $0x2a, (%rbp)
jne 0x1c224
cmpb $0x0, 0x1(%rbp)
je 0x1c233
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x4820
testl %eax, %eax
jne 0x1c204
cmpb $0x2a, 0x100(%rbp)
jne 0x1c245
cmpb $0x0, 0x101(%rbp)
je 0x1c258
leaq 0x100(%rbp), %rdi
movq %r14, %rsi
callq 0x4820
testl %eax, %eax
jne 0x1c204
cmpb $0x2a, 0x200(%rbp)
jne 0x1c26a
cmpb $0x0, 0x201(%rbp)
je 0x1c27d
leaq 0x200(%rbp), %rdi
movq %r15, %rsi
callq 0x4820
testl %eax, %eax
jne 0x1c204
leaq 0x300(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
movq %r13, %rdi
leaq 0x1db4(%rip), %rdx      # 0x1e047
xorl %eax, %eax
callq 0x4110
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1bd56
cmpb $0x1, 0x400(%rbp)
jne 0x1c204
movq %rbp, %rdi
callq 0x1b69a
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: schedule_rules
bool schedule_rules(xcb_window_t win, rule_consequence_t *csq)
{
	if (external_rules_command[0] == '\0') {
		return false;
	}
	resolve_rule_consequence(csq);
	int fds[2];
	if (pipe(fds) == -1) {
		return false;
	}
	pid_t pid = fork();
	if (pid == 0) {
		if (dpy != NULL) {
			close(xcb_get_file_descriptor(dpy));
		}
		dup2(fds[1], 1);
		close(fds[0]);
		char wid[SMALEN];
		char *csq_buf;
		print_rule_consequence(&csq_buf, csq);
		snprintf(wid, sizeof(wid), "%i", win);
		setsid();
		execl(external_rules_command, external_rules_command, wid, csq->class_name, csq->instance_name, csq_buf, NULL);
		free(csq_buf);
		err("Couldn't spawn rule command.\n");
	} else if (pid > 0) {
		close(fds[1]);
		pending_rule_t *pr = make_pending_rule(fds[0], win, csq);
		add_pending_rule(pr);
	}
	return (pid != -1);
}

// Assembly:
leaq 0xc4cd(%rip), %rax      # 0x287a0
cmpb $0x0, (%rax)
je 0x1c335
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rsi, %r14
movl %edi, %ebp
movq %rsi, %rdi
callq 0x18630
leaq 0x10(%rsp), %rdi
callq 0x45a0
cmpl $-0x1, %eax
je 0x1c338
callq 0x49b0
movl %eax, %ebx
testl %eax, %eax
je 0x1c33f
jle 0x1c3db
movl 0x14(%rsp), %edi
callq 0x4150
movl 0x10(%rsp), %edi
movl %ebp, %esi
movq %r14, %rdx
callq 0x1b847
movq %rax, %rdi
callq 0x1b86d
jmp 0x1c3db
xorl %eax, %eax
retq
xorl %eax, %eax
jmp 0x1c3e1
leaq 0xc382(%rip), %rax      # 0x286c8
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1c35a
callq 0x4380
movl %eax, %edi
callq 0x4150
movl 0x14(%rsp), %edi
pushq $0x1
popq %rsi
callq 0x4080
movl 0x10(%rsp), %edi
callq 0x4150
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x19447
leaq 0x3d99(%rip), %rdx      # 0x2011f
leaq 0x20(%rsp), %r12
pushq $0x20
popq %rsi
movq %r12, %rdi
movl %ebp, %ecx
xorl %eax, %eax
callq 0x4110
callq 0x4120
leaq 0x100(%r14), %r8
movq (%r15), %r9
andq $0x0, (%rsp)
leaq 0xc3eb(%rip), %rdi      # 0x287a0
movq %rdi, %rsi
movq %r12, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x4230
movq (%r15), %rdi
callq 0x4460
leaq 0x4185(%rip), %rdi      # 0x20559
xorl %eax, %eax
callq 0x5be8
cmpl $-0x1, %ebx
setne %al
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/rule.c
// Function: parse_rule_consequence
void parse_rule_consequence(int fd, rule_consequence_t *csq)
{
	if (fd == -1) {
		return;
	}
	char data[BUFSIZ];
	int nb;
	while ((nb = read(fd, data, sizeof(data))) > 0) {
		int end = MIN(nb, (int) sizeof(data) - 1);
		data[end] = '\0';
		parse_keys_values(data, csq);
	}
}

// Assembly:
cmpl $-0x1, %edi
je 0x1c446
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x2008, %rsp           # imm = 0x2008
movq %rsi, %rbx
movl %edi, %ebp
movq %rsp, %r14
movl $0x1fff, %r15d          # imm = 0x1FFF
movl $0x2000, %edx           # imm = 0x2000
movl %ebp, %edi
movq %r14, %rsi
callq 0x4270
testl %eax, %eax
jle 0x1c439
cmpl %r15d, %eax
cmovael %r15d, %eax
movb $0x0, (%rsp,%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1bd56
jmp 0x1c40e
addq $0x2008, %rsp           # imm = 0x2008
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/ewmh.c
// Function: ewmh_update_number_of_desktops
void ewmh_update_number_of_desktops(void)
{
	uint32_t desktops_count = 0;

	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			desktops_count++;
		}
	}

	xcb_ewmh_set_number_of_desktops(ewmh, default_screen, desktops_count);
}

// Assembly:
xorl %edx, %edx
leaq 0xc1c0(%rip), %rax      # 0x28708
movq (%rax), %rax
testq %rax, %rax
je 0x1c56a
leaq 0x60(%rax), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x1c564
incl %edx
addq $0x48, %rcx
jmp 0x1c554
addq $0x78, %rax
jmp 0x1c548
movq 0xc8bf(%rip), %rdi      # 0x28e30
leaq 0xc148(%rip), %rax      # 0x286c0
movl (%rax), %esi
jmp 0x40c0
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/ewmh.c
// Function: ewmh_get_desktop_index
uint32_t ewmh_get_desktop_index(desktop_t *d)
{
	uint32_t i = 0;
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *cd = m->desk_head; cd != NULL; cd = cd->next, i++) {
			if (d == cd) {
				return i;
			}
		}
	}
	return 0;
}

// Assembly:
leaq 0xc182(%rip), %rcx      # 0x28708
xorl %eax, %eax
xorl %edx, %edx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x1c5b3
leaq 0x60(%rcx), %rsi
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x1c5ab
cmpq %rdi, %rsi
je 0x1c5b1
addq $0x48, %rsi
incl %edx
jmp 0x1c596
addq $0x78, %rcx
jmp 0x1c58a
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/ewmh.c
// Function: ewmh_locate_desktop
bool ewmh_locate_desktop(uint32_t i, 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, i--) {
			if (i == 0) {
				loc->monitor = m;
				loc->desktop = d;
				loc->node = NULL;
				return true;
			}
		}
	}
	return false;
}

// Assembly:
leaq 0xc14d(%rip), %rax      # 0x28708
movq (%rax), %rax
testq %rax, %rax
je 0x1c5ec
leaq 0x60(%rax), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x1c5da
subl $0x1, %edi
jb 0x1c5e0
addq $0x48, %rcx
jmp 0x1c5c7
addq $0x78, %rax
jmp 0x1c5bb
movq %rax, (%rsi)
movq %rcx, 0x8(%rsi)
andq $0x0, 0x10(%rsi)
testq %rax, %rax
setne %al
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/ewmh.c
// Function: ewmh_set_wm_desktop
void ewmh_set_wm_desktop(node_t *n, desktop_t *d)
{
	uint32_t i = ewmh_get_desktop_index(d);
	for (node_t *f = first_extrema(n); f != NULL; f = next_leaf(f, n)) {
		if (f->client == NULL) {
			continue;
		}
		xcb_ewmh_set_wm_desktop(ewmh, f->id, i);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1c57f
movl %eax, %ebp
movq %rbx, %rdi
callq 0x8e72
movq %rax, %r14
testq %rax, %rax
je 0x1c66b
cmpq $0x0, 0x48(%r14)
je 0x1c65e
movq 0xc7dc(%rip), %rdi      # 0x28e30
movl (%r14), %esi
movl %ebp, %edx
callq 0x46f0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8ed0
jmp 0x1c63e
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/ewmh.c
// Function: ewmh_update_wm_desktops
void ewmh_update_wm_desktops(void)
{
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			uint32_t i = ewmh_get_desktop_index(d);
			for (node_t *n = first_extrema(d->root); n != NULL; n = next_leaf(n, d->root)) {
				if (n->client == NULL) {
					continue;
				}
				xcb_ewmh_set_wm_desktop(ewmh, n->id, i);
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0xc08a(%rip), %r15      # 0x28708
movq (%r15), %r15
testq %r15, %r15
je 0x1c6df
leaq 0x60(%r15), %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x1c6d9
movq %rbx, %rdi
callq 0x1c57f
movl %eax, %ebp
movq 0x30(%rbx), %rdi
callq 0x8e72
movq %rax, %r14
testq %rax, %rax
je 0x1c6d3
cmpq $0x0, 0x48(%r14)
je 0x1c6c5
movq 0xc775(%rip), %rdi      # 0x28e30
movl (%r14), %esi
movl %ebp, %edx
callq 0x46f0
movq 0x30(%rbx), %rsi
movq %r14, %rdi
callq 0x8ed0
jmp 0x1c6a5
addq $0x48, %rbx
jmp 0x1c68a
addq $0x78, %r15
jmp 0x1c67e
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/ewmh.c
// Function: ewmh_update_desktop_names
void ewmh_update_desktop_names(void)
{
	char names[MAXLEN];
	unsigned int i, j;
	uint32_t names_len;
	i = 0;

	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			for (j = 0; d->name[j] != '\0' && (i + j) < sizeof(names); j++) {
				names[i + j] = d->name[j];
			}
			i += j;
			if (i < sizeof(names)) {
				names[i++] = '\0';
			}
		}
	}

	if (i < 1) {
		xcb_ewmh_set_desktop_names(ewmh, default_screen, 0, NULL);
		return;
	}

	names_len = i - 1;
	xcb_ewmh_set_desktop_names(ewmh, default_screen, names_len, names);
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
xorl %edx, %edx
leaq 0xc00e(%rip), %rax      # 0x28708
movq (%rax), %rax
testq %rax, %rax
je 0x1c749
leaq 0x60(%rax), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x1c743
movl %edx, %edx
movq %rcx, %rsi
movb (%rsi), %dil
testb %dil, %dil
je 0x1c72f
cmpl $0xff, %edx
ja 0x1c72f
movb %dil, (%rsp,%rdx)
incq %rdx
incq %rsi
jmp 0x1c713
cmpl $0x100, %edx            # imm = 0x100
jae 0x1c73d
movb $0x0, (%rsp,%rdx)
incl %edx
addq $0x48, %rcx
jmp 0x1c706
addq $0x78, %rax
jmp 0x1c6fa
testl %edx, %edx
je 0x1c76f
decl %edx
movq 0xc6da(%rip), %rdi      # 0x28e30
leaq 0xbf63(%rip), %rax      # 0x286c0
movl (%rax), %esi
movq %rsp, %rcx
callq 0x4870
addq $0x108, %rsp            # imm = 0x108
retq
movq 0xc6ba(%rip), %rdi      # 0x28e30
leaq 0xbf43(%rip), %rax      # 0x286c0
movl (%rax), %esi
xorl %edx, %edx
xorl %ecx, %ecx
addq $0x108, %rsp            # imm = 0x108
jmp 0x4870
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/ewmh.c
// Function: ewmh_update_desktop_viewport
void ewmh_update_desktop_viewport(void)
{
	uint32_t desktops_count = 0;
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			desktops_count++;
		}
	}
	if (desktops_count == 0) {
		xcb_ewmh_set_desktop_viewport(ewmh, default_screen, 0, NULL);
		return;
	}
	xcb_ewmh_coordinates_t coords[desktops_count];
	uint16_t desktop = 0;
	for (monitor_t *m = mon_head; m != NULL; m = m->next) {
		for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
			coords[desktop++] = (xcb_ewmh_coordinates_t){m->rectangle.x, m->rectangle.y};
		}
	}
	xcb_ewmh_set_desktop_viewport(ewmh, default_screen, desktop, coords);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorl %eax, %eax
leaq 0xbf6a(%rip), %rcx      # 0x28708
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x1c7c0
leaq 0x60(%rcx), %rdx
movq (%rdx), %rdx
testq %rdx, %rdx
je 0x1c7ba
incl %eax
addq $0x48, %rdx
jmp 0x1c7aa
addq $0x78, %rcx
jmp 0x1c79e
testl %eax, %eax
je 0x1c841
movq %rsp, %rbx
movl %eax, %eax
movq %rsp, %rcx
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
subq %rax, %rcx
movq %rcx, %rsp
leaq 0xbf23(%rip), %rax      # 0x28708
xorl %edx, %edx
movq (%rax), %rax
testq %rax, %rax
je 0x1c81f
leaq 0x60(%rax), %rsi
movq (%rsi), %rsi
testq %rsi, %rsi
je 0x1c819
movzwl %dx, %edi
incl %edx
movswl 0x4c(%rax), %r8d
movswl 0x4e(%rax), %r9d
movl %r8d, (%rcx,%rdi,8)
movl %r9d, 0x4(%rcx,%rdi,8)
addq $0x48, %rsi
jmp 0x1c7f3
addq $0x78, %rax
jmp 0x1c7e7
movq 0xc60a(%rip), %rdi      # 0x28e30
leaq 0xbe93(%rip), %rax      # 0x286c0
movl (%rax), %esi
movzwl %dx, %edx
callq 0x4090
movq %rbx, %rsp
leaq -0x8(%rbp), %rsp
popq %rbx
popq %rbp
retq
movq 0xc5e8(%rip), %rdi      # 0x28e30
leaq 0xbe71(%rip), %rax      # 0x286c0
movl (%rax), %esi
xorl %edx, %edx
xorl %ecx, %ecx
leaq -0x8(%rbp), %rsp
popq %rbx
popq %rbp
jmp 0x4090
// File: /workspace/github_c_makefile_star2_O2/baskerville[P]bspwm/src/ewmh.c
// Function: ewmh_update_client_list
void ewmh_update_client_list(bool stacking)
{
	if (clients_count == 0) {
		xcb_ewmh_set_client_list(ewmh, default_screen, 0, NULL);
		xcb_ewmh_set_client_list_stacking(ewmh, default_screen, 0, NULL);
		return;
	}

	xcb_window_t wins[clients_count];
	unsigned int i = 0;

	if (stacking) {
		for (stacking_list_t *s = stack_head; s != NULL; s = s->next) {
			wins[i++] = s->node->id;
		}
		xcb_ewmh_set_client_list_stacking(ewmh, default_screen, clients_count, wins);
	} else {
		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;
					}
					wins[i++] = n->id;
				}
			}
		}
		xcb_ewmh_set_client_list(ewmh, default_screen, clients_count, wins);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xbc6b(%rip), %r15      # 0x286f4
movl (%r15), %eax
testq %rax, %rax
je 0x1cad5
movq %rsp, %r14
movq %rsp, %rbx
leaq 0xf(,%rax,4), %rax
andq $-0x10, %rax
subq %rax, %rbx
movq %rbx, %rsp
testb %dil, %dil
je 0x1cb0e
xorl %eax, %eax
leaq 0xbc91(%rip), %rcx      # 0x28748
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x1cb6b
movq (%rcx), %rdx
movl (%rdx), %edx
movl %eax, %esi
incl %eax
movl %edx, (%rbx,%rsi,4)
addq $0x10, %rcx
jmp 0x1cab7
movq 0xc354(%rip), %rdi      # 0x28e30
leaq 0xbbdd(%rip), %rbx      # 0x286c0
movl (%rbx), %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x4a40
movq 0xc33b(%rip), %rdi      # 0x28e30
movl (%rbx), %esi
xorl %edx, %edx
xorl %ecx, %ecx
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4320
movq %r14, -0x30(%rbp)
xorl %r12d, %r12d
leaq 0xbbec(%rip), %r13      # 0x28708
movq (%r13), %r13
testq %r13, %r13
je 0x1cb88
leaq 0x60(%r13), %r14
movq (%r14), %r14
testq %r14, %r14
je 0x1cb65
movq 0x30(%r14), %rdi
callq 0x8e72
testq %rax, %rax
je 0x1cb5f
cmpq $0x0, 0x48(%rax)
je 0x1cb51
movl (%rax), %ecx
movl %r12d, %edx
incl %r12d
movl %ecx, (%rbx,%rdx,4)
movq 0x30(%r14), %rsi
movq %rax, %rdi
callq 0x8ed0
jmp 0x1cb3a
addq $0x48, %r14
jmp 0x1cb29
addq $0x78, %r13
jmp 0x1cb1c
movq 0xc2be(%rip), %rdi      # 0x28e30
leaq 0xbb47(%rip), %rax      # 0x286c0
movl (%rax), %esi
movl (%r15), %edx
movq %rbx, %rcx
callq 0x4320
jmp 0x1cba7
movq 0xc2a1(%rip), %rdi      # 0x28e30
leaq 0xbb2a(%rip), %rax      # 0x286c0
movl (%rax), %esi
movl (%r15), %edx
movq %rbx, %rcx
callq 0x4a40
movq -0x30(%rbp), %r14
movq %r14, %rsp
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq