	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function path_init_subsystem
_path_init_subsystem:                   ## @path_init_subsystem
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_RARCH_PATH_SUBSYSTEM@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_path_is_empty
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	_runloop_system@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	4(%rax), %ebx
	movl	(%r15), %edi
	callq	_path_get
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_libretro_find_subsystem_info
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, %rbx
	movl	8(%rax), %edi
	movq	_subsystem_fullpaths@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	8(%rax), %esi
	callq	_MIN
	testl	%eax, %eax
	je	LBB0_11
## %bb.3:
	movl	%eax, %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	(%rbx), %rax
	xorl	%r14d, %r14d
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	incq	%r14
	cmpq	-104(%rbp), %r14                ## 8-byte Folded Reload
	je	LBB0_11
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	%r14, %rdx
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	shlq	$4, %r14
	cmpl	$0, (%rax,%r14)
	je	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r12d, %r12d
	movq	%r14, -120(%rbp)                ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	%r13, %rdi
	movq	%r15, %rsi
	leaq	-80(%rbp), %rdx
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	callq	_fill_pathname
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=2
	movq	_MSG_REDIRECTING_SAVEFILE_TO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_RARCH_LOG
	movl	8(%r14,%r12,4), %ebx
	xorl	%eax, %eax
	callq	_savefile_ptr_get
	movq	%rax, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_string_list_append
	movq	%r13, %rdi
	callq	_free
	movq	-136(%rbp), %rsp                ## 8-byte Reload
	incq	%r12
	movq	-112(%rbp), %rbx                ## 8-byte Reload
	movq	(%rbx), %rax
	movq	-120(%rbp), %r14                ## 8-byte Reload
	movl	(%rax,%r14), %ecx
	cmpq	%rcx, %r12
	jae	LBB0_10
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rsp, -136(%rbp)                ## 8-byte Spill
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movl	(%r13), %eax
	movslq	%eax, %rdi
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	movq	%rax, %r13
	movq	(%rbx), %rax
	movq	8(%rax,%r14), %r14
	movb	$0, -80(%rbp)
	movb	$0, (%r13)
	movq	(%r14,%r12,4), %rcx
	leaq	-80(%rbp), %rdi
	movl	$32, %esi
	leaq	L_.str(%rip), %rdx
	callq	_snprintf
	movq	_subsystem_fullpaths@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rsi
	movq	%r15, %rdi
	movq	-128(%rbp), %rdx                ## 8-byte Reload
	callq	_strlcpy
	movq	%r15, %rdi
	callq	_path_remove_extension
	movq	_RARCH_DIR_CURRENT_SAVEFILE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_dir_get
	movq	%rax, %rdi
	callq	_path_is_directory
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	(%rbx), %edi
	callq	_dir_get
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_strlcpy
	movq	%r13, %rdi
	movq	%r15, %rsi
	leaq	-80(%rbp), %rdx
	movl	%ebx, %ecx
	callq	_fill_pathname_dir
	jmp	LBB0_9
LBB0_11:
	movq	_RARCH_OVERRIDE_SETTING_SAVE_PATH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_retroarch_override_setting_is_set
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	_g_extern@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_path_main_basename@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.2(%rip), %rdx
	movl	$8, %ecx
	callq	_fill_pathname_noext
LBB0_13:
	movq	_g_extern@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_path_is_directory
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	(%r14), %rdi
	movq	_path_main_basename@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.2(%rip), %rdx
	movl	$8, %ecx
	callq	_fill_pathname_dir
	movq	_MSG_REDIRECTING_SAVEFILE_TO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movq	(%r14), %rdx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_RARCH_LOG
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_g_extern,8,3                   ## @g_extern
	.comm	_runloop_system,8,2             ## @runloop_system
	.comm	_RARCH_PATH_SUBSYSTEM,4,2       ## @RARCH_PATH_SUBSYSTEM
	.comm	_subsystem_fullpaths,8,3        ## @subsystem_fullpaths
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".%s"

	.comm	_RARCH_DIR_CURRENT_SAVEFILE,4,2 ## @RARCH_DIR_CURRENT_SAVEFILE
L_.str.1:                               ## @.str.1
	.asciz	"%s \"%s\".\n"

	.comm	_MSG_REDIRECTING_SAVEFILE_TO,4,2 ## @MSG_REDIRECTING_SAVEFILE_TO
	.comm	_RARCH_OVERRIDE_SETTING_SAVE_PATH,4,2 ## @RARCH_OVERRIDE_SETTING_SAVE_PATH
	.comm	_path_main_basename,8,3         ## @path_main_basename
L_.str.2:                               ## @.str.2
	.asciz	".srm"

	.no_dead_strip	_path_init_subsystem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function path_init_subsystem
_path_init_subsystem:                   ; @path_init_subsystem
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #64
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x21, _RARCH_PATH_SUBSYSTEM@GOTPAGE
Lloh4:
	ldr	x21, [x21, _RARCH_PATH_SUBSYSTEM@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_path_is_empty
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_17
LBB0_2:
Lloh5:
	adrp	x8, _runloop_system@GOTPAGE
Lloh6:
	ldr	x8, [x8, _runloop_system@GOTPAGEOFF]
	ldp	w20, w19, [x8]
	ldr	w0, [x21]
	bl	_path_get
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_libretro_find_subsystem_info
	cbz	x0, LBB0_12
; %bb.3:
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh7:
	adrp	x8, _subsystem_fullpaths@GOTPAGE
Lloh8:
	ldr	x8, [x8, _subsystem_fullpaths@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldr	w1, [x8, #8]
	bl	_MIN
	cbz	w0, LBB0_12
; %bb.4:
	mov	x28, #0
	mov	w8, w0
	stur	x8, [x29, #-136]                ; 8-byte Folded Spill
	ldr	x8, [x19]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x28, x28, #1
	ldur	x9, [x29, #-136]                ; 8-byte Folded Reload
	cmp	x28, x9
	b.eq	LBB0_12
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	lsl	x9, x28, #4
	stur	x9, [x29, #-128]                ; 8-byte Folded Spill
	ldr	w9, [x8, x9]
	cbz	w9, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, #0
	mov	x27, #0
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	sub	x2, x29, #120
	mov	x0, x22
	mov	x1, x23
	mov	x3, x24
	bl	_fill_pathname
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
Lloh10:
	adrp	x8, _MSG_REDIRECTING_SAVEFILE_TO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_REDIRECTING_SAVEFILE_TO@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x22
	bl	_RARCH_LOG
	add	x8, x20, x21
	ldr	w23, [x8, #8]
	bl	_savefile_ptr_get
	mov	x1, x22
	mov	x2, x23
	bl	_string_list_append
	mov	x0, x22
	bl	_free
	mov	sp, x26
	add	x27, x27, #1
	ldr	x8, [x19]
	ldur	x9, [x29, #-128]                ; 8-byte Folded Reload
	ldr	w9, [x8, x9]
	add	x21, x21, #4
	cmp	x27, x9
	b.hs	LBB0_5
LBB0_10:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x26, sp
Lloh15:
	adrp	x12, _PATH_MAX_LENGTH@GOTPAGE
Lloh16:
	ldr	x12, [x12, _PATH_MAX_LENGTH@GOTPAGEOFF]
	ldr	w25, [x12]
	mov	x9, x25
Lloh17:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh18:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x25, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	ldr	w0, [x12]
	sxtw	x24, w0
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_malloc
	mov	x22, x0
	ldr	x8, [x19]
	add	x8, x8, x28, lsl #4
	ldr	x20, [x8, #8]
	sturb	wzr, [x29, #-120]
	strb	wzr, [x0]
	ldr	x3, [x20, x21]
	sub	x0, x29, #120
	mov	w1, #32
Lloh19:
	adrp	x2, l_.str@PAGE
Lloh20:
	add	x2, x2, l_.str@PAGEOFF
	bl	_snprintf
Lloh21:
	adrp	x8, _subsystem_fullpaths@GOTPAGE
Lloh22:
	ldr	x8, [x8, _subsystem_fullpaths@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x1, [x8, x28, lsl #3]
	mov	x0, x23
	mov	x2, x25
	bl	_strlcpy
	mov	x0, x23
	bl	_path_remove_extension
Lloh24:
	adrp	x25, _RARCH_DIR_CURRENT_SAVEFILE@GOTPAGE
Lloh25:
	ldr	x25, [x25, _RARCH_DIR_CURRENT_SAVEFILE@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_dir_get
	bl	_path_is_directory
	cbz	x0, LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w0, [x25]
	bl	_dir_get
	mov	x1, x0
	mov	x0, x22
	mov	x2, x24
	bl	_strlcpy
	sub	x2, x29, #120
	mov	x0, x22
	mov	x1, x23
	mov	x3, x24
	bl	_fill_pathname_dir
	b	LBB0_9
LBB0_12:
Lloh26:
	adrp	x8, _RARCH_OVERRIDE_SETTING_SAVE_PATH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RARCH_OVERRIDE_SETTING_SAVE_PATH@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_retroarch_override_setting_is_set
Lloh29:
	adrp	x19, _g_extern@GOTPAGE
Lloh30:
	ldr	x19, [x19, _g_extern@GOTPAGEOFF]
Lloh31:
	adrp	x20, _path_main_basename@GOTPAGE
Lloh32:
	ldr	x20, [x20, _path_main_basename@GOTPAGEOFF]
	cbnz	w0, LBB0_14
; %bb.13:
	ldr	x0, [x19]
	ldr	x1, [x20]
Lloh33:
	adrp	x2, l_.str.2@PAGE
Lloh34:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w3, #8
	bl	_fill_pathname_noext
LBB0_14:
	ldr	x0, [x19]
	bl	_path_is_directory
	cbz	x0, LBB0_16
; %bb.15:
	ldr	x0, [x19]
	ldr	x1, [x20]
Lloh35:
	adrp	x2, l_.str.2@PAGE
Lloh36:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w3, #8
	bl	_fill_pathname_dir
Lloh37:
	adrp	x8, _MSG_REDIRECTING_SAVEFILE_TO@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MSG_REDIRECTING_SAVEFILE_TO@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
	ldr	x2, [x19]
Lloh40:
	adrp	x0, l_.str.1@PAGE
Lloh41:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_LOG
LBB0_16:
	mov	w0, #1
LBB0_17:
	ldur	x8, [x29, #-88]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_19
; %bb.18:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_19:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_g_extern,8,3                   ; @g_extern
	.comm	_runloop_system,8,2             ; @runloop_system
	.comm	_RARCH_PATH_SUBSYSTEM,4,2       ; @RARCH_PATH_SUBSYSTEM
	.comm	_subsystem_fullpaths,8,3        ; @subsystem_fullpaths
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".%s"

	.comm	_RARCH_DIR_CURRENT_SAVEFILE,4,2 ; @RARCH_DIR_CURRENT_SAVEFILE
l_.str.1:                               ; @.str.1
	.asciz	"%s \"%s\".\n"

	.comm	_MSG_REDIRECTING_SAVEFILE_TO,4,2 ; @MSG_REDIRECTING_SAVEFILE_TO
	.comm	_RARCH_OVERRIDE_SETTING_SAVE_PATH,4,2 ; @RARCH_OVERRIDE_SETTING_SAVE_PATH
	.comm	_path_main_basename,8,3         ; @path_main_basename
l_.str.2:                               ; @.str.2
	.asciz	".srm"

	.no_dead_strip	_path_init_subsystem
.subsections_via_symbols
