	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CloseGame                      ## -- Begin function CloseGame
	.p2align	4, 0x90
_CloseGame:                             ## @CloseGame
	.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	_isloaded@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_FCEUI_CloseGame
	xorl	%eax, %eax
	callq	_DriverKill
	movq	$0, (%rbx)
	movq	_CurGame@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_soundrecfn@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_FCEUI_EndWaveRecord
LBB0_4:
	xorl	%eax, %eax
	callq	_InputUserActiveFix
	movl	$1, %eax
	jmp	LBB0_5
LBB0_1:
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_isloaded,8,3                   ## @isloaded
	.comm	_CurGame,8,3                    ## @CurGame
	.comm	_soundrecfn,8,3                 ## @soundrecfn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CloseGame                      ; -- Begin function CloseGame
	.p2align	2
_CloseGame:                             ; @CloseGame
	.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	x19, _isloaded@GOTPAGE
Lloh1:
	ldr	x19, [x19, _isloaded@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.1:
	bl	_FCEUI_CloseGame
	bl	_DriverKill
	str	xzr, [x19]
Lloh2:
	adrp	x8, _CurGame@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CurGame@GOTPAGEOFF]
Lloh4:
	str	xzr, [x8]
Lloh5:
	adrp	x8, _soundrecfn@GOTPAGE
Lloh6:
	ldr	x8, [x8, _soundrecfn@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
	bl	_FCEUI_EndWaveRecord
LBB0_3:
	bl	_InputUserActiveFix
	mov	w0, #1
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_isloaded,8,3                   ; @isloaded
	.comm	_CurGame,8,3                    ; @CurGame
	.comm	_soundrecfn,8,3                 ; @soundrecfn
.subsections_via_symbols
