// File: /workspace/github_c_makefile_star2_O0/baskerville[P]bspwm/src/query.c
// Function: desktop_matches
bool desktop_matches(coordinates_t *loc, coordinates_t *ref, desktop_select_t *sel)
{
	if (sel->occupied != OPTION_NONE &&
	    loc->desktop->root == NULL
	    ? sel->occupied == OPTION_TRUE
	    : sel->occupied == OPTION_FALSE) {
		return false;
	}

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

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

	if (sel->urgent != OPTION_NONE &&
	    !is_urgent(loc->desktop)
	    ? sel->urgent == OPTION_TRUE
	    : sel->urgent == OPTION_FALSE) {
		return false;
	}

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

#define DLAYOUT(p, e) \
	if (sel->p != OPTION_NONE && \
	    loc->desktop->layout != e \
	    ? sel->p == OPTION_TRUE \
	    : sel->p == OPTION_FALSE) { \
		return false; \
	}
	DLAYOUT(tiled, LAYOUT_TILED)
	DLAYOUT(monocle, LAYOUT_MONOCLE)
#undef DLAYOUT

#define DUSERLAYOUT(p, e) \
	if (sel->p != OPTION_NONE && \
	    loc->desktop->user_layout != e \
	    ? sel->p == OPTION_TRUE \
	    : sel->p == OPTION_FALSE) { \
		return false; \
	}
	DUSERLAYOUT(user_tiled, LAYOUT_TILED)
	DUSERLAYOUT(user_monocle, LAYOUT_MONOCLE)
#undef DUSERLAYOUT

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
je 0x23ae7
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x0, 0x30(%rax)
jne 0x23ae7
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
je 0x23af0
jmp 0x23af9
movq -0x20(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x23af9
movb $0x0, -0x1(%rbp)
jmp 0x23cc2
movq -0x20(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x23b27
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
leaq 0x11bee(%rip), %rcx     # 0x35700
movq (%rcx), %rcx
cmpq 0x58(%rcx), %rax
je 0x23b27
movq -0x20(%rbp), %rax
cmpl $0x1, 0x4(%rax)
je 0x23b31
jmp 0x23b3a
movq -0x20(%rbp), %rax
cmpl $0x2, 0x4(%rax)
jne 0x23b3a
movb $0x0, -0x1(%rbp)
jmp 0x23cc2
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x23b65
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
movq (%rcx), %rcx
cmpq 0x58(%rcx), %rax
je 0x23b65
movq -0x20(%rbp), %rax
cmpl $0x1, 0x8(%rax)
je 0x23b6f
jmp 0x23b78
movq -0x20(%rbp), %rax
cmpl $0x2, 0x8(%rax)
jne 0x23b78
movb $0x0, -0x1(%rbp)
jmp 0x23cc2
movq -0x20(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x23b9f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xaf60
testb $0x1, %al
jne 0x23b9f
movq -0x20(%rbp), %rax
cmpl $0x1, 0xc(%rax)
je 0x23ba9
jmp 0x23bb2
movq -0x20(%rbp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x23bb2
movb $0x0, -0x1(%rbp)
jmp 0x23cc2
movq -0x20(%rbp), %rax
cmpl $0x0, 0x10(%rax)
je 0x23bd8
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
je 0x23bd8
movq -0x20(%rbp), %rax
cmpl $0x1, 0x10(%rax)
je 0x23be2
jmp 0x23beb
movq -0x20(%rbp), %rax
cmpl $0x2, 0x10(%rax)
jne 0x23beb
movb $0x0, -0x1(%rbp)
jmp 0x23cc2
movq -0x20(%rbp), %rax
cmpl $0x0, 0x14(%rax)
je 0x23c0f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0x24(%rax)
je 0x23c0f
movq -0x20(%rbp), %rax
cmpl $0x1, 0x14(%rax)
je 0x23c19
jmp 0x23c22
movq -0x20(%rbp), %rax
cmpl $0x2, 0x14(%rax)
jne 0x23c22
movb $0x0, -0x1(%rbp)
jmp 0x23cc2
movq -0x20(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x23c46
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x1, 0x24(%rax)
je 0x23c46
movq -0x20(%rbp), %rax
cmpl $0x1, 0x18(%rax)
je 0x23c50
jmp 0x23c56
movq -0x20(%rbp), %rax
cmpl $0x2, 0x18(%rax)
jne 0x23c56
movb $0x0, -0x1(%rbp)
jmp 0x23cc2
movq -0x20(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
je 0x23c7a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0x28(%rax)
je 0x23c7a
movq -0x20(%rbp), %rax
cmpl $0x1, 0x1c(%rax)
je 0x23c84
jmp 0x23c8a
movq -0x20(%rbp), %rax
cmpl $0x2, 0x1c(%rax)
jne 0x23c8a
movb $0x0, -0x1(%rbp)
jmp 0x23cc2
movq -0x20(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x23cae
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x1, 0x28(%rax)
je 0x23cae
movq -0x20(%rbp), %rax
cmpl $0x1, 0x20(%rax)
je 0x23cb8
jmp 0x23cbe
movq -0x20(%rbp), %rax
cmpl $0x2, 0x20(%rax)
jne 0x23cbe
movb $0x0, -0x1(%rbp)
jmp 0x23cc2
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)