	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function menu_loop_options
_menu_loop_options:                     ## @menu_loop_options
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_opt_entries@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_OPT_ENTRY_COUNT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_rom_loaded@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$131, %edx
	callq	_me_enable
	movl	(%r14), %edi
	movl	(%rbx), %esi
	movq	_config_slot@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_config_slot_current@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	setne	%cl
	movl	$135, %edx
	callq	_me_enable
	movl	(%r14), %edi
	movl	(%rbx), %esi
	callq	_me_count_enabled
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %ecx
	movl	_menu_loop_options.menu_sel(%rip), %edi
	cmpl	%eax, %edi
	jl	LBB0_2
## %bb.1:
	movl	%ecx, _menu_loop_options.menu_sel(%rip)
	movl	%ecx, %edi
LBB0_2:
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	_PBTN_DOWN@GOTPCREL(%rip), %r12
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rbx
	movq	_PBTN_X@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	callq	_draw_menu_options
	movq	%r12, %r13
	movq	(%r12), %rdi
	movq	_PBTN_UP@GOTPCREL(%rip), %r12
	orq	(%r12), %rdi
	orq	(%rbx), %rdi
	movq	_PBTN_RIGHT@GOTPCREL(%rip), %rbx
	orq	(%rbx), %rdi
	orq	(%r15), %rdi
	movq	_PBTN_CIRCLE@GOTPCREL(%rip), %rax
	orq	(%rax), %rdi
	xorl	%esi, %esi
	callq	_in_menu_wait
	movq	%rax, %r15
	testq	%rax, (%r12)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	_menu_loop_options.menu_sel(%rip), %eax
	leal	-1(%rax), %ecx
	testl	%eax, %eax
	cmovlel	-44(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	%ecx, _menu_loop_options.menu_sel(%rip)
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	_menu_loop_options.menu_sel(%rip), %edx
	movq	%r13, %r12
	testq	%r15, (%r13)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	-44(%rbp), %edx                 ## 4-byte Folded Reload
	leal	1(%rdx), %eax
	movl	$0, %ecx
	cmovgel	%ecx, %eax
	movl	%eax, _menu_loop_options.menu_sel(%rip)
	movl	%eax, %edx
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_OPT_ENTRY_COUNT@GOTPCREL(%rip), %r13
	movl	(%r14), %edi
	movl	(%r13), %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_me_index2id
	movq	%r14, %rdx
	movl	%eax, %r14d
	movq	(%rbx), %rax
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	%rax, %rcx
	testq	%r15, %rcx
	je	LBB0_25
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%rdx), %edi
	movl	(%r13), %esi
	xorl	%ecx, %ecx
	testq	%r15, %rax
	setne	%cl
	movl	%r14d, %edx
	callq	_me_process
	testl	%eax, %eax
	je	LBB0_9
LBB0_25:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_PBTN_CIRCLE@GOTPCREL(%rip), %rax
	testq	%r15, (%rax)
	je	LBB0_43
## %bb.26:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_opt_entries@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_OPT_ENTRY_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	movl	$1, %ecx
	callq	_me_process
	testl	%eax, %eax
	je	LBB0_27
LBB0_43:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_PBTN_X@GOTPCREL(%rip), %rax
	testq	%r15, (%rax)
	jne	LBB0_45
## %bb.44:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	movl	_menu_loop_options.menu_sel(%rip), %edi
	movq	_opt_entries@GOTPCREL(%rip), %r14
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rbx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	leal	-128(%r14), %eax
	cmpl	$10, %eax
	ja	LBB0_25
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_23:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rax
	andq	%r15, %rax
	cmpq	$1, %rax
	movl	$0, %eax
	sbbq	%rax, %rax
	orq	$1, %rax
	movq	_config_slot@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	cmpq	$10, %rax
	movl	$0, %edx
	cmovgeq	%rdx, %rax
	testq	%rax, %rax
	movl	$9, %edx
	cmovsq	%rdx, %rax
	movq	%rax, (%rcx)
	movq	_opt_entries@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_OPT_ENTRY_COUNT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	xorl	%ecx, %ecx
	movq	_config_slot_current@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	setne	%cl
	movl	$135, %edx
	callq	_me_enable
	movl	(%rbx), %edi
	movl	(%r13), %esi
	callq	_me_count_enabled
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %ecx
	cmpl	%eax, _menu_loop_options.menu_sel(%rip)
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	jl	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, _menu_loop_options.menu_sel(%rip)
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_3 Depth=1
	addl	$-129, %r14d
	cmpl	$10, %r14d
	ja	LBB0_43
## %bb.28:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	LJTI0_1(%rip), %rcx
	movslq	(%rcx,%r14,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_29:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_cd_menu_loop_options
	movq	_engineState@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PGS_ReloadRom@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_43
	jmp	LBB0_46
LBB0_42:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_dispmenu_loop_options
	jmp	LBB0_43
LBB0_30:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_amenu_loop_options
	jmp	LBB0_43
LBB0_17:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_PsndRate@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	(%rbx), %rsi
	andq	%r15, %rsi
	callq	_sndrate_prevnext
	movl	%eax, (%r13)
	jmp	LBB0_25
LBB0_20:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_state_slot@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	testq	%r15, (%rbx)
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, %rdx
	leal	1(%rax), %ecx
	cmpl	$9, %eax
	movl	$0, %eax
	cmovgel	%eax, %ecx
	movl	%ecx, (%rdx)
	jmp	LBB0_25
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_PicoOpt@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_currentConfig@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	testb	$16, %cl
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %edx
	andl	$128, %edx
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	orl	$16, %ecx
	movq	_PicoOpt@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	andl	$-129, %eax
	movl	%eax, (%rsi)
	jmp	LBB0_25
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rbx), %rdi
	andq	%r15, %rdi
	callq	_region_prevnext
	jmp	LBB0_25
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	xorl	%edi, %edi
	callq	_psp_pad_read
	movq	%rax, %r15
	movq	_PBTN_LEFT@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	(%rbx), %rcx
	orq	%rax, %rcx
	testq	%r15, %rcx
	movq	_currentConfig@GOTPCREL(%rip), %r13
	je	LBB0_25
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	andq	%r15, %rax
	negq	%rax
	movl	$0, %eax
	sbbl	%eax, %eax
	orl	$1, %eax
	addl	4(%r13), %eax
	cmpl	$20, %eax
	movl	$19, %ecx
	cmovll	%ecx, %eax
	cmpl	$333, %eax                      ## imm = 0x14D
	movl	$333, %ecx                      ## imm = 0x14D
	cmovael	%ecx, %eax
	movl	%eax, 4(%r13)
	movl	_menu_loop_options.menu_sel(%rip), %edi
	callq	_draw_menu_options
	xorl	%edi, %edi
	callq	_psp_pad_read
	movq	%rax, %r15
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	orq	%rax, %rcx
	testq	%r15, %rcx
	jne	LBB0_12
	jmp	LBB0_25
LBB0_19:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_currentConfig@GOTPCREL(%rip), %rsi
	movl	(%rsi), %eax
	movl	%eax, %ecx
	shrl	$9, %ecx
	andl	$1, %ecx
	movl	%eax, %edx
	shrl	$10, %edx
	andl	$2, %edx
	orl	%ecx, %edx
	movq	_PBTN_LEFT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andq	%r15, %rcx
	negq	%rcx
	movl	$0, %ecx
	sbbl	%ecx, %ecx
	orl	$1, %ecx
	addl	%edx, %ecx
	cmpl	$3, %ecx
	movl	$3, %edx
	cmovgel	%edx, %ecx
	testl	%ecx, %ecx
	movl	$0, %edx
	cmovlel	%edx, %ecx
	andl	$-2561, %eax                    ## imm = 0xF5FF
	movl	%ecx, %edx
	shll	$10, %edx
	shll	$9, %ecx
	orl	%edx, %ecx
	andl	$2560, %ecx                     ## imm = 0xA00
	orl	%eax, %ecx
	movl	%ecx, (%rsi)
	jmp	LBB0_25
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	andl	$-17, %ecx
	movq	_PicoOpt@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	orl	$128, %eax
	movl	%eax, (%rsi)
	jmp	LBB0_25
LBB0_22:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, %rdx
	leal	-1(%rax), %ecx
	testl	%eax, %eax
	movl	$9, %eax
	cmovlel	%eax, %ecx
	movl	%ecx, (%rdx)
	jmp	LBB0_25
LBB0_45:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_menu_options_save
LBB0_46:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_35:
	xorl	%eax, %eax
	callq	_menu_options_save
	movl	$1, %r14d
	movl	$1, %edi
	callq	_emu_WriteConfig
	movq	_menuErrorMsg@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %eax
	je	LBB0_37
## %bb.36:
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	jmp	LBB0_46
LBB0_31:
	xorl	%eax, %eax
	callq	_menu_options_save
	xorl	%edi, %edi
	callq	_emu_WriteConfig
	movq	_menuErrorMsg@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	testl	%eax, %eax
	je	LBB0_34
## %bb.32:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_33
LBB0_38:
	movl	$1, %r14d
	movl	$1, %edi
	movl	$1, %esi
	callq	_emu_ReadConfig
	testl	%eax, %eax
	jne	LBB0_40
## %bb.39:
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_emu_ReadConfig
	testl	%eax, %eax
	je	LBB0_41
LBB0_40:
	movq	_menuErrorMsg@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcpy
	jmp	LBB0_46
LBB0_37:
	leaq	L_.str.1(%rip), %rsi
	callq	_strcpy
	jmp	LBB0_46
LBB0_34:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_33
LBB0_41:
	movq	_menuErrorMsg@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_33:
	callq	_strcpy
	movl	$1, %r14d
	jmp	LBB0_46
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_25, LBB0_25-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
LJTI0_0:
	.long	L0_0_set_17
	.long	L0_0_set_25
	.long	L0_0_set_20
	.long	L0_0_set_23
	.long	L0_0_set_23
	.long	L0_0_set_13
	.long	L0_0_set_18
	.long	L0_0_set_23
	.long	L0_0_set_25
	.long	L0_0_set_11
	.long	L0_0_set_19
.set L0_1_set_29, LBB0_29-LJTI0_1
.set L0_1_set_43, LBB0_43-LJTI0_1
.set L0_1_set_35, LBB0_35-LJTI0_1
.set L0_1_set_31, LBB0_31-LJTI0_1
.set L0_1_set_38, LBB0_38-LJTI0_1
.set L0_1_set_42, LBB0_42-LJTI0_1
.set L0_1_set_30, LBB0_30-LJTI0_1
LJTI0_1:
	.long	L0_1_set_29
	.long	L0_1_set_43
	.long	L0_1_set_35
	.long	L0_1_set_31
	.long	L0_1_set_43
	.long	L0_1_set_43
	.long	L0_1_set_38
	.long	L0_1_set_42
	.long	L0_1_set_43
	.long	L0_1_set_43
	.long	L0_1_set_30
	.end_data_region
                                        ## -- End function
.zerofill __DATA,__bss,_menu_loop_options.menu_sel,4,2 ## @menu_loop_options.menu_sel
	.comm	_opt_entries,4,2                ## @opt_entries
	.comm	_OPT_ENTRY_COUNT,4,2            ## @OPT_ENTRY_COUNT
	.comm	_rom_loaded,4,2                 ## @rom_loaded
	.comm	_config_slot,8,3                ## @config_slot
	.comm	_config_slot_current,8,3        ## @config_slot_current
	.comm	_PBTN_UP,8,3                    ## @PBTN_UP
	.comm	_PBTN_DOWN,8,3                  ## @PBTN_DOWN
	.comm	_PBTN_LEFT,8,3                  ## @PBTN_LEFT
	.comm	_PBTN_RIGHT,8,3                 ## @PBTN_RIGHT
	.comm	_PBTN_X,8,3                     ## @PBTN_X
	.comm	_PBTN_CIRCLE,8,3                ## @PBTN_CIRCLE
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_currentConfig,8,2              ## @currentConfig
	.comm	_PsndRate,4,2                   ## @PsndRate
	.comm	_state_slot,4,2                 ## @state_slot
	.comm	_engineState,4,2                ## @engineState
	.comm	_PGS_ReloadRom,4,2              ## @PGS_ReloadRom
	.comm	_menuErrorMsg,4,2               ## @menuErrorMsg
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"config saved"

L_.str.1:                               ## @.str.1
	.asciz	"failed to write config"

L_.str.2:                               ## @.str.2
	.asciz	"config loaded"

L_.str.3:                               ## @.str.3
	.asciz	"failed to load config"

	.no_dead_strip	_menu_loop_options
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function menu_loop_options
_menu_loop_options:                     ; @menu_loop_options
	.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
Lloh0:
	adrp	x21, _opt_entries@GOTPAGE
Lloh1:
	ldr	x21, [x21, _opt_entries@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x22, _OPT_ENTRY_COUNT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _OPT_ENTRY_COUNT@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh4:
	adrp	x8, _rom_loaded@GOTPAGE
Lloh5:
	ldr	x8, [x8, _rom_loaded@GOTPAGEOFF]
Lloh6:
	ldr	w3, [x8]
	mov	w2, #131
	bl	_me_enable
	ldr	w0, [x21]
	ldr	w1, [x22]
Lloh7:
	adrp	x8, _config_slot@GOTPAGE
Lloh8:
	ldr	x8, [x8, _config_slot@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _config_slot_current@GOTPAGE
Lloh11:
	ldr	x9, [x9, _config_slot_current@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w3, ne
	mov	w2, #135
	bl	_me_enable
	ldr	w0, [x21]
	ldr	w1, [x22]
	bl	_me_count_enabled
	mov	x8, x0
	sub	w27, w0, #1
	adrp	x25, _menu_loop_options.menu_sel@PAGE
	ldr	w0, [x25, _menu_loop_options.menu_sel@PAGEOFF]
	cmp	w0, w8
	b.lt	LBB0_2
; %bb.1:
	str	w27, [x25, _menu_loop_options.menu_sel@PAGEOFF]
	mov	x0, x27
LBB0_2:
Lloh13:
	adrp	x28, _PBTN_LEFT@GOTPAGE
Lloh14:
	ldr	x28, [x28, _PBTN_LEFT@GOTPAGEOFF]
Lloh15:
	adrp	x23, _PBTN_RIGHT@GOTPAGE
Lloh16:
	ldr	x23, [x23, _PBTN_RIGHT@GOTPAGEOFF]
Lloh17:
	adrp	x24, _PBTN_X@GOTPAGE
Lloh18:
	ldr	x24, [x24, _PBTN_X@GOTPAGEOFF]
Lloh19:
	adrp	x26, _PBTN_CIRCLE@GOTPAGE
Lloh20:
	ldr	x26, [x26, _PBTN_CIRCLE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_30 Depth 2
	bl	_draw_menu_options
Lloh21:
	adrp	x20, _PBTN_UP@GOTPAGE
Lloh22:
	ldr	x20, [x20, _PBTN_UP@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh23:
	adrp	x9, _PBTN_DOWN@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PBTN_DOWN@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	orr	x8, x9, x8
	ldr	x9, [x28]
	orr	x8, x8, x9
	ldr	x9, [x23]
	orr	x8, x8, x9
	ldr	x9, [x24]
	orr	x8, x8, x9
	ldr	x9, [x26]
	orr	x0, x8, x9
	mov	w1, #0
	bl	_in_menu_wait
	mov	x19, x0
	ldr	x8, [x20]
	tst	x8, x0
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25, _menu_loop_options.menu_sel@PAGEOFF]
	subs	w8, w8, #1
	csel	w8, w27, w8, lt
	str	w8, [x25, _menu_loop_options.menu_sel@PAGEOFF]
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh26:
	adrp	x8, _PBTN_DOWN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PBTN_DOWN@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	ldr	w2, [x25, _menu_loop_options.menu_sel@PAGEOFF]
	tst	x8, x19
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w2, w27
	csinc	w2, wzr, w2, ge
	str	w2, [x25, _menu_loop_options.menu_sel@PAGEOFF]
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	ldr	w1, [x22]
	bl	_me_index2id
	mov	x20, x0
	ldr	x9, [x28]
	ldr	x8, [x23]
	orr	x9, x8, x9
	tst	x9, x19
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	ldr	w1, [x22]
	tst	x8, x19
	cset	w3, ne
	mov	x2, x20
	bl	_me_process
	cbz	w0, LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26]
	tst	x8, x19
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	ldr	w1, [x22]
	mov	x2, x20
	mov	w3, #1
	bl	_me_process
	cbz	w0, LBB0_17
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	tst	x8, x19
	b.ne	LBB0_35
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x25, _menu_loop_options.menu_sel@PAGEOFF]
	b	LBB0_3
LBB0_13:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w8, w20, #128
	cmp	w8, #10
	b.hi	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh29:
	adrp	x11, lJTI0_0@PAGE
Lloh30:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x9, LBB0_9
	ldrb	w10, [x11, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23]
Lloh31:
	adrp	x11, _config_slot@GOTPAGE
Lloh32:
	ldr	x11, [x11, _config_slot@GOTPAGEOFF]
	ldr	x9, [x11]
	sub	x10, x9, #1
	tst	x8, x19
	csinc	x8, x10, x9, eq
	cmp	x8, #9
	csel	x8, xzr, x8, gt
	cmp	x8, #0
	mov	w9, #9
	csel	x8, x9, x8, lt
	str	x8, [x11]
	ldr	w0, [x21]
	ldr	w1, [x22]
Lloh33:
	adrp	x9, _config_slot_current@GOTPAGE
Lloh34:
	ldr	x9, [x9, _config_slot_current@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w3, ne
	mov	w2, #135
	bl	_me_enable
	ldr	w0, [x21]
	ldr	w1, [x22]
	bl	_me_count_enabled
	sub	w27, w0, #1
	ldr	w8, [x25, _menu_loop_options.menu_sel@PAGEOFF]
	cmp	w8, w0
	b.lt	LBB0_9
; %bb.16:                               ;   in Loop: Header=BB0_3 Depth=1
	str	w27, [x25, _menu_loop_options.menu_sel@PAGEOFF]
	b	LBB0_9
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w8, w20, #129
	cmp	w8, #10
	b.hi	LBB0_11
; %bb.18:                               ;   in Loop: Header=BB0_3 Depth=1
Lloh36:
	adrp	x11, lJTI0_1@PAGE
Lloh37:
	add	x11, x11, lJTI0_1@PAGEOFF
	adr	x9, LBB0_11
	ldrb	w10, [x11, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_19:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_cd_menu_loop_options
Lloh38:
	adrp	x8, _engineState@GOTPAGE
Lloh39:
	ldr	x8, [x8, _engineState@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
Lloh41:
	adrp	x9, _PGS_ReloadRom@GOTPAGE
Lloh42:
	ldr	x9, [x9, _PGS_ReloadRom@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_11
	b	LBB0_36
LBB0_20:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_dispmenu_loop_options
	b	LBB0_11
LBB0_21:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_amenu_loop_options
	b	LBB0_11
LBB0_22:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh44:
	adrp	x8, _PsndRate@GOTPAGE
Lloh45:
	ldr	x8, [x8, _PsndRate@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	ldr	x8, [x23]
	and	x1, x8, x19
	bl	_sndrate_prevnext
Lloh47:
	adrp	x8, _PsndRate@GOTPAGE
Lloh48:
	ldr	x8, [x8, _PsndRate@GOTPAGEOFF]
Lloh49:
	str	w0, [x8]
	b	LBB0_9
LBB0_23:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x23]
Lloh50:
	adrp	x10, _state_slot@GOTPAGE
Lloh51:
	ldr	x10, [x10, _state_slot@GOTPAGEOFF]
	ldr	w8, [x10]
	tst	x9, x19
	b.eq	LBB0_34
; %bb.24:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w8, #8
	csinc	w8, wzr, w8, gt
	str	w8, [x10]
	b	LBB0_9
LBB0_25:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh52:
	adrp	x8, _PicoOpt@GOTPAGE
Lloh53:
	ldr	x8, [x8, _PicoOpt@GOTPAGEOFF]
Lloh54:
	ldr	w9, [x8]
Lloh55:
	adrp	x11, _currentConfig@GOTPAGE
Lloh56:
	ldr	x11, [x11, _currentConfig@GOTPAGEOFF]
	ldr	w8, [x11]
	tbnz	w9, #4, LBB0_33
; %bb.26:                               ;   in Loop: Header=BB0_3 Depth=1
	tbz	w8, #7, LBB0_33
; %bb.27:                               ;   in Loop: Header=BB0_3 Depth=1
	orr	w9, w9, #0x10
Lloh57:
	adrp	x10, _PicoOpt@GOTPAGE
Lloh58:
	ldr	x10, [x10, _PicoOpt@GOTPAGEOFF]
Lloh59:
	str	w9, [x10]
	and	w8, w8, #0xffffff7f
	str	w8, [x11]
	b	LBB0_9
LBB0_28:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x23]
	and	x0, x8, x19
	bl	_region_prevnext
	b	LBB0_9
LBB0_29:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #0
	bl	_psp_pad_read
	mov	x19, x0
	ldr	x8, [x28]
	ldr	x9, [x23]
	orr	x9, x9, x8
	tst	x9, x0
	mov	w24, #19
	mov	w26, #333
Lloh60:
	adrp	x21, _currentConfig@GOTPAGE
Lloh61:
	ldr	x21, [x21, _currentConfig@GOTPAGEOFF]
	b.eq	LBB0_31
LBB0_30:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x21, #4]
	sub	w10, w9, #1
	tst	x8, x19
	csinc	w8, w10, w9, ne
	cmp	w8, #19
	csel	w8, w8, w24, gt
	cmp	w8, #333
	csel	w8, w8, w26, lo
	str	w8, [x21, #4]
	ldr	w0, [x25, _menu_loop_options.menu_sel@PAGEOFF]
	bl	_draw_menu_options
	mov	w0, #0
	bl	_psp_pad_read
	mov	x19, x0
	ldr	x8, [x28]
	ldr	x9, [x23]
	orr	x9, x9, x8
	tst	x9, x0
	b.ne	LBB0_30
LBB0_31:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh62:
	adrp	x24, _PBTN_X@GOTPAGE
Lloh63:
	ldr	x24, [x24, _PBTN_X@GOTPAGEOFF]
Lloh64:
	adrp	x26, _PBTN_CIRCLE@GOTPAGE
Lloh65:
	ldr	x26, [x26, _PBTN_CIRCLE@GOTPAGEOFF]
Lloh66:
	adrp	x21, _opt_entries@GOTPAGE
Lloh67:
	ldr	x21, [x21, _opt_entries@GOTPAGEOFF]
	b	LBB0_9
LBB0_32:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh68:
	adrp	x12, _currentConfig@GOTPAGE
Lloh69:
	ldr	x12, [x12, _currentConfig@GOTPAGEOFF]
	ldr	w8, [x12]
	lsr	w9, w8, #10
	and	w9, w9, #0x2
	bfxil	w9, w8, #9, #1
	ldr	x10, [x28]
	sub	w11, w9, #1
	tst	x10, x19
	csinc	w9, w11, w9, ne
	cmp	w9, #3
	mov	w10, #3
	csel	w9, w9, w10, lt
	cmp	w9, #0
	csel	w9, w9, wzr, gt
	mov	w10, #-2561
	and	w8, w8, w10
	lsl	w10, w9, #10
	orr	w9, w10, w9, lsl #9
	mov	w10, #2560
	and	w9, w9, w10
	orr	w8, w9, w8
	str	w8, [x12]
	b	LBB0_9
LBB0_33:                                ;   in Loop: Header=BB0_3 Depth=1
	and	w9, w9, #0xffffffef
Lloh70:
	adrp	x10, _PicoOpt@GOTPAGE
Lloh71:
	ldr	x10, [x10, _PicoOpt@GOTPAGEOFF]
Lloh72:
	str	w9, [x10]
	orr	w8, w8, #0x80
	str	w8, [x11]
	b	LBB0_9
LBB0_34:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w8, w8, #1
	mov	w9, #9
	csel	w8, w9, w8, lt
	str	w8, [x10]
	b	LBB0_9
LBB0_35:
	bl	_menu_options_save
LBB0_36:
	mov	w0, #0
LBB0_37:
	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_38:
	bl	_menu_options_save
	mov	w0, #1
	b	LBB0_40
LBB0_39:
	bl	_menu_options_save
	mov	w0, #0
LBB0_40:
	bl	_emu_WriteConfig
	mov	x8, x0
Lloh73:
	adrp	x9, _menuErrorMsg@GOTPAGE
Lloh74:
	ldr	x9, [x9, _menuErrorMsg@GOTPAGEOFF]
Lloh75:
	ldr	w0, [x9]
	cbz	w8, LBB0_45
; %bb.41:
Lloh76:
	adrp	x1, l_.str@PAGE
Lloh77:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_46
LBB0_42:
	mov	w0, #1
	mov	w1, #1
	bl	_emu_ReadConfig
	cbnz	w0, LBB0_44
; %bb.43:
	mov	w1, #1
	bl	_emu_ReadConfig
	cbz	w0, LBB0_47
LBB0_44:
Lloh78:
	adrp	x8, _menuErrorMsg@GOTPAGE
Lloh79:
	ldr	x8, [x8, _menuErrorMsg@GOTPAGEOFF]
Lloh80:
	ldr	w0, [x8]
Lloh81:
	adrp	x1, l_.str.2@PAGE
Lloh82:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_46
LBB0_45:
Lloh83:
	adrp	x1, l_.str.1@PAGE
Lloh84:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_46:
	bl	_strcpy
	mov	w0, #1
	b	LBB0_37
LBB0_47:
Lloh85:
	adrp	x8, _menuErrorMsg@GOTPAGE
Lloh86:
	ldr	x8, [x8, _menuErrorMsg@GOTPAGEOFF]
Lloh87:
	ldr	w0, [x8]
Lloh88:
	adrp	x1, l_.str.3@PAGE
Lloh89:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_46
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotStr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotStr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh68, Lloh69
	.loh AdrpLdrGotStr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpAdd	Lloh76, Lloh77
	.loh AdrpAdd	Lloh81, Lloh82
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpAdd	Lloh83, Lloh84
	.loh AdrpAdd	Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh85, Lloh86, Lloh87
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_22-LBB0_9)>>2
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_23-LBB0_9)>>2
	.byte	(LBB0_15-LBB0_9)>>2
	.byte	(LBB0_15-LBB0_9)>>2
	.byte	(LBB0_25-LBB0_9)>>2
	.byte	(LBB0_28-LBB0_9)>>2
	.byte	(LBB0_15-LBB0_9)>>2
	.byte	(LBB0_9-LBB0_9)>>2
	.byte	(LBB0_29-LBB0_9)>>2
	.byte	(LBB0_32-LBB0_9)>>2
lJTI0_1:
	.byte	(LBB0_19-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_38-LBB0_11)>>2
	.byte	(LBB0_39-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_42-LBB0_11)>>2
	.byte	(LBB0_20-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_11-LBB0_11)>>2
	.byte	(LBB0_21-LBB0_11)>>2
                                        ; -- End function
.zerofill __DATA,__bss,_menu_loop_options.menu_sel,4,2 ; @menu_loop_options.menu_sel
	.comm	_opt_entries,4,2                ; @opt_entries
	.comm	_OPT_ENTRY_COUNT,4,2            ; @OPT_ENTRY_COUNT
	.comm	_rom_loaded,4,2                 ; @rom_loaded
	.comm	_config_slot,8,3                ; @config_slot
	.comm	_config_slot_current,8,3        ; @config_slot_current
	.comm	_PBTN_UP,8,3                    ; @PBTN_UP
	.comm	_PBTN_DOWN,8,3                  ; @PBTN_DOWN
	.comm	_PBTN_LEFT,8,3                  ; @PBTN_LEFT
	.comm	_PBTN_RIGHT,8,3                 ; @PBTN_RIGHT
	.comm	_PBTN_X,8,3                     ; @PBTN_X
	.comm	_PBTN_CIRCLE,8,3                ; @PBTN_CIRCLE
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_currentConfig,8,2              ; @currentConfig
	.comm	_PsndRate,4,2                   ; @PsndRate
	.comm	_state_slot,4,2                 ; @state_slot
	.comm	_engineState,4,2                ; @engineState
	.comm	_PGS_ReloadRom,4,2              ; @PGS_ReloadRom
	.comm	_menuErrorMsg,4,2               ; @menuErrorMsg
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"config saved"

l_.str.1:                               ; @.str.1
	.asciz	"failed to write config"

l_.str.2:                               ; @.str.2
	.asciz	"config loaded"

l_.str.3:                               ; @.str.3
	.asciz	"failed to load config"

	.no_dead_strip	_menu_loop_options
.subsections_via_symbols
