// File: /workspace/github_c_makefile_star2_O0/kaiserschmarrn0[P]mywm/mouse.c
// Function: mouse_move
void mouse_move(void *arg) {
	press_arg *info = (press_arg *)arg;

	xcb_get_geometry_reply_t *geom;
	
	if (!move_resize_helper(info->win, &geom)) {
		return;
	}

	events[XCB_MOTION_NOTIFY] = (void (*)(xcb_generic_event_t *))mouse_move_motion_start;
	events[XCB_BUTTON_RELEASE] = (void (*)(xcb_generic_event_t *))button_release;

	if (stack[curws].fwin->snap_index != SNAP_NONE) {
		x = stack[curws].fwin->before_snap[GEOM_W] *
				(info->event_x - stack[curws].fwin->geom[GEOM_X]) /
				stack[curws].fwin->geom[GEOM_W];
		y = stack[curws].fwin->before_snap[GEOM_H] *
				(info->event_y - stack[curws].fwin->geom[GEOM_Y]) /
				stack[curws].fwin->geom[GEOM_H];
	} else {
		x = info->event_x - stack[curws].fwin->geom[GEOM_X];
		y = info->event_y - stack[curws].fwin->geom[GEOM_Y];
	}
	
	state = MOVE;
	
	activate_margins();

	grab_pointer();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edi
leaq -0x18(%rbp), %rsi
callq 0x9700
cmpl $0x0, %eax
jne 0x953d
jmp 0x96f3
leaq 0x6f8c(%rip), %rax      # 0x104d0
leaq 0x2a5(%rip), %rcx       # 0x97f0
movq %rcx, 0x30(%rax)
leaq 0x6f7a(%rip), %rax      # 0x104d0
leaq -0x14d(%rip), %rcx      # 0x9410
movq %rcx, 0x28(%rax)
leaq 0x7508(%rip), %rax      # 0x10a70
movslq (%rax), %rcx
leaq 0x73be(%rip), %rax      # 0x10930
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rax
cmpl $0x7, 0x178(%rax)
je 0x967c
leaq 0x74df(%rip), %rax      # 0x10a70
movslq (%rax), %rcx
leaq 0x7395(%rip), %rax      # 0x10930
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rax
movl 0x170(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x4(%rcx), %ecx
leaq 0x74b6(%rip), %rdx      # 0x10a70
movslq (%rdx), %rsi
leaq 0x736c(%rip), %rdx      # 0x10930
imulq $0x50, %rsi, %rsi
addq %rsi, %rdx
movq 0x48(%rdx), %rdx
subl 0x108(%rdx), %ecx
imull %ecx, %eax
leaq 0x7491(%rip), %rcx      # 0x10a70
movslq (%rcx), %rdx
leaq 0x7347(%rip), %rcx      # 0x10930
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
movq 0x48(%rcx), %rcx
xorl %edx, %edx
divl 0x110(%rcx)
movl %eax, 0x7482(%rip)      # 0x10a84
leaq 0x7467(%rip), %rax      # 0x10a70
movslq (%rax), %rcx
leaq 0x731d(%rip), %rax      # 0x10930
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq 0x48(%rax), %rax
movl 0x174(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
leaq 0x743e(%rip), %rdx      # 0x10a70
movslq (%rdx), %rsi
leaq 0x72f4(%rip), %rdx      # 0x10930
imulq $0x50, %rsi, %rsi
addq %rsi, %rdx
movq 0x48(%rdx), %rdx
subl 0x10c(%rdx), %ecx
imull %ecx, %eax
leaq 0x7419(%rip), %rcx      # 0x10a70
movslq (%rcx), %rdx
leaq 0x72cf(%rip), %rcx      # 0x10930
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
movq 0x48(%rcx), %rcx
xorl %edx, %edx
divl 0x114(%rcx)
movl %eax, 0x740e(%rip)      # 0x10a88
jmp 0x96da
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
leaq 0x73e6(%rip), %rcx      # 0x10a70
movslq (%rcx), %rdx
leaq 0x729c(%rip), %rcx      # 0x10930
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
movq 0x48(%rcx), %rcx
subl 0x108(%rcx), %eax
movl %eax, 0x73d9(%rip)      # 0x10a84
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
leaq 0x73b7(%rip), %rcx      # 0x10a70
movslq (%rcx), %rdx
leaq 0x726d(%rip), %rcx      # 0x10930
imulq $0x50, %rdx, %rdx
addq %rdx, %rcx
movq 0x48(%rcx), %rcx
subl 0x10c(%rcx), %eax
movl %eax, 0x73ae(%rip)      # 0x10a88
leaq 0x6d63(%rip), %rax      # 0x10444
movl $0x1, (%rax)
movb $0x0, %al
callq 0xad90
callq 0x9470
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)