	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_LoadDemos
_UI_LoadDemos:                          ## @UI_LoadDemos
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	movl	$4136, %eax                     ## imm = 0x1028
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str.1(%rip), %r14
	movq	%r14, %rdi
	callq	_trap_Cvar_VariableValue
	leaq	L_.str(%rip), %rdx
	leaq	-4176(%rbp), %r15
	movq	%r15, %rdi
	movl	$32, %esi
	movl	%eax, %ecx
	callq	_Com_sprintf
	leaq	L_.str.2(%rip), %rdi
	leaq	-4144(%rbp), %r12
	movq	%r15, %rsi
	movq	%r12, %rdx
	movl	$4096, %ecx                     ## imm = 0x1000
	callq	_trap_FS_GetFileList
	movq	_uiInfo@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movq	%r14, %rdi
	callq	_trap_Cvar_VariableValue
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	movl	$32, %esi
	movl	%eax, %ecx
	callq	_Com_sprintf
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	_MAX_DEMOS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_3
## %bb.2:
	movq	_uiInfo@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movl	%ecx, %eax
LBB0_3:
	testl	%eax, %eax
	jle	LBB0_8
## %bb.4:
	xorl	%r13d, %r13d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_Q_strupr
	movq	%r12, %rdi
	callq	_String_Alloc
	movq	_uiInfo@GOTPCREL(%rip), %rdx
	movq	8(%rdx), %rcx
	movl	%eax, (%rcx,%r13,4)
	addq	%r14, %r12
	incq	%r12
	incq	%r13
	movslq	(%rdx), %rax
	cmpq	%rax, %r13
	jge	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_strlen
	movl	%eax, %r15d
	movslq	%eax, %r14
	leaq	(%r12,%r14), %rbx
	leaq	-4176(%rbp), %rdi
	callq	_strlen
	cltq
	subq	%rax, %rbx
	movq	%rbx, %rdi
	leaq	-4176(%rbp), %rsi
	callq	_Q_stricmp
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	-4176(%rbp), %rdi
	callq	_strlen
	subl	%eax, %r15d
	movslq	%r15d, %rax
	movb	$0, (%r12,%rax)
	jmp	LBB0_7
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	addq	$4136, %rsp                     ## imm = 0x1028
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dm_%d"

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

L_.str.2:                               ## @.str.2
	.asciz	"demos"

	.comm	_uiInfo,16,3                    ## @uiInfo
L_.str.3:                               ## @.str.3
	.asciz	".dm_%d"

	.comm	_MAX_DEMOS,4,2                  ## @MAX_DEMOS
	.no_dead_strip	_UI_LoadDemos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_LoadDemos
_UI_LoadDemos:                          ; @UI_LoadDemos
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	w9, #4144
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #48
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh5:
	adrp	x19, l_.str.1@PAGE
Lloh6:
	add	x19, x19, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_trap_Cvar_VariableValue
	mov	x3, x0
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w1, #32
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_Com_sprintf
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x1, sp, #8
	add	x2, sp, #40
	mov	w3, #4096
	bl	_trap_FS_GetFileList
Lloh11:
	adrp	x20, _uiInfo@GOTPAGE
Lloh12:
	ldr	x20, [x20, _uiInfo@GOTPAGEOFF]
	str	w0, [x20]
	mov	x0, x19
	bl	_trap_Cvar_VariableValue
	mov	x3, x0
Lloh13:
	adrp	x2, l_.str.3@PAGE
Lloh14:
	add	x2, x2, l_.str.3@PAGEOFF
	add	x0, sp, #8
	mov	w1, #32
                                        ; kill: def $w3 killed $w3 killed $x3
	bl	_Com_sprintf
	ldr	w8, [x20]
	cbz	w8, LBB0_8
; %bb.1:
Lloh15:
	adrp	x9, _MAX_DEMOS@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MAX_DEMOS@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_3
; %bb.2:
	str	w9, [x20]
	mov	x8, x9
LBB0_3:
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.4:
	mov	x21, #0
	add	x19, sp, #40
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x19
	bl	_Q_strupr
	mov	x0, x19
	bl	_String_Alloc
	ldr	x8, [x20, #8]
	str	w0, [x8, x21, lsl #2]
	add	x8, x22, x19
	add	x19, x8, #1
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x22, w0
	add	x23, x19, x22
	add	x0, sp, #8
	bl	_strlen
	sub	x0, x23, w0, sxtw
	add	x1, sp, #8
	bl	_Q_stricmp
	cbnz	w0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #8
	bl	_strlen
	sub	x8, x22, w0, sxtw
	strb	wzr, [x19, x8]
	b	LBB0_5
LBB0_8:
	ldur	x8, [x29, #-56]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dm_%d"

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

l_.str.2:                               ; @.str.2
	.asciz	"demos"

	.comm	_uiInfo,16,3                    ; @uiInfo
l_.str.3:                               ; @.str.3
	.asciz	".dm_%d"

	.comm	_MAX_DEMOS,4,2                  ; @MAX_DEMOS
	.no_dead_strip	_UI_LoadDemos
.subsections_via_symbols
