	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function command_event_load_auto_state
_command_event_load_auto_state:         ## @command_event_load_auto_state
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_configuration_settings@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$0, (%rax)
	je	LBB0_4
## %bb.1:
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	%eax, %rbx
	movl	%ebx, %edi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, %r14
	movq	_g_extern@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rcx
	callq	_fill_pathname_noext
	movq	%r14, %rdi
	callq	_path_is_valid
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_content_load_state
	movl	%eax, %ebx
	movq	_MSG_FOUND_AUTO_SAVESTATE_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movl	%eax, %r15d
	movq	_MSG_AUTOLOADING_SAVESTATE_FROM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	testl	%ebx, %ebx
	leaq	L_.str.3(%rip), %rcx
	leaq	L_.str.2(%rip), %r9
	cmoveq	%rcx, %r9
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movq	%r14, %rdx
	movl	%eax, %ecx
	movq	%r14, %r8
	callq	_RARCH_LOG
LBB0_3:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.comm	_configuration_settings,8,3     ## @configuration_settings
	.comm	_g_extern,4,2                   ## @g_extern
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".auto"

L_.str.1:                               ## @.str.1
	.asciz	"%s: %s\n%s \"%s\" %s.\n"

	.comm	_MSG_FOUND_AUTO_SAVESTATE_IN,4,2 ## @MSG_FOUND_AUTO_SAVESTATE_IN
	.comm	_MSG_AUTOLOADING_SAVESTATE_FROM,4,2 ## @MSG_AUTOLOADING_SAVESTATE_FROM
L_.str.2:                               ## @.str.2
	.asciz	"succeeded"

L_.str.3:                               ## @.str.3
	.asciz	"failed"

	.comm	_RARCH_NETPLAY_CTL_IS_ENABLED,4,2 ## @RARCH_NETPLAY_CTL_IS_ENABLED
	.comm	_rcheevos_hardcore_active,8,3   ## @rcheevos_hardcore_active
	.no_dead_strip	_command_event_load_auto_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function command_event_load_auto_state
_command_event_load_auto_state:         ; @command_event_load_auto_state
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _configuration_settings@GOTPAGE
Lloh1:
	ldr	x8, [x8, _configuration_settings@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _PATH_MAX_LENGTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	sxtw	x20, w0
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #1
	bl	_calloc
	mov	x19, x0
Lloh6:
	adrp	x8, _g_extern@GOTPAGE
Lloh7:
	ldr	x8, [x8, _g_extern@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x20
	bl	_fill_pathname_noext
	mov	x0, x19
	bl	_path_is_valid
	cbz	w0, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	bl	_content_load_state
	mov	x20, x0
Lloh11:
	adrp	x8, _MSG_FOUND_AUTO_SAVESTATE_IN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSG_FOUND_AUTO_SAVESTATE_IN@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x21, x0
Lloh14:
	adrp	x8, _MSG_AUTOLOADING_SAVESTATE_FROM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_AUTOLOADING_SAVESTATE_FROM@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x3, x0
Lloh17:
	adrp	x8, l_.str.2@PAGE
Lloh18:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh19:
	adrp	x9, l_.str.3@PAGE
Lloh20:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w20, #0
	csel	x5, x9, x8, eq
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	mov	x4, x19
	bl	_RARCH_LOG
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_free
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.comm	_configuration_settings,8,3     ; @configuration_settings
	.comm	_g_extern,4,2                   ; @g_extern
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".auto"

l_.str.1:                               ; @.str.1
	.asciz	"%s: %s\n%s \"%s\" %s.\n"

	.comm	_MSG_FOUND_AUTO_SAVESTATE_IN,4,2 ; @MSG_FOUND_AUTO_SAVESTATE_IN
	.comm	_MSG_AUTOLOADING_SAVESTATE_FROM,4,2 ; @MSG_AUTOLOADING_SAVESTATE_FROM
l_.str.2:                               ; @.str.2
	.asciz	"succeeded"

l_.str.3:                               ; @.str.3
	.asciz	"failed"

	.comm	_RARCH_NETPLAY_CTL_IS_ENABLED,4,2 ; @RARCH_NETPLAY_CTL_IS_ENABLED
	.comm	_rcheevos_hardcore_active,8,3   ; @rcheevos_hardcore_active
	.no_dead_strip	_command_event_load_auto_state
.subsections_via_symbols
