	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_LoadMods
_UI_LoadMods:                           ## @UI_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	_uiInfo@GOTPCREL(%rip), %r13
	movq	$0, (%r13)
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	leaq	-2096(%rbp), %rbx
	movq	%rbx, %rdx
	movl	$2048, %ecx                     ## imm = 0x800
	callq	_trap_FS_GetFileList
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movl	%eax, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_strlen
	movl	%eax, %r15d
	cltq
	leaq	(%rax,%rbx), %r12
	incq	%r12
	movq	%rbx, %rdi
	callq	_String_Alloc
	movq	(%r13), %rcx
	movq	8(%r13), %rdx
	shlq	$4, %rcx
	movq	%rax, 8(%rdx,%rcx)
	movq	%r12, %rdi
	callq	_String_Alloc
	movq	(%r13), %rcx
	movq	8(%r13), %rdx
	shlq	$4, %rcx
	movq	%rax, (%rdx,%rcx)
	movq	%r12, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	movq	(%r13), %rcx
	incq	%rcx
	movq	%rcx, (%r13)
	movq	_MAX_MODS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jae	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	%r15d, %eax
	addl	$2, %eax
	cltq
	addq	%rax, %rbx
	decl	%r14d
	jne	LBB0_2
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	addq	$2056, %rsp                     ## imm = 0x808
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_uiInfo,16,3                    ## @uiInfo
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"$modlist"

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

	.comm	_MAX_MODS,8,3                   ## @MAX_MODS
	.no_dead_strip	_UI_LoadMods
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_LoadMods
_UI_LoadMods:                           ; @UI_LoadMods
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #2064
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x23, _uiInfo@GOTPAGE
Lloh4:
	ldr	x23, [x23, _uiInfo@GOTPAGEOFF]
	str	xzr, [x23]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	w3, #2048
	bl	_trap_FS_GetFileList
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
	add	x20, sp, #8
Lloh9:
	adrp	x24, _MAX_MODS@GOTPAGE
Lloh10:
	ldr	x24, [x24, _MAX_MODS@GOTPAGEOFF]
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
	bl	_String_Alloc
	ldp	x9, x8, [x23]
	add	x8, x8, x9, lsl #4
	str	x0, [x8, #8]
	mov	x0, x22
	bl	_String_Alloc
	ldp	x9, x8, [x23]
	lsl	x9, x9, #4
	str	x0, [x8, x9]
	mov	x0, x22
	bl	_strlen
	ldr	x8, [x23]
	add	x8, x8, #1
	str	x8, [x23]
	ldr	x9, [x24]
	cmp	x8, x9
	b.hs	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w8, w21, w0
	add	w8, w8, #2
	add	x20, x20, w8, sxtw
	subs	w19, w19, #1
	b.ne	LBB0_2
LBB0_4:
	ldur	x8, [x29, #-72]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	add	sp, sp, #2064
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_uiInfo,16,3                    ; @uiInfo
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"$modlist"

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

	.comm	_MAX_MODS,8,3                   ; @MAX_MODS
	.no_dead_strip	_UI_LoadMods
.subsections_via_symbols
