	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidpp_scroll_counter_handle_scroll
_hidpp_scroll_counter_handle_scroll:    ## @hidpp_scroll_counter_handle_scroll
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	imull	$120, %edx, %eax
	cltd
	idivl	(%rsi)
	movl	%eax, %r12d
	movq	_REL_WHEEL_HI_RES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	callq	_input_report_rel
	movl	4(%r15), %ebx
	xorl	%eax, %eax
	testl	%r12d, %r12d
	setg	%al
	leal	(%rax,%rax), %r13d
	decl	%r13d
	xorl	%eax, %eax
	callq	_sched_clock
	movq	%rax, %rcx
	subq	8(%r15), %rcx
	movq	%rax, 8(%r15)
	cmpq	$1000000000, %rcx               ## imm = 0x3B9ACA00
	ja	LBB0_2
## %bb.1:
	cmpl	16(%r15), %r13d
	je	LBB0_3
LBB0_2:
	xorl	%ebx, %ebx
LBB0_3:
	movl	%r13d, 16(%r15)
	addl	%r12d, %ebx
	movl	%ebx, %eax
	negl	%eax
	cmovsl	%ebx, %eax
	cmpl	$60, %eax
	jb	LBB0_7
## %bb.4:
	leal	119(%rbx), %eax
	cmpl	$239, %eax
	jb	LBB0_6
## %bb.5:
	movslq	%ebx, %rax
	imulq	$-2004318071, %rax, %r13        ## imm = 0x88888889
	shrq	$32, %r13
	addl	%ebx, %r13d
	movl	%r13d, %eax
	shrl	$31, %eax
	sarl	$6, %r13d
	addl	%eax, %r13d
LBB0_6:
	movq	_REL_WHEEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_input_report_rel
	imull	$-120, %r13d, %eax
	addl	%ebx, %eax
	movl	%eax, %ebx
LBB0_7:
	movl	%ebx, 4(%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REL_WHEEL_HI_RES,4,2           ## @REL_WHEEL_HI_RES
	.comm	_REL_WHEEL,4,2                  ## @REL_WHEEL
	.no_dead_strip	_hidpp_scroll_counter_handle_scroll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidpp_scroll_counter_handle_scroll
_hidpp_scroll_counter_handle_scroll:    ; @hidpp_scroll_counter_handle_scroll
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	mov	w8, #120
	mul	w8, w2, w8
	ldr	w9, [x1]
Lloh0:
	adrp	x10, _REL_WHEEL_HI_RES@GOTPAGE
Lloh1:
	ldr	x10, [x10, _REL_WHEEL_HI_RES@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x10]
	sdiv	w21, w8, w9
	mov	x2, x21
	bl	_input_report_rel
	ldr	w23, [x19, #4]
	cmp	w21, #1
	mov	w8, #-1
	cneg	w22, w8, ge
	bl	_sched_clock
	ldr	x8, [x19, #8]
	str	x0, [x19, #8]
	mov	w9, #51712
	movk	w9, #15258, lsl #16
	sub	x8, x0, x8
	cmp	x8, x9
	b.hi	LBB0_2
; %bb.1:
	ldr	w8, [x19, #16]
	cmp	w22, w8
	b.eq	LBB0_3
LBB0_2:
	mov	w23, #0
LBB0_3:
	str	w22, [x19, #16]
	adds	w23, w23, w21
	cneg	w8, w23, mi
	cmp	w8, #60
	b.lo	LBB0_5
; %bb.4:
	mov	w8, #34953
	movk	w8, #34952, lsl #16
	smull	x8, w23, w8
	lsr	x8, x8, #32
	add	w8, w8, w23
	asr	w9, w8, #6
	add	w8, w9, w8, lsr #31
	add	w9, w23, #119
	cmp	w9, #239
	csel	w21, w22, w8, lo
Lloh3:
	adrp	x8, _REL_WHEEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REL_WHEEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_input_report_rel
	mov	w8, #-120
	madd	w23, w21, w8, w23
LBB0_5:
	str	w23, [x19, #4]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_REL_WHEEL_HI_RES,4,2           ; @REL_WHEEL_HI_RES
	.comm	_REL_WHEEL,4,2                  ; @REL_WHEEL
	.no_dead_strip	_hidpp_scroll_counter_handle_scroll
.subsections_via_symbols
