	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_twl4030_power_off              ## -- Begin function twl4030_power_off
	.p2align	4, 0x90
_twl4030_power_off:                     ## @twl4030_power_off
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_STARTON_VBUS@GOTPCREL(%rip), %rax
	movq	_STARTON_CHG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	xorl	%esi, %esi
	callq	_twl4030_starton_mask_and_set
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_2:
	movq	_TWL_MODULE_PM_MASTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PWR_DEVOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TWL4030_PM_MASTER_P1_SW_EVENTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_twl_i2c_write_u8
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	popq	%rbp
	jmp	_pr_err                         ## TAILCALL
LBB0_3:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STARTON_VBUS,4,2               ## @STARTON_VBUS
	.comm	_STARTON_CHG,4,2                ## @STARTON_CHG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TWL4030 Unable to configure start-up\n"

	.comm	_TWL_MODULE_PM_MASTER,4,2       ## @TWL_MODULE_PM_MASTER
	.comm	_PWR_DEVOFF,4,2                 ## @PWR_DEVOFF
	.comm	_TWL4030_PM_MASTER_P1_SW_EVENTS,4,2 ## @TWL4030_PM_MASTER_P1_SW_EVENTS
L_.str.1:                               ## @.str.1
	.asciz	"TWL4030 Unable to power off\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_twl4030_power_off              ; -- Begin function twl4030_power_off
	.p2align	2
_twl4030_power_off:                     ; @twl4030_power_off
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _STARTON_VBUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STARTON_VBUS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _STARTON_CHG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STARTON_CHG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w0, w9, w8
	mov	w1, #0
	bl	_twl4030_starton_mask_and_set
	cbz	w0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_2:
Lloh8:
	adrp	x8, _TWL_MODULE_PM_MASTER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TWL_MODULE_PM_MASTER@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _PWR_DEVOFF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PWR_DEVOFF@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _TWL4030_PM_MASTER_P1_SW_EVENTS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TWL4030_PM_MASTER_P1_SW_EVENTS@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_twl_i2c_write_u8
	cbz	w0, LBB0_4
; %bb.3:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_pr_err
LBB0_4:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_STARTON_VBUS,4,2               ; @STARTON_VBUS
	.comm	_STARTON_CHG,4,2                ; @STARTON_CHG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TWL4030 Unable to configure start-up\n"

	.comm	_TWL_MODULE_PM_MASTER,4,2       ; @TWL_MODULE_PM_MASTER
	.comm	_PWR_DEVOFF,4,2                 ; @PWR_DEVOFF
	.comm	_TWL4030_PM_MASTER_P1_SW_EVENTS,4,2 ; @TWL4030_PM_MASTER_P1_SW_EVENTS
l_.str.1:                               ; @.str.1
	.asciz	"TWL4030 Unable to power off\n"

.subsections_via_symbols
