// File: /workspace/github_c_makefile_star2_O1/baskerville[P]bspwm/src/events.c
// Function: property_notify
void property_notify(xcb_generic_event_t *evt)
{
	xcb_property_notify_event_t *e = (xcb_property_notify_event_t *) evt;

	if (!ignore_ewmh_struts && e->atom == ewmh->_NET_WM_STRUT_PARTIAL && ewmh_handle_struts(e->window)) {
		for (monitor_t *m = mon_head; m != NULL; m = m->next) {
			for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
				arrange(m, d);
			}
		}
	}

	if (e->atom != XCB_ATOM_WM_HINTS && e->atom != XCB_ATOM_WM_NORMAL_HINTS) {
		return;
	}

	coordinates_t loc;
	if (!locate_window(e->window, &loc)) {
		for (pending_rule_t *pr = pending_rule_head; pr != NULL; pr = pr->next) {
			if (pr->win == e->window) {
				postpone_event(pr, evt);
				break;
			}
		}
		return;
	}

	if (e->atom == XCB_ATOM_WM_HINTS) {
		xcb_icccm_wm_hints_t hints;
		if (xcb_icccm_get_wm_hints_reply(dpy, xcb_icccm_get_wm_hints(dpy, e->window), &hints, NULL) == 1 &&
		    (hints.flags & XCB_ICCCM_WM_HINT_X_URGENCY))
			set_urgent(loc.monitor, loc.desktop, loc.node, xcb_icccm_wm_hints_get_urgency(&hints));
	} else if (e->atom == XCB_ATOM_WM_NORMAL_HINTS) {
		client_t *c = loc.node->client;
		if (xcb_icccm_get_wm_normal_hints_reply(dpy, xcb_icccm_get_wm_normal_hints(dpy, e->window), &c->size_hints, NULL) == 1) {
			arrange(loc.monitor, loc.desktop);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x1bbbe(%rip), %rax     # 0x29e04
cmpb $0x0, (%rax)
jne 0xe2a2
movl 0x8(%rbx), %eax
leaq 0x1bbdb(%rip), %rcx     # 0x29e30
movq (%rcx), %rcx
cmpl 0x90(%rcx), %eax
jne 0xe2a2
movl 0x4(%rbx), %edi
callq 0x1e250
leaq 0x1b499(%rip), %rcx     # 0x29708
movq (%rcx), %r14
testq %r14, %r14
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xe2a2
movq 0x60(%r14), %r15
testq %r15, %r15
je 0xe299
movq %r14, %rdi
movq %r15, %rsi
callq 0x8a5c
movq 0x48(%r15), %r15
jmp 0xe283
movq 0x78(%r14), %r14
testq %r14, %r14
jne 0xe27f
movl 0x8(%rbx), %eax
cmpl $0x28, %eax
je 0xe2b3
cmpl $0x23, %eax
jne 0xe3af
movl 0x4(%rbx), %edi
movq %rsp, %rsi
callq 0x1b0a3
testb %al, %al
je 0xe33f
movl 0x8(%rbx), %eax
cmpl $0x28, %eax
je 0xe361
cmpl $0x23, %eax
jne 0xe3af
leaq 0x1b3ea(%rip), %rax     # 0x296c8
movq (%rax), %r14
movl 0x4(%rbx), %esi
movq %r14, %rdi
callq 0x4160
leaq 0x1c(%rsp), %rdx
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x44c0
cmpb $0x1, %al
jne 0xe3af
testb $0x1, 0x1d(%rsp)
je 0xe3af
movq (%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r15
leaq 0x1c(%rsp), %rdi
callq 0x4af0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xa678
jmp 0xe3af
leaq 0x1b392(%rip), %rax     # 0x296d8
movq (%rax), %rdi
testq %rdi, %rdi
je 0xe3af
movl 0x4(%rbx), %eax
cmpl %eax, 0x4(%rdi)
je 0xe3a7
movq 0x28(%rdi), %rdi
testq %rdi, %rdi
jne 0xe351
jmp 0xe3af
movq 0x10(%rsp), %rax
leaq 0x1b35b(%rip), %rcx     # 0x296c8
movq (%rcx), %r14
movl 0x4(%rbx), %esi
movl $0x32c, %ebx            # imm = 0x32C
addq 0x48(%rax), %rbx
movq %r14, %rdi
callq 0x49a0
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4b30
cmpb $0x1, %al
jne 0xe3af
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x8a5c
jmp 0xe3af
movq %rbx, %rsi
callq 0x1d0ae
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq