// File: /workspace/github_c_makefile_star2_O3/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 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq 0x74a0(%rip), %rax      # 0xc670
leaq 0x40(%rsp), %r14
movq %rax, (%r14)
movq 0x7499(%rip), %rax      # 0xc678
movq %rax, 0x8(%r14)
movq 0x7496(%rip), %rax      # 0xc680
movq %rax, 0x10(%r14)
movq 0x7493(%rip), %rax      # 0xc688
movq %rax, 0x18(%r14)
movq 0x7490(%rip), %rax      # 0xc690
movq %rax, 0x20(%r14)
movq 0x748d(%rip), %rax      # 0xc698
movq %rax, 0x28(%r14)
movq 0x748a(%rip), %rax      # 0xc6a0
movq %rax, 0x30(%r14)
movq 0x7487(%rip), %rax      # 0xc6a8
movq %rax, 0x38(%r14)
movq 0x7484(%rip), %rax      # 0xc6b0
movq %rax, 0x40(%r14)
movq 0x7481(%rip), %rax      # 0xc6b8
movq %rax, 0x48(%r14)
movq 0x747e(%rip), %rax      # 0xc6c0
movq %rax, 0x50(%r14)
movq 0x747b(%rip), %rax      # 0xc6c8
movq %rax, 0x58(%r14)
movq 0x7478(%rip), %rax      # 0xc6d0
movq %rax, 0x60(%r14)
movq 0x747d(%rip), %rax      # 0xc6e0
movq %rax, 0x68(%r14)
movq 0x747a(%rip), %rax      # 0xc6e8
movq %rax, 0x70(%r14)
movq 0x7477(%rip), %rax      # 0xc6f0
movq %rax, 0x78(%r14)
movq 0x7474(%rip), %rax      # 0xc6f8
movq %rax, 0x80(%r14)
movq 0x746e(%rip), %rax      # 0xc700
movq %rax, 0x88(%r14)
movq 0x7468(%rip), %rax      # 0xc708
movq %rax, 0x90(%r14)
movq 0x7462(%rip), %rax      # 0xc710
movq %rax, 0x98(%r14)
movq 0x745c(%rip), %rax      # 0xc718
movq %rax, 0xa0(%r14)
movq 0x7456(%rip), %rax      # 0xc720
movq %rax, 0xa8(%r14)
movq 0x7450(%rip), %rax      # 0xc728
movq %rax, 0xb0(%r14)
movq 0x744a(%rip), %rax      # 0xc730
movq %rax, 0xb8(%r14)
movq 0x7444(%rip), %rax      # 0xc738
movq %rax, 0xc0(%r14)
movq 0x743e(%rip), %rax      # 0xc740
movq %rax, 0xc8(%r14)
movq 0x7438(%rip), %rax      # 0xc748
movq %rax, 0xd0(%r14)
movq 0x7432(%rip), %rax      # 0xc750
movq %rax, 0xd8(%r14)
movq 0x742c(%rip), %rax      # 0xc758
movq %rax, 0xe0(%r14)
movq 0x7426(%rip), %rax      # 0xc760
movq %rax, 0xe8(%r14)
movq 0x7428(%rip), %rax      # 0xc770
movq %rax, 0xf0(%r14)
leaq 0x18(%rsp), %r12
movq $0x8, (%r12)
movl 0x40(%rbx), %eax
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x30(%rsp), %rbp
xorps %xmm0, %xmm0
movaps %xmm0, -0x10(%rbp)
leaq 0x7466(%rip), %r15      # 0xc7e0
movq (%r15), %rdi
movq 0xe8(%rdi), %rax
movslq (%rbx), %rcx
shlq $0x7, %rcx
movslq 0x18(%rax,%rcx), %rdx
movq %rdx, (%rbp)
movslq 0x1c(%rax,%rcx), %rax
movq %rax, 0x8(%rbp)
movq 0x8(%rbx), %rsi
subq $0x20, %rsp
movups %xmm0, 0x8(%rsp)
movl $0x0, (%rsp)
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0x3570
addq $0x20, %rsp
leaq 0x10(%rbx), %r13
movq %rax, 0x10(%rbx)
movq (%r15), %rdi
movq 0x8(%rbx), %rsi
movq 0x7288(%rip), %rdx      # 0xc668
movl $0x4, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq $0x1f
pushq %r14
callq 0x3460
addq $0x10, %rsp
movq (%r15), %rdi
movq 0x8(%rbx), %rsi
movq 0x7277(%rip), %rdx      # 0xc680
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
movl $0x1, %eax
pushq %rax
pushq %r12
callq 0x3460
addq $0x10, %rsp
movq (%r15), %rdi
movq 0x8(%rbx), %rsi
movq 0x7252(%rip), %rdx      # 0xc688
movl $0x2, %r12d
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %rbp
callq 0x3460
addq $0x10, %rsp
movq (%r15), %rdi
movq 0x8(%rbx), %rsi
movq 0x722c(%rip), %rdx      # 0xc690
leaq 0x20(%rsp), %r14
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r14
callq 0x3460
addq $0x10, %rsp
movq (%r15), %rdi
movq 0x8(%rbx), %rsi
movq 0x7206(%rip), %rdx      # 0xc698
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
movl $0x1, %eax
pushq %rax
movl $0x1, %r12d
leaq 0x10(%rsp), %rax
pushq %rax
callq 0x3460
addq $0x10, %rsp
movq (%r15), %rdi
movq 0x8(%rbx), %rsi
movq 0x71df(%rip), %rdx      # 0xc6a8
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq $0x4
pushq %r14
callq 0x3460
addq $0x10, %rsp
movq (%r15), %rdi
movq 0x8(%rbx), %rsi
movq 0x71be(%rip), %rdx      # 0xc6b0
movl $0x21, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r13
callq 0x3460
addq $0x10, %rsp
movq (%r15), %rdi
movq 0x10(%rbx), %rsi
movq 0x7195(%rip), %rdx      # 0xc6b0
movl $0x21, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq %r12
pushq %r13
callq 0x3460
addq $0x10, %rsp
movq (%r15), %rdi
movq 0x10(%rbx), %rsi
movq 0x7194(%rip), %rdx      # 0xc6d8
leaq 0x3f1f(%rip), %rax      # 0x946a
movl $0x1f, %ecx
movl $0x8, %r8d
xorl %r9d, %r9d
pushq $0x6
pushq %rax
callq 0x3460
addq $0x10, %rsp
movq (%r15), %rdi
movq 0x10(%rbx), %rsi
movq 0x71f5(%rip), %rdx      # 0xc768
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq %r12
leaq 0x18(%rsp), %rax
pushq %rax
callq 0x3460
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq