	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function EmitPatchSurf
LCPI0_0:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_EmitPatchSurf
	.p2align	4, 0x90
_EmitPatchSurf:                         ## @EmitPatchSurf
	.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	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	_numDrawSurfaces@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_MAX_MAP_DRAW_SURFS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	(%rbx), %rax
LBB0_2:
	movq	_drawSurfaces@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	leaq	1(%rax), %rcx
	movq	%rcx, (%rbx)
	movq	_MST_PATCH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imulq	$88, %rax, %rbx
	movl	%ecx, 80(%r14,%rbx)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	72(%r15), %rax
	movl	(%rax), %edi
	callq	_EmitShader
	movl	%eax, 76(%r14,%rbx)
	movq	_numDrawVerts@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	%rax, (%r14,%rbx)
	movl	(%r15), %eax
	movl	%eax, 8(%r14,%rbx)
	movq	_numDrawIndexes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14,%rbx)
	movl	4(%r15), %eax
	movl	%eax, 24(%r14,%rbx)
	movups	52(%r15), %xmm0
	movups	%xmm0, 60(%r14,%rbx)
	movups	36(%r15), %xmm0
	movups	%xmm0, 44(%r14,%rbx)
	movl	32(%r15), %edi
	movl	40(%r14,%rbx), %esi
	callq	_VectorCopy
	movq	24(%r15), %rax
	movl	(%rax), %edi
	movq	32(%r14,%rbx), %rax
	movl	(%rax), %esi
	callq	_VectorCopy
	movq	24(%r15), %rax
	movl	4(%rax), %edi
	movq	32(%r14,%rbx), %rax
	movl	4(%rax), %esi
	callq	_VectorCopy
	movq	24(%r15), %rax
	movl	8(%rax), %edi
	movq	32(%r14,%rbx), %rax
	movl	8(%rax), %esi
	callq	_VectorCopy
	cmpl	$0, (%r15)
	jle	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_drawVerts@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	leaq	(%r12,%r15,8), %rdi
	leaq	1(%r15), %rax
	movq	%rax, (%r13)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rsi
	addq	%rbx, %rsi
	movl	$8, %edx
	callq	_memcpy
	movq	(%r12,%r15,8), %rax
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [255,255,255,255]
	movups	%xmm0, (%rax)
	incq	%r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax), %rax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %r15
	movq	_MAX_MAP_DRAW_VERTS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_Error
	movq	(%r13), %r15
	jmp	LBB0_6
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 4(%rax)
	movq	_numDrawIndexes@GOTPCREL(%rip), %rsi
	jle	LBB0_12
## %bb.8:
	movq	(%rsi), %rax
	xorl	%ebx, %ebx
	movq	_MAX_MAP_DRAW_INDEXES@GOTPCREL(%rip), %r15
	leaq	L_.str.2(%rip), %r14
	movq	_drawIndexes@GOTPCREL(%rip), %r12
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	8(%rdi), %rcx
	movl	(%rcx,%rbx,4), %ecx
	movq	(%r12), %rdx
	movl	%ecx, (%rdx,%rax,4)
	incq	%rax
	movq	%rax, (%rsi)
	incq	%rbx
	movslq	4(%rdi), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%r15), %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r14, %rdi
	callq	_Error
	movq	_numDrawIndexes@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rax
	jmp	LBB0_11
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_numDrawSurfaces,8,3            ## @numDrawSurfaces
	.comm	_MAX_MAP_DRAW_SURFS,8,3         ## @MAX_MAP_DRAW_SURFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_MAP_DRAW_SURFS"

	.comm	_drawSurfaces,8,3               ## @drawSurfaces
	.comm	_MST_PATCH,4,2                  ## @MST_PATCH
	.comm	_numDrawVerts,8,3               ## @numDrawVerts
	.comm	_numDrawIndexes,8,3             ## @numDrawIndexes
	.comm	_MAX_MAP_DRAW_VERTS,8,3         ## @MAX_MAP_DRAW_VERTS
L_.str.1:                               ## @.str.1
	.asciz	"MAX_MAP_DRAW_VERTS"

	.comm	_drawVerts,8,3                  ## @drawVerts
	.comm	_MAX_MAP_DRAW_INDEXES,8,3       ## @MAX_MAP_DRAW_INDEXES
L_.str.2:                               ## @.str.2
	.asciz	"MAX_MAP_DRAW_INDEXES"

	.comm	_drawIndexes,8,3                ## @drawIndexes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitPatchSurf                  ; -- Begin function EmitPatchSurf
	.p2align	2
_EmitPatchSurf:                         ; @EmitPatchSurf
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x20, _numDrawSurfaces@GOTPAGE
Lloh1:
	ldr	x20, [x20, _numDrawSurfaces@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _MAX_MAP_DRAW_SURFS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_MAP_DRAW_SURFS@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, [x20]
LBB0_2:
Lloh7:
	adrp	x9, _drawSurfaces@GOTPAGE
Lloh8:
	ldr	x9, [x9, _drawSurfaces@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x10, x8, #1
	str	x10, [x20]
Lloh10:
	adrp	x10, _MST_PATCH@GOTPAGE
Lloh11:
	ldr	x10, [x10, _MST_PATCH@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	mov	w11, #88
	madd	x20, x8, x11, x9
	str	w10, [x20, #80]
	ldr	x8, [x19, #72]
	ldr	w0, [x8]
	bl	_EmitShader
	str	w0, [x20, #76]
Lloh13:
	adrp	x23, _numDrawVerts@GOTPAGE
Lloh14:
	ldr	x23, [x23, _numDrawVerts@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [x20]
	ldp	w8, w9, [x19]
	str	w8, [x20, #8]
Lloh15:
	adrp	x22, _numDrawIndexes@GOTPAGE
Lloh16:
	ldr	x22, [x22, _numDrawIndexes@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [x20, #16]
	str	w9, [x20, #24]
	ldur	q0, [x19, #52]
	stur	q0, [x20, #60]
	ldur	q0, [x19, #36]
	stur	q0, [x20, #44]
	ldr	w0, [x19, #32]
	ldr	w1, [x20, #40]
	bl	_VectorCopy
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	ldr	x8, [x20, #32]
	ldr	w1, [x8]
	bl	_VectorCopy
	ldr	x8, [x19, #24]
	ldr	w0, [x8, #4]
	ldr	x8, [x20, #32]
	ldr	w1, [x8, #4]
	bl	_VectorCopy
	ldr	x8, [x19, #24]
	ldr	w0, [x8, #8]
	ldr	x8, [x20, #32]
	ldr	w1, [x8, #8]
	bl	_VectorCopy
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x24, #0
	mov	x25, #0
Lloh17:
	adrp	x26, _MAX_MAP_DRAW_VERTS@GOTPAGE
Lloh18:
	ldr	x26, [x26, _MAX_MAP_DRAW_VERTS@GOTPAGEOFF]
Lloh19:
	adrp	x27, _drawVerts@GOTPAGE
Lloh20:
	ldr	x27, [x27, _drawVerts@GOTPAGEOFF]
Lloh21:
	adrp	x20, l_.str.1@PAGE
Lloh22:
	add	x20, x20, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x27]
	add	x21, x9, x8, lsl #3
	add	x8, x8, #1
	str	x8, [x23]
	ldr	x8, [x19, #16]
	add	x1, x8, x24
	mov	x0, x21
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x21]
	movi.2d	v0, #0x0000ff000000ff
	str	q0, [x8]
	add	x25, x25, #1
	ldrsw	x8, [x19]
	add	x24, x24, #4
	cmp	x25, x8
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_Error
	ldr	x8, [x23]
	b	LBB0_4
LBB0_7:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.8:
	mov	x21, #0
	ldr	x8, [x22]
Lloh23:
	adrp	x23, _MAX_MAP_DRAW_INDEXES@GOTPAGE
Lloh24:
	ldr	x23, [x23, _MAX_MAP_DRAW_INDEXES@GOTPAGEOFF]
Lloh25:
	adrp	x20, l_.str.2@PAGE
Lloh26:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh27:
	adrp	x24, _drawIndexes@GOTPAGE
Lloh28:
	ldr	x24, [x24, _drawIndexes@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x9, [x19, #8]
	ldr	w9, [x9, x21, lsl #2]
	ldr	x10, [x24]
	str	w9, [x10, x8, lsl #2]
	add	x8, x8, #1
	str	x8, [x22]
	add	x21, x21, #1
	ldrsw	x9, [x19, #4]
	cmp	x21, x9
	b.ge	LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x20
	bl	_Error
	ldr	x8, [x22]
	b	LBB0_9
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_numDrawSurfaces,8,3            ; @numDrawSurfaces
	.comm	_MAX_MAP_DRAW_SURFS,8,3         ; @MAX_MAP_DRAW_SURFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_MAP_DRAW_SURFS"

	.comm	_drawSurfaces,8,3               ; @drawSurfaces
	.comm	_MST_PATCH,4,2                  ; @MST_PATCH
	.comm	_numDrawVerts,8,3               ; @numDrawVerts
	.comm	_numDrawIndexes,8,3             ; @numDrawIndexes
	.comm	_MAX_MAP_DRAW_VERTS,8,3         ; @MAX_MAP_DRAW_VERTS
l_.str.1:                               ; @.str.1
	.asciz	"MAX_MAP_DRAW_VERTS"

	.comm	_drawVerts,8,3                  ; @drawVerts
	.comm	_MAX_MAP_DRAW_INDEXES,8,3       ; @MAX_MAP_DRAW_INDEXES
l_.str.2:                               ; @.str.2
	.asciz	"MAX_MAP_DRAW_INDEXES"

	.comm	_drawIndexes,8,3                ; @drawIndexes
.subsections_via_symbols
