	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_SPPostgameMenu_NextEvent
_UI_SPPostgameMenu_NextEvent:           ## @UI_SPPostgameMenu_NextEvent
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_QM_ACTIVATED@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_7
## %bb.1:
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_UI_PopMenu
	movq	_postgameMenuInfo@GOTPCREL(%rip), %r12
	movl	8(%r12), %ebx
	incl	%ebx
	cmpq	$0, (%r12)
	cmovel	%r14d, %ebx
	movq	_ARENAS_PER_TIER@GOTPCREL(%rip), %r13
	movl	%ebx, %eax
	cltd
	idivl	(%r13)
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_UI_GetCurrentGame
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_3
## %bb.2:
	movl	8(%r12), %r15d
LBB0_3:
	movl	%r15d, %eax
	cltd
	idivl	(%r13)
	cmpl	%eax, %r14d
	jg	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_UI_GetNumSPTiers
	cmpl	%eax, %r14d
	jne	LBB0_6
LBB0_5:
	movl	%r15d, %ebx
LBB0_6:
	movl	%ebx, %edi
	callq	_UI_GetArenaInfoByNumber
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_UI_SPArena_Start               ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QM_ACTIVATED,4,2               ## @QM_ACTIVATED
	.comm	_postgameMenuInfo,16,3          ## @postgameMenuInfo
	.comm	_ARENAS_PER_TIER,4,2            ## @ARENAS_PER_TIER
	.no_dead_strip	_UI_SPPostgameMenu_NextEvent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_SPPostgameMenu_NextEvent
_UI_SPPostgameMenu_NextEvent:           ; @UI_SPPostgameMenu_NextEvent
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [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 w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _QM_ACTIVATED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QM_ACTIVATED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_6
; %bb.1:
	bl	_UI_PopMenu
Lloh3:
	adrp	x21, _postgameMenuInfo@GOTPAGE
Lloh4:
	ldr	x21, [x21, _postgameMenuInfo@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w9, [x21, #8]
	cmp	x8, #0
	csinc	w19, wzr, w9, eq
Lloh5:
	adrp	x22, _ARENAS_PER_TIER@GOTPAGE
Lloh6:
	ldr	x22, [x22, _ARENAS_PER_TIER@GOTPAGEOFF]
	ldr	w8, [x22]
	sdiv	w20, w19, w8
	bl	_UI_GetCurrentGame
	ldr	w8, [x21, #8]
	cmn	w0, #1
	csel	w21, w8, w0, eq
	ldr	w8, [x22]
	sdiv	w8, w21, w8
	cmp	w20, w8
	b.gt	LBB0_3
; %bb.2:
	bl	_UI_GetNumSPTiers
	cmp	w20, w0
	b.ne	LBB0_4
LBB0_3:
	mov	x19, x21
LBB0_4:
	mov	x0, x19
	bl	_UI_GetArenaInfoByNumber
	cbz	x0, LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_UI_SPArena_Start
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_QM_ACTIVATED,4,2               ; @QM_ACTIVATED
	.comm	_postgameMenuInfo,16,3          ; @postgameMenuInfo
	.comm	_ARENAS_PER_TIER,4,2            ; @ARENAS_PER_TIER
	.no_dead_strip	_UI_SPPostgameMenu_NextEvent
.subsections_via_symbols
