	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FindSkyBrushes                 ## -- Begin function FindSkyBrushes
	.p2align	4, 0x90
_FindSkyBrushes:                        ## @FindSkyBrushes
	.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
	movq	_numbrushes@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	testl	%r8d, %r8d
	jle	LBB0_8
## %bb.1:
	xorl	%ecx, %ecx
	movq	_dbrushes@GOTPCREL(%rip), %r13
	movq	_dbrushsides@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_skyBrushes@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movq	_numSkyBrushes@GOTPCREL(%rip), %r11
	movq	(%r11), %r9
	movq	%r9, %rbx
	shlq	$4, %rbx
	movq	%r15, 8(%r8,%rbx)
	movq	_dplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rsi
	movq	8(%rsi,%rdx), %rdx
	movl	(%rax,%rdx,4), %edx
	notl	%edx
	movq	(%r8,%rbx), %rbx
	movq	(%rbx), %r10
	movl	%edx, (%r10)
	movslq	4(%rdi,%rcx,8), %rdx
	shlq	$4, %rdx
	movq	24(%rdx,%rsi), %rdx
	movl	(%rax,%rdx,4), %edx
	incl	%edx
	movq	8(%rbx), %r8
	movl	%edx, (%r8)
	movslq	4(%rdi,%rcx,8), %rdx
	shlq	$4, %rdx
	movq	40(%rdx,%rsi), %rdx
	movl	(%rax,%rdx,4), %edx
	notl	%edx
	movl	%edx, 4(%r10)
	movslq	4(%rdi,%rcx,8), %rdx
	shlq	$4, %rdx
	movq	56(%rdx,%rsi), %rdx
	movl	(%rax,%rdx,4), %edx
	incl	%edx
	movl	%edx, 4(%r8)
	movslq	4(%rdi,%rcx,8), %rdx
	shlq	$4, %rdx
	movq	72(%rdx,%rsi), %rdx
	movl	(%rax,%rdx,4), %edx
	notl	%edx
	movl	%edx, 8(%r10)
	movslq	4(%rdi,%rcx,8), %rdx
	shlq	$4, %rdx
	movq	88(%rdx,%rsi), %rdx
	movl	(%rax,%rdx,4), %eax
	incl	%eax
	movl	%eax, 8(%r8)
	incq	%r9
	movq	%r9, (%r11)
	movq	_numbrushes@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	movslq	%r8d, %rax
	cmpq	%rax, %rcx
	jge	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	(%r13), %rdi
	movl	(%rdi,%rcx,8), %eax
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rdi,%rcx,8), %r15
	movslq	4(%rdi,%rcx,8), %rdx
	movq	_dshaders@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	movq	_SURF_SKY@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r10d
	shlq	$4, %rdx
	movq	(%r12), %r9
	addq	%rdx, %r9
	shlq	$4, %rax
	xorl	%r11d, %r11d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r9,%r11), %r14
	testl	%r10d, (%rbx,%r14,8)
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=2
	addq	$16, %r11
	cmpq	%r11, %rax
	jne	LBB0_5
	jmp	LBB0_7
LBB0_8:
	movq	_sunDirection@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %esi
	callq	_VectorNormalize
	movq	_numDrawSurfaces@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_13
## %bb.9:
	xorl	%ebx, %ebx
	movq	_dshaders@GOTPCREL(%rip), %r13
	movq	_drawSurfaces@GOTPCREL(%rip), %r14
	movq	_SURF_SKY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%r14), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	4(%rax,%rcx,8), %edi
	callq	_ShaderInfoForShader
	movq	%rax, %r12
	movl	(%r15), %eax
	testl	%eax, (%r12)
	jne	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=1
	incq	%rbx
	movq	_numDrawSurfaces@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_11
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	8(%r12), %edi
	movq	_sunLight@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_VectorCopy
	movl	4(%r12), %edi
	movq	_sunDirection@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VectorCopy                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_numbrushes,4,2                 ## @numbrushes
	.comm	_dbrushes,8,3                   ## @dbrushes
	.comm	_dbrushsides,8,3                ## @dbrushsides
	.comm	_dshaders,8,3                   ## @dshaders
	.comm	_SURF_SKY,4,2                   ## @SURF_SKY
	.comm	_skyBrushes,8,3                 ## @skyBrushes
	.comm	_numSkyBrushes,8,3              ## @numSkyBrushes
	.comm	_dplanes,8,3                    ## @dplanes
	.comm	_sunDirection,4,2               ## @sunDirection
	.comm	_numDrawSurfaces,4,2            ## @numDrawSurfaces
	.comm	_drawSurfaces,8,3               ## @drawSurfaces
	.comm	_sunLight,4,2                   ## @sunLight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FindSkyBrushes                 ; -- Begin function FindSkyBrushes
	.p2align	2
_FindSkyBrushes:                        ; @FindSkyBrushes
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, _numbrushes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _numbrushes@GOTPAGEOFF]
	ldr	w15, [x8]
Lloh2:
	adrp	x20, _dshaders@GOTPAGE
Lloh3:
	ldr	x20, [x20, _dshaders@GOTPAGEOFF]
Lloh4:
	adrp	x21, _SURF_SKY@GOTPAGE
Lloh5:
	ldr	x21, [x21, _SURF_SKY@GOTPAGEOFF]
	cmp	w15, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x9, #0
Lloh6:
	adrp	x10, _dbrushes@GOTPAGE
Lloh7:
	ldr	x10, [x10, _dbrushes@GOTPAGEOFF]
Lloh8:
	adrp	x11, _dbrushsides@GOTPAGE
Lloh9:
	ldr	x11, [x11, _dbrushsides@GOTPAGEOFF]
Lloh10:
	adrp	x12, _skyBrushes@GOTPAGE
Lloh11:
	ldr	x12, [x12, _skyBrushes@GOTPAGEOFF]
Lloh12:
	adrp	x13, _numSkyBrushes@GOTPAGE
Lloh13:
	ldr	x13, [x13, _numSkyBrushes@GOTPAGEOFF]
Lloh14:
	adrp	x14, _dplanes@GOTPAGE
Lloh15:
	ldr	x14, [x14, _dplanes@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x15, [x12]
	ldr	x0, [x13]
	add	x15, x15, x0, lsl #4
	str	x17, [x15, #8]
	ldr	x17, [x14]
	ldr	x2, [x11]
	add	x1, x2, x1, lsl #4
	ldr	x1, [x1, #8]
	ldr	w1, [x17, x1, lsl #2]
	mvn	w1, w1
	ldr	x15, [x15]
	ldp	x3, x15, [x15]
	str	w1, [x3]
	ldrsw	x1, [x16]
	add	x1, x2, x1, lsl #4
	ldr	x1, [x1, #24]
	ldr	w1, [x17, x1, lsl #2]
	add	w1, w1, #1
	str	w1, [x15]
	ldrsw	x1, [x16]
	add	x1, x2, x1, lsl #4
	ldr	x1, [x1, #40]
	ldr	w1, [x17, x1, lsl #2]
	mvn	w1, w1
	str	w1, [x3, #4]
	ldrsw	x1, [x16]
	add	x1, x2, x1, lsl #4
	ldr	x1, [x1, #56]
	ldr	w1, [x17, x1, lsl #2]
	add	w1, w1, #1
	str	w1, [x15, #4]
	ldrsw	x1, [x16]
	add	x1, x2, x1, lsl #4
	ldr	x1, [x1, #72]
	ldr	w1, [x17, x1, lsl #2]
	mvn	w1, w1
	str	w1, [x3, #8]
	ldrsw	x16, [x16]
	add	x16, x2, x16, lsl #4
	ldr	x16, [x16, #88]
	ldr	w16, [x17, x16, lsl #2]
	add	w16, w16, #1
	str	w16, [x15, #8]
	add	x15, x0, #1
	str	x15, [x13]
	ldr	w15, [x8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	cmp	x9, w15, sxtw
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x16, [x10]
	add	x17, x16, x9, lsl #3
	ldr	w0, [x17]
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x4, [x11]
	mov	x16, x17
	ldrsw	x1, [x16, #4]!
	ldr	x2, [x20]
	ldr	w3, [x21]
	add	x4, x4, x1, lsl #4
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x5, [x4]
	lsl	x5, x5, #3
	ldr	w5, [x2, x5]
	tst	w3, w5
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x4, x4, #16
	subs	x0, x0, #1
	b.ne	LBB0_6
	b	LBB0_3
LBB0_8:
Lloh16:
	adrp	x22, _sunDirection@GOTPAGE
Lloh17:
	ldr	x22, [x22, _sunDirection@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	x1, x0
	bl	_VectorNormalize
Lloh18:
	adrp	x23, _numDrawSurfaces@GOTPAGE
Lloh19:
	ldr	x23, [x23, _numDrawSurfaces@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.9:
	mov	x24, #0
Lloh20:
	adrp	x25, _drawSurfaces@GOTPAGE
Lloh21:
	ldr	x25, [x25, _drawSurfaces@GOTPAGEOFF]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x25]
	ldr	x9, [x9, x24, lsl #3]
	add	x8, x8, x9, lsl #3
	ldr	w0, [x8, #4]
	bl	_ShaderInfoForShader
	ldr	w8, [x0]
	ldr	w9, [x21]
	tst	w9, w8
	b.ne	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_10
LBB0_12:
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh22:
	adrp	x8, _sunLight@GOTPAGE
Lloh23:
	ldr	x8, [x8, _sunLight@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_VectorCopy
	ldr	w0, [x19, #4]
	ldr	w1, [x22]
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_VectorCopy
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_numbrushes,4,2                 ; @numbrushes
	.comm	_dbrushes,8,3                   ; @dbrushes
	.comm	_dbrushsides,8,3                ; @dbrushsides
	.comm	_dshaders,8,3                   ; @dshaders
	.comm	_SURF_SKY,4,2                   ; @SURF_SKY
	.comm	_skyBrushes,8,3                 ; @skyBrushes
	.comm	_numSkyBrushes,8,3              ; @numSkyBrushes
	.comm	_dplanes,8,3                    ; @dplanes
	.comm	_sunDirection,4,2               ; @sunDirection
	.comm	_numDrawSurfaces,4,2            ; @numDrawSurfaces
	.comm	_drawSurfaces,8,3               ; @drawSurfaces
	.comm	_sunLight,4,2                   ; @sunLight
.subsections_via_symbols
