	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pm8058_pwrkey_shutdown
_pm8058_pwrkey_shutdown:                ## @pm8058_pwrkey_shutdown
	.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
	movl	%esi, %r14d
	movq	(%rdi), %rbx
	testl	%esi, %esi
	jne	LBB0_2
## %bb.1:
	movq	_PM8058_S0_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_PM8058_S0_TEST2@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_REG_PM8058_VREG_EN_MSM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	$7, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_pm8058_disable_smps_locally_set_pull_down
	movq	_PM8058_S1_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_PM8058_S1_TEST2@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_REG_PM8058_VREG_EN_MSM@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	$6, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_pm8058_disable_smps_locally_set_pull_down
	movq	_PM8058_S3_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_PM8058_S3_TEST2@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_REG_PM8058_VREG_EN_GRP_5_4@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	$7, %edi
	callq	_BIT
	movl	%eax, %r15d
	movl	$4, %edi
	callq	_BIT
	orl	%eax, %r15d
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	movl	%r13d, %ecx
	movl	%r15d, %r8d
	callq	_pm8058_disable_smps_locally_set_pull_down
	movq	_PM8058_L21_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_REG_PM8058_VREG_EN_GRP_5_4@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	$1, %edi
	callq	_BIT
	movq	%rbx, %rdi
	movl	%r15d, %esi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_pm8058_disable_ldo_locally_set_pull_down
LBB0_2:
	movq	_PM8058_L22_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$191, %edx
	movl	$147, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	testl	%r14d, %r14d
	movq	_SLEEP_CTRL_SMPL_EN_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmovnel	%edx, %r14d
	movq	_PM8058_SLEEP_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PM8058_S0_CTRL,4,2             ## @PM8058_S0_CTRL
	.comm	_PM8058_S0_TEST2,4,2            ## @PM8058_S0_TEST2
	.comm	_REG_PM8058_VREG_EN_MSM,4,2     ## @REG_PM8058_VREG_EN_MSM
	.comm	_PM8058_S1_CTRL,4,2             ## @PM8058_S1_CTRL
	.comm	_PM8058_S1_TEST2,4,2            ## @PM8058_S1_TEST2
	.comm	_PM8058_S3_CTRL,4,2             ## @PM8058_S3_CTRL
	.comm	_PM8058_S3_TEST2,4,2            ## @PM8058_S3_TEST2
	.comm	_REG_PM8058_VREG_EN_GRP_5_4,4,2 ## @REG_PM8058_VREG_EN_GRP_5_4
	.comm	_PM8058_L21_CTRL,4,2            ## @PM8058_L21_CTRL
	.comm	_PM8058_L22_CTRL,4,2            ## @PM8058_L22_CTRL
	.comm	_SLEEP_CTRL_SMPL_EN_RESET,4,2   ## @SLEEP_CTRL_SMPL_EN_RESET
	.comm	_PM8058_SLEEP_CTRL,4,2          ## @PM8058_SLEEP_CTRL
	.no_dead_strip	_pm8058_pwrkey_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pm8058_pwrkey_shutdown
_pm8058_pwrkey_shutdown:                ; @pm8058_pwrkey_shutdown
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
	ldr	x20, [x0]
	cbnz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _PM8058_S0_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PM8058_S0_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x8, _PM8058_S0_TEST2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PM8058_S0_TEST2@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
Lloh6:
	adrp	x24, _REG_PM8058_VREG_EN_MSM@GOTPAGE
Lloh7:
	ldr	x24, [x24, _REG_PM8058_VREG_EN_MSM@GOTPAGEOFF]
	ldr	w23, [x24]
	mov	w0, #7
	bl	_BIT
	mov	x4, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_pm8058_disable_smps_locally_set_pull_down
Lloh8:
	adrp	x8, _PM8058_S1_CTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PM8058_S1_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
Lloh11:
	adrp	x8, _PM8058_S1_TEST2@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PM8058_S1_TEST2@GOTPAGEOFF]
Lloh13:
	ldr	w22, [x8]
	ldr	w23, [x24]
	mov	w0, #6
	bl	_BIT
	mov	x4, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_pm8058_disable_smps_locally_set_pull_down
Lloh14:
	adrp	x8, _PM8058_S3_CTRL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PM8058_S3_CTRL@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
Lloh17:
	adrp	x8, _PM8058_S3_TEST2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PM8058_S3_TEST2@GOTPAGEOFF]
Lloh19:
	ldr	w22, [x8]
Lloh20:
	adrp	x25, _REG_PM8058_VREG_EN_GRP_5_4@GOTPAGE
Lloh21:
	ldr	x25, [x25, _REG_PM8058_VREG_EN_GRP_5_4@GOTPAGEOFF]
	ldr	w23, [x25]
	mov	w0, #7
	bl	_BIT
	mov	x24, x0
	mov	w0, #4
	bl	_BIT
	orr	w4, w0, w24
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	mov	x3, x23
	bl	_pm8058_disable_smps_locally_set_pull_down
Lloh22:
	adrp	x8, _PM8058_L21_CTRL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PM8058_L21_CTRL@GOTPAGEOFF]
Lloh24:
	ldr	w21, [x8]
	ldr	w22, [x25]
	mov	w0, #1
	bl	_BIT
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x22
	bl	_pm8058_disable_ldo_locally_set_pull_down
LBB0_2:
Lloh25:
	adrp	x8, _PM8058_L22_CTRL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PM8058_L22_CTRL@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #191
	mov	w3, #147
	bl	_regmap_update_bits
	cbz	w0, LBB0_4
; %bb.3:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh28:
	adrp	x8, _SLEEP_CTRL_SMPL_EN_RESET@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SLEEP_CTRL_SMPL_EN_RESET@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
Lloh31:
	adrp	x8, _PM8058_SLEEP_CTRL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PM8058_SLEEP_CTRL@GOTPAGEOFF]
	cmp	w19, #0
	csel	w3, wzr, w2, eq
Lloh33:
	ldr	w1, [x8]
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_regmap_update_bits
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_PM8058_S0_CTRL,4,2             ; @PM8058_S0_CTRL
	.comm	_PM8058_S0_TEST2,4,2            ; @PM8058_S0_TEST2
	.comm	_REG_PM8058_VREG_EN_MSM,4,2     ; @REG_PM8058_VREG_EN_MSM
	.comm	_PM8058_S1_CTRL,4,2             ; @PM8058_S1_CTRL
	.comm	_PM8058_S1_TEST2,4,2            ; @PM8058_S1_TEST2
	.comm	_PM8058_S3_CTRL,4,2             ; @PM8058_S3_CTRL
	.comm	_PM8058_S3_TEST2,4,2            ; @PM8058_S3_TEST2
	.comm	_REG_PM8058_VREG_EN_GRP_5_4,4,2 ; @REG_PM8058_VREG_EN_GRP_5_4
	.comm	_PM8058_L21_CTRL,4,2            ; @PM8058_L21_CTRL
	.comm	_PM8058_L22_CTRL,4,2            ; @PM8058_L22_CTRL
	.comm	_SLEEP_CTRL_SMPL_EN_RESET,4,2   ; @SLEEP_CTRL_SMPL_EN_RESET
	.comm	_PM8058_SLEEP_CTRL,4,2          ; @PM8058_SLEEP_CTRL
	.no_dead_strip	_pm8058_pwrkey_shutdown
.subsections_via_symbols
