	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ChopWindingInPlace             ## -- Begin function ChopWindingInPlace
	.p2align	4, 0x90
_ChopWindingInPlace:                    ## @ChopWindingInPlace
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_POINTS_ON_WINDING@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	addl	$4, %ebx
	shlq	$2, %rbx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	(%r14), %r12
	movl	$0, -52(%rbp)
	movq	$0, -60(%rbp)
	cmpl	$0, (%r12)
	jle	LBB0_1
## %bb.2:
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movl	%r15d, %r13d
	negl	%r15d
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movslq	(%rcx), %rax
	incl	-60(%rbp,%rax,4)
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r14,4)
	incq	%r14
	movslq	(%r12), %rbx
	cmpq	%rbx, %r14
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	callq	_DotProduct
	subl	-76(%rbp), %eax                 ## 4-byte Folded Reload
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r14,4)
	movq	_SIDE_ON@GOTPCREL(%rip), %rcx
	cmpl	%r15d, %eax
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SIDE_BACK@GOTPCREL(%rip), %rcx
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%r13d, %eax
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_8:
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx), %eax
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movl	(%rsi), %ecx
	cmpl	$0, -60(%rbp)
	movl	%eax, (%rdx,%r14,4)
	movl	%ecx, (%rsi,%r14,4)
	je	LBB0_9
## %bb.10:
	cmpl	$0, -56(%rbp)
	je	LBB0_22
## %bb.11:
	addl	$4, %ebx
	movl	%ebx, %edi
	callq	_AllocWinding
	movq	%rax, %r15
	cmpl	$0, (%r12)
	jle	LBB0_17
## %bb.12:
	xorl	%r14d, %r14d
	movq	_SIDE_ON@GOTPCREL(%rip), %r13
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r15), %rax
	movslq	(%r15), %rcx
	movq	(%rax,%rcx,8), %rsi
	callq	_VectorCopy
	incl	(%r15)
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	incq	%r14
	movslq	(%r12), %rax
	cmpq	%rax, %r14
	jge	LBB0_17
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%r14,8), %rdi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r14,4), %eax
	cmpl	(%r13), %eax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_15
	jmp	LBB0_16
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_21
LBB0_17:
	movl	(%r15), %eax
	cmpl	%ebx, %eax
	jle	LBB0_19
## %bb.18:
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_Com_Error
	movl	(%r15), %eax
LBB0_19:
	movq	_MAX_POINTS_ON_WINDING@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_21
## %bb.20:
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_Com_Error
	jmp	LBB0_21
LBB0_9:
	xorl	%r15d, %r15d
	movq	-88(%rbp), %r14                 ## 8-byte Reload
LBB0_21:
	movq	%r12, %rdi
	callq	_FreeWinding
	movq	%r15, (%r14)
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.23:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_POINTS_ON_WINDING,4,2      ## @MAX_POINTS_ON_WINDING
	.comm	_SIDE_FRONT,4,2                 ## @SIDE_FRONT
	.comm	_SIDE_BACK,4,2                  ## @SIDE_BACK
	.comm	_SIDE_ON,4,2                    ## @SIDE_ON
	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ClipWinding: points exceeded estimate"

L_.str.1:                               ## @.str.1
	.asciz	"ClipWinding: MAX_POINTS_ON_WINDING"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ChopWindingInPlace             ; -- Begin function ChopWindingInPlace
	.p2align	2
_ChopWindingInPlace:                    ; @ChopWindingInPlace
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x21, x3
	mov	x26, x2
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAX_POINTS_ON_WINDING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_POINTS_ON_WINDING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w8, w8, #4
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x7fffffff0
	sub	x28, x9, x12
	mov	sp, x28
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x22, x8, x12
	mov	sp, x22
	ldr	x20, [x0]
	stur	xzr, [x29, #-100]
	stur	wzr, [x29, #-104]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	stur	x19, [x29, #-112]               ; 8-byte Folded Spill
	mov	x24, #0
	neg	w19, w21
Lloh10:
	adrp	x25, _SIDE_ON@GOTPAGE
Lloh11:
	ldr	x25, [x25, _SIDE_ON@GOTPAGEOFF]
	sub	x27, x29, #104
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x24, lsl #3]
	mov	x1, x23
	bl	_DotProduct
	lsl	x8, x24, #2
	sub	w9, w0, w26
	cmp	w9, w19
	str	w9, [x28, x8]
Lloh12:
	adrp	x10, _SIDE_BACK@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SIDE_BACK@GOTPAGEOFF]
	csel	x10, x10, x25, lt
	cmp	w9, w21
Lloh14:
	adrp	x9, _SIDE_FRONT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SIDE_FRONT@GOTPAGEOFF]
	csel	x9, x9, x10, gt
	ldrsw	x9, [x9]
	str	w9, [x22, x8]
	lsl	x8, x9, #2
	ldr	w9, [x27, x8]
	add	w9, w9, #1
	str	w9, [x27, x8]
	add	x24, x24, #1
	ldrsw	x8, [x20]
	cmp	x24, x8
	b.lt	LBB0_2
; %bb.3:
Lloh16:
	adrp	x26, _SIDE_FRONT@GOTPAGE
Lloh17:
	ldr	x26, [x26, _SIDE_FRONT@GOTPAGEOFF]
	ldr	w9, [x22]
	ldr	w10, [x28]
	lsl	x11, x24, #2
	ldur	w12, [x29, #-104]
	str	w9, [x22, x11]
	str	w10, [x28, x11]
	cbz	w12, LBB0_16
; %bb.4:
	ldur	w9, [x29, #-100]
	cbz	w9, LBB0_19
; %bb.5:
	mov	x27, x22
	add	w22, w8, #4
	mov	x0, x22
	bl	_AllocWinding
	mov	x21, x0
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.6:
	mov	x19, x26
	mov	x23, #0
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x21, #8]
	ldrsw	x9, [x21]
	ldr	x1, [x8, x9, lsl #3]
	bl	_VectorCopy
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x20]
	cmp	x23, x8
	b.ge	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x23, lsl #3]
	ldr	w8, [x27, x23, lsl #2]
	ldr	w9, [x25]
	cmp	w8, w9
	b.eq	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w9, [x19]
	cmp	w8, w9
	b.eq	LBB0_7
	b	LBB0_8
LBB0_11:
	mov	x21, #0
	b	LBB0_18
LBB0_12:
	ldr	w8, [x21]
Lloh18:
	adrp	x19, _ERR_DROP@GOTPAGE
Lloh19:
	ldr	x19, [x19, _ERR_DROP@GOTPAGEOFF]
	cmp	w8, w22
	b.le	LBB0_14
; %bb.13:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
	ldr	w8, [x21]
LBB0_14:
Lloh22:
	adrp	x9, _MAX_POINTS_ON_WINDING@GOTPAGE
Lloh23:
	ldr	x9, [x9, _MAX_POINTS_ON_WINDING@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_17
; %bb.15:
	ldr	w0, [x19]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_Com_Error
	b	LBB0_17
LBB0_16:
	mov	x21, #0
LBB0_17:
	ldur	x19, [x29, #-112]               ; 8-byte Folded Reload
LBB0_18:
	mov	x0, x20
	bl	_FreeWinding
	str	x21, [x19]
LBB0_19:
	ldur	x8, [x29, #-88]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_POINTS_ON_WINDING,4,2      ; @MAX_POINTS_ON_WINDING
	.comm	_SIDE_FRONT,4,2                 ; @SIDE_FRONT
	.comm	_SIDE_BACK,4,2                  ; @SIDE_BACK
	.comm	_SIDE_ON,4,2                    ; @SIDE_ON
	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ClipWinding: points exceeded estimate"

l_.str.1:                               ; @.str.1
	.asciz	"ClipWinding: MAX_POINTS_ON_WINDING"

.subsections_via_symbols
