	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function VS_CreateFakeSurfaceLights
LCPI0_0:
	.quad	0x3fd0000000000000              ## double 0.25
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2
LCPI0_1:
	.long	0x00000000                      ## float 0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_VS_CreateFakeSurfaceLights
	.p2align	4, 0x90
_VS_CreateFakeSurfaceLights:            ## @VS_CreateFakeSurfaceLights
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	__printf
	movq	_numDrawSurfaces@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_32
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_4
LBB0_27:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%rax,%rcx,8), %rbx
	movq	8(%rbx), %rsi
	callq	_VectorAdd
	movq	16(%rbx), %rdi
	callq	_VectorAdd
LBB0_28:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$24, %rbx
	movq	(%rbx), %rdi
	callq	_VectorAdd
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_VectorScale
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	16(%rbx), %rsi
	callq	_VectorCopy
	movq	16(%r13), %rdi
	movq	8(%rbx), %rsi
	callq	_VectorCopy
	movq	_lightPointScale@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	(%r13), %eax
	movl	%eax, (%rbx)
	movq	_LIGHT_POINTRADIAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	_vsounds@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_numvsounds@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%rsi)
	movq	%rbx, (%rax,%rcx,8)
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_32
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
                                        ##       Child Loop BB0_19 Depth 3
                                        ##       Child Loop BB0_23 Depth 3
	movq	_drawSurfaces@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_dshaders@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	shlq	$5, %rbx
	movq	(%r14,%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_ShaderInfoForShader
	cmpl	$0, (%rax)
	je	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r13
	incl	%r12d
	cmpq	$0, 24(%rax)
	je	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_lsurfaceTest@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rax,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_26
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rax), %rbx
	cmpl	$1, (%rax)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$4, (%rbx)
	je	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	8(%rax), %edx
	movl	16(%rax), %ecx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	__printf
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rbx), %rax
	movq	(%rax), %rdi
	movq	8(%rax), %rsi
	callq	_VectorAdd
	movq	16(%rbx), %rax
	movq	16(%rax), %rdi
	callq	_VectorAdd
	movq	16(%rbx), %rbx
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$0, 8(%r13)
	js	LBB0_2
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movss	4(%r13), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm2
	cmpneqss	LCPI0_1(%rip), %xmm2
	andps	%xmm2, %xmm0
	movq	_lightDefaultSubdivide@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	andnps	%xmm1, %xmm2
	orps	%xmm0, %xmm2
	movaps	%xmm2, -96(%rbp)                ## 16-byte Spill
	leaq	(%r14,%rbx), %rcx
	addq	$16, %rcx
	xorl	%r12d, %r12d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movaps	-96(%rbp), %xmm0                ## 16-byte Reload
	callq	_VS_SubdivideAreaLight
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=2
	leal	1(%r12), %eax
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	cmpl	8(%r13), %r12d
	movl	%eax, %r12d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jge	LBB0_29
LBB0_15:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_19 Depth 3
                                        ##       Child Loop BB0_23 Depth 3
	movq	_lsurfaceTest@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rax
	testq	%rax, %rax
	je	LBB0_21
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	cmpl	$0, (%rax)
	jle	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_19 Depth=3
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movaps	-96(%rbp), %xmm0                ## 16-byte Reload
	callq	_VS_SubdivideAreaLight
	incq	%r15
	movq	_lsurfaceTest@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%rbx,8), %rax
	movslq	(%rax), %rcx
	addq	$24, %r13
	cmpq	%rcx, %r15
	jge	LBB0_14
LBB0_19:                                ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	8(%rax), %rbx
	movl	(%rbx,%r13), %edi
	callq	_AllocWinding
	movq	%rax, %r14
	movl	(%rbx,%r13), %eax
	movl	%eax, (%r14)
	movq	8(%r14), %rdi
	movq	16(%rbx,%r13), %rsi
	shll	$2, %eax
	leal	(%rax,%rax,2), %edx
	callq	_memcpy
	movq	8(%rbx,%r13), %rdi
	callq	_VectorCopy
	testl	%r12d, %r12d
	je	LBB0_18
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=3
	movq	%r14, %rdi
	callq	_ReverseWinding
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_FreeWinding
	movq	_vec3_origin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VectorSubtract
	movq	%rbx, %r14
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=2
	movl	(%rcx), %edi
	callq	_AllocWinding
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, %r15
	movl	(%rcx), %eax
	movl	%eax, (%r15)
	testl	%eax, %eax
	movq	_drawVerts@GOTPCREL(%rip), %r14
	jle	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_15 Depth=2
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_15 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	(%r14), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-8(%rcx), %rcx
	addq	%rbx, %rcx
	movq	(%rax,%rcx,8), %rdi
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	callq	_VectorCopy
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	incq	%rbx
	movslq	(%rcx), %rax
	cmpq	%rax, %rbx
	jl	LBB0_23
LBB0_24:                                ##   in Loop: Header=BB0_15 Depth=2
	movq	8(%rcx), %rax
	movq	16(%rax), %rdi
	callq	_VectorCopy
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.25:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	%r15, %rdi
	callq	_ReverseWinding
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_FreeWinding
	movq	_vec3_origin@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_VectorSubtract
	movq	%r14, %r15
	jmp	LBB0_13
LBB0_26:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_drawVerts@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r14,%rbx), %rcx
	cmpl	$4, 16(%r14,%rbx)
	movq	(%rax,%rcx,8), %rdi
	je	LBB0_27
## %bb.31:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rdi), %esi
	movl	8(%rdi), %edx
	movl	16(%rdi), %ecx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	__printf
	jmp	LBB0_2
LBB0_29:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_numDrawSurfaces@GOTPCREL(%rip), %r15
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_3
LBB0_32:
	leaq	L_.str.3(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	__printf                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Creating surface lights...\n"

	.comm	_numDrawSurfaces,4,2            ## @numDrawSurfaces
	.comm	_drawSurfaces,8,3               ## @drawSurfaces
	.comm	_dshaders,8,3                   ## @dshaders
	.comm	_lightDefaultSubdivide,4,2      ## @lightDefaultSubdivide
	.comm	_lsurfaceTest,8,3               ## @lsurfaceTest
L_.str.1:                               ## @.str.1
	.asciz	"WARNING: surface at (%i %i %i) has autosprite shader but isn't a quad\n"

	.comm	_drawVerts,8,3                  ## @drawVerts
L_.str.2:                               ## @.str.2
	.asciz	"WARNING: surface at (%i %i %i) has autosprite shader but %i verts\n"

	.comm	_lightPointScale,4,2            ## @lightPointScale
	.comm	_LIGHT_POINTRADIAL,4,2          ## @LIGHT_POINTRADIAL
	.comm	_vsounds,8,3                    ## @vsounds
	.comm	_numvsounds,4,2                 ## @numvsounds
	.comm	_vec3_origin,4,2                ## @vec3_origin
	.comm	_qtrue,4,2                      ## @qtrue
L_.str.3:                               ## @.str.3
	.asciz	"%7i light emitting surfaces\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VS_CreateFakeSurfaceLights     ; -- Begin function VS_CreateFakeSurfaceLights
	.p2align	2
_VS_CreateFakeSurfaceLights:            ; @VS_CreateFakeSurfaceLights
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	d9, d8, [sp, #48]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	__printf
Lloh2:
	adrp	x24, _numDrawSurfaces@GOTPAGE
Lloh3:
	ldr	x24, [x24, _numDrawSurfaces@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_30
; %bb.1:
	mov	x26, #0
	mov	w23, #0
Lloh4:
	adrp	x25, _drawSurfaces@GOTPAGE
Lloh5:
	ldr	x25, [x25, _drawSurfaces@GOTPAGEOFF]
Lloh6:
	adrp	x20, _lsurfaceTest@GOTPAGE
Lloh7:
	ldr	x20, [x20, _lsurfaceTest@GOTPAGEOFF]
Lloh8:
	adrp	x27, _drawVerts@GOTPAGE
Lloh9:
	ldr	x27, [x27, _drawVerts@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
Lloh10:
	adrp	x24, _numDrawSurfaces@GOTPAGE
Lloh11:
	ldr	x24, [x24, _numDrawSurfaces@GOTPAGEOFF]
Lloh12:
	adrp	x25, _drawSurfaces@GOTPAGE
Lloh13:
	ldr	x25, [x25, _drawSurfaces@GOTPAGEOFF]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x24]
	cmp	x26, x8
	b.ge	LBB0_31
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
                                        ;       Child Loop BB0_19 Depth 3
                                        ;       Child Loop BB0_23 Depth 3
	ldr	x19, [x25]
Lloh14:
	adrp	x8, _dshaders@GOTPAGE
Lloh15:
	ldr	x8, [x8, _dshaders@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	lsl	x9, x26, #5
	ldr	x9, [x19, x9]
	ldr	w0, [x8, x9, lsl #2]
	bl	_ShaderInfoForShader
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	ldr	s0, [x0, #4]
Lloh17:
	adrp	x8, _lightDefaultSubdivide@GOTPAGE
Lloh18:
	ldr	x8, [x8, _lightDefaultSubdivide@GOTPAGEOFF]
Lloh19:
	ldr	s1, [x8]
	fcmp	s0, #0.0
	fcsel	s8, s0, s1, ne
	add	w23, w23, #1
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, x26, lsl #3]
	cbz	x8, LBB0_26
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x19, [x8, #8]
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	cmp	w8, #4
	b.eq	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	ldr	q0, [x8]
	ldr	x8, [x8, #16]
	str	x8, [sp, #16]
	str	q0, [sp]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	__printf
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #16]
	ldp	x0, x1, [x8]
	bl	_VectorAdd
	ldr	x8, [x19, #16]
	ldr	x0, [x8, #16]
	bl	_VectorAdd
	ldr	x8, [x19, #16]
	add	x8, x8, #24
	b	LBB0_28
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21, #8]
	tbnz	w8, #31, LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	w25, #0
	add	x8, x19, x26, lsl #5
	add	x24, x8, #16
	add	x19, x8, #8
	add	x8, x8, #24
	stp	x23, x8, [sp, #32]              ; 16-byte Folded Spill
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=2
Lloh22:
	adrp	x8, _qtrue@GOTPAGE
Lloh23:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	fmov	s0, s8
	bl	_VS_SubdivideAreaLight
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=2
	add	w8, w25, #1
	ldr	w9, [x21, #8]
	cmp	w25, w9
	mov	x25, x8
Lloh25:
	adrp	x27, _drawVerts@GOTPAGE
Lloh26:
	ldr	x27, [x27, _drawVerts@GOTPAGEOFF]
	b.ge	LBB0_2
LBB0_15:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_19 Depth 3
                                        ;       Child Loop BB0_23 Depth 3
	ldr	x8, [x20]
	ldr	x8, [x8, x26, lsl #3]
	cbz	x8, LBB0_21
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=2
	mov	x28, #0
	mov	x27, #0
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=3
Lloh27:
	adrp	x8, _qtrue@GOTPAGE
Lloh28:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	fmov	s0, s8
	bl	_VS_SubdivideAreaLight
	add	x27, x27, #1
	ldr	x8, [x20]
	ldr	x8, [x8, x26, lsl #3]
	ldrsw	x9, [x8]
	add	x28, x28, #24
	cmp	x27, x9
	b.ge	LBB0_14
LBB0_19:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_15 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x8, #8]
	add	x23, x8, x28
	ldr	w0, [x23]
	bl	_AllocWinding
	mov	x22, x0
	ldr	w8, [x23]
	str	w8, [x0]
	ldr	x0, [x0, #8]
	ldr	x1, [x23, #16]
	add	w8, w8, w8, lsl #1
	lsl	w2, w8, #2
	bl	_memcpy
	ldr	x0, [x23, #8]
	bl	_VectorCopy
	cbz	w25, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=3
	mov	x0, x22
	bl	_ReverseWinding
	mov	x23, x0
	mov	x0, x22
	bl	_FreeWinding
Lloh30:
	adrp	x8, _vec3_origin@GOTPAGE
Lloh31:
	ldr	x8, [x8, _vec3_origin@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	bl	_VectorSubtract
	mov	x22, x23
	b	LBB0_18
LBB0_21:                                ;   in Loop: Header=BB0_15 Depth=2
	ldr	w0, [x24]
	bl	_AllocWinding
	mov	x22, x0
	ldr	w8, [x24]
	str	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_15 Depth=2
	mov	x23, #0
LBB0_23:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_15 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x27]
	ldr	x9, [x19]
	add	x9, x23, x9
	ldr	x0, [x8, x9, lsl #3]
	ldr	x8, [x22, #8]
	ldr	x1, [x8, x23, lsl #3]
	bl	_VectorCopy
	add	x23, x23, #1
	ldrsw	x8, [x24]
	cmp	x23, x8
	b.lt	LBB0_23
LBB0_24:                                ;   in Loop: Header=BB0_15 Depth=2
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	ldr	x0, [x8, #16]
	bl	_VectorCopy
	cbz	w25, LBB0_13
; %bb.25:                               ;   in Loop: Header=BB0_15 Depth=2
	mov	x0, x22
	bl	_ReverseWinding
	mov	x23, x0
	mov	x0, x22
	bl	_FreeWinding
Lloh33:
	adrp	x8, _vec3_origin@GOTPAGE
Lloh34:
	ldr	x8, [x8, _vec3_origin@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_VectorSubtract
	mov	x22, x23
	b	LBB0_13
LBB0_26:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x27]
	add	x9, x19, x26, lsl #5
	ldr	x10, [x9, #8]
	add	x19, x8, x10, lsl #3
	ldr	w8, [x9, #16]
	ldr	x0, [x19]
	cmp	w8, #4
	b.ne	LBB0_29
; %bb.27:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x19, #8]
	bl	_VectorAdd
	ldr	x0, [x19, #16]
	bl	_VectorAdd
	add	x8, x19, #24
LBB0_28:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x8]
	bl	_VectorAdd
	fmov	d0, #0.25000000
	bl	_VectorScale
	mov	w0, #24
	bl	_malloc
	mov	x22, x0
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x1, [x22, #16]
	bl	_VectorCopy
	ldr	x0, [x21, #16]
	ldr	x1, [x22, #8]
	bl	_VectorCopy
	ldr	w8, [x21]
Lloh36:
	adrp	x9, _lightPointScale@GOTPAGE
Lloh37:
	ldr	x9, [x9, _lightPointScale@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	mul	w8, w9, w8
	str	w8, [x22]
Lloh39:
	adrp	x8, _LIGHT_POINTRADIAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _LIGHT_POINTRADIAL@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	str	w8, [x22, #4]
Lloh42:
	adrp	x8, _vsounds@GOTPAGE
Lloh43:
	ldr	x8, [x8, _vsounds@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
Lloh45:
	adrp	x11, _numvsounds@GOTPAGE
Lloh46:
	ldr	x11, [x11, _numvsounds@GOTPAGEOFF]
	ldrsw	x9, [x11]
	add	w10, w9, #1
	str	w10, [x11]
	str	x22, [x8, x9, lsl #3]
	b	LBB0_3
LBB0_29:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	q0, [x0]
	ldr	x8, [x0, #16]
	str	x8, [sp, #16]
	str	q0, [sp]
Lloh47:
	adrp	x0, l_.str.2@PAGE
Lloh48:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__printf
	b	LBB0_3
LBB0_30:
	mov	w23, #0
LBB0_31:
	str	x23, [sp]
Lloh49:
	adrp	x0, l_.str.3@PAGE
Lloh50:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__printf
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #48]               ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Creating surface lights...\n"

	.comm	_numDrawSurfaces,4,2            ; @numDrawSurfaces
	.comm	_drawSurfaces,8,3               ; @drawSurfaces
	.comm	_dshaders,8,3                   ; @dshaders
	.comm	_lightDefaultSubdivide,4,2      ; @lightDefaultSubdivide
	.comm	_lsurfaceTest,8,3               ; @lsurfaceTest
l_.str.1:                               ; @.str.1
	.asciz	"WARNING: surface at (%i %i %i) has autosprite shader but isn't a quad\n"

	.comm	_drawVerts,8,3                  ; @drawVerts
l_.str.2:                               ; @.str.2
	.asciz	"WARNING: surface at (%i %i %i) has autosprite shader but %i verts\n"

	.comm	_lightPointScale,4,2            ; @lightPointScale
	.comm	_LIGHT_POINTRADIAL,4,2          ; @LIGHT_POINTRADIAL
	.comm	_vsounds,8,3                    ; @vsounds
	.comm	_numvsounds,4,2                 ; @numvsounds
	.comm	_vec3_origin,4,2                ; @vec3_origin
	.comm	_qtrue,4,2                      ; @qtrue
l_.str.3:                               ; @.str.3
	.asciz	"%7i light emitting surfaces\n"

.subsections_via_symbols
