	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function power_callback
_power_callback:                        ## @power_callback
	.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	%esi, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_lprintf
	movq	_PSP_POWER_CB_POWER_SWITCH@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	_PSP_POWER_CB_SUSPENDING@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	_PSP_POWER_CB_STANDBY@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
LBB0_3:
	movq	_psp_unhandled_suspend@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_engineState@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PGS_Suspending@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_engineStateSuspend@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_5:
	movl	$100000, %edi                   ## imm = 0x186A0
	callq	_sceKernelDelayThread
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	_PSP_POWER_CB_RESUME_COMPLETE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	movq	_PGS_SuspendWake@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_engineState@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"power_callback: flags: 0x%08X\n"

	.comm	_PSP_POWER_CB_POWER_SWITCH,4,2  ## @PSP_POWER_CB_POWER_SWITCH
	.comm	_PSP_POWER_CB_SUSPENDING,4,2    ## @PSP_POWER_CB_SUSPENDING
	.comm	_PSP_POWER_CB_STANDBY,4,2       ## @PSP_POWER_CB_STANDBY
	.comm	_psp_unhandled_suspend,4,2      ## @psp_unhandled_suspend
	.comm	_engineState,8,3                ## @engineState
	.comm	_PGS_Suspending,8,3             ## @PGS_Suspending
	.comm	_engineStateSuspend,8,3         ## @engineStateSuspend
	.comm	_PSP_POWER_CB_RESUME_COMPLETE,4,2 ## @PSP_POWER_CB_RESUME_COMPLETE
	.comm	_PGS_SuspendWake,8,3            ## @PGS_SuspendWake
	.no_dead_strip	_power_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function power_callback
_power_callback:                        ; @power_callback
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lprintf
Lloh2:
	adrp	x8, _PSP_POWER_CB_POWER_SWITCH@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PSP_POWER_CB_POWER_SWITCH@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _PSP_POWER_CB_SUSPENDING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PSP_POWER_CB_SUSPENDING@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _PSP_POWER_CB_STANDBY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PSP_POWER_CB_STANDBY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_7
LBB0_3:
Lloh11:
	adrp	x8, _psp_unhandled_suspend@GOTPAGE
Lloh12:
	ldr	x8, [x8, _psp_unhandled_suspend@GOTPAGEOFF]
	mov	w9, #1
Lloh13:
	adrp	x10, _engineState@GOTPAGE
Lloh14:
	ldr	x10, [x10, _engineState@GOTPAGEOFF]
Lloh15:
	str	w9, [x8]
Lloh16:
	ldr	x8, [x10]
Lloh17:
	adrp	x9, _PGS_Suspending@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PGS_Suspending@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.4:
Lloh20:
	adrp	x9, _engineStateSuspend@GOTPAGE
Lloh21:
	ldr	x9, [x9, _engineStateSuspend@GOTPAGEOFF]
Lloh22:
	str	x8, [x9]
LBB0_5:
	mov	w0, #34464
	movk	w0, #1, lsl #16
	bl	_sceKernelDelayThread
LBB0_6:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh23:
	adrp	x8, _PSP_POWER_CB_RESUME_COMPLETE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PSP_POWER_CB_RESUME_COMPLETE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_6
; %bb.8:
Lloh26:
	adrp	x8, _PGS_SuspendWake@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PGS_SuspendWake@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
Lloh29:
	adrp	x9, _engineState@GOTPAGE
Lloh30:
	ldr	x9, [x9, _engineState@GOTPAGEOFF]
Lloh31:
	str	x8, [x9]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"power_callback: flags: 0x%08X\n"

	.comm	_PSP_POWER_CB_POWER_SWITCH,4,2  ; @PSP_POWER_CB_POWER_SWITCH
	.comm	_PSP_POWER_CB_SUSPENDING,4,2    ; @PSP_POWER_CB_SUSPENDING
	.comm	_PSP_POWER_CB_STANDBY,4,2       ; @PSP_POWER_CB_STANDBY
	.comm	_psp_unhandled_suspend,4,2      ; @psp_unhandled_suspend
	.comm	_engineState,8,3                ; @engineState
	.comm	_PGS_Suspending,8,3             ; @PGS_Suspending
	.comm	_engineStateSuspend,8,3         ; @engineStateSuspend
	.comm	_PSP_POWER_CB_RESUME_COMPLETE,4,2 ; @PSP_POWER_CB_RESUME_COMPLETE
	.comm	_PGS_SuspendWake,8,3            ; @PGS_SuspendWake
	.no_dead_strip	_power_callback
.subsections_via_symbols
