	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function command_event_save_auto_state
_command_event_save_auto_state:         ## @command_event_save_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
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	cmpl	$0, (%rax)
	je	LBB0_5
## %bb.2:
	movq	_current_core_type@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CORE_TYPE_DUMMY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %r14
	movslq	(%r14), %r15
	movq	_RARCH_PATH_BASENAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_path_get
	movl	%eax, %edi
	callq	_path_basename
	movl	%eax, %edi
	callq	_string_is_empty
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	movl	$1, %ebx
	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	%r15, %rcx
	callq	_fill_pathname_noext
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_content_save_state
	movl	%eax, %r15d
	movq	_MSG_AUTO_SAVE_STATE_TO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	testl	%r15d, %r15d
	leaq	L_.str.3(%rip), %rdx
	leaq	L_.str.2(%rip), %rcx
	cmoveq	%rdx, %rcx
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_RARCH_LOG
	movq	%r14, %rdi
	callq	_free
LBB0_5:
	movl	%ebx, %eax
	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
	.comm	_current_core_type,8,3          ## @current_core_type
	.comm	_CORE_TYPE_DUMMY,8,3            ## @CORE_TYPE_DUMMY
	.comm	_RARCH_PATH_BASENAME,4,2        ## @RARCH_PATH_BASENAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".auto"

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

	.comm	_MSG_AUTO_SAVE_STATE_TO,4,2     ## @MSG_AUTO_SAVE_STATE_TO
L_.str.2:                               ## @.str.2
	.asciz	"succeeded"

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

	.comm	_rcheevos_hardcore_active,8,3   ## @rcheevos_hardcore_active
	.no_dead_strip	_command_event_save_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_save_auto_state
_command_event_save_auto_state:         ; @command_event_save_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]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _current_core_type@GOTPAGE
Lloh4:
	ldr	x8, [x8, _current_core_type@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _CORE_TYPE_DUMMY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CORE_TYPE_DUMMY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.3:
Lloh9:
	adrp	x19, _PATH_MAX_LENGTH@GOTPAGE
Lloh10:
	ldr	x19, [x19, _PATH_MAX_LENGTH@GOTPAGEOFF]
	ldrsw	x20, [x19]
Lloh11:
	adrp	x8, _RARCH_PATH_BASENAME@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RARCH_PATH_BASENAME@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_path_get
	bl	_path_basename
	bl	_string_is_empty
	cbz	x0, LBB0_6
LBB0_4:
	mov	w19, #0
LBB0_5:
	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
	ret
LBB0_6:
	ldr	w0, [x19]
	mov	w19, #1
	mov	w1, #1
	bl	_calloc
	mov	x21, x0
Lloh14:
	adrp	x8, _g_extern@GOTPAGE
Lloh15:
	ldr	x8, [x8, _g_extern@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x20
	bl	_fill_pathname_noext
	mov	x0, x21
	mov	w1, #1
	mov	w2, #1
	bl	_content_save_state
	mov	x20, x0
Lloh19:
	adrp	x8, _MSG_AUTO_SAVE_STATE_TO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MSG_AUTO_SAVE_STATE_TO@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
Lloh22:
	adrp	x8, l_.str.2@PAGE
Lloh23:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh24:
	adrp	x9, l_.str.3@PAGE
Lloh25:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w20, #0
	csel	x3, x9, x8, eq
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_RARCH_LOG
	mov	x0, x21
	bl	_free
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.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
	.comm	_current_core_type,8,3          ; @current_core_type
	.comm	_CORE_TYPE_DUMMY,8,3            ; @CORE_TYPE_DUMMY
	.comm	_RARCH_PATH_BASENAME,4,2        ; @RARCH_PATH_BASENAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".auto"

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

	.comm	_MSG_AUTO_SAVE_STATE_TO,4,2     ; @MSG_AUTO_SAVE_STATE_TO
l_.str.2:                               ; @.str.2
	.asciz	"succeeded"

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

	.comm	_rcheevos_hardcore_active,8,3   ; @rcheevos_hardcore_active
	.no_dead_strip	_command_event_save_auto_state
.subsections_via_symbols
