	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function Q2_BrushSideWinding
LCPI0_0:
	.quad	0x3feff7ced916872b              ## double 0.99899999999999999
LCPI0_1:
	.quad	0x3f847ae147ae147b              ## double 0.01
LCPI0_2:
	.quad	0xbfb999999999999a              ## double -0.10000000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_Q2_BrushSideWinding
	.p2align	4, 0x90
_Q2_BrushSideWinding:                   ## @Q2_BrushSideWinding
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_dplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r15
	shlq	$4, %r15
	movl	8(%rax,%r15), %edi
	movq	%rax, %r14
	movq	(%rax,%r15), %rsi
	callq	_BaseWindingForPlane
	movq	%rax, -48(%rbp)
	cmpl	$0, (%rbx)
	jle	LBB0_9
## %bb.1:
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	leaq	(%r14,%r15), %rax
	addq	$8, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	addq	%r15, %r14
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_dbrushsides@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movslq	4(%rbx), %r13
	addq	%r12, %r13
	movq	(%r15,%r13,8), %r14
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpq	(%rax), %r14
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_dplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	shlq	$4, %r14
	movl	8(%rbx,%r14), %esi
	callq	_DotProduct
	ucomisd	LCPI0_0(%rip), %xmm0
	jbe	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	subq	(%rbx,%r14), %rdi
	callq	_fabs
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	ja	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_dplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15,%r13,8), %rcx
	xorq	$1, %rcx
	shlq	$4, %rcx
	movl	8(%rax,%rcx), %esi
	movq	(%rax,%rcx), %rdx
	leaq	-48(%rbp), %rdi
	movsd	LCPI0_2(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_ChopWindingInPlace
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movq	-48(%rbp), %rax
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	cmpl	(%rbx), %r12d
	jge	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rax, %rax
	jne	LBB0_3
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dplanes,8,3                    ## @dplanes
	.comm	_dbrushsides,8,3                ## @dbrushsides
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Q2_BrushSideWinding            ; -- Begin function Q2_BrushSideWinding
	.p2align	2
_Q2_BrushSideWinding:                   ; @Q2_BrushSideWinding
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _dplanes@GOTPAGE
Lloh1:
	ldr	x21, [x21, _dplanes@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x1]
	add	x8, x8, x9, lsl #4
	mov	x23, x8
	ldr	w0, [x23, #8]!
	str	x8, [sp]                        ; 8-byte Folded Spill
	ldr	x1, [x8]
	bl	_BaseWindingForPlane
	str	x0, [sp, #8]
	ldr	w8, [x20]
	cmp	w8, #1
	ccmp	x0, #0, #4, ge
	b.ne	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_2:
	mov	x24, #0
Lloh2:
	adrp	x25, _dbrushsides@GOTPAGE
Lloh3:
	ldr	x25, [x25, _dbrushsides@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
	ldr	x9, [x27, x28, lsl #3]
	eor	x9, x9, #0x1
	add	x8, x8, x9, lsl #4
	ldr	w1, [x8, #8]
	ldr	x2, [x8]
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #49081, lsl #48
	fmov	d0, x8
	add	x0, sp, #8
	bl	_ChopWindingInPlace
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x24, #1
	ldr	w8, [x20]
	ldr	x0, [sp, #8]
	cmp	w24, w8
	ccmp	x0, #0, #4, lt
	b.eq	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x25]
	ldrsw	x8, [x20, #4]
	add	x28, x24, x8
	ldr	x26, [x27, x28, lsl #3]
	ldr	x8, [x19]
	cmp	x26, x8
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x22, [x21]
	ldr	w0, [x23]
	add	x8, x22, x26, lsl #4
	ldr	w1, [x8, #8]
	bl	_DotProduct
	mov	x8, #34603
	movk	x8, #55574, lsl #16
	movk	x8, #63438, lsl #32
	movk	x8, #16367, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.le	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	x8, [x8]
	lsl	x9, x26, #4
	ldr	x9, [x22, x9]
	sub	x0, x8, x9
	bl	_fabs
	mov	x8, #5243
	movk	x8, #18350, lsl #16
	movk	x8, #31457, lsl #32
	movk	x8, #16260, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.pl	LBB0_3
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_dplanes,8,3                    ; @dplanes
	.comm	_dbrushsides,8,3                ; @dbrushsides
.subsections_via_symbols
