	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UI_Load                        ## -- Begin function UI_Load
	.p2align	4, 0x90
_UI_Load:                               ## @UI_Load
	.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
	subq	$1040, %rsp                     ## imm = 0x410
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	xorl	%eax, %eax
	callq	_Menu_GetFocused
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_UI_Cvar_VariableString
	movq	%rax, %r14
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	leaq	-1056(%rbp), %rdi
	callq	_strcpy
LBB0_3:
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	cmpb	$0, (%r14)
	jne	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %r14
LBB0_6:
	xorl	%eax, %eax
	callq	_String_Init
	leaq	L_.str.2(%rip), %rdi
	callq	_UI_ParseGameInfo
	xorl	%eax, %eax
	callq	_UI_LoadArenas
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_UI_LoadMenus
	xorl	%eax, %eax
	callq	_Menus_CloseAll
	leaq	-1056(%rbp), %rdi
	callq	_Menus_ActivateByName
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	addq	$1040, %rsp                     ## imm = 0x410
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ui_menuFiles"

L_.str.1:                               ## @.str.1
	.asciz	"ui/menus.txt"

L_.str.2:                               ## @.str.2
	.asciz	"gameinfo.txt"

	.comm	_qtrue,4,2                      ## @qtrue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UI_Load                        ; -- Begin function UI_Load
	.p2align	2
_UI_Load:                               ; @UI_Load
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [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 w27, -40
	.cfi_offset w28, -48
	sub	sp, sp, #1040
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_Menu_GetFocused
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_UI_Cvar_VariableString
	mov	x19, x0
	cbz	x20, LBB0_3
; %bb.1:
	ldr	x1, [x20]
	cbz	x1, LBB0_3
; %bb.2:
	add	x0, sp, #8
	bl	_strcpy
LBB0_3:
	cbz	x19, LBB0_5
; %bb.4:
	ldrb	w8, [x19]
	cbnz	w8, LBB0_6
LBB0_5:
Lloh5:
	adrp	x19, l_.str.1@PAGE
Lloh6:
	add	x19, x19, l_.str.1@PAGEOFF
LBB0_6:
	bl	_String_Init
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_UI_ParseGameInfo
	bl	_UI_LoadArenas
Lloh9:
	adrp	x8, _qtrue@GOTPAGE
Lloh10:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_UI_LoadMenus
	bl	_Menus_CloseAll
	add	x0, sp, #8
	bl	_Menus_ActivateByName
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ui_menuFiles"

l_.str.1:                               ; @.str.1
	.asciz	"ui/menus.txt"

l_.str.2:                               ; @.str.2
	.asciz	"gameinfo.txt"

	.comm	_qtrue,4,2                      ; @qtrue
.subsections_via_symbols
