	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LoadGame                       ## -- Begin function LoadGame
	.p2align	4, 0x90
_LoadGame:                              ## @LoadGame
	.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
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_CloseGame
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_FCEUI_LoadGame
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rbx
	movq	_CurGame@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	%rbx, %rdi
	callq	_ParseGI
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_RefreshThrottleFPS
	movq	%rbx, %rdi
	callq	_DriverInitialize
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movq	_soundrecfn@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.3:
	callq	_FCEUI_BeginWaveRecord
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	(%rbx), %rdi
	callq	_free
	movq	$0, (%rbx)
LBB0_5:
	movq	_isloaded@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	xorl	%eax, %eax
	callq	_FCEUD_NetworkConnect
	movl	$1, %r14d
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CurGame,8,3                    ## @CurGame
	.comm	_soundrecfn,8,3                 ## @soundrecfn
	.comm	_isloaded,4,2                   ## @isloaded
	.comm	_EO_AUTOHIDE,4,2                ## @EO_AUTOHIDE
	.comm	_eoptions,4,2                   ## @eoptions
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LoadGame                       ; -- Begin function LoadGame
	.p2align	2
_LoadGame:                              ; @LoadGame
	.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
	mov	x19, x0
	bl	_CloseGame
	mov	x0, x19
	mov	w1, #1
	bl	_FCEUI_LoadGame
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _CurGame@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CurGame@GOTPAGEOFF]
Lloh2:
	str	x19, [x8]
	mov	x0, x19
	bl	_ParseGI
	bl	_RefreshThrottleFPS
	mov	x0, x19
	bl	_DriverInitialize
	cbz	w0, LBB0_6
; %bb.2:
Lloh3:
	adrp	x19, _soundrecfn@GOTPAGE
Lloh4:
	ldr	x19, [x19, _soundrecfn@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_5
; %bb.3:
	bl	_FCEUI_BeginWaveRecord
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	x0, [x19]
	bl	_free
	str	xzr, [x19]
LBB0_5:
Lloh5:
	adrp	x8, _isloaded@GOTPAGE
Lloh6:
	ldr	x8, [x8, _isloaded@GOTPAGEOFF]
	mov	w19, #1
Lloh7:
	str	w19, [x8]
	bl	_FCEUD_NetworkConnect
	b	LBB0_7
LBB0_6:
	mov	w19, #0
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CurGame,8,3                    ; @CurGame
	.comm	_soundrecfn,8,3                 ; @soundrecfn
	.comm	_isloaded,4,2                   ; @isloaded
	.comm	_EO_AUTOHIDE,4,2                ; @EO_AUTOHIDE
	.comm	_eoptions,4,2                   ; @eoptions
.subsections_via_symbols
