	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function loadgamemenu
_loadgamemenu:                          ## @loadgamemenu
	.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	_menu_load@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_GUI_InitMenu
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	$30, %esi
	xorl	%edx, %edx
	callq	_GUI_DrawMenuFX
	movq	%rbx, %rdi
	callq	_GUI_RunMenu
                                        ## kill: def $eax killed $eax def $rax
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.1:
	movq	_TYPE_RECENT@GOTPCREL(%rip), %r12
	movq	_config@GOTPCREL(%rip), %r13
	movq	_menu_load@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_GUI_RunMenu
                                        ## kill: def $eax killed $eax def $rax
	cmpl	$-1, %eax
	je	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	-1(%rax), %ebx
	movq	%r12, %rcx
	testl	%eax, %eax
	jle	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rcx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx), %edi
	movl	%ebx, %esi
	callq	_OpenDirectory
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_GUI_DeleteMenu
	movl	%ebx, %edi
	callq	_FileSelector
	testl	%eax, %eax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rdi
	callq	_GUI_InitMenu
	jmp	LBB0_8
LBB0_9:
	movq	_menu_load@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	movl	$30, %esi
	movl	$1, %edx
	callq	_GUI_DrawMenuFX
	movq	%rbx, %rdi
	callq	_GUI_DeleteMenu
	jmp	LBB0_10
LBB0_6:
	movl	$1, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_menu_load,4,2                  ## @menu_load
	.comm	_config,4,2                     ## @config
	.comm	_TYPE_RECENT,4,2                ## @TYPE_RECENT
	.no_dead_strip	_loadgamemenu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function loadgamemenu
_loadgamemenu:                          ; @loadgamemenu
	.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	x19, _menu_load@GOTPAGE
Lloh1:
	ldr	x19, [x19, _menu_load@GOTPAGEOFF]
	mov	x0, x19
	bl	_GUI_InitMenu
	mov	x0, x19
	mov	w1, #30
	mov	w2, #0
	bl	_GUI_DrawMenuFX
	mov	x0, x19
	bl	_GUI_RunMenu
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.1:
Lloh2:
	adrp	x21, _config@GOTPAGE
Lloh3:
	ldr	x21, [x21, _config@GOTPAGEOFF]
Lloh4:
	adrp	x22, _TYPE_RECENT@GOTPAGE
Lloh5:
	ldr	x22, [x22, _TYPE_RECENT@GOTPAGEOFF]
Lloh6:
	adrp	x19, _menu_load@GOTPAGE
Lloh7:
	ldr	x19, [x19, _menu_load@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_GUI_RunMenu
	cmn	w0, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	sub	w20, w0, #1
	cmp	w0, #0
	csel	x8, x21, x22, gt
	ldr	w0, [x8]
	mov	x1, x20
	bl	_OpenDirectory
	cbz	w0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_GUI_DeleteMenu
	mov	x0, x20
	bl	_FileSelector
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_GUI_InitMenu
	b	LBB0_2
LBB0_6:
Lloh8:
	adrp	x19, _menu_load@GOTPAGE
Lloh9:
	ldr	x19, [x19, _menu_load@GOTPAGEOFF]
	mov	x0, x19
	mov	w1, #30
	mov	w2, #1
	bl	_GUI_DrawMenuFX
	mov	x0, x19
	bl	_GUI_DeleteMenu
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	w0, #1
LBB0_8:
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_menu_load,4,2                  ; @menu_load
	.comm	_config,4,2                     ; @config
	.comm	_TYPE_RECENT,4,2                ; @TYPE_RECENT
	.no_dead_strip	_loadgamemenu
.subsections_via_symbols
