	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_SPSkillMenu_SkillEvent
_UI_SPSkillMenu_SkillEvent:             ## @UI_SPSkillMenu_SkillEvent
	.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	_QM_ACTIVATED@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %r14
	movq	%r14, %rdi
	callq	_trap_Cvar_VariableValue
	movq	_color_red@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_SetSkillColor
	movslq	(%rbx), %r15
	movq	_ID_BABY@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%r15, %rbx
	subq	%rax, %rbx
	leal	1(%rbx), %r12d
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_trap_Cvar_SetValue
	movq	_color_white@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_SetSkillColor
	movq	_skillMenuInfo@GOTPCREL(%rip), %rax
	movq	8(%rax), %rcx
	movl	(%rcx,%rbx,4), %ecx
	movl	%ecx, 16(%rax)
	movq	_ID_NIGHTMARE@GOTPCREL(%rip), %rcx
	leaq	4(%rax), %rdx
	cmpl	(%rcx), %r15d
	cmoveq	%rdx, %rax
	movl	(%rax), %edi
	movq	_CHAN_ANNOUNCER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trap_S_StartLocalSound         ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QM_ACTIVATED,4,2               ## @QM_ACTIVATED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"g_spSkill"

	.comm	_color_red,4,2                  ## @color_red
	.comm	_ID_BABY,4,2                    ## @ID_BABY
	.comm	_color_white,4,2                ## @color_white
	.comm	_skillMenuInfo,24,3             ## @skillMenuInfo
	.comm	_ID_NIGHTMARE,4,2               ## @ID_NIGHTMARE
	.comm	_CHAN_ANNOUNCER,4,2             ## @CHAN_ANNOUNCER
	.no_dead_strip	_UI_SPSkillMenu_SkillEvent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_SPSkillMenu_SkillEvent
_UI_SPSkillMenu_SkillEvent:             ; @UI_SPSkillMenu_SkillEvent
	.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_2
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x20, l_.str@PAGE
Lloh4:
	add	x20, x20, l_.str@PAGEOFF
	mov	x0, x20
	bl	_trap_Cvar_VariableValue
Lloh5:
	adrp	x8, _color_red@GOTPAGE
Lloh6:
	ldr	x8, [x8, _color_red@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_SetSkillColor
	ldr	w21, [x19]
Lloh8:
	adrp	x8, _ID_BABY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ID_BABY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	sub	w22, w21, w8
	add	w19, w22, #1
	mov	x0, x20
	mov	x1, x19
	bl	_trap_Cvar_SetValue
Lloh11:
	adrp	x8, _color_white@GOTPAGE
Lloh12:
	ldr	x8, [x8, _color_white@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_SetSkillColor
Lloh14:
	adrp	x8, _skillMenuInfo@GOTPAGE
Lloh15:
	ldr	x8, [x8, _skillMenuInfo@GOTPAGEOFF]
	ldr	x9, [x8, #8]
	ldr	w9, [x9, w22, sxtw #2]
	str	w9, [x8, #16]
Lloh16:
	adrp	x9, _ID_NIGHTMARE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ID_NIGHTMARE@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	add	x10, x8, #4
	cmp	w21, w9
	csel	x8, x10, x8, eq
	ldr	w0, [x8]
Lloh19:
	adrp	x8, _CHAN_ANNOUNCER@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CHAN_ANNOUNCER@GOTPAGEOFF]
Lloh21:
	ldr	w1, [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
	b	_trap_S_StartLocalSound
LBB0_2:
	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 AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_QM_ACTIVATED,4,2               ; @QM_ACTIVATED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"g_spSkill"

	.comm	_color_red,4,2                  ; @color_red
	.comm	_ID_BABY,4,2                    ; @ID_BABY
	.comm	_color_white,4,2                ; @color_white
	.comm	_skillMenuInfo,24,3             ; @skillMenuInfo
	.comm	_ID_NIGHTMARE,4,2               ; @ID_NIGHTMARE
	.comm	_CHAN_ANNOUNCER,4,2             ; @CHAN_ANNOUNCER
	.no_dead_strip	_UI_SPSkillMenu_SkillEvent
.subsections_via_symbols
