	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	_g_argv@GOTPCREL(%rip), %rax
	movq	%rsi, (%rax)
	xorl	%eax, %eax
	callq	_plat_early_init
	xorl	%eax, %eax
	callq	_in_init
	xorl	%eax, %eax
	callq	_plat_target_init
	xorl	%eax, %eax
	callq	_plat_init
	xorl	%eax, %eax
	callq	_emu_prep_defconfig
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_emu_read_config
	xorl	%eax, %eax
	callq	_emu_init
	xorl	%eax, %eax
	callq	_menu_init
	movq	_engineState@GOTPCREL(%rip), %r12
	movl	$133, (%r12)
	cmpl	$2, %r15d
	jl	LBB0_5
## %bb.1:
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_parse_cmd_line
	cmpl	$131, (%r12)
	jne	LBB0_5
## %bb.2:
	movq	_rom_fname_reload@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_emu_reload_rom
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	$129, (%r12)
	movq	_load_state_slot@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	js	LBB0_5
## %bb.4:
	movq	_state_slot@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	$1, %edi
	xorl	%esi, %esi
	callq	_emu_save_load_game
LBB0_5:
	leaq	LJTI0_0(%rip), %rbx
	movq	_rom_fname_reload@GOTPCREL(%rip), %r15
	leaq	L_str(%rip), %r14
	jmp	LBB0_6
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	$129, (%r12)
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_emu_loop
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	leal	-128(%rsi), %eax
	cmpl	$5, %eax
	ja	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movslq	(%rbx,%rax,4), %rax
	addq	%rbx, %rax
	jmpq	*%rax
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_menu_loop_tray
	jmp	LBB0_6
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r15), %edi
	callq	_emu_reload_rom
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$129, (%r12)
	jmp	LBB0_6
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_menu_loop
	jmp	LBB0_6
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	_puts
	movl	$133, (%r12)
	jmp	LBB0_6
LBB0_15:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_printf
LBB0_16:
	xorl	%eax, %eax
	callq	_emu_finish
	xorl	%eax, %eax
	callq	_plat_finish
	xorl	%eax, %eax
	callq	_plat_target_finish
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_14
	.long	L0_0_set_13
	.long	L0_0_set_10
	.long	L0_0_set_16
	.long	L0_0_set_8
	.end_data_region
                                        ## -- End function
	.comm	_g_argv,8,3                     ## @g_argv
	.comm	_engineState,4,2                ## @engineState
	.comm	_rom_fname_reload,4,2           ## @rom_fname_reload
	.comm	_load_state_slot,8,3            ## @load_state_slot
	.comm	_state_slot,8,3                 ## @state_slot
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"engine got into unknown state (%i), exitting\n"

L_str:                                  ## @str
	.asciz	"PGS_ReloadRom == 0"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _g_argv@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_argv@GOTPAGEOFF]
Lloh2:
	str	x1, [x8]
	bl	_plat_early_init
	bl	_in_init
	bl	_plat_target_init
	bl	_plat_init
	bl	_emu_prep_defconfig
	mov	x0, #0
	mov	w1, #0
	bl	_emu_read_config
	bl	_emu_init
	bl	_menu_init
Lloh3:
	adrp	x21, _engineState@GOTPAGE
Lloh4:
	ldr	x21, [x21, _engineState@GOTPAGEOFF]
	mov	w22, #133
	str	w22, [x21]
Lloh5:
	adrp	x23, _rom_fname_reload@GOTPAGE
Lloh6:
	ldr	x23, [x23, _rom_fname_reload@GOTPAGEOFF]
	cmp	w20, #2
	b.lt	LBB0_5
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_parse_cmd_line
	ldr	w8, [x21]
	cmp	w8, #131
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x23]
	bl	_emu_reload_rom
	cbz	x0, LBB0_5
; %bb.3:
	mov	w8, #129
	str	w8, [x21]
Lloh7:
	adrp	x8, _load_state_slot@GOTPAGE
Lloh8:
	ldr	x8, [x8, _load_state_slot@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	tbnz	x8, #63, LBB0_5
; %bb.4:
Lloh10:
	adrp	x9, _state_slot@GOTPAGE
Lloh11:
	ldr	x9, [x9, _state_slot@GOTPAGEOFF]
Lloh12:
	str	x8, [x9]
	mov	w0, #1
	mov	w1, #0
	bl	_emu_save_load_game
LBB0_5:
Lloh13:
	adrp	x20, lJTI0_0@PAGE
Lloh14:
	add	x20, x20, lJTI0_0@PAGEOFF
	mov	w24, #129
Lloh15:
	adrp	x19, l_str@PAGE
Lloh16:
	add	x19, x19, l_str@PAGEOFF
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	str	w24, [x21]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	bl	_emu_loop
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	sub	w9, w8, #128
	cmp	w9, #5
	b.hi	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	adr	x8, LBB0_6
	ldrb	w10, [x20, x9]
	add	x8, x8, x10, lsl #2
	br	x8
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_menu_loop_tray
	b	LBB0_8
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x23]
	bl	_emu_reload_rom
	cbz	x0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	str	w24, [x21]
	b	LBB0_8
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_menu_loop
	b	LBB0_8
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	bl	_puts
	str	w22, [x21]
	b	LBB0_8
LBB0_15:
	str	x8, [sp]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
LBB0_16:
	bl	_emu_finish
	bl	_plat_finish
	bl	_plat_target_finish
	mov	w0, #0
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_7-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_16-LBB0_6)>>2
	.byte	(LBB0_13-LBB0_6)>>2
                                        ; -- End function
	.comm	_g_argv,8,3                     ; @g_argv
	.comm	_engineState,4,2                ; @engineState
	.comm	_rom_fname_reload,4,2           ; @rom_fname_reload
	.comm	_load_state_slot,8,3            ; @load_state_slot
	.comm	_state_slot,8,3                 ; @state_slot
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"engine got into unknown state (%i), exitting\n"

l_str:                                  ; @str
	.asciz	"PGS_ReloadRom == 0"

.subsections_via_symbols
