// File: /workspace/github_c_makefile_star2_O0/kasymovga[P]devilwm/screen.c
// Function: maximise_client
void maximise_client(Client *c, int action, int hv) {
	Monitor *monitor = find_monitor(c);
	int was_fullscreen = (c->oldw || c->oldh);
	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 = monitor->x;
				c->width = monitor->width;
				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 = monitor->y;
				c->height = monitor->height;
				props[0] = c->oldy;
				props[1] = c->oldh;
				XChangeProperty(dpy, c->window, xa_evilwm_unmaximised_vert,
						XA_CARDINAL, 32, PropModeReplace,
						(unsigned char *)&props, 2);
			}
		}
	}
	if (!was_fullscreen && (c->oldw || c->oldh)) {
		c->nomaxborder = c->border;
		c->border = 0;
		XSetWindowBorderWidth(dpy, c->parent, c->border);
	} else if (was_fullscreen && !c->oldw && !c->oldh) {
		c->border = c->nomaxborder;
		XSetWindowBorderWidth(dpy, c->parent, c->border);
	}
	ewmh_set_net_wm_state(c);
	moveresize(c);
	discard_enter_events(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x9aa0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movb $0x1, %al
cmpl $0x0, 0x40(%rcx)
movb %al, -0x41(%rbp)
jne 0xac1c
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x1c(%rbp)
movl -0x10(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xad39
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
je 0xac98
cmpl $0x0, -0xc(%rbp)
je 0xac4c
cmpl $0x2, -0xc(%rbp)
jne 0xac93
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 0x5d9e(%rip), %rax      # 0x10a18
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x5c05(%rip), %rax      # 0x10890
movq (%rax), %rdx
callq 0x32e0
jmp 0xad37
cmpl $0x1, -0xc(%rbp)
je 0xaca8
cmpl $0x2, -0xc(%rbp)
jne 0xad35
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 -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x24(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rax
movslq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movslq 0x40(%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0x5d1a(%rip), %rax      # 0x10a18
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x5b81(%rip), %rax      # 0x10890
movq (%rax), %rdx
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
leaq -0x30(%rbp), %rax
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x3670
jmp 0xad37
jmp 0xad39
movl -0x10(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xae4c
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
je 0xadaa
cmpl $0x0, -0xc(%rbp)
je 0xad5e
cmpl $0x2, -0xc(%rbp)
jne 0xada5
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 0x5c8c(%rip), %rax      # 0x10a18
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x5afb(%rip), %rax      # 0x10898
movq (%rax), %rdx
callq 0x32e0
jmp 0xae4a
cmpl $0x1, -0xc(%rbp)
je 0xadba
cmpl $0x2, -0xc(%rbp)
jne 0xae48
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 -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x28(%rax)
movq -0x18(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
movslq 0x3c(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movslq 0x44(%rax), %rax
movq %rax, -0x38(%rbp)
leaq 0x5c07(%rip), %rax      # 0x10a18
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
leaq 0x5a76(%rip), %rax      # 0x10898
movq (%rax), %rdx
movl $0x6, %ecx
movl $0x20, %r8d
xorl %r9d, %r9d
leaq -0x40(%rbp), %rax
movq %rax, (%rsp)
movl $0x2, 0x8(%rsp)
callq 0x3670
jmp 0xae4a
jmp 0xae4c
cmpl $0x0, -0x1c(%rbp)
jne 0xae9f
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0xae66
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
je 0xae9f
movq -0x8(%rbp), %rax
movl 0x34(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x74(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x34(%rax)
leaq 0x5b92(%rip), %rax      # 0x10a18
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x34(%rax), %edx
callq 0x35d0
jmp 0xaee7
cmpl $0x0, -0x1c(%rbp)
je 0xaee5
movq -0x8(%rbp), %rax
cmpl $0x0, 0x40(%rax)
jne 0xaee5
movq -0x8(%rbp), %rax
cmpl $0x0, 0x44(%rax)
jne 0xaee5
movq -0x8(%rbp), %rax
movl 0x74(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x34(%rax)
leaq 0x5b4a(%rip), %rax      # 0x10a18
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x8(%rbp), %rax
movl 0x34(%rax), %edx
callq 0x35d0
jmp 0xaee7
movq -0x8(%rbp), %rdi
callq 0x7280
movq -0x8(%rbp), %rdi
callq 0xa150
movq -0x8(%rbp), %rdi
callq 0x8700
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)