// File: /workspace/github_c_makefile_star2_O1/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 0x7d68
movl 0x40(%rbx), %eax
testl %eax, %eax
je 0x7cf5
testl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
jne 0x7d68
movl 0x38(%rbx), %ecx
movl %ecx, 0x24(%rbx)
movl %eax, 0x2c(%rbx)
movl $0x0, 0x40(%rbx)
leaq 0x4b02(%rip), %rax      # 0xc7e0
movq (%rax), %rdi
movq (%rbx), %rsi
leaq 0x496d(%rip), %rax      # 0xc658
movq (%rax), %rdx
callq 0x3230
jmp 0x7d68
leal -0x1(%r14), %eax
cmpl $0x1, %eax
ja 0x7d68
movslq 0x24(%rbx), %rax
movl %eax, 0x38(%rbx)
movslq 0x2c(%rbx), %rcx
movl %ecx, 0x40(%rbx)
movl $0x0, 0x24(%rbx)
leaq 0x4ac6(%rip), %rdx      # 0xc7e0
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 0x490e(%rip), %rax      # 0xc658
movq (%rax), %rdx
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq $0x2
pushq %r10
callq 0x3460
addq $0x10, %rsp
testb $0x2, %bpl
je 0x7e27
movl 0x44(%rbx), %eax
testl %eax, %eax
je 0x7db4
testl $0xfffffffd, %r14d      # imm = 0xFFFFFFFD
jne 0x7e27
movl 0x3c(%rbx), %ecx
movl %ecx, 0x28(%rbx)
movl %eax, 0x30(%rbx)
movl $0x0, 0x44(%rbx)
leaq 0x4a43(%rip), %rax      # 0xc7e0
movq (%rax), %rdi
movq (%rbx), %rsi
leaq 0x48b6(%rip), %rax      # 0xc660
movq (%rax), %rdx
callq 0x3230
jmp 0x7e27
decl %r14d
cmpl $0x1, %r14d
ja 0x7e27
movslq 0x28(%rbx), %rax
movl %eax, 0x3c(%rbx)
movslq 0x30(%rbx), %rcx
movl %ecx, 0x44(%rbx)
movl $0x0, 0x28(%rbx)
leaq 0x4a07(%rip), %rdx      # 0xc7e0
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 0x4857(%rip), %rax      # 0xc660
movq (%rax), %rdx
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
pushq $0x2
pushq %r10
callq 0x3460
addq $0x10, %rsp
movq %rbx, %rdi
callq 0x5a8e
movq %rbx, %rdi
callq 0x73c5
movq %rbx, %rdi
callq 0x66d9
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq