	.file	"extr_..retroarch.c_path_set_redirect.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	""
.LC1:
	.string	"%s %s\n"
.LC2:
	.string	".srm"
.LC3:
	.string	"%s \"%s\".\n"
.LC4:
	.string	".state"
	.text
	.p2align 4
	.type	path_set_redirect, @function
path_set_redirect:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r13d, DWORD PTR PATH_MAX_LENGTH[rip]
	mov	edi, r13d
	call	malloc@PLT
	mov	edi, DWORD PTR PATH_MAX_LENGTH[rip]
	mov	r12, rax
	call	malloc@PLT
	mov	edi, DWORD PTR RARCH_DIR_SAVEFILE[rip]
	mov	rbp, rax
	call	dir_get@PLT
	mov	edi, DWORD PTR RARCH_DIR_SAVESTATE[rip]
	mov	r15, rax
	call	dir_get@PLT
	mov	edx, r13d
	mov	rsi, r15
	mov	rdi, r12
	mov	rbx, QWORD PTR configuration_settings[rip]
	mov	BYTE PTR 0[rbp], 0
	mov	r14, rax
	mov	BYTE PTR [r12], 0
	call	strlcpy@PLT
	mov	rdi, rbp
	mov	edx, r13d
	mov	rsi, r14
	call	strlcpy@PLT
	mov	rdi, QWORD PTR runloop_system[rip]
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L3
	movsx	rax, r13d
	cmp	QWORD PTR 24[rbx], 0
	mov	QWORD PTR 8[rsp], rax
	jne	.L44
.L5:
	cmp	QWORD PTR 16[rbx], 0
	jne	.L45
.L3:
	mov	rdi, r12
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L8
	cmp	QWORD PTR 8[rbx], 0
	jne	.L8
.L9:
	mov	rdi, rbp
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L10
	cmp	QWORD PTR [rbx], 0
	jne	.L10
	mov	rdi, r12
	call	path_is_directory@PLT
	test	rax, rax
	jne	.L46
.L12:
	mov	rdi, rbp
	call	path_is_directory@PLT
	test	rax, rax
	jne	.L47
.L13:
	mov	rdi, QWORD PTR g_extern[rip]
	call	path_is_directory@PLT
	test	rax, rax
	jne	.L48
.L14:
	mov	rdi, QWORD PTR g_extern[rip+8]
	call	path_is_directory@PLT
	test	rax, rax
	jne	.L49
.L17:
	mov	rdi, QWORD PTR g_extern[rip+16]
	call	path_is_directory@PLT
	test	rax, rax
	jne	.L50
.L20:
	mov	edi, DWORD PTR RARCH_DIR_CURRENT_SAVEFILE[rip]
	mov	rsi, r12
	call	dir_set@PLT
	mov	edi, DWORD PTR RARCH_DIR_CURRENT_SAVESTATE[rip]
	mov	rsi, rbp
	call	dir_set@PLT
	mov	rdi, r12
	call	free@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rsi, QWORD PTR path_main_basename[rip]
	mov	edx, r13d
	mov	rdi, rbp
	call	strlcpy@PLT
	mov	rdi, rbp
	call	path_basedir@PLT
	mov	rdi, r12
	call	path_is_directory@PLT
	test	rax, rax
	je	.L12
.L46:
	mov	rdi, QWORD PTR g_extern[rip]
	mov	edx, 8
	mov	rsi, r12
	call	strlcpy@PLT
	mov	rdi, rbp
	call	path_is_directory@PLT
	test	rax, rax
	je	.L13
.L47:
	mov	rdi, QWORD PTR g_extern[rip+8]
	mov	edx, 8
	mov	rsi, rbp
	call	strlcpy@PLT
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rsi, QWORD PTR path_main_basename[rip]
	mov	rdi, r12
	mov	edx, r13d
	call	strlcpy@PLT
	mov	rdi, r12
	call	path_basedir@PLT
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L50:
	mov	rdi, QWORD PTR path_main_basename[rip]
	call	string_is_empty@PLT
	mov	rdi, QWORD PTR g_extern[rip+16]
	lea	rsi, .LC0[rip]
	mov	ecx, 8
	test	rax, rax
	cmove	rsi, QWORD PTR path_main_basename[rip]
	lea	rdx, .LC4[rip]
	call	fill_pathname_dir@PLT
	mov	edi, DWORD PTR MSG_REDIRECTING_CHEATFILE_TO[rip]
	mov	r13, QWORD PTR g_extern[rip+16]
	call	msg_hash_to_str@PLT
	mov	rdx, r13
	lea	rdi, .LC3[rip]
	mov	esi, eax
	call	RARCH_LOG@PLT
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L49:
	mov	rdi, QWORD PTR path_main_basename[rip]
	call	string_is_empty@PLT
	mov	rsi, QWORD PTR path_main_basename[rip]
	test	rax, rax
	jne	.L51
.L19:
	mov	rdi, QWORD PTR g_extern[rip+8]
	mov	ecx, 8
	lea	rdx, .LC4[rip]
	call	fill_pathname_dir@PLT
	mov	edi, DWORD PTR MSG_REDIRECTING_SAVESTATE_TO[rip]
	mov	r13, QWORD PTR g_extern[rip+8]
	call	msg_hash_to_str@PLT
	mov	rdx, r13
	lea	rdi, .LC3[rip]
	mov	esi, eax
	call	RARCH_LOG@PLT
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L48:
	mov	rdi, QWORD PTR path_main_basename[rip]
	call	string_is_empty@PLT
	mov	rsi, QWORD PTR path_main_basename[rip]
	test	rax, rax
	jne	.L52
.L16:
	mov	rdi, QWORD PTR g_extern[rip]
	mov	ecx, 8
	lea	rdx, .LC2[rip]
	call	fill_pathname_dir@PLT
	mov	edi, DWORD PTR MSG_REDIRECTING_SAVEFILE_TO[rip]
	mov	r13, QWORD PTR g_extern[rip]
	call	msg_hash_to_str@PLT
	mov	rdx, r13
	lea	rdi, .LC3[rip]
	mov	esi, eax
	call	RARCH_LOG@PLT
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L45:
	mov	rdi, r14
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L3
	mov	rdx, QWORD PTR runloop_system[rip]
	mov	rdi, rbp
	movsx	rcx, r13d
	mov	rsi, r14
	call	fill_pathname_join@PLT
	mov	rdi, rbp
	call	path_is_directory@PLT
	test	rax, rax
	jne	.L3
	mov	rdi, rbp
	call	path_mkdir@PLT
	test	eax, eax
	jne	.L3
	mov	edi, DWORD PTR MSG_REVERTING_SAVESTATE_DIRECTORY_TO[rip]
	call	msg_hash_to_str@PLT
	mov	rdx, r14
	lea	rdi, .LC1[rip]
	mov	esi, eax
	call	RARCH_LOG@PLT
	mov	edx, r13d
	mov	rsi, r14
	mov	rdi, rbp
	call	strlcpy@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L44:
	mov	rdi, r15
	call	string_is_empty@PLT
	test	rax, rax
	jne	.L5
	mov	rdx, QWORD PTR runloop_system[rip]
	mov	rdi, r12
	movsx	rcx, r13d
	mov	rsi, r15
	call	fill_pathname_join@PLT
	mov	rdi, r12
	call	path_is_directory@PLT
	test	rax, rax
	jne	.L5
	mov	rdi, r12
	call	path_mkdir@PLT
	test	eax, eax
	jne	.L5
	mov	edi, DWORD PTR MSG_REVERTING_SAVEFILE_DIRECTORY_TO[rip]
	call	msg_hash_to_str@PLT
	mov	rdx, r15
	lea	rdi, .LC1[rip]
	mov	esi, eax
	call	RARCH_LOG@PLT
	mov	edx, r13d
	mov	rsi, r15
	mov	rdi, r12
	call	strlcpy@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L52:
	mov	rdi, QWORD PTR runloop_system[rip]
	call	string_is_empty@PLT
	lea	rsi, .LC0[rip]
	test	rax, rax
	cmove	rsi, QWORD PTR runloop_system[rip]
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L51:
	mov	rdi, QWORD PTR runloop_system[rip]
	call	string_is_empty@PLT
	lea	rsi, .LC0[rip]
	test	rax, rax
	cmove	rsi, QWORD PTR runloop_system[rip]
	jmp	.L19
	.cfi_endproc
.LFE0:
	.size	path_set_redirect, .-path_set_redirect
	.comm	runloop_system,8,8
	.comm	path_main_basename,8,8
	.comm	g_extern,24,16
	.comm	configuration_settings,8,8
	.comm	RARCH_DIR_SAVESTATE,4,4
	.comm	RARCH_DIR_SAVEFILE,4,4
	.comm	RARCH_DIR_CURRENT_SAVESTATE,4,4
	.comm	RARCH_DIR_CURRENT_SAVEFILE,4,4
	.comm	PATH_MAX_LENGTH,4,4
	.comm	MSG_REVERTING_SAVESTATE_DIRECTORY_TO,4,4
	.comm	MSG_REVERTING_SAVEFILE_DIRECTORY_TO,4,4
	.comm	MSG_REDIRECTING_SAVESTATE_TO,4,4
	.comm	MSG_REDIRECTING_SAVEFILE_TO,4,4
	.comm	MSG_REDIRECTING_CHEATFILE_TO,4,4
	.comm	MENU_ENUM_LABEL_VALUE_NO_CORE,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_path_set_redirect.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"%s %s\012\000"
	.align	2
.LC2:
	.ascii	".srm\000"
	.align	2
.LC3:
	.ascii	"%s \"%s\".\012\000"
	.align	2
.LC4:
	.ascii	".state\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	path_set_redirect, %function
path_set_redirect:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L59
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r6, [r3]
	ldr	r10, .L59+4
	mov	r0, r6
	bl	malloc
	mov	r5, r0
	mov	r0, r6
	bl	malloc
	ldr	r3, .L59+8
	mov	r4, r0
	ldr	r0, [r3]
	bl	dir_get
	ldr	r3, .L59+12
	mov	r8, r0
	ldr	r0, [r3]
	bl	dir_get
	mov	r3, #0
	mov	r7, r0
	ldr	ip, .L59+16
	strb	r3, [r5]
	mov	r2, r6
	mov	r1, r8
	mov	r0, r5
	ldr	r9, [ip]
	strb	r3, [r4]
	bl	strlcpy
	mov	r2, r6
	mov	r1, r7
	mov	r0, r4
	bl	strlcpy
	ldr	r0, [r10]
	bl	string_is_empty
	cmp	r0, #0
	bne	.L3
	ldr	r3, [r9, #12]
	cmp	r3, #0
	bne	.L51
.L5:
	ldr	r3, [r9, #8]
	cmp	r3, #0
	bne	.L52
.L3:
	mov	r0, r5
	bl	string_is_empty
	cmp	r0, #0
	bne	.L8
	ldr	r3, [r9, #4]
	cmp	r3, #0
	bne	.L8
.L9:
	mov	r0, r4
	bl	string_is_empty
	cmp	r0, #0
	bne	.L10
	ldr	r3, [r9]
	cmp	r3, #0
	bne	.L10
.L11:
	mov	r0, r5
	bl	path_is_directory
	cmp	r0, #0
	ldr	r6, .L59+20
	bne	.L48
.L12:
	mov	r0, r4
	bl	path_is_directory
	cmp	r0, #0
	bne	.L53
.L13:
	ldr	r0, [r6]
	bl	path_is_directory
	cmp	r0, #0
	bne	.L54
.L14:
	ldr	r0, [r6, #4]
	bl	path_is_directory
	cmp	r0, #0
	bne	.L55
.L17:
	ldr	r0, [r6, #8]
	bl	path_is_directory
	cmp	r0, #0
	bne	.L56
.L20:
	ldr	r3, .L59+24
	mov	r1, r5
	ldr	r0, [r3]
	bl	dir_set
	ldr	r3, .L59+28
	mov	r1, r4
	ldr	r0, [r3]
	bl	dir_set
	mov	r0, r5
	bl	free
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	b	free
.L10:
	ldr	r3, .L59+32
	mov	r2, r6
	mov	r0, r4
	ldr	r1, [r3]
	bl	strlcpy
	mov	r0, r4
	bl	path_basedir
	b	.L11
.L8:
	ldr	r3, .L59+32
	mov	r2, r6
	mov	r0, r5
	ldr	r1, [r3]
	bl	strlcpy
	mov	r0, r5
	bl	path_basedir
	b	.L9
.L56:
	ldr	r7, .L59+32
	ldr	r8, [r6, #8]
	ldr	r0, [r7]
	bl	string_is_empty
	cmp	r0, #0
	ldreq	r1, [r7]
	ldrne	r1, .L59+36
	ldr	r2, .L59+40
	mov	r0, r8
	mov	r3, #4
	bl	fill_pathname_dir
	ldr	r3, .L59+44
	ldr	r0, [r3]
	bl	msg_hash_to_str
	ldr	r2, [r6, #8]
	mov	r1, r0
	ldr	r0, .L59+48
	bl	RARCH_LOG
	b	.L20
.L55:
	ldr	r7, .L59+32
	ldr	r8, [r6, #4]
	ldr	r0, [r7]
	bl	string_is_empty
	cmp	r0, #0
	ldreq	r1, [r7]
	bne	.L57
.L19:
	ldr	r2, .L59+40
	mov	r0, r8
	mov	r3, #4
	bl	fill_pathname_dir
	ldr	r3, .L59+52
	ldr	r0, [r3]
	bl	msg_hash_to_str
	ldr	r2, [r6, #4]
	mov	r1, r0
	ldr	r0, .L59+48
	bl	RARCH_LOG
	b	.L17
.L54:
	ldr	r7, .L59+32
	ldr	r8, [r6]
	ldr	r0, [r7]
	bl	string_is_empty
	cmp	r0, #0
	ldreq	r1, [r7]
	bne	.L58
.L16:
	ldr	r2, .L59+56
	mov	r0, r8
	mov	r3, #4
	bl	fill_pathname_dir
	ldr	r3, .L59+60
	ldr	r0, [r3]
	bl	msg_hash_to_str
	ldr	r2, [r6]
	mov	r1, r0
	ldr	r0, .L59+48
	bl	RARCH_LOG
	b	.L14
.L53:
	mov	r2, #4
	mov	r1, r4
	ldr	r0, [r6, #4]
	bl	strlcpy
	b	.L13
.L48:
	mov	r2, #4
	mov	r1, r5
	ldr	r0, [r6]
	bl	strlcpy
	b	.L12
.L52:
	mov	r0, r7
	bl	string_is_empty
	cmp	r0, #0
	bne	.L3
	mov	r3, r6
	mov	r1, r7
	ldr	r2, [r10]
	mov	r0, r4
	bl	fill_pathname_join
	mov	r0, r4
	bl	path_is_directory
	cmp	r0, #0
	bne	.L3
	mov	r0, r4
	bl	path_mkdir
	cmp	r0, #0
	bne	.L3
	ldr	r3, .L59+64
	ldr	r0, [r3]
	bl	msg_hash_to_str
	mov	r2, r7
	mov	r1, r0
	ldr	r0, .L59+68
	bl	RARCH_LOG
	mov	r2, r6
	mov	r1, r7
	mov	r0, r4
	bl	strlcpy
	b	.L3
.L51:
	mov	r0, r8
	bl	string_is_empty
	cmp	r0, #0
	bne	.L5
	mov	r3, r6
	mov	r1, r8
	ldr	r2, [r10]
	mov	r0, r5
	bl	fill_pathname_join
	mov	r0, r5
	bl	path_is_directory
	cmp	r0, #0
	bne	.L5
	mov	r0, r5
	bl	path_mkdir
	cmp	r0, #0
	bne	.L5
	ldr	r3, .L59+72
	ldr	r0, [r3]
	bl	msg_hash_to_str
	mov	r2, r8
	mov	r1, r0
	ldr	r0, .L59+68
	bl	RARCH_LOG
	mov	r2, r6
	mov	r1, r8
	mov	r0, r5
	bl	strlcpy
	b	.L5
.L58:
	ldr	r0, [r10]
	bl	string_is_empty
	cmp	r0, #0
	ldreq	r1, [r10]
	ldrne	r1, .L59+36
	b	.L16
.L57:
	ldr	r0, [r10]
	bl	string_is_empty
	cmp	r0, #0
	ldreq	r1, [r10]
	ldrne	r1, .L59+36
	b	.L19
.L60:
	.align	2
.L59:
	.word	PATH_MAX_LENGTH
	.word	runloop_system
	.word	RARCH_DIR_SAVEFILE
	.word	RARCH_DIR_SAVESTATE
	.word	configuration_settings
	.word	g_extern
	.word	RARCH_DIR_CURRENT_SAVEFILE
	.word	RARCH_DIR_CURRENT_SAVESTATE
	.word	path_main_basename
	.word	.LC0
	.word	.LC4
	.word	MSG_REDIRECTING_CHEATFILE_TO
	.word	.LC3
	.word	MSG_REDIRECTING_SAVESTATE_TO
	.word	.LC2
	.word	MSG_REDIRECTING_SAVEFILE_TO
	.word	MSG_REVERTING_SAVESTATE_DIRECTORY_TO
	.word	.LC1
	.word	MSG_REVERTING_SAVEFILE_DIRECTORY_TO
	.size	path_set_redirect, .-path_set_redirect
	.comm	runloop_system,4,4
	.comm	path_main_basename,4,4
	.comm	g_extern,12,4
	.comm	configuration_settings,4,4
	.comm	RARCH_DIR_SAVESTATE,4,4
	.comm	RARCH_DIR_SAVEFILE,4,4
	.comm	RARCH_DIR_CURRENT_SAVESTATE,4,4
	.comm	RARCH_DIR_CURRENT_SAVEFILE,4,4
	.comm	PATH_MAX_LENGTH,4,4
	.comm	MSG_REVERTING_SAVESTATE_DIRECTORY_TO,4,4
	.comm	MSG_REVERTING_SAVEFILE_DIRECTORY_TO,4,4
	.comm	MSG_REDIRECTING_SAVESTATE_TO,4,4
	.comm	MSG_REDIRECTING_SAVEFILE_TO,4,4
	.comm	MSG_REDIRECTING_CHEATFILE_TO,4,4
	.comm	MENU_ENUM_LABEL_VALUE_NO_CORE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
