	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function frontend_psp_get_powerstate
_frontend_psp_get_powerstate:           ## @frontend_psp_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	%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
	movq	%rsi, %r14
	movq	%rdi, %r13
	xorl	%eax, %eax
	callq	_scePowerIsBatteryExist
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_scePowerIsPowerOnline
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_scePowerIsBatteryCharging
	movl	%eax, %r12d
	xorl	%eax, %eax
	callq	_scePowerGetBatteryLifePercent
	movl	%eax, (%r14)
	xorl	%eax, %eax
	callq	_scePowerGetBatteryLifeTime
	imull	$60, %eax, %eax
	movl	%eax, (%r13)
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.3:
	movq	_FRONTEND_POWERSTATE_CHARGING@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_FRONTEND_POWERSTATE_NO_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$-1, (%r13)
	movl	$-1, (%r14)
	jmp	LBB0_8
LBB0_4:
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.5:
	movq	_FRONTEND_POWERSTATE_CHARGED@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_FRONTEND_POWERSTATE_ON_POWER_SOURCE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FRONTEND_POWERSTATE_NONE,4,2   ## @FRONTEND_POWERSTATE_NONE
	.comm	_FRONTEND_POWERSTATE_NO_SOURCE,4,2 ## @FRONTEND_POWERSTATE_NO_SOURCE
	.comm	_FRONTEND_POWERSTATE_CHARGING,4,2 ## @FRONTEND_POWERSTATE_CHARGING
	.comm	_FRONTEND_POWERSTATE_CHARGED,4,2 ## @FRONTEND_POWERSTATE_CHARGED
	.comm	_FRONTEND_POWERSTATE_ON_POWER_SOURCE,4,2 ## @FRONTEND_POWERSTATE_ON_POWER_SOURCE
	.no_dead_strip	_frontend_psp_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_psp_get_powerstate
_frontend_psp_get_powerstate:           ; @frontend_psp_get_powerstate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x1
	mov	x20, x0
	bl	_scePowerIsBatteryExist
	mov	x23, x0
	bl	_scePowerIsPowerOnline
	mov	x21, x0
	bl	_scePowerIsBatteryCharging
	mov	x22, x0
	bl	_scePowerGetBatteryLifePercent
	str	w0, [x19]
	bl	_scePowerGetBatteryLifeTime
	mov	w8, #60
	mul	w8, w0, w8
	str	w8, [x20]
	cbz	w23, LBB0_3
; %bb.1:
	cbz	w22, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _FRONTEND_POWERSTATE_CHARGING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FRONTEND_POWERSTATE_CHARGING@GOTPAGEOFF]
	b	LBB0_7
LBB0_3:
Lloh2:
	adrp	x8, _FRONTEND_POWERSTATE_NO_SOURCE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FRONTEND_POWERSTATE_NO_SOURCE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w8, #-1
	str	w8, [x20]
	str	w8, [x19]
	b	LBB0_8
LBB0_4:
	cbz	w21, LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _FRONTEND_POWERSTATE_CHARGED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FRONTEND_POWERSTATE_CHARGED@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _FRONTEND_POWERSTATE_ON_POWER_SOURCE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FRONTEND_POWERSTATE_ON_POWER_SOURCE@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_FRONTEND_POWERSTATE_NONE,4,2   ; @FRONTEND_POWERSTATE_NONE
	.comm	_FRONTEND_POWERSTATE_NO_SOURCE,4,2 ; @FRONTEND_POWERSTATE_NO_SOURCE
	.comm	_FRONTEND_POWERSTATE_CHARGING,4,2 ; @FRONTEND_POWERSTATE_CHARGING
	.comm	_FRONTEND_POWERSTATE_CHARGED,4,2 ; @FRONTEND_POWERSTATE_CHARGED
	.comm	_FRONTEND_POWERSTATE_ON_POWER_SOURCE,4,2 ; @FRONTEND_POWERSTATE_ON_POWER_SOURCE
	.no_dead_strip	_frontend_psp_get_powerstate
.subsections_via_symbols
