// File: /workspace/github_c_makefile_star2_O2/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 0x1b746(%rip), %rax     # 0x28e04
cmpb $0x0, (%rax)
jne 0xd716
movl 0x8(%rbx), %eax
leaq 0x1b763(%rip), %rcx     # 0x28e30
movq (%rcx), %rcx
cmpl 0x90(%rcx), %eax
jne 0xd716
movl 0x4(%rbx), %edi
callq 0x1c860
testb %al, %al
je 0xd716
leaq 0x1b01d(%rip), %r14     # 0x28708
movq (%r14), %r14
testq %r14, %r14
je 0xd716
leaq 0x60(%r14), %r15
movq (%r15), %r15
testq %r15, %r15
je 0xd710
movq %r14, %rdi
movq %r15, %rsi
callq 0x8670
addq $0x48, %r15
jmp 0xd6f7
addq $0x78, %r14
jmp 0xd6eb
movl 0x8(%rbx), %eax
cmpl $0x28, %eax
je 0xd727
cmpl $0x23, %eax
jne 0xd81e
movl 0x4(%rbx), %edi
movq %rsp, %rsi
callq 0x199cc
testb %al, %al
je 0xd7b3
movl 0x8(%rbx), %eax
cmpl $0x28, %eax
je 0xd7da
cmpl $0x23, %eax
jne 0xd81e
leaq 0x1af76(%rip), %rax     # 0x286c8
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 0xd81e
testb $0x1, 0x1d(%rsp)
je 0xd81e
movq (%rsp), %rbx
movq 0x8(%rsp), %r14
movq 0x10(%rsp), %r15
leaq 0x1c(%rsp), %rdi
callq 0x4ae0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0xa072
jmp 0xd81e
leaq 0x1af1e(%rip), %rdi     # 0x286d8
movq (%rdi), %rdi
testq %rdi, %rdi
je 0xd81e
movl 0x4(%rdi), %eax
cmpl 0x4(%rbx), %eax
je 0xd7d0
addq $0x28, %rdi
jmp 0xd7ba
movq %rbx, %rsi
callq 0x1b91c
jmp 0xd81e
movq 0x10(%rsp), %rax
leaq 0x1aee2(%rip), %rcx     # 0x286c8
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 0x4b20
cmpb $0x1, %al
jne 0xd81e
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x8670
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq