// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0x10(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xa191
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
je 0xa0d3
cmpl $0x0, -0xc(%rbp)
je 0xa087
cmpl $0x2, -0xc(%rbp)
jne 0xa0ce
movq -0x8(%rbp), %rax
movl 0x38(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x8(%rbp), %rax
movl 0x40(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x40(%rax)
leaq 0x58cb(%rip), %rax      # 0xf980
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x5732(%rip), %rax      # 0xf7f8
movq (%rax), %rdx
callq 0x3240
jmp 0xa18f
cmpl $0x1, -0xc(%rbp)
je 0xa0e3
cmpl $0x2, -0xc(%rbp)
jne 0xa18d
movq -0x8(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x24(%rax)
leaq 0x586f(%rip), %rax      # 0xf980
movq (%rax), %rax
movq 0xe8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq (%rcx), %rcx
shlq $0x7, %rcx
addq %rcx, %rax
movl 0x18(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movslq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movslq 0x40(%rax), %rax
movq %rax, -0x18(%rbp)
leaq 0x582a(%rip), %rax      # 0xf980
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x5691(%rip), %rax      # 0xf7f8
movq (%rax), %rdx
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
leaq -0x20(%rbp), %rax
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x3480
jmp 0xa18f
jmp 0xa191
movl -0x10(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xa2c0
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
je 0xa202
cmpl $0x0, -0xc(%rbp)
je 0xa1b6
cmpl $0x2, -0xc(%rbp)
jne 0xa1fd
movq -0x8(%rbp), %rax
movl 0x3c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x8(%rbp), %rax
movl 0x44(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x44(%rax)
leaq 0x579c(%rip), %rax      # 0xf980
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x560b(%rip), %rax      # 0xf800
movq (%rax), %rdx
callq 0x3240
jmp 0xa2be
cmpl $0x1, -0xc(%rbp)
je 0xa212
cmpl $0x2, -0xc(%rbp)
jne 0xa2bc
movq -0x8(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x3c(%rax)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x44(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
leaq 0x5740(%rip), %rax      # 0xf980
movq (%rax), %rax
movq 0xe8(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movslq (%rcx), %rcx
shlq $0x7, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
movslq 0x3c(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movslq 0x44(%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0x56fb(%rip), %rax      # 0xf980
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x556a(%rip), %rax      # 0xf800
movq (%rax), %rdx
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
leaq -0x30(%rbp), %rax
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x3480
jmp 0xa2be
jmp 0xa2c0
movq -0x8(%rbp), %rdi
callq 0x6ad0
movq -0x8(%rbp), %rdi
callq 0x95c0
movq -0x8(%rbp), %rdi
callq 0x7f30
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)