// File: /workspace/github_c_makefile_star2_O0/mati75[P]evilwm/ewmh.c
// Function: ewmh_set_net_wm_state
void ewmh_set_net_wm_state(struct client *c) {
	Atom state[4];
	int i = 0;
	if (c->oldh)
		state[i++] = X_ATOM(_NET_WM_STATE_MAXIMIZED_VERT);
	if (c->oldw)
		state[i++] = X_ATOM(_NET_WM_STATE_MAXIMIZED_HORZ);
	if (c->oldh && c->oldw)
		state[i++] = X_ATOM(_NET_WM_STATE_FULLSCREEN);
	if (c == current || c->is_dock)
		state[i++] = X_ATOM(_NET_WM_STATE_FOCUSED);
	if (c == current) {
		if (c->screen->active != c->window) {
			XChangeProperty(display.dpy, c->screen->root,
			                X_ATOM(_NET_ACTIVE_WINDOW),
			                XA_WINDOW, 32, PropModeReplace,
			                (unsigned char *)&c->window, 1);
			c->screen->active = c->window;
		}
	} else if (c->screen->active == c->window) {
		Window w = None;
		XChangeProperty(display.dpy, c->screen->root, X_ATOM(_NET_ACTIVE_WINDOW),
		                XA_WINDOW, 32, PropModeReplace,
		                (unsigned char *)&w, 1);
		c->screen->active = None;
	}
	XChangeProperty(display.dpy, c->window, X_ATOM(_NET_WM_STATE),
			XA_ATOM, 32, PropModeReplace,
			(unsigned char *)&state, i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0xa12d
leaq 0x8c6c(%rip), %rax      # 0x12d80
movq 0xe8(%rax), %rcx
movl -0x34(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
cltq
movq %rcx, -0x30(%rbp,%rax,8)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0xa157
leaq 0x8c42(%rip), %rax      # 0x12d80
movq 0xf0(%rax), %rcx
movl -0x34(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
cltq
movq %rcx, -0x30(%rbp,%rax,8)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
je 0xa18b
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
je 0xa18b
leaq 0x8c0e(%rip), %rax      # 0x12d80
movq 0x100(%rax), %rcx
movl -0x34(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
cltq
movq %rcx, -0x30(%rbp,%rax,8)
movq -0x8(%rbp), %rax
leaq 0x8be2(%rip), %rcx      # 0x12d78
cmpq (%rcx), %rax
je 0xa1a8
movq -0x8(%rbp), %rax
cmpl $0x0, 0x94(%rax)
je 0xa1c8
leaq 0x8bd1(%rip), %rax      # 0x12d80
movq 0x108(%rax), %rcx
movl -0x34(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x34(%rbp)
cltq
movq %rcx, -0x30(%rbp,%rax,8)
movq -0x8(%rbp), %rax
leaq 0x8ba5(%rip), %rcx      # 0x12d78
cmpq (%rcx), %rax
jne 0xa246
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
je 0xa244
leaq 0x8b8c(%rip), %rax      # 0x12d80
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x8b76(%rip), %rax      # 0x12d80
movq 0x78(%rax), %rdx
movq -0x8(%rbp), %rax
movl $0x21, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
movq %rax, (%rsp)
movl $0x1, 0x8(%rsp)
callq 0x4650
movq -0x8(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rcx, 0x20(%rax)
jmp 0xa2b9
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jne 0xa2b7
movq $0x0, -0x40(%rbp)
leaq 0x8b16(%rip), %rax      # 0x12d80
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x8b00(%rip), %rax      # 0x12d80
movq 0x78(%rax), %rdx
movl $0x21, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
leaq -0x40(%rbp), %rax
movq %rax, (%rsp)
movl $0x1, 0x8(%rsp)
callq 0x4650
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq $0x0, 0x20(%rax)
jmp 0xa2b9
leaq 0x8ac0(%rip), %rax      # 0x12d80
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x8aaf(%rip), %rax      # 0x12d80
movq 0xe0(%rax), %rdx
movl -0x34(%rbp), %eax
movl $0x4, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
leaq -0x30(%rbp), %r10
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
callq 0x4650
addq $0x50, %rsp
popq %rbp
retq