	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function LightContributionToPoint
LCPI0_0:
	.long	0x41800000                      ## float 16
LCPI0_1:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_2:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_LightContributionToPoint
	.p2align	4, 0x90
_LightContributionToPoint:              ## @LightContributionToPoint
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rdx, %rdi
	callq	_VectorClear
	movq	_exactPointToPolygon@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	(%rbx), %rax
	je	LBB0_11
## %bb.1:
	movq	_emit_area@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.2:
	movl	60(%rbx), %esi
	movq	%r15, %rdi
	callq	_DotProduct
	cmpq	$0, 48(%rbx)
	jne	LBB0_5
## %bb.3:
	subss	8(%rbx), %xmm0
	movss	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	LBB0_5
## %bb.4:
	movq	_qfalse@GOTPCREL(%rip), %r13
	jmp	LBB0_20
LBB0_11:
	movq	_emit_point@GOTPCREL(%rip), %rcx
	movq	_qfalse@GOTPCREL(%rip), %r13
	cmpq	(%rcx), %rax
	je	LBB0_13
## %bb.12:
	movq	_emit_spotlight@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
LBB0_13:
	movl	24(%rbx), %edi
	movq	%r15, %rsi
	callq	_VectorSubtract
	callq	_VectorLength
	movss	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	maxss	%xmm0, %xmm1
	cmpq	$0, 32(%rbx)
	movss	12(%rbx), %xmm2                 ## xmm2 = mem[0],zero,zero,zero
	je	LBB0_15
## %bb.14:
	movq	_linearScale@GOTPCREL(%rip), %rax
	mulss	(%rax), %xmm2
	subss	%xmm1, %xmm2
	xorps	%xmm0, %xmm0
	ucomiss	%xmm2, %xmm0
	jbe	LBB0_16
	jmp	LBB0_20
LBB0_5:
	movl	24(%rbx), %esi
	movq	_qfalse@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, %r8
	callq	_TraceLine
	cmpq	$0, -48(%rbp)
	jne	LBB0_20
## %bb.6:
	movl	24(%rbx), %edi
	movq	%r15, %rsi
	callq	_VectorSubtract
	callq	_VectorNormalize
	testq	%rax, %rax
	je	LBB0_20
## %bb.7:
	movl	56(%rbx), %edx
	movq	%r15, %rdi
	callq	_PointToPolygonFormFactor
	xorps	%xmm1, %xmm1
	ucomiss	%xmm0, %xmm1
	jb	LBB0_10
## %bb.8:
	cmpq	$0, 48(%rbx)
	je	LBB0_20
## %bb.9:
	movaps	LCPI0_2(%rip), %xmm1            ## xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm1, %xmm0
LBB0_10:
	movl	40(%rbx), %edi
	movq	%r14, %rsi
	callq	_VectorScale
	jmp	LBB0_19
LBB0_15:
	mulss	%xmm1, %xmm1
	divss	%xmm1, %xmm2
LBB0_16:
	movss	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm2, %xmm0
	jae	LBB0_20
## %bb.17:
	movl	24(%rbx), %esi
	movq	_qfalse@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movq	%r12, %r8
	movss	%xmm2, -52(%rbp)                ## 4-byte Spill
	callq	_TraceLine
	movss	-52(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	cmpq	$0, -48(%rbp)
	jne	LBB0_20
## %bb.18:
	movq	16(%rbx), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	movss	%xmm0, (%r14)
	movss	4(%rax), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	movss	%xmm0, 4(%r14)
	mulss	8(%rax), %xmm1
	movss	%xmm1, 8(%r14)
LBB0_19:
	movq	_qtrue@GOTPCREL(%rip), %r13
LBB0_20:
	movl	(%r13), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_exactPointToPolygon,8,3        ## @exactPointToPolygon
	.comm	_emit_area,8,3                  ## @emit_area
	.comm	_qfalse,4,2                     ## @qfalse
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_emit_point,8,3                 ## @emit_point
	.comm	_emit_spotlight,8,3             ## @emit_spotlight
	.comm	_linearScale,4,2                ## @linearScale
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LightContributionToPoint       ; -- Begin function LightContributionToPoint
	.p2align	2
_LightContributionToPoint:              ; @LightContributionToPoint
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x2
	bl	_VectorClear
Lloh0:
	adrp	x8, _exactPointToPolygon@GOTPAGE
Lloh1:
	ldr	x8, [x8, _exactPointToPolygon@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	ldr	x8, [x20]
Lloh3:
	adrp	x10, _emit_area@GOTPAGE
Lloh4:
	ldr	x10, [x10, _emit_area@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, #0
	ccmp	x8, x10, #0, ne
	b.eq	LBB0_4
; %bb.1:
Lloh6:
	adrp	x9, _emit_point@GOTPAGE
Lloh7:
	ldr	x9, [x9, _emit_point@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _emit_spotlight@GOTPAGE
Lloh10:
	ldr	x10, [x10, _emit_spotlight@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_12
; %bb.2:
	ldr	w0, [x20, #24]
	mov	x1, x21
	bl	_VectorSubtract
	bl	_VectorLength
	fmov	s1, #16.00000000
	fmax	s0, s0, s1
	ldr	x8, [x20, #32]
	ldr	s1, [x20, #12]
	cbz	x8, LBB0_14
; %bb.3:
Lloh12:
	adrp	x8, _linearScale@GOTPAGE
Lloh13:
	ldr	x8, [x8, _linearScale@GOTPAGEOFF]
Lloh14:
	ldr	s2, [x8]
	fnmsub	s8, s1, s2, s0
	fcmp	s8, #0.0
	b.pl	LBB0_15
	b	LBB0_12
LBB0_4:
	ldr	w1, [x20, #60]
	mov	x0, x21
	bl	_DotProduct
	ldr	x8, [x20, #48]
Lloh15:
	adrp	x23, _qfalse@GOTPAGE
Lloh16:
	ldr	x23, [x23, _qfalse@GOTPAGEOFF]
	cbnz	x8, LBB0_6
; %bb.5:
	ldr	s1, [x20, #8]
	fsub	s0, s0, s1
	fmov	s1, #1.00000000
	fcmp	s0, s1
	b.mi	LBB0_13
LBB0_6:
	ldr	w1, [x20, #24]
	ldr	w3, [x23]
	add	x2, sp, #8
	mov	x0, x21
	mov	x4, x22
	bl	_TraceLine
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_13
; %bb.7:
	ldr	w0, [x20, #24]
	mov	x1, x21
	bl	_VectorSubtract
	bl	_VectorNormalize
	cbz	x0, LBB0_12
; %bb.8:
	ldr	w2, [x20, #56]
	mov	x0, x21
	bl	_PointToPolygonFormFactor
	fcmp	s0, #0.0
	b.hi	LBB0_11
; %bb.9:
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_12
; %bb.10:
	fneg	s0, s0
LBB0_11:
	ldr	w0, [x20, #40]
	mov	x1, x19
	bl	_VectorScale
	b	LBB0_18
LBB0_12:
Lloh17:
	adrp	x23, _qfalse@GOTPAGE
Lloh18:
	ldr	x23, [x23, _qfalse@GOTPAGEOFF]
LBB0_13:
	ldr	w0, [x23]
	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	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
	fmul	s0, s0, s0
	fdiv	s8, s1, s0
LBB0_15:
Lloh19:
	adrp	x23, _qfalse@GOTPAGE
Lloh20:
	ldr	x23, [x23, _qfalse@GOTPAGEOFF]
	fmov	s0, #1.00000000
	fcmp	s8, s0
	b.ls	LBB0_13
; %bb.16:
	ldr	w1, [x20, #24]
	ldr	w3, [x23]
	add	x2, sp, #8
	mov	x0, x21
	mov	x4, x22
	bl	_TraceLine
	ldr	x8, [sp, #8]
	cbnz	x8, LBB0_13
; %bb.17:
	ldr	x8, [x20, #16]
	ldr	s0, [x8]
	fmul	s0, s8, s0
	str	s0, [x19]
	ldr	s0, [x8, #4]
	fmul	s0, s8, s0
	str	s0, [x19, #4]
	ldr	s0, [x8, #8]
	fmul	s0, s8, s0
	str	s0, [x19, #8]
LBB0_18:
Lloh21:
	adrp	x23, _qtrue@GOTPAGE
Lloh22:
	ldr	x23, [x23, _qtrue@GOTPAGEOFF]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_exactPointToPolygon,8,3        ; @exactPointToPolygon
	.comm	_emit_area,8,3                  ; @emit_area
	.comm	_qfalse,4,2                     ; @qfalse
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_emit_point,8,3                 ; @emit_point
	.comm	_emit_spotlight,8,3             ; @emit_spotlight
	.comm	_linearScale,4,2                ; @linearScale
.subsections_via_symbols
