	.file	"extr_..retroarch.c_main_exit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"[Video]: Restored video driver to \"%s\".\n"
	.text
	.p2align 4
	.globl	main_exit
	.type	main_exit, @function
main_exit:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rsi, QWORD PTR cached_video_driver[rip]
	mov	rbx, QWORD PTR configuration_settings[rip]
	cmp	QWORD PTR [rsi], 0
	jne	.L10
	cmp	QWORD PTR [rbx], 0
	jne	.L11
.L3:
	mov	edi, DWORD PTR RARCH_CTL_MAIN_DEINIT[rip]
	xor	esi, esi
	call	rarch_ctl@PLT
	xor	eax, eax
	call	rarch_perf_log@PLT
	mov	rdi, rbp
	call	frontend_driver_deinit@PLT
	mov	edi, DWORD PTR RARCH_PATH_CORE[rip]
	call	path_get_realsize@PLT
	mov	edi, DWORD PTR RARCH_PATH_CORE[rip]
	mov	ebp, eax
	call	path_get_ptr@PLT
	mov	esi, ebp
	mov	edi, eax
	call	frontend_driver_exitspawn@PLT
	xor	eax, eax
	mov	DWORD PTR has_set_username[rip], 0
	mov	DWORD PTR rarch_is_inited[rip], 0
	mov	DWORD PTR rarch_error_on_init[rip], 0
	mov	DWORD PTR rarch_block_config_read[rip], 0
	call	retroarch_msg_queue_deinit@PLT
	mov	edi, DWORD PTR DRIVERS_CMD_ALL[rip]
	call	driver_uninit@PLT
	mov	edi, DWORD PTR CMD_EVENT_LOG_FILE_DEINIT[rip]
	xor	esi, esi
	call	command_event@PLT
	mov	edi, DWORD PTR RARCH_CTL_STATE_FREE[rip]
	xor	esi, esi
	call	rarch_ctl@PLT
	xor	eax, eax
	call	global_free@PLT
	mov	edi, DWORD PTR RARCH_CTL_DATA_DEINIT[rip]
	xor	esi, esi
	call	rarch_ctl@PLT
	mov	rdi, QWORD PTR configuration_settings[rip]
	test	rdi, rdi
	je	.L4
	call	free@PLT
.L4:
	mov	QWORD PTR configuration_settings[rip], 0
	xor	eax, eax
	call	ui_companion_driver_deinit@PLT
	xor	edi, edi
	call	frontend_driver_shutdown@PLT
	mov	edi, DWORD PTR RARCH_DRIVER_CTL_DEINIT[rip]
	xor	esi, esi
	call	driver_ctl@PLT
	xor	eax, eax
	call	ui_companion_driver_free@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	frontend_driver_free@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	edi, DWORD PTR 8[rbx]
	call	strcpy@PLT
	mov	rax, QWORD PTR cached_video_driver[rip]
	mov	esi, DWORD PTR 8[rbx]
	lea	rdi, .LC0[rip]
	mov	QWORD PTR [rax], 0
	call	RARCH_LOG@PLT
	cmp	QWORD PTR [rbx], 0
	je	.L3
.L11:
	mov	edi, DWORD PTR CMD_EVENT_MENU_SAVE_CURRENT_CONFIG[rip]
	xor	esi, esi
	call	command_event@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	main_exit, .-main_exit
	.comm	rarch_is_inited,4,4
	.comm	rarch_error_on_init,4,4
	.comm	rarch_block_config_read,4,4
	.comm	has_set_username,4,4
	.comm	configuration_settings,8,8
	.comm	cached_video_driver,8,8
	.comm	RARCH_PATH_CORE,4,4
	.comm	RARCH_MENU_CTL_UNSET_OWN_DRIVER,4,4
	.comm	RARCH_DRIVER_CTL_DEINIT,4,4
	.comm	RARCH_CTL_STATE_FREE,4,4
	.comm	RARCH_CTL_MAIN_DEINIT,4,4
	.comm	RARCH_CTL_DATA_DEINIT,4,4
	.comm	DRIVERS_CMD_ALL,4,4
	.comm	CMD_EVENT_MENU_SAVE_CURRENT_CONFIG,4,4
	.comm	CMD_EVENT_LOG_FILE_DEINIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_..retroarch.c_main_exit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"[Video]: Restored video driver to \"%s\".\012\000"
	.text
	.align	2
	.global	main_exit
	.syntax unified
	.arm
	.fpu softvfp
	.type	main_exit, %function
main_exit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L18
	ldr	r5, .L18+4
	ldr	r1, [r7]
	mov	r4, r0
	ldr	r3, [r1]
	ldr	r6, [r5]
	cmp	r3, #0
	bne	.L16
	ldr	r3, [r6]
	cmp	r3, #0
	bne	.L17
.L3:
	ldr	r3, .L18+8
	mov	r1, #0
	ldr	r0, [r3]
	ldr	r7, .L18+12
	bl	rarch_ctl
	bl	rarch_perf_log
	mov	r0, r4
	bl	frontend_driver_deinit
	ldr	r0, [r7]
	bl	path_get_ptr
	mov	r6, r0
	ldr	r0, [r7]
	bl	path_get_realsize
	mov	r4, #0
	mov	r1, r0
	mov	r0, r6
	bl	frontend_driver_exitspawn
	ldr	r2, .L18+16
	ldr	r1, .L18+20
	ldr	r3, .L18+24
	ldr	r0, .L18+28
	str	r4, [r2]
	str	r4, [r1]
	str	r4, [r3]
	str	r4, [r0]
	bl	retroarch_msg_queue_deinit
	ldr	r3, .L18+32
	ldr	r0, [r3]
	bl	driver_uninit
	ldr	r3, .L18+36
	mov	r1, r4
	ldr	r0, [r3]
	bl	command_event
	ldr	r3, .L18+40
	mov	r1, r4
	ldr	r0, [r3]
	bl	rarch_ctl
	bl	global_free
	ldr	r3, .L18+44
	mov	r1, r4
	ldr	r0, [r3]
	bl	rarch_ctl
	ldr	r0, [r5]
	cmp	r0, r4
	beq	.L4
	bl	free
.L4:
	mov	r4, #0
	str	r4, [r5]
	bl	ui_companion_driver_deinit
	mov	r0, r4
	bl	frontend_driver_shutdown
	ldr	r3, .L18+48
	mov	r1, r4
	ldr	r0, [r3]
	bl	driver_ctl
	bl	ui_companion_driver_free
	pop	{r4, r5, r6, r7, r8, lr}
	b	frontend_driver_free
.L16:
	ldr	r0, [r6, #4]
	bl	strcpy
	mov	r2, #0
	ldr	r3, [r7]
	ldr	r1, [r6, #4]
	ldr	r0, .L18+52
	str	r2, [r3]
	bl	RARCH_LOG
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L3
.L17:
	ldr	r3, .L18+56
	mov	r1, #0
	ldr	r0, [r3]
	bl	command_event
	b	.L3
.L19:
	.align	2
.L18:
	.word	cached_video_driver
	.word	configuration_settings
	.word	RARCH_CTL_MAIN_DEINIT
	.word	RARCH_PATH_CORE
	.word	rarch_error_on_init
	.word	rarch_is_inited
	.word	rarch_block_config_read
	.word	has_set_username
	.word	DRIVERS_CMD_ALL
	.word	CMD_EVENT_LOG_FILE_DEINIT
	.word	RARCH_CTL_STATE_FREE
	.word	RARCH_CTL_DATA_DEINIT
	.word	RARCH_DRIVER_CTL_DEINIT
	.word	.LC0
	.word	CMD_EVENT_MENU_SAVE_CURRENT_CONFIG
	.size	main_exit, .-main_exit
	.comm	rarch_is_inited,4,4
	.comm	rarch_error_on_init,4,4
	.comm	rarch_block_config_read,4,4
	.comm	has_set_username,4,4
	.comm	configuration_settings,4,4
	.comm	cached_video_driver,4,4
	.comm	RARCH_PATH_CORE,4,4
	.comm	RARCH_MENU_CTL_UNSET_OWN_DRIVER,4,4
	.comm	RARCH_DRIVER_CTL_DEINIT,4,4
	.comm	RARCH_CTL_STATE_FREE,4,4
	.comm	RARCH_CTL_MAIN_DEINIT,4,4
	.comm	RARCH_CTL_DATA_DEINIT,4,4
	.comm	DRIVERS_CMD_ALL,4,4
	.comm	CMD_EVENT_MENU_SAVE_CURRENT_CONFIG,4,4
	.comm	CMD_EVENT_LOG_FILE_DEINIT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
