	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wheel_unit
_wheel_unit:                            ## @wheel_unit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_mousekey_accel@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testb	$1, %al
	jne	LBB0_1
## %bb.2:
	testb	$2, %al
	jne	LBB0_3
## %bb.4:
	testb	$4, %al
	jne	LBB0_5
## %bb.6:
	movq	_mousekey_repeat@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	je	LBB0_7
## %bb.8:
	movq	_mk_wheel_time_to_max@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MOUSEKEY_WHEEL_DELTA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_mk_wheel_max_speed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%esi, %edx
	jge	LBB0_9
## %bb.10:
	imull	%edx, %ecx
	imull	%eax, %ecx
	movl	%ecx, %eax
	cltd
	idivl	%esi
	jmp	LBB0_11
LBB0_1:
	movq	_MOUSEKEY_WHEEL_DELTA@GOTPCREL(%rip), %rax
	movq	_mk_wheel_max_speed@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	(%rax), %ecx
	leal	3(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	jmp	LBB0_11
LBB0_3:
	movq	_MOUSEKEY_WHEEL_DELTA@GOTPCREL(%rip), %rax
	movq	_mk_wheel_max_speed@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	(%rax), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	jmp	LBB0_11
LBB0_5:
	movq	_MOUSEKEY_WHEEL_DELTA@GOTPCREL(%rip), %rcx
	movq	_mk_wheel_max_speed@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	(%rcx), %eax
	jmp	LBB0_11
LBB0_7:
	movq	_MOUSEKEY_WHEEL_DELTA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_11
LBB0_9:
	imull	%ecx, %eax
LBB0_11:
	movq	_MOUSEKEY_WHEEL_MAX@GOTPCREL(%rip), %rdx
	testl	%eax, %eax
	movl	$1, %ecx
	cmovnel	%eax, %ecx
	movl	(%rdx), %edx
	cmpl	%edx, %eax
	cmovgl	%edx, %ecx
	movl	%ecx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mousekey_accel,4,2             ## @mousekey_accel
	.comm	_MOUSEKEY_WHEEL_DELTA,4,2       ## @MOUSEKEY_WHEEL_DELTA
	.comm	_mk_wheel_max_speed,4,2         ## @mk_wheel_max_speed
	.comm	_mousekey_repeat,4,2            ## @mousekey_repeat
	.comm	_mk_wheel_time_to_max,4,2       ## @mk_wheel_time_to_max
	.comm	_MOUSEKEY_WHEEL_MAX,4,2         ## @MOUSEKEY_WHEEL_MAX
	.no_dead_strip	_wheel_unit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wheel_unit
_wheel_unit:                            ; @wheel_unit
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _mousekey_accel@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mousekey_accel@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tbnz	w8, #0, LBB0_6
; %bb.1:
	tbnz	w8, #1, LBB0_7
; %bb.2:
	tbnz	w8, #2, LBB0_8
; %bb.3:
Lloh3:
	adrp	x8, _mousekey_repeat@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mousekey_repeat@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.4:
Lloh6:
	adrp	x9, _mk_wheel_time_to_max@GOTPAGE
Lloh7:
	ldr	x9, [x9, _mk_wheel_time_to_max@GOTPAGEOFF]
Lloh8:
	adrp	x10, _MOUSEKEY_WHEEL_DELTA@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MOUSEKEY_WHEEL_DELTA@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _mk_wheel_max_speed@GOTPAGE
Lloh13:
	ldr	x11, [x11, _mk_wheel_max_speed@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	cmp	w8, w9
	b.ge	LBB0_10
; %bb.5:
	mul	w8, w10, w8
	mul	w8, w8, w11
	sdiv	w8, w8, w9
	b	LBB0_11
LBB0_6:
Lloh15:
	adrp	x8, _MOUSEKEY_WHEEL_DELTA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MOUSEKEY_WHEEL_DELTA@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _mk_wheel_max_speed@GOTPAGE
Lloh19:
	ldr	x9, [x9, _mk_wheel_max_speed@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	mul	w8, w9, w8
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	b	LBB0_11
LBB0_7:
Lloh21:
	adrp	x8, _MOUSEKEY_WHEEL_DELTA@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MOUSEKEY_WHEEL_DELTA@GOTPAGEOFF]
Lloh23:
	adrp	x9, _mk_wheel_max_speed@GOTPAGE
Lloh24:
	ldr	x9, [x9, _mk_wheel_max_speed@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
Lloh26:
	ldr	w9, [x9]
	mul	w8, w9, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	b	LBB0_11
LBB0_8:
Lloh27:
	adrp	x8, _MOUSEKEY_WHEEL_DELTA@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MOUSEKEY_WHEEL_DELTA@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _mk_wheel_max_speed@GOTPAGE
Lloh31:
	ldr	x9, [x9, _mk_wheel_max_speed@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	mul	w8, w9, w8
	b	LBB0_11
LBB0_9:
Lloh33:
	adrp	x8, _MOUSEKEY_WHEEL_DELTA@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MOUSEKEY_WHEEL_DELTA@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	b	LBB0_11
LBB0_10:
	mul	w8, w11, w10
LBB0_11:
Lloh36:
	adrp	x9, _MOUSEKEY_WHEEL_MAX@GOTPAGE
Lloh37:
	ldr	x9, [x9, _MOUSEKEY_WHEEL_MAX@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	cmp	w8, #0
	csinc	w10, w8, wzr, ne
	cmp	w8, w9
	csel	w0, w9, w10, gt
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh25
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_mousekey_accel,4,2             ; @mousekey_accel
	.comm	_MOUSEKEY_WHEEL_DELTA,4,2       ; @MOUSEKEY_WHEEL_DELTA
	.comm	_mk_wheel_max_speed,4,2         ; @mk_wheel_max_speed
	.comm	_mousekey_repeat,4,2            ; @mousekey_repeat
	.comm	_mk_wheel_time_to_max,4,2       ; @mk_wheel_time_to_max
	.comm	_MOUSEKEY_WHEEL_MAX,4,2         ; @MOUSEKEY_WHEEL_MAX
	.no_dead_strip	_wheel_unit
.subsections_via_symbols
