	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SunToPoint                     ## -- Begin function SunToPoint
	.p2align	4, 0x90
_SunToPoint:                            ## @SunToPoint
	.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	%rdx, %r14
	movq	_numSkyBrushes@GOTPCREL(%rip), %rbx
	cmpl	$0, (%rbx)
	je	LBB0_17
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	_MAX_WORLD_COORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%esi, %esi
	movq	_sunDirection@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_VectorMA
	movq	_qtrue@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r15, %r8
	callq	_TraceLine
	movl	(%rbx), %r8d
	testl	%r8d, %r8d
	jle	LBB0_13
## %bb.2:
	movq	_skyBrushes@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movq	-56(%rbp), %rsi
	movq	(%rsi), %rdx
	xorl	%edi, %edi
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdi
	cmpq	%rdi, %r8
	je	LBB0_13
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r9,%rdi,8), %rax
	movq	(%rax), %rbx
	cmpq	(%rbx), %rdx
	jl	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rax), %rax
	cmpq	(%rax), %rdx
	jg	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rsi), %rcx
	cmpq	8(%rbx), %rcx
	jl	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	8(%rax), %rcx
	jg	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%rsi), %rcx
	cmpq	16(%rbx), %rcx
	jl	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	16(%rax), %rcx
	jg	LBB0_12
## %bb.9:
	movl	(%r12), %ecx
	leaq	-56(%rbp), %rdx
	movq	%r13, %rdi
	movq	%r15, %r8
	callq	_TraceLine
	movq	_numthreads@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_11
## %bb.10:
	movq	_c_sunHit@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_11:
	movq	-48(%rbp), %rax
	movq	_sunLight@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx), %edx
	imull	(%rax), %edx
	movl	%edx, (%r14)
	movl	4(%rcx), %edx
	imull	4(%rax), %edx
	movl	%edx, 4(%r14)
	movl	8(%rcx), %ecx
	imull	8(%rax), %ecx
	movl	%ecx, 8(%r14)
	jmp	LBB0_16
LBB0_13:
	movq	_numthreads@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_15
## %bb.14:
	movq	_c_sunMiss@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_15:
	movq	%r14, %rdi
	callq	_VectorClear
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VectorClear                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_numSkyBrushes,4,2              ## @numSkyBrushes
	.comm	_MAX_WORLD_COORD,4,2            ## @MAX_WORLD_COORD
	.comm	_sunDirection,4,2               ## @sunDirection
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_skyBrushes,8,3                 ## @skyBrushes
	.comm	_numthreads,4,2                 ## @numthreads
	.comm	_c_sunHit,4,2                   ## @c_sunHit
	.comm	_sunLight,8,3                   ## @sunLight
	.comm	_c_sunMiss,4,2                  ## @c_sunMiss
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SunToPoint                     ; -- Begin function SunToPoint
	.p2align	2
_SunToPoint:                            ; @SunToPoint
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
Lloh0:
	adrp	x23, _numSkyBrushes@GOTPAGE
Lloh1:
	ldr	x23, [x23, _numSkyBrushes@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_17
; %bb.1:
	mov	x20, x1
	mov	x21, x0
Lloh2:
	adrp	x8, _MAX_WORLD_COORD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_WORLD_COORD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	lsl	w1, w8, #1
Lloh5:
	adrp	x8, _sunDirection@GOTPAGE
Lloh6:
	ldr	x8, [x8, _sunDirection@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	bl	_VectorMA
Lloh8:
	adrp	x22, _qtrue@GOTPAGE
Lloh9:
	ldr	x22, [x22, _qtrue@GOTPAGEOFF]
	ldr	w3, [x22]
	mov	x2, sp
	mov	x0, x21
	mov	x4, x20
	bl	_TraceLine
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.2:
Lloh10:
	adrp	x9, _skyBrushes@GOTPAGE
Lloh11:
	ldr	x9, [x9, _skyBrushes@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	ldr	x1, [sp]
	ldr	x10, [x1]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_13
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9]
	ldr	x11, [x12]
	ldr	x13, [x11]
	cmp	x10, x13
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x12, [x12, #8]
	ldr	x13, [x12]
	cmp	x10, x13
	b.gt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x13, [x1, #8]
	ldr	x14, [x11, #8]
	cmp	x13, x14
	b.lt	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x14, [x12, #8]
	cmp	x13, x14
	b.gt	LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x13, [x1, #16]
	ldr	x11, [x11, #16]
	cmp	x13, x11
	b.lt	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x11, [x12, #16]
	cmp	x13, x11
	b.gt	LBB0_3
; %bb.10:
	ldr	w3, [x22]
	mov	x2, sp
	mov	x0, x21
	mov	x4, x20
	bl	_TraceLine
Lloh13:
	adrp	x8, _numthreads@GOTPAGE
Lloh14:
	ldr	x8, [x8, _numthreads@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_12
; %bb.11:
Lloh16:
	adrp	x8, _c_sunHit@GOTPAGE
Lloh17:
	ldr	x8, [x8, _c_sunHit@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_12:
	ldr	x8, [sp, #8]
	ldr	w9, [x8]
Lloh18:
	adrp	x10, _sunLight@GOTPAGE
Lloh19:
	ldr	x10, [x10, _sunLight@GOTPAGEOFF]
Lloh20:
	ldr	x10, [x10]
	ldr	w11, [x10]
	mul	w9, w11, w9
	str	w9, [x19]
	ldr	w9, [x8, #4]
	ldr	w11, [x10, #4]
	mul	w9, w11, w9
	str	w9, [x19, #4]
	ldr	w8, [x8, #8]
	ldr	w9, [x10, #8]
	mul	w8, w9, w8
	str	w8, [x19, #8]
	b	LBB0_16
LBB0_13:
Lloh21:
	adrp	x8, _numthreads@GOTPAGE
Lloh22:
	ldr	x8, [x8, _numthreads@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, #1
	b.ne	LBB0_15
; %bb.14:
Lloh24:
	adrp	x8, _c_sunMiss@GOTPAGE
Lloh25:
	ldr	x8, [x8, _c_sunMiss@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_15:
	mov	x0, x19
	bl	_VectorClear
LBB0_16:
	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
	add	sp, sp, #80
	ret
LBB0_17:
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_VectorClear
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_numSkyBrushes,4,2              ; @numSkyBrushes
	.comm	_MAX_WORLD_COORD,4,2            ; @MAX_WORLD_COORD
	.comm	_sunDirection,4,2               ; @sunDirection
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_skyBrushes,8,3                 ; @skyBrushes
	.comm	_numthreads,4,2                 ; @numthreads
	.comm	_c_sunHit,4,2                   ; @c_sunHit
	.comm	_sunLight,8,3                   ; @sunLight
	.comm	_c_sunMiss,4,2                  ; @c_sunMiss
.subsections_via_symbols
