	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rotary_encoder_irq
_rotary_encoder_irq:                    ## @rotary_encoder_irq
	.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	%rsi, %rbx
	leaq	8(%rsi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_rotary_encoder_get_state
	cmpl	$3, %eax
	ja	LBB0_7
## %bb.1:
	movl	%eax, %ecx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_4:
	cmpl	$0, (%rbx)
	je	LBB0_7
## %bb.5:
	movl	$2, %ecx
	subl	%eax, %ecx
	movl	%ecx, 4(%rbx)
	jmp	LBB0_7
LBB0_2:
	cmpl	$0, (%rbx)
	je	LBB0_7
## %bb.3:
	movq	%rbx, %rdi
	callq	_rotary_encoder_report_event
	movl	$0, (%rbx)
	jmp	LBB0_7
LBB0_6:
	movl	$1, (%rbx)
LBB0_7:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_6
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_rotary_encoder_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rotary_encoder_irq
_rotary_encoder_irq:                    ; @rotary_encoder_irq
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	add	x19, x1, #8
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_rotary_encoder_get_state
	cmp	w0, #3
	b.hi	LBB0_7
; %bb.1:
	mov	w8, w0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.3:
	mov	w8, #2
	sub	w8, w8, w0
	str	w8, [x20, #4]
	b	LBB0_7
LBB0_4:
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_rotary_encoder_report_event
	str	wzr, [x20]
	b	LBB0_7
LBB0_6:
	mov	w8, #1
	str	w8, [x20]
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
Lloh2:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_rotary_encoder_irq
.subsections_via_symbols
