	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoExit                       ## -- Begin function PicoExit
	.p2align	4, 0x90
_PicoExit:                              ## @PicoExit
	.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
	movq	_PicoAHW@GOTPCREL(%rip), %rax
	movq	_PAHW_MCD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_PicoExitMCD
LBB0_2:
	xorl	%eax, %eax
	callq	_PicoCartUnload
	xorl	%eax, %eax
	callq	_z80_exit
	movq	_SRam@GOTPCREL(%rip), %rbx
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_free
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rbx)
	movups	%xmm0, 16(%rbx)
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_pevt_dump                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PicoAHW,4,2                    ## @PicoAHW
	.comm	_PAHW_MCD,4,2                   ## @PAHW_MCD
	.comm	_SRam,32,3                      ## @SRam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoExit                       ; -- Begin function PicoExit
	.p2align	2
_PicoExit:                              ; @PicoExit
	.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
Lloh0:
	adrp	x8, _PicoAHW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PicoAHW@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PAHW_MCD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAHW_MCD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	bl	_PicoExitMCD
LBB0_2:
	bl	_PicoCartUnload
	bl	_z80_exit
Lloh6:
	adrp	x19, _SRam@GOTPAGE
Lloh7:
	ldr	x19, [x19, _SRam@GOTPAGEOFF]
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_free
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x19]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_pevt_dump
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PicoAHW,4,2                    ; @PicoAHW
	.comm	_PAHW_MCD,4,2                   ; @PAHW_MCD
	.comm	_SRam,32,3                      ; @SRam
.subsections_via_symbols
