	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidinput_handle_scroll
_hidinput_handle_scroll:                ## @hidinput_handle_scroll
	.cfi_startproc
## %bb.0:
	testl	%edx, %edx
	je	LBB0_5
## %bb.1:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_REL_WHEEL_HI_RES@GOTPCREL(%rip), %rax
	movl	(%rdi), %ecx
	movl	8(%rdi), %esi
	cmpl	(%rax), %ecx
	jne	LBB0_2
## %bb.3:
	movq	_REL_WHEEL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_5:
	retq
LBB0_2:
	movq	_REL_HWHEEL@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r8d
	imull	$120, %edx, %eax
	cltd
	idivl	4(%rbx)
	movl	%eax, %r15d
	leal	(%rsi,%r15), %eax
	cltq
	imulq	$-2004318071, %rax, %rcx        ## imm = 0x88888889
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %edx
	shrl	$31, %edx
	sarl	$6, %ecx
	addl	%edx, %ecx
	leal	(%rsi,%r15), %edx
	addl	$119, %edx
	imull	$-120, %ecx, %esi
	xorl	%edi, %edi
	cmpl	$239, %edx
	cmovael	%esi, %edi
	addl	%eax, %edi
	movl	%edi, 8(%rbx)
	movq	_EV_REL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	%r8d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_input_event
	movl	(%r12), %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	%r15d, %ecx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_event                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REL_WHEEL_HI_RES,4,2           ## @REL_WHEEL_HI_RES
	.comm	_REL_WHEEL,4,2                  ## @REL_WHEEL
	.comm	_REL_HWHEEL,4,2                 ## @REL_HWHEEL
	.comm	_EV_REL,4,2                     ## @EV_REL
	.no_dead_strip	_hidinput_handle_scroll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidinput_handle_scroll
_hidinput_handle_scroll:                ; @hidinput_handle_scroll
	.cfi_startproc
; %bb.0:
	cbz	w2, LBB0_2
; %bb.1:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _REL_WHEEL_HI_RES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REL_WHEEL_HI_RES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _REL_WHEEL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _REL_WHEEL@GOTPAGEOFF]
Lloh5:
	adrp	x10, _REL_HWHEEL@GOTPAGE
Lloh6:
	ldr	x10, [x10, _REL_HWHEEL@GOTPAGEOFF]
	ldp	w11, w12, [x0]
	cmp	w11, w8
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	mov	w9, #120
	mul	w9, w2, w9
	sdiv	w21, w9, w12
	ldr	w9, [x0, #8]
	mov	w10, #34953
	movk	w10, #34952, lsl #16
	add	w9, w9, w21
	smull	x10, w9, w10
	lsr	x10, x10, #32
	add	w10, w10, w9
	asr	w11, w10, #6
	add	w3, w11, w10, lsr #31
	add	w10, w9, #119
	mov	w11, #-120
	mul	w11, w3, w11
	cmp	w10, #239
	csel	w10, wzr, w11, lo
	add	w9, w10, w9
	str	w9, [x0, #8]
Lloh7:
	adrp	x22, _EV_REL@GOTPAGE
Lloh8:
	ldr	x22, [x22, _EV_REL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x8
	bl	_input_event
	ldr	w1, [x22]
	ldr	w2, [x20]
	mov	x0, x19
	mov	x3, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_input_event
LBB0_2:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_REL_WHEEL_HI_RES,4,2           ; @REL_WHEEL_HI_RES
	.comm	_REL_WHEEL,4,2                  ; @REL_WHEEL
	.comm	_REL_HWHEEL,4,2                 ; @REL_HWHEEL
	.comm	_EV_REL,4,2                     ; @EV_REL
	.no_dead_strip	_hidinput_handle_scroll
.subsections_via_symbols
