	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function R_SetupEntityLightingGrid
LCPI0_0:
	.long	0x7fc00000                      ## float NaN
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_R_SetupEntityLightingGrid:             ## @R_SetupEntityLightingGrid
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_RF_LIGHTING_ORIGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	20(%rdi), %eax
	setne	%cl
	movl	24(%rdi,%rcx,4), %edi
	callq	_VectorCopy
	movq	_tr@GOTPCREL(%rip), %r14
	movq	8(%r14), %rax
	movl	24(%rax), %esi
	callq	_VectorSubtract
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	callq	_floor
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	callq	_floor
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	callq	_floor
	movq	(%rbx), %rdi
	callq	_VectorClear
	movq	8(%rbx), %rdi
	callq	_VectorClear
	callq	_VectorClear
	movq	8(%r14), %rax
	movq	16(%rax), %rdi
	callq	_assert
	movq	(%rbx), %rdi
	movq	_r_ambientScale@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movq	%rdi, %rsi
	callq	_VectorScale
	movq	8(%rbx), %rdi
	movq	_r_directedScale@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movq	%rdi, %rsi
	callq	_VectorScale
	movl	16(%rbx), %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_VectorNormalize2               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RF_LIGHTING_ORIGIN,4,2         ## @RF_LIGHTING_ORIGIN
	.comm	_tr,16,3                        ## @tr
	.comm	_FUNCTABLE_SIZE,4,2             ## @FUNCTABLE_SIZE
	.comm	_FUNCTABLE_MASK,4,2             ## @FUNCTABLE_MASK
	.comm	_r_ambientScale,8,3             ## @r_ambientScale
	.comm	_r_directedScale,8,3            ## @r_directedScale
	.no_dead_strip	_R_SetupEntityLightingGrid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function R_SetupEntityLightingGrid
_R_SetupEntityLightingGrid:             ; @R_SetupEntityLightingGrid
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -40
	.cfi_offset b9, -48
	mov	x19, x0
	ldr	w8, [x0, #20]
Lloh0:
	adrp	x9, _RF_LIGHTING_ORIGIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RF_LIGHTING_ORIGIN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #28
	mov	w9, #24
	csel	x8, x9, x8, eq
	ldr	w0, [x0, x8]
	bl	_VectorCopy
Lloh3:
	adrp	x20, _tr@GOTPAGE
Lloh4:
	ldr	x20, [x20, _tr@GOTPAGEOFF]
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #24]
	bl	_VectorSubtract
	mov	w8, #2143289344
	fmov	s8, w8
	fmov	s0, s8
	bl	_floor
	fmov	s0, s8
	bl	_floor
	fmov	s0, s8
	bl	_floor
	ldr	x0, [x19]
	bl	_VectorClear
	ldr	x0, [x19, #8]
	bl	_VectorClear
	bl	_VectorClear
	ldr	x8, [x20, #8]
	ldr	x0, [x8, #16]
	bl	_assert
	ldr	x0, [x19]
Lloh5:
	adrp	x8, _r_ambientScale@GOTPAGE
Lloh6:
	ldr	x8, [x8, _r_ambientScale@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	s0, [x8]
	mov	x1, x0
	bl	_VectorScale
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x8, _r_directedScale@GOTPAGE
Lloh9:
	ldr	x8, [x8, _r_directedScale@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldr	s0, [x8]
	mov	x1, x0
	bl	_VectorScale
	ldr	w1, [x19, #16]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #48               ; 16-byte Folded Reload
	b	_VectorNormalize2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RF_LIGHTING_ORIGIN,4,2         ; @RF_LIGHTING_ORIGIN
	.comm	_tr,16,3                        ; @tr
	.comm	_FUNCTABLE_SIZE,4,2             ; @FUNCTABLE_SIZE
	.comm	_FUNCTABLE_MASK,4,2             ; @FUNCTABLE_MASK
	.comm	_r_ambientScale,8,3             ; @r_ambientScale
	.comm	_r_directedScale,8,3            ; @r_directedScale
	.no_dead_strip	_R_SetupEntityLightingGrid
.subsections_via_symbols
