	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function VL_R_CastLightAtSurface
LCPI0_0:
	.quad	-1                              ## 0xffffffffffffffff
	.quad	0                               ## 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_VL_R_CastLightAtSurface
	.p2align	4, 0x90
_VL_R_CastLightAtSurface:               ## @VL_R_CastLightAtSurface
	.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	%rsi, %r13
	movq	%rdi, %r14
	movq	_lsurfaceTest@GOTPCREL(%rip), %r12
	movq	_MAX_TRANSLUCENTFACETS@GOTPCREL(%rip), %r15
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	48(%r13), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	56(%r13), %edx
	movl	60(%r13), %eax
	movl	%eax, 64(%r13)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [18446744073709551615,0]
	movups	%xmm0, (%r13)
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%ecx, %ecx
	callq	_VL_R_FloodLight
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	(%r13), %rdi
	movq	8(%r13), %rsi
	movq	%r14, %rdx
	movq	%r13, %rcx
	callq	_VL_LightSurfaceWithVolume
	movq	(%r12), %rcx
	movq	(%r13), %rax
	movq	(%rcx,%rax,8), %rcx
	movq	8(%rcx), %rcx
	movq	_SURF_ALPHASHADOW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_CONTENTS_TRANSLUCENT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 4(%rcx)
	je	LBB0_9
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%r13), %rcx
	movq	(%r15), %rsi
	cmpq	%rsi, %rcx
	jb	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movq	(%r13), %rax
	movq	16(%r13), %rcx
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	24(%r13), %rdx
	movq	%rax, (%rdx,%rcx,8)
	movq	32(%r13), %rax
	movq	8(%r13), %rcx
	movq	16(%r13), %rdx
	movq	%rcx, (%rax,%rdx,8)
	incq	16(%r13)
	movq	40(%r13), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	16(%r13), %r8
	testq	%r8, %r8
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %r9
	movq	24(%r13), %r10
	movq	32(%r13), %rdi
	movq	40(%r13), %rbx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r10,%rax,8), %rcx
	movq	(%r9,%rcx,8), %rcx
	movq	(%rcx), %rcx
	movq	(%rdi,%rax,8), %rdx
	movl	(%rcx,%rdx,4), %edx
	movl	%edx, %ecx
	andb	$7, %cl
	movl	$1, %esi
	shll	%cl, %esi
	sarl	$3, %edx
	movslq	%edx, %rcx
	orl	%esi, (%rbx,%rcx,4)
	incq	%rax
	cmpq	%rax, %r8
	jne	LBB0_7
	jmp	LBB0_8
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_lsurfaceTest,8,3               ## @lsurfaceTest
	.comm	_SURF_ALPHASHADOW,4,2           ## @SURF_ALPHASHADOW
	.comm	_CONTENTS_TRANSLUCENT,4,2       ## @CONTENTS_TRANSLUCENT
	.comm	_MAX_TRANSLUCENTFACETS,8,3      ## @MAX_TRANSLUCENTFACETS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"a light valume went through more than %d translucent facets"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function VL_R_CastLightAtSurface
lCPI0_0:
	.quad	-1                              ; 0xffffffffffffffff
	.quad	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_VL_R_CastLightAtSurface
	.p2align	2
_VL_R_CastLightAtSurface:               ; @VL_R_CastLightAtSurface
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _lsurfaceTest@GOTPAGE
Lloh1:
	ldr	x22, [x22, _lsurfaceTest@GOTPAGEOFF]
Lloh2:
	adrp	x23, _SURF_ALPHASHADOW@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SURF_ALPHASHADOW@GOTPAGEOFF]
Lloh4:
	adrp	x24, _CONTENTS_TRANSLUCENT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _CONTENTS_TRANSLUCENT@GOTPAGEOFF]
	mov	w25, #1
Lloh6:
	adrp	x26, _MAX_TRANSLUCENTFACETS@GOTPAGE
Lloh7:
	ldr	x26, [x26, _MAX_TRANSLUCENTFACETS@GOTPAGEOFF]
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp]                        ; 16-byte Folded Spill
Lloh10:
	adrp	x21, l_.str@PAGE
Lloh11:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, #48]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldp	w2, w8, [x19, #56]
	str	w8, [x19, #64]
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	str	q0, [x19]
	mov	x0, x20
	mov	x1, x19
	mov	w3, #0
	bl	_VL_R_FloodLight
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldp	x0, x1, [x19]
	mov	x2, x20
	mov	x3, x19
	bl	_VL_LightSurfaceWithVolume
	ldr	x9, [x22]
	ldr	x8, [x19]
	ldr	x9, [x9, x8, lsl #3]
	ldr	x9, [x9, #8]
	ldr	w10, [x9]
	ldr	w11, [x23]
	tst	w11, w10
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x9, #4]
	ldr	w10, [x24]
	tst	w10, w9
	b.eq	LBB0_9
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x19, #16]
	ldr	x1, [x26]
	cmp	x9, x1
	b.lo	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_Error
	ldr	x8, [x19]
	ldr	x9, [x19, #16]
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldp	x10, x11, [x19, #24]
	str	x8, [x10, x9, lsl #3]
	ldp	x8, x9, [x19, #8]
	str	x8, [x11, x9, lsl #3]
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	str	x8, [x19, #16]
	ldr	x0, [x19, #40]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x9, [x22]
	ldp	x10, x11, [x19, #24]
	ldr	x12, [x19, #40]
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x13, [x10], #8
	ldr	x13, [x9, x13, lsl #3]
	ldr	x13, [x13]
	ldr	x14, [x11], #8
	ldr	w13, [x13, x14, lsl #2]
	and	x14, x13, #0x7
	lsl	w14, w25, w14
	asr	w13, w13, #3
	sbfiz	x13, x13, #2, #32
	ldr	w15, [x12, x13]
	orr	w14, w15, w14
	str	w14, [x12, x13]
	subs	x8, x8, #1
	b.ne	LBB0_8
	b	LBB0_1
LBB0_9:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_lsurfaceTest,8,3               ; @lsurfaceTest
	.comm	_SURF_ALPHASHADOW,4,2           ; @SURF_ALPHASHADOW
	.comm	_CONTENTS_TRANSLUCENT,4,2       ; @CONTENTS_TRANSLUCENT
	.comm	_MAX_TRANSLUCENTFACETS,8,3      ; @MAX_TRANSLUCENTFACETS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"a light valume went through more than %d translucent facets"

.subsections_via_symbols
