	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps2_txint
_ps2_txint:                             ## @ps2_txint
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r15d
	leaq	16(%rsi), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movq	_PS2STAT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%rbx), %rdi
	callq	_readl_relaxed
	movq	8(%rbx), %rcx
	cmpq	%rcx, (%rbx)
	jne	LBB0_2
## %bb.1:
	movl	%r15d, %edi
	callq	_disable_irq_nosync
	jmp	LBB0_4
LBB0_2:
	movq	_PS2STAT_TXE@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_4
## %bb.3:
	movq	32(%rbx), %rax
	movl	(%rax,%rcx,4), %edi
	movq	_PS2DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%rbx), %rsi
	callq	_writel_relaxed
	movl	8(%rbx), %eax
	incl	%eax
	andl	$7, %eax
	movq	%rax, 8(%rbx)
LBB0_4:
	movq	%r14, %rdi
	callq	_spin_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PS2STAT,8,3                    ## @PS2STAT
	.comm	_PS2STAT_TXE,4,2                ## @PS2STAT_TXE
	.comm	_PS2DATA,8,3                    ## @PS2DATA
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_ps2_txint
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps2_txint
_ps2_txint:                             ; @ps2_txint
	.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	x20, x1
	mov	x21, x0
	add	x19, x1, #16
	mov	x0, x19
	bl	_spin_lock
	ldr	x8, [x20, #24]
Lloh0:
	adrp	x9, _PS2STAT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PS2STAT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldp	x9, x8, [x20]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_disable_irq_nosync
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x9, _PS2STAT_TXE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PS2STAT_TXE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_4
; %bb.3:
	ldp	x10, x9, [x20, #24]
	ldr	w0, [x9, x8, lsl #2]
Lloh6:
	adrp	x8, _PS2DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PS2DATA@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	add	x1, x8, x10
	bl	_writel_relaxed
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	and	x8, x8, #0x7
	str	x8, [x20, #8]
LBB0_4:
	mov	x0, x19
	bl	_spin_unlock
Lloh9:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh11:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PS2STAT,8,3                    ; @PS2STAT
	.comm	_PS2STAT_TXE,4,2                ; @PS2STAT_TXE
	.comm	_PS2DATA,8,3                    ; @PS2DATA
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_ps2_txint
.subsections_via_symbols
