	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function report_rotary_event
_report_rotary_event:                   ## @report_rotary_event
	.cfi_startproc
## %bb.0:
                                        ## kill: def $esi killed $esi def $rsi
	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	%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	16(%rdi), %rbx
	movq	(%rdi), %rax
	movslq	%esi, %rcx
	movl	(%rax,%rcx,4), %eax
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_input_report_rel
	jmp	LBB0_4
LBB0_5:
	retq
LBB0_2:
	movq	_MAX_MATRIX_KEY_NUM@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	testl	%edx, %edx
	setle	%cl
	leal	(%rcx,%rsi,2), %ecx
	addl	(%rax), %ecx
	movq	8(%rdi), %rax
	movslq	%ecx, %r15
	movzbl	(%rax,%r15), %r14d
	movq	_EV_MSC@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_input_event
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_input_report_key
	movq	%rbx, %rdi
	callq	_input_sync
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	callq	_input_event
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_input_report_key
LBB0_4:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_sync                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_MATRIX_KEY_NUM,4,2         ## @MAX_MATRIX_KEY_NUM
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.no_dead_strip	_report_rotary_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function report_rotary_event
_report_rotary_event:                   ; @report_rotary_event
	.cfi_startproc
; %bb.0:
	cbz	w2, LBB0_3
; %bb.1:
	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
	.cfi_remember_state
	ldr	x19, [x0, #16]
	ldr	x8, [x0]
	ldr	w8, [x8, w1, sxtw #2]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x8
	bl	_input_report_rel
	b	LBB0_5
LBB0_3:
	.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
	.cfi_same_value w23
	.cfi_same_value w24
	ret
LBB0_4:
	.cfi_restore_state
Lloh0:
	adrp	x8, _MAX_MATRIX_KEY_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_MATRIX_KEY_NUM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, #1
	cset	w9, lt
	bfi	w9, w1, #1, #31
	add	w20, w9, w8
	ldr	x8, [x0, #8]
	ldrb	w21, [x8, w20, sxtw]
Lloh3:
	adrp	x22, _EV_MSC@GOTPAGE
Lloh4:
	ldr	x22, [x22, _EV_MSC@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh5:
	adrp	x23, _MSC_SCAN@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MSC_SCAN@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x3, x20
	bl	_input_event
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_input_report_key
	mov	x0, x19
	bl	_input_sync
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x3, x20
	bl	_input_event
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_input_report_key
LBB0_5:
	mov	x0, x19
	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
	b	_input_sync
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_MATRIX_KEY_NUM,4,2         ; @MAX_MATRIX_KEY_NUM
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.no_dead_strip	_report_rotary_event
.subsections_via_symbols
