	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UI_PushMenu                    ## -- Begin function UI_PushMenu
	.p2align	4, 0x90
_UI_PushMenu:                           ## @UI_PushMenu
	.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
	movq	%rdi, %rbx
	movq	_uis@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_5
## %bb.1:
	movq	24(%r14), %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rdx,%rax,8)
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	cmpq	%rax, %rcx
	jne	LBB0_2
	jmp	LBB0_6
LBB0_5:
	testq	%rcx, %rcx
	jne	LBB0_10
LBB0_6:
	movl	%ecx, %eax
	jmp	LBB0_7
LBB0_3:
	movl	%eax, (%r14)
LBB0_7:
	movq	_MAX_MENUDEPTH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rdi
	callq	_trap_Error
	movl	(%r14), %eax
LBB0_9:
	movq	24(%r14), %rcx
	leal	1(%rax), %edx
	movl	%edx, (%r14)
	cltq
	movq	%rbx, (%rcx,%rax,8)
LBB0_10:
	movq	%rbx, 16(%r14)
	movq	$0, 16(%rbx)
	movl	$0, (%rbx)
	movq	_qtrue@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	_m_entersound@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_KEYCATCH_UI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_trap_Key_SetCatcher
	movl	4(%rbx), %eax
	testl	%eax, %eax
	jle	LBB0_15
## %bb.11:
	movq	8(%rbx), %rcx
	movq	_QMF_GRAYED@GOTPCREL(%rip), %rsi
	movq	_QMF_MOUSEONLY@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rsi), %edx
	movq	_QMF_INACTIVE@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	testl	%edx, (%rdi)
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	incq	%rsi
	cmpq	%rsi, %rax
	jne	LBB0_12
	jmp	LBB0_15
LBB0_13:
	movl	$-1, (%rbx)
	movq	%rbx, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_Menu_SetCursor
LBB0_15:
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_uis,32,3                       ## @uis
	.comm	_MAX_MENUDEPTH,4,2              ## @MAX_MENUDEPTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UI_PushMenu: menu stack overflow"

	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_m_entersound,8,3               ## @m_entersound
	.comm	_KEYCATCH_UI,4,2                ## @KEYCATCH_UI
	.comm	_QMF_GRAYED,4,2                 ## @QMF_GRAYED
	.comm	_QMF_MOUSEONLY,4,2              ## @QMF_MOUSEONLY
	.comm	_QMF_INACTIVE,4,2               ## @QMF_INACTIVE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UI_PushMenu                    ; -- Begin function UI_PushMenu
	.p2align	2
_UI_PushMenu:                           ; @UI_PushMenu
	.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, x0
Lloh0:
	adrp	x20, _uis@GOTPAGE
Lloh1:
	ldr	x20, [x20, _uis@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x8, #0
	ldr	x10, [x20, #24]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x8, lsl #3]
	cmp	x11, x19
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
	cbnz	w9, LBB0_10
LBB0_5:
	mov	x8, x9
	b	LBB0_7
LBB0_6:
	str	w8, [x20]
LBB0_7:
Lloh2:
	adrp	x9, _MAX_MENUDEPTH@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_MENUDEPTH@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_9
; %bb.8:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trap_Error
	ldr	w8, [x20]
LBB0_9:
	ldr	x9, [x20, #24]
	add	w10, w8, #1
	str	w10, [x20]
	str	x19, [x9, w8, sxtw #3]
LBB0_10:
	str	x19, [x20, #16]
	str	xzr, [x19, #16]
	str	wzr, [x19]
Lloh7:
	adrp	x21, _qtrue@GOTPAGE
Lloh8:
	ldr	x21, [x21, _qtrue@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh9:
	adrp	x9, _m_entersound@GOTPAGE
Lloh10:
	ldr	x9, [x9, _m_entersound@GOTPAGEOFF]
Lloh11:
	str	x8, [x9]
Lloh12:
	adrp	x8, _KEYCATCH_UI@GOTPAGE
Lloh13:
	ldr	x8, [x8, _KEYCATCH_UI@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_trap_Key_SetCatcher
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.11:
	mov	x1, #0
	ldr	x9, [x19, #8]
Lloh15:
	adrp	x10, _QMF_GRAYED@GOTPAGE
Lloh16:
	ldr	x10, [x10, _QMF_GRAYED@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
Lloh18:
	adrp	x11, _QMF_MOUSEONLY@GOTPAGE
Lloh19:
	ldr	x11, [x11, _QMF_MOUSEONLY@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	orr	w10, w11, w10
Lloh21:
	adrp	x11, _QMF_INACTIVE@GOTPAGE
Lloh22:
	ldr	x11, [x11, _QMF_INACTIVE@GOTPAGEOFF]
Lloh23:
	ldr	w11, [x11]
	orr	w10, w10, w11
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, x1, lsl #3]
	ldr	w11, [x11]
	tst	w10, w11
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x1, x1, #1
	cmp	x8, x1
	b.ne	LBB0_12
	b	LBB0_15
LBB0_14:
	mov	w8, #-1
	str	w8, [x19]
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_Menu_SetCursor
LBB0_15:
	ldr	x8, [x21]
	str	x8, [x20, #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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_uis,32,3                       ; @uis
	.comm	_MAX_MENUDEPTH,4,2              ; @MAX_MENUDEPTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UI_PushMenu: menu stack overflow"

	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_m_entersound,8,3               ; @m_entersound
	.comm	_KEYCATCH_UI,4,2                ; @KEYCATCH_UI
	.comm	_QMF_GRAYED,4,2                 ; @QMF_GRAYED
	.comm	_QMF_MOUSEONLY,4,2              ; @QMF_MOUSEONLY
	.comm	_QMF_INACTIVE,4,2               ; @QMF_INACTIVE
.subsections_via_symbols
