	.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_SurfaceRadiosity
LCPI0_0:
	.quad	0x3fa999999999999a              ## double 0.050000000000000003
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_VS_SurfaceRadiosity
	.p2align	4, 0x90
_VS_SurfaceRadiosity:                   ## @VS_SurfaceRadiosity
	.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
	movq	_drawSurfaces@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movslq	%edi, %r14
	imulq	$56, %r14, %rbx
	cmpl	$0, (%r15,%rbx)
	js	LBB0_15
## %bb.1:
	movq	8(%r15,%rbx), %rax
	movq	_MST_TRIANGLE_SOUP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_15
## %bb.2:
	movq	_dshaders@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r15,%rbx), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_ShaderInfoForShader
	movq	_lsurfaceTest@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %r12
	testq	%r12, %r12
	je	LBB0_15
## %bb.3:
	movl	24(%r15,%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.4:
	leaq	(%r15,%rbx), %r8
	leaq	(%r15,%rbx), %r14
	addq	$8, %r14
	movl	28(%r15,%rbx), %r9d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	_LIGHTMAP_HEIGHT@GOTPCREL(%rip), %rdi
	movq	_LIGHTMAP_WIDTH@GOTPCREL(%rip), %rsi
	movq	_lightmappixelarea@GOTPCREL(%rip), %rax
	xorps	%xmm1, %xmm1
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	16(%r14), %ecx
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	incl	%edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, %edx
	jge	LBB0_15
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	testl	%r9d, %r9d
	jle	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	xorps	%xmm0, %xmm0
	cvtsi2ssl	-44(%rbp), %xmm0        ## 4-byte Folded Reload
	cvttss2si	%xmm0, %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	40(%r14), %edi
	movq	32(%r14), %rax
	movl	(%rax), %edx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_VectorMA
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13d, %xmm0
	cvttss2si	%xmm0, %esi
	movq	32(%r14), %rax
	movl	4(%rax), %edx
	callq	_VectorMA
	movq	8(%r12), %rax
	movq	%r12, %r15
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	(%rax), %edi
	callq	_VectorCopy
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leal	(%rbx,%rbx,2), %eax
	movslq	%eax, %r12
	leaq	(,%r12,4), %rbx
	movq	_oldLightFloats@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movl	-80(%rbp), %ecx
	movl	$5, %esi
	callq	_VectorMA
	movl	-84(%rbp), %esi
	movq	%rbx, %rdi
	callq	_ColorNormalize
	movq	%rbx, %rdi
	callq	_VectorLength
	mulsd	LCPI0_0(%rip), %xmm0
	movq	_lightPointScale@GOTPCREL(%rip), %rax
	mulsd	(%rax), %xmm0
	movq	_radiosity_scale@GOTPCREL(%rip), %rax
	movss	-52(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	mulss	(%rax), %xmm1
	cvtss2sd	%xmm1, %xmm1
	divsd	%xmm1, %xmm0
	movsd	%xmm0, -96(%rbp)
	movq	_LIGHT_POINTRADIAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	leaq	-96(%rbp), %rdi
	callq	_VS_FloodLight
	movl	(%r15), %edi
	callq	_MutexLock
	movq	_oldLightFloats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movss	(%rax,%r12,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movq	_lightFloats@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movss	%xmm0, (%rcx,%r12,4)
	movss	4(%rax,%r12,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 4(%rcx,%r12,4)
	movss	8(%rax,%r12,4), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 8(%rcx,%r12,4)
	movl	(%r15), %edi
	callq	_MutexUnlock
	movl	20(%r14), %r9d
	movq	%r15, %r12
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	_LIGHTMAP_HEIGHT@GOTPCREL(%rip), %rdi
	movq	_LIGHTMAP_WIDTH@GOTPCREL(%rip), %rsi
	movq	_lightmappixelarea@GOTPCREL(%rip), %rax
	xorps	%xmm1, %xmm1
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=2
	incl	%r13d
	cmpl	%r9d, %r13d
	jge	LBB0_13
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdi), %ecx
	imull	(%r8), %ecx
	addl	24(%r14), %ecx
	addl	%r13d, %ecx
	imull	(%rsi), %ecx
	movl	28(%r14), %ebx
	addl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	addl	%ecx, %ebx
	movq	(%rax), %rcx
	movslq	%ebx, %rdx
	movss	(%rcx,%rdx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jae	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	(%r14), %rax
	movq	_MST_PATCH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movss	%xmm0, -52(%rbp)                ## 4-byte Spill
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	%r12, %r15
	movq	16(%r12), %r12
	movq	8(%r12), %rax
	movl	(%r12), %ecx
	imull	%r13d, %ecx
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	addl	%r14d, %ecx
	movslq	%ecx, %rcx
	movl	4(%rax,%rcx,8), %edi
	callq	_VectorCopy
	movl	(%r12), %eax
	imull	%r13d, %eax
	addl	%r14d, %eax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	cltq
	shlq	$3, %rax
	addq	8(%r12), %rax
	jmp	LBB0_11
LBB0_15:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drawSurfaces,8,3               ## @drawSurfaces
	.comm	_MST_TRIANGLE_SOUP,8,3          ## @MST_TRIANGLE_SOUP
	.comm	_dshaders,8,3                   ## @dshaders
	.comm	_lsurfaceTest,8,3               ## @lsurfaceTest
	.comm	_LIGHTMAP_HEIGHT,4,2            ## @LIGHTMAP_HEIGHT
	.comm	_LIGHTMAP_WIDTH,4,2             ## @LIGHTMAP_WIDTH
	.comm	_lightmappixelarea,8,3          ## @lightmappixelarea
	.comm	_MST_PATCH,8,3                  ## @MST_PATCH
	.comm	_oldLightFloats,8,3             ## @oldLightFloats
	.comm	_lightPointScale,8,3            ## @lightPointScale
	.comm	_radiosity_scale,4,2            ## @radiosity_scale
	.comm	_LIGHT_POINTRADIAL,4,2          ## @LIGHT_POINTRADIAL
	.comm	_lightFloats,8,3                ## @lightFloats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VS_SurfaceRadiosity            ; -- Begin function VS_SurfaceRadiosity
	.p2align	2
_VS_SurfaceRadiosity:                   ; @VS_SurfaceRadiosity
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	d9, d8, [sp, #80]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x8, _drawSurfaces@GOTPAGE
Lloh1:
	ldr	x8, [x8, _drawSurfaces@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	mov	w8, #56
	smaddl	x21, w0, w8, x19
	ldr	w8, [x21]
	tbnz	w8, #31, LBB0_15
; %bb.1:
	sxtw	x20, w0
	mov	w8, #56
	madd	x9, x20, x8, x19
	ldr	x8, [x9, #8]!
	str	x9, [sp, #48]                   ; 8-byte Folded Spill
Lloh3:
	adrp	x9, _MST_TRIANGLE_SOUP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MST_TRIANGLE_SOUP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.2:
Lloh6:
	adrp	x8, _dshaders@GOTPAGE
Lloh7:
	ldr	x8, [x8, _dshaders@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	mov	w9, #56
	madd	x9, x20, x9, x19
	ldr	x9, [x9, #16]
	ldr	w0, [x8, x9, lsl #2]
	bl	_ShaderInfoForShader
Lloh9:
	adrp	x8, _lsurfaceTest@GOTPAGE
Lloh10:
	ldr	x8, [x8, _lsurfaceTest@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x23, [x8, x20, lsl #3]
	cbz	x23, LBB0_15
; %bb.3:
	mov	w8, #56
	madd	x8, x20, x8, x19
	ldr	w9, [x8, #24]!
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	cmp	w9, #1
	b.lt	LBB0_15
; %bb.4:
	mov	w25, #0
	mov	w8, #56
	madd	x10, x20, x8, x19
	ldr	w8, [x10, #28]!
	add	x27, x10, #4
	add	x28, x10, #8
	add	x11, x10, #20
	str	x11, [sp, #24]                  ; 8-byte Folded Spill
Lloh12:
	adrp	x12, _LIGHTMAP_HEIGHT@GOTPAGE
Lloh13:
	ldr	x12, [x12, _LIGHTMAP_HEIGHT@GOTPAGEOFF]
Lloh14:
	adrp	x13, _LIGHTMAP_WIDTH@GOTPAGE
Lloh15:
	ldr	x13, [x13, _LIGHTMAP_WIDTH@GOTPAGEOFF]
Lloh16:
	adrp	x14, _lightmappixelarea@GOTPAGE
Lloh17:
	ldr	x14, [x14, _lightmappixelarea@GOTPAGEOFF]
	str	x10, [sp, #40]                  ; 8-byte Folded Spill
	add	x10, x10, #12
	str	x10, [sp, #16]                  ; 8-byte Folded Spill
Lloh18:
	adrp	x24, _oldLightFloats@GOTPAGE
Lloh19:
	ldr	x24, [x24, _oldLightFloats@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w9, [x9]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w25, w25, #1
	cmp	w25, w9
	b.ge	LBB0_15
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	w19, #0
	scvtf	s0, w25
	fcvtzs	w9, s0
	str	w9, [sp, #36]                   ; 4-byte Folded Spill
	b	LBB0_12
LBB0_9:                                 ;   in Loop: Header=BB0_12 Depth=2
	ldp	x22, x8, [sp, #16]              ; 16-byte Folded Reload
	ldr	w0, [x8]
	ldr	x8, [x22]
	ldr	w2, [x8]
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
	bl	_VectorMA
	scvtf	s0, w19
	fcvtzs	w1, s0
	ldr	x8, [x22]
	ldr	w2, [x8, #4]
	bl	_VectorMA
	ldr	x8, [x23, #8]
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=2
	sxtw	x20, w20
	ldr	w0, [x8]
	bl	_VectorCopy
	add	x0, sp, #56
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	x8, [x24]
	add	x22, x20, x20, lsl #1
	lsl	x26, x22, #2
	add	x20, x8, x26
	ldr	w3, [sp, #72]
	mov	w1, #5
	bl	_VectorMA
	ldr	w1, [sp, #68]
	mov	x0, x20
	bl	_ColorNormalize
	mov	x0, x20
	bl	_VectorLength
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16297, lsl #48
	fmov	d1, x8
	fmul	d0, d0, d1
Lloh20:
	adrp	x8, _lightPointScale@GOTPAGE
Lloh21:
	ldr	x8, [x8, _lightPointScale@GOTPAGEOFF]
Lloh22:
	ldr	d1, [x8]
	fmul	d0, d0, d1
Lloh23:
	adrp	x8, _radiosity_scale@GOTPAGE
Lloh24:
	ldr	x8, [x8, _radiosity_scale@GOTPAGEOFF]
Lloh25:
	ldr	s1, [x8]
	fmul	s1, s8, s1
	fcvt	d1, s1
	fdiv	d0, d0, d1
	str	d0, [sp, #56]
Lloh26:
	adrp	x8, _LIGHT_POINTRADIAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LIGHT_POINTRADIAL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [sp, #64]
	add	x0, sp, #56
	bl	_VS_FloodLight
	ldr	w0, [x23]
	bl	_MutexLock
	ldr	x8, [x24]
	ldr	s0, [x8, x26]
Lloh29:
	adrp	x9, _lightFloats@GOTPAGE
Lloh30:
	ldr	x9, [x9, _lightFloats@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	str	s0, [x9, x26]
	sxtw	x10, w22
	lsl	x10, x10, #2
	add	x11, x10, #4
	ldr	s0, [x8, x11]
	str	s0, [x9, x11]
	add	x10, x10, #8
	ldr	s0, [x8, x10]
	str	s0, [x9, x10]
	ldr	w0, [x23]
	bl	_MutexUnlock
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	ldr	w8, [x8]
Lloh32:
	adrp	x12, _LIGHTMAP_HEIGHT@GOTPAGE
Lloh33:
	ldr	x12, [x12, _LIGHTMAP_HEIGHT@GOTPAGEOFF]
Lloh34:
	adrp	x13, _LIGHTMAP_WIDTH@GOTPAGE
Lloh35:
	ldr	x13, [x13, _LIGHTMAP_WIDTH@GOTPAGEOFF]
Lloh36:
	adrp	x14, _lightmappixelarea@GOTPAGE
Lloh37:
	ldr	x14, [x14, _lightmappixelarea@GOTPAGEOFF]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	add	w19, w19, #1
	cmp	w19, w8
	b.ge	LBB0_5
LBB0_12:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x21]
	ldr	w10, [x12]
	ldr	w11, [x27]
	madd	w9, w10, w9, w11
	add	w9, w19, w9
	ldr	w10, [x13]
	ldr	w11, [x28]
	add	w11, w11, w25
	madd	w20, w9, w10, w11
	ldr	x9, [x14]
	ldr	s8, [x9, w20, sxtw #2]
	fcmp	s8, #0.0
	b.ls	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
Lloh38:
	adrp	x9, _MST_PATCH@GOTPAGE
Lloh39:
	ldr	x9, [x9, _MST_PATCH@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=2
	ldr	x22, [x23, #16]
	ldr	x8, [x22, #8]
	ldr	w9, [x22]
	madd	w9, w9, w19, w25
	add	x8, x8, w9, sxtw #3
	ldr	w0, [x8, #4]
	bl	_VectorCopy
	ldr	x8, [x22, #8]
	ldr	w9, [x22]
	madd	w9, w9, w19, w25
	add	x8, x8, w9, sxtw #3
	b	LBB0_10
LBB0_15:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_drawSurfaces,8,3               ; @drawSurfaces
	.comm	_MST_TRIANGLE_SOUP,8,3          ; @MST_TRIANGLE_SOUP
	.comm	_dshaders,8,3                   ; @dshaders
	.comm	_lsurfaceTest,8,3               ; @lsurfaceTest
	.comm	_LIGHTMAP_HEIGHT,4,2            ; @LIGHTMAP_HEIGHT
	.comm	_LIGHTMAP_WIDTH,4,2             ; @LIGHTMAP_WIDTH
	.comm	_lightmappixelarea,8,3          ; @lightmappixelarea
	.comm	_MST_PATCH,8,3                  ; @MST_PATCH
	.comm	_oldLightFloats,8,3             ; @oldLightFloats
	.comm	_lightPointScale,8,3            ; @lightPointScale
	.comm	_radiosity_scale,4,2            ; @radiosity_scale
	.comm	_LIGHT_POINTRADIAL,4,2          ; @LIGHT_POINTRADIAL
	.comm	_lightFloats,8,3                ; @lightFloats
.subsections_via_symbols
