// File: /workspace/github_c_makefile_star2_O2/kek[P]evilwm/screen.c
// Function: maximise_client
void maximise_client(Client *c, int action, int hv) {
	if (hv & MAXIMISE_HORZ) {
		if (c->oldw) {
			if (action == NET_WM_STATE_REMOVE
					|| action == NET_WM_STATE_TOGGLE) {
				c->x = c->oldx;
				c->width = c->oldw;
				c->oldw = 0;
				XDeleteProperty(dpy, c->window, xa_evilwm_unmaximised_horz);
			}
		} else {
			if (action == NET_WM_STATE_ADD
					|| action == NET_WM_STATE_TOGGLE) {
				unsigned long props[2];
				c->oldx = c->x;
				c->oldw = c->width;
				c->x = 0;
				c->width = DisplayWidth(dpy, c->screen->screen);
				props[0] = c->oldx;
				props[1] = c->oldw;
				XChangeProperty(dpy, c->window, xa_evilwm_unmaximised_horz,
						XA_CARDINAL, 32, PropModeReplace,
						(unsigned char *)&props, 2);
			}
		}
	}
	if (hv & MAXIMISE_VERT) {
		if (c->oldh) {
			if (action == NET_WM_STATE_REMOVE
					|| action == NET_WM_STATE_TOGGLE) {
				c->y = c->oldy;
				c->height = c->oldh;
				c->oldh = 0;
				XDeleteProperty(dpy, c->window, xa_evilwm_unmaximised_vert);
			}
		} else {
			if (action == NET_WM_STATE_ADD
					|| action == NET_WM_STATE_TOGGLE) {
				unsigned long props[2];
				c->oldy = c->y;
				c->oldh = c->height;
				c->y = 0;
				c->height = DisplayHeight(dpy, c->screen->screen);
				props[0] = c->oldy;
				props[1] = c->oldh;
				XChangeProperty(dpy, c->window, xa_evilwm_unmaximised_vert,
						XA_CARDINAL, 32, PropModeReplace,
						(unsigned char *)&props, 2);
			}
		}
	}
	ewmh_set_net_wm_state(c);
	moveresize(c);
	discard_enter_events(c);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
testb $0x1, %bpl
je 0x79c6
movl 0x40(%rbx), %eax
testl %eax, %eax
je 0x795c
testl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
jne 0x79c6
movl 0x38(%rbx), %ecx
movl %ecx, 0x24(%rbx)
movl %eax, 0x2c(%rbx)
andl $0x0, 0x40(%rbx)
leaq 0x5e9b(%rip), %rax      # 0xd7e0
movq (%rax), %rdi
movq (%rbx), %rsi
leaq 0x5d06(%rip), %rax      # 0xd658
movq (%rax), %rdx
callq 0x3230
jmp 0x79c6
leal -0x1(%r14), %eax
cmpl $0x1, %eax
ja 0x79c6
movslq 0x24(%rbx), %rax
movl %eax, 0x38(%rbx)
movslq 0x2c(%rbx), %rcx
movl %ecx, 0x40(%rbx)
andl $0x0, 0x24(%rbx)
leaq 0x5e62(%rip), %rdx      # 0xd7e0
movq (%rdx), %rdi
movq 0xe8(%rdi), %rdx
movq 0x10(%rbx), %rsi
movslq (%rsi), %rsi
shlq $0x7, %rsi
movl 0x18(%rdx,%rsi), %edx
movl %edx, 0x2c(%rbx)
movq %rsp, %r10
movq %rax, (%r10)
movq %rcx, 0x8(%r10)
movq (%rbx), %rsi
leaq 0x5caa(%rip), %rax      # 0xd658
movq (%rax), %rdx
pushq $0x6
popq %rcx
pushq $0x20
popq %r8
xorl %r9d, %r9d
pushq $0x2
pushq %r10
callq 0x3460
popq %rcx
popq %rdx
testb $0x2, %bpl
je 0x7a79
movl 0x44(%rbx), %eax
testl %eax, %eax
je 0x7a0f
testl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
jne 0x7a79
movl 0x3c(%rbx), %ecx
movl %ecx, 0x28(%rbx)
movl %eax, 0x30(%rbx)
andl $0x0, 0x44(%rbx)
leaq 0x5de8(%rip), %rax      # 0xd7e0
movq (%rax), %rdi
movq (%rbx), %rsi
leaq 0x5c5b(%rip), %rax      # 0xd660
movq (%rax), %rdx
callq 0x3230
jmp 0x7a79
decl %r14d
cmpl $0x1, %r14d
ja 0x7a79
movslq 0x28(%rbx), %rax
movl %eax, 0x3c(%rbx)
movslq 0x30(%rbx), %rcx
movl %ecx, 0x44(%rbx)
andl $0x0, 0x28(%rbx)
leaq 0x5daf(%rip), %rdx      # 0xd7e0
movq (%rdx), %rdi
movq 0xe8(%rdi), %rdx
movq 0x10(%rbx), %rsi
movslq (%rsi), %rsi
shlq $0x7, %rsi
movl 0x1c(%rdx,%rsi), %edx
movl %edx, 0x30(%rbx)
movq %rsp, %r10
movq %rax, (%r10)
movq %rcx, 0x8(%r10)
movq (%rbx), %rsi
leaq 0x5bff(%rip), %rax      # 0xd660
movq (%rax), %rdx
pushq $0x6
popq %rcx
pushq $0x20
popq %r8
xorl %r9d, %r9d
pushq $0x2
pushq %r10
callq 0x3460
popq %rcx
popq %rdx
movq %rbx, %rdi
callq 0x5738
movq %rbx, %rdi
callq 0x701d
movq %rbx, %rdi
callq 0x634a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq