	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BeginModel                     ## -- Begin function BeginModel
	.p2align	4, 0x90
_BeginModel:                            ## @BeginModel
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_nummodels@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	_MAX_MAP_MODELS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	(%rbx), %rdx
LBB0_2:
	movq	_dmodels@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_numfaces@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	shlq	$4, %rdx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, 8(%rsi,%rdx)
	movq	_numleafs@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_firstmodleaf@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movq	_numedges@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_firstmodeledge@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movq	(%rax), %rax
	movq	_firstmodelface@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_entities@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_entity_num@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	(%rax,%rcx,8), %r13
	movl	4(%rax,%rcx,8), %ebx
	callq	_ClearBounds
	testl	%ebx, %ebx
	jle	LBB0_7
## %bb.3:
	addl	%r13d, %ebx
	movslq	%ebx, %r12
	leaq	(,%r13,2), %rax
	addq	%r13, %rax
	leaq	8(,%rax,4), %rbx
	movq	_mapbrushes@GOTPCREL(%rip), %r14
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	addq	$12, %rbx
	cmpq	%r12, %r13
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %r15
	cmpl	$0, (%r15,%rbx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-4(%r15,%rbx), %edi
	callq	_AddPointToBounds
	movl	-8(%r15,%rbx), %edi
	callq	_AddPointToBounds
	jmp	LBB0_6
LBB0_7:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	4(%rbx,%r14), %esi
	callq	_VectorCopy
	movl	(%rbx,%r14), %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VectorCopy                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_nummodels,8,3                  ## @nummodels
	.comm	_MAX_MAP_MODELS,8,3             ## @MAX_MAP_MODELS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_MAP_MODELS"

	.comm	_dmodels,8,3                    ## @dmodels
	.comm	_numfaces,8,3                   ## @numfaces
	.comm	_numleafs,4,2                   ## @numleafs
	.comm	_firstmodleaf,4,2               ## @firstmodleaf
	.comm	_numedges,4,2                   ## @numedges
	.comm	_firstmodeledge,4,2             ## @firstmodeledge
	.comm	_firstmodelface,8,3             ## @firstmodelface
	.comm	_entities,8,3                   ## @entities
	.comm	_entity_num,8,3                 ## @entity_num
	.comm	_mapbrushes,8,3                 ## @mapbrushes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BeginModel                     ; -- Begin function BeginModel
	.p2align	2
_BeginModel:                            ; @BeginModel
	.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
Lloh0:
	adrp	x19, _nummodels@GOTPAGE
Lloh1:
	ldr	x19, [x19, _nummodels@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _MAX_MAP_MODELS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_MAP_MODELS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	x8, [x19]
LBB0_2:
Lloh7:
	adrp	x9, _dmodels@GOTPAGE
Lloh8:
	ldr	x9, [x9, _dmodels@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	adrp	x10, _numleafs@GOTPAGE
Lloh11:
	ldr	x10, [x10, _numleafs@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
Lloh13:
	adrp	x11, _firstmodleaf@GOTPAGE
Lloh14:
	ldr	x11, [x11, _firstmodleaf@GOTPAGEOFF]
Lloh15:
	str	w10, [x11]
Lloh16:
	adrp	x10, _numfaces@GOTPAGE
Lloh17:
	ldr	x10, [x10, _numfaces@GOTPAGEOFF]
	ldr	x11, [x10]
	add	x19, x9, x8, lsl #4
Lloh18:
	adrp	x8, _numedges@GOTPAGE
Lloh19:
	ldr	x8, [x8, _numedges@GOTPAGEOFF]
	str	x11, [x19, #8]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _firstmodeledge@GOTPAGE
Lloh22:
	ldr	x9, [x9, _firstmodeledge@GOTPAGEOFF]
Lloh23:
	str	w8, [x9]
	ldr	x8, [x10]
Lloh24:
	adrp	x9, _firstmodelface@GOTPAGE
Lloh25:
	ldr	x9, [x9, _firstmodelface@GOTPAGEOFF]
Lloh26:
	str	x8, [x9]
Lloh27:
	adrp	x8, _entities@GOTPAGE
Lloh28:
	ldr	x8, [x8, _entities@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
Lloh30:
	adrp	x9, _entity_num@GOTPAGE
Lloh31:
	ldr	x9, [x9, _entity_num@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #3
	ldp	w20, w21, [x8]
                                        ; kill: def $w20 killed $w20 def $x20
	sxtw	x20, w20
	bl	_ClearBounds
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.3:
	add	w8, w21, w20
	sxtw	x21, w8
	add	x8, x20, x20, lsl #1
	lsl	x22, x8, #2
Lloh33:
	adrp	x23, _mapbrushes@GOTPAGE
Lloh34:
	ldr	x23, [x23, _mapbrushes@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #1
	add	x22, x22, #12
	cmp	x20, x21
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x24, x8, x22
	ldr	w8, [x24, #8]
	cbz	w8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x24, #4]
	bl	_AddPointToBounds
	ldr	w0, [x24]
	bl	_AddPointToBounds
	b	LBB0_4
LBB0_7:
	ldr	w1, [x19, #4]
	bl	_VectorCopy
	ldr	w1, [x19]
	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
	b	_VectorCopy
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_nummodels,8,3                  ; @nummodels
	.comm	_MAX_MAP_MODELS,8,3             ; @MAX_MAP_MODELS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_MAP_MODELS"

	.comm	_dmodels,8,3                    ; @dmodels
	.comm	_numfaces,8,3                   ; @numfaces
	.comm	_numleafs,4,2                   ; @numleafs
	.comm	_firstmodleaf,4,2               ; @firstmodleaf
	.comm	_numedges,4,2                   ; @numedges
	.comm	_firstmodeledge,4,2             ; @firstmodeledge
	.comm	_firstmodelface,8,3             ; @firstmodelface
	.comm	_entities,8,3                   ; @entities
	.comm	_entity_num,8,3                 ; @entity_num
	.comm	_mapbrushes,8,3                 ; @mapbrushes
.subsections_via_symbols
