	.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:
	xorl	%eax, %eax
	callq	_psp_video_switch_to_single
	movq	_rom_loaded@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_menu_draw_begin
	jmp	LBB0_6
LBB0_5:
	movq	_psp_screen@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movl	$69632, %edx                    ## imm = 0x11000
	callq	_memset32_uncached
LBB0_6:
	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	$80, %r8d
	callq	_smalltext_out16_lim
	movq	_load_progress_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoCartLoadProgressCB@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_cdload_progress_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoCDLoadProgressCB@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_lcdr_line@GOTPCREL(%rip), %rax
	movl	$2, (%rax)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rom_loaded,8,3                 ## @rom_loaded
	.comm	_psp_screen,4,2                 ## @psp_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
	.comm	_cdload_progress_cb,4,2         ## @cdload_progress_cb
	.comm	_PicoCDLoadProgressCB,4,2       ## @PicoCDLoadProgressCB
	.comm	_lcdr_line,4,2                  ## @lcdr_line
.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:
	bl	_psp_video_switch_to_single
Lloh0:
	adrp	x8, _rom_loaded@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rom_loaded@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.4:
	bl	_menu_draw_begin
	b	LBB0_6
LBB0_5:
Lloh3:
	adrp	x8, _psp_screen@GOTPAGE
Lloh4:
	ldr	x8, [x8, _psp_screen@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #4096
	movk	w2, #1, lsl #16
	bl	_memset32_uncached
LBB0_6:
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, #80
	bl	_smalltext_out16_lim
Lloh8:
	adrp	x8, _load_progress_cb@GOTPAGE
Lloh9:
	ldr	x8, [x8, _load_progress_cb@GOTPAGEOFF]
Lloh10:
	adrp	x9, _PicoCartLoadProgressCB@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PicoCartLoadProgressCB@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	str	w8, [x9]
Lloh14:
	adrp	x8, _cdload_progress_cb@GOTPAGE
Lloh15:
	ldr	x8, [x8, _cdload_progress_cb@GOTPAGEOFF]
Lloh16:
	adrp	x9, _PicoCDLoadProgressCB@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PicoCDLoadProgressCB@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	str	w8, [x9]
Lloh20:
	adrp	x8, _lcdr_line@GOTPAGE
Lloh21:
	ldr	x8, [x8, _lcdr_line@GOTPAGEOFF]
	mov	w9, #2
Lloh22:
	str	w9, [x8]
	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	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_rom_loaded,8,3                 ; @rom_loaded
	.comm	_psp_screen,4,2                 ; @psp_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
	.comm	_cdload_progress_cb,4,2         ; @cdload_progress_cb
	.comm	_PicoCDLoadProgressCB,4,2       ; @PicoCDLoadProgressCB
	.comm	_lcdr_line,4,2                  ; @lcdr_line
.subsections_via_symbols
