// File: /workspace/github_c_makefile_star2_O3/9wm[P]9wm/event.c
// Function: clientmesg
void
clientmesg(XClientMessageEvent * e)
{
	Client *c;

	curtime = CurrentTime;
	if (e->message_type == exit_9wm) {
		cleanup();
		exit(0);
	} else if (e->message_type == restart_9wm) {
		fprintf(stderr, "*** 9wm restarting ***\n");
		cleanup();
		execvp(myargv[0], myargv);
		perror("9wm: exec failed");
		exit(1);
	} else if (e->message_type == wm_change_state) {
		c = getclient(e->window, 0);
		if (e->format == 32 && e->data.l[0] == IconicState && c != 0) {
			if (normal(c))
				hide(c);
		} else
			fprintf(stderr, "9wm: WM_CHANGE_STATE: format %d data %ld w 0x%x\n",
				e->format, e->data.l[0], (int) e->window);
	} else if ((e->message_type == wm_moveresize) && (e->data.l[2] == 8)) {
		Client *c = getclient(e->window, 0);
		move(c);
		return;
	} else if (e->message_type == net_wm_state) {
		if (e->data.l[1] == net_wm_state_fullscreen || e->data.l[2] == net_wm_state_fullscreen) {
			if (e->data.l[0] == 1)
				XChangeProperty(dpy, e->window, net_wm_state, XA_ATOM, 32, PropModeReplace, (unsigned char *)&net_wm_state_fullscreen, 1);
			else if (e->data.l[0] == 0)
				XDeleteProperty(dpy, e->window, net_wm_state);
		}
		return;
	} else if (e->message_type == active_window) {
		Client *c = getclient(e->window, 0);
		XMapRaised(dpy, c->parent);
		top(c);
		active(c);
		return;
	} else {
		char *name;

		name = XGetAtomName(dpy, e->message_type);
		fprintf(stderr, "9wm: unhandled ClientMessage %s (%d),  window 0x%x\n", name, (int) e->message_type,
			(int) e->window);
		XFree(name);
	}
}

// Assembly:
pushq %rbx
leaq 0x7c33(%rip), %rax      # 0xb9a8
movl $0x0, (%rax)
movq 0x28(%rdi), %rdx
leaq 0x7c12(%rip), %rax      # 0xb998
cmpq (%rax), %rdx
je 0x3f09
leaq 0x7c0a(%rip), %rax      # 0xb9a0
cmpq (%rax), %rdx
je 0x3f17
movq %rdi, %rbx
leaq 0x7c0f(%rip), %rax      # 0xb9b8
cmpq (%rax), %rdx
jne 0x3df6
movq 0x20(%rbx), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x58ca
movl 0x30(%rbx), %edx
movq 0x38(%rbx), %rcx
cmpl $0x20, %edx
jne 0x3ec4
cmpq $0x3, %rcx
jne 0x3ec4
testq %rax, %rax
je 0x3ec4
cmpl $0x1, 0x98(%rax)
jne 0x3e7e
movq %rax, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x530b
leaq 0x7be3(%rip), %rax      # 0xb9e0
cmpq (%rax), %rdx
jne 0x3e21
cmpq $0x8, 0x48(%rbx)
jne 0x3e21
movq 0x20(%rbx), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x58ca
movq %rax, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x524b
leaq 0x7bc8(%rip), %rax      # 0xb9f0
cmpq (%rax), %rdx
jne 0x3e80
leaq 0x7bc4(%rip), %rax      # 0xb9f8
movq (%rax), %rcx
cmpq %rcx, 0x40(%rbx)
je 0x3e43
cmpq %rcx, 0x48(%rbx)
jne 0x3e7e
movq 0x38(%rbx), %rcx
testq %rcx, %rcx
je 0x3ee1
cmpq $0x1, %rcx
jne 0x3e7e
leaq 0x7b2b(%rip), %rcx      # 0xb988
movq (%rcx), %rdi
movq 0x20(%rbx), %rsi
movl $0x4, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq $0x1
pushq %rax
callq 0x2370
addq $0x10, %rsp
popq %rbx
retq
leaq 0x7b61(%rip), %rax      # 0xb9e8
cmpq (%rax), %rdx
jne 0x3ef5
movq 0x20(%rbx), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x58ca
movq %rax, %rbx
leaq 0x7ae5(%rip), %rax      # 0xb988
movq (%rax), %rdi
movq 0x8(%rbx), %rsi
callq 0x2350
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5866
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
jmp 0x56cd
movq 0x712d(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movl 0x20(%rbx), %r8d
leaq 0x3690(%rip), %rsi      # 0x7569
xorl %eax, %eax
popq %rbx
jmp 0x22c0
leaq 0x7aa0(%rip), %rax      # 0xb988
movq (%rax), %rdi
movq 0x20(%rbx), %rsi
popq %rbx
jmp 0x2190
leaq 0x28(%rbx), %rsi
movq %rdx, %rdi
movq %rbx, %rdx
callq 0x27af
jmp 0x3e7e
xorl %eax, %eax
callq 0x3653
xorl %edi, %edi
callq 0x2530
callq 0x27fe