	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EndModel                       ## -- Begin function EndModel
	.p2align	4, 0x90
_EndModel:                              ## @EndModel
	.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
	leaq	L_.str(%rip), %rdi
	callq	_qprintf
	movq	_dmodels@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_nummodels@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	movq	%r14, %rdi
	callq	_EmitDrawNode_r
	movq	_numDrawSurfaces@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shlq	$5, %rbx
	subq	16(%r12,%rbx), %rax
	movq	%rax, 24(%r12,%rbx)
	movq	_numbrushes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	(%r12,%rbx), %rax
	movq	%rax, 8(%r12,%rbx)
	incq	(%r15)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"--- EndModel ---\n"

	.comm	_dmodels,8,3                    ## @dmodels
	.comm	_nummodels,8,3                  ## @nummodels
	.comm	_numDrawSurfaces,8,3            ## @numDrawSurfaces
	.comm	_numbrushes,8,3                 ## @numbrushes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EndModel                       ; -- Begin function EndModel
	.p2align	2
_EndModel:                              ; @EndModel
	.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	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_qprintf
Lloh2:
	adrp	x8, _dmodels@GOTPAGE
Lloh3:
	ldr	x8, [x8, _dmodels@GOTPAGEOFF]
Lloh4:
	ldr	x20, [x8]
Lloh5:
	adrp	x21, _nummodels@GOTPAGE
Lloh6:
	ldr	x21, [x21, _nummodels@GOTPAGEOFF]
	ldr	x22, [x21]
	mov	x0, x19
	bl	_EmitDrawNode_r
Lloh7:
	adrp	x8, _numDrawSurfaces@GOTPAGE
Lloh8:
	ldr	x8, [x8, _numDrawSurfaces@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	add	x9, x20, x22, lsl #5
	ldr	x10, [x9, #16]
	sub	x8, x8, x10
	str	x8, [x9, #24]
Lloh10:
	adrp	x8, _numbrushes@GOTPAGE
Lloh11:
	ldr	x8, [x8, _numbrushes@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	x10, [x9]
	sub	x8, x8, x10
	str	x8, [x9, #8]
	ldr	x8, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	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 AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"--- EndModel ---\n"

	.comm	_dmodels,8,3                    ; @dmodels
	.comm	_nummodels,8,3                  ; @nummodels
	.comm	_numDrawSurfaces,8,3            ; @numDrawSurfaces
	.comm	_numbrushes,8,3                 ; @numbrushes
.subsections_via_symbols
