	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function menu_enter
_menu_enter:                            ## @menu_enter
	.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
	subq	$264, %rsp                      ## imm = 0x108
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	testl	%edi, %edi
	je	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	callq	_make_bg
	jmp	LBB0_4
LBB0_2:
	leaq	-304(%rbp), %r14
	movq	%r14, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_plat_get_skin_dir
	cltq
	leaq	(%rax,%rbp), %rdi
	addq	$-304, %rdi                     ## imm = 0xFED0
	leaq	L_.str(%rip), %rsi
	callq	_strcpy
	movq	_g_menubg_ptr@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_READPNG_BG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_g_menuscreen_w@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	_g_menuscreen_h@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	movq	%r14, %rsi
	callq	_readpng
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	movl	(%r12), %edx
	imull	(%r13), %edx
	addl	%edx, %edx
	xorl	%esi, %esi
	callq	_memset
LBB0_4:
	movl	%ebx, %edi
	callq	_plat_video_menu_enter
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	addq	$264, %rsp                      ## imm = 0x108
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"background.png"

	.comm	_g_menubg_ptr,4,2               ## @g_menubg_ptr
	.comm	_READPNG_BG,4,2                 ## @READPNG_BG
	.comm	_g_menuscreen_w,4,2             ## @g_menuscreen_w
	.comm	_g_menuscreen_h,4,2             ## @g_menuscreen_h
	.no_dead_strip	_menu_enter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function menu_enter
_menu_enter:                            ; @menu_enter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #336
	.cfi_def_cfa_offset 336
	stp	x28, x27, [sp, #272]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #288]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #304]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #320]            ; 16-byte Folded Spill
	add	x29, sp, #320
	.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 w27, -56
	.cfi_offset w28, -64
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	cbz	w0, LBB0_2
; %bb.1:
	mov	w0, #0
	bl	_make_bg
	b	LBB0_4
LBB0_2:
	add	x20, sp, #8
	add	x0, sp, #8
	mov	w1, #256
	bl	_plat_get_skin_dir
	add	x0, x20, w0, sxtw
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcpy
Lloh5:
	adrp	x20, _g_menubg_ptr@GOTPAGE
Lloh6:
	ldr	x20, [x20, _g_menubg_ptr@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh7:
	adrp	x8, _READPNG_BG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _READPNG_BG@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x21, _g_menuscreen_w@GOTPAGE
Lloh11:
	ldr	x21, [x21, _g_menuscreen_w@GOTPAGEOFF]
	ldr	w3, [x21]
Lloh12:
	adrp	x22, _g_menuscreen_h@GOTPAGE
Lloh13:
	ldr	x22, [x22, _g_menuscreen_h@GOTPAGEOFF]
	ldr	w4, [x22]
	add	x1, sp, #8
	bl	_readpng
	tbz	x0, #63, LBB0_4
; %bb.3:
	ldr	w0, [x20]
	ldr	w8, [x21]
	ldr	w9, [x22]
	mul	w8, w8, w9
	lsl	w2, w8, #1
	mov	w1, #0
	bl	_memset
LBB0_4:
	mov	x0, x19
	bl	_plat_video_menu_enter
	ldur	x8, [x29, #-56]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #320]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #304]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #288]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #336
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"background.png"

	.comm	_g_menubg_ptr,4,2               ; @g_menubg_ptr
	.comm	_READPNG_BG,4,2                 ; @READPNG_BG
	.comm	_g_menuscreen_w,4,2             ; @g_menuscreen_w
	.comm	_g_menuscreen_h,4,2             ; @g_menuscreen_h
	.no_dead_strip	_menu_enter
.subsections_via_symbols
