	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YabauseDeInit                  ## -- Begin function YabauseDeInit
	.p2align	4, 0x90
_YabauseDeInit:                         ## @YabauseDeInit
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	callq	_SH2DeInit
	movq	_BiosRom@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_T2MemoryDeInit
LBB0_2:
	movq	$0, (%rbx)
	movq	_HighWram@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_T2MemoryDeInit
LBB0_4:
	movq	$0, (%rbx)
	movq	_LowWram@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_T2MemoryDeInit
LBB0_6:
	movq	$0, (%rbx)
	movq	_BupRam@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.7:
	movq	_bupfilename@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movl	$65536, %esi                    ## imm = 0x10000
	movl	$1, %edx
	callq	_T123Save
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_YAB_ERR_FILEWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rsi
	callq	_YabSetError
LBB0_9:
	movq	(%rbx), %rdi
	callq	_T1MemoryDeInit
LBB0_10:
	movq	$0, (%rbx)
	xorl	%eax, %eax
	callq	_CartDeInit
	xorl	%eax, %eax
	callq	_Cs2DeInit
	xorl	%eax, %eax
	callq	_ScuDeInit
	xorl	%eax, %eax
	callq	_ScspDeInit
	xorl	%eax, %eax
	callq	_Vdp1DeInit
	xorl	%eax, %eax
	callq	_Vdp2DeInit
	xorl	%eax, %eax
	callq	_SmpcDeInit
	xorl	%eax, %eax
	callq	_PerDeInit
	xorl	%eax, %eax
	callq	_VideoDeInit
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_CheatDeInit                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BiosRom,8,3                    ## @BiosRom
	.comm	_HighWram,8,3                   ## @HighWram
	.comm	_LowWram,8,3                    ## @LowWram
	.comm	_BupRam,8,3                     ## @BupRam
	.comm	_bupfilename,8,3                ## @bupfilename
	.comm	_YAB_ERR_FILEWRITE,4,2          ## @YAB_ERR_FILEWRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_YabauseDeInit                  ; -- Begin function YabauseDeInit
	.p2align	2
_YabauseDeInit:                         ; @YabauseDeInit
	.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	_SH2DeInit
Lloh0:
	adrp	x19, _BiosRom@GOTPAGE
Lloh1:
	ldr	x19, [x19, _BiosRom@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_T2MemoryDeInit
LBB0_2:
	str	xzr, [x19]
Lloh2:
	adrp	x19, _HighWram@GOTPAGE
Lloh3:
	ldr	x19, [x19, _HighWram@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_T2MemoryDeInit
LBB0_4:
	str	xzr, [x19]
Lloh4:
	adrp	x19, _LowWram@GOTPAGE
Lloh5:
	ldr	x19, [x19, _LowWram@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_T2MemoryDeInit
LBB0_6:
	str	xzr, [x19]
Lloh6:
	adrp	x19, _BupRam@GOTPAGE
Lloh7:
	ldr	x19, [x19, _BupRam@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_10
; %bb.7:
Lloh8:
	adrp	x20, _bupfilename@GOTPAGE
Lloh9:
	ldr	x20, [x20, _bupfilename@GOTPAGEOFF]
	ldr	x3, [x20]
	mov	w1, #65536
	mov	w2, #1
	bl	_T123Save
	cbz	x0, LBB0_9
; %bb.8:
Lloh10:
	adrp	x8, _YAB_ERR_FILEWRITE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _YAB_ERR_FILEWRITE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	ldr	x1, [x20]
	bl	_YabSetError
LBB0_9:
	ldr	x0, [x19]
	bl	_T1MemoryDeInit
LBB0_10:
	str	xzr, [x19]
	bl	_CartDeInit
	bl	_Cs2DeInit
	bl	_ScuDeInit
	bl	_ScspDeInit
	bl	_Vdp1DeInit
	bl	_Vdp2DeInit
	bl	_SmpcDeInit
	bl	_PerDeInit
	bl	_VideoDeInit
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_CheatDeInit
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_BiosRom,8,3                    ; @BiosRom
	.comm	_HighWram,8,3                   ; @HighWram
	.comm	_LowWram,8,3                    ; @LowWram
	.comm	_BupRam,8,3                     ; @BupRam
	.comm	_bupfilename,8,3                ; @bupfilename
	.comm	_YAB_ERR_FILEWRITE,4,2          ; @YAB_ERR_FILEWRITE
.subsections_via_symbols
