	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WindingError                   ## -- Begin function WindingError
	.p2align	4, 0x90
_WindingError:                          ## @WindingError
	.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
	movl	(%rdi), %edx
	cmpl	$2, %edx
	jg	LBB0_2
## %bb.1:
	movq	_windingerror@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	movq	_WE_NOTENOUGHPOINTS@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_2:
	movq	%rdi, %r12
	callq	_WindingArea
	testl	%eax, %eax
	jle	LBB0_3
## %bb.4:
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	callq	_WindingPlane
	movl	(%r12), %r13d
	movq	_WE_NONE@GOTPCREL(%rip), %rax
	testl	%r13d, %r13d
	jle	LBB0_29
## %bb.5:
	xorl	%r14d, %r14d
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
	movq	8(%r12), %rax
	movq	(%rax,%r14,8), %r15
	movq	_BOGUS_RANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r15), %ecx
	movl	4(%r15), %r8d
	cmpl	%eax, %ecx
	jg	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %esi
	negl	%esi
	cmpl	%esi, %ecx
	jl	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	cmpl	%eax, %r8d
	jg	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%esi, %r8d
	jl	LBB0_9
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	8(%r15), %edi
	movl	$2, %edx
	cmpl	%eax, %edi
	jg	LBB0_9
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%esi, %edi
	jl	LBB0_9
## %bb.16:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%r15, %rdi
	callq	_DotProduct
	subl	-44(%rbp), %eax
	movq	_ON_EPSILON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	negl	%edx
	cmpl	%edx, %eax
	jl	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpl	%ecx, %eax
	jg	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_6 Depth=1
	leaq	1(%r14), %rbx
	movl	%r13d, %eax
	cmpq	%rax, %rbx
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	movl	$0, %eax
	cmovel	%eax, %ebx
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	%r15, %rsi
	callq	_VectorSubtract
	callq	_VectorLength
	movq	_ON_EPSILON@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_6 Depth=1
	callq	_CrossProduct
	callq	_VectorNormalize
	movq	%r15, %rdi
	callq	_DotProduct
	movslq	(%r12), %r13
	testq	%r13, %r13
	jle	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, %r15d
	movq	_ON_EPSILON@GOTPCREL(%rip), %rax
	addl	(%rax), %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_24 Depth=2
	movl	(%r12), %r13d
LBB0_27:                                ##   in Loop: Header=BB0_24 Depth=2
	incq	%rbx
	movslq	%r13d, %rax
	cmpq	%rax, %rbx
	jge	LBB0_10
LBB0_24:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rbx, %r14
	je	LBB0_27
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_DotProduct
	cmpl	%r15d, %eax
	jle	LBB0_26
	jmp	LBB0_28
LBB0_22:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rax
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpq	%rax, %r14
	jl	LBB0_6
## %bb.11:
	movq	_WE_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_3:
	movq	_windingerror@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_sprintf
	movq	_WE_SMALLAREA@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_28:
	movq	_windingerror@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	movq	_WE_NONCONVEX@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_8:
	xorl	%edx, %edx
LBB0_9:
	movq	_windingerror@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %r9d
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	movq	_WE_POINTBOGUSRANGE@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_18:
	movq	_windingerror@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_sprintf
	movq	_WE_POINTOFFPLANE@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_20:
	movq	_windingerror@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_sprintf
	movq	_WE_DEGENERATEEDGE@GOTPCREL(%rip), %rax
LBB0_29:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_windingerror,4,2               ## @windingerror
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"winding %i points"

	.comm	_WE_NOTENOUGHPOINTS,4,2         ## @WE_NOTENOUGHPOINTS
L_.str.1:                               ## @.str.1
	.asciz	"winding %f area"

	.comm	_WE_SMALLAREA,4,2               ## @WE_SMALLAREA
	.comm	_BOGUS_RANGE,4,2                ## @BOGUS_RANGE
L_.str.2:                               ## @.str.2
	.asciz	"winding point %d BUGUS_RANGE '%f %f %f'"

	.comm	_WE_POINTBOGUSRANGE,4,2         ## @WE_POINTBOGUSRANGE
	.comm	_ON_EPSILON,4,2                 ## @ON_EPSILON
L_.str.3:                               ## @.str.3
	.asciz	"winding point %d off plane"

	.comm	_WE_POINTOFFPLANE,4,2           ## @WE_POINTOFFPLANE
L_.str.4:                               ## @.str.4
	.asciz	"winding degenerate edge %d-%d"

	.comm	_WE_DEGENERATEEDGE,4,2          ## @WE_DEGENERATEEDGE
L_.str.5:                               ## @.str.5
	.asciz	"winding non-convex"

	.comm	_WE_NONCONVEX,4,2               ## @WE_NONCONVEX
	.comm	_WE_NONE,4,2                    ## @WE_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_WindingError                   ; -- Begin function WindingError
	.p2align	2
_WindingError:                          ; @WindingError
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	ldr	w8, [x0]
	cmp	w8, #2
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _windingerror@GOTPAGE
Lloh1:
	ldr	x9, [x9, _windingerror@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
Lloh5:
	adrp	x21, _WE_NOTENOUGHPOINTS@GOTPAGE
Lloh6:
	ldr	x21, [x21, _WE_NOTENOUGHPOINTS@GOTPAGEOFF]
	b	LBB0_27
LBB0_2:
	mov	x19, x0
	bl	_WindingArea
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #0
	b.le	LBB0_18
; %bb.3:
	add	x2, sp, #44
	mov	x0, x19
	bl	_WindingPlane
	ldr	w26, [x19]
	cmp	w26, #1
	b.lt	LBB0_19
; %bb.4:
	mov	x25, #0
Lloh7:
	adrp	x22, _BOGUS_RANGE@GOTPAGE
Lloh8:
	ldr	x22, [x22, _BOGUS_RANGE@GOTPAGEOFF]
Lloh9:
	adrp	x23, _ON_EPSILON@GOTPAGE
Lloh10:
	ldr	x23, [x23, _ON_EPSILON@GOTPAGEOFF]
Lloh11:
	adrp	x21, _WE_NONE@GOTPAGE
Lloh12:
	ldr	x21, [x21, _WE_NONE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	ldr	x8, [x19, #8]
	ldr	x20, [x8, x25, lsl #3]
	ldr	w10, [x22]
	neg	w11, w10
	ldp	w8, w9, [x20]
	cmp	w8, w10
	ccmp	w8, w11, #8, le
	b.lt	LBB0_21
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w9, w10
	ccmp	w9, w11, #8, le
	b.lt	LBB0_22
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w12, [x20, #8]
	cmp	w12, w10
	ccmp	w12, w11, #8, le
	b.lt	LBB0_23
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x25
	mov	x0, x20
	bl	_DotProduct
	ldr	w8, [sp, #44]
	sub	w8, w0, w8
	ldr	w9, [x23]
	neg	w10, w9
	cmp	w8, w10
	ccmp	w8, w9, #0, ge
	b.gt	LBB0_25
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x24, #1
	cmp	x25, w26, uxtw
	csel	w26, wzr, w25, eq
	ldr	x8, [x19, #8]
	ldr	x0, [x8, w26, uxtw #3]
	mov	x1, x20
	bl	_VectorSubtract
	bl	_VectorLength
	ldr	w8, [x23]
	cmp	w0, w8
	b.lt	LBB0_26
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	bl	_CrossProduct
	bl	_VectorNormalize
	mov	x0, x20
	bl	_DotProduct
	ldr	w26, [x19]
	cmp	w26, #1
	b.lt	LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x20, #0
	ldr	w8, [x23]
	add	w27, w8, w0
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_14 Depth=2
	ldr	w26, [x19]
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	add	x20, x20, #1
	sxtw	x8, w26
	cmp	x20, x8
	b.ge	LBB0_17
LBB0_14:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x24, x20
	b.eq	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x20, lsl #3]
	bl	_DotProduct
	cmp	w0, w27
	b.le	LBB0_12
	b	LBB0_20
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x26
	sxtw	x8, w8
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x25, x8
	b.lt	LBB0_5
	b	LBB0_27
LBB0_18:
Lloh13:
	adrp	x8, _windingerror@GOTPAGE
Lloh14:
	ldr	x8, [x8, _windingerror@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	x0, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_sprintf
Lloh18:
	adrp	x21, _WE_SMALLAREA@GOTPAGE
Lloh19:
	ldr	x21, [x21, _WE_SMALLAREA@GOTPAGEOFF]
	b	LBB0_27
LBB0_19:
Lloh20:
	adrp	x21, _WE_NONE@GOTPAGE
Lloh21:
	ldr	x21, [x21, _WE_NONE@GOTPAGEOFF]
	b	LBB0_27
LBB0_20:
Lloh22:
	adrp	x8, _windingerror@GOTPAGE
Lloh23:
	ldr	x8, [x8, _windingerror@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str.5@PAGE
Lloh26:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_sprintf
Lloh27:
	adrp	x21, _WE_NONCONVEX@GOTPAGE
Lloh28:
	ldr	x21, [x21, _WE_NONCONVEX@GOTPAGEOFF]
	b	LBB0_27
LBB0_21:
	mov	w10, #0
	b	LBB0_24
LBB0_22:
	mov	w10, #1
	b	LBB0_24
LBB0_23:
	mov	w10, #2
LBB0_24:
Lloh29:
	adrp	x11, _windingerror@GOTPAGE
Lloh30:
	ldr	x11, [x11, _windingerror@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x11]
	ldr	w11, [x20, #8]
	stp	x9, x11, [sp, #16]
	stp	x10, x8, [sp]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_sprintf
Lloh34:
	adrp	x21, _WE_POINTBOGUSRANGE@GOTPAGE
Lloh35:
	ldr	x21, [x21, _WE_POINTBOGUSRANGE@GOTPAGEOFF]
	b	LBB0_27
LBB0_25:
Lloh36:
	adrp	x8, _windingerror@GOTPAGE
Lloh37:
	ldr	x8, [x8, _windingerror@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	str	x24, [sp]
Lloh39:
	adrp	x1, l_.str.3@PAGE
Lloh40:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_sprintf
Lloh41:
	adrp	x21, _WE_POINTOFFPLANE@GOTPAGE
Lloh42:
	ldr	x21, [x21, _WE_POINTOFFPLANE@GOTPAGEOFF]
	b	LBB0_27
LBB0_26:
Lloh43:
	adrp	x8, _windingerror@GOTPAGE
Lloh44:
	ldr	x8, [x8, _windingerror@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	stp	x24, x26, [sp]
Lloh46:
	adrp	x1, l_.str.4@PAGE
Lloh47:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_sprintf
Lloh48:
	adrp	x21, _WE_DEGENERATEEDGE@GOTPAGE
Lloh49:
	ldr	x21, [x21, _WE_DEGENERATEEDGE@GOTPAGEOFF]
LBB0_27:
	ldr	w0, [x21]
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_windingerror,4,2               ; @windingerror
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"winding %i points"

	.comm	_WE_NOTENOUGHPOINTS,4,2         ; @WE_NOTENOUGHPOINTS
l_.str.1:                               ; @.str.1
	.asciz	"winding %f area"

	.comm	_WE_SMALLAREA,4,2               ; @WE_SMALLAREA
	.comm	_BOGUS_RANGE,4,2                ; @BOGUS_RANGE
l_.str.2:                               ; @.str.2
	.asciz	"winding point %d BUGUS_RANGE '%f %f %f'"

	.comm	_WE_POINTBOGUSRANGE,4,2         ; @WE_POINTBOGUSRANGE
	.comm	_ON_EPSILON,4,2                 ; @ON_EPSILON
l_.str.3:                               ; @.str.3
	.asciz	"winding point %d off plane"

	.comm	_WE_POINTOFFPLANE,4,2           ; @WE_POINTOFFPLANE
l_.str.4:                               ; @.str.4
	.asciz	"winding degenerate edge %d-%d"

	.comm	_WE_DEGENERATEEDGE,4,2          ; @WE_DEGENERATEEDGE
l_.str.5:                               ; @.str.5
	.asciz	"winding non-convex"

	.comm	_WE_NONCONVEX,4,2               ; @WE_NONCONVEX
	.comm	_WE_NONE,4,2                    ; @WE_NONE
.subsections_via_symbols
