	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spaceball_interrupt
_spaceball_interrupt:                   ## @spaceball_interrupt
	.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
	movl	%esi, %r14d
	callq	_serio_get_drvdata
	movq	%rax, %rbx
	leal	-77(%r14), %eax
	cmpb	$17, %al
	ja	LBB0_1
## %bb.13:
	movzbl	%al, %eax
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_6:
	cmpl	$0, (%rbx)
	je	LBB0_10
LBB0_7:
	movl	$0, (%rbx)
	andb	$31, %r14b
	jmp	LBB0_10
LBB0_1:
	cmpb	$13, %r14b
	jne	LBB0_8
## %bb.2:
	movq	%rbx, %rdi
	callq	_spaceball_process_packet
	movl	$0, 16(%rbx)
	movl	$0, (%rbx)
	jmp	LBB0_12
LBB0_8:
	cmpl	$0, (%rbx)
	je	LBB0_10
## %bb.9:
	movl	$0, (%rbx)
	jmp	LBB0_10
LBB0_3:
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.5:
	movl	$0, (%rbx)
	cmpl	$0, (%rbx)
	jne	LBB0_7
LBB0_10:
	movslq	16(%rbx), %rax
	movq	_SPACEBALL_MAX_LENGTH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_12
## %bb.11:
	movq	8(%rbx), %rcx
	leal	1(%rax), %edx
	movl	%edx, 16(%rbx)
	movb	%r14b, (%rcx,%rax)
LBB0_12:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movl	$1, (%rbx)
	jmp	LBB0_12
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_8
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_SPACEBALL_MAX_LENGTH,4,2       ## @SPACEBALL_MAX_LENGTH
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_spaceball_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spaceball_interrupt
_spaceball_interrupt:                   ; @spaceball_interrupt
	.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
	bl	_serio_get_drvdata
	mov	x19, x0
	sub	w8, w20, #77
	cmp	w8, #17
	b.hi	LBB0_4
; %bb.1:
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, [x19]
	cbz	w8, LBB0_10
LBB0_3:
	str	wzr, [x19]
	and	w20, w20, #0x1f
	b	LBB0_10
LBB0_4:
	cmp	w20, #13
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_spaceball_process_packet
	str	wzr, [x19, #16]
	str	wzr, [x19]
	b	LBB0_12
LBB0_6:
	ldr	w8, [x19]
	cbz	w8, LBB0_10
; %bb.7:
	str	wzr, [x19]
	b	LBB0_10
LBB0_8:
	ldr	w8, [x19]
	cbz	w8, LBB0_13
; %bb.9:
	str	wzr, [x19]
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
LBB0_10:
	ldrsw	x8, [x19, #16]
Lloh2:
	adrp	x9, _SPACEBALL_MAX_LENGTH@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SPACEBALL_MAX_LENGTH@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_12
; %bb.11:
	ldr	x9, [x19, #8]
	add	w10, w8, #1
	str	w10, [x19, #16]
	strb	w20, [x9, x8]
LBB0_12:
Lloh5:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	w8, #1
	str	w8, [x19]
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.comm	_SPACEBALL_MAX_LENGTH,4,2       ; @SPACEBALL_MAX_LENGTH
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_spaceball_interrupt
.subsections_via_symbols
