	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpckbd_probe
_rpckbd_probe:                          ## @rpckbd_probe
	.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	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %r13d
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_platform_get_irq
	movl	%eax, %r12d
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$48, %edi
	callq	_kzalloc
	movq	%rax, %r15
	movl	(%rbx), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%r15, %r15
	je	LBB0_6
## %bb.5:
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	%r13d, (%rax)
	movl	%r12d, 4(%rax)
	movq	_SERIO_8042@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 44(%r15)
	movq	_rpckbd_write@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%r15)
	movq	_rpckbd_open@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 36(%r15)
	movq	_rpckbd_close@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%r15)
	movq	%r14, 24(%r15)
	movq	%rax, 16(%r15)
	movl	12(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movl	8(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$4, %edx
	callq	_strlcpy
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	%r15, %rdi
	callq	_serio_register_port
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	testl	%r13d, %r13d
	cmovnel	%r13d, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%r12d, %r12d
	cmovnel	%r12d, %ebx
	jmp	LBB0_8
LBB0_6:
	movq	%rax, %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_kfree
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SERIO_8042,4,2                 ## @SERIO_8042
	.comm	_rpckbd_write,4,2               ## @rpckbd_write
	.comm	_rpckbd_open,4,2                ## @rpckbd_open
	.comm	_rpckbd_close,4,2               ## @rpckbd_close
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RiscPC PS/2 kbd port"

L_.str.1:                               ## @.str.1
	.asciz	"rpckbd/serio0"

	.no_dead_strip	_rpckbd_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpckbd_probe
_rpckbd_probe:                          ; @rpckbd_probe
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	mov	w1, #0
	bl	_platform_get_irq
	mov	x21, x0
	cmp	w0, #0
	b.le	LBB0_4
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	bl	_platform_get_irq
	mov	x22, x0
	cmp	w0, #0
	b.le	LBB0_5
; %bb.2:
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #48
	bl	_kzalloc
	mov	x20, x0
	ldr	w1, [x23]
	mov	w0, #48
	bl	_kzalloc
	cmp	x20, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_6
; %bb.3:
	bl	_kfree
	mov	x0, x20
	bl	_kfree
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_4:
Lloh5:
	adrp	x8, _ENXIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	csneg	w0, w21, w8, ne
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	csneg	w0, w22, w8, ne
	b	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _SERIO_8042@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SERIO_8042@GOTPAGEOFF]
	stp	w21, w22, [x0]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _rpckbd_write@GOTPAGE
Lloh15:
	ldr	x9, [x9, _rpckbd_write@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
Lloh17:
	adrp	x8, _rpckbd_open@GOTPAGE
Lloh18:
	ldr	x8, [x8, _rpckbd_open@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _rpckbd_close@GOTPAGE
Lloh21:
	ldr	x9, [x9, _rpckbd_close@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #32]
	stp	x0, x19, [x20, #16]
	ldr	w0, [x20, #12]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_strlcpy
	ldr	w0, [x20, #8]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #4
	bl	_strlcpy
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x20
	bl	_serio_register_port
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SERIO_8042,4,2                 ; @SERIO_8042
	.comm	_rpckbd_write,4,2               ; @rpckbd_write
	.comm	_rpckbd_open,4,2                ; @rpckbd_open
	.comm	_rpckbd_close,4,2               ; @rpckbd_close
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RiscPC PS/2 kbd port"

l_.str.1:                               ; @.str.1
	.asciz	"rpckbd/serio0"

	.no_dead_strip	_rpckbd_probe
.subsections_via_symbols
