	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx_snvs_pwrkey_probe
_imx_snvs_pwrkey_probe:                 ## @imx_snvs_pwrkey_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_syscon_regmap_lookup_by_phandle
	movl	%eax, 32(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	32(%r14), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	24(%r14), %r12
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r12, %rdx
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_KEY_POWER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r12)
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_warn
LBB0_11:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_of_property_read_bool
	movl	%eax, 8(%r14)
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, (%r14)
	testq	%rax, %rax
	js	LBB0_15
## %bb.12:
	movl	32(%r14), %edi
	movq	_SNVS_LPCR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SNVS_LPCR_DEP_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movl	32(%r14), %edi
	movq	_SNVS_LPSR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SNVS_LPSR_SPO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_regmap_write
	movq	%r14, %rdi
	addq	$28, %rdi
	movq	_imx_imx_snvs_check_for_events@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_timer_setup
	movq	%r15, %rdi
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	%rax, %r12
	movl	8(%r15), %eax
	movl	%eax, 12(%r12)
	leaq	L_.str.6(%rip), %rax
	movq	%rax, (%r12)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	24(%r14), %edx
	movq	%r12, %rdi
	callq	_input_set_capability
	movq	_imx_snvs_pwrkey_act@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_devm_add_action
	testl	%eax, %eax
	je	LBB0_17
## %bb.14:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_19
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_16:
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_17:
	movq	%r12, 16(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	(%r14), %rsi
	movq	_imx_snvs_pwrkey_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	8(%r15), %r8d
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	movq	%r15, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_20
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rsi
LBB0_19:
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_8
LBB0_20:
	movq	%r12, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	js	LBB0_23
## %bb.21:
	movl	8(%r14), %esi
	movq	%r15, %rdi
	callq	_device_init_wakeup
	movq	(%r14), %rsi
	movq	%r15, %rdi
	callq	_dev_pm_set_wake_irq
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_8
## %bb.22:
	leaq	L_.str.10(%rip), %rsi
	jmp	LBB0_19
LBB0_23:
	movl	%eax, %ebx
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"regmap"

L_.str.1:                               ## @.str.1
	.asciz	"Can't get snvs syscon\n"

L_.str.2:                               ## @.str.2
	.asciz	"linux,keycode"

	.comm	_KEY_POWER,4,2                  ## @KEY_POWER
L_.str.3:                               ## @.str.3
	.asciz	"KEY_POWER without setting in dts\n"

L_.str.4:                               ## @.str.4
	.asciz	"wakeup-source"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SNVS_LPCR_REG,4,2              ## @SNVS_LPCR_REG
	.comm	_SNVS_LPCR_DEP_EN,4,2           ## @SNVS_LPCR_DEP_EN
	.comm	_SNVS_LPSR_REG,4,2              ## @SNVS_LPSR_REG
	.comm	_SNVS_LPSR_SPO,4,2              ## @SNVS_LPSR_SPO
	.comm	_imx_imx_snvs_check_for_events,4,2 ## @imx_imx_snvs_check_for_events
L_.str.5:                               ## @.str.5
	.asciz	"failed to allocate the input device\n"

L_.str.6:                               ## @.str.6
	.asciz	"snvs-pwrkey/input0"

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_imx_snvs_pwrkey_act,4,2        ## @imx_snvs_pwrkey_act
L_.str.7:                               ## @.str.7
	.asciz	"failed to register remove action\n"

	.comm	_imx_snvs_pwrkey_interrupt,4,2  ## @imx_snvs_pwrkey_interrupt
L_.str.8:                               ## @.str.8
	.asciz	"interrupt not available.\n"

L_.str.9:                               ## @.str.9
	.asciz	"failed to register input device\n"

L_.str.10:                              ## @.str.10
	.asciz	"irq wake enable failed.\n"

	.no_dead_strip	_imx_snvs_pwrkey_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx_snvs_pwrkey_probe
_imx_snvs_pwrkey_probe:                 ; @imx_snvs_pwrkey_probe
	.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	x21, [x0]
	cbz	x21, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_13
; %bb.2:
	mov	x20, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_syscon_regmap_lookup_by_phandle
	str	w0, [x20, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #32]
	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
	b	_PTR_ERR
LBB0_4:
Lloh7:
	adrp	x8, _ENODEV@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_14
LBB0_5:
	add	x22, x20, #24
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x2, x22
	bl	_of_property_read_u32
	cbz	x0, LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _KEY_POWER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _KEY_POWER@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x22]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_7:
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_bool
	str	w0, [x20, #8]
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	str	x0, [x20]
	tbnz	x0, #63, LBB0_11
; %bb.8:
	ldr	w0, [x20, #32]
Lloh18:
	adrp	x8, _SNVS_LPCR_REG@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SNVS_LPCR_REG@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _SNVS_LPCR_DEP_EN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SNVS_LPCR_DEP_EN@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	ldr	w0, [x20, #32]
Lloh24:
	adrp	x8, _SNVS_LPSR_REG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SNVS_LPSR_REG@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _SNVS_LPSR_SPO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SNVS_LPSR_SPO@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	bl	_regmap_write
	add	x0, x20, #28
Lloh30:
	adrp	x8, _imx_imx_snvs_check_for_events@GOTPAGE
Lloh31:
	ldr	x8, [x8, _imx_imx_snvs_check_for_events@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	mov	x0, x19
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_12
; %bb.9:
	mov	x22, x0
	ldr	w8, [x19, #8]
Lloh33:
	adrp	x9, l_.str.6@PAGE
Lloh34:
	add	x9, x9, l_.str.6@PAGEOFF
	str	x9, [x0]
Lloh35:
	adrp	x9, _BUS_HOST@GOTPAGE
Lloh36:
	ldr	x9, [x9, _BUS_HOST@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #8]
Lloh38:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	ldr	w2, [x20, #24]
	bl	_input_set_capability
Lloh41:
	adrp	x8, _imx_snvs_pwrkey_act@GOTPAGE
Lloh42:
	ldr	x8, [x8, _imx_snvs_pwrkey_act@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_devm_add_action
	cbz	w0, LBB0_16
; %bb.10:
	mov	x21, x0
Lloh44:
	adrp	x1, l_.str.7@PAGE
Lloh45:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_18
LBB0_11:
Lloh46:
	adrp	x8, _EINVAL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
Lloh48:
	adrp	x1, l_.str.5@PAGE
Lloh49:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_13:
Lloh50:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh51:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_15:
	mov	x0, x21
	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
LBB0_16:
	str	x22, [x20, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	ldr	x1, [x20]
Lloh52:
	adrp	x8, _imx_snvs_pwrkey_interrupt@GOTPAGE
Lloh53:
	ldr	x8, [x8, _imx_snvs_pwrkey_interrupt@GOTPAGEOFF]
Lloh54:
	ldr	w2, [x8]
	ldr	w4, [x19, #8]
	mov	x0, x19
	mov	w3, #0
	mov	x5, x19
	bl	_devm_request_irq
	cbz	w0, LBB0_19
; %bb.17:
	mov	x21, x0
Lloh55:
	adrp	x1, l_.str.8@PAGE
Lloh56:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_18:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_15
LBB0_19:
	mov	x0, x22
	bl	_input_register_device
	tbnz	w0, #31, LBB0_23
; %bb.20:
	ldr	w1, [x20, #8]
	mov	x0, x19
	bl	_device_init_wakeup
	ldr	x1, [x20]
	mov	x0, x19
	bl	_dev_pm_set_wake_irq
	cbz	w0, LBB0_22
; %bb.21:
Lloh57:
	adrp	x1, l_.str.10@PAGE
Lloh58:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_22:
	mov	w21, #0
	b	LBB0_15
LBB0_23:
	mov	x21, x0
Lloh59:
	adrp	x1, l_.str.9@PAGE
Lloh60:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpAdd	Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpAdd	Lloh59, Lloh60
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"regmap"

l_.str.1:                               ; @.str.1
	.asciz	"Can't get snvs syscon\n"

l_.str.2:                               ; @.str.2
	.asciz	"linux,keycode"

	.comm	_KEY_POWER,4,2                  ; @KEY_POWER
l_.str.3:                               ; @.str.3
	.asciz	"KEY_POWER without setting in dts\n"

l_.str.4:                               ; @.str.4
	.asciz	"wakeup-source"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SNVS_LPCR_REG,4,2              ; @SNVS_LPCR_REG
	.comm	_SNVS_LPCR_DEP_EN,4,2           ; @SNVS_LPCR_DEP_EN
	.comm	_SNVS_LPSR_REG,4,2              ; @SNVS_LPSR_REG
	.comm	_SNVS_LPSR_SPO,4,2              ; @SNVS_LPSR_SPO
	.comm	_imx_imx_snvs_check_for_events,4,2 ; @imx_imx_snvs_check_for_events
l_.str.5:                               ; @.str.5
	.asciz	"failed to allocate the input device\n"

l_.str.6:                               ; @.str.6
	.asciz	"snvs-pwrkey/input0"

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_imx_snvs_pwrkey_act,4,2        ; @imx_snvs_pwrkey_act
l_.str.7:                               ; @.str.7
	.asciz	"failed to register remove action\n"

	.comm	_imx_snvs_pwrkey_interrupt,4,2  ; @imx_snvs_pwrkey_interrupt
l_.str.8:                               ; @.str.8
	.asciz	"interrupt not available.\n"

l_.str.9:                               ; @.str.9
	.asciz	"failed to register input device\n"

l_.str.10:                              ; @.str.10
	.asciz	"irq wake enable failed.\n"

	.no_dead_strip	_imx_snvs_pwrkey_probe
.subsections_via_symbols
