	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_default_config_file
_open_default_config_file:              ## @open_default_config_file
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movslq	%eax, %r12
	movl	%r12d, %edi
	callq	_malloc
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_malloc
	movq	%rax, %r13
	movl	(%rbx), %edi
	callq	_malloc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movb	$0, (%rax)
	movb	$0, (%r13)
	movb	$0, (%r14)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_fill_pathname_application_data
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_FILE_PATH_MAIN_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_file_path_str
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%rax, %rdx
	movq	%r12, %rcx
	callq	_fill_pathname_join
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_RARCH_LOG
	movq	%r13, %rdi
	callq	_config_file_new_from_path_to_string
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_15
LBB0_2:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r12, %rcx
	callq	_fill_pathname_join
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	callq	_RARCH_LOG
	movq	%r13, %rdi
	callq	_config_file_new_from_path_to_string
	movq	%rax, %rbx
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	testq	%rbx, %rbx
	jne	LBB0_14
## %bb.6:
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.7:
	movl	(%rax), %edi
	callq	_malloc
	movq	%rax, %rbx
	movb	$0, (%rax)
	movq	%r13, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_strlcpy
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_fill_pathname_basedir
	movq	_FILE_PATH_MAIN_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_file_path_str
	movq	%r13, %rdi
	movq	%r13, %rsi
	movq	%rax, %rdx
	movq	%r12, %rcx
	callq	_fill_pathname_join
	movq	%rbx, %rdi
	callq	_path_mkdir
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_free
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.8:
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_malloc
	movq	%rax, %r15
	movb	$0, (%rax)
	movq	_GLOBAL_CONFIG_DIR@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_FILE_PATH_MAIN_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_file_path_str
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	movq	%r12, %rcx
	callq	_fill_pathname_join
	movq	%r15, %rdi
	callq	_config_file_new_from_path_to_string
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movq	%rax, %rbx
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	callq	_RARCH_WARN
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_10
LBB0_14:
	testq	%rbx, %rbx
	jne	LBB0_15
	jmp	LBB0_17
LBB0_12:
	xorl	%eax, %eax
	callq	_config_file_new_alloc
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_free
	testq	%rbx, %rbx
	je	LBB0_13
LBB0_10:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_config_set_bool
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	$1, %edx
	callq	_config_file_write
	testl	%eax, %eax
	je	LBB0_16
## %bb.11:
	leaq	L_.str.6(%rip), %rdi
	movq	%r13, %rsi
	callq	_RARCH_WARN
LBB0_15:
	movq	_RARCH_PATH_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_path_set
	jmp	LBB0_18
LBB0_16:
	leaq	L_.str.5(%rip), %rdi
	movq	%r13, %rsi
	callq	_RARCH_ERR
	movq	%rbx, %rdi
	callq	_config_file_free
	jmp	LBB0_17
LBB0_13:
	leaq	L_.str.5(%rip), %rdi
	movq	%r13, %rsi
	callq	_RARCH_ERR
LBB0_17:
	xorl	%ebx, %ebx
LBB0_18:
	movq	%r14, %rdi
	callq	_free
	movq	%r13, %rdi
	callq	_free
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.comm	_FILE_PATH_MAIN_CONFIG,4,2      ## @FILE_PATH_MAIN_CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Looking for config in: \"%s\".\n"

L_.str.1:                               ## @.str.1
	.asciz	"HOME"

L_.str.2:                               ## @.str.2
	.asciz	".retroarch.cfg"

	.comm	_GLOBAL_CONFIG_DIR,8,3          ## @GLOBAL_CONFIG_DIR
L_.str.3:                               ## @.str.3
	.asciz	"Config: using skeleton config \"%s\" as base for a new config file.\n"

L_.str.4:                               ## @.str.4
	.asciz	"config_save_on_exit"

L_.str.5:                               ## @.str.5
	.asciz	"Failed to create new config file in: \"%s\".\n"

L_.str.6:                               ## @.str.6
	.asciz	"Config: Created new config file in: \"%s\".\n"

	.comm	_RARCH_PATH_CONFIG,4,2          ## @RARCH_PATH_CONFIG
	.no_dead_strip	_open_default_config_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_default_config_file
_open_default_config_file:              ; @open_default_config_file
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x25, _PATH_MAX_LENGTH@GOTPAGE
Lloh1:
	ldr	x25, [x25, _PATH_MAX_LENGTH@GOTPAGEOFF]
	ldr	w0, [x25]
	sxtw	x22, w0
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_malloc
	mov	x19, x0
	ldr	w0, [x25]
	bl	_malloc
	mov	x20, x0
	ldr	w0, [x25]
	bl	_malloc
	mov	x21, x0
	strb	wzr, [x0]
	strb	wzr, [x20]
	strb	wzr, [x19]
	mov	x0, x19
	mov	x1, x22
	bl	_fill_pathname_application_data
	mov	x24, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _FILE_PATH_MAIN_CONFIG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FILE_PATH_MAIN_CONFIG@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_file_path_str
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	mov	x3, x22
	bl	_fill_pathname_join
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_RARCH_LOG
	mov	x0, x20
	bl	_config_file_new_from_path_to_string
	mov	x23, x0
	cbnz	x0, LBB0_13
LBB0_2:
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_4
; %bb.3:
	mov	x1, x0
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x3, x22
	bl	_fill_pathname_join
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_RARCH_LOG
	mov	x0, x20
	bl	_config_file_new_from_path_to_string
	mov	x23, x0
	cbz	x23, LBB0_5
	b	LBB0_9
LBB0_4:
	mov	x23, #0
	cbnz	x23, LBB0_9
LBB0_5:
	cbz	w24, LBB0_9
; %bb.6:
	ldr	w0, [x25]
	bl	_malloc
	mov	x23, x0
	strb	wzr, [x0]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	bl	_strlcpy
	mov	x0, x23
	mov	x1, x20
	mov	x2, x22
	bl	_fill_pathname_basedir
Lloh13:
	adrp	x26, _FILE_PATH_MAIN_CONFIG@GOTPAGE
Lloh14:
	ldr	x26, [x26, _FILE_PATH_MAIN_CONFIG@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_file_path_str
	mov	x2, x0
	mov	x0, x20
	mov	x1, x20
	mov	x3, x22
	bl	_fill_pathname_join
	mov	x0, x23
	bl	_path_mkdir
	mov	x24, x0
	mov	x0, x23
	bl	_free
	cbz	w24, LBB0_15
; %bb.7:
	ldr	w0, [x25]
	bl	_malloc
	mov	x24, x0
	strb	wzr, [x0]
Lloh15:
	adrp	x8, _GLOBAL_CONFIG_DIR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _GLOBAL_CONFIG_DIR@GOTPAGEOFF]
Lloh17:
	ldr	x23, [x8]
	ldr	w0, [x26]
	bl	_file_path_str
	mov	x2, x0
	mov	x0, x24
	mov	x1, x23
	mov	x3, x22
	bl	_fill_pathname_join
	mov	x0, x24
	bl	_config_file_new_from_path_to_string
	cbz	x0, LBB0_10
; %bb.8:
	mov	x23, x0
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x24
	bl	_RARCH_WARN
	mov	x0, x24
	bl	_free
	b	LBB0_11
LBB0_9:
	cbnz	x23, LBB0_13
	b	LBB0_16
LBB0_10:
	bl	_config_file_new_alloc
	mov	x23, x0
	mov	x0, x24
	bl	_free
	cbz	x23, LBB0_17
LBB0_11:
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x23
	mov	w2, #1
	bl	_config_set_bool
	mov	x0, x23
	mov	x1, x20
	mov	w2, #1
	bl	_config_file_write
	cbz	w0, LBB0_14
; %bb.12:
Lloh22:
	adrp	x0, l_.str.6@PAGE
Lloh23:
	add	x0, x0, l_.str.6@PAGEOFF
	mov	x1, x20
	bl	_RARCH_WARN
LBB0_13:
Lloh24:
	adrp	x8, _RARCH_PATH_CONFIG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RARCH_PATH_CONFIG@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_path_set
	b	LBB0_16
LBB0_14:
Lloh27:
	adrp	x0, l_.str.5@PAGE
Lloh28:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x20
	bl	_RARCH_ERR
	mov	x0, x23
	bl	_config_file_free
LBB0_15:
	mov	x23, #0
LBB0_16:
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_free
	mov	x0, x21
	bl	_free
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh29:
	adrp	x0, l_.str.5@PAGE
Lloh30:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	x1, x20
	bl	_RARCH_ERR
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.comm	_FILE_PATH_MAIN_CONFIG,4,2      ; @FILE_PATH_MAIN_CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Looking for config in: \"%s\".\n"

l_.str.1:                               ; @.str.1
	.asciz	"HOME"

l_.str.2:                               ; @.str.2
	.asciz	".retroarch.cfg"

	.comm	_GLOBAL_CONFIG_DIR,8,3          ; @GLOBAL_CONFIG_DIR
l_.str.3:                               ; @.str.3
	.asciz	"Config: using skeleton config \"%s\" as base for a new config file.\n"

l_.str.4:                               ; @.str.4
	.asciz	"config_save_on_exit"

l_.str.5:                               ; @.str.5
	.asciz	"Failed to create new config file in: \"%s\".\n"

l_.str.6:                               ; @.str.6
	.asciz	"Config: Created new config file in: \"%s\".\n"

	.comm	_RARCH_PATH_CONFIG,4,2          ; @RARCH_PATH_CONFIG
	.no_dead_strip	_open_default_config_file
.subsections_via_symbols
