	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mousekey_task                  ## -- Begin function mousekey_task
	.p2align	4, 0x90
_mousekey_task:                         ## @mousekey_task
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_last_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_timer_elapsed
	movq	_mousekey_repeat@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	_mk_interval@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	cmpl	%esi, %eax
	jge	LBB0_4
	jmp	LBB0_27
LBB0_1:
	movq	_mk_delay@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	addl	%esi, %esi
	leal	(%rsi,%rsi,4), %esi
	cmpl	%esi, %eax
	jl	LBB0_27
LBB0_4:
	movq	_mouse_report@GOTPCREL(%rip), %rbx
	movdqu	(%rbx), %xmm0
	ptest	%xmm0, %xmm0
	je	LBB0_27
## %bb.5:
	movq	_UINT8_MAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_7
## %bb.6:
	incq	%rdx
	movq	%rdx, (%rcx)
LBB0_7:
	movd	%xmm0, %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_move_unit
	movl	%eax, (%rbx)
LBB0_9:
	testl	%eax, %eax
	jns	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	callq	_move_unit
	negl	%eax
	movl	%eax, (%rbx)
LBB0_11:
	movl	4(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.12:
	xorl	%eax, %eax
	callq	_move_unit
	movl	%eax, 4(%rbx)
LBB0_13:
	testl	%eax, %eax
	jns	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	callq	_move_unit
	negl	%eax
	movl	%eax, 4(%rbx)
LBB0_15:
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_18
## %bb.16:
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	callq	_times_inv_sqrt2
	testl	%eax, %eax
	movl	$1, %r14d
	cmovel	%r14d, %eax
	movl	%eax, (%rbx)
	movl	4(%rbx), %edi
	callq	_times_inv_sqrt2
	testl	%eax, %eax
	cmovel	%r14d, %eax
	movl	%eax, 4(%rbx)
LBB0_18:
	movl	8(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_20
## %bb.19:
	xorl	%eax, %eax
	callq	_wheel_unit
	movl	%eax, 8(%rbx)
LBB0_20:
	testl	%eax, %eax
	jns	LBB0_22
## %bb.21:
	xorl	%eax, %eax
	callq	_wheel_unit
	negl	%eax
	movl	%eax, 8(%rbx)
LBB0_22:
	movl	12(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_24
## %bb.23:
	xorl	%eax, %eax
	callq	_wheel_unit
	movl	%eax, 12(%rbx)
LBB0_24:
	testl	%eax, %eax
	jns	LBB0_26
## %bb.25:
	xorl	%eax, %eax
	callq	_wheel_unit
	negl	%eax
	movl	%eax, 12(%rbx)
LBB0_26:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mousekey_send                  ## TAILCALL
LBB0_27:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_last_timer,4,2                 ## @last_timer
	.comm	_mousekey_repeat,8,3            ## @mousekey_repeat
	.comm	_mk_interval,4,2                ## @mk_interval
	.comm	_mk_delay,4,2                   ## @mk_delay
	.comm	_mouse_report,16,2              ## @mouse_report
	.comm	_UINT8_MAX,8,3                  ## @UINT8_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mousekey_task                  ; -- Begin function mousekey_task
	.p2align	2
_mousekey_task:                         ; @mousekey_task
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _last_timer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _last_timer@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_timer_elapsed
Lloh3:
	adrp	x8, _mousekey_repeat@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mousekey_repeat@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh5:
	adrp	x10, _mk_interval@GOTPAGE
Lloh6:
	ldr	x10, [x10, _mk_interval@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
Lloh8:
	adrp	x11, _mk_delay@GOTPAGE
Lloh9:
	ldr	x11, [x11, _mk_delay@GOTPAGEOFF]
Lloh10:
	ldr	w11, [x11]
	add	w11, w11, w11, lsl #2
	lsl	w11, w11, #1
	cmp	x9, #0
	csel	w10, w11, w10, eq
	cmp	w0, w10
	b.lt	LBB0_24
; %bb.1:
Lloh11:
	adrp	x19, _mouse_report@GOTPAGE
Lloh12:
	ldr	x19, [x19, _mouse_report@GOTPAGEOFF]
	ldr	q0, [x19]
	cmtst.4s	v1, v0, v0
	xtn.4h	v1, v1
	umov.h	w10, v1[0]
	umov.h	w11, v1[1]
	and	w11, w11, #0x1
	bfi	w10, w11, #1, #1
	umov.h	w11, v1[2]
	and	w11, w11, #0x1
	bfi	w10, w11, #2, #1
	umov.h	w11, v1[3]
	bfi	w10, w11, #3, #29
	tst	w10, #0xf
	b.eq	LBB0_24
; %bb.2:
Lloh13:
	adrp	x10, _UINT8_MAX@GOTPAGE
Lloh14:
	ldr	x10, [x10, _UINT8_MAX@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_4
; %bb.3:
	add	x9, x9, #1
	str	x9, [x8]
LBB0_4:
	fmov	w0, s0
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.5:
	bl	_move_unit
	str	w0, [x19]
LBB0_6:
	tbz	w0, #31, LBB0_8
; %bb.7:
	bl	_move_unit
	neg	w8, w0
	str	w8, [x19]
LBB0_8:
	ldr	w0, [x19, #4]
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.9:
	bl	_move_unit
	str	w0, [x19, #4]
LBB0_10:
	tbz	w0, #31, LBB0_12
; %bb.11:
	bl	_move_unit
	neg	w0, w0
	str	w0, [x19, #4]
LBB0_12:
	ldr	w8, [x19]
	cbz	w8, LBB0_15
; %bb.13:
	cbz	w0, LBB0_15
; %bb.14:
	mov	x0, x8
	bl	_times_inv_sqrt2
	cmp	w0, #0
	csinc	w8, w0, wzr, ne
	str	w8, [x19]
	ldr	w0, [x19, #4]
	bl	_times_inv_sqrt2
	cmp	w0, #0
	csinc	w8, w0, wzr, ne
	str	w8, [x19, #4]
LBB0_15:
	ldr	w0, [x19, #8]
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.16:
	bl	_wheel_unit
	str	w0, [x19, #8]
LBB0_17:
	tbz	w0, #31, LBB0_19
; %bb.18:
	bl	_wheel_unit
	neg	w8, w0
	str	w8, [x19, #8]
LBB0_19:
	ldr	w0, [x19, #12]
	cmp	w0, #1
	b.lt	LBB0_21
; %bb.20:
	bl	_wheel_unit
	str	w0, [x19, #12]
LBB0_21:
	tbz	w0, #31, LBB0_23
; %bb.22:
	bl	_wheel_unit
	neg	w8, w0
	str	w8, [x19, #12]
LBB0_23:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_mousekey_send
LBB0_24:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_last_timer,4,2                 ; @last_timer
	.comm	_mousekey_repeat,8,3            ; @mousekey_repeat
	.comm	_mk_interval,4,2                ; @mk_interval
	.comm	_mk_delay,4,2                   ; @mk_delay
	.comm	_mouse_report,16,2              ; @mouse_report
	.comm	_UINT8_MAX,8,3                  ; @UINT8_MAX
.subsections_via_symbols
