	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function Q3_FindVisibleBrushSides
LCPI0_0:
	.quad	0xbfeccccccccccccd              ## double -0.90000000000000002
LCPI0_1:
	.quad	0x3feccccccccccccd              ## double 0.90000000000000002
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_Q3_FindVisibleBrushSides
	.p2align	4, 0x90
_Q3_FindVisibleBrushSides:              ## @Q3_FindVisibleBrushSides
	.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	_q3_dbrushsidetextured@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_Q3_MAX_MAP_BRUSHSIDES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	xorl	%eax, %eax
	callq	_Q3_CreatePlanarSurfacePlanes
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_Print
	leaq	L_.str.1(%rip), %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_Log_Print
	movq	_q3_numbrushes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$0, %esi
	testl	%eax, %eax
	jle	LBB0_26
## %bb.1:
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_q3_numbrushes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movslq	%eax, %rcx
	cmpq	%rcx, %r13
	jge	LBB0_26
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_15 Depth 3
	movq	_q3_dbrushes@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	cmpl	$0, (%rbx,%r13,8)
	jle	LBB0_25
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rbx,%r13,8), %r12
	xorl	%r15d, %r15d
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_15 Depth 3
	leaq	L_.str.2(%rip), %rdi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	callq	_qprintf
	movslq	4(%rbx,%r13,8), %rsi
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movslq	%r15d, %r15
	addq	%r15, %rsi
	shlq	$3, %rsi
	movq	_q3_dbrushsides@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	%r12, %rdi
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	callq	_Q3_BrushSideWinding
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rax, %r14
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_WindingIsTiny
	testq	%rax, %rax
	je	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	%r14, %rdi
	callq	_FreeWinding
	movq	_q3_dbrushsidetextured@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movslq	4(%rbx,%r13,8), %rcx
	addq	-72(%rbp), %rcx                 ## 8-byte Folded Reload
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	_q3_dbrushsidetextured@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	4(%rbx,%r13,8), %rcx
	addq	%r15, %rcx
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	$1, (%rax,%rcx,4)
	movl	-48(%rbp), %esi                 ## 4-byte Reload
LBB0_23:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	incl	%esi
	incl	%r15d
	cmpl	(%r12), %r15d
	jl	LBB0_4
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	%r14, %rdi
	callq	_WindingError
	movq	_WE_NOTENOUGHPOINTS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	_WE_SMALLAREA@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	_WE_POINTBOGUSRANGE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%r14, %rdi
	callq	_WindingArea
	cmpl	$20, %eax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	jge	LBB0_13
## %bb.34:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	_q3_dbrushsidetextured@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movslq	4(%rbx,%r13,8), %rcx
	addq	%rdx, %rcx
	jmp	LBB0_6
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	_q3_numDrawSurfaces@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_22
## %bb.14:                              ##   in Loop: Header=BB0_4 Depth=2
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=3
	addq	%rbx, %r13
	movq	%r13, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_Q3_FaceOnWinding
	testq	%rax, %rax
	jne	LBB0_20
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=3
	incq	%r15
	movq	_q3_numDrawSurfaces@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$8, %rbx
	cmpq	%rax, %r15
	jge	LBB0_22
LBB0_15:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	_q3_drawSurfaces@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %r13
	movq	(%rax,%rbx), %rax
	movq	_MST_PLANAR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=3
	movq	_q3_surfaceplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, %r14
	movl	(%rax,%rbx), %edi
	callq	_fabs
	movl	%eax, %r12d
	movq	_q3_dplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,8), %edi
	callq	_fabs
	subl	%eax, %r12d
	movl	%r12d, %edi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	callq	_fabs
	cmpl	$5, %eax
	jg	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=3
	movl	4(%r14,%rbx), %edi
	movq	_q3_dplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	movl	4(%rax,%rcx,8), %esi
	callq	_DotProduct
	cvtss2sd	%xmm0, %xmm0
	ucomisd	LCPI0_0(%rip), %xmm0
	jbe	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=3
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	ja	LBB0_21
	jmp	LBB0_19
LBB0_20:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	_q3_dbrushsidetextured@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movslq	4(%rdx,%rcx,8), %rcx
	addq	%r12, %rcx
	movl	$1, (%rax,%rcx,4)
LBB0_22:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_FreeWinding
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_26:
	leaq	L_.str.3(%rip), %rdi
	callq	_qprintf
	movq	_q3_numbrushsides@GOTPCREL(%rip), %r8
	movl	(%r8), %edx
	testl	%edx, %edx
	jle	LBB0_27
## %bb.28:
	movq	_forcesidesvisible@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_q3_dbrushsidetextured@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	xorl	%esi, %esi
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_29 Depth=1
	movl	$1, (%rax,%rdi,4)
	movl	(%r8), %edx
	movl	$1, %ebx
LBB0_32:                                ##   in Loop: Header=BB0_29 Depth=1
	cmpl	$1, %ebx
	sbbl	$-1, %esi
	incq	%rdi
	movslq	%edx, %rbx
	cmpq	%rbx, %rdi
	jge	LBB0_33
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	testq	%rcx, %rcx
	jne	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	(%rax,%rdi,4), %ebx
	jmp	LBB0_32
LBB0_27:
	xorl	%esi, %esi
LBB0_33:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Log_Print                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_q3_dbrushsidetextured,8,3      ## @q3_dbrushsidetextured
	.comm	_Q3_MAX_MAP_BRUSHSIDES,4,2      ## @Q3_MAX_MAP_BRUSHSIDES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"searching visible brush sides...\n"

L_.str.1:                               ## @.str.1
	.asciz	"%6d brush sides"

	.comm	_q3_numbrushes,4,2              ## @q3_numbrushes
	.comm	_q3_dbrushes,8,3                ## @q3_dbrushes
L_.str.2:                               ## @.str.2
	.asciz	"\r%6d"

	.comm	_q3_dbrushsides,8,3             ## @q3_dbrushsides
	.comm	_WE_NOTENOUGHPOINTS,4,2         ## @WE_NOTENOUGHPOINTS
	.comm	_WE_SMALLAREA,4,2               ## @WE_SMALLAREA
	.comm	_WE_POINTBOGUSRANGE,4,2         ## @WE_POINTBOGUSRANGE
	.comm	_q3_numDrawSurfaces,4,2         ## @q3_numDrawSurfaces
	.comm	_q3_drawSurfaces,8,3            ## @q3_drawSurfaces
	.comm	_MST_PLANAR,8,3                 ## @MST_PLANAR
	.comm	_q3_surfaceplanes,8,3           ## @q3_surfaceplanes
	.comm	_q3_dplanes,8,3                 ## @q3_dplanes
L_.str.3:                               ## @.str.3
	.asciz	"\r%6d brush sides\n"

	.comm	_q3_numbrushsides,4,2           ## @q3_numbrushsides
	.comm	_forcesidesvisible,8,3          ## @forcesidesvisible
L_.str.4:                               ## @.str.4
	.asciz	"%d brush sides textured out of %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Q3_FindVisibleBrushSides       ; -- Begin function Q3_FindVisibleBrushSides
	.p2align	2
_Q3_FindVisibleBrushSides:              ; @Q3_FindVisibleBrushSides
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x24, _q3_dbrushsidetextured@GOTPAGE
Lloh1:
	ldr	x24, [x24, _q3_dbrushsidetextured@GOTPAGEOFF]
	ldr	x0, [x24]
Lloh2:
	adrp	x8, _Q3_MAX_MAP_BRUSHSIDES@GOTPAGE
Lloh3:
	ldr	x8, [x8, _Q3_MAX_MAP_BRUSHSIDES@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	bl	_Q3_CreatePlanarSurfacePlanes
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_Print
	str	xzr, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Log_Print
Lloh9:
	adrp	x8, _q3_numbrushes@GOTPAGE
Lloh10:
	ldr	x8, [x8, _q3_numbrushes@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.1:
	mov	x10, #0
	mov	w19, #0
Lloh12:
	adrp	x25, _q3_dbrushsides@GOTPAGE
Lloh13:
	ldr	x25, [x25, _q3_dbrushsides@GOTPAGEOFF]
	mov	w26, #1
Lloh14:
	adrp	x27, _WE_NOTENOUGHPOINTS@GOTPAGE
Lloh15:
	ldr	x27, [x27, _WE_NOTENOUGHPOINTS@GOTPAGEOFF]
Lloh16:
	adrp	x28, _WE_SMALLAREA@GOTPAGE
Lloh17:
	ldr	x28, [x28, _WE_SMALLAREA@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh18:
	adrp	x8, _q3_numbrushes@GOTPAGE
Lloh19:
	ldr	x8, [x8, _q3_numbrushes@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	x10, [sp, #16]                  ; 8-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #1
	cmp	x10, w8, sxtw
	b.ge	LBB0_25
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_18 Depth 3
Lloh21:
	adrp	x9, _q3_dbrushes@GOTPAGE
Lloh22:
	ldr	x9, [x9, _q3_dbrushes@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x21, x9, x10, lsl #3
	ldr	w9, [x21]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w20, #0
	add	x22, x21, #4
	stp	x10, x22, [sp, #16]             ; 16-byte Folded Spill
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_18 Depth 3
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_qprintf
	ldr	x8, [x25]
	ldr	w9, [x22]
	add	w9, w9, w20
	add	x23, x8, w9, sxtw #3
	mov	x0, x21
	mov	x1, x23
	bl	_Q3_BrushSideWinding
	cbz	x0, LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x22, x0
	bl	_WindingIsTiny
	cbnz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x22
	bl	_WindingError
	ldr	w8, [x27]
	ldr	w9, [x28]
Lloh26:
	adrp	x10, _WE_POINTBOGUSRANGE@GOTPAGE
Lloh27:
	ldr	x10, [x10, _WE_POINTBOGUSRANGE@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	ccmp	w0, w10, #4, ne
	b.ne	LBB0_14
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x22
	bl	_FreeWinding
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x24]
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x10, x22
	ldr	x8, [x24]
LBB0_12:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w9, [x22]
	add	w9, w9, w20
	str	w26, [x8, w9, sxtw #2]
LBB0_13:                                ;   in Loop: Header=BB0_6 Depth=2
	add	w19, w19, #1
	add	w20, w20, #1
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_6
	b	LBB0_2
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x22
	bl	_WindingArea
	cmp	w0, #20
	b.lt	LBB0_10
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh29:
	adrp	x8, _q3_numDrawSurfaces@GOTPAGE
Lloh30:
	ldr	x8, [x8, _q3_numDrawSurfaces@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.16:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x27, #0
	mov	x28, #0
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=3
	add	x28, x28, #1
Lloh32:
	adrp	x8, _q3_numDrawSurfaces@GOTPAGE
Lloh33:
	ldr	x8, [x8, _q3_numDrawSurfaces@GOTPAGEOFF]
Lloh34:
	ldrsw	x8, [x8]
	add	x27, x27, #8
	cmp	x28, x8
	b.ge	LBB0_23
LBB0_18:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
Lloh35:
	adrp	x8, _q3_drawSurfaces@GOTPAGE
Lloh36:
	ldr	x8, [x8, _q3_drawSurfaces@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	add	x24, x8, x27
	ldr	x8, [x24]
Lloh38:
	adrp	x9, _MST_PLANAR@GOTPAGE
Lloh39:
	ldr	x9, [x9, _MST_PLANAR@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=3
Lloh41:
	adrp	x8, _q3_surfaceplanes@GOTPAGE
Lloh42:
	ldr	x8, [x8, _q3_surfaceplanes@GOTPAGEOFF]
Lloh43:
	ldr	x26, [x8]
	ldr	w0, [x26, x27]
	bl	_fabs
	mov	x25, x0
Lloh44:
	adrp	x8, _q3_dplanes@GOTPAGE
Lloh45:
	ldr	x8, [x8, _q3_dplanes@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	ldr	x9, [x23]
	lsl	x9, x9, #3
	ldr	w0, [x8, x9]
	bl	_fabs
	sub	w0, w25, w0
	bl	_fabs
	cmp	w0, #5
	b.gt	LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=3
	add	x8, x26, x27
	ldr	w0, [x8, #4]
Lloh47:
	adrp	x8, _q3_dplanes@GOTPAGE
Lloh48:
	ldr	x8, [x8, _q3_dplanes@GOTPAGEOFF]
Lloh49:
	ldr	x8, [x8]
	ldr	x9, [x23]
	add	x8, x8, x9, lsl #3
	ldr	w1, [x8, #4]
	bl	_DotProduct
	fcvt	d0, s0
	mov	x8, #-3689348814741910324
	movk	x8, #52429
	movk	x8, #49132, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	mov	x8, #-3689348814741910324
	movk	x8, #52429
	movk	x8, #16364, lsl #48
	fmov	d1, x8
	fccmp	d0, d1, #0, gt
	b.mi	LBB0_17
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=3
	mov	x0, x24
	mov	x1, x22
	bl	_Q3_FaceOnWinding
	cbz	x0, LBB0_17
; %bb.22:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh50:
	adrp	x8, _q3_dbrushsidetextured@GOTPAGE
Lloh51:
	ldr	x8, [x8, _q3_dbrushsidetextured@GOTPAGEOFF]
Lloh52:
	ldr	x8, [x8]
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w9, [x9]
	add	w9, w9, w20
	mov	w10, #1
	str	w10, [x8, w9, sxtw #2]
LBB0_23:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x22
	bl	_FreeWinding
Lloh53:
	adrp	x24, _q3_dbrushsidetextured@GOTPAGE
Lloh54:
	ldr	x24, [x24, _q3_dbrushsidetextured@GOTPAGEOFF]
Lloh55:
	adrp	x25, _q3_dbrushsides@GOTPAGE
Lloh56:
	ldr	x25, [x25, _q3_dbrushsides@GOTPAGEOFF]
	mov	w26, #1
Lloh57:
	adrp	x27, _WE_NOTENOUGHPOINTS@GOTPAGE
Lloh58:
	ldr	x27, [x27, _WE_NOTENOUGHPOINTS@GOTPAGEOFF]
Lloh59:
	adrp	x28, _WE_SMALLAREA@GOTPAGE
Lloh60:
	ldr	x28, [x28, _WE_SMALLAREA@GOTPAGEOFF]
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_13
LBB0_24:
	mov	w19, #0
LBB0_25:
Lloh61:
	adrp	x0, l_.str.3@PAGE
Lloh62:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_qprintf
Lloh63:
	adrp	x10, _q3_numbrushsides@GOTPAGE
Lloh64:
	ldr	x10, [x10, _q3_numbrushsides@GOTPAGEOFF]
	ldr	w8, [x10]
	cmp	w8, #1
	b.lt	LBB0_31
; %bb.26:
	mov	x11, #0
	mov	w9, #0
Lloh65:
	adrp	x12, _forcesidesvisible@GOTPAGE
Lloh66:
	ldr	x12, [x12, _forcesidesvisible@GOTPAGEOFF]
Lloh67:
	ldr	x12, [x12]
	ldr	x13, [x24]
	b	LBB0_29
LBB0_27:                                ;   in Loop: Header=BB0_29 Depth=1
	mov	w14, #1
	str	w14, [x13, x11, lsl #2]
	ldr	w8, [x10]
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	cmp	w14, #0
	cinc	w9, w9, ne
	add	x11, x11, #1
	cmp	x11, w8, sxtw
	b.ge	LBB0_32
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	cbnz	x12, LBB0_27
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	ldr	w14, [x13, x11, lsl #2]
	b	LBB0_28
LBB0_31:
	mov	w9, #0
LBB0_32:
	stp	x9, x8, [sp]
Lloh68:
	adrp	x0, l_.str.4@PAGE
Lloh69:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Log_Print
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh57, Lloh58
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGot	Lloh63, Lloh64
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpAdd	Lloh68, Lloh69
	.cfi_endproc
                                        ; -- End function
	.comm	_q3_dbrushsidetextured,8,3      ; @q3_dbrushsidetextured
	.comm	_Q3_MAX_MAP_BRUSHSIDES,4,2      ; @Q3_MAX_MAP_BRUSHSIDES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"searching visible brush sides...\n"

l_.str.1:                               ; @.str.1
	.asciz	"%6d brush sides"

	.comm	_q3_numbrushes,4,2              ; @q3_numbrushes
	.comm	_q3_dbrushes,8,3                ; @q3_dbrushes
l_.str.2:                               ; @.str.2
	.asciz	"\r%6d"

	.comm	_q3_dbrushsides,8,3             ; @q3_dbrushsides
	.comm	_WE_NOTENOUGHPOINTS,4,2         ; @WE_NOTENOUGHPOINTS
	.comm	_WE_SMALLAREA,4,2               ; @WE_SMALLAREA
	.comm	_WE_POINTBOGUSRANGE,4,2         ; @WE_POINTBOGUSRANGE
	.comm	_q3_numDrawSurfaces,4,2         ; @q3_numDrawSurfaces
	.comm	_q3_drawSurfaces,8,3            ; @q3_drawSurfaces
	.comm	_MST_PLANAR,8,3                 ; @MST_PLANAR
	.comm	_q3_surfaceplanes,8,3           ; @q3_surfaceplanes
	.comm	_q3_dplanes,8,3                 ; @q3_dplanes
l_.str.3:                               ; @.str.3
	.asciz	"\r%6d brush sides\n"

	.comm	_q3_numbrushsides,4,2           ; @q3_numbrushsides
	.comm	_forcesidesvisible,8,3          ; @forcesidesvisible
l_.str.4:                               ; @.str.4
	.asciz	"%d brush sides textured out of %d\n"

.subsections_via_symbols
