	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function SubdivideAreaLight
LCPI0_0:
	.long	0x4b989680                      ## float 2.0E+7
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_SubdivideAreaLight
	.p2align	4, 0x90
_SubdivideAreaLight:                    ## @SubdivideAreaLight
	.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
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.1:
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_WindingBounds
	movq	%rbx, %rdi
	callq	_WindingArea
	xorps	%xmm1, %xmm1
	ucomiss	%xmm0, %xmm1
	jae	LBB0_8
## %bb.2:
	ucomiss	LCPI0_0(%rip), %xmm0
	ja	LBB0_8
## %bb.3:
	movq	_numAreaLights@GOTPCREL(%rip), %rax
	incl	(%rax)
	movl	$64, %edi
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	callq	_malloc
	movq	%rax, %r13
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	_lights@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	%rax, 32(%r13)
	movq	%r13, (%rcx)
	movq	_emit_area@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movl	20(%r13), %esi
	movq	%rbx, %rdi
	callq	_WindingCenter
	movq	%rbx, 56(%r13)
	movl	48(%r13), %esi
	movq	%r14, %rdi
	callq	_VectorCopy
	movl	20(%r13), %edi
	movq	%r14, %rsi
	callq	_DotProduct
	movl	%eax, 52(%r13)
	movss	(%r15), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -48(%rbp)                ## 4-byte Spill
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	movq	_areaScale@GOTPCREL(%rip), %rbx
	mulss	(%rbx), %xmm0
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movl	20(%r13), %edi
	movl	48(%r13), %esi
	movl	%edi, %edx
	callq	_VectorAdd
	movq	8(%r15), %rdi
	movl	16(%r13), %esi
	callq	_VectorCopy
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r13)
	movq	_formFactorValueScale@GOTPCREL(%rip), %rax
	movss	-48(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	mulss	(%rax), %xmm0
	movq	8(%r15), %rdi
	mulss	(%rbx), %xmm0
	movl	44(%r13), %esi
	callq	_VectorScale
	movq	%r15, 8(%r13)
	movq	_CONTENTS_FOG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%r15)
	je	LBB0_5
## %bb.4:
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r13)
LBB0_5:
	testq	%r12, %r12
	je	LBB0_8
## %bb.6:
	cmpl	$0, 20(%r15)
	jle	LBB0_8
## %bb.7:
	movl	$64, %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	_lights@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movq	%rax, 32(%rbx)
	movq	%rbx, (%rcx)
	movq	_emit_point@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	20(%r13), %edi
	movl	24(%r15), %esi
	movl	20(%rbx), %ecx
	movq	%r14, %rdx
	callq	_VectorMA
	movq	8(%r15), %rdi
	movl	16(%rbx), %esi
	callq	_VectorCopy
	xorps	%xmm0, %xmm0
	cvtsi2ssl	20(%r15), %xmm0
	mulss	(%r13), %xmm0
	movss	%xmm0, (%rbx)
	movq	%r15, 8(%rbx)
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ON_EPSILON,4,2                 ## @ON_EPSILON
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_numAreaLights,4,2              ## @numAreaLights
	.comm	_lights,8,3                     ## @lights
	.comm	_emit_area,4,2                  ## @emit_area
	.comm	_areaScale,4,2                  ## @areaScale
	.comm	_formFactorValueScale,4,2       ## @formFactorValueScale
	.comm	_CONTENTS_FOG,4,2               ## @CONTENTS_FOG
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_emit_point,4,2                 ## @emit_point
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SubdivideAreaLight             ; -- Begin function SubdivideAreaLight
	.p2align	2
_SubdivideAreaLight:                    ; @SubdivideAreaLight
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	x1, LBB0_7
; %bb.1:
	mov	x22, x3
	mov	x20, x2
	mov	x23, x1
	mov	x19, x0
	mov	x0, x1
	bl	_WindingBounds
	mov	x0, x23
	bl	_WindingArea
	fmov	s8, s0
	fcmp	s0, #0.0
	mov	w8, #38528
	movk	w8, #19352, lsl #16
	fmov	s0, w8
	fccmp	s8, s0, #0, hi
	b.gt	LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _numAreaLights@GOTPAGE
Lloh1:
	ldr	x8, [x8, _numAreaLights@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	w0, #64
	bl	_malloc
	mov	x21, x0
	mov	w1, #0
	mov	w2, #64
	bl	_memset
Lloh2:
	adrp	x24, _lights@GOTPAGE
Lloh3:
	ldr	x24, [x24, _lights@GOTPAGEOFF]
	ldr	x8, [x24]
	str	x8, [x21, #32]
	str	x21, [x24]
Lloh4:
	adrp	x8, _emit_area@GOTPAGE
Lloh5:
	ldr	x8, [x8, _emit_area@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x21, #24]
	ldr	w1, [x21, #20]
	mov	x0, x23
	bl	_WindingCenter
	str	x23, [x21, #56]
	ldr	w1, [x21, #48]
	mov	x0, x20
	bl	_VectorCopy
	ldr	w0, [x21, #20]
	mov	x1, x20
	bl	_DotProduct
	str	w0, [x21, #52]
	ldr	s9, [x19]
	fmul	s0, s8, s9
Lloh7:
	adrp	x23, _areaScale@GOTPAGE
Lloh8:
	ldr	x23, [x23, _areaScale@GOTPAGEOFF]
	ldr	s1, [x23]
	fmul	s8, s0, s1
	ldr	w0, [x21, #20]
	ldr	w1, [x21, #48]
	mov	x2, x0
	bl	_VectorAdd
	ldr	x0, [x19, #8]
	ldr	w1, [x21, #16]
	bl	_VectorCopy
	str	s8, [x21]
Lloh9:
	adrp	x8, _formFactorValueScale@GOTPAGE
Lloh10:
	ldr	x8, [x8, _formFactorValueScale@GOTPAGEOFF]
	ldr	x0, [x19, #8]
Lloh11:
	ldr	s0, [x8]
	fmul	s0, s9, s0
	ldr	s1, [x23]
	fmul	s0, s0, s1
	ldr	w1, [x21, #44]
	bl	_VectorScale
	str	x19, [x21, #8]
	ldr	w8, [x19, #16]
Lloh12:
	adrp	x9, _CONTENTS_FOG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CONTENTS_FOG@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh15:
	adrp	x8, _qtrue@GOTPAGE
Lloh16:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x21, #40]
LBB0_4:
	cbz	x22, LBB0_7
; %bb.5:
	ldr	w8, [x19, #20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.6:
	mov	w0, #64
	bl	_malloc
	mov	x22, x0
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	ldr	x8, [x24]
	str	x8, [x22, #32]
Lloh18:
	adrp	x8, _emit_point@GOTPAGE
Lloh19:
	ldr	x8, [x8, _emit_point@GOTPAGEOFF]
	str	x22, [x24]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x22, #24]
	ldr	w0, [x21, #20]
	ldr	w1, [x19, #24]
	ldr	w3, [x22, #20]
	mov	x2, x20
	bl	_VectorMA
	ldr	x0, [x19, #8]
	ldr	w1, [x22, #16]
	bl	_VectorCopy
	ldr	s0, [x21]
	ldr	s1, [x19, #20]
	scvtf	s1, s1
	fmul	s0, s0, s1
	str	s0, [x22]
	str	x19, [x22, #8]
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ON_EPSILON,4,2                 ; @ON_EPSILON
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_numAreaLights,4,2              ; @numAreaLights
	.comm	_lights,8,3                     ; @lights
	.comm	_emit_area,4,2                  ; @emit_area
	.comm	_areaScale,4,2                  ; @areaScale
	.comm	_formFactorValueScale,4,2       ; @formFactorValueScale
	.comm	_CONTENTS_FOG,4,2               ; @CONTENTS_FOG
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_emit_point,4,2                 ; @emit_point
.subsections_via_symbols
