	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mainmenu                       ## -- Begin function mainmenu
	.p2align	4, 0x90
_mainmenu:                              ## @mainmenu
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	_config@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	xorl	%edi, %edi
	callq	_slot_autosave
	movq	_menu_main@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_1
LBB0_7:
	movq	%r15, %rdi
	callq	_GUI_InitMenu
	movq	%r15, %rdi
	movl	$10, %esi
	xorl	%edx, %edx
	callq	_GUI_DrawMenuFX
	leaq	LJTI0_0(%rip), %r12
	movq	_system_hw@GOTPCREL(%rip), %r14
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_8
LBB0_22:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_gx_input_FindDevices
	testl	%eax, %eax
	jne	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_8 Depth=1
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_GUI_WaitPrompt
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_GUI_RunMenu
                                        ## kill: def $eax killed $eax def $rax
	incl	%eax
	cmpl	$10, %eax
	ja	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movslq	(%r12,%rax,4), %rax
	addq	%r12, %rax
	jmpq	*%rax
LBB0_39:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpl	$0, (%r14)
	je	LBB0_8
## %bb.40:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_gx_input_FindDevices
	testl	%eax, %eax
	je	LBB0_23
	jmp	LBB0_41
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movl	$30, %esi
	movl	$1, %edx
	callq	_GUI_DrawMenuFX
	movq	%r15, %rdi
	callq	_GUI_DeleteMenu
	xorl	%eax, %eax
	callq	_loadgamemenu
	testl	%eax, %eax
	je	LBB0_30
## %bb.16:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_reloadrom
	xorl	%eax, %eax
	callq	_gx_input_FindDevices
	testl	%eax, %eax
	je	LBB0_17
	jmp	LBB0_10
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movl	$30, %esi
	movl	$1, %edx
	callq	_GUI_DrawMenuFX
	movq	%r15, %rdi
	callq	_GUI_DeleteMenu
	xorl	%eax, %eax
	callq	_optionmenu
	jmp	LBB0_30
LBB0_19:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_exitmenu
	jmp	LBB0_8
LBB0_20:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movl	$30, %esi
	movl	$1, %edx
	callq	_GUI_DrawMenuFX
	movq	%r15, %rdi
	callq	_GUI_DeleteMenu
	xorl	%eax, %eax
	callq	_savemenu
	testl	%eax, %eax
	je	LBB0_30
## %bb.21:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_gx_input_FindDevices
	testl	%eax, %eax
	jne	LBB0_12
LBB0_17:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	callq	_GUI_InitMenu
	movq	%r15, %rdi
	movl	$30, %esi
	xorl	%edx, %edx
	callq	_GUI_DrawMenuFX
	jmp	LBB0_23
LBB0_29:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	movl	$30, %esi
	movl	$1, %edx
	callq	_GUI_DrawMenuFX
	movq	%r15, %rdi
	callq	_GUI_DeleteMenu
	xorl	%eax, %eax
	callq	_CheatMenu
LBB0_30:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r15, %rdi
	callq	_GUI_InitMenu
	movq	%r15, %rdi
	movl	$30, %esi
	xorl	%edx, %edx
	callq	_GUI_DrawMenuFX
	jmp	LBB0_8
LBB0_31:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_areplay_get_status
	incq	%rax
	movq	_AR_SWITCH_TRAINER@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	incq	%rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_32
## %bb.33:                              ##   in Loop: Header=BB0_8 Depth=1
	cqto
	idivq	%rcx
	movq	%rdx, %rdi
	jmp	LBB0_34
LBB0_42:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	_DEFAULT_PATH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	_rom_filename@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_sprintf
	movq	%rbx, %rdi
	callq	_gxSaveScreenshot
	jmp	LBB0_8
LBB0_43:                                ##   in Loop: Header=BB0_8 Depth=1
	xorl	%eax, %eax
	callq	_showrominfo
	jmp	LBB0_8
LBB0_32:                                ##   in Loop: Header=BB0_8 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %edi
LBB0_34:                                ##   in Loop: Header=BB0_8 Depth=1
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_areplay_set_status
	xorl	%eax, %eax
	callq	_areplay_get_status
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_GUI_DeleteMenu
	movq	_AR_SWITCH_TRAINER@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_Button_sm_grey_png@GOTPCREL(%rip), %rax
	movq	_AR_SWITCH_ON@GOTPCREL(%rip), %rdx
	cmpl	%r13d, (%rdx)
	jne	LBB0_36
## %bb.35:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_Button_sm_yellow_png@GOTPCREL(%rip), %rax
LBB0_36:                                ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%r13d, %ecx
	jne	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	_Button_sm_blue_png@GOTPCREL(%rip), %rax
LBB0_38:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	movq	%rax, 104(%rcx)
	movq	%r15, %rdi
	callq	_GUI_InitMenu
	movq	_system_hw@GOTPCREL(%rip), %r14
	jmp	LBB0_8
LBB0_1:
	cmpq	$0, 8(%r14)
	movq	_IMAGE_VISIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	notl	%eax
	je	LBB0_3
## %bb.2:
	movq	_bg_main@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	orl	%ecx, 4(%rdx)
	movq	_bg_misc@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	orl	%ecx, 4(%rdx)
	movq	_bg_ctrls@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	orl	%ecx, 4(%rdx)
	movq	_bg_list@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	orl	%ecx, 4(%rdx)
	movq	_bg_saves@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	orl	%ecx, 8(%rdx)
	jmp	LBB0_4
LBB0_41:
	movq	_menu_main@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	movl	$10, %esi
	movl	$1, %edx
	callq	_GUI_DrawMenuFX
	movq	%rbx, %rdi
	callq	_GUI_DeleteMenu
	jmp	LBB0_12
LBB0_24:
	movq	_menu_main@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	movl	$10, %esi
	movl	$1, %edx
	callq	_GUI_DrawMenuFX
	movq	%rbx, %rdi
	callq	_GUI_DeleteMenu
	movq	_BLACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gxClearScreen
	xorl	%eax, %eax
	callq	_gxSetScreen
	movl	(%r14), %eax
	movq	_SYSTEM_MD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_26
## %bb.25:
	xorl	%edi, %edi
	callq	_gen_reset
	jmp	LBB0_12
LBB0_10:
	movq	_BLACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gxClearScreen
	xorl	%eax, %eax
	callq	_gxSetScreen
	jmp	LBB0_12
LBB0_3:
	movq	_bg_main@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	%eax, 4(%rcx)
	movq	_bg_misc@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	%eax, 4(%rcx)
	movq	_bg_ctrls@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	%eax, 4(%rcx)
	movq	_bg_list@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	%eax, 4(%rcx)
	movq	_bg_saves@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	%eax, 8(%rcx)
LBB0_4:
	movq	_system_hw@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_7
## %bb.5:
	movl	$128, (%r15)
	movq	32(%r15), %rcx
	andl	%eax, (%rcx)
	movq	8(%r15), %rax
	addl	$-90, (%rax)
	addl	$-90, 16(%rax)
	addl	$-90, 32(%rax)
	movq	16(%r15), %rax
	addl	$-90, (%rax)
	addl	$-90, 24(%rax)
	addl	$-90, 48(%rax)
	movq	8(%rax), %rcx
	movl	$3, 4(%rcx)
	movq	32(%rax), %rcx
	movl	$3, 4(%rcx)
	movq	56(%rax), %rcx
	movl	$3, 4(%rcx)
	movq	_BUTTON_VISIBLE@GOTPCREL(%rip), %r14
	movq	_BUTTON_ACTIVE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	orl	(%r14), %ecx
	orl	%ecx, 88(%rax)
	orl	%ecx, 112(%rax)
	orl	%ecx, 136(%rax)
	orl	%ecx, 184(%rax)
	orl	%ecx, 208(%rax)
	orl	%ecx, 232(%rax)
	xorl	%eax, %eax
	callq	_areplay_get_status
	testq	%rax, %rax
	js	LBB0_7
## %bb.6:
	movl	(%rbx), %eax
	orl	(%r14), %eax
	movq	16(%r15), %rcx
	orl	%eax, 160(%rcx)
	movq	_Button_sm_grey_png@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rdx
	movq	%rax, 104(%rdx)
	movq	_mainmenu_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	80(%rcx), %rax
	movl	$3, 4(%rax)
	movq	176(%rcx), %rax
	movl	$1, (%rax)
	movq	200(%rcx), %rax
	movl	$2, 8(%rax)
	jmp	LBB0_7
LBB0_26:
	movq	_SYSTEM_SMS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_28
## %bb.27:
	movq	_IO_RESET_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	_io_reg@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	%eax, 52(%rcx)
	jmp	LBB0_12
LBB0_28:
	xorl	%eax, %eax
	callq	_system_init
	xorl	%eax, %eax
	callq	_system_reset
	movq	_config@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_slot_autoload
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	xorl	%eax, %eax
	callq	_VIDEO_WaitVSync
	xorl	%eax, %eax
	callq	_PAD_ScanPads
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	callq	_PAD_ButtonsHeld
	testq	%rax, %rax
	jne	LBB0_11
## %bb.13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.44:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_39, LBB0_39-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
.set L0_0_set_29, LBB0_29-LJTI0_0
.set L0_0_set_31, LBB0_31-LJTI0_0
.set L0_0_set_42, LBB0_42-LJTI0_0
.set L0_0_set_43, LBB0_43-LJTI0_0
LJTI0_0:
	.long	L0_0_set_39
	.long	L0_0_set_15
	.long	L0_0_set_18
	.long	L0_0_set_19
	.long	L0_0_set_20
	.long	L0_0_set_22
	.long	L0_0_set_29
	.long	L0_0_set_31
	.long	L0_0_set_39
	.long	L0_0_set_42
	.long	L0_0_set_43
	.end_data_region
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_config,16,3                    ## @config
	.comm	_menu_main,40,3                 ## @menu_main
	.comm	_IMAGE_VISIBLE,4,2              ## @IMAGE_VISIBLE
	.comm	_bg_main,8,3                    ## @bg_main
	.comm	_bg_misc,8,3                    ## @bg_misc
	.comm	_bg_ctrls,8,3                   ## @bg_ctrls
	.comm	_bg_list,8,3                    ## @bg_list
	.comm	_bg_saves,8,3                   ## @bg_saves
	.comm	_system_hw,4,2                  ## @system_hw
	.comm	_BUTTON_VISIBLE,4,2             ## @BUTTON_VISIBLE
	.comm	_BUTTON_ACTIVE,4,2              ## @BUTTON_ACTIVE
	.comm	_Button_sm_grey_png,8,3         ## @Button_sm_grey_png
	.comm	_mainmenu_cb,4,2                ## @mainmenu_cb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid Controllers Settings"

	.comm	_BLACK,4,2                      ## @BLACK
	.comm	_SYSTEM_MD,4,2                  ## @SYSTEM_MD
	.comm	_SYSTEM_SMS,4,2                 ## @SYSTEM_SMS
	.comm	_IO_RESET_HI,4,2                ## @IO_RESET_HI
	.comm	_io_reg,8,3                     ## @io_reg
	.comm	_AR_SWITCH_TRAINER,4,2          ## @AR_SWITCH_TRAINER
	.comm	_Button_sm_blue_png,8,3         ## @Button_sm_blue_png
	.comm	_AR_SWITCH_ON,4,2               ## @AR_SWITCH_ON
	.comm	_Button_sm_yellow_png,8,3       ## @Button_sm_yellow_png
L_.str.2:                               ## @.str.2
	.asciz	"%s/snaps/%s.png"

	.comm	_DEFAULT_PATH,8,3               ## @DEFAULT_PATH
	.comm	_rom_filename,8,3               ## @rom_filename
	.comm	_SYSTEM_MOUSE,8,3               ## @SYSTEM_MOUSE
	.comm	_SYS_POWEROFF,4,2               ## @SYS_POWEROFF
	.comm	_Shutdown,8,3                   ## @Shutdown
	.comm	_generic_point_png,4,2          ## @generic_point_png
	.comm	_input,8,3                      ## @input
	.comm	_w_pointer,4,2                  ## @w_pointer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mainmenu                       ; -- Begin function mainmenu
	.p2align	2
_mainmenu:                              ; @mainmenu
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x21, _config@GOTPAGE
Lloh9:
	ldr	x21, [x21, _config@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #0
	bl	_slot_autosave
Lloh10:
	adrp	x20, _menu_main@GOTPAGE
Lloh11:
	ldr	x20, [x20, _menu_main@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh12:
	adrp	x26, _system_hw@GOTPAGE
Lloh13:
	ldr	x26, [x26, _system_hw@GOTPAGEOFF]
	cbz	w8, LBB0_20
LBB0_1:
	mov	x0, x20
	bl	_GUI_InitMenu
	mov	x0, x20
	mov	w1, #10
	mov	w2, #0
	bl	_GUI_DrawMenuFX
Lloh14:
	adrp	x28, lJTI0_0@PAGE
Lloh15:
	add	x28, x28, lJTI0_0@PAGEOFF
Lloh16:
	adrp	x25, _AR_SWITCH_TRAINER@GOTPAGE
Lloh17:
	ldr	x25, [x25, _AR_SWITCH_TRAINER@GOTPAGEOFF]
Lloh18:
	adrp	x21, l_.str@PAGE
Lloh19:
	add	x21, x21, l_.str@PAGEOFF
Lloh20:
	adrp	x22, l_.str.1@PAGE
Lloh21:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh22:
	adrp	x27, _rom_filename@GOTPAGE
Lloh23:
	ldr	x27, [x27, _rom_filename@GOTPAGEOFF]
Lloh24:
	adrp	x23, l_.str.2@PAGE
Lloh25:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_gx_input_FindDevices
	cbnz	w0, LBB0_23
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_GUI_WaitPrompt
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_GUI_RunMenu
	add	w8, w0, #1
	cmp	w8, #10
	b.hi	LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	adr	x9, LBB0_2
	ldrb	w10, [x28, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	cbz	w8, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_gx_input_FindDevices
	cbz	w0, LBB0_3
	b	LBB0_22
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	w1, #30
	mov	w2, #1
	bl	_GUI_DrawMenuFX
	mov	x0, x20
	bl	_GUI_DeleteMenu
	bl	_loadgamemenu
	cbz	w0, LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_reloadrom
	bl	_gx_input_FindDevices
	cbz	w0, LBB0_14
	b	LBB0_25
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	w1, #30
	mov	w2, #1
	bl	_GUI_DrawMenuFX
	mov	x0, x20
	bl	_GUI_DeleteMenu
	bl	_optionmenu
	b	LBB0_16
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_exitmenu
	b	LBB0_4
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	w1, #30
	mov	w2, #1
	bl	_GUI_DrawMenuFX
	mov	x0, x20
	bl	_GUI_DeleteMenu
	bl	_savemenu
	cbz	w0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	bl	_gx_input_FindDevices
	cbnz	w0, LBB0_34
LBB0_14:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_GUI_InitMenu
	mov	x0, x20
	mov	w1, #30
	mov	w2, #0
	bl	_GUI_DrawMenuFX
	b	LBB0_3
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	w1, #30
	mov	w2, #1
	bl	_GUI_DrawMenuFX
	mov	x0, x20
	bl	_GUI_DeleteMenu
	bl	_CheatMenu
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	bl	_GUI_InitMenu
	mov	x0, x20
	mov	w1, #30
	mov	w2, #0
	bl	_GUI_DrawMenuFX
	b	LBB0_4
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_areplay_get_status
	add	x8, x0, #1
	ldrsw	x9, [x25]
	add	x9, x9, #1
	sdiv	x10, x8, x9
	msub	w0, w10, w9, w8
	bl	_areplay_set_status
	bl	_areplay_get_status
	mov	x24, x0
	mov	x0, x20
	bl	_GUI_DeleteMenu
	ldr	w8, [x25]
Lloh26:
	adrp	x9, _AR_SWITCH_ON@GOTPAGE
Lloh27:
	ldr	x9, [x9, _AR_SWITCH_ON@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	cmp	w9, w24
Lloh29:
	adrp	x9, _Button_sm_grey_png@GOTPAGE
Lloh30:
	ldr	x9, [x9, _Button_sm_grey_png@GOTPAGEOFF]
Lloh31:
	adrp	x10, _Button_sm_yellow_png@GOTPAGE
Lloh32:
	ldr	x10, [x10, _Button_sm_yellow_png@GOTPAGEOFF]
	csel	x9, x10, x9, eq
	cmp	w8, w24
Lloh33:
	adrp	x8, _Button_sm_blue_png@GOTPAGE
Lloh34:
	ldr	x8, [x8, _Button_sm_blue_png@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	str	x8, [x9, #104]
	mov	x0, x20
	bl	_GUI_InitMenu
	b	LBB0_4
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh35:
	adrp	x8, _DEFAULT_PATH@GOTPAGE
Lloh36:
	ldr	x8, [x8, _DEFAULT_PATH@GOTPAGEOFF]
Lloh37:
	ldr	x2, [x8]
	ldr	x3, [x27]
	mov	x0, x19
	mov	x1, x23
	bl	_sprintf
	mov	x0, x19
	bl	_gxSaveScreenshot
	b	LBB0_4
LBB0_19:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_showrominfo
	b	LBB0_4
LBB0_20:
Lloh38:
	adrp	x8, _IMAGE_VISIBLE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _IMAGE_VISIBLE@GOTPAGEOFF]
	ldr	x14, [x21, #8]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x13, _bg_main@GOTPAGE
Lloh42:
	ldr	x13, [x13, _bg_main@GOTPAGEOFF]
Lloh43:
	adrp	x12, _bg_misc@GOTPAGE
Lloh44:
	ldr	x12, [x12, _bg_misc@GOTPAGEOFF]
Lloh45:
	adrp	x11, _bg_ctrls@GOTPAGE
Lloh46:
	ldr	x11, [x11, _bg_ctrls@GOTPAGEOFF]
Lloh47:
	adrp	x10, _bg_list@GOTPAGE
Lloh48:
	ldr	x10, [x10, _bg_list@GOTPAGEOFF]
Lloh49:
	adrp	x9, _bg_saves@GOTPAGE
Lloh50:
	ldr	x9, [x9, _bg_saves@GOTPAGEOFF]
	cbz	x14, LBB0_26
; %bb.21:
	ldr	x13, [x13]
	ldr	w14, [x13, #4]
	orr	w14, w14, w8
	str	w14, [x13, #4]
	ldr	x12, [x12]
	ldr	w13, [x12, #4]
	orr	w13, w13, w8
	str	w13, [x12, #4]
	ldr	x11, [x11]
	ldr	w12, [x11, #4]
	orr	w12, w12, w8
	str	w12, [x11, #4]
	ldr	x10, [x10]
	ldr	w11, [x10, #4]
	orr	w11, w11, w8
	str	w11, [x10, #4]
	ldr	x9, [x9]
	ldr	w10, [x9, #8]
	orr	w10, w10, w8
	b	LBB0_27
LBB0_22:
Lloh51:
	adrp	x19, _menu_main@GOTPAGE
Lloh52:
	ldr	x19, [x19, _menu_main@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #10
	mov	w2, #1
	bl	_GUI_DrawMenuFX
	mov	x0, x19
	bl	_GUI_DeleteMenu
	b	LBB0_34
LBB0_23:
Lloh53:
	adrp	x19, _menu_main@GOTPAGE
Lloh54:
	ldr	x19, [x19, _menu_main@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #10
	mov	w2, #1
	bl	_GUI_DrawMenuFX
	mov	x0, x19
	bl	_GUI_DeleteMenu
Lloh55:
	adrp	x8, _BLACK@GOTPAGE
Lloh56:
	ldr	x8, [x8, _BLACK@GOTPAGEOFF]
Lloh57:
	ldr	w0, [x8]
	bl	_gxClearScreen
	bl	_gxSetScreen
	ldr	w8, [x26]
Lloh58:
	adrp	x9, _SYSTEM_MD@GOTPAGE
Lloh59:
	ldr	x9, [x9, _SYSTEM_MD@GOTPAGEOFF]
Lloh60:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_30
; %bb.24:
	mov	w0, #0
	bl	_gen_reset
	b	LBB0_34
LBB0_25:
Lloh61:
	adrp	x8, _BLACK@GOTPAGE
Lloh62:
	ldr	x8, [x8, _BLACK@GOTPAGEOFF]
Lloh63:
	ldr	w0, [x8]
	bl	_gxClearScreen
	bl	_gxSetScreen
	b	LBB0_34
LBB0_26:
	ldr	x13, [x13]
	ldr	w14, [x13, #4]
	bic	w14, w14, w8
	str	w14, [x13, #4]
	ldr	x12, [x12]
	ldr	w13, [x12, #4]
	bic	w13, w13, w8
	str	w13, [x12, #4]
	ldr	x11, [x11]
	ldr	w12, [x11, #4]
	bic	w12, w12, w8
	str	w12, [x11, #4]
	ldr	x10, [x10]
	ldr	w11, [x10, #4]
	bic	w11, w11, w8
	str	w11, [x10, #4]
	ldr	x9, [x9]
	ldr	w10, [x9, #8]
	bic	w10, w10, w8
LBB0_27:
	str	w10, [x9, #8]
	ldr	w9, [x26]
	cbz	w9, LBB0_1
; %bb.28:
	mov	w9, #128
	str	w9, [x20]
	ldr	x9, [x20, #32]
	ldr	w10, [x9]
	bic	w8, w10, w8
	str	w8, [x9]
	ldp	x8, x9, [x20, #8]
	ldr	w10, [x8]
	sub	w10, w10, #90
	str	w10, [x8]
	ldr	w10, [x8, #16]
	sub	w10, w10, #90
	str	w10, [x8, #16]
	ldr	w10, [x8, #32]
	sub	w10, w10, #90
	str	w10, [x8, #32]
	ldr	w8, [x9]
	sub	w8, w8, #90
	str	w8, [x9]
	ldr	w8, [x9, #24]
	sub	w8, w8, #90
	str	w8, [x9, #24]
	ldr	w8, [x9, #48]
	sub	w8, w8, #90
	str	w8, [x9, #48]
	ldr	x8, [x9, #8]
	mov	w21, #3
	str	w21, [x8, #4]
	ldr	x8, [x9, #32]
	str	w21, [x8, #4]
	ldr	x8, [x9, #56]
Lloh64:
	adrp	x22, _BUTTON_VISIBLE@GOTPAGE
Lloh65:
	ldr	x22, [x22, _BUTTON_VISIBLE@GOTPAGEOFF]
	str	w21, [x8, #4]
	ldr	w8, [x22]
Lloh66:
	adrp	x23, _BUTTON_ACTIVE@GOTPAGE
Lloh67:
	ldr	x23, [x23, _BUTTON_ACTIVE@GOTPAGEOFF]
	ldr	w10, [x23]
	orr	w8, w10, w8
	ldr	w10, [x9, #88]
	orr	w10, w10, w8
	str	w10, [x9, #88]
	ldr	w10, [x9, #112]
	orr	w10, w10, w8
	str	w10, [x9, #112]
	ldr	w10, [x9, #136]
	orr	w10, w10, w8
	str	w10, [x9, #136]
	ldr	w10, [x9, #184]
	orr	w10, w10, w8
	str	w10, [x9, #184]
	ldr	w10, [x9, #208]
	orr	w10, w10, w8
	str	w10, [x9, #208]
	ldr	w10, [x9, #232]
	orr	w8, w10, w8
	str	w8, [x9, #232]
	bl	_areplay_get_status
	tbnz	x0, #63, LBB0_1
; %bb.29:
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w8, w9, w8
	ldp	x10, x9, [x20, #8]
	ldr	w11, [x9, #160]
	orr	w8, w8, w11
	str	w8, [x9, #160]
Lloh68:
	adrp	x8, _Button_sm_grey_png@GOTPAGE
Lloh69:
	ldr	x8, [x8, _Button_sm_grey_png@GOTPAGEOFF]
Lloh70:
	ldr	x8, [x8]
	str	x8, [x10, #104]
Lloh71:
	adrp	x8, _mainmenu_cb@GOTPAGE
Lloh72:
	ldr	x8, [x8, _mainmenu_cb@GOTPAGEOFF]
Lloh73:
	ldr	w8, [x8]
	str	w8, [x20, #24]
	ldr	x8, [x9, #80]
	str	w21, [x8, #4]
	ldr	x8, [x9, #176]
	mov	w10, #1
	str	w10, [x8]
	ldr	x8, [x9, #200]
	mov	w9, #2
	str	w9, [x8, #8]
	b	LBB0_1
LBB0_30:
Lloh74:
	adrp	x9, _SYSTEM_SMS@GOTPAGE
Lloh75:
	ldr	x9, [x9, _SYSTEM_SMS@GOTPAGEOFF]
Lloh76:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_32
; %bb.31:
Lloh77:
	adrp	x8, _IO_RESET_HI@GOTPAGE
Lloh78:
	ldr	x8, [x8, _IO_RESET_HI@GOTPAGEOFF]
Lloh79:
	ldr	w8, [x8]
Lloh80:
	adrp	x9, _io_reg@GOTPAGE
Lloh81:
	ldr	x9, [x9, _io_reg@GOTPAGEOFF]
Lloh82:
	ldr	x9, [x9]
	ldr	w10, [x9, #52]
	bic	w8, w10, w8
	str	w8, [x9, #52]
	b	LBB0_34
LBB0_32:
	bl	_system_init
	bl	_system_reset
Lloh83:
	adrp	x8, _config@GOTPAGE
Lloh84:
	ldr	x8, [x8, _config@GOTPAGEOFF]
Lloh85:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_slot_autoload
	b	LBB0_34
LBB0_33:                                ;   in Loop: Header=BB0_34 Depth=1
	bl	_VIDEO_WaitVSync
	bl	_PAD_ScanPads
LBB0_34:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #0
	bl	_PAD_ButtonsHeld
	cbnz	x0, LBB0_33
; %bb.35:
	ldur	x8, [x29, #-88]
Lloh86:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh87:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh88:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_37
; %bb.36:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_37:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh74, Lloh75, Lloh76
	.loh AdrpLdrGotLdr	Lloh80, Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh83, Lloh84, Lloh85
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_15-LBB0_2)>>2
	.byte	(LBB0_17-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_18-LBB0_2)>>2
	.byte	(LBB0_19-LBB0_2)>>2
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_config,16,3                    ; @config
	.comm	_menu_main,40,3                 ; @menu_main
	.comm	_IMAGE_VISIBLE,4,2              ; @IMAGE_VISIBLE
	.comm	_bg_main,8,3                    ; @bg_main
	.comm	_bg_misc,8,3                    ; @bg_misc
	.comm	_bg_ctrls,8,3                   ; @bg_ctrls
	.comm	_bg_list,8,3                    ; @bg_list
	.comm	_bg_saves,8,3                   ; @bg_saves
	.comm	_system_hw,4,2                  ; @system_hw
	.comm	_BUTTON_VISIBLE,4,2             ; @BUTTON_VISIBLE
	.comm	_BUTTON_ACTIVE,4,2              ; @BUTTON_ACTIVE
	.comm	_Button_sm_grey_png,8,3         ; @Button_sm_grey_png
	.comm	_mainmenu_cb,4,2                ; @mainmenu_cb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid Controllers Settings"

	.comm	_BLACK,4,2                      ; @BLACK
	.comm	_SYSTEM_MD,4,2                  ; @SYSTEM_MD
	.comm	_SYSTEM_SMS,4,2                 ; @SYSTEM_SMS
	.comm	_IO_RESET_HI,4,2                ; @IO_RESET_HI
	.comm	_io_reg,8,3                     ; @io_reg
	.comm	_AR_SWITCH_TRAINER,4,2          ; @AR_SWITCH_TRAINER
	.comm	_Button_sm_blue_png,8,3         ; @Button_sm_blue_png
	.comm	_AR_SWITCH_ON,4,2               ; @AR_SWITCH_ON
	.comm	_Button_sm_yellow_png,8,3       ; @Button_sm_yellow_png
l_.str.2:                               ; @.str.2
	.asciz	"%s/snaps/%s.png"

	.comm	_DEFAULT_PATH,8,3               ; @DEFAULT_PATH
	.comm	_rom_filename,8,3               ; @rom_filename
	.comm	_SYSTEM_MOUSE,8,3               ; @SYSTEM_MOUSE
	.comm	_SYS_POWEROFF,4,2               ; @SYS_POWEROFF
	.comm	_Shutdown,8,3                   ; @Shutdown
	.comm	_generic_point_png,4,2          ; @generic_point_png
	.comm	_input,8,3                      ; @input
	.comm	_w_pointer,4,2                  ; @w_pointer
.subsections_via_symbols
