	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_Mods_LoadMods
_UI_Mods_LoadMods:                      ## @UI_Mods_LoadMods
	.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
	subq	$2056, %rsp                     ## imm = 0x808
	.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)
	movq	_s_mods@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, 16(%r12)
	movl	40(%r12), %ecx
	movl	%ecx, 44(%r12)
	movl	32(%r12), %ecx
	movl	%ecx, 36(%r12)
	movl	$1, 24(%r12)
	leaq	L_.str(%rip), %rcx
	movq	%rcx, (%rax)
	movq	16(%r12), %rax
	movq	%rcx, (%rax)
	movq	8(%r12), %rax
	leaq	L_.str.1(%rip), %rsi
	movq	%rsi, (%rax)
	leaq	L_.str.2(%rip), %rdi
	leaq	-2096(%rbp), %rbx
	movq	%rbx, %rdx
	movl	$2048, %ecx                     ## imm = 0x800
	callq	_trap_FS_GetFileList
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	movl	%eax, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_strlen
	movslq	%eax, %r13
	leaq	(%rbx,%r13), %r15
	incq	%r15
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_UI_Mods_ParseInfos
	movq	%r15, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	addl	%r13d, %eax
	addl	$2, %eax
	cltq
	addq	%rax, %rbx
	decl	%r14d
	jne	LBB0_2
LBB0_3:
	movl	24(%r12), %esi
	leaq	L_.str.3(%rip), %rdi
	callq	_va
	movl	%eax, %edi
	callq	_trap_Print
	movq	_MAX_MODS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, 24(%r12)
	jle	LBB0_5
## %bb.4:
	movl	%eax, 24(%r12)
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	addq	$2056, %rsp                     ## imm = 0x808
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_s_mods,48,3                    ## @s_mods
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Quake III Arena"

L_.str.1:                               ## @.str.1
	.space	1

L_.str.2:                               ## @.str.2
	.asciz	"$modlist"

L_.str.3:                               ## @.str.3
	.asciz	"%i mods parsed\n"

	.comm	_MAX_MODS,4,2                   ## @MAX_MODS
	.no_dead_strip	_UI_Mods_LoadMods
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_Mods_LoadMods
_UI_Mods_LoadMods:                      ; @UI_Mods_LoadMods
	.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
	sub	sp, sp, #2064
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x23, _s_mods@GOTPAGE
Lloh4:
	ldr	x23, [x23, _s_mods@GOTPAGEOFF]
	stur	x8, [x29, #-56]
	ldr	x8, [x23]
	str	x8, [x23, #16]
	ldr	w9, [x23, #40]
	str	w9, [x23, #44]
	ldr	w9, [x23, #32]
	str	w9, [x23, #36]
	mov	w9, #1
	str	w9, [x23, #24]
Lloh5:
	adrp	x9, l_.str@PAGE
Lloh6:
	add	x9, x9, l_.str@PAGEOFF
	str	x9, [x8]
	ldr	x8, [x23, #16]
	str	x9, [x8]
	ldr	x8, [x23, #8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	str	x1, [x8]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x2, sp, #8
	mov	w3, #2048
	bl	_trap_FS_GetFileList
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x19, x0
	add	x20, sp, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_strlen
	mov	x21, x0
	add	w8, w0, #1
	add	x22, x20, w8, sxtw
	mov	x0, x20
	mov	x1, x22
	bl	_UI_Mods_ParseInfos
	mov	x0, x22
	bl	_strlen
	add	w8, w21, w0
	add	w8, w8, #2
	add	x20, x20, w8, sxtw
	subs	w19, w19, #1
	b.ne	LBB0_2
LBB0_3:
	ldr	w1, [x23, #24]
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_va
	bl	_trap_Print
	ldr	w9, [x23, #24]
Lloh13:
	adrp	x8, _MAX_MODS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAX_MODS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w9, w8
	b.le	LBB0_5
; %bb.4:
	str	w8, [x23, #24]
LBB0_5:
	ldur	x8, [x29, #-56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	add	sp, sp, #2064
	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_7:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_s_mods,48,3                    ; @s_mods
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Quake III Arena"

l_.str.1:                               ; @.str.1
	.space	1

l_.str.2:                               ; @.str.2
	.asciz	"$modlist"

l_.str.3:                               ; @.str.3
	.asciz	"%i mods parsed\n"

	.comm	_MAX_MODS,4,2                   ; @MAX_MODS
	.no_dead_strip	_UI_Mods_LoadMods
.subsections_via_symbols
