	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LoadModel                      ## -- Begin function LoadModel
	.p2align	4, 0x90
_LoadModel:                             ## @LoadModel
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_loadedModels@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_numLoadedModels@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r12), %esi
	movq	%r14, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	addq	$16, %r12
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	jl	LBB0_2
LBB0_5:
	movq	_MAX_LOADED_MODELS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movl	(%r15), %eax
LBB0_7:
	incl	%eax
	movl	%eax, (%r15)
	movl	8(%r12), %edi
	movq	%r14, %rsi
	callq	_strcpy
	movq	%r14, %rdi
	callq	_R_LoadMD3
	movq	%rax, (%r12)
	jmp	LBB0_8
LBB0_3:
	movq	(%r12), %rax
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_loadedModels,8,3               ## @loadedModels
	.comm	_numLoadedModels,4,2            ## @numLoadedModels
	.comm	_MAX_LOADED_MODELS,4,2          ## @MAX_LOADED_MODELS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_LOADED_MODELS"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LoadModel                      ; -- Begin function LoadModel
	.p2align	2
_LoadModel:                             ; @LoadModel
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _loadedModels@GOTPAGE
Lloh1:
	ldr	x8, [x8, _loadedModels@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
Lloh3:
	adrp	x21, _numLoadedModels@GOTPAGE
Lloh4:
	ldr	x21, [x21, _numLoadedModels@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x20, #8]
	mov	x0, x19
	bl	_strcmp
	cbz	w0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w22, w22, #1
	add	x20, x20, #16
	ldr	w8, [x21]
	cmp	w22, w8
	b.lt	LBB0_2
LBB0_4:
Lloh5:
	adrp	x9, _MAX_LOADED_MODELS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAX_LOADED_MODELS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	w8, [x21]
LBB0_6:
	add	w8, w8, #1
	str	w8, [x21]
	ldr	w0, [x20, #8]
	mov	x1, x19
	bl	_strcpy
	mov	x0, x19
	bl	_R_LoadMD3
	str	x0, [x20]
	b	LBB0_8
LBB0_7:
	ldr	x0, [x20]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_loadedModels,8,3               ; @loadedModels
	.comm	_numLoadedModels,4,2            ; @numLoadedModels
	.comm	_MAX_LOADED_MODELS,4,2          ; @MAX_LOADED_MODELS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_LOADED_MODELS"

.subsections_via_symbols
