	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitFlareSurf                  ## -- Begin function EmitFlareSurf
	.p2align	4, 0x90
_EmitFlareSurf:                         ## @EmitFlareSurf
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	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), %r15
	leaq	1(%rax), %rcx
	movq	%rcx, (%rbx)
	movq	_MST_FLARE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	(%rax,%rax,2), %rbx
	movl	%ecx, 20(%r15,%rbx,8)
	movq	16(%r14), %rax
	movl	(%rax), %edi
	callq	_EmitShader
	movl	%eax, 16(%r15,%rbx,8)
	movl	12(%r14), %eax
	movl	%eax, 12(%r15,%rbx,8)
	movl	8(%r14), %edi
	movl	8(%r15,%rbx,8), %esi
	callq	_VectorCopy
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	(%r15,%rbx,8), %rax
	movl	(%rax), %esi
	callq	_VectorCopy
	movq	(%r14), %rax
	movl	8(%rax), %edi
	movq	(%r15,%rbx,8), %rax
	movl	8(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VectorCopy                     ## TAILCALL
	.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_FLARE,4,2                  ## @MST_FLARE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EmitFlareSurf                  ; -- Begin function EmitFlareSurf
	.p2align	2
_EmitFlareSurf:                         ; @EmitFlareSurf
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	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_FLARE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _MST_FLARE@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	mov	w11, #24
	madd	x20, x8, x11, x9
	str	w10, [x20, #20]
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_EmitShader
	ldp	w8, w9, [x19, #8]
	stp	w9, w0, [x20, #12]
	ldr	w1, [x20, #8]
	mov	x0, x8
	bl	_VectorCopy
	ldr	x8, [x19]
	ldr	w0, [x8]
	ldr	x8, [x20]
	ldr	w1, [x8]
	bl	_VectorCopy
	ldr	x8, [x19]
	ldr	w0, [x8, #8]
	ldr	x8, [x20]
	ldr	w1, [x8, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_VectorCopy
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.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_FLARE,4,2                  ; @MST_FLARE
.subsections_via_symbols
