	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spear_kbd_interrupt
_spear_kbd_interrupt:                   ## @spear_kbd_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	%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, %rbx
	movq	24(%rsi), %r14
	movq	_STATUS_REG@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	16(%rsi), %rdi
	callq	_readl_relaxed
	movq	_STATUS_DATA_AVAIL@GOTPCREL(%rip), %rcx
	testq	%rax, (%rcx)
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %esi
	movq	_KEY_RESERVED@GOTPCREL(%rip), %r15
	cmpl	(%r15), %esi
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_input_report_key
	movl	(%r15), %eax
	movl	%eax, (%rbx)
LBB0_4:
	movq	_DATA_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	16(%rbx), %rdi
	callq	_readl_relaxed
	movq	_DATA_ROW_MASK@GOTPCREL(%rip), %rdx
	movq	_DATA_COLUMN_MASK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	(%rdx), %rcx
	andq	%rax, %rcx
	movq	8(%rbx), %rax
	movl	(%rax,%rcx,4), %r15d
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_input_event
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$1, %edx
	callq	_input_report_key
	movq	%r14, %rdi
	callq	_input_sync
	movl	%r15d, (%rbx)
	movq	(%r12), %rsi
	addq	16(%rbx), %rsi
	xorl	%edi, %edi
	callq	_writel_relaxed
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATUS_REG,8,3                 ## @STATUS_REG
	.comm	_STATUS_DATA_AVAIL,8,3          ## @STATUS_DATA_AVAIL
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
	.comm	_DATA_REG,8,3                   ## @DATA_REG
	.comm	_DATA_ROW_MASK,8,3              ## @DATA_ROW_MASK
	.comm	_DATA_COLUMN_MASK,8,3           ## @DATA_COLUMN_MASK
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_spear_kbd_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spear_kbd_interrupt
_spear_kbd_interrupt:                   ; @spear_kbd_interrupt
	.cfi_startproc
; %bb.0:
	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
	ldp	x8, x20, [x1, #16]
Lloh0:
	adrp	x22, _STATUS_REG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _STATUS_REG@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh2:
	adrp	x8, _STATUS_DATA_AVAIL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _STATUS_DATA_AVAIL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	tst	x8, x0
	b.eq	LBB0_4
; %bb.1:
	ldr	w1, [x19]
Lloh5:
	adrp	x21, _KEY_RESERVED@GOTPAGE
Lloh6:
	ldr	x21, [x21, _KEY_RESERVED@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w1, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x20
	mov	w2, #0
	bl	_input_report_key
	ldr	w8, [x21]
	str	w8, [x19]
LBB0_3:
	ldr	x8, [x19, #16]
Lloh7:
	adrp	x9, _DATA_REG@GOTPAGE
Lloh8:
	ldr	x9, [x9, _DATA_REG@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh10:
	adrp	x8, _DATA_ROW_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DATA_ROW_MASK@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _DATA_COLUMN_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _DATA_COLUMN_MASK@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	orr	x8, x9, x8
	and	x3, x8, x0
	ldr	x8, [x19, #8]
	ldr	w21, [x8, x3, lsl #2]
Lloh16:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _MSC_SCAN@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MSC_SCAN@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_input_event
	mov	x0, x20
	mov	x1, x21
	mov	w2, #1
	bl	_input_report_key
	mov	x0, x20
	bl	_input_sync
	str	w21, [x19]
	ldr	x8, [x19, #16]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	w0, #0
	bl	_writel_relaxed
Lloh22:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh24:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_STATUS_REG,8,3                 ; @STATUS_REG
	.comm	_STATUS_DATA_AVAIL,8,3          ; @STATUS_DATA_AVAIL
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
	.comm	_DATA_REG,8,3                   ; @DATA_REG
	.comm	_DATA_ROW_MASK,8,3              ; @DATA_ROW_MASK
	.comm	_DATA_COLUMN_MASK,8,3           ; @DATA_COLUMN_MASK
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_spear_kbd_interrupt
.subsections_via_symbols
