	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PLATFORM_Exit                  ## -- Begin function PLATFORM_Exit
	.p2align	4, 0x90
_PLATFORM_Exit:                         ## @PLATFORM_Exit
	.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	%edi, %ebx
	xorl	%eax, %eax
	callq	_ShutdownEmulatedEnvironment
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_MONITOR_Run
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_SetupEmulatedEnvironment
	movl	$1, %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_new_videoram@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_free
LBB0_5:
	movq	_END_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_wind_update
	movq	_FMD_FINISH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HOST_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_HOST_HEIGHT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	subq	$8, %rsp
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%r10
	pushq	$0
	callq	_form_dial
	addq	$32, %rsp
	movq	_M_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_graf_mouse
	xorl	%eax, %eax
	callq	_appl_exit
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_new_videoram,8,3               ## @new_videoram
	.comm	_END_UPDATE,4,2                 ## @END_UPDATE
	.comm	_FMD_FINISH,4,2                 ## @FMD_FINISH
	.comm	_HOST_WIDTH,4,2                 ## @HOST_WIDTH
	.comm	_HOST_HEIGHT,4,2                ## @HOST_HEIGHT
	.comm	_M_ON,4,2                       ## @M_ON
	.comm	_Clocky_SSval,4,2               ## @Clocky_SSval
	.comm	_NOVA_SSval,4,2                 ## @NOVA_SSval
	.comm	_NOVA_xcb,8,3                   ## @NOVA_xcb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PLATFORM_Exit                  ; -- Begin function PLATFORM_Exit
	.p2align	2
_PLATFORM_Exit:                         ; @PLATFORM_Exit
	.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, x0
	bl	_ShutdownEmulatedEnvironment
	cbz	w19, LBB0_3
; %bb.1:
	bl	_MONITOR_Run
	cbz	x0, LBB0_3
; %bb.2:
	bl	_SetupEmulatedEnvironment
	mov	w0, #1
	b	LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _new_videoram@GOTPAGE
Lloh1:
	ldr	x8, [x8, _new_videoram@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x8]
	cbz	x0, LBB0_5
; %bb.4:
	bl	_free
LBB0_5:
Lloh3:
	adrp	x8, _END_UPDATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _END_UPDATE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_wind_update
Lloh6:
	adrp	x8, _FMD_FINISH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FMD_FINISH@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _HOST_WIDTH@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HOST_WIDTH@GOTPAGEOFF]
Lloh11:
	ldr	w7, [x8]
Lloh12:
	adrp	x8, _HOST_HEIGHT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HOST_HEIGHT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp]
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_form_dial
Lloh15:
	adrp	x8, _M_ON@GOTPAGE
Lloh16:
	ldr	x8, [x8, _M_ON@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_graf_mouse
	bl	_appl_exit
	mov	w0, #0
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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_new_videoram,8,3               ; @new_videoram
	.comm	_END_UPDATE,4,2                 ; @END_UPDATE
	.comm	_FMD_FINISH,4,2                 ; @FMD_FINISH
	.comm	_HOST_WIDTH,4,2                 ; @HOST_WIDTH
	.comm	_HOST_HEIGHT,4,2                ; @HOST_HEIGHT
	.comm	_M_ON,4,2                       ; @M_ON
	.comm	_Clocky_SSval,4,2               ; @Clocky_SSval
	.comm	_NOVA_SSval,4,2                 ; @NOVA_SSval
	.comm	_NOVA_xcb,8,3                   ; @NOVA_xcb
.subsections_via_symbols
