	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_Skill_HandleKey
_UI_Skill_HandleKey:                    ## @UI_Skill_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	_K_MOUSE1@GOTPCREL(%rip), %rax
	movq	_K_MOUSE2@GOTPCREL(%rip), %r15
	cmpl	%edx, (%rax)
	je	LBB0_5
## %bb.1:
	cmpl	%ebx, (%r15)
	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), %rax
	jmp	LBB0_6
LBB0_5:
	leaq	L_.str(%rip), %r14
	movq	%r14, %rdi
	callq	_trap_Cvar_VariableValue
                                        ## kill: def $eax killed $eax def $rax
	xorl	%ecx, %ecx
	cmpl	%ebx, (%r15)
	setne	%cl
	leal	(%rax,%rcx,2), %eax
	decl	%eax
	movq	_numSkillLevels@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	movl	$1, %esi
	cmovlel	%eax, %esi
	testl	%eax, %eax
	cmovlel	%ecx, %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_va
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_trap_Cvar_Set
	movq	_qtrue@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"g_spSkill"

	.comm	_numSkillLevels,4,2             ## @numSkillLevels
L_.str.1:                               ## @.str.1
	.asciz	"%i"

	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_qfalse,4,2                     ## @qfalse
	.no_dead_strip	_UI_Skill_HandleKey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_Skill_HandleKey
_UI_Skill_HandleKey:                    ; @UI_Skill_HandleKey
	.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, _K_MOUSE1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _K_MOUSE1@GOTPAGEOFF]
Lloh2:
	adrp	x21, _K_MOUSE2@GOTPAGE
Lloh3:
	ldr	x21, [x21, _K_MOUSE2@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x21]
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_2
; %bb.1:
	mov	x19, x2
Lloh11:
	adrp	x20, l_.str@PAGE
Lloh12:
	add	x20, x20, l_.str@PAGEOFF
	mov	x0, x20
	bl	_trap_Cvar_VariableValue
	ldr	w8, [x21]
	sub	w9, w0, #1
	cmp	w8, w19
Lloh13:
	adrp	x8, _numSkillLevels@GOTPAGE
Lloh14:
	ldr	x8, [x8, _numSkillLevels@GOTPAGEOFF]
	csinc	w9, w9, w0, eq
Lloh15:
	ldr	w8, [x8]
	cmp	w9, w8
	csinc	w10, w9, wzr, le
	cmp	w9, #1
	csel	w1, w8, w10, lt
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_va
	mov	x1, x0
	mov	x0, x20
	bl	_trap_Cvar_Set
Lloh18:
	adrp	x8, _qtrue@GOTPAGE
Lloh19:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh20:
	adrp	x8, _qfalse@GOTPAGE
Lloh21:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	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	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh20, Lloh21
	.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
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"g_spSkill"

	.comm	_numSkillLevels,4,2             ; @numSkillLevels
l_.str.1:                               ; @.str.1
	.asciz	"%i"

	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_qfalse,4,2                     ; @qfalse
	.no_dead_strip	_UI_Skill_HandleKey
.subsections_via_symbols
