	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_loop                      ## -- Begin function menu_loop
	.p2align	4, 0x90
_menu_loop:                             ## @menu_loop
	.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	_e_menu_main@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_MA_MAIN_RESUME_GAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PicoGameLoaded@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	callq	_me_enable
	movl	(%rbx), %edi
	movq	_MA_MAIN_SAVE_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	callq	_me_enable
	movl	(%rbx), %edi
	movq	_MA_MAIN_LOAD_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	callq	_me_enable
	movl	(%rbx), %edi
	movq	_MA_MAIN_RESET_GAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	callq	_me_enable
	movl	(%rbx), %edi
	movq	_MA_MAIN_CHANGE_CD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PicoAHW@GOTPCREL(%rip), %rax
	movq	_PAHW_MCD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	(%rax), %edx
	callq	_me_enable
	movl	(%rbx), %edi
	movq	_MA_MAIN_PATCHES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PicoPatches@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	cmpq	$0, (%rax)
	setne	%dl
	callq	_me_enable
	movl	(%r14), %edi
	callq	_menu_enter
	movq	_IN_CFG_BLOCKING@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	xorl	%edi, %edi
	movl	$1, %edx
	callq	_in_set_config_int
	movl	(%rbx), %edi
	movq	_menu_main_draw_status@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	_menu_loop.sel(%rip), %rsi
	xorl	%edx, %edx
	callq	_me_loop_d
	cmpl	$0, (%r14)
	je	LBB0_5
## %bb.1:
	movq	_engineState@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_PGS_Menu@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_3
## %bb.2:
	movq	_PGS_Running@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
LBB0_3:
	movq	_PBTN_MENU@GOTPCREL(%rip), %r14
	movq	_PBTN_MOK@GOTPCREL(%rip), %r12
	movq	_PBTN_MBACK@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edi, %edi
	movl	$50, %esi
	callq	_in_menu_wait_any
	movl	(%r12), %ecx
	orl	(%r14), %ecx
	orl	(%rbx), %ecx
	testl	%eax, %ecx
	jne	LBB0_4
LBB0_5:
	movl	(%r15), %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_in_set_config_int
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_plat_video_menu_leave          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_menu_loop.sel,4,2 ## @menu_loop.sel
	.comm	_e_menu_main,4,2                ## @e_menu_main
	.comm	_MA_MAIN_RESUME_GAME,4,2        ## @MA_MAIN_RESUME_GAME
	.comm	_PicoGameLoaded,4,2             ## @PicoGameLoaded
	.comm	_MA_MAIN_SAVE_STATE,4,2         ## @MA_MAIN_SAVE_STATE
	.comm	_MA_MAIN_LOAD_STATE,4,2         ## @MA_MAIN_LOAD_STATE
	.comm	_MA_MAIN_RESET_GAME,4,2         ## @MA_MAIN_RESET_GAME
	.comm	_MA_MAIN_CHANGE_CD,4,2          ## @MA_MAIN_CHANGE_CD
	.comm	_PicoAHW,4,2                    ## @PicoAHW
	.comm	_PAHW_MCD,4,2                   ## @PAHW_MCD
	.comm	_MA_MAIN_PATCHES,4,2            ## @MA_MAIN_PATCHES
	.comm	_PicoPatches,8,3                ## @PicoPatches
	.comm	_IN_CFG_BLOCKING,4,2            ## @IN_CFG_BLOCKING
	.comm	_menu_main_draw_status,4,2      ## @menu_main_draw_status
	.comm	_engineState,8,3                ## @engineState
	.comm	_PGS_Menu,8,3                   ## @PGS_Menu
	.comm	_PGS_Running,8,3                ## @PGS_Running
	.comm	_PBTN_MENU,4,2                  ## @PBTN_MENU
	.comm	_PBTN_MOK,4,2                   ## @PBTN_MOK
	.comm	_PBTN_MBACK,4,2                 ## @PBTN_MBACK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_loop                      ; -- Begin function menu_loop
	.p2align	2
_menu_loop:                             ; @menu_loop
	.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	x20, _e_menu_main@GOTPAGE
Lloh1:
	ldr	x20, [x20, _e_menu_main@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _MA_MAIN_RESUME_GAME@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MA_MAIN_RESUME_GAME@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x19, _PicoGameLoaded@GOTPAGE
Lloh6:
	ldr	x19, [x19, _PicoGameLoaded@GOTPAGEOFF]
	ldr	w2, [x19]
	bl	_me_enable
	ldr	w0, [x20]
Lloh7:
	adrp	x8, _MA_MAIN_SAVE_STATE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MA_MAIN_SAVE_STATE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w2, [x19]
	bl	_me_enable
	ldr	w0, [x20]
Lloh10:
	adrp	x8, _MA_MAIN_LOAD_STATE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MA_MAIN_LOAD_STATE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x19]
	bl	_me_enable
	ldr	w0, [x20]
Lloh13:
	adrp	x8, _MA_MAIN_RESET_GAME@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MA_MAIN_RESET_GAME@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w2, [x19]
	bl	_me_enable
	ldr	w0, [x20]
Lloh16:
	adrp	x8, _MA_MAIN_CHANGE_CD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MA_MAIN_CHANGE_CD@GOTPAGEOFF]
Lloh18:
	adrp	x9, _PicoAHW@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PicoAHW@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	ldr	w8, [x9]
Lloh22:
	adrp	x9, _PAHW_MCD@GOTPAGE
Lloh23:
	ldr	x9, [x9, _PAHW_MCD@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	and	w2, w9, w8
	bl	_me_enable
	ldr	w0, [x20]
Lloh25:
	adrp	x8, _MA_MAIN_PATCHES@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MA_MAIN_PATCHES@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _PicoPatches@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PicoPatches@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w2, ne
	bl	_me_enable
	ldr	w0, [x19]
	bl	_menu_enter
Lloh31:
	adrp	x21, _IN_CFG_BLOCKING@GOTPAGE
Lloh32:
	ldr	x21, [x21, _IN_CFG_BLOCKING@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w0, #0
	mov	w2, #1
	bl	_in_set_config_int
	ldr	w0, [x20]
Lloh33:
	adrp	x8, _menu_main_draw_status@GOTPAGE
Lloh34:
	ldr	x8, [x8, _menu_main_draw_status@GOTPAGEOFF]
Lloh35:
	ldr	w3, [x8]
Lloh36:
	adrp	x1, _menu_loop.sel@PAGE
Lloh37:
	add	x1, x1, _menu_loop.sel@PAGEOFF
	mov	x2, #0
	bl	_me_loop_d
	ldr	w8, [x19]
	cbz	w8, LBB0_5
; %bb.1:
Lloh38:
	adrp	x8, _engineState@GOTPAGE
Lloh39:
	ldr	x8, [x8, _engineState@GOTPAGEOFF]
	ldr	x9, [x8]
Lloh40:
	adrp	x10, _PGS_Menu@GOTPAGE
Lloh41:
	ldr	x10, [x10, _PGS_Menu@GOTPAGEOFF]
Lloh42:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.2:
Lloh43:
	adrp	x9, _PGS_Running@GOTPAGE
Lloh44:
	ldr	x9, [x9, _PGS_Running@GOTPAGEOFF]
Lloh45:
	ldr	x9, [x9]
	str	x9, [x8]
LBB0_3:
Lloh46:
	adrp	x19, _PBTN_MENU@GOTPAGE
Lloh47:
	ldr	x19, [x19, _PBTN_MENU@GOTPAGEOFF]
Lloh48:
	adrp	x20, _PBTN_MOK@GOTPAGE
Lloh49:
	ldr	x20, [x20, _PBTN_MOK@GOTPAGEOFF]
Lloh50:
	adrp	x22, _PBTN_MBACK@GOTPAGE
Lloh51:
	ldr	x22, [x22, _PBTN_MBACK@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, #0
	mov	w1, #50
	bl	_in_menu_wait_any
	ldr	w8, [x19]
	ldr	w9, [x20]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w8, w8, w9
	tst	w8, w0
	b.ne	LBB0_4
LBB0_5:
	ldr	w1, [x21]
	mov	w0, #0
	mov	w2, #0
	bl	_in_set_config_int
	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	_plat_video_menu_leave
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpLdrGot	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_menu_loop.sel,4,2 ; @menu_loop.sel
	.comm	_e_menu_main,4,2                ; @e_menu_main
	.comm	_MA_MAIN_RESUME_GAME,4,2        ; @MA_MAIN_RESUME_GAME
	.comm	_PicoGameLoaded,4,2             ; @PicoGameLoaded
	.comm	_MA_MAIN_SAVE_STATE,4,2         ; @MA_MAIN_SAVE_STATE
	.comm	_MA_MAIN_LOAD_STATE,4,2         ; @MA_MAIN_LOAD_STATE
	.comm	_MA_MAIN_RESET_GAME,4,2         ; @MA_MAIN_RESET_GAME
	.comm	_MA_MAIN_CHANGE_CD,4,2          ; @MA_MAIN_CHANGE_CD
	.comm	_PicoAHW,4,2                    ; @PicoAHW
	.comm	_PAHW_MCD,4,2                   ; @PAHW_MCD
	.comm	_MA_MAIN_PATCHES,4,2            ; @MA_MAIN_PATCHES
	.comm	_PicoPatches,8,3                ; @PicoPatches
	.comm	_IN_CFG_BLOCKING,4,2            ; @IN_CFG_BLOCKING
	.comm	_menu_main_draw_status,4,2      ; @menu_main_draw_status
	.comm	_engineState,8,3                ; @engineState
	.comm	_PGS_Menu,8,3                   ; @PGS_Menu
	.comm	_PGS_Running,8,3                ; @PGS_Running
	.comm	_PBTN_MENU,4,2                  ; @PBTN_MENU
	.comm	_PBTN_MOK,4,2                   ; @PBTN_MOK
	.comm	_PBTN_MBACK,4,2                 ; @PBTN_MBACK
.subsections_via_symbols
