	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_display_powerstate        ## -- Begin function menu_display_powerstate
	.p2align	4, 0x90
_menu_display_powerstate:               ## @menu_display_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	$0, -12(%rbp)
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	movq	_menu_driver_current_time_us@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_menu_driver_powerstate_last_time_us@GOTPCREL(%rip), %rcx
	movq	%rax, %rdx
	subq	(%rcx), %rdx
	movq	_POWERSTATE_CHECK_INTERVAL@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jl	LBB0_3
## %bb.2:
	movq	%rax, (%rcx)
	xorl	%eax, %eax
	callq	_task_push_get_powerstate
LBB0_3:
	leaq	-12(%rbp), %rdi
	callq	_get_last_powerstate
	movq	_FRONTEND_POWERSTATE_NONE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	setne	%cl
	movq	_FRONTEND_POWERSTATE_NO_SOURCE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	setne	%dl
	andb	%cl, %dl
	movzbl	%dl, %ecx
	movl	%ecx, (%rbx)
	cmpb	$1, %cl
	jne	LBB0_5
## %bb.4:
	movq	_FRONTEND_POWERSTATE_CHARGING@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %eax
	sete	%dl
	movl	%edx, 4(%rbx)
	movl	-12(%rbp), %eax
	xorl	%ecx, %ecx
	testl	%eax, %eax
	cmovgl	%eax, %ecx
	movl	%ecx, 8(%rbx)
	movl	12(%rbx), %esi
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rdx
	callq	_snprintf
	jmp	LBB0_6
LBB0_5:
	movq	$0, 4(%rbx)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FRONTEND_POWERSTATE_NONE,4,2   ## @FRONTEND_POWERSTATE_NONE
	.comm	_menu_driver_current_time_us,8,3 ## @menu_driver_current_time_us
	.comm	_menu_driver_powerstate_last_time_us,8,3 ## @menu_driver_powerstate_last_time_us
	.comm	_POWERSTATE_CHECK_INTERVAL,8,3  ## @POWERSTATE_CHECK_INTERVAL
	.comm	_FRONTEND_POWERSTATE_NO_SOURCE,4,2 ## @FRONTEND_POWERSTATE_NO_SOURCE
	.comm	_FRONTEND_POWERSTATE_CHARGING,4,2 ## @FRONTEND_POWERSTATE_CHARGING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%u%%"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_display_powerstate        ; -- Begin function menu_display_powerstate
	.p2align	2
_menu_display_powerstate:               ; @menu_display_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
	str	wzr, [sp, #12]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _menu_driver_current_time_us@GOTPAGE
Lloh1:
	ldr	x8, [x8, _menu_driver_current_time_us@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _menu_driver_powerstate_last_time_us@GOTPAGE
Lloh4:
	ldr	x9, [x9, _menu_driver_powerstate_last_time_us@GOTPAGEOFF]
	ldr	x10, [x9]
Lloh5:
	adrp	x11, _POWERSTATE_CHECK_INTERVAL@GOTPAGE
Lloh6:
	ldr	x11, [x11, _POWERSTATE_CHECK_INTERVAL@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	sub	x10, x8, x10
	cmp	x10, x11
	b.lt	LBB0_3
; %bb.2:
	str	x8, [x9]
	bl	_task_push_get_powerstate
LBB0_3:
	add	x0, sp, #12
	bl	_get_last_powerstate
Lloh8:
	adrp	x8, _FRONTEND_POWERSTATE_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _FRONTEND_POWERSTATE_NONE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w0, w8
Lloh11:
	adrp	x8, _FRONTEND_POWERSTATE_NO_SOURCE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FRONTEND_POWERSTATE_NO_SOURCE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ccmp	w0, w8, #4, ne
	cset	w8, ne
	str	w8, [x19]
	b.eq	LBB0_5
; %bb.4:
Lloh14:
	adrp	x8, _FRONTEND_POWERSTATE_CHARGING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FRONTEND_POWERSTATE_CHARGING@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w8, eq
	ldr	w9, [sp, #12]
	cmp	w9, #0
	csel	w3, w9, wzr, gt
	stp	w8, w3, [x19, #4]
	ldp	w1, w0, [x19, #12]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	bl	_snprintf
	b	LBB0_6
LBB0_5:
	stp	wzr, wzr, [x19, #4]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_FRONTEND_POWERSTATE_NONE,4,2   ; @FRONTEND_POWERSTATE_NONE
	.comm	_menu_driver_current_time_us,8,3 ; @menu_driver_current_time_us
	.comm	_menu_driver_powerstate_last_time_us,8,3 ; @menu_driver_powerstate_last_time_us
	.comm	_POWERSTATE_CHECK_INTERVAL,8,3  ; @POWERSTATE_CHECK_INTERVAL
	.comm	_FRONTEND_POWERSTATE_NO_SOURCE,4,2 ; @FRONTEND_POWERSTATE_NO_SOURCE
	.comm	_FRONTEND_POWERSTATE_CHARGING,4,2 ; @FRONTEND_POWERSTATE_CHARGING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%u%%"

.subsections_via_symbols
