	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function command_event_deinit_core
_command_event_deinit_core:             ## @command_event_deinit_core
	.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
	movl	%edi, %r14d
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_LOG
	xorl	%eax, %eax
	callq	_core_unload_game
	leaq	L_.str.1(%rip), %rdi
	callq	_RARCH_LOG
	xorl	%edi, %edi
	callq	_video_driver_set_cached_frame_ptr
	movq	_current_core@GOTPCREL(%rip), %rbx
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	*8(%rbx)
LBB0_2:
	leaq	L_.str.2(%rip), %rdi
	callq	_RARCH_LOG
	movq	%rbx, %rdi
	callq	_uninit_libretro_symbols
	movl	$0, (%rbx)
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:
	movq	_DRIVERS_CMD_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_driver_uninit
LBB0_4:
	xorl	%eax, %eax
	callq	_command_event_disable_overrides
	xorl	%eax, %eax
	callq	_retroarch_unset_runtime_shader_preset
	movq	_runloop_remaps_core_active@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.5:
	movq	_runloop_remaps_content_dir_active@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.6:
	movq	_runloop_remaps_game_active@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movl	$1, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_input_remapping_set_defaults   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unloading game..\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unloading core..\n"

	.comm	_current_core,24,3              ## @current_core
L_.str.2:                               ## @.str.2
	.asciz	"Unloading core symbols..\n"

	.comm	_DRIVERS_CMD_ALL,4,2            ## @DRIVERS_CMD_ALL
	.comm	_runloop_remaps_core_active,8,3 ## @runloop_remaps_core_active
	.comm	_runloop_remaps_content_dir_active,8,3 ## @runloop_remaps_content_dir_active
	.comm	_runloop_remaps_game_active,8,3 ## @runloop_remaps_game_active
	.no_dead_strip	_command_event_deinit_core
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function command_event_deinit_core
_command_event_deinit_core:             ; @command_event_deinit_core
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_LOG
	bl	_core_unload_game
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_LOG
	mov	x0, #0
	bl	_video_driver_set_cached_frame_ptr
Lloh4:
	adrp	x20, _current_core@GOTPAGE
Lloh5:
	ldr	x20, [x20, _current_core@GOTPAGEOFF]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x20, #8]
	blr	x8
LBB0_2:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_RARCH_LOG
	mov	x0, x20
	bl	_uninit_libretro_symbols
	str	wzr, [x20]
	cbz	w19, LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _DRIVERS_CMD_ALL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DRIVERS_CMD_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_driver_uninit
LBB0_4:
	bl	_command_event_disable_overrides
	bl	_retroarch_unset_runtime_shader_preset
Lloh11:
	adrp	x8, _runloop_remaps_core_active@GOTPAGE
Lloh12:
	ldr	x8, [x8, _runloop_remaps_core_active@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _runloop_remaps_content_dir_active@GOTPAGE
Lloh15:
	ldr	x9, [x9, _runloop_remaps_content_dir_active@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
Lloh17:
	adrp	x10, _runloop_remaps_game_active@GOTPAGE
Lloh18:
	ldr	x10, [x10, _runloop_remaps_game_active@GOTPAGEOFF]
Lloh19:
	ldr	x10, [x10]
	cmp	x8, #0
	ccmp	x9, #0, #0, eq
	ccmp	x10, #0, #0, eq
	b.eq	LBB0_6
; %bb.5:
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_input_remapping_set_defaults
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unloading game..\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unloading core..\n"

	.comm	_current_core,24,3              ; @current_core
l_.str.2:                               ; @.str.2
	.asciz	"Unloading core symbols..\n"

	.comm	_DRIVERS_CMD_ALL,4,2            ; @DRIVERS_CMD_ALL
	.comm	_runloop_remaps_core_active,8,3 ; @runloop_remaps_core_active
	.comm	_runloop_remaps_content_dir_active,8,3 ; @runloop_remaps_content_dir_active
	.comm	_runloop_remaps_game_active,8,3 ; @runloop_remaps_game_active
	.no_dead_strip	_command_event_deinit_core
.subsections_via_symbols
