// File: /workspace/github_c_makefile_star2_O0/zenlinux[P]cwm/kbfunc.c
// Function: kbfunc_moveresize
void
kbfunc_moveresize(struct client_ctx *cc, union arg *arg)
{
	struct screen_ctx	*sc = cc->sc;
	int			 x, y, flags, amt;
	u_int			 mx, my;

	if (cc->flags & CLIENT_FREEZE)
		return;

	mx = my = 0;

	flags = arg->i;
	amt = Conf.mamount;

	if (flags & CWM_BIGMOVE) {
		flags -= CWM_BIGMOVE;
		amt = amt * 10;
	}

	switch (flags & MOVEMASK) {
	case CWM_UP:
		my -= amt;
		break;
	case CWM_DOWN:
		my += amt;
		break;
	case CWM_RIGHT:
		mx += amt;
		break;
	case CWM_LEFT:
		mx -= amt;
		break;
	}
	switch (flags & TYPEMASK) {
	case CWM_MOVE:
		cc->geom.y += my;
		if (cc->geom.y + cc->geom.h < 0)
			cc->geom.y = -cc->geom.h;
		if (cc->geom.y > sc->view.h - 1)
			cc->geom.y = sc->view.h - 1;

		cc->geom.x += mx;
		if (cc->geom.x + cc->geom.w < 0)
			cc->geom.x = -cc->geom.w;
		if (cc->geom.x > sc->view.w - 1)
			cc->geom.x = sc->view.w - 1;

		cc->geom.x += client_snapcalc(cc->geom.x,
		    cc->geom.w, sc->view.w,
		    cc->bwidth, Conf.snapdist);
		cc->geom.y += client_snapcalc(cc->geom.y,
		    cc->geom.h, sc->view.h,
		    cc->bwidth, Conf.snapdist);

		client_move(cc);
		xu_ptr_getpos(cc->win, &x, &y);
		cc->ptr.y = y + my;
		cc->ptr.x = x + mx;
		client_ptrwarp(cc);
		break;
	case CWM_RESIZE:
		if ((cc->geom.h += my) < 1)
			cc->geom.h = 1;
		if ((cc->geom.w += mx) < 1)
			cc->geom.w = 1;
		client_resize(cc, 1);

		/* Make sure the pointer stays within the window. */
		xu_ptr_getpos(cc->win, &cc->ptr.x, &cc->ptr.y);
		if (cc->ptr.x > cc->geom.w)
			cc->ptr.x = cc->geom.w - cc->bwidth;
		if (cc->ptr.y > cc->geom.h)
			cc->ptr.y = cc->geom.h - cc->bwidth;
		client_ptrwarp(cc);
		break;
	case CWM_PTRMOVE:
		xu_ptr_getpos(sc->rootwin, &x, &y);
		xu_ptr_setpos(sc->rootwin, x + mx, y + my);
		break;
	default:
		warnx("invalid flags passed to kbfunc_client_moveresize");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl 0xa8(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0xeab3
jmp 0xee09
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
leaq 0xbbef(%rip), %rax      # 0x1a6c0
movl 0x58(%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xeaf2
movl -0x24(%rbp), %eax
subl $0x8, %eax
movl %eax, -0x24(%rbp)
imull $0xa, -0x28(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
andl $0xf0, %eax
movl %eax, -0x34(%rbp)
subl $0x10, %eax
je 0xeb24
jmp 0xeb04
movl -0x34(%rbp), %eax
subl $0x20, %eax
je 0xeb31
jmp 0xeb0e
movl -0x34(%rbp), %eax
subl $0x40, %eax
je 0xeb47
jmp 0xeb18
movl -0x34(%rbp), %eax
subl $0x80, %eax
je 0xeb3c
jmp 0xeb52
movl -0x28(%rbp), %ecx
movl -0x30(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x30(%rbp)
jmp 0xeb52
movl -0x28(%rbp), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0xeb52
movl -0x28(%rbp), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
jmp 0xeb52
movl -0x28(%rbp), %ecx
movl -0x2c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %eax
andl $0x7, %eax
movl %eax, -0x38(%rbp)
subl $0x1, %eax
je 0xeb81
jmp 0xeb62
movl -0x38(%rbp), %eax
subl $0x2, %eax
je 0xecfb
jmp 0xeb70
movl -0x38(%rbp), %eax
subl $0x4, %eax
je 0xedcb
jmp 0xedfb
movl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x8(%rbp), %rcx
addl 0x60(%rcx), %eax
cmpl $0x0, %eax
jge 0xebb1
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
subl 0x60(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
movq -0x18(%rbp), %rcx
movl 0xb0(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0xebdd
movq -0x18(%rbp), %rax
movl 0xb0(%rax), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x58(%rax)
movl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x54(%rax), %ecx
movl %ecx, 0x54(%rax)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
movq -0x8(%rbp), %rcx
addl 0x5c(%rcx), %eax
cmpl $0x0, %eax
jge 0xec0d
movq -0x8(%rbp), %rax
xorl %ecx, %ecx
subl 0x5c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
movq -0x18(%rbp), %rcx
movl 0xac(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0xec39
movq -0x18(%rbp), %rax
movl 0xac(%rax), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %edi
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %esi
movq -0x18(%rbp), %rax
movl 0xac(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x50(%rax), %ecx
leaq 0xba61(%rip), %rax      # 0x1a6c0
movl 0x5c(%rax), %r8d
callq 0x8880
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0x54(%rax), %ecx
movl %ecx, 0x54(%rax)
movq -0x8(%rbp), %rax
movl 0x58(%rax), %edi
movq -0x8(%rbp), %rax
movl 0x60(%rax), %esi
movq -0x18(%rbp), %rax
movl 0xb0(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x50(%rax), %ecx
leaq 0xba26(%rip), %rax      # 0x1a6c0
movl 0x5c(%rax), %r8d
callq 0x8880
movl %eax, %ecx
movq -0x8(%rbp), %rax
addl 0x58(%rax), %ecx
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rdi
callq 0x71d0
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
leaq -0x1c(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0xabf0
movl -0x20(%rbp), %ecx
addl -0x30(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xa0(%rax)
movl -0x1c(%rbp), %ecx
addl -0x2c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x9c(%rax)
movq -0x8(%rbp), %rdi
callq 0x81d0
jmp 0xee09
movl -0x30(%rbp), %eax
movq -0x8(%rbp), %rcx
addl 0x60(%rcx), %eax
movl %eax, 0x60(%rcx)
cmpl $0x1, %eax
jge 0xed18
movq -0x8(%rbp), %rax
movl $0x1, 0x60(%rax)
movl -0x2c(%rbp), %eax
movq -0x8(%rbp), %rcx
addl 0x5c(%rcx), %eax
movl %eax, 0x5c(%rcx)
cmpl $0x1, %eax
jge 0xed35
movq -0x8(%rbp), %rax
movl $0x1, 0x5c(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x7d20
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x8(%rbp), %rsi
addq $0x9c, %rsi
movq -0x8(%rbp), %rdx
addq $0x9c, %rdx
addq $0x4, %rdx
callq 0xabf0
movq -0x8(%rbp), %rax
movl 0x9c(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x5c(%rcx), %eax
jle 0xed95
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %ecx
movq -0x8(%rbp), %rax
subl 0x50(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x9c(%rax)
movq -0x8(%rbp), %rax
movl 0xa0(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x60(%rcx), %eax
jle 0xedc0
movq -0x8(%rbp), %rax
movl 0x60(%rax), %ecx
movq -0x8(%rbp), %rax
subl 0x50(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0xa0(%rax)
movq -0x8(%rbp), %rdi
callq 0x81d0
jmp 0xee09
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x1c(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0xabf0
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movl -0x1c(%rbp), %esi
addl -0x2c(%rbp), %esi
movl -0x20(%rbp), %edx
addl -0x30(%rbp), %edx
callq 0xac50
jmp 0xee09
leaq 0x5c62(%rip), %rdi      # 0x14a64
movb $0x0, %al
callq 0x5140
addq $0x40, %rsp
popq %rbp
retq
nop