	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4i_ps2_interrupt
_sun4i_ps2_interrupt:                   ## @sun4i_ps2_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	%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, %rbx
	movq	%rsi, %rdi
	callq	_spin_lock
	movq	_PS2_REG_LSTS@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r12d
	movq	_PS2_REG_FSTS@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	%eax, %r13d
	movq	_PS2_LINE_ERROR_BIT@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	je	LBB0_1
## %bb.2:
	movq	_PS2_LSTS_PARERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %eax
	andl	%r12d, %eax
	movq	_SERIO_PARITY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	cmovel	%eax, %r12d
	movq	_SERIO_TIMEOUT@GOTPCREL(%rip), %rcx
	cmovnel	(%rcx), %eax
	movq	_SERIO_FRAME@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r12d
	movq	_PS2_LSTS_TXTDO@GOTPCREL(%rip), %rcx
	movq	_PS2_LSTS_STOPERR@GOTPCREL(%rip), %rdx
	orl	(%rcx), %edi
	movq	_PS2_LSTS_ACKERR@GOTPCREL(%rip), %rcx
	movq	_PS2_LSTS_RXTDO@GOTPCREL(%rip), %rsi
	orl	(%rdx), %edi
	orl	(%rcx), %edi
	orl	(%rsi), %edi
	orl	%eax, %r12d
	movq	(%r14), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
	jmp	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
LBB0_3:
	movq	_PS2_FIFO_ERROR_BIT@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_PS2_FSTS_TXUF@GOTPCREL(%rip), %rax
	movq	_PS2_FSTS_TXOF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_PS2_FSTS_TXRDY@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_PS2_FSTS_RXUF@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_PS2_FSTS_RXOF@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_PS2_FSTS_RXRDY@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	(%r15), %rsi
	addq	8(%rbx), %rsi
	callq	_writel
LBB0_5:
	movl	%r13d, %r15d
	shrl	$16, %r15d
	andl	$3, %r15d
	je	LBB0_8
## %bb.6:
	movq	_PS2_REG_DATA@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movl	16(%rbx), %edi
	movzbl	%al, %esi
	movl	%r12d, %edx
	callq	_serio_interrupt
	decl	%r15d
	jne	LBB0_7
LBB0_8:
	movq	_PS2_REG_LSTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_writel
	movq	_PS2_REG_FSTS@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r13d, %edi
	callq	_writel
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PS2_REG_LSTS,8,3               ## @PS2_REG_LSTS
	.comm	_PS2_REG_FSTS,8,3               ## @PS2_REG_FSTS
	.comm	_PS2_LINE_ERROR_BIT,4,2         ## @PS2_LINE_ERROR_BIT
	.comm	_SERIO_FRAME,4,2                ## @SERIO_FRAME
	.comm	_PS2_LSTS_PARERR,4,2            ## @PS2_LSTS_PARERR
	.comm	_SERIO_PARITY,4,2               ## @SERIO_PARITY
	.comm	_SERIO_TIMEOUT,4,2              ## @SERIO_TIMEOUT
	.comm	_PS2_LSTS_TXTDO,4,2             ## @PS2_LSTS_TXTDO
	.comm	_PS2_LSTS_STOPERR,4,2           ## @PS2_LSTS_STOPERR
	.comm	_PS2_LSTS_ACKERR,4,2            ## @PS2_LSTS_ACKERR
	.comm	_PS2_LSTS_RXTDO,4,2             ## @PS2_LSTS_RXTDO
	.comm	_PS2_FIFO_ERROR_BIT,4,2         ## @PS2_FIFO_ERROR_BIT
	.comm	_PS2_FSTS_TXUF,4,2              ## @PS2_FSTS_TXUF
	.comm	_PS2_FSTS_TXOF,4,2              ## @PS2_FSTS_TXOF
	.comm	_PS2_FSTS_TXRDY,4,2             ## @PS2_FSTS_TXRDY
	.comm	_PS2_FSTS_RXUF,4,2              ## @PS2_FSTS_RXUF
	.comm	_PS2_FSTS_RXOF,4,2              ## @PS2_FSTS_RXOF
	.comm	_PS2_FSTS_RXRDY,4,2             ## @PS2_FSTS_RXRDY
	.comm	_PS2_REG_DATA,8,3               ## @PS2_REG_DATA
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sun4i_ps2_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4i_ps2_interrupt
_sun4i_ps2_interrupt:                   ; @sun4i_ps2_interrupt
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	mov	x0, x1
	bl	_spin_lock
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x23, _PS2_REG_LSTS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PS2_REG_LSTS@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x24, _PS2_REG_FSTS@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PS2_REG_FSTS@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
Lloh4:
	adrp	x8, _PS2_LINE_ERROR_BIT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PS2_LINE_ERROR_BIT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _SERIO_FRAME@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SERIO_FRAME@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _PS2_LSTS_PARERR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PS2_LSTS_PARERR@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _SERIO_PARITY@GOTPAGE
Lloh14:
	ldr	x10, [x10, _SERIO_PARITY@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w10, wzr, w10, eq
	orr	w8, w10, w8
Lloh16:
	adrp	x10, _SERIO_TIMEOUT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _SERIO_TIMEOUT@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	csel	w10, wzr, w10, eq
Lloh19:
	adrp	x11, _PS2_LSTS_TXTDO@GOTPAGE
Lloh20:
	ldr	x11, [x11, _PS2_LSTS_TXTDO@GOTPAGEOFF]
	orr	w22, w8, w10
Lloh21:
	ldr	w8, [x11]
Lloh22:
	adrp	x10, _PS2_LSTS_STOPERR@GOTPAGE
Lloh23:
	ldr	x10, [x10, _PS2_LSTS_STOPERR@GOTPAGEOFF]
Lloh24:
	adrp	x11, _PS2_LSTS_ACKERR@GOTPAGE
Lloh25:
	ldr	x11, [x11, _PS2_LSTS_ACKERR@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
Lloh27:
	ldr	w11, [x11]
Lloh28:
	adrp	x12, _PS2_LSTS_RXTDO@GOTPAGE
Lloh29:
	ldr	x12, [x12, _PS2_LSTS_RXTDO@GOTPAGEOFF]
Lloh30:
	ldr	w12, [x12]
	orr	w8, w8, w9
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w0, w8, w12
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
	b	LBB0_3
LBB0_2:
	mov	w22, #0
LBB0_3:
Lloh31:
	adrp	x8, _PS2_FIFO_ERROR_BIT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PS2_FIFO_ERROR_BIT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.4:
Lloh34:
	adrp	x8, _PS2_FSTS_TXUF@GOTPAGE
Lloh35:
	ldr	x8, [x8, _PS2_FSTS_TXUF@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _PS2_FSTS_TXOF@GOTPAGE
Lloh38:
	ldr	x9, [x9, _PS2_FSTS_TXOF@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
Lloh40:
	adrp	x10, _PS2_FSTS_TXRDY@GOTPAGE
Lloh41:
	ldr	x10, [x10, _PS2_FSTS_TXRDY@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh42:
	ldr	w9, [x10]
	orr	w8, w8, w9
Lloh43:
	adrp	x9, _PS2_FSTS_RXUF@GOTPAGE
Lloh44:
	ldr	x9, [x9, _PS2_FSTS_RXUF@GOTPAGEOFF]
Lloh45:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh46:
	adrp	x9, _PS2_FSTS_RXOF@GOTPAGE
Lloh47:
	ldr	x9, [x9, _PS2_FSTS_RXOF@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
Lloh49:
	adrp	x10, _PS2_FSTS_RXRDY@GOTPAGE
Lloh50:
	ldr	x10, [x10, _PS2_FSTS_RXRDY@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh51:
	ldr	w9, [x10]
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	add	x1, x9, x8
	bl	_writel
LBB0_5:
	ubfx	w25, w21, #16, #2
	cbz	w25, LBB0_9
; %bb.6:
	ldr	x8, [x19, #8]
Lloh52:
	adrp	x26, _PS2_REG_DATA@GOTPAGE
Lloh53:
	ldr	x26, [x26, _PS2_REG_DATA@GOTPAGEOFF]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x19, #16]
	and	w1, w0, #0xff
	mov	x0, x8
	mov	x2, x22
	bl	_serio_interrupt
	cmp	w25, #1
	b.eq	LBB0_9
; %bb.7:
	ldr	x8, [x19, #8]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x19, #16]
	and	w1, w0, #0xff
	mov	x0, x8
	mov	x2, x22
	bl	_serio_interrupt
	cmp	w25, #2
	b.eq	LBB0_9
; %bb.8:
	ldr	x8, [x19, #8]
	ldr	x9, [x26]
	add	x0, x9, x8
	bl	_readl
	ldr	w8, [x19, #16]
	and	w1, w0, #0xff
	mov	x0, x8
	mov	x2, x22
	bl	_serio_interrupt
LBB0_9:
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel
	ldr	x8, [x19, #8]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	mov	x0, x19
	bl	_spin_unlock
Lloh54:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh55:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh56:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh26
	.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 AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_PS2_REG_LSTS,8,3               ; @PS2_REG_LSTS
	.comm	_PS2_REG_FSTS,8,3               ; @PS2_REG_FSTS
	.comm	_PS2_LINE_ERROR_BIT,4,2         ; @PS2_LINE_ERROR_BIT
	.comm	_SERIO_FRAME,4,2                ; @SERIO_FRAME
	.comm	_PS2_LSTS_PARERR,4,2            ; @PS2_LSTS_PARERR
	.comm	_SERIO_PARITY,4,2               ; @SERIO_PARITY
	.comm	_SERIO_TIMEOUT,4,2              ; @SERIO_TIMEOUT
	.comm	_PS2_LSTS_TXTDO,4,2             ; @PS2_LSTS_TXTDO
	.comm	_PS2_LSTS_STOPERR,4,2           ; @PS2_LSTS_STOPERR
	.comm	_PS2_LSTS_ACKERR,4,2            ; @PS2_LSTS_ACKERR
	.comm	_PS2_LSTS_RXTDO,4,2             ; @PS2_LSTS_RXTDO
	.comm	_PS2_FIFO_ERROR_BIT,4,2         ; @PS2_FIFO_ERROR_BIT
	.comm	_PS2_FSTS_TXUF,4,2              ; @PS2_FSTS_TXUF
	.comm	_PS2_FSTS_TXOF,4,2              ; @PS2_FSTS_TXOF
	.comm	_PS2_FSTS_TXRDY,4,2             ; @PS2_FSTS_TXRDY
	.comm	_PS2_FSTS_RXUF,4,2              ; @PS2_FSTS_RXUF
	.comm	_PS2_FSTS_RXOF,4,2              ; @PS2_FSTS_RXOF
	.comm	_PS2_FSTS_RXRDY,4,2             ; @PS2_FSTS_RXRDY
	.comm	_PS2_REG_DATA,8,3               ; @PS2_REG_DATA
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sun4i_ps2_interrupt
.subsections_via_symbols
