// File: /workspace/github_c_makefile_star2_O0/zenlinux[P]cwm/client.c
// Function: client_placecalc
static void
client_placecalc(struct client_ctx *cc)
{
	struct screen_ctx	*sc = cc->sc;
	int			 xslack, yslack;

	if (cc->size->flags & (USPosition|PPosition)) {
		/*
		 * Ignore XINERAMA screens, just make sure it's somewhere
		 * in the virtual desktop. else it stops people putting xterms
		 * at startup in the screen the mouse doesn't start in *sigh*.
		 * XRandR bits mean that {x,y}max shouldn't be outside what's
		 * currently there.
		 */
		xslack = sc->view.w - cc->geom.w - cc->bwidth * 2;
		yslack = sc->view.h - cc->geom.h - cc->bwidth * 2;
		if (cc->size->x > 0)
			cc->geom.x = MIN(cc->size->x, xslack);
		if (cc->size->y > 0)
			cc->geom.y = MIN(cc->size->y, yslack);
	} else {
		XineramaScreenInfo	*info;
		int			 xmouse, ymouse, xorig, yorig;
		int			 xmax, ymax;

		xu_ptr_getpos(sc->rootwin, &xmouse, &ymouse);
		info = screen_find_xinerama(sc, xmouse, ymouse);
		if (info) {
			xorig = info->x_org;
			yorig = info->y_org;
			xmax = xorig + info->width;
			ymax = yorig + info->height;
		} else {
			xorig = yorig = 0;
			xmax = sc->view.w;
			ymax = sc->view.h;
		}
		xmouse = MAX(xmouse, xorig) - cc->geom.w / 2;
		ymouse = MAX(ymouse, yorig) - cc->geom.h / 2;

		xmouse = MAX(xmouse, xorig);
		ymouse = MAX(ymouse, yorig);

		xslack = xmax - cc->geom.w - cc->bwidth * 2;
		yslack = ymax - cc->geom.h - cc->bwidth * 2;

		if (xslack >= xorig) {
			cc->geom.x = MAX(MIN(xmouse, xslack),
			    xorig + sc->gap.left);
			if (cc->geom.x > (xslack - sc->gap.right))
				cc->geom.x -= sc->gap.right;
		} else {
			cc->geom.x = xorig + sc->gap.left;
			cc->geom.w = xmax - sc->gap.left;
		}
		if (yslack >= yorig) {
			cc->geom.y = MAX(MIN(ymouse, yslack),
			    yorig + sc->gap.top);
			if (cc->geom.y > (yslack - sc->gap.bottom))
				cc->geom.y -= sc->gap.bottom;
		} else {
			cc->geom.y = yorig + sc->gap.top;
			cc->geom.h = ymax - sc->gap.top;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
andq $0x5, %rax
cmpq $0x0, %rax
je 0x6ed0
movq -0x10(%rbp), %rax
movl 0xac(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x5c(%rcx), %eax
movq -0x8(%rbp), %rcx
movl 0x50(%rcx), %ecx
shll %ecx
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl 0xb0(%rax), %eax
movq -0x8(%rbp), %rcx
subl 0x60(%rcx), %eax
movq -0x8(%rbp), %rcx
movl 0x50(%rcx), %ecx
shll %ecx
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
cmpl $0x0, 0x8(%rax)
jle 0x6e8d
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jge 0x6e7d
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x6e83
movl -0x14(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
cmpl $0x0, 0xc(%rax)
jle 0x6ecb
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl 0xc(%rax), %eax
cmpl -0x18(%rbp), %eax
jge 0x6ebb
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movl 0xc(%rax), %eax
movl %eax, -0x40(%rbp)
jmp 0x6ec1
movl -0x18(%rbp), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x58(%rax)
jmp 0x71bf
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
leaq -0x24(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0xabf0
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
callq 0x6170
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x6f37
movq -0x20(%rbp), %rax
movswl 0x4(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movswl 0x6(%rax), %eax
movl %eax, -0x30(%rbp)
movl -0x2c(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x8(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x34(%rbp)
movl -0x30(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0xa(%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x38(%rbp)
jmp 0x6f5f
movl $0x0, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movl 0xac(%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rax
movl 0xb0(%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jle 0x6f6f
movl -0x24(%rbp), %eax
movl %eax, -0x44(%rbp)
jmp 0x6f75
movl -0x2c(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movl 0x5c(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x48(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x6fa4
movl -0x28(%rbp), %eax
movl %eax, -0x4c(%rbp)
jmp 0x6faa
movl -0x30(%rbp), %eax
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movl 0x60(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x50(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jle 0x6fd9
movl -0x24(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x6fdf
movl -0x2c(%rbp), %eax
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x30(%rbp), %eax
jle 0x6ff5
movl -0x28(%rbp), %eax
movl %eax, -0x58(%rbp)
jmp 0x6ffb
movl -0x30(%rbp), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x34(%rbp), %eax
movq -0x8(%rbp), %rcx
subl 0x5c(%rcx), %eax
movq -0x8(%rbp), %rcx
movl 0x50(%rcx), %ecx
shll %ecx
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x38(%rbp), %eax
movq -0x8(%rbp), %rcx
subl 0x60(%rcx), %eax
movq -0x8(%rbp), %rcx
movl 0x50(%rcx), %ecx
shll %ecx
subl %ecx, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jl 0x70cf
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x704d
movl -0x24(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x7053
movl -0x14(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rdx
addl 0xcc(%rdx), %ecx
cmpl %ecx, %eax
jle 0x7085
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x7077
movl -0x24(%rbp), %eax
movl %eax, -0x60(%rbp)
jmp 0x707d
movl -0x14(%rbp), %eax
movl %eax, -0x60(%rbp)
movl -0x60(%rbp), %eax
movl %eax, -0x64(%rbp)
jmp 0x7095
movl -0x2c(%rbp), %eax
movq -0x10(%rbp), %rcx
addl 0xcc(%rcx), %eax
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x8(%rbp), %rax
movl 0x54(%rax), %eax
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rdx
subl 0xd0(%rdx), %ecx
cmpl %ecx, %eax
jle 0x70cd
movq -0x10(%rbp), %rax
movl 0xd0(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x54(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x54(%rax)
jmp 0x70f7
movl -0x2c(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0xcc(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x54(%rax)
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
subl 0xcc(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x5c(%rax)
movl -0x18(%rbp), %eax
cmpl -0x30(%rbp), %eax
jl 0x7195
movl -0x28(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x7113
movl -0x28(%rbp), %eax
movl %eax, -0x68(%rbp)
jmp 0x7119
movl -0x18(%rbp), %eax
movl %eax, -0x68(%rbp)
movl -0x68(%rbp), %eax
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rdx
addl 0xc4(%rdx), %ecx
cmpl %ecx, %eax
jle 0x714b
movl -0x28(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x713d
movl -0x28(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0x7143
movl -0x18(%rbp), %eax
movl %eax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x70(%rbp)
jmp 0x715b
movl -0x30(%rbp), %eax
movq -0x10(%rbp), %rcx
addl 0xc4(%rcx), %eax
movl %eax, -0x70(%rbp)
movl -0x70(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x58(%rax)
movq -0x8(%rbp), %rax
movl 0x58(%rax), %eax
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rdx
subl 0xc8(%rdx), %ecx
cmpl %ecx, %eax
jle 0x7193
movq -0x10(%rbp), %rax
movl 0xc8(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x58(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x58(%rax)
jmp 0x71bd
movl -0x30(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0xc4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x58(%rax)
movl -0x38(%rbp), %ecx
movq -0x10(%rbp), %rax
subl 0xc4(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x60(%rax)
jmp 0x71bf
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)