	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function SplitBrush
LCPI0_0:
	.quad	0x3fc999999999999a              ## double 0.20000000000000001
LCPI0_1:
	.quad	0xbfc999999999999a              ## double -0.20000000000000001
LCPI0_2:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_SplitBrush
	.p2align	4, 0x90
_SplitBrush:                            ## @SplitBrush
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	$0, (%rcx)
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movq	$0, (%rdx)
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	%esi, -100(%rbp)                ## 4-byte Spill
	movslq	%esi, %r12
	movl	(%rdi), %eax
	testl	%eax, %eax
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	jle	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	xorps	%xmm2, %xmm2
	xorps	%xmm4, %xmm4
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movslq	%eax, %rcx
	cmpq	%rcx, %r14
	jge	LBB0_9
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	8(%r13), %rcx
	leaq	(%r14,%r14,2), %rdx
	movq	8(%rcx,%rdx,8), %rbx
	movq	%rbx, -72(%rbp)
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, (%rbx)
	jle	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movaps	%xmm4, -128(%rbp)               ## 16-byte Spill
	movaps	%xmm2, -144(%rbp)               ## 16-byte Spill
	movq	8(%rbx), %rax
	movl	(%rax,%r13,4), %edi
	movl	4(%r15,%r12,8), %esi
	callq	_DotProduct
	xorps	%xmm3, %xmm3
	subss	(%r15,%r12,8), %xmm0
	movaps	%xmm0, %xmm1
	movaps	-128(%rbp), %xmm4               ## 16-byte Reload
	maxss	%xmm4, %xmm1
	xorps	%xmm2, %xmm2
	cmpltss	%xmm0, %xmm2
	andps	%xmm2, %xmm1
	andnps	%xmm4, %xmm2
	orps	%xmm1, %xmm2
	movaps	%xmm2, %xmm4
	movaps	%xmm0, %xmm1
	movaps	-144(%rbp), %xmm2               ## 16-byte Reload
	minss	%xmm2, %xmm1
	cmpltss	%xmm3, %xmm0
	andps	%xmm0, %xmm1
	andnps	%xmm2, %xmm0
	orps	%xmm1, %xmm0
	movaps	%xmm0, %xmm2
	incq	%r13
	movslq	(%rbx), %rax
	cmpq	%rax, %r13
	jl	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	(%r13), %eax
	jmp	LBB0_8
LBB0_1:
	xorps	%xmm4, %xmm4
	xorps	%xmm2, %xmm2
LBB0_9:
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm4, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_11
LBB0_10:
	movq	%r13, %rdi
	callq	_CopyBrush
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_71
LBB0_11:
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm2, %xmm0
	ucomisd	LCPI0_1(%rip), %xmm0
	jbe	LBB0_13
## %bb.12:
	movq	%r13, %rdi
	callq	_CopyBrush
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_71
LBB0_13:
	movl	4(%r15,%r12,8), %edi
	movss	(%r15,%r12,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	callq	_BaseWindingForPlane
	movq	%rax, -72(%rbp)
	testq	%rax, %rax
	setne	%cl
	cmpl	$0, (%r13)
	jle	LBB0_18
## %bb.14:
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:
	movl	$1, %r13d
	xorl	%ebx, %ebx
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	_mapplanes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r14), %rcx
	movslq	(%rcx,%rbx), %rcx
	xorq	$1, %rcx
	movl	4(%rax,%rcx,8), %esi
	movss	(%rax,%rcx,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	leaq	-72(%rbp), %rdi
	xorl	%edx, %edx
	callq	_ChopWindingInPlace
	movq	-72(%rbp), %rax
	movslq	(%r14), %rdx
	testq	%rax, %rax
	setne	%cl
	cmpq	%rdx, %r13
	jge	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	addq	$24, %rbx
	incq	%r13
	testq	%rax, %rax
	jne	LBB0_16
LBB0_18:
	testb	%cl, %cl
	je	LBB0_20
## %bb.19:
	movq	%rax, %rdi
	callq	_WindingIsTiny
	testq	%rax, %rax
	je	LBB0_26
LBB0_20:
	leaq	(%r15,%r12,8), %rsi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_BrushMostlyOnSide
	movl	%eax, %r14d
	movq	_PSIDE_FRONT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_22
## %bb.21:
	movq	%rbx, %rdi
	callq	_CopyBrush
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_22:
	movq	_PSIDE_BACK@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_24
## %bb.23:
	movq	%rbx, %rdi
	callq	_CopyBrush
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_24:
	movq	-72(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_71
## %bb.25:
	callq	_FreeWinding
LBB0_71:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_73
## %bb.72:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movq	-72(%rbp), %rdi
	callq	_WindingIsHuge
	testq	%rax, %rax
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_28
## %bb.27:
	leaq	L_.str(%rip), %rdi
	callq	_Log_Write
LBB0_28:
	movq	-72(%rbp), %rax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	movl	(%r13), %edi
	incl	%edi
	callq	_AllocBrush
	movl	32(%r13), %ecx
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	movl	%ecx, 32(%rax)
	movl	(%r13), %edi
	incl	%edi
	callq	_AllocBrush
	movl	32(%r13), %ecx
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	%ecx, 32(%rax)
	movl	(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_37
## %bb.29:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	(%r13), %edx
LBB0_36:                                ##   in Loop: Header=BB0_30 Depth=1
	incq	%rbx
	movslq	%edx, %rcx
	addq	$24, %r14
	cmpq	%rcx, %rbx
	jge	LBB0_37
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	8(%rax,%r14), %rdi
	movq	%rdi, -72(%rbp)
	testq	%rdi, %rdi
	je	LBB0_36
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	movl	4(%r15,%r12,8), %esi
	movss	(%r15,%r12,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	xorl	%edx, %edx
	leaq	-64(%rbp), %rcx
	movq	%rax, %r13
	leaq	-56(%rbp), %r8
	callq	_ClipWindingEpsilon
	movq	%r13, %rcx
	addq	%r14, %rcx
	movq	-64(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_33
## %bb.32:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	movq	8(%rdi), %r8
	movslq	(%rdi), %rdx
	leaq	(%rdx,%rdx,2), %rsi
	incl	%edx
	movl	%edx, (%rdi)
	movupd	(%rcx), %xmm0
	movupd	%xmm0, (%r8,%rsi,8)
	movq	16(%rcx), %rdx
	movq	%rdx, 16(%r8,%rsi,8)
	movq	%rax, 8(%r8,%rsi,8)
	movq	_SFL_TESTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movl	%edx, 16(%r8,%rsi,8)
LBB0_33:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	-56(%rbp), %rax
	testq	%rax, %rax
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_30 Depth=1
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	movq	8(%rdi), %r8
	movslq	(%rdi), %rdx
	leaq	(%rdx,%rdx,2), %rsi
	incl	%edx
	movl	%edx, (%rdi)
	movupd	(%rcx), %xmm0
	movupd	%xmm0, (%r8,%rsi,8)
	movq	16(%rcx), %rdx
	movq	%rdx, 16(%r8,%rsi,8)
	movq	%rax, 8(%r8,%rsi,8)
	movq	_SFL_TESTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %edx
	movl	%edx, 16(%r8,%rsi,8)
	jmp	LBB0_35
LBB0_37:
	movq	-144(%rbp), %r15                ## 8-byte Reload
	movq	%r15, %rdi
	callq	_BoundBrush
	movq	24(%r15), %rcx
	movq	_MAX_MAP_BOUNDS@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	movl	%eax, %edx
	negl	%edx
	cmpl	%edx, (%rcx)
	jl	LBB0_44
## %bb.38:
	movq	16(%r15), %rsi
	cmpl	%eax, (%rsi)
	jg	LBB0_44
## %bb.39:
	cmpl	%edx, 4(%rcx)
	jl	LBB0_44
## %bb.40:
	cmpl	%eax, 4(%rsi)
	jg	LBB0_44
## %bb.41:
	cmpl	%edx, 8(%rcx)
	jl	LBB0_44
## %bb.42:
	cmpl	%eax, 8(%rsi)
	jle	LBB0_43
LBB0_44:
	leaq	L_.str.1(%rip), %rdi
	callq	_Log_Write
	movq	-128(%rbp), %r12                ## 8-byte Reload
LBB0_45:
	movq	%r15, %rdi
	callq	_FreeBrush
	xorl	%r15d, %r15d
LBB0_46:
	movq	%r12, %rdi
	callq	_BoundBrush
	movq	24(%r12), %rcx
	movl	(%r14), %eax
	movl	%eax, %edx
	negl	%edx
	cmpl	%edx, (%rcx)
	jl	LBB0_55
## %bb.47:
	movq	16(%r12), %rsi
	cmpl	%eax, (%rsi)
	jg	LBB0_55
## %bb.48:
	cmpl	%edx, 4(%rcx)
	jl	LBB0_55
## %bb.49:
	cmpl	%eax, 4(%rsi)
	jg	LBB0_55
## %bb.50:
	cmpl	%edx, 8(%rcx)
	jl	LBB0_55
## %bb.51:
	cmpl	%eax, 8(%rsi)
	jle	LBB0_52
LBB0_55:
	leaq	L_.str.1(%rip), %rdi
	callq	_Log_Write
LBB0_56:
	movq	%r12, %rdi
	callq	_FreeBrush
	testq	%r15, %r15
	setne	%cl
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	testb	%cl, %cl
	jne	LBB0_60
LBB0_58:
	testb	%al, %al
	jne	LBB0_60
## %bb.59:
	leaq	L_.str.2(%rip), %rdi
	callq	_Log_Write
	jmp	LBB0_71
LBB0_43:
	cmpl	$3, (%r15)
	movq	-128(%rbp), %r12                ## 8-byte Reload
	jl	LBB0_45
	jmp	LBB0_46
LBB0_52:
	cmpl	$3, (%r12)
	jl	LBB0_56
## %bb.53:
	testq	%r15, %r15
	setne	%cl
	je	LBB0_54
## %bb.64:
	movq	8(%r15), %r13
	movslq	(%r15), %rax
	leal	1(%rax), %ecx
	movl	%ecx, (%r15)
	movq	%r15, -144(%rbp)                ## 8-byte Spill
	movl	-100(%rbp), %r15d               ## 4-byte Reload
	movl	%r15d, %ecx
	xorl	$1, %ecx
	leaq	(%rax,%rax,2), %rbx
	movl	%ecx, (%r13,%rbx,8)
	movq	_TEXINFO_NODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r13,%rbx,8)
	movq	_SFL_VISIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	16(%r13,%rbx,8), %eax
	movl	%eax, 16(%r13,%rbx,8)
	movq	_SFL_TESTED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 16(%r13,%rbx,8)
	movq	-152(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	callq	_CopyWinding
	movq	%rax, 8(%r13,%rbx,8)
	movq	8(%r12), %rax
	movslq	(%r12), %rcx
	leal	1(%rcx), %edx
	movl	%edx, (%r12)
	leaq	(%rcx,%rcx,2), %rcx
	movl	%r15d, (%rax,%rcx,8)
	movq	-144(%rbp), %r15                ## 8-byte Reload
	movq	_TEXINFO_NODE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 20(%rax,%rcx,8)
	movq	_SFL_VISIBLE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	16(%rax,%rcx,8), %edx
	movl	%edx, 16(%rax,%rcx,8)
	movq	_SFL_TESTED@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	notl	%esi
	andl	%edx, %esi
	movl	%esi, 16(%rax,%rcx,8)
	movq	%r14, 8(%rax,%rcx,8)
	movq	%r15, %rdi
	callq	_BrushVolume
	movsd	LCPI0_2(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_66
## %bb.65:
	movq	%r15, %rdi
	callq	_FreeBrush
	xorl	%r15d, %r15d
LBB0_66:
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_BrushVolume
	movsd	LCPI0_2(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_70
## %bb.67:
	movq	%rbx, %rdi
	callq	_FreeBrush
	testq	%r15, %r15
	jne	LBB0_69
## %bb.68:
	leaq	L_.str.4(%rip), %rdi
	callq	_Log_Write
LBB0_69:
	xorl	%ebx, %ebx
LBB0_70:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%r15, (%rax)
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	jmp	LBB0_71
LBB0_54:
	movb	$1, %al
	testb	%cl, %cl
	je	LBB0_58
LBB0_60:
	leaq	L_.str.3(%rip), %rdi
	callq	_Log_Write
	testq	%r15, %r15
	je	LBB0_62
## %bb.61:
	movq	%r15, %rdi
	callq	_FreeBrush
	movq	%r13, %rdi
	callq	_CopyBrush
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
LBB0_62:
	testq	%r12, %r12
	je	LBB0_71
## %bb.63:
	movq	%r12, %rdi
	callq	_FreeBrush
	jmp	LBB0_10
LBB0_73:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_mapplanes,8,3                  ## @mapplanes
	.comm	_PSIDE_FRONT,4,2                ## @PSIDE_FRONT
	.comm	_PSIDE_BACK,4,2                 ## @PSIDE_BACK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: huge winding\n"

	.comm	_SFL_TESTED,4,2                 ## @SFL_TESTED
	.comm	_MAX_MAP_BOUNDS,4,2             ## @MAX_MAP_BOUNDS
L_.str.1:                               ## @.str.1
	.asciz	"bogus brush after clip"

L_.str.2:                               ## @.str.2
	.asciz	"split removed brush\r\n"

L_.str.3:                               ## @.str.3
	.asciz	"split not on both sides\r\n"

	.comm	_TEXINFO_NODE,4,2               ## @TEXINFO_NODE
	.comm	_SFL_VISIBLE,4,2                ## @SFL_VISIBLE
L_.str.4:                               ## @.str.4
	.asciz	"two tiny brushes\r\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SplitBrush                     ; -- Begin function SplitBrush
	.p2align	2
_SplitBrush:                            ; @SplitBrush
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	d11, d10, [sp, #64]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #80]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	str	x3, [sp, #24]                   ; 8-byte Folded Spill
	str	xzr, [x3]
Lloh3:
	adrp	x23, _mapplanes@GOTPAGE
Lloh4:
	ldr	x23, [x23, _mapplanes@GOTPAGEOFF]
	stp	x1, x2, [sp, #8]                ; 16-byte Folded Spill
	str	xzr, [x2]
	ldr	x24, [x23]
	sxtw	x26, w1
	add	x25, x24, w1, sxtw #3
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x20, #0
	add	x9, x24, x26, lsl #3
	add	x27, x9, #4
	movi	d9, #0000000000000000
	mov	w28, #24
	movi	d8, #0000000000000000
	movi	d10, #0000000000000000
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_9
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x9, [x21, #8]
	madd	x9, x20, x28, x9
	ldr	x19, [x9, #8]
	str	x19, [sp, #32]
	cbz	x19, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, #0
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x22, lsl #2]
	ldr	w1, [x27]
	bl	_DotProduct
	ldr	s1, [x25]
	fsub	s0, s0, s1
	fcmp	s0, s10
	fccmp	s0, s9, #4, gt
	fcsel	s10, s0, s10, gt
	fcmp	s0, s8
	fccmp	s0, s9, #0, mi
	fcsel	s8, s0, s8, mi
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.lt	LBB0_6
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	b	LBB0_2
LBB0_8:
	movi	d10, #0000000000000000
	movi	d8, #0000000000000000
LBB0_9:
	fcvt	d0, s10
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16329, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.pl	LBB0_11
LBB0_10:
	mov	x0, x21
	bl	_CopyBrush
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	x0, [x8]
	b	LBB0_25
LBB0_11:
	fcvt	d0, s8
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #49097, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.le	LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_CopyBrush
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x0, [x8]
	b	LBB0_25
LBB0_13:
	add	x28, x24, x26, lsl #3
	ldr	w0, [x28, #4]!
	ldr	s0, [x25]
	bl	_BaseWindingForPlane
	str	x0, [sp, #32]
	ldr	w9, [x21]
	cmp	x0, #0
	cset	w8, ne
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.14:
	cbz	x0, LBB0_17
; %bb.15:
	mov	x19, #0
	mov	w20, #1
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x9, [x21, #8]
	ldrsw	x9, [x9, x19]
	eor	x9, x9, #0x1
	add	x8, x8, x9, lsl #3
	ldr	w1, [x8, #4]
	ldr	s0, [x8]
	add	x0, sp, #32
	mov	w2, #0
	bl	_ChopWindingInPlace
	ldr	x0, [sp, #32]
	ldrsw	x9, [x21]
	cmp	x0, #0
	cset	w8, ne
	add	x19, x19, #24
	cmp	x20, x9
	add	x20, x20, #1
	ccmp	x0, #0, #4, lt
	b.ne	LBB0_16
LBB0_17:
	cbz	w8, LBB0_19
; %bb.18:
	bl	_WindingIsTiny
	cbz	x0, LBB0_27
LBB0_19:
	mov	x0, x21
	mov	x1, x25
	bl	_BrushMostlyOnSide
	mov	x22, x0
Lloh5:
	adrp	x8, _PSIDE_FRONT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PSIDE_FRONT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_21
; %bb.20:
	mov	x0, x21
	bl	_CopyBrush
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x0, [x8]
LBB0_21:
Lloh8:
	adrp	x8, _PSIDE_BACK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PSIDE_BACK@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_23
; %bb.22:
	mov	x0, x21
	bl	_CopyBrush
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	x0, [x8]
LBB0_23:
	ldr	x0, [sp, #32]
	cbz	x0, LBB0_25
; %bb.24:
	bl	_FreeWinding
LBB0_25:
	ldr	x8, [sp, #56]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_71
; %bb.26:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_27:
	ldr	x0, [sp, #32]
	bl	_WindingIsHuge
	cbz	x0, LBB0_29
; %bb.28:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_Write
LBB0_29:
	ldr	x22, [sp, #32]
	ldr	w8, [x21]
	add	w0, w8, #1
	bl	_AllocBrush
	mov	x23, x0
	ldr	w8, [x21, #32]
	str	w8, [x0, #32]
	ldr	w8, [x21]
	add	w0, w8, #1
	bl	_AllocBrush
	mov	x19, x0
	ldr	w8, [x21, #32]
	str	w8, [x0, #32]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_38
; %bb.30:
	mov	x26, #0
	mov	x20, #0
	add	x9, sp, #40
	add	x27, x9, #8
	b	LBB0_33
LBB0_31:                                ;   in Loop: Header=BB0_33 Depth=1
	ldr	w8, [x21]
LBB0_32:                                ;   in Loop: Header=BB0_33 Depth=1
	add	x20, x20, #1
	add	x26, x26, #24
	cmp	x20, w8, sxtw
	b.ge	LBB0_38
LBB0_33:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21, #8]
	add	x24, x9, x26
	ldr	x0, [x24, #8]
	str	x0, [sp, #32]
	cbz	x0, LBB0_32
; %bb.34:                               ;   in Loop: Header=BB0_33 Depth=1
	ldr	w1, [x28]
	ldr	s0, [x25]
	add	x3, sp, #40
	mov	w2, #0
	mov	x4, x27
	bl	_ClipWindingEpsilon
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_36
; %bb.35:                               ;   in Loop: Header=BB0_33 Depth=1
	ldr	x9, [x23, #8]
	ldrsw	x10, [x23]
	mov	w11, #24
	madd	x9, x10, x11, x9
	add	w10, w10, #1
	str	w10, [x23]
	ldr	x10, [x24, #16]
	ldr	q0, [x24]
	str	q0, [x9]
	stp	x8, x10, [x9, #8]
Lloh16:
	adrp	x8, _SFL_TESTED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SFL_TESTED@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	bic	w8, w10, w8
	str	w8, [x9, #16]
LBB0_36:                                ;   in Loop: Header=BB0_33 Depth=1
	ldr	x8, [sp, #48]
	cbz	x8, LBB0_31
; %bb.37:                               ;   in Loop: Header=BB0_33 Depth=1
	ldr	x9, [x19, #8]
	ldrsw	x10, [x19]
	mov	w11, #24
	madd	x9, x10, x11, x9
	add	w10, w10, #1
	str	w10, [x19]
	ldr	x10, [x24, #16]
	ldr	q0, [x24]
	str	q0, [x9]
	stp	x8, x10, [x9, #8]
Lloh19:
	adrp	x8, _SFL_TESTED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SFL_TESTED@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	bic	w8, w10, w8
	str	w8, [x9, #16]
	b	LBB0_31
LBB0_38:
	mov	x0, x23
	bl	_BoundBrush
	ldr	x9, [x23, #24]
Lloh22:
	adrp	x20, _MAX_MAP_BOUNDS@GOTPAGE
Lloh23:
	ldr	x20, [x20, _MAX_MAP_BOUNDS@GOTPAGEOFF]
	ldr	w8, [x20]
	ldr	w11, [x9]
	neg	w10, w8
	cmp	w11, w10
	b.lt	LBB0_44
; %bb.39:
	ldr	x11, [x23, #16]
	ldr	w12, [x11]
	cmp	w12, w8
	b.gt	LBB0_44
; %bb.40:
	ldr	w12, [x9, #4]
	cmp	w12, w10
	b.lt	LBB0_44
; %bb.41:
	ldr	w12, [x11, #4]
	cmp	w12, w8
	b.gt	LBB0_44
; %bb.42:
	ldr	w9, [x9, #8]
	cmp	w9, w10
	b.lt	LBB0_44
; %bb.43:
	ldr	w9, [x11, #8]
	cmp	w9, w8
	b.le	LBB0_56
LBB0_44:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Log_Write
LBB0_45:
	mov	x0, x23
	bl	_FreeBrush
	mov	x23, #0
LBB0_46:
	mov	x0, x19
	bl	_BoundBrush
	ldr	x9, [x19, #24]
	ldr	w8, [x20]
	ldr	w11, [x9]
	neg	w10, w8
	cmp	w11, w10
	b.lt	LBB0_52
; %bb.47:
	ldr	x11, [x19, #16]
	ldr	w12, [x11]
	cmp	w12, w8
	b.gt	LBB0_52
; %bb.48:
	ldr	w12, [x9, #4]
	cmp	w12, w10
	b.lt	LBB0_52
; %bb.49:
	ldr	w12, [x11, #4]
	cmp	w12, w8
	b.gt	LBB0_52
; %bb.50:
	ldr	w9, [x9, #8]
	cmp	w9, w10
	b.lt	LBB0_52
; %bb.51:
	ldr	w9, [x11, #8]
	cmp	w9, w8
	b.le	LBB0_57
LBB0_52:
Lloh26:
	adrp	x0, l_.str.1@PAGE
Lloh27:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Log_Write
LBB0_53:
	mov	x0, x19
	bl	_FreeBrush
	mov	w8, #0
	mov	x19, #0
	cmp	x23, #0
	cset	w9, ne
	tbnz	w9, #0, LBB0_67
LBB0_54:
	tbnz	w8, #0, LBB0_67
; %bb.55:
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Log_Write
	b	LBB0_25
LBB0_56:
	ldr	w8, [x23]
	cmp	w8, #3
	b.lt	LBB0_45
	b	LBB0_46
LBB0_57:
	ldr	w8, [x19]
	cmp	w8, #3
	b.lt	LBB0_53
; %bb.58:
	cmp	x23, #0
	cset	w9, ne
	cbz	x23, LBB0_66
; %bb.59:
	ldr	x8, [x23, #8]
	ldrsw	x9, [x23]
	add	w10, w9, #1
	str	w10, [x23]
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	eor	w10, w25, #0x1
	mov	x26, x19
	mov	w19, #24
	madd	x20, x9, x19, x8
	str	w10, [x20]
Lloh30:
	adrp	x21, _TEXINFO_NODE@GOTPAGE
Lloh31:
	ldr	x21, [x21, _TEXINFO_NODE@GOTPAGEOFF]
	ldr	w8, [x21]
	str	w8, [x20, #20]
	mov	x27, x22
Lloh32:
	adrp	x22, _SFL_VISIBLE@GOTPAGE
Lloh33:
	ldr	x22, [x22, _SFL_VISIBLE@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x20, #16]
	bic	w8, w9, w8
	str	w8, [x20, #16]
Lloh34:
	adrp	x24, _SFL_TESTED@GOTPAGE
Lloh35:
	ldr	x24, [x24, _SFL_TESTED@GOTPAGEOFF]
	ldr	w9, [x24]
	bic	w8, w8, w9
	str	w8, [x20, #16]
	mov	x0, x27
	bl	_CopyWinding
	str	x0, [x20, #8]
	ldr	x8, [x26, #8]
	ldrsw	x9, [x26]
	add	w10, w9, #1
	mov	x20, x26
	str	w10, [x26]
	madd	x8, x9, x19, x8
	str	w25, [x8]
	ldr	w9, [x21]
	str	w9, [x8, #20]
	ldr	w9, [x22]
	ldr	w10, [x8, #16]
	bic	w9, w10, w9
	str	w9, [x8, #16]
	ldr	w10, [x24]
	bic	w9, w9, w10
	str	w9, [x8, #16]
	str	x27, [x8, #8]
	mov	x0, x23
	bl	_BrushVolume
	fmov	d8, #1.00000000
	fcmp	d0, d8
	b.pl	LBB0_61
; %bb.60:
	mov	x0, x23
	bl	_FreeBrush
	mov	x23, #0
LBB0_61:
	mov	x19, x20
	mov	x0, x20
	bl	_BrushVolume
	fcmp	d0, d8
	b.pl	LBB0_65
; %bb.62:
	mov	x0, x19
	bl	_FreeBrush
	cbnz	x23, LBB0_64
; %bb.63:
Lloh36:
	adrp	x0, l_.str.4@PAGE
Lloh37:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Log_Write
LBB0_64:
	mov	x19, #0
LBB0_65:
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x23, [x8]
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	str	x19, [x8]
	b	LBB0_25
LBB0_66:
	mov	w8, #1
	tbz	w9, #0, LBB0_54
LBB0_67:
Lloh38:
	adrp	x0, l_.str.3@PAGE
Lloh39:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Log_Write
	cbz	x23, LBB0_69
; %bb.68:
	mov	x0, x23
	bl	_FreeBrush
	mov	x0, x21
	bl	_CopyBrush
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	str	x0, [x8]
LBB0_69:
	cbz	x19, LBB0_25
; %bb.70:
	mov	x0, x19
	bl	_FreeBrush
	b	LBB0_10
LBB0_71:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_mapplanes,8,3                  ; @mapplanes
	.comm	_PSIDE_FRONT,4,2                ; @PSIDE_FRONT
	.comm	_PSIDE_BACK,4,2                 ; @PSIDE_BACK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: huge winding\n"

	.comm	_SFL_TESTED,4,2                 ; @SFL_TESTED
	.comm	_MAX_MAP_BOUNDS,4,2             ; @MAX_MAP_BOUNDS
l_.str.1:                               ; @.str.1
	.asciz	"bogus brush after clip"

l_.str.2:                               ; @.str.2
	.asciz	"split removed brush\r\n"

l_.str.3:                               ; @.str.3
	.asciz	"split not on both sides\r\n"

	.comm	_TEXINFO_NODE,4,2               ; @TEXINFO_NODE
	.comm	_SFL_VISIBLE,4,2                ; @SFL_VISIBLE
l_.str.4:                               ; @.str.4
	.asciz	"two tiny brushes\r\n"

.subsections_via_symbols
