// File: /workspace/github_c_makefile_star2_O0/kyx0r[P]xkeyboard/xkeyboard.c
// Function: move_keys
void move_keys()
{
	int x, y, nx = 0, ny = 0, i; 
	XEvent ev;
	Time lasttime = 0;

	if (XGrabPointer(dpy, root, False, MOUSEMASK, GrabModeAsync, GrabModeAsync,
		None, None, CurrentTime) != GrabSuccess)
		return;
	if (!getrootptr(&x, &y))
		return;
	do {
		XMaskEvent(dpy, MOUSEMASK|ExposureMask|SubstructureRedirectMask, &ev);
		switch(ev.type) {
		case ConfigureRequest:
		case Expose:
		case MapRequest:
			break;
		case MotionNotify:
			if ((ev.xmotion.time - lasttime) <= (1000 / 60))
				continue;
			lasttime = ev.xmotion.time;
			nx = (ev.xmotion.x - x);
			ny = (ev.xmotion.y - y);

			for (i = 0; i < MAX_KEYS; i++) {
				XMoveWindow(dpy, mykey[i], 
				(ox+(xk[i].x+nx))*sn/sd, (oy+(xk[i].y+ny))*sn/sd); 
			}
			for (i = 0; i < NUM_BORDERS; i++) {
				XMoveWindow(dpy, myborder[i],
				(ox+(mb[i].x+nx))*sn/sd, (oy+(mb[i].y+ny))*sn/sd); 
			}
			break;
		}
	} while (ev.type != ButtonRelease);
	XUngrabPointer(dpy, CurrentTime);
	xkeyoffs += nx;
	ykeyoffs += ny;
	for (i = 0; i < MAX_KEYS; i++) {
		xk[i].x += nx;
		xk[i].y += ny;
	}
	for (i = 0; i < NUM_BORDERS; i++) {
		mb[i].x	+= nx;
		mb[i].y += ny;	
	}
	do_control(); 
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq $0x0, -0xe0(%rbp)
movq 0x1424d(%rip), %rdi     # 0x197f8
movq 0x1425e(%rip), %rsi     # 0x19810
xorl %edx, %edx
movl $0x4c, %ecx
movl $0x1, %r9d
xorl %eax, %eax
movl %r9d, %r8d
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
callq 0x2160
cmpl $0x0, %eax
je 0x55ed
jmp 0x58b9
leaq -0x4(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x5110
cmpl $0x0, %eax
jne 0x5604
jmp 0x58b9
jmp 0x5606
movq 0x141eb(%rip), %rdi     # 0x197f8
movl $0x10804c, %esi         # imm = 0x10804C
leaq -0xd8(%rbp), %rdx
callq 0x23d0
movl -0xd8(%rbp), %eax
addl $-0x6, %eax
movl %eax, %ecx
movq %rcx, -0xe8(%rbp)
subl $0x11, %eax
ja 0x57dd
movq -0xe8(%rbp), %rax
leaq 0x1a4d(%rip), %rcx      # 0x7094
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x57dd
movq -0xa0(%rbp), %rax
subq -0xe0(%rbp), %rax
cmpq $0x10, %rax
ja 0x566e
jmp 0x57df
movq -0xa0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movl -0x98(%rbp), %eax
subl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x94(%rbp), %eax
subl -0x8(%rbp), %eax
movl %eax, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x69, -0x14(%rbp)
jge 0x5738
movq 0x1414c(%rip), %rdi     # 0x197f8
movslq -0x14(%rbp), %rcx
leaq 0x144a9(%rip), %rax     # 0x19b60
movq (%rax,%rcx,8), %rsi
movl 0x14497(%rip), %eax     # 0x19b58
movslq -0x14(%rbp), %rdx
leaq 0x3c74(%rip), %rcx      # 0x9340
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
addl -0xc(%rbp), %ecx
addl %ecx, %eax
imull 0x1434e(%rip), %eax     # 0x19a30
cltd
idivl 0x1434b(%rip)           # 0x19a34
movl %eax, -0xec(%rbp)
movl 0x14467(%rip), %eax     # 0x19b5c
movslq -0x14(%rbp), %rdx
leaq 0x3c40(%rip), %rcx      # 0x9340
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movl 0x8(%rcx), %ecx
addl -0x10(%rbp), %ecx
addl %ecx, %eax
imull 0x1431a(%rip), %eax     # 0x19a30
cltd
idivl 0x14317(%rip)           # 0x19a34
movl -0xec(%rbp), %edx
movl %eax, %ecx
callq 0x2100
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x569b
movl $0x0, -0x14(%rbp)
cmpl $0x13, -0x14(%rbp)
jge 0x57db
movq 0x140a8(%rip), %rdi     # 0x197f8
movslq -0x14(%rbp), %rcx
leaq 0x14755(%rip), %rax     # 0x19eb0
movq (%rax,%rcx,8), %rsi
movl 0x143f3(%rip), %eax     # 0x19b58
movslq -0x14(%rbp), %rdx
leaq 0x3aa0(%rip), %rcx      # 0x9210
shlq $0x4, %rdx
addq %rdx, %rcx
movl (%rcx), %ecx
addl -0xc(%rbp), %ecx
addl %ecx, %eax
imull 0x142ab(%rip), %eax     # 0x19a30
cltd
idivl 0x142a8(%rip)           # 0x19a34
movl %eax, -0xf0(%rbp)
movl 0x143c4(%rip), %eax     # 0x19b5c
movslq -0x14(%rbp), %rdx
leaq 0x3a6d(%rip), %rcx      # 0x9210
shlq $0x4, %rdx
addq %rdx, %rcx
movl 0x4(%rcx), %ecx
addl -0x10(%rbp), %ecx
addl %ecx, %eax
imull 0x14277(%rip), %eax     # 0x19a30
cltd
idivl 0x14274(%rip)           # 0x19a34
movl -0xf0(%rbp), %edx
movl %eax, %ecx
callq 0x2100
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x573f
jmp 0x57dd
jmp 0x57df
cmpl $0x5, -0xd8(%rbp)
jne 0x5606
movq 0x14005(%rip), %rdi     # 0x197f8
xorl %eax, %eax
movl %eax, %esi
callq 0x21e0
movl -0xc(%rbp), %eax
addl 0x18a4b(%rip), %eax     # 0x1e250
movl %eax, 0x18a45(%rip)     # 0x1e250
movl -0x10(%rbp), %eax
addl 0x18a40(%rip), %eax     # 0x1e254
movl %eax, 0x18a3a(%rip)     # 0x1e254
movl $0x0, -0x14(%rbp)
cmpl $0x69, -0x14(%rbp)
jge 0x5868
movl -0xc(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x3b0b(%rip), %rax      # 0x9340
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl -0x10(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x3af0(%rip), %rax      # 0x9340
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
addl 0x8(%rax), %ecx
movl %ecx, 0x8(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x5821
movl $0x0, -0x14(%rbp)
cmpl $0x13, -0x14(%rbp)
jge 0x58b4
movl -0xc(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x398d(%rip), %rax      # 0x9210
shlq $0x4, %rdx
addq %rdx, %rax
addl (%rax), %ecx
movl %ecx, (%rax)
movl -0x10(%rbp), %ecx
movslq -0x14(%rbp), %rdx
leaq 0x3974(%rip), %rax      # 0x9210
shlq $0x4, %rdx
addq %rdx, %rax
addl 0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x586f
callq 0x41b0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)