	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcips2_open
_pcips2_open:                           ## @pcips2_open
	.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	(%rdi), %rbx
	movq	_PS2_CTRL_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	(%rbx), %esi
	callq	_outb
	movq	%rbx, %rdi
	callq	_pcips2_flush_input
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	_pcips2_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %r8
	callq	_request_irq
	movl	%eax, %r14d
	movq	_PS2_CTRL_RXIRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%r15), %eax
	xorl	%edi, %edi
	testl	%r14d, %r14d
	cmovel	%eax, %edi
	movl	(%rbx), %esi
	callq	_outb
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PS2_CTRL_ENABLE,4,2            ## @PS2_CTRL_ENABLE
	.comm	_pcips2_interrupt,4,2           ## @pcips2_interrupt
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pcips2"

	.comm	_PS2_CTRL_RXIRQ,4,2             ## @PS2_CTRL_RXIRQ
	.no_dead_strip	_pcips2_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcips2_open
_pcips2_open:                           ; @pcips2_open
	.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
	ldr	x19, [x0]
Lloh0:
	adrp	x21, _PS2_CTRL_ENABLE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PS2_CTRL_ENABLE@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w1, [x19]
	bl	_outb
	mov	x0, x19
	bl	_pcips2_flush_input
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh2:
	adrp	x8, _pcips2_interrupt@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pcips2_interrupt@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	x4, x19
	bl	_request_irq
	mov	x20, x0
Lloh10:
	adrp	x8, _PS2_CTRL_RXIRQ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PS2_CTRL_RXIRQ@GOTPAGEOFF]
	ldr	w9, [x21]
Lloh12:
	ldr	w8, [x8]
	orr	w8, w8, w9
	cmp	w0, #0
	csel	w0, w8, wzr, eq
	ldr	w1, [x19]
	bl	_outb
	mov	x0, x20
	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	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PS2_CTRL_ENABLE,4,2            ; @PS2_CTRL_ENABLE
	.comm	_pcips2_interrupt,4,2           ; @pcips2_interrupt
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pcips2"

	.comm	_PS2_CTRL_RXIRQ,4,2             ; @PS2_CTRL_RXIRQ
	.no_dead_strip	_pcips2_open
.subsections_via_symbols
