	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UI_PopMenu                     ## -- Begin function UI_PopMenu
	.p2align	4, 0x90
_UI_PopMenu:                            ## @UI_PopMenu
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_menu_out_sound@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CHAN_LOCAL_SOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_trap_S_StartLocalSound
	movq	_uis@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	leal	-1(%rcx), %eax
	movl	%eax, (%rbx)
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	movq	8(%rbx), %rcx
	cltq
	movl	-4(%rcx,%rax,4), %eax
	movl	%eax, 16(%rbx)
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_trap_Error
	movl	(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_3
LBB0_4:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_UI_ForceMenuOff                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_menu_out_sound,4,2             ## @menu_out_sound
	.comm	_CHAN_LOCAL_SOUND,4,2           ## @CHAN_LOCAL_SOUND
	.comm	_uis,24,3                       ## @uis
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UI_PopMenu: menu stack underflow"

	.comm	_qtrue,4,2                      ## @qtrue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UI_PopMenu                     ; -- Begin function UI_PopMenu
	.p2align	2
_UI_PopMenu:                            ; @UI_PopMenu
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _menu_out_sound@GOTPAGE
Lloh1:
	ldr	x8, [x8, _menu_out_sound@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _CHAN_LOCAL_SOUND@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CHAN_LOCAL_SOUND@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_trap_S_StartLocalSound
Lloh6:
	adrp	x19, _uis@GOTPAGE
Lloh7:
	ldr	x19, [x19, _uis@GOTPAGEOFF]
	ldr	w9, [x19]
	sub	w8, w9, #1
	str	w8, [x19]
	cmp	w9, #0
	b.le	LBB0_3
; %bb.1:
	cbz	w8, LBB0_4
LBB0_2:
	ldr	x9, [x19, #8]
	sub	w8, w8, #1
	ldr	w8, [x9, w8, sxtw #2]
	str	w8, [x19, #16]
Lloh8:
	adrp	x8, _qtrue@GOTPAGE
Lloh9:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_trap_Error
	ldr	w8, [x19]
	cbnz	w8, LBB0_2
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_UI_ForceMenuOff
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_menu_out_sound,4,2             ; @menu_out_sound
	.comm	_CHAN_LOCAL_SOUND,4,2           ; @CHAN_LOCAL_SOUND
	.comm	_uis,24,3                       ; @uis
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UI_PopMenu: menu stack underflow"

	.comm	_qtrue,4,2                      ; @qtrue
.subsections_via_symbols
