// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/ewmh.c
// Function: ewmh_init_screen
void ewmh_init_screen(ScreenInfo *s) {
	unsigned long pid = getpid();
	Atom supported[] = {
		xa_net_client_list,
		xa_net_client_list_stacking,
#ifdef VWM
		xa_net_number_of_desktops,
#endif
		xa_net_desktop_geometry,
		xa_net_desktop_viewport,
#ifdef VWM
		xa_net_current_desktop,
#endif
		xa_net_active_window,
		xa_net_workarea,
		xa_net_supporting_wm_check,

		xa_net_close_window,
		xa_net_moveresize_window,
		xa_net_restack_window,
		xa_net_request_frame_extents,

#ifdef VWM
		xa_net_wm_desktop,
#endif
		xa_net_wm_window_type,
		xa_net_wm_window_type_desktop,
		xa_net_wm_window_type_dock,
		xa_net_wm_state,
		xa_net_wm_state_maximized_vert,
		xa_net_wm_state_maximized_horz,
		xa_net_wm_state_fullscreen,
		xa_net_wm_state_hidden,
		xa_net_wm_allowed_actions,
		/* Not sure if it makes any sense including every action here
		 * as they'll already be listed per-client in the
		 * _NET_WM_ALLOWED_ACTIONS property, but EWMH spec is unclear.
		 * */
		xa_net_wm_action_move,
		xa_net_wm_action_resize,
		xa_net_wm_action_maximize_horz,
		xa_net_wm_action_maximize_vert,
		xa_net_wm_action_fullscreen,
		xa_net_wm_action_change_desktop,
		xa_net_wm_action_close,
		xa_net_frame_extents,
	};
#ifdef VWM
	unsigned long num_desktops = 8;
	unsigned long vdesk = s->vdesk;
#endif
	unsigned long workarea[4] = {
		0, 0,
		DisplayWidth(dpy, s->screen), DisplayHeight(dpy, s->screen)
	};
	s->supporting = XCreateSimpleWindow(dpy, s->root, 0, 0, 1, 1, 0, 0, 0);
	XChangeProperty(dpy, s->root, xa_net_supported,
			XA_ATOM, 32, PropModeReplace,
			(unsigned char *)&supported,
			sizeof(supported) / sizeof(Atom));
#ifdef VWM
	XChangeProperty(dpy, s->root, xa_net_number_of_desktops,
			XA_CARDINAL, 32, PropModeReplace,
			(unsigned char *)&num_desktops, 1);
#endif
	XChangeProperty(dpy, s->root, xa_net_desktop_geometry,
			XA_CARDINAL, 32, PropModeReplace,
			(unsigned char *)&workarea[2], 2);
	XChangeProperty(dpy, s->root, xa_net_desktop_viewport,
			XA_CARDINAL, 32, PropModeReplace,
			(unsigned char *)&workarea[0], 2);
#ifdef VWM
	XChangeProperty(dpy, s->root, xa_net_current_desktop,
			XA_CARDINAL, 32, PropModeReplace,
			(unsigned char *)&vdesk, 1);
#endif
	XChangeProperty(dpy, s->root, xa_net_workarea,
			XA_CARDINAL, 32, PropModeReplace,
			(unsigned char *)&workarea, 4);
	XChangeProperty(dpy, s->root, xa_net_supporting_wm_check,
			XA_WINDOW, 32, PropModeReplace,
			(unsigned char *)&s->supporting, 1);
	XChangeProperty(dpy, s->supporting, xa_net_supporting_wm_check,
			XA_WINDOW, 32, PropModeReplace,
			(unsigned char *)&s->supporting, 1);
	XChangeProperty(dpy, s->supporting, xa_net_wm_name,
			XA_STRING, 8, PropModeReplace,
			(const unsigned char *)"evilwm", 6);
	XChangeProperty(dpy, s->supporting, xa_net_wm_pid,
			XA_CARDINAL, 32, PropModeReplace,
			(unsigned char *)&pid, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdi, %rbx
callq 0x3160
cltq
leaq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movq 0x8750(%rip), %rax      # 0xd670
leaq 0x40(%rsp), %r15
movq %rax, (%r15)
movq 0x8749(%rip), %rax      # 0xd678
movq %rax, 0x8(%r15)
movq 0x8746(%rip), %rax      # 0xd680
movq %rax, 0x10(%r15)
movq 0x8743(%rip), %rax      # 0xd688
movq %rax, 0x18(%r15)
movq 0x8740(%rip), %rax      # 0xd690
movq %rax, 0x20(%r15)
movq 0x873d(%rip), %rax      # 0xd698
movq %rax, 0x28(%r15)
movq 0x873a(%rip), %rax      # 0xd6a0
movq %rax, 0x30(%r15)
movq 0x8737(%rip), %rax      # 0xd6a8
movq %rax, 0x38(%r15)
movq 0x8734(%rip), %rax      # 0xd6b0
movq %rax, 0x40(%r15)
movq 0x8731(%rip), %rax      # 0xd6b8
movq %rax, 0x48(%r15)
movq 0x872e(%rip), %rax      # 0xd6c0
movq %rax, 0x50(%r15)
movq 0x872b(%rip), %rax      # 0xd6c8
movq %rax, 0x58(%r15)
movq 0x8728(%rip), %rax      # 0xd6d0
movq %rax, 0x60(%r15)
movq 0x872d(%rip), %rax      # 0xd6e0
movq %rax, 0x68(%r15)
movq 0x872a(%rip), %rax      # 0xd6e8
movq %rax, 0x70(%r15)
movq 0x8727(%rip), %rax      # 0xd6f0
movq %rax, 0x78(%r15)
movq 0x8724(%rip), %rax      # 0xd6f8
movq %rax, 0x80(%r15)
movq 0x871e(%rip), %rax      # 0xd700
movq %rax, 0x88(%r15)
movq 0x8718(%rip), %rax      # 0xd708
movq %rax, 0x90(%r15)
movq 0x8712(%rip), %rax      # 0xd710
movq %rax, 0x98(%r15)
movq 0x870c(%rip), %rax      # 0xd718
movq %rax, 0xa0(%r15)
movq 0x8706(%rip), %rax      # 0xd720
movq %rax, 0xa8(%r15)
movq 0x8700(%rip), %rax      # 0xd728
movq %rax, 0xb0(%r15)
movq 0x86fa(%rip), %rax      # 0xd730
movq %rax, 0xb8(%r15)
movq 0x86f4(%rip), %rax      # 0xd738
movq %rax, 0xc0(%r15)
movq 0x86ee(%rip), %rax      # 0xd740
movq %rax, 0xc8(%r15)
movq 0x86e8(%rip), %rax      # 0xd748
movq %rax, 0xd0(%r15)
movq 0x86e2(%rip), %rax      # 0xd750
movq %rax, 0xd8(%r15)
movq 0x86dc(%rip), %rax      # 0xd758
movq %rax, 0xe0(%r15)
movq 0x86d6(%rip), %rax      # 0xd760
movq %rax, 0xe8(%r15)
movq 0x86d8(%rip), %rax      # 0xd770
movq %rax, 0xf0(%r15)
leaq 0x10(%rsp), %rax
movq $0x8, (%rax)
movl 0x40(%rbx), %eax
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x30(%rsp), %r12
xorps %xmm0, %xmm0
movaps %xmm0, -0x10(%r12)
leaq 0x8715(%rip), %r13      # 0xd7e0
movq (%r13), %rdi
movq 0xe8(%rdi), %rax
movslq (%rbx), %rcx
shlq $0x7, %rcx
movslq 0x18(%rax,%rcx), %rdx
movq %rdx, (%r12)
movslq 0x1c(%rax,%rcx), %rax
movq %rax, 0x8(%r12)
movq 0x8(%rbx), %rsi
subq $0x20, %rsp
movups %xmm0, 0x8(%rsp)
andl $0x0, (%rsp)
pushq $0x1
popq %r8
xorl %edx, %edx
xorl %ecx, %ecx
movl %r8d, %r9d
movq %r8, %r14
callq 0x3570
addq $0x20, %rsp
leaq 0x10(%rbx), %rcx
movq %rcx, (%rsp)
movq %rax, 0x10(%rbx)
movq (%r13), %rdi
movq 0x8(%rbx), %rsi
movq 0x8535(%rip), %rdx      # 0xd668
pushq $0x4
popq %rcx
pushq $0x20
popq %rbp
movl %ebp, %r8d
xorl %r9d, %r9d
pushq $0x1f
pushq %r15
callq 0x3460
popq %rcx
popq %rdx
movq (%r13), %rdi
movq 0x8(%rbx), %rsi
movq 0x8527(%rip), %rdx      # 0xd680
pushq $0x6
popq %r15
movq %r15, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq %r14
leaq 0x18(%rsp), %rax
pushq %rax
callq 0x3460
popq %rcx
popq %rdx
movq (%r13), %rdi
movq 0x8(%rbx), %rsi
movq 0x8504(%rip), %rdx      # 0xd688
pushq $0x2
popq %r14
movq %r15, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq %r14
pushq %r12
callq 0x3460
popq %rcx
popq %rdx
movq (%r13), %rdi
movq 0x8(%rbx), %rsi
movq 0x84e5(%rip), %rdx      # 0xd690
leaq 0x20(%rsp), %r12
movq %r15, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq %r14
pushq %r12
callq 0x3460
popq %rcx
popq %rdx
movq (%r13), %rdi
movq 0x8(%rbx), %rsi
movq 0x84c5(%rip), %rdx      # 0xd698
movq %r15, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq $0x1
popq %r14
pushq %r14
leaq 0x10(%rsp), %rax
pushq %rax
callq 0x3460
popq %rcx
popq %rdx
movq (%r13), %rdi
movq 0x8(%rbx), %rsi
movq 0x84aa(%rip), %rdx      # 0xd6a8
movq %r15, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq $0x4
pushq %r12
callq 0x3460
popq %rcx
popq %rdx
movq (%r13), %rdi
movq 0x8(%rbx), %rsi
movq 0x848f(%rip), %rdx      # 0xd6b0
pushq $0x21
popq %r12
movq %r12, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq %r14
movq 0x8(%rsp), %r15
pushq %r15
callq 0x3460
popq %rcx
popq %rdx
movq (%r13), %rdi
movq 0x10(%rbx), %rsi
movq 0x8463(%rip), %rdx      # 0xd6b0
movq %r12, %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq %r14
pushq %r15
callq 0x3460
popq %rcx
popq %rdx
movq (%r13), %rdi
movq 0x10(%rbx), %rsi
movq 0x8468(%rip), %rdx      # 0xd6d8
leaq 0x41f3(%rip), %rax      # 0x946a
pushq $0x1f
popq %rcx
pushq $0x8
popq %r8
xorl %r9d, %r9d
pushq $0x6
pushq %rax
callq 0x3460
popq %rcx
popq %rdx
movq (%r13), %rdi
movq 0x10(%rbx), %rsi
movq 0x84ce(%rip), %rdx      # 0xd768
pushq $0x6
popq %rcx
movl %ebp, %r8d
xorl %r9d, %r9d
pushq %r14
leaq 0x20(%rsp), %rax
pushq %rax
callq 0x3460
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq