	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari800_Exit                  ## -- Begin function Atari800_Exit
	.p2align	4, 0x90
_Atari800_Exit:                         ## @Atari800_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
	callq	_PLATFORM_Exit
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_CFG_save_on_exit@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_CFG_WriteConfig
LBB0_3:
	xorl	%eax, %eax
	callq	_INPUT_Exit
	xorl	%eax, %eax
	callq	_PBI_Exit
	xorl	%eax, %eax
	callq	_CASSETTE_Exit
	xorl	%eax, %eax
	callq	_CARTRIDGE_Exit
	xorl	%eax, %eax
	callq	_SIO_Exit
	xorl	%eax, %eax
	callq	_Devices_Exit
	xorl	%eax, %eax
	callq	_MONITOR_Exit
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CFG_save_on_exit,8,3           ## @CFG_save_on_exit
	.comm	_ATARI_CRASHED,4,2              ## @ATARI_CRASHED
	.comm	_CPU_cim_encountered,8,3        ## @CPU_cim_encountered
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_Screen_atari_write_long_stat,8,3 ## @Screen_atari_write_long_stat
	.comm	_g_ulAtariState,4,2             ## @g_ulAtariState
	.comm	_memory_read_aligned_word_stat,8,3 ## @memory_read_aligned_word_stat
	.comm	_memory_read_word_stat,8,3      ## @memory_read_word_stat
	.comm	_memory_write_aligned_word_stat,8,3 ## @memory_write_aligned_word_stat
	.comm	_memory_write_word_stat,8,3     ## @memory_write_word_stat
	.comm	_pm_scanline_read_long_stat,8,3 ## @pm_scanline_read_long_stat
	.comm	_sigint_flag,4,2                ## @sigint_flag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Atari800_Exit                  ; -- Begin function Atari800_Exit
	.p2align	2
_Atari800_Exit:                         ; @Atari800_Exit
	.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
	bl	_PLATFORM_Exit
	mov	x19, x0
	cbnz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _CFG_save_on_exit@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CFG_save_on_exit@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	bl	_CFG_WriteConfig
LBB0_3:
	bl	_INPUT_Exit
	bl	_PBI_Exit
	bl	_CASSETTE_Exit
	bl	_CARTRIDGE_Exit
	bl	_SIO_Exit
	bl	_Devices_Exit
	bl	_MONITOR_Exit
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CFG_save_on_exit,8,3           ; @CFG_save_on_exit
	.comm	_ATARI_CRASHED,4,2              ; @ATARI_CRASHED
	.comm	_CPU_cim_encountered,8,3        ; @CPU_cim_encountered
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_Screen_atari_write_long_stat,8,3 ; @Screen_atari_write_long_stat
	.comm	_g_ulAtariState,4,2             ; @g_ulAtariState
	.comm	_memory_read_aligned_word_stat,8,3 ; @memory_read_aligned_word_stat
	.comm	_memory_read_word_stat,8,3      ; @memory_read_word_stat
	.comm	_memory_write_aligned_word_stat,8,3 ; @memory_write_aligned_word_stat
	.comm	_memory_write_word_stat,8,3     ; @memory_write_word_stat
	.comm	_pm_scanline_read_long_stat,8,3 ; @pm_scanline_read_long_stat
	.comm	_sigint_flag,4,2                ; @sigint_flag
.subsections_via_symbols
