	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__UI_KeyEvent                   ## -- Begin function _UI_KeyEvent
	.p2align	4, 0x90
__UI_KeyEvent:                          ## @_UI_KeyEvent
	.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	%esi, %r15d
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_Menu_Count
	testq	%rax, %rax
	jle	LBB0_7
## %bb.1:
	xorl	%eax, %eax
	callq	_Menu_GetFocused
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rax, %rbx
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.3:
	movq	_K_ESCAPE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_Menus_AnyFullScreenVisible
	testl	%eax, %eax
	je	LBB0_8
LBB0_5:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Menu_HandleKey                 ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	callq	_trap_Key_GetCatcher
	movq	_KEYCATCH_UI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	callq	_trap_Key_SetCatcher
	xorl	%eax, %eax
	callq	_trap_Key_ClearStates
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_trap_Cvar_Set                  ## TAILCALL
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Menus_CloseAll                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_K_ESCAPE,4,2                   ## @K_ESCAPE
	.comm	_KEYCATCH_UI,4,2                ## @KEYCATCH_UI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cl_paused"

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

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__UI_KeyEvent                   ; -- Begin function _UI_KeyEvent
	.p2align	2
__UI_KeyEvent:                          ; @_UI_KeyEvent
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_Menu_Count
	cmp	x0, #1
	b.lt	LBB0_6
; %bb.1:
	bl	_Menu_GetFocused
	cbz	x0, LBB0_7
; %bb.2:
	mov	x21, x0
	cbz	w19, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _K_ESCAPE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _K_ESCAPE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_5
; %bb.4:
	bl	_Menus_AnyFullScreenVisible
	cbz	w0, LBB0_8
LBB0_5:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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	_Menu_HandleKey
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
LBB0_7:
	bl	_trap_Key_GetCatcher
Lloh3:
	adrp	x8, _KEYCATCH_UI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KEYCATCH_UI@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bic	w0, w0, w8
	bl	_trap_Key_SetCatcher
	bl	_trap_Key_ClearStates
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	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_Cvar_Set
LBB0_8:
	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	_Menus_CloseAll
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_K_ESCAPE,4,2                   ; @K_ESCAPE
	.comm	_KEYCATCH_UI,4,2                ; @KEYCATCH_UI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cl_paused"

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

.subsections_via_symbols
