	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function spear_kbd_probe
_spear_kbd_probe:                       ## @spear_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_dev_get_platdata
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	24(%rbx), %r12
	jmp	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
LBB0_3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, 32(%r14)
	movl	%r13d, (%r14)
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.12:
	movl	16(%rbx), %eax
	movl	%eax, 28(%r14)
	movq	8(%rbx), %rax
	movq	%rax, 8(%r14)
	movl	(%rbx), %eax
	movl	%eax, 24(%r14)
LBB0_13:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 20(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movl	20(%r14), %edi
	jmp	LBB0_15
LBB0_4:
	movl	%r13d, %r12d
	jmp	LBB0_29
LBB0_6:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_7
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_29:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_spear_kbd_parse_dt
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_29
	jmp	LBB0_13
LBB0_16:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, 4(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:
	movl	4(%r14), %edi
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_18:
	leaq	L_.str.2(%rip), %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rax, (%rbx)
	leaq	L_.str.3(%rip), %rax
	movq	%rax, 8(%rbx)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 28(%rbx)
	movl	$256, 36(%rbx)                  ## imm = 0x100
	movq	_spear_kbd_open@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_spear_kbd_close@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_NUM_ROWS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_NUM_COLS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	16(%r14), %r8d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	movq	%rbx, %r9
	callq	_matrix_keypad_build_keymap
	testl	%eax, %eax
	je	LBB0_21
## %bb.19:
	movl	%eax, %r12d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_20
LBB0_21:
	cmpq	$0, 8(%r14)
	je	LBB0_23
## %bb.22:
	movq	_EV_REP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%rbx), %esi
	callq	___set_bit
LBB0_23:
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_input_set_capability
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_input_set_drvdata
	movq	_spear_kbd_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.5(%rip), %r8
	movq	%r15, %rdi
	movl	%r13d, %esi
	xorl	%ecx, %ecx
	movq	%r14, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_25
## %bb.24:
	movl	%eax, %r12d
	leaq	L_.str.6(%rip), %rsi
LBB0_20:
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_29
LBB0_25:
	movl	4(%r14), %edi
	callq	_clk_prepare
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_29
## %bb.26:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_28
## %bb.27:
	movl	%eax, %r12d
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	4(%r14), %edi
	callq	_clk_unprepare
	jmp	LBB0_29
LBB0_28:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	xorl	%r12d, %r12d
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"not enough memory for driver data\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"unable to allocate input device\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.2:                               ## @.str.2
	.asciz	"Spear Keyboard"

L_.str.3:                               ## @.str.3
	.asciz	"keyboard/input0"

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_spear_kbd_open,4,2             ## @spear_kbd_open
	.comm	_spear_kbd_close,4,2            ## @spear_kbd_close
	.comm	_NUM_ROWS,4,2                   ## @NUM_ROWS
	.comm	_NUM_COLS,4,2                   ## @NUM_COLS
L_.str.4:                               ## @.str.4
	.asciz	"Failed to build keymap\n"

	.comm	_EV_REP,4,2                     ## @EV_REP
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.comm	_spear_kbd_interrupt,4,2        ## @spear_kbd_interrupt
L_.str.5:                               ## @.str.5
	.asciz	"keyboard"

L_.str.6:                               ## @.str.6
	.asciz	"request_irq failed\n"

L_.str.7:                               ## @.str.7
	.asciz	"Unable to register keyboard device\n"

	.no_dead_strip	_spear_kbd_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function spear_kbd_probe
_spear_kbd_probe:                       ; @spear_kbd_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
	bl	_dev_get_platdata
	mov	x24, x0
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x23, [x24, #24]
	b	LBB0_3
LBB0_2:
	mov	x23, #0
LBB0_3:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	mov	x22, x0
	tbnz	w0, #31, LBB0_10
; %bb.4:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_11
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_12
; %bb.6:
	mov	x21, x0
	str	x0, [x20, #32]
	str	w22, [x20]
	cbz	x24, LBB0_15
; %bb.7:
	ldr	w8, [x24, #16]
	ldr	x9, [x24, #8]
	str	x9, [x20, #8]
	ldr	w9, [x24]
	stp	w9, w8, [x20, #24]
LBB0_8:
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	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, #20]
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.9:
	ldr	w0, [x20, #20]
	b	LBB0_18
LBB0_10:
	mov	x24, x22
	b	LBB0_14
LBB0_11:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_13
LBB0_12:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_13:
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_14:
	mov	x0, x24
	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
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	bl	_spear_kbd_parse_dt
	mov	x24, x0
	cbnz	w0, LBB0_14
	b	LBB0_8
LBB0_16:
	mov	x0, x19
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x20, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_19
; %bb.17:
	ldr	w0, [x20, #4]
LBB0_18:
	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_19:
Lloh13:
	adrp	x8, l_.str.2@PAGE
Lloh14:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh15:
	adrp	x9, l_.str.3@PAGE
Lloh16:
	add	x9, x9, l_.str.3@PAGEOFF
	stp	x8, x9, [x21]
Lloh17:
	adrp	x8, _BUS_HOST@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BUS_HOST@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	movi.2s	v0, #1
	stur	d0, [x21, #28]
	mov	w9, #256
	stp	w9, w8, [x21, #36]
Lloh20:
	adrp	x8, _spear_kbd_open@GOTPAGE
Lloh21:
	ldr	x8, [x8, _spear_kbd_open@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _spear_kbd_close@GOTPAGE
Lloh24:
	ldr	x9, [x9, _spear_kbd_close@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
Lloh26:
	adrp	x10, _NUM_ROWS@GOTPAGE
Lloh27:
	ldr	x10, [x10, _NUM_ROWS@GOTPAGEOFF]
	stp	w9, w8, [x21, #20]
Lloh28:
	ldr	w2, [x10]
Lloh29:
	adrp	x8, _NUM_COLS@GOTPAGE
Lloh30:
	ldr	x8, [x8, _NUM_COLS@GOTPAGEOFF]
Lloh31:
	ldr	w3, [x8]
	ldr	w4, [x20, #16]
	mov	x0, x23
	mov	x1, #0
	mov	x5, x21
	bl	_matrix_keypad_build_keymap
	cbz	w0, LBB0_21
; %bb.20:
	mov	x24, x0
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_25
LBB0_21:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_23
; %bb.22:
Lloh34:
	adrp	x8, _EV_REP@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EV_REP@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	ldr	w1, [x21, #16]
	bl	___set_bit
LBB0_23:
Lloh37:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
Lloh40:
	adrp	x8, _MSC_SCAN@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MSC_SCAN@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_input_set_capability
	mov	x0, x21
	mov	x1, x20
	bl	_input_set_drvdata
Lloh43:
	adrp	x8, _spear_kbd_interrupt@GOTPAGE
Lloh44:
	ldr	x8, [x8, _spear_kbd_interrupt@GOTPAGEOFF]
Lloh45:
	ldr	w2, [x8]
Lloh46:
	adrp	x4, l_.str.5@PAGE
Lloh47:
	add	x4, x4, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
	mov	x5, x20
	bl	_devm_request_irq
	cbz	w0, LBB0_26
; %bb.24:
	mov	x24, x0
Lloh48:
	adrp	x1, l_.str.6@PAGE
Lloh49:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_25:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_14
LBB0_26:
	ldr	w0, [x20, #4]
	bl	_clk_prepare
	mov	x24, x0
	cbnz	w0, LBB0_14
; %bb.27:
	mov	x0, x21
	bl	_input_register_device
	mov	x24, x0
	cbz	w0, LBB0_29
; %bb.28:
Lloh50:
	adrp	x1, l_.str.7@PAGE
Lloh51:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #4]
	bl	_clk_unprepare
	b	LBB0_14
LBB0_29:
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"not enough memory for driver data\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"unable to allocate input device\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.2:                               ; @.str.2
	.asciz	"Spear Keyboard"

l_.str.3:                               ; @.str.3
	.asciz	"keyboard/input0"

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_spear_kbd_open,4,2             ; @spear_kbd_open
	.comm	_spear_kbd_close,4,2            ; @spear_kbd_close
	.comm	_NUM_ROWS,4,2                   ; @NUM_ROWS
	.comm	_NUM_COLS,4,2                   ; @NUM_COLS
l_.str.4:                               ; @.str.4
	.asciz	"Failed to build keymap\n"

	.comm	_EV_REP,4,2                     ; @EV_REP
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.comm	_spear_kbd_interrupt,4,2        ; @spear_kbd_interrupt
l_.str.5:                               ; @.str.5
	.asciz	"keyboard"

l_.str.6:                               ; @.str.6
	.asciz	"request_irq failed\n"

l_.str.7:                               ; @.str.7
	.asciz	"Unable to register keyboard device\n"

	.no_dead_strip	_spear_kbd_probe
.subsections_via_symbols
