	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_ps2_probe
_altera_ps2_probe:                      ## @altera_ps2_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, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	movq	%rax, %r14
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 8(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	8(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movl	%eax, %r15d
	movq	_altera_ps2_rxint@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	4(%r13), %r8d
	movq	%r13, %rdi
	movl	%r15d, %esi
	xorl	%ecx, %ecx
	movq	%r14, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_dev_err
	jmp	LBB0_11
LBB0_6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_7:
	movl	(%r12), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rax, %r12
	movq	_SERIO_8042@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r12)
	movq	_altera_ps2_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	_altera_ps2_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	movq	_altera_ps2_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12)
	movl	20(%r12), %ebx
	movq	%r13, %rdi
	callq	_dev_name
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$4, %edx
	callq	_strlcpy
	movl	16(%r12), %ebx
	movq	%r13, %rdi
	callq	_dev_name
	movl	%ebx, %edi
	movl	%eax, %esi
	movl	$4, %edx
	callq	_strlcpy
	movq	%r14, 8(%r12)
	movq	%r13, (%r12)
	movq	%r12, (%r14)
	movl	8(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	%r15d, %ecx
	callq	_dev_info
	movq	(%r14), %rdi
	callq	_serio_register_port
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_10:
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_altera_ps2_rxint,4,2           ## @altera_ps2_rxint
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not request IRQ %d\n"

	.comm	_SERIO_8042,4,2                 ## @SERIO_8042
	.comm	_altera_ps2_write,4,2           ## @altera_ps2_write
	.comm	_altera_ps2_open,4,2            ## @altera_ps2_open
	.comm	_altera_ps2_close,4,2           ## @altera_ps2_close
L_.str.1:                               ## @.str.1
	.asciz	"base %p, irq %d\n"

	.no_dead_strip	_altera_ps2_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_ps2_probe
_altera_ps2_probe:                      ; @altera_ps2_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
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	w0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x20, #8]
	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
	b	_PTR_ERR
LBB0_3:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x21, x0
Lloh5:
	adrp	x8, _altera_ps2_rxint@GOTPAGE
Lloh6:
	ldr	x8, [x8, _altera_ps2_rxint@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	ldr	w4, [x19, #4]
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	mov	x5, x20
	bl	_devm_request_irq
	cbz	w0, LBB0_7
; %bb.5:
	mov	x22, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_11
LBB0_6:
Lloh10:
	adrp	x8, _ENXIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	ldr	w1, [x23]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.8:
	mov	x22, x0
Lloh12:
	adrp	x8, _SERIO_8042@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SERIO_8042@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _altera_ps2_write@GOTPAGE
Lloh16:
	ldr	x9, [x9, _altera_ps2_write@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #32]
Lloh18:
	adrp	x8, _altera_ps2_open@GOTPAGE
Lloh19:
	ldr	x8, [x8, _altera_ps2_open@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _altera_ps2_close@GOTPAGE
Lloh22:
	ldr	x9, [x9, _altera_ps2_close@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #24]
	ldr	w23, [x0, #20]
	mov	x0, x19
	bl	_dev_name
	mov	x1, x0
	mov	x0, x23
	mov	w2, #4
	bl	_strlcpy
	ldr	w23, [x22, #16]
	mov	x0, x19
	bl	_dev_name
	mov	x1, x0
	mov	x0, x23
	mov	w2, #4
	bl	_strlcpy
	stp	x19, x20, [x22]
	str	x22, [x20]
	ldr	w2, [x20, #8]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	bl	_dev_info
	ldr	x0, [x20]
	bl	_serio_register_port
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	w22, #0
	b	LBB0_11
LBB0_9:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_11:
	mov	x0, x22
	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 AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_altera_ps2_rxint,4,2           ; @altera_ps2_rxint
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not request IRQ %d\n"

	.comm	_SERIO_8042,4,2                 ; @SERIO_8042
	.comm	_altera_ps2_write,4,2           ; @altera_ps2_write
	.comm	_altera_ps2_open,4,2            ; @altera_ps2_open
	.comm	_altera_ps2_close,4,2           ; @altera_ps2_close
l_.str.1:                               ; @.str.1
	.asciz	"base %p, irq %d\n"

	.no_dead_strip	_altera_ps2_probe
.subsections_via_symbols
