	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_romload_prepare           ## -- Begin function menu_romload_prepare
	.p2align	4, 0x90
_menu_romload_prepare:                  ## @menu_romload_prepare
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_strlen
	cltq
	leaq	(%r14,%rax), %rbx
	testl	%eax, %eax
	jle	LBB0_3
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpb	$47, (%rbx)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	decq	%rbx
	cmpq	%r14, %rbx
	ja	LBB0_1
LBB0_3:
	movq	_rom_loaded@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	_menu_screen@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movl	$154080, %edx                   ## imm = 0x259E0
	callq	_memset
LBB0_5:
	movl	$1, %edi
	callq	_menu_draw_begin
	leaq	L_.str(%rip), %rdx
	movl	$1, %edi
	movl	$1, %esi
	movl	$65535, %ecx                    ## imm = 0xFFFF
	callq	_smalltext_out16
	movl	$1, %edi
	movl	$10, %esi
	movq	%rbx, %rdx
	movl	$65535, %ecx                    ## imm = 0xFFFF
	movl	$53, %r8d
	callq	_smalltext_out16_lim
	xorl	%eax, %eax
	callq	_menu_draw_end
	movq	_load_progress_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoCartLoadProgressCB@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rom_loaded,4,2                 ## @rom_loaded
	.comm	_menu_screen,4,2                ## @menu_screen
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Loading"

	.comm	_load_progress_cb,4,2           ## @load_progress_cb
	.comm	_PicoCartLoadProgressCB,4,2     ## @PicoCartLoadProgressCB
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_menu_romload_prepare           ; -- Begin function menu_romload_prepare
	.p2align	2
_menu_romload_prepare:                  ; @menu_romload_prepare
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_strlen
	add	x19, x20, w0, sxtw
	cmp	w0, #1
	b.lt	LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x19]
	cmp	w8, #47
	b.eq	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	sub	x19, x19, #1
	cmp	x19, x20
	b.hi	LBB0_1
LBB0_3:
Lloh0:
	adrp	x8, _rom_loaded@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rom_loaded@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbnz	w8, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _menu_screen@GOTPAGE
Lloh4:
	ldr	x8, [x8, _menu_screen@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #23008
	movk	w2, #2, lsl #16
	bl	_memset
LBB0_5:
	mov	w0, #1
	bl	_menu_draw_begin
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	w0, #1
	mov	w1, #1
	mov	w3, #65535
	bl	_smalltext_out16
	mov	w0, #1
	mov	w1, #10
	mov	x2, x19
	mov	w3, #65535
	mov	w4, #53
	bl	_smalltext_out16_lim
	bl	_menu_draw_end
Lloh8:
	adrp	x8, _load_progress_cb@GOTPAGE
Lloh9:
	ldr	x8, [x8, _load_progress_cb@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _PicoCartLoadProgressCB@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PicoCartLoadProgressCB@GOTPAGEOFF]
Lloh13:
	str	w8, [x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_rom_loaded,4,2                 ; @rom_loaded
	.comm	_menu_screen,4,2                ; @menu_screen
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Loading"

	.comm	_load_progress_cb,4,2           ; @load_progress_cb
	.comm	_PicoCartLoadProgressCB,4,2     ; @PicoCartLoadProgressCB
.subsections_via_symbols
