	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opencores_kbd_probe
_opencores_kbd_probe:                   ## @opencores_kbd_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, %r15
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_platform_get_resource
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r13
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	js	LBB0_7
## %bb.2:
	movl	%eax, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.3:
	movq	%rax, %r14
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movq	%r15, %rdi
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	%rax, %r12
	movq	%rax, 16(%r14)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 8(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movl	8(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_12:
	movl	4(%r15), %eax
	movl	%eax, 48(%r12)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, (%r12)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r12)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 32(%r12)
	movl	$256, 40(%r12)                  ## imm = 0x100
	movq	(%r14), %rdi
	movq	%rdi, 8(%r12)
	movl	$4, 16(%r12)
	callq	_ARRAY_SIZE
	movl	%eax, 20(%r12)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	28(%r12), %esi
	callq	___set_bit
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_15
## %bb.13:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	%ebx, (%rax,%rbx,4)
	movl	24(%r12), %esi
	movl	%ebx, %edi
	callq	___set_bit
	incq	%rbx
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_14
LBB0_15:
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	24(%r12), %esi
	callq	___clear_bit
	movq	_IRQF_TRIGGER_RISING@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	4(%r15), %r8d
	movq	_opencores_kbd_isr@GOTPCREL(%rip), %rdx
	movq	%r15, %rdi
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %esi
	movq	%r14, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_17:
	movq	%r12, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_19:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing board memory resource\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate input device\n"

L_.str.2:                               ## @.str.2
	.asciz	"opencores-kbd/input0"

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
	.comm	_opencores_kbd_isr,4,2          ## @opencores_kbd_isr
	.comm	_IRQF_TRIGGER_RISING,4,2        ## @IRQF_TRIGGER_RISING
L_.str.3:                               ## @.str.3
	.asciz	"unable to claim irq %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"unable to register input device\n"

	.no_dead_strip	_opencores_kbd_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opencores_kbd_probe
_opencores_kbd_probe:                   ; @opencores_kbd_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_platform_get_resource
	cbz	x0, LBB0_6
; %bb.1:
	mov	x23, x0
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	tbnz	w0, #31, LBB0_7
; %bb.2:
	mov	x20, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x21, x0
	mov	x0, x19
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_8
; %bb.4:
	mov	x22, x0
	str	x0, [x21, #16]
	mov	x0, x19
	mov	x1, x23
	bl	_devm_ioremap_resource
	str	w0, [x21, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.5:
	ldr	w0, [x21, #8]
	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
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_6:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_9:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_12:
	ldr	w11, [x19, #4]
Lloh14:
	adrp	x9, l_.str.2@PAGE
Lloh15:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh16:
	adrp	x10, _BUS_HOST@GOTPAGE
Lloh17:
	ldr	x10, [x10, _BUS_HOST@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x10]
	movi.2s	v0, #1
	str	d0, [x22, #32]
	mov	w10, #256
	stp	w8, w11, [x22, #44]
	str	w10, [x22, #40]
	ldr	x0, [x21]
	stp	x9, x0, [x22]
	mov	w8, #4
	str	w8, [x22, #16]
	bl	_ARRAY_SIZE
	str	w0, [x22, #20]
Lloh19:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	ldr	w1, [x22, #28]
	bl	___set_bit
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_15
; %bb.13:
	mov	x23, #0
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	str	w23, [x8, x23, lsl #2]
	ldr	w1, [x22, #24]
	mov	x0, x23
	bl	___set_bit
	add	x23, x23, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	x23, w0, sxtw
	b.lt	LBB0_14
LBB0_15:
Lloh22:
	adrp	x8, _KEY_RESERVED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _KEY_RESERVED@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
	ldr	w1, [x22, #24]
	bl	___clear_bit
Lloh25:
	adrp	x8, _IRQF_TRIGGER_RISING@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IRQF_TRIGGER_RISING@GOTPAGEOFF]
Lloh27:
	ldr	w3, [x8]
	ldr	w4, [x19, #4]
Lloh28:
	adrp	x2, _opencores_kbd_isr@GOTPAGE
Lloh29:
	ldr	x2, [x2, _opencores_kbd_isr@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x20
	mov	x5, x21
	bl	_devm_request_irq
	cbz	w0, LBB0_17
; %bb.16:
	mov	x21, x0
	str	x20, [sp]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_19
LBB0_17:
	mov	x0, x22
	bl	_input_register_device
	mov	x21, x0
	cbz	w0, LBB0_11
; %bb.18:
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_19:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing board memory resource\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate input device\n"

l_.str.2:                               ; @.str.2
	.asciz	"opencores-kbd/input0"

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
	.comm	_opencores_kbd_isr,4,2          ; @opencores_kbd_isr
	.comm	_IRQF_TRIGGER_RISING,4,2        ; @IRQF_TRIGGER_RISING
l_.str.3:                               ; @.str.3
	.asciz	"unable to claim irq %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"unable to register input device\n"

	.no_dead_strip	_opencores_kbd_probe
.subsections_via_symbols
