	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function command_event_main_state
_command_event_main_state:              ## @command_event_main_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	%r12
	pushq	%rbx
	subq	$160, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	$16384, %edi                    ## imm = 0x4000
	callq	_malloc
	movq	%rax, %r15
	movb	$0, -176(%rbp)
	movb	$0, (%rax)
	movq	_configuration_settings@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	8(%rax), %r8d
	movq	_g_extern@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testl	%r8d, %r8d
	jle	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdx
	movl	$16384, %esi                    ## imm = 0x4000
	movq	%r15, %rdi
	callq	_snprintf
	jmp	LBB0_5
LBB0_2:
	js	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%rcx, %rsi
	movl	$16384, %edx                    ## imm = 0x4000
	callq	_strlcpy
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdx
	movl	$16384, %r8d                    ## imm = 0x4000
	movq	%r15, %rdi
	movq	%rcx, %rsi
	movl	$46, %ecx
	callq	_fill_pathname_join_delim
LBB0_5:
	leaq	-184(%rbp), %rdi
	callq	_core_serialize_size
	cmpq	$0, -184(%rbp)
	je	LBB0_9
## %bb.6:
	addl	$-128, %ebx
	cmpl	$3, %ebx
	ja	LBB0_10
## %bb.7:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_8:
	leaq	-176(%rbp), %rdi
	movl	$128, %esi
	callq	_command_event_undo_save_state
	jmp	LBB0_12
LBB0_9:
	movq	_MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	-176(%rbp), %rdi
	movq	%rax, %rsi
	movl	$128, %edx
	callq	_strlcpy
LBB0_10:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_11:
	leaq	-176(%rbp), %rdi
	movl	$128, %esi
	callq	_command_event_undo_load_state
LBB0_12:
	movl	$1, %r14d
LBB0_13:
	movq	_MESSAGE_QUEUE_ICON_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MESSAGE_QUEUE_CATEGORY_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	-176(%rbp), %rdi
	movl	$2, %esi
	movl	$180, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_runloop_msg_queue_push
LBB0_14:
	leaq	L_.str.2(%rip), %rdi
	leaq	-176(%rbp), %rsi
	callq	_RARCH_LOG
	movq	%r15, %rdi
	callq	_free
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_20
## %bb.15:
	movl	%r14d, %eax
	addq	$160, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	$1, %r14d
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_content_save_state
	movq	(%r12), %rax
	cmpl	$0, 4(%rax)
	jne	LBB0_19
	jmp	LBB0_14
LBB0_17:
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_content_load_state
	testl	%eax, %eax
	je	LBB0_14
## %bb.18:
	movq	(%r12), %rax
	movl	$1, %r14d
	cmpl	$0, (%rax)
	je	LBB0_14
LBB0_19:
	movq	_video_driver_frame_time_count@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	jmp	LBB0_14
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_11
	.long	L0_0_set_16
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_g_extern,8,3                   ## @g_extern
	.comm	_configuration_settings,8,3     ## @configuration_settings
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%d"

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

	.comm	_video_driver_frame_time_count,4,2 ## @video_driver_frame_time_count
	.comm	_MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES,4,2 ## @MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES
	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ## @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ## @MESSAGE_QUEUE_CATEGORY_INFO
L_.str.2:                               ## @.str.2
	.asciz	"%s\n"

	.comm	_RARCH_NETPLAY_CTL_LOAD_SAVESTATE,4,2 ## @RARCH_NETPLAY_CTL_LOAD_SAVESTATE
	.comm	_rcheevos_hardcore_active,4,2   ## @rcheevos_hardcore_active
	.comm	_rcheevos_state_loaded_flag,4,2 ## @rcheevos_state_loaded_flag
	.no_dead_strip	_command_event_main_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_main_state
_command_event_main_state:              ; @command_event_main_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	w0, #16384
	bl	_malloc
	mov	x19, x0
	strb	wzr, [sp, #8]
	strb	wzr, [x0]
Lloh3:
	adrp	x21, _configuration_settings@GOTPAGE
Lloh4:
	ldr	x21, [x21, _configuration_settings@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w4, [x8, #8]
Lloh5:
	adrp	x8, _g_extern@GOTPAGE
Lloh6:
	ldr	x8, [x8, _g_extern@GOTPAGEOFF]
Lloh7:
	ldr	x3, [x8]
	cmp	w4, #1
	b.lt	LBB0_2
; %bb.1:
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #16384
	bl	_snprintf
	b	LBB0_5
LBB0_2:
	tbnz	w4, #31, LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x3
	mov	w2, #16384
	bl	_strlcpy
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x2, l_.str.1@PAGE
Lloh11:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x3
	mov	w3, #46
	mov	w4, #16384
	bl	_fill_pathname_join_delim
LBB0_5:
	mov	x0, sp
	bl	_core_serialize_size
	ldr	x8, [sp]
	cbz	x8, LBB0_9
; %bb.6:
	sub	w8, w20, #128
	cmp	w8, #3
	b.hi	LBB0_10
; %bb.7:
Lloh12:
	adrp	x9, lJTI0_0@PAGE
Lloh13:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_8
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_8:
	add	x0, sp, #8
	mov	w1, #128
	bl	_command_event_undo_save_state
	b	LBB0_12
LBB0_9:
Lloh14:
	adrp	x8, _MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
	add	x0, sp, #8
	mov	w2, #128
	bl	_strlcpy
LBB0_10:
	mov	w20, #0
	b	LBB0_13
LBB0_11:
	add	x0, sp, #8
	mov	w1, #128
	bl	_command_event_undo_load_state
LBB0_12:
	mov	w20, #1
LBB0_13:
Lloh17:
	adrp	x8, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGEOFF]
Lloh19:
	ldr	w5, [x8]
Lloh20:
	adrp	x8, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGEOFF]
Lloh22:
	ldr	w6, [x8]
	add	x0, sp, #8
	mov	w1, #2
	mov	w2, #180
	mov	w3, #1
	mov	x4, #0
	bl	_runloop_msg_queue_push
LBB0_14:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #8
	bl	_RARCH_LOG
	mov	x0, x19
	bl	_free
	ldur	x8, [x29, #-40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.15:
	mov	x0, x20
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_16:
	mov	w20, #1
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_content_save_state
	ldr	x8, [x21]
	ldr	w8, [x8, #4]
	cbnz	w8, LBB0_19
	b	LBB0_14
LBB0_17:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_content_load_state
	cbz	w0, LBB0_20
; %bb.18:
	ldr	x8, [x21]
	ldr	w8, [x8]
	cbz	w8, LBB0_21
LBB0_19:
Lloh28:
	adrp	x8, _video_driver_frame_time_count@GOTPAGE
Lloh29:
	ldr	x8, [x8, _video_driver_frame_time_count@GOTPAGEOFF]
Lloh30:
	str	wzr, [x8]
	mov	w20, #1
	b	LBB0_14
LBB0_20:
	mov	w20, #0
	b	LBB0_14
LBB0_21:
	mov	w20, #1
	b	LBB0_14
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_8)>>2
	.byte	(LBB0_11-LBB0_8)>>2
	.byte	(LBB0_16-LBB0_8)>>2
	.byte	(LBB0_17-LBB0_8)>>2
                                        ; -- End function
	.comm	_g_extern,8,3                   ; @g_extern
	.comm	_configuration_settings,8,3     ; @configuration_settings
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%d"

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

	.comm	_video_driver_frame_time_count,4,2 ; @video_driver_frame_time_count
	.comm	_MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES,4,2 ; @MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES
	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ; @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ; @MESSAGE_QUEUE_CATEGORY_INFO
l_.str.2:                               ; @.str.2
	.asciz	"%s\n"

	.comm	_RARCH_NETPLAY_CTL_LOAD_SAVESTATE,4,2 ; @RARCH_NETPLAY_CTL_LOAD_SAVESTATE
	.comm	_rcheevos_hardcore_active,4,2   ; @rcheevos_hardcore_active
	.comm	_rcheevos_state_loaded_flag,4,2 ; @rcheevos_state_loaded_flag
	.no_dead_strip	_command_event_main_state
.subsections_via_symbols
