	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_SPLevelMenu_SetMenuItems
_UI_SPLevelMenu_SetMenuItems:           ## @UI_SPLevelMenu_SetMenuItems
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_selectedArenaSet@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_currentSet@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jle	LBB0_2
## %bb.1:
	movq	_selectedArena@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
	movl	$-1, %eax
	jmp	LBB0_3
LBB0_2:
	movq	_selectedArena@GOTPCREL(%rip), %rcx
	movl	(%rcx), %eax
	cmpl	$-1, %eax
	je	LBB0_6
LBB0_3:
	movq	_trainingTier@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %esi
	je	LBB0_8
## %bb.4:
	movq	_finalTier@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %esi
	je	LBB0_8
## %bb.5:
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.10:
	cmpl	%ecx, %esi
	jne	LBB0_13
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_12
LBB0_6:
	movl	$0, (%rcx)
	movq	_trainingTier@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	movq	_finalTier@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %esi
	jne	LBB0_9
LBB0_8:
	movq	_selectedArena@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	xorl	%eax, %eax
LBB0_9:
	movq	_ARENAS_PER_TIER@GOTPCREL(%rip), %rcx
	imull	(%rcx), %esi
	addl	%eax, %esi
	leaq	L_.str(%rip), %rdi
	callq	_trap_Cvar_SetValue
	movl	(%r14), %esi
	movq	_trainingTier@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %esi
	je	LBB0_11
LBB0_13:
	movq	_finalTier@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_15
## %bb.14:
	leaq	L_.str.3(%rip), %rdi
LBB0_12:
	callq	_UI_GetSpecialArenaInfo
	movq	%rax, %rbx
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	callq	_Info_ValueForKey
	movl	%eax, %edi
	callq	_atoi
	xorl	%edi, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_UI_SPLevelMenu_SetMenuArena
	movq	_levelMenuInfo@GOTPCREL(%rip), %r15
	movq	%rbx, (%r15)
	movq	24(%r15), %rdi
	movl	$256, (%rdi)                    ## imm = 0x100
	callq	_Bitmap_Init
	movq	24(%r15), %rax
	addl	$32, 4(%rax)
	movl	$1, 8(%r15)
	movq	_QMF_INACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 32(%rax)
	orl	%ecx, 56(%rax)
	orl	%ecx, 80(%rax)
	movq	32(%r15), %rcx
	movq	8(%rcx), %rdx
	movq	$0, (%rdx)
	movq	16(%rcx), %rdx
	movq	$0, (%rdx)
	movq	24(%rcx), %rcx
	movq	$0, (%rcx)
	movq	$0, 40(%rax)
	movq	$0, 64(%rax)
	movq	$0, 88(%rax)
LBB0_17:
	movl	(%r14), %ecx
	movq	_QMF_INACTIVE@GOTPCREL(%rip), %rdx
	movq	_QMF_HIDDEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rdx), %eax
	movq	_minTier@GOTPCREL(%rip), %rsi
	movl	%eax, %edx
	notl	%edx
	cmpl	(%rsi), %ecx
	jne	LBB0_19
## %bb.18:
	movq	_levelMenuInfo@GOTPCREL(%rip), %rsi
	movl	16(%rsi), %edi
	orl	%eax, %edi
	jmp	LBB0_20
LBB0_19:
	movq	_levelMenuInfo@GOTPCREL(%rip), %rsi
	movl	16(%rsi), %edi
	andl	%edx, %edi
LBB0_20:
	movq	_levelMenuInfo@GOTPCREL(%rip), %rsi
	movl	%edi, 16(%rsi)
	movq	_maxTier@GOTPCREL(%rip), %rdi
	cmpl	(%rdi), %ecx
	jne	LBB0_22
## %bb.21:
	orl	12(%rsi), %eax
	jmp	LBB0_23
LBB0_22:
	andl	12(%rsi), %edx
	movl	%edx, %eax
LBB0_23:
	movl	%eax, 12(%rsi)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_UI_SPLevelMenu_SetBots         ## TAILCALL
LBB0_15:
	movq	_levelMenuInfo@GOTPCREL(%rip), %r15
	movq	24(%r15), %rdi
	movl	$46, (%rdi)
	callq	_Bitmap_Init
	movq	24(%r15), %rax
	addl	$18, 4(%rax)
	movl	$4, 8(%r15)
	movq	_ARENAS_PER_TIER@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	imull	(%r14), %ebx
	movl	%ebx, %edi
	callq	_UI_GetArenaInfoByNumber
	xorl	%edi, %edi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_UI_SPLevelMenu_SetMenuArena
	movl	(%r12), %ebx
	imull	(%r14), %ebx
	incl	%ebx
	movl	%ebx, %edi
	callq	_UI_GetArenaInfoByNumber
	movl	$1, %edi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_UI_SPLevelMenu_SetMenuArena
	movl	(%r12), %ebx
	imull	(%r14), %ebx
	addl	$2, %ebx
	movl	%ebx, %edi
	callq	_UI_GetArenaInfoByNumber
	movl	$2, %edi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_UI_SPLevelMenu_SetMenuArena
	movl	(%r12), %ebx
	imull	(%r14), %ebx
	addl	$3, %ebx
	movl	%ebx, %edi
	callq	_UI_GetArenaInfoByNumber
	movl	$3, %edi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_UI_SPLevelMenu_SetMenuArena
	movq	_selectedArena@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$-1, %eax
	je	LBB0_17
## %bb.16:
	movl	(%r12), %edi
	imull	(%r14), %edi
	addl	%eax, %edi
	callq	_UI_GetArenaInfoByNumber
	movq	%rax, (%r15)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_selectedArenaSet,4,2           ## @selectedArenaSet
	.comm	_currentSet,4,2                 ## @currentSet
	.comm	_selectedArena,4,2              ## @selectedArena
	.comm	_trainingTier,4,2               ## @trainingTier
	.comm	_finalTier,4,2                  ## @finalTier
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ui_spSelection"

	.comm	_ARENAS_PER_TIER,4,2            ## @ARENAS_PER_TIER
L_.str.1:                               ## @.str.1
	.asciz	"training"

L_.str.2:                               ## @.str.2
	.asciz	"num"

	.comm	_levelMenuInfo,40,3             ## @levelMenuInfo
	.comm	_QMF_INACTIVE,4,2               ## @QMF_INACTIVE
L_.str.3:                               ## @.str.3
	.asciz	"final"

	.comm	_minTier,4,2                    ## @minTier
	.comm	_QMF_HIDDEN,4,2                 ## @QMF_HIDDEN
	.comm	_maxTier,4,2                    ## @maxTier
	.no_dead_strip	_UI_SPLevelMenu_SetMenuItems
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_SPLevelMenu_SetMenuItems
_UI_SPLevelMenu_SetMenuItems:           ; @UI_SPLevelMenu_SetMenuItems
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x20, _selectedArenaSet@GOTPAGE
Lloh1:
	ldr	x20, [x20, _selectedArenaSet@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _currentSet@GOTPAGE
Lloh3:
	ldr	x9, [x9, _currentSet@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x23, _ARENAS_PER_TIER@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ARENAS_PER_TIER@GOTPAGEOFF]
Lloh7:
	adrp	x19, _trainingTier@GOTPAGE
Lloh8:
	ldr	x19, [x19, _trainingTier@GOTPAGEOFF]
Lloh9:
	adrp	x10, _selectedArena@GOTPAGE
Lloh10:
	ldr	x10, [x10, _selectedArena@GOTPAGEOFF]
	cmp	w8, w9
	b.le	LBB0_2
; %bb.1:
	mov	w9, #-1
	str	w9, [x10]
	b	LBB0_3
LBB0_2:
	ldr	w9, [x10]
	cmn	w9, #1
	b.eq	LBB0_6
LBB0_3:
	ldr	w10, [x19]
Lloh11:
	adrp	x11, _finalTier@GOTPAGE
Lloh12:
	ldr	x11, [x11, _finalTier@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	cmp	w8, w10
	ccmp	w8, w11, #4, ne
	b.ne	LBB0_5
LBB0_4:
	mov	w9, #0
Lloh14:
	adrp	x10, _selectedArena@GOTPAGE
Lloh15:
	ldr	x10, [x10, _selectedArena@GOTPAGEOFF]
Lloh16:
	str	wzr, [x10]
	b	LBB0_7
LBB0_5:
	cmn	w9, #1
	b.ne	LBB0_7
	b	LBB0_8
LBB0_6:
	mov	w9, #0
	str	wzr, [x10]
	ldr	w10, [x19]
Lloh17:
	adrp	x11, _finalTier@GOTPAGE
Lloh18:
	ldr	x11, [x11, _finalTier@GOTPAGEOFF]
Lloh19:
	ldr	w11, [x11]
	cmp	w8, w10
	ccmp	w8, w11, #4, ne
	b.eq	LBB0_4
LBB0_7:
	ldr	w10, [x23]
	madd	w1, w10, w8, w9
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trap_Cvar_SetValue
	ldr	w8, [x20]
	ldr	w10, [x19]
LBB0_8:
Lloh22:
	adrp	x22, _QMF_INACTIVE@GOTPAGE
Lloh23:
	ldr	x22, [x22, _QMF_INACTIVE@GOTPAGEOFF]
Lloh24:
	adrp	x21, _levelMenuInfo@GOTPAGE
Lloh25:
	ldr	x21, [x21, _levelMenuInfo@GOTPAGEOFF]
	cmp	w8, w10
	b.ne	LBB0_10
; %bb.9:
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_10:
Lloh28:
	adrp	x9, _finalTier@GOTPAGE
Lloh29:
	ldr	x9, [x9, _finalTier@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_20
; %bb.11:
Lloh31:
	adrp	x0, l_.str.3@PAGE
Lloh32:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_12:
	bl	_UI_GetSpecialArenaInfo
	mov	x19, x0
Lloh33:
	adrp	x1, l_.str.2@PAGE
Lloh34:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_Info_ValueForKey
	bl	_atoi
	mov	x1, x0
	mov	w0, #0
	mov	x2, x19
	bl	_UI_SPLevelMenu_SetMenuArena
	str	x19, [x21]
	ldr	x0, [x21, #24]
	mov	w8, #256
	str	w8, [x0]
	bl	_Bitmap_Init
	ldp	x8, x9, [x21, #24]
	ldr	w10, [x8, #4]
	add	w10, w10, #32
	str	w10, [x8, #4]
	mov	w10, #1
	str	w10, [x21, #8]
	ldr	w10, [x22]
	ldr	w11, [x8, #32]
	orr	w11, w11, w10
	str	w11, [x8, #32]
	ldr	w11, [x8, #56]
	orr	w11, w11, w10
	str	w11, [x8, #56]
	ldr	w11, [x8, #80]
	orr	w10, w11, w10
	str	w10, [x8, #80]
	ldp	x10, x11, [x9, #8]
	str	xzr, [x10]
	str	xzr, [x11]
	ldr	x9, [x9, #24]
	str	xzr, [x9]
	str	xzr, [x8, #40]
	str	xzr, [x8, #64]
	str	xzr, [x8, #88]
LBB0_13:
	ldr	w9, [x20]
Lloh35:
	adrp	x8, _minTier@GOTPAGE
Lloh36:
	ldr	x8, [x8, _minTier@GOTPAGEOFF]
Lloh37:
	ldr	w10, [x8]
	ldr	w8, [x22]
Lloh38:
	adrp	x11, _QMF_HIDDEN@GOTPAGE
Lloh39:
	ldr	x11, [x11, _QMF_HIDDEN@GOTPAGEOFF]
Lloh40:
	ldr	w11, [x11]
	orr	w8, w11, w8
	cmp	w9, w10
	b.ne	LBB0_15
; %bb.14:
	ldr	w10, [x21, #16]
	orr	w10, w8, w10
	b	LBB0_16
LBB0_15:
	ldr	w10, [x21, #16]
	bic	w10, w10, w8
LBB0_16:
	str	w10, [x21, #16]
Lloh41:
	adrp	x10, _maxTier@GOTPAGE
Lloh42:
	ldr	x10, [x10, _maxTier@GOTPAGEOFF]
Lloh43:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_18
; %bb.17:
	ldr	w9, [x21, #12]
	orr	w8, w8, w9
	b	LBB0_19
LBB0_18:
	ldr	w9, [x21, #12]
	bic	w8, w9, w8
LBB0_19:
	str	w8, [x21, #12]
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_UI_SPLevelMenu_SetBots
LBB0_20:
	ldr	x0, [x21, #24]
	mov	w8, #46
	str	w8, [x0]
	bl	_Bitmap_Init
	ldr	x8, [x21, #24]
	ldr	w9, [x8, #4]
	add	w9, w9, #18
	str	w9, [x8, #4]
	mov	w8, #4
	str	w8, [x21, #8]
	ldr	w8, [x20]
	ldr	w9, [x23]
	mul	w19, w9, w8
	mov	x0, x19
	bl	_UI_GetArenaInfoByNumber
	mov	x2, x0
	mov	w0, #0
	mov	x1, x19
	bl	_UI_SPLevelMenu_SetMenuArena
	ldr	w8, [x20]
	ldr	w9, [x23]
	orr	w10, wzr, #0x1
	madd	w19, w9, w8, w10
	mov	x0, x19
	bl	_UI_GetArenaInfoByNumber
	mov	x2, x0
	mov	w0, #1
	mov	x1, x19
	bl	_UI_SPLevelMenu_SetMenuArena
	ldr	w8, [x20]
	ldr	w9, [x23]
	orr	w10, wzr, #0x2
	madd	w19, w9, w8, w10
	mov	x0, x19
	bl	_UI_GetArenaInfoByNumber
	mov	x2, x0
	mov	w0, #2
	mov	x1, x19
	bl	_UI_SPLevelMenu_SetMenuArena
	ldr	w8, [x20]
	ldr	w9, [x23]
	orr	w10, wzr, #0x3
	madd	w19, w9, w8, w10
	mov	x0, x19
	bl	_UI_GetArenaInfoByNumber
	mov	x2, x0
	mov	w0, #3
	mov	x1, x19
	bl	_UI_SPLevelMenu_SetMenuArena
Lloh44:
	adrp	x8, _selectedArena@GOTPAGE
Lloh45:
	ldr	x8, [x8, _selectedArena@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	cmn	w8, #1
	b.eq	LBB0_13
; %bb.21:
	ldr	w9, [x20]
	ldr	w10, [x23]
	madd	w0, w10, w9, w8
	bl	_UI_GetArenaInfoByNumber
	str	x0, [x21]
	b	LBB0_13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_selectedArenaSet,4,2           ; @selectedArenaSet
	.comm	_currentSet,4,2                 ; @currentSet
	.comm	_selectedArena,4,2              ; @selectedArena
	.comm	_trainingTier,4,2               ; @trainingTier
	.comm	_finalTier,4,2                  ; @finalTier
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ui_spSelection"

	.comm	_ARENAS_PER_TIER,4,2            ; @ARENAS_PER_TIER
l_.str.1:                               ; @.str.1
	.asciz	"training"

l_.str.2:                               ; @.str.2
	.asciz	"num"

	.comm	_levelMenuInfo,40,3             ; @levelMenuInfo
	.comm	_QMF_INACTIVE,4,2               ; @QMF_INACTIVE
l_.str.3:                               ; @.str.3
	.asciz	"final"

	.comm	_minTier,4,2                    ; @minTier
	.comm	_QMF_HIDDEN,4,2                 ; @QMF_HIDDEN
	.comm	_maxTier,4,2                    ; @maxTier
	.no_dead_strip	_UI_SPLevelMenu_SetMenuItems
.subsections_via_symbols
