	.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
	pushq	%rax
	.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), %r12
	movq	_MAX_MAP_MODELS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	(%rbx), %r12
LBB0_2:
	movq	_dmodels@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_entities@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_entity_num@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	callq	_ClearBounds
	shlq	$4, %r15
	movq	(%r13,%r15), %rbx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rbx), %rbx
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 8(%rbx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	4(%rbx), %edi
	callq	_AddPointToBounds
	movl	(%rbx), %edi
	callq	_AddPointToBounds
	jmp	LBB0_6
LBB0_7:
	leaq	(%r15,%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r13,%r15), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	16(%r15), %r15
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	testq	%r15, %r15
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	4(%r15), %eax
	imull	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_AddPointToBounds
	incq	%rbx
	movslq	(%r15), %rax
	movslq	4(%r15), %rcx
	imulq	%rax, %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_11
	jmp	LBB0_12
LBB0_13:
	shlq	$4, %r12
	movl	12(%r14,%r12), %esi
	callq	_VectorCopy
	movl	8(%r14,%r12), %esi
	callq	_VectorCopy
	movq	_numDrawSurfaces@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14,%r12)
	movq	_numbrushes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14,%r12)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EmitBrushes                    ## 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	_entities,8,3                   ## @entities
	.comm	_entity_num,8,3                 ## @entity_num
	.comm	_numDrawSurfaces,4,2            ## @numDrawSurfaces
	.comm	_numbrushes,4,2                 ## @numbrushes
.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	x20, _nummodels@GOTPAGE
Lloh1:
	ldr	x20, [x20, _nummodels@GOTPAGEOFF]
	ldr	x19, [x20]
Lloh2:
	adrp	x8, _MAX_MAP_MODELS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_MAP_MODELS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x19, x8
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	x19, [x20]
LBB0_2:
Lloh7:
	adrp	x8, _dmodels@GOTPAGE
Lloh8:
	ldr	x8, [x8, _dmodels@GOTPAGEOFF]
Lloh9:
	ldr	x21, [x8]
Lloh10:
	adrp	x8, _entities@GOTPAGE
Lloh11:
	ldr	x8, [x8, _entities@GOTPAGEOFF]
Lloh12:
	ldr	x20, [x8]
Lloh13:
	adrp	x8, _entity_num@GOTPAGE
Lloh14:
	ldr	x8, [x8, _entity_num@GOTPAGEOFF]
Lloh15:
	ldr	x22, [x8]
	bl	_ClearBounds
	add	x20, x20, x22, lsl #4
	ldr	x22, [x20]
	cbnz	x22, LBB0_6
LBB0_3:
	ldr	x22, [x20, #8]
	cbnz	x22, LBB0_9
LBB0_4:
	add	x19, x21, x19, lsl #4
	ldr	w1, [x19, #12]
	bl	_VectorCopy
	ldr	w1, [x19, #8]
	bl	_VectorCopy
Lloh16:
	adrp	x8, _numDrawSurfaces@GOTPAGE
Lloh17:
	ldr	x8, [x8, _numDrawSurfaces@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #4]
Lloh19:
	adrp	x8, _numbrushes@GOTPAGE
Lloh20:
	ldr	x8, [x8, _numbrushes@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x0, [x20]
	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	_EmitBrushes
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x22, [x22, #16]
	cbz	x22, LBB0_3
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x22, #4]
	bl	_AddPointToBounds
	ldr	w0, [x22]
	bl	_AddPointToBounds
	b	LBB0_5
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x22, [x22, #16]
	cbz	x22, LBB0_4
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldp	w8, w9, [x22]
	mul	w8, w9, w8
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	x23, #0
LBB0_11:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #8]
	ldr	w0, [x8, x23, lsl #2]
	bl	_AddPointToBounds
	add	x23, x23, #1
	ldpsw	x8, x9, [x22]
	mul	x8, x9, x8
	cmp	x23, x8
	b.lt	LBB0_11
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.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	_entities,8,3                   ; @entities
	.comm	_entity_num,8,3                 ; @entity_num
	.comm	_numDrawSurfaces,4,2            ; @numDrawSurfaces
	.comm	_numbrushes,4,2                 ; @numbrushes
.subsections_via_symbols
