	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function menu_opt3_preview
_menu_opt3_preview:                     ## @menu_opt3_preview
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_rom_loaded@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_Pico@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	48(%rax), %eax
	notl	%eax
	andl	$1, %eax
	cmpl	%edi, %eax
	je	LBB0_8
LBB0_2:
	testl	%edi, %edi
	movq	_bgdatac32_start@GOTPCREL(%rip), %rdx
	cmoveq	_bgdatac40_start@GOTPCREL(%rip), %rdx
	movq	_bgdatac32_size@GOTPCREL(%rip), %rax
	cmoveq	_bgdatac40_size@GOTPCREL(%rip), %rax
	movslq	(%rax), %rcx
	movq	$65856, -32(%rbp)               ## imm = 0x10140
	movq	_bg_buffer@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	leaq	-32(%rbp), %rsi
	callq	_uncompress
	testl	%eax, %eax
	je	LBB0_3
## %bb.7:
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_lprintf
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_3:
	cmpq	$0, (%rbx)
	je	LBB0_4
## %bb.5:
	xorl	%eax, %eax
	callq	_get_oldstate_for_preview
	movq	%rax, %rbx
	jmp	LBB0_6
LBB0_4:
	xorl	%ebx, %ebx
LBB0_6:
	movq	_Pico@GOTPCREL(%rip), %r14
	movq	24(%r14), %rdi
	movq	(%r15), %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	16(%r14), %rdi
	movl	$65536, %esi                    ## imm = 0x10000
	addq	(%r15), %rsi
	movl	$128, %edx
	callq	_memcpy
	movq	8(%r14), %rdi
	movl	$65664, %esi                    ## imm = 0x10080
	addq	(%r15), %rsi
	movl	$128, %edx
	callq	_memcpy
	movl	$65792, %esi                    ## imm = 0x10100
	addq	(%r15), %rsi
	movq	%r14, %rdi
	movl	$64, %edx
	callq	_memcpy
LBB0_9:
	movq	_psp_screen@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	movl	$69632, %edx                    ## imm = 0x11000
	callq	_memset32_uncached
	xorl	%edi, %edi
	callq	_emu_forcedFrame
	movl	$1, %edi
	xorl	%esi, %esi
	callq	_menu_prepare_bg
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_restore_oldstate
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rom_loaded,8,3                 ## @rom_loaded
	.comm	_Pico,32,3                      ## @Pico
	.comm	_bg_buffer,8,3                  ## @bg_buffer
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"uncompress returned %i\n"

	.comm	_psp_screen,4,2                 ## @psp_screen
	.no_dead_strip	_menu_opt3_preview
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function menu_opt3_preview
_menu_opt3_preview:                     ; @menu_opt3_preview
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, _rom_loaded@GOTPAGE
Lloh1:
	ldr	x19, [x19, _rom_loaded@GOTPAGEOFF]
	ldr	x8, [x19]
	cbz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _Pico@GOTPAGE
Lloh3:
	ldr	x8, [x8, _Pico@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	w8, [x8, #48]
	mvn	w8, w8
	and	w8, w8, #0x1
	cmp	w8, w0
	b.eq	LBB0_4
LBB0_2:
Lloh5:
	adrp	x8, _bgdatac32_start@GOTPAGE
Lloh6:
	ldr	x8, [x8, _bgdatac32_start@GOTPAGEOFF]
Lloh7:
	adrp	x9, _bgdatac40_start@GOTPAGE
Lloh8:
	ldr	x9, [x9, _bgdatac40_start@GOTPAGEOFF]
	cmp	w0, #0
	csel	x2, x9, x8, eq
Lloh9:
	adrp	x8, _bgdatac32_size@GOTPAGE
Lloh10:
	ldr	x8, [x8, _bgdatac32_size@GOTPAGEOFF]
Lloh11:
	adrp	x9, _bgdatac40_size@GOTPAGE
Lloh12:
	ldr	x9, [x9, _bgdatac40_size@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldrsw	x3, [x8]
	mov	w8, #320
	movk	w8, #1, lsl #16
	str	x8, [sp, #8]
Lloh13:
	adrp	x21, _bg_buffer@GOTPAGE
Lloh14:
	ldr	x21, [x21, _bg_buffer@GOTPAGEOFF]
	ldr	x0, [x21]
	add	x1, sp, #8
	bl	_uncompress
	cbz	w0, LBB0_5
; %bb.3:
	mov	x1, x0
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lprintf
LBB0_4:
	mov	x19, #0
	b	LBB0_9
LBB0_5:
	ldr	x8, [x19]
	cbz	x8, LBB0_7
; %bb.6:
	bl	_get_oldstate_for_preview
	mov	x19, x0
	b	LBB0_8
LBB0_7:
	mov	x19, #0
LBB0_8:
Lloh17:
	adrp	x20, _Pico@GOTPAGE
Lloh18:
	ldr	x20, [x20, _Pico@GOTPAGEOFF]
	ldr	x0, [x20, #24]
	ldr	x1, [x21]
	mov	w2, #8
	bl	_memcpy
	ldr	x0, [x20, #16]
	ldr	x8, [x21]
	add	x1, x8, #16, lsl #12            ; =65536
	mov	w2, #128
	bl	_memcpy
	ldr	x0, [x20, #8]
	ldr	x8, [x21]
	add	x8, x8, #16, lsl #12            ; =65536
	add	x1, x8, #128
	mov	w2, #128
	bl	_memcpy
	ldr	x8, [x21]
	add	x8, x8, #16, lsl #12            ; =65536
	add	x1, x8, #256
	mov	x0, x20
	mov	w2, #64
	bl	_memcpy
LBB0_9:
Lloh19:
	adrp	x8, _psp_screen@GOTPAGE
Lloh20:
	ldr	x8, [x8, _psp_screen@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	w1, #0
	mov	w2, #4096
	movk	w2, #1, lsl #16
	bl	_memset32_uncached
	mov	w0, #0
	bl	_emu_forcedFrame
	mov	w0, #1
	mov	w1, #0
	bl	_menu_prepare_bg
	cbz	x19, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_restore_oldstate
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_rom_loaded,8,3                 ; @rom_loaded
	.comm	_Pico,32,3                      ; @Pico
	.comm	_bg_buffer,8,3                  ; @bg_buffer
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"uncompress returned %i\n"

	.comm	_psp_screen,4,2                 ; @psp_screen
	.no_dead_strip	_menu_opt3_preview
.subsections_via_symbols
