	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VL_LightWorld                  ## -- Begin function VL_LightWorld
	.p2align	4, 0x90
_VL_LightWorld:                         ## @VL_LightWorld
	.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	_entities@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_lightAmbientColor@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_GetVectorForKey
	movq	(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_FloatForKey
	movl	(%r14), %edi
	movl	%edi, %esi
	callq	_VectorScale
	movq	_numvlights@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	__printf
	movl	(%r14), %edi
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VL_FloodLightThread@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_RunThreadsOnIndividual
	movq	_numDrawSurfaces@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ebx, %ebx
	movl	$0, %esi
	testl	%r8d, %r8d
	jle	LBB0_12
## %bb.1:
	movq	_lsurfaceTest@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpl	$1, %r8d
	jne	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	xorl	%esi, %esi
LBB0_9:
	testb	$1, %r8b
	je	LBB0_12
## %bb.10:
	movq	(%rcx,%rdx,8), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	addl	(%rax), %esi
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
	callq	__printf
	movl	(%r14), %edx
	testl	%edx, %edx
	jle	LBB0_20
## %bb.13:
	movq	_vlights@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %r8d
	andl	$3, %r8d
	cmpq	$3, %rsi
	jae	LBB0_15
## %bb.14:
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_3:
	movl	%r8d, %edi
	andl	$-2, %edi
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$2, %rdx
	cmpq	%rdx, %rdi
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	(%rax), %esi
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rcx,%rdx,8), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	(%rax), %esi
	jmp	LBB0_8
LBB0_15:
	andl	$-4, %edx
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	movq	8(%rcx,%rsi,8), %rax
	cmpq	$1, (%rdi)
	sbbl	$-1, %ebx
	cmpq	$1, (%rax)
	sbbl	$-1, %ebx
	movq	16(%rcx,%rsi,8), %rax
	cmpq	$1, (%rax)
	sbbl	$-1, %ebx
	movq	24(%rcx,%rsi,8), %rax
	cmpq	$1, (%rax)
	sbbl	$-1, %ebx
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_16
LBB0_17:
	testq	%r8, %r8
	je	LBB0_20
## %bb.18:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rax
	cmpq	$1, (%rax)
	sbbl	$-1, %ebx
	incq	%rdx
	cmpq	%rdx, %r8
	jne	LBB0_19
LBB0_20:
	leaq	L_.str.4(%rip), %rdi
	movl	%ebx, %esi
	callq	__printf
	movq	_radiosity_scale@GOTPCREL(%rip), %r14
	movl	$1, (%r14)
	movq	_radiosity@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_23
## %bb.21:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_VL_Radiosity
	shll	(%r14)
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_22
LBB0_23:
	xorl	%eax, %eax
	callq	_VL_StoreLightmap
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VL_DoForcedTraceLightSurfaces  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_entities,8,3                   ## @entities
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"_color"

	.comm	_lightAmbientColor,4,2          ## @lightAmbientColor
L_.str.1:                               ## @.str.1
	.asciz	"ambient"

L_.str.2:                               ## @.str.2
	.asciz	"%7i lights\n"

	.comm	_numvlights,4,2                 ## @numvlights
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_VL_FloodLightThread,4,2        ## @VL_FloodLightThread
	.comm	_numDrawSurfaces,4,2            ## @numDrawSurfaces
	.comm	_lsurfaceTest,8,3               ## @lsurfaceTest
L_.str.3:                               ## @.str.3
	.asciz	"%7i light volumes casted\n"

	.comm	_vlights,8,3                    ## @vlights
L_.str.4:                               ## @.str.4
	.asciz	"%7i lights in solid\n"

	.comm	_radiosity_scale,4,2            ## @radiosity_scale
	.comm	_radiosity,4,2                  ## @radiosity
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VL_LightWorld                  ; -- Begin function VL_LightWorld
	.p2align	2
_VL_LightWorld:                         ; @VL_LightWorld
	.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
Lloh0:
	adrp	x19, _entities@GOTPAGE
Lloh1:
	ldr	x19, [x19, _entities@GOTPAGEOFF]
	ldr	x0, [x19]
Lloh2:
	adrp	x20, _lightAmbientColor@GOTPAGE
Lloh3:
	ldr	x20, [x20, _lightAmbientColor@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_GetVectorForKey
	ldr	x0, [x19]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_FloatForKey
	ldr	w0, [x20]
	mov	x1, x0
	bl	_VectorScale
Lloh8:
	adrp	x19, _numvlights@GOTPAGE
Lloh9:
	ldr	x19, [x19, _numvlights@GOTPAGEOFF]
	ldr	w1, [x19]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__printf
	ldr	w0, [x19]
Lloh12:
	adrp	x8, _qtrue@GOTPAGE
Lloh13:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _VL_FloodLightThread@GOTPAGE
Lloh16:
	ldr	x8, [x8, _VL_FloodLightThread@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_RunThreadsOnIndividual
Lloh18:
	adrp	x8, _numDrawSurfaces@GOTPAGE
Lloh19:
	ldr	x8, [x8, _numDrawSurfaces@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	w1, #0
Lloh21:
	adrp	x9, _lsurfaceTest@GOTPAGE
Lloh22:
	ldr	x9, [x9, _lsurfaceTest@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbz	x10, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w10, [x10]
	add	w1, w1, w10
	b	LBB0_2
LBB0_5:
	mov	w1, #0
LBB0_6:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	__printf
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
Lloh26:
	adrp	x9, _vlights@GOTPAGE
Lloh27:
	ldr	x9, [x9, _vlights@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	w8, #4
	b.hs	LBB0_10
; %bb.8:
	mov	x10, #0
	mov	w1, #0
	b	LBB0_13
LBB0_9:
	mov	w1, #0
	b	LBB0_15
LBB0_10:
	mov	w13, #0
	mov	w14, #0
	mov	w12, #0
	mov	w11, #0
	and	x10, x8, #0xfffffffc
	add	x15, x9, #16
	mov	x16, x10
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldp	x17, x0, [x15, #-16]
	ldp	x1, x2, [x15], #32
	ldr	x17, [x17]
	ldr	x0, [x0]
	ldr	x1, [x1]
	ldr	x2, [x2]
	cmp	x17, #0
	cinc	w13, w13, ne
	cmp	x0, #0
	cinc	w14, w14, ne
	cmp	x1, #0
	cinc	w12, w12, ne
	cmp	x2, #0
	cinc	w11, w11, ne
	subs	x16, x16, #4
	b.ne	LBB0_11
; %bb.12:
	add	w13, w14, w13
	add	w12, w12, w13
	add	w1, w11, w12
	cmp	x10, x8
	b.eq	LBB0_15
LBB0_13:
	add	x9, x9, x10, lsl #3
	sub	x8, x8, x10
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9], #8
	ldr	x10, [x10]
	cmp	x10, #0
	cinc	w1, w1, ne
	subs	x8, x8, #1
	b.ne	LBB0_14
LBB0_15:
Lloh29:
	adrp	x0, l_.str.4@PAGE
Lloh30:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	__printf
Lloh31:
	adrp	x19, _radiosity_scale@GOTPAGE
Lloh32:
	ldr	x19, [x19, _radiosity_scale@GOTPAGEOFF]
	mov	w8, #1
	str	w8, [x19]
Lloh33:
	adrp	x20, _radiosity@GOTPAGE
Lloh34:
	ldr	x20, [x20, _radiosity@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.16:
	mov	w21, #0
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	bl	_VL_Radiosity
	ldr	w8, [x19]
	lsl	w8, w8, #1
	str	w8, [x19]
	add	w21, w21, #1
	ldr	w8, [x20]
	cmp	w21, w8
	b.lt	LBB0_17
LBB0_18:
	bl	_VL_StoreLightmap
	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
	b	_VL_DoForcedTraceLightSurfaces
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_entities,8,3                   ; @entities
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"_color"

	.comm	_lightAmbientColor,4,2          ; @lightAmbientColor
l_.str.1:                               ; @.str.1
	.asciz	"ambient"

l_.str.2:                               ; @.str.2
	.asciz	"%7i lights\n"

	.comm	_numvlights,4,2                 ; @numvlights
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_VL_FloodLightThread,4,2        ; @VL_FloodLightThread
	.comm	_numDrawSurfaces,4,2            ; @numDrawSurfaces
	.comm	_lsurfaceTest,8,3               ; @lsurfaceTest
l_.str.3:                               ; @.str.3
	.asciz	"%7i light volumes casted\n"

	.comm	_vlights,8,3                    ; @vlights
l_.str.4:                               ; @.str.4
	.asciz	"%7i lights in solid\n"

	.comm	_radiosity_scale,4,2            ; @radiosity_scale
	.comm	_radiosity,4,2                  ; @radiosity
.subsections_via_symbols
