	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UI_Refresh                     ## -- Begin function UI_Refresh
	.p2align	4, 0x90
_UI_Refresh:                            ## @UI_Refresh
	.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	_uis@GOTPCREL(%rip), %rbx
	movl	%edi, %eax
	subl	4(%rbx), %eax
	movl	%eax, (%rbx)
	movl	%edi, 4(%rbx)
	xorl	%eax, %eax
	callq	_trap_Key_GetCatcher
	movq	_KEYCATCH_UI@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.1:
	xorl	%eax, %eax
	callq	_UI_UpdateCvars
	movq	48(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	cmpq	$0, 16(%rax)
	je	LBB0_4
## %bb.3:
	xorl	%esi, %esi
	cmpq	$0, 8(%rax)
	setne	%sil
	movq	_SCREEN_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SCREEN_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	56(%rbx,%rsi,4), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_UI_DrawHandlePic
LBB0_4:
	movq	48(%rbx), %rdi
	movq	(%rdi), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	*%rcx
	cmpq	$0, 40(%rbx)
	je	LBB0_9
LBB0_8:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_UI_MouseEvent
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 40(%rbx)
LBB0_9:
	xorl	%edi, %edi
	callq	_UI_SetColor
	movq	8(%rbx), %rsi
	movq	16(%rbx), %rdi
	addq	$-16, %rdi
	addq	$-16, %rsi
	movl	32(%rbx), %r8d
	movl	$32, %edx
	movl	$32, %ecx
	callq	_UI_DrawHandlePic
	cmpq	$0, 24(%rbx)
	je	LBB0_11
## %bb.10:
	movq	8(%rbx), %rdx
	movq	16(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_va
	movq	_UI_LEFT@GOTPCREL(%rip), %rdx
	movq	_UI_SMALLFONT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_colorRed@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_UI_DrawString
LBB0_11:
	movq	_m_entersound@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_13
## %bb.12:
	movq	_menu_in_sound@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_CHAN_LOCAL_SOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_trap_S_StartLocalSound
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	callq	_Menu_Draw
	cmpq	$0, 40(%rbx)
	jne	LBB0_8
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_uis,64,3                       ## @uis
	.comm	_KEYCATCH_UI,4,2                ## @KEYCATCH_UI
	.comm	_SCREEN_WIDTH,4,2               ## @SCREEN_WIDTH
	.comm	_SCREEN_HEIGHT,4,2              ## @SCREEN_HEIGHT
	.comm	_qfalse,8,3                     ## @qfalse
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%d,%d)"

	.comm	_UI_LEFT,4,2                    ## @UI_LEFT
	.comm	_UI_SMALLFONT,4,2               ## @UI_SMALLFONT
	.comm	_colorRed,4,2                   ## @colorRed
	.comm	_m_entersound,8,3               ## @m_entersound
	.comm	_menu_in_sound,4,2              ## @menu_in_sound
	.comm	_CHAN_LOCAL_SOUND,4,2           ## @CHAN_LOCAL_SOUND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_UI_Refresh                     ; -- Begin function UI_Refresh
	.p2align	2
_UI_Refresh:                            ; @UI_Refresh
	.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	x20, _uis@GOTPAGE
Lloh1:
	ldr	x20, [x20, _uis@GOTPAGEOFF]
	ldr	w8, [x20, #4]
	sub	w8, w0, w8
	stp	w8, w0, [x20]
	bl	_trap_Key_GetCatcher
Lloh2:
	adrp	x8, _KEYCATCH_UI@GOTPAGE
Lloh3:
	ldr	x8, [x8, _KEYCATCH_UI@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.1:
	bl	_UI_UpdateCvars
	ldr	x8, [x20, #48]
Lloh5:
	adrp	x19, _qfalse@GOTPAGE
Lloh6:
	ldr	x19, [x19, _qfalse@GOTPAGEOFF]
	cbz	x8, LBB0_7
; %bb.2:
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_4
; %bb.3:
	ldr	x8, [x8, #8]
Lloh7:
	adrp	x9, _SCREEN_WIDTH@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SCREEN_WIDTH@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x9]
Lloh10:
	adrp	x9, _SCREEN_HEIGHT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SCREEN_HEIGHT@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x9]
	add	x9, x20, #60
	add	x10, x20, #56
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w4, [x8]
	mov	x0, #0
	mov	x1, #0
	bl	_UI_DrawHandlePic
LBB0_4:
	ldr	x0, [x20, #48]
	ldr	x8, [x0]
	cbz	x8, LBB0_12
; %bb.5:
	blr	x8
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_7
LBB0_6:
	mov	w0, #0
	mov	w1, #0
	bl	_UI_MouseEvent
	ldr	x8, [x19]
	str	x8, [x20, #40]
LBB0_7:
	mov	x0, #0
	bl	_UI_SetColor
	ldp	x9, x8, [x20, #8]
	sub	x0, x8, #16
	sub	x1, x9, #16
	ldr	w4, [x20, #32]
	mov	w2, #32
	mov	w3, #32
	bl	_UI_DrawHandlePic
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_9
; %bb.8:
	ldp	x2, x1, [x20, #8]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_va
	mov	x2, x0
Lloh15:
	adrp	x8, _UI_LEFT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UI_LEFT@GOTPAGEOFF]
Lloh17:
	adrp	x9, _UI_SMALLFONT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _UI_SMALLFONT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	ldr	w9, [x9]
	orr	w3, w9, w8
Lloh21:
	adrp	x8, _colorRed@GOTPAGE
Lloh22:
	ldr	x8, [x8, _colorRed@GOTPAGEOFF]
Lloh23:
	ldr	w4, [x8]
	mov	w0, #0
	mov	w1, #0
	bl	_UI_DrawString
LBB0_9:
Lloh24:
	adrp	x20, _m_entersound@GOTPAGE
Lloh25:
	ldr	x20, [x20, _m_entersound@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_11
; %bb.10:
Lloh26:
	adrp	x8, _menu_in_sound@GOTPAGE
Lloh27:
	ldr	x8, [x8, _menu_in_sound@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x8, _CHAN_LOCAL_SOUND@GOTPAGE
Lloh30:
	ldr	x8, [x8, _CHAN_LOCAL_SOUND@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	bl	_trap_S_StartLocalSound
	ldr	x8, [x19]
	str	x8, [x20]
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	_Menu_Draw
	ldr	x8, [x20, #40]
	cbnz	x8, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_uis,64,3                       ; @uis
	.comm	_KEYCATCH_UI,4,2                ; @KEYCATCH_UI
	.comm	_SCREEN_WIDTH,4,2               ; @SCREEN_WIDTH
	.comm	_SCREEN_HEIGHT,4,2              ; @SCREEN_HEIGHT
	.comm	_qfalse,8,3                     ; @qfalse
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%d,%d)"

	.comm	_UI_LEFT,4,2                    ; @UI_LEFT
	.comm	_UI_SMALLFONT,4,2               ; @UI_SMALLFONT
	.comm	_colorRed,4,2                   ; @colorRed
	.comm	_m_entersound,8,3               ; @m_entersound
	.comm	_menu_in_sound,4,2              ; @menu_in_sound
	.comm	_CHAN_LOCAL_SOUND,4,2           ; @CHAN_LOCAL_SOUND
.subsections_via_symbols
