	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_power_probe
_twl4030_power_probe:                   ## @twl4030_power_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, %rbx
	callq	_dev_get_platdata
	movq	%rax, %r15
	movq	(%rbx), %rax
	testq	%r15, %r15
	jne	LBB0_3
## %bb.1:
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_24
LBB0_3:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_TWL_MODULE_PM_MASTER@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_TWL4030_PM_MASTER_KEY_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TWL4030_PM_MASTER_PROTECT_KEY@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	callq	_twl_i2c_write_u8
	movl	%eax, %r13d
	movl	(%r14), %edi
	movq	_TWL4030_PM_MASTER_KEY_CFG2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	callq	_twl_i2c_write_u8
	movl	%eax, %r12d
	orl	%r13d, %r12d
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_24
LBB0_5:
	movq	_TWL_MODULE_PM_MASTER@GOTPCREL(%rip), %r13
	movq	_twl4030_power_of_match@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_of_match_ptr
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_of_match_device
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%rax), %rax
	testq	%rax, %rax
	cmovneq	%rax, %r15
LBB0_7:
	testq	%r15, %r15
	je	LBB0_13
## %bb.8:
	movq	%r15, %rdi
	callq	_twl4030_power_configure_scripts
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_10
LBB0_11:
	movq	%r15, %rdi
	callq	_twl4030_power_configure_resources
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rdi
LBB0_10:
	callq	_pr_err
	movq	_TWL4030_PM_MASTER_PROTECT_KEY@GOTPCREL(%rip), %rbx
	jmp	LBB0_22
LBB0_13:
	movq	%r15, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_twl4030_power_use_poweroff
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	_pm_power_off@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	movq	_TWL4030_PM_MASTER_PROTECT_KEY@GOTPCREL(%rip), %rbx
	jne	LBB0_22
## %bb.16:
	movl	(%r13), %edi
	movq	_TWL4030_PM_MASTER_CFG_P123_TRANSITION@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	-44(%rbp), %rsi
	callq	_twl_i2c_read_u8
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_19
## %bb.17:
	leaq	L_.str.4(%rip), %rdi
	callq	_pr_warn
	jmp	LBB0_18
LBB0_14:
	movq	_TWL4030_PM_MASTER_PROTECT_KEY@GOTPCREL(%rip), %rbx
	jmp	LBB0_22
LBB0_19:
	movl	-44(%rbp), %eax
	movq	_SEQ_OFFSYNC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	testl	%eax, %esi
	je	LBB0_20
LBB0_18:
	movq	_twl4030_power_off@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_22:
	movl	(%r13), %edi
	movl	(%rbx), %edx
	xorl	%esi, %esi
	callq	_twl_i2c_write_u8
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rdi
	callq	_pr_err
	movl	%ebx, %r12d
LBB0_24:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	orl	%eax, %esi
	movl	%esi, -44(%rbp)
	movl	(%r13), %edi
	movl	(%r14), %edx
	callq	_twl_i2c_write_u8
	testl	%eax, %eax
	je	LBB0_18
## %bb.21:
	movl	%eax, %r14d
	leaq	L_.str.5(%rip), %rdi
	callq	_pr_err
	movl	%r14d, %r12d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Platform data is missing\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TWL_MODULE_PM_MASTER,4,2       ## @TWL_MODULE_PM_MASTER
	.comm	_TWL4030_PM_MASTER_KEY_CFG1,4,2 ## @TWL4030_PM_MASTER_KEY_CFG1
	.comm	_TWL4030_PM_MASTER_PROTECT_KEY,4,2 ## @TWL4030_PM_MASTER_PROTECT_KEY
	.comm	_TWL4030_PM_MASTER_KEY_CFG2,4,2 ## @TWL4030_PM_MASTER_KEY_CFG2
L_.str.1:                               ## @.str.1
	.asciz	"TWL4030 Unable to unlock registers\n"

	.comm	_twl4030_power_of_match,4,2     ## @twl4030_power_of_match
L_.str.2:                               ## @.str.2
	.asciz	"TWL4030 failed to load scripts\n"

L_.str.3:                               ## @.str.3
	.asciz	"TWL4030 failed to configure resource\n"

	.comm	_pm_power_off,8,3               ## @pm_power_off
	.comm	_TWL4030_PM_MASTER_CFG_P123_TRANSITION,4,2 ## @TWL4030_PM_MASTER_CFG_P123_TRANSITION
L_.str.4:                               ## @.str.4
	.asciz	"TWL4030 Unable to read registers\n"

	.comm	_SEQ_OFFSYNC,4,2                ## @SEQ_OFFSYNC
L_.str.5:                               ## @.str.5
	.asciz	"TWL4030 Unable to setup SEQ_OFFSYNC\n"

	.comm	_twl4030_power_off,8,3          ## @twl4030_power_off
L_.str.6:                               ## @.str.6
	.asciz	"TWL4030 Unable to relock registers\n"

	.no_dead_strip	_twl4030_power_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_power_probe
_twl4030_power_probe:                   ; @twl4030_power_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	x22, x0
	bl	_dev_get_platdata
	mov	x20, x0
	ldr	x21, [x22]
	cbnz	x0, LBB0_3
; %bb.1:
	cbnz	x21, LBB0_3
; %bb.2:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_20
LBB0_3:
Lloh5:
	adrp	x23, _TWL_MODULE_PM_MASTER@GOTPAGE
Lloh6:
	ldr	x23, [x23, _TWL_MODULE_PM_MASTER@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh7:
	adrp	x8, _TWL4030_PM_MASTER_KEY_CFG1@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TWL4030_PM_MASTER_KEY_CFG1@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x24, _TWL4030_PM_MASTER_PROTECT_KEY@GOTPAGE
Lloh11:
	ldr	x24, [x24, _TWL4030_PM_MASTER_PROTECT_KEY@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_twl_i2c_write_u8
	mov	x19, x0
	ldr	w0, [x23]
Lloh12:
	adrp	x8, _TWL4030_PM_MASTER_KEY_CFG2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TWL4030_PM_MASTER_KEY_CFG2@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x24]
	bl	_twl_i2c_write_u8
	orr	w19, w0, w19
	cbz	w19, LBB0_5
; %bb.4:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_20
LBB0_5:
Lloh17:
	adrp	x8, _twl4030_power_of_match@GOTPAGE
Lloh18:
	ldr	x8, [x8, _twl4030_power_of_match@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_of_match_ptr
	mov	x1, x22
	bl	_of_match_device
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x0]
	cmp	x8, #0
	csel	x20, x20, x8, eq
LBB0_7:
	cbz	x20, LBB0_12
; %bb.8:
	mov	x0, x20
	bl	_twl4030_power_configure_scripts
	cbz	w0, LBB0_10
; %bb.9:
	mov	x19, x0
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	b	LBB0_18
LBB0_10:
	mov	x0, x20
	bl	_twl4030_power_configure_resources
	cbz	w0, LBB0_12
; %bb.11:
	mov	x19, x0
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	b	LBB0_18
LBB0_12:
	mov	x0, x20
	mov	x1, x21
	bl	_twl4030_power_use_poweroff
	mov	w19, #0
	cbz	x0, LBB0_18
; %bb.13:
Lloh24:
	adrp	x21, _pm_power_off@GOTPAGE
Lloh25:
	ldr	x21, [x21, _pm_power_off@GOTPAGEOFF]
	ldr	x8, [x21]
	cbnz	x8, LBB0_18
; %bb.14:
	ldr	w0, [x23]
Lloh26:
	adrp	x20, _TWL4030_PM_MASTER_CFG_P123_TRANSITION@GOTPAGE
Lloh27:
	ldr	x20, [x20, _TWL4030_PM_MASTER_CFG_P123_TRANSITION@GOTPAGEOFF]
	ldr	w2, [x20]
	add	x1, sp, #12
	bl	_twl_i2c_read_u8
	mov	x19, x0
	cbz	w0, LBB0_16
; %bb.15:
Lloh28:
	adrp	x0, l_.str.4@PAGE
Lloh29:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_warn
	b	LBB0_17
LBB0_16:
	ldr	w8, [sp, #12]
Lloh30:
	adrp	x9, _SEQ_OFFSYNC@GOTPAGE
Lloh31:
	ldr	x9, [x9, _SEQ_OFFSYNC@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
LBB0_17:
Lloh33:
	adrp	x8, _twl4030_power_off@GOTPAGE
Lloh34:
	ldr	x8, [x8, _twl4030_power_off@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_18:
	ldr	w0, [x23]
	ldr	w2, [x24]
	mov	w1, #0
	bl	_twl_i2c_write_u8
	cbz	w0, LBB0_20
; %bb.19:
	mov	x20, x0
Lloh36:
	adrp	x0, l_.str.6@PAGE
Lloh37:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_pr_err
	mov	x19, x20
LBB0_20:
	mov	x0, x19
	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_21:
	orr	w1, w9, w8
	str	w1, [sp, #12]
	ldr	w0, [x23]
	ldr	w2, [x20]
	bl	_twl_i2c_write_u8
	cbz	w0, LBB0_17
; %bb.22:
	mov	x20, x0
Lloh38:
	adrp	x0, l_.str.5@PAGE
Lloh39:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_err
	mov	x19, x20
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Platform data is missing\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TWL_MODULE_PM_MASTER,4,2       ; @TWL_MODULE_PM_MASTER
	.comm	_TWL4030_PM_MASTER_KEY_CFG1,4,2 ; @TWL4030_PM_MASTER_KEY_CFG1
	.comm	_TWL4030_PM_MASTER_PROTECT_KEY,4,2 ; @TWL4030_PM_MASTER_PROTECT_KEY
	.comm	_TWL4030_PM_MASTER_KEY_CFG2,4,2 ; @TWL4030_PM_MASTER_KEY_CFG2
l_.str.1:                               ; @.str.1
	.asciz	"TWL4030 Unable to unlock registers\n"

	.comm	_twl4030_power_of_match,4,2     ; @twl4030_power_of_match
l_.str.2:                               ; @.str.2
	.asciz	"TWL4030 failed to load scripts\n"

l_.str.3:                               ; @.str.3
	.asciz	"TWL4030 failed to configure resource\n"

	.comm	_pm_power_off,8,3               ; @pm_power_off
	.comm	_TWL4030_PM_MASTER_CFG_P123_TRANSITION,4,2 ; @TWL4030_PM_MASTER_CFG_P123_TRANSITION
l_.str.4:                               ; @.str.4
	.asciz	"TWL4030 Unable to read registers\n"

	.comm	_SEQ_OFFSYNC,4,2                ; @SEQ_OFFSYNC
l_.str.5:                               ; @.str.5
	.asciz	"TWL4030 Unable to setup SEQ_OFFSYNC\n"

	.comm	_twl4030_power_off,8,3          ; @twl4030_power_off
l_.str.6:                               ; @.str.6
	.asciz	"TWL4030 Unable to relock registers\n"

	.no_dead_strip	_twl4030_power_probe
.subsections_via_symbols
