	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_GameType_HandleKey
_UI_GameType_HandleKey:                 ## @UI_GameType_HandleKey
	.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	%rcx, %r15
	movl	%edx, %ebx
	movq	_K_MOUSE1@GOTPCREL(%rip), %rax
	movq	_K_MOUSE2@GOTPCREL(%rip), %r14
	cmpl	%edx, (%rax)
	je	LBB0_5
## %bb.1:
	cmpl	%ebx, (%r14)
	je	LBB0_5
## %bb.2:
	movq	_K_ENTER@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_5
## %bb.3:
	movq	_K_KP_ENTER@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	je	LBB0_5
## %bb.4:
	movq	_qfalse@GOTPCREL(%rip), %r12
	jmp	LBB0_15
LBB0_5:
	movq	_qtrue@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_UI_MapCountByGameType
	movq	_ui_gameType@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	cmpl	%ebx, (%r14)
	jne	LBB0_9
## %bb.6:
	movl	%eax, %r14d
	leal	-1(%rsi), %edx
	movl	%edx, (%r13)
	movl	$1, %ecx
	cmpl	$2, %edx
	je	LBB0_11
## %bb.7:
	cmpl	$2, %esi
	jg	LBB0_12
## %bb.8:
	movq	_uiInfo@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	decl	%ecx
	jmp	LBB0_11
LBB0_9:
	movl	%eax, %r14d
	incl	%esi
	movl	%esi, (%r13)
	movq	_uiInfo@GOTPCREL(%rip), %rdx
	movl	$1, %ecx
	cmpl	(%rdx), %esi
	jge	LBB0_11
## %bb.10:
	movl	$3, %ecx
	movl	%esi, %edx
	cmpl	$2, %esi
	jne	LBB0_12
LBB0_11:
	movl	%ecx, (%r13)
	movl	%ecx, %edx
LBB0_12:
	movq	_uiInfo@GOTPCREL(%rip), %rbx
	movq	8(%rbx), %rax
	movslq	%edx, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	_GT_TOURNAMENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_trap_Cvar_Set
	movslq	(%r13), %rsi
	leaq	L_.str.4(%rip), %rdi
	callq	_va
	leaq	L_.str.3(%rip), %rdi
	movq	%rax, %rsi
	callq	_trap_Cvar_Set
	movq	(%r12), %rdi
	callq	_UI_SetCapFragLimits
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	_ui_currentMap@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	(%rcx,%rdx,4), %edi
	movslq	(%r13), %rcx
	movq	(%rax,%rcx,8), %rsi
	callq	_UI_LoadBestScores
	testq	%r15, %r15
	je	LBB0_15
## %bb.13:
	movq	_qtrue@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_UI_MapCountByGameType
	cmpl	%eax, %r14d
	je	LBB0_15
## %bb.14:
	leaq	L_.str.5(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_trap_Cvar_Set
	movq	_FEEDER_MAPS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_Menu_SetFeederSelection
LBB0_15:
	movq	(%r12), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_K_MOUSE1,4,2                   ## @K_MOUSE1
	.comm	_K_MOUSE2,4,2                   ## @K_MOUSE2
	.comm	_K_ENTER,4,2                    ## @K_ENTER
	.comm	_K_KP_ENTER,4,2                 ## @K_KP_ENTER
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_ui_gameType,4,2                ## @ui_gameType
	.comm	_uiInfo,24,3                    ## @uiInfo
	.comm	_GT_TOURNAMENT,8,3              ## @GT_TOURNAMENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ui_Q3Model"

L_.str.1:                               ## @.str.1
	.asciz	"1"

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

L_.str.3:                               ## @.str.3
	.asciz	"ui_gameType"

L_.str.4:                               ## @.str.4
	.asciz	"%d"

	.comm	_ui_currentMap,8,3              ## @ui_currentMap
L_.str.5:                               ## @.str.5
	.asciz	"ui_currentMap"

	.comm	_FEEDER_MAPS,4,2                ## @FEEDER_MAPS
	.comm	_qfalse,8,3                     ## @qfalse
	.no_dead_strip	_UI_GameType_HandleKey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_GameType_HandleKey
_UI_GameType_HandleKey:                 ; @UI_GameType_HandleKey
	.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	x8, _K_MOUSE1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _K_MOUSE1@GOTPAGEOFF]
Lloh2:
	adrp	x23, _K_MOUSE2@GOTPAGE
Lloh3:
	ldr	x23, [x23, _K_MOUSE2@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x23]
Lloh5:
	adrp	x10, _K_ENTER@GOTPAGE
Lloh6:
	ldr	x10, [x10, _K_ENTER@GOTPAGEOFF]
Lloh7:
	adrp	x11, _K_KP_ENTER@GOTPAGE
Lloh8:
	ldr	x11, [x11, _K_KP_ENTER@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
Lloh10:
	ldr	w11, [x11]
	cmp	w8, w2
	ccmp	w9, w2, #4, ne
	ccmp	w10, w2, #4, ne
	ccmp	w11, w2, #4, ne
	b.ne	LBB0_5
; %bb.1:
	mov	x19, x3
	mov	x21, x2
Lloh11:
	adrp	x22, _qtrue@GOTPAGE
Lloh12:
	ldr	x22, [x22, _qtrue@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_UI_MapCountByGameType
	mov	x20, x0
	ldr	w8, [x23]
Lloh13:
	adrp	x23, _ui_gameType@GOTPAGE
Lloh14:
	ldr	x23, [x23, _ui_gameType@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh15:
	adrp	x24, _uiInfo@GOTPAGE
Lloh16:
	ldr	x24, [x24, _uiInfo@GOTPAGEOFF]
	cmp	w8, w21
	b.ne	LBB0_6
; %bb.2:
	sub	w8, w9, #1
	str	w8, [x23]
	cmp	w8, #2
	b.eq	LBB0_9
; %bb.3:
	cmp	w9, #2
	b.gt	LBB0_11
; %bb.4:
	ldr	w8, [x24]
	sub	w8, w8, #1
	b	LBB0_10
LBB0_5:
Lloh17:
	adrp	x22, _qfalse@GOTPAGE
Lloh18:
	ldr	x22, [x22, _qfalse@GOTPAGEOFF]
	b	LBB0_14
LBB0_6:
	add	w8, w9, #1
	str	w8, [x23]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ge	LBB0_9
; %bb.7:
	cmp	w8, #2
	b.ne	LBB0_11
; %bb.8:
	mov	w8, #3
	b	LBB0_10
LBB0_9:
	mov	w8, #1
LBB0_10:
	str	w8, [x23]
LBB0_11:
	ldr	x9, [x24, #8]
	ldr	x8, [x9, w8, sxtw #3]
Lloh19:
	adrp	x9, _GT_TOURNAMENT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _GT_TOURNAMENT@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
Lloh22:
	adrp	x10, l_.str.2@PAGE
Lloh23:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh24:
	adrp	x11, l_.str.1@PAGE
Lloh25:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	x8, x9
	csel	x1, x11, x10, eq
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trap_Cvar_Set
	ldrsw	x1, [x23]
Lloh28:
	adrp	x0, l_.str.4@PAGE
Lloh29:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_va
	mov	x1, x0
Lloh30:
	adrp	x0, l_.str.3@PAGE
Lloh31:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_trap_Cvar_Set
	ldr	x0, [x22]
	bl	_UI_SetCapFragLimits
Lloh32:
	adrp	x8, _ui_currentMap@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ui_currentMap@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	ldp	x10, x9, [x24, #8]
	ldr	w0, [x9, x8, lsl #2]
	ldrsw	x8, [x23]
	ldr	x1, [x10, x8, lsl #3]
	bl	_UI_LoadBestScores
	cbz	x19, LBB0_14
; %bb.12:
	ldr	x0, [x22]
	bl	_UI_MapCountByGameType
	cmp	w20, w0
	b.eq	LBB0_14
; %bb.13:
Lloh35:
	adrp	x0, l_.str.5@PAGE
Lloh36:
	add	x0, x0, l_.str.5@PAGEOFF
Lloh37:
	adrp	x1, l_.str.2@PAGE
Lloh38:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_trap_Cvar_Set
Lloh39:
	adrp	x8, _FEEDER_MAPS@GOTPAGE
Lloh40:
	ldr	x8, [x8, _FEEDER_MAPS@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, #0
	mov	w2, #0
	mov	x3, #0
	bl	_Menu_SetFeederSelection
Lloh42:
	adrp	x22, _qtrue@GOTPAGE
Lloh43:
	ldr	x22, [x22, _qtrue@GOTPAGEOFF]
LBB0_14:
	ldr	x0, [x22]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_K_MOUSE1,4,2                   ; @K_MOUSE1
	.comm	_K_MOUSE2,4,2                   ; @K_MOUSE2
	.comm	_K_ENTER,4,2                    ; @K_ENTER
	.comm	_K_KP_ENTER,4,2                 ; @K_KP_ENTER
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_ui_gameType,4,2                ; @ui_gameType
	.comm	_uiInfo,24,3                    ; @uiInfo
	.comm	_GT_TOURNAMENT,8,3              ; @GT_TOURNAMENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ui_Q3Model"

l_.str.1:                               ; @.str.1
	.asciz	"1"

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

l_.str.3:                               ; @.str.3
	.asciz	"ui_gameType"

l_.str.4:                               ; @.str.4
	.asciz	"%d"

	.comm	_ui_currentMap,8,3              ; @ui_currentMap
l_.str.5:                               ; @.str.5
	.asciz	"ui_currentMap"

	.comm	_FEEDER_MAPS,4,2                ; @FEEDER_MAPS
	.comm	_qfalse,8,3                     ; @qfalse
	.no_dead_strip	_UI_GameType_HandleKey
.subsections_via_symbols
