	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function frontend_ctr_get_powerstate
_frontend_ctr_get_powerstate:           ## @frontend_ctr_get_powerstate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$0, -20(%rbp)
	movl	$0, -24(%rbp)
	leaq	-20(%rbp), %rdi
	callq	_mcuHwcGetBatteryLevel
	movl	-20(%rbp), %eax
	movl	%eax, (%rbx)
	movl	$-1, (%r14)
	leaq	-24(%rbp), %rdi
	callq	_PTMU_GetBatteryChargeState
	cmpl	$100, -20(%rbp)
	jne	LBB0_1
## %bb.2:
	movq	_FRONTEND_POWERSTATE_CHARGED@GOTPCREL(%rip), %rax
	cmpl	$0, -24(%rbp)
	je	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_FRONTEND_POWERSTATE_CHARGING@GOTPCREL(%rip), %rax
	cmpl	$0, -24(%rbp)
	jne	LBB0_5
LBB0_4:
	movq	_FRONTEND_POWERSTATE_ON_POWER_SOURCE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FRONTEND_POWERSTATE_CHARGED,4,2 ## @FRONTEND_POWERSTATE_CHARGED
	.comm	_FRONTEND_POWERSTATE_CHARGING,4,2 ## @FRONTEND_POWERSTATE_CHARGING
	.comm	_FRONTEND_POWERSTATE_ON_POWER_SOURCE,4,2 ## @FRONTEND_POWERSTATE_ON_POWER_SOURCE
	.no_dead_strip	_frontend_ctr_get_powerstate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function frontend_ctr_get_powerstate
_frontend_ctr_get_powerstate:           ; @frontend_ctr_get_powerstate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	str	xzr, [sp, #8]
	add	x0, sp, #12
	bl	_mcuHwcGetBatteryLevel
	ldr	w8, [sp, #12]
	str	w8, [x19]
	mov	w8, #-1
	str	w8, [x20]
	add	x0, sp, #8
	bl	_PTMU_GetBatteryChargeState
	ldp	w8, w9, [sp, #8]
Lloh0:
	adrp	x10, _FRONTEND_POWERSTATE_ON_POWER_SOURCE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _FRONTEND_POWERSTATE_ON_POWER_SOURCE@GOTPAGEOFF]
Lloh2:
	adrp	x11, _FRONTEND_POWERSTATE_CHARGED@GOTPAGE
Lloh3:
	ldr	x11, [x11, _FRONTEND_POWERSTATE_CHARGED@GOTPAGEOFF]
Lloh4:
	adrp	x12, _FRONTEND_POWERSTATE_CHARGING@GOTPAGE
Lloh5:
	ldr	x12, [x12, _FRONTEND_POWERSTATE_CHARGING@GOTPAGEOFF]
	cmp	w9, #100
	csel	x9, x11, x12, eq
	cmp	w8, #0
	csel	x8, x10, x9, eq
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_FRONTEND_POWERSTATE_CHARGED,4,2 ; @FRONTEND_POWERSTATE_CHARGED
	.comm	_FRONTEND_POWERSTATE_CHARGING,4,2 ; @FRONTEND_POWERSTATE_CHARGING
	.comm	_FRONTEND_POWERSTATE_ON_POWER_SOURCE,4,2 ; @FRONTEND_POWERSTATE_ON_POWER_SOURCE
	.no_dead_strip	_frontend_ctr_get_powerstate
.subsections_via_symbols
