	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function VL_ChopWinding
LCPI0_0:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_VL_ChopWinding
	.p2align	4, 0x90
_VL_ChopWinding:                        ## @VL_ChopWinding
	.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	$1096, %rsp                     ## imm = 0x448
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -1076(%rbp)
	movq	$0, -1084(%rbp)
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movaps	%xmm0, %xmm1
	movq	%rsi, %r15
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm1, %xmm0
	movaps	%xmm0, -1104(%rbp)              ## 16-byte Spill
	xorl	%ebx, %ebx
	movq	_SIDE_FRONT@GOTPCREL(%rip), %r12
	movq	_SIDE_ON@GOTPCREL(%rip), %r13
	movaps	%xmm1, -1120(%rbp)              ## 16-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r12), %eax
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movslq	%eax, %rcx
	incl	-1084(%rbp,%rcx,4)
	movl	%eax, -1072(%rbp,%rbx,4)
	incq	%rbx
	movslq	(%r14), %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	(%r15), %rsi
	callq	_DotProduct
	movaps	-1120(%rbp), %xmm1              ## 16-byte Reload
	subss	8(%r15), %xmm0
	movss	%xmm0, -560(%rbp,%rbx,4)
	ucomiss	%xmm1, %xmm0
	ja	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movaps	-1104(%rbp), %xmm2              ## 16-byte Reload
	ucomiss	%xmm0, %xmm2
	jbe	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_SIDE_BACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %eax
	jmp	LBB0_8
LBB0_1:
	xorl	%ebx, %ebx
LBB0_9:
	movq	_SIDE_BACK@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmpl	$0, -1084(%rbp,%rdx,4)
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	-1084(%rbp,%rax,4), %esi
	je	LBB0_10
## %bb.12:
	testl	%esi, %esi
	je	LBB0_13
## %bb.14:
	movl	-1072(%rbp), %eax
	movl	%eax, -1072(%rbp,%rbx,4)
	movss	-560(%rbp), %xmm0               ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -560(%rbp,%rbx,4)
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.16:
	xorl	%ebx, %ebx
	movq	_SIDE_ON@GOTPCREL(%rip), %r15
	xorl	%r12d, %r12d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	callq	_VectorCopy
	incl	%r12d
	incq	%rbx
LBB0_25:                                ##   in Loop: Header=BB0_17 Depth=1
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jge	LBB0_26
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	_MAX_POINTS_ON_FIXED_WINDING@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jge	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rdi
	movslq	-1072(%rbp,%rbx,4), %r13
	movl	(%r15), %eax
	cmpl	%eax, %r13d
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rcx
	cmpq	%r13, (%rcx)
	jne	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=1
	callq	_VectorCopy
	incl	%r12d
	movl	(%r15), %eax
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	-1068(%rbp,%rbx,4), %ecx
	incq	%rbx
	cmpl	%eax, %ecx
	je	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	%r13d, %ecx
	je	LBB0_25
LBB0_18:
	leaq	L_.str(%rip), %rdi
	callq	__printf
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_10:
	testl	%esi, %esi
	jne	LBB0_28
## %bb.11:
	movq	_SIDE_ON@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_13:
	movl	%edx, %eax
	jmp	LBB0_28
LBB0_15:
	xorl	%r12d, %r12d
LBB0_26:
	movl	%r12d, -1136(%rbp)
	leaq	-1136(%rbp), %rsi
	movq	%r14, %rdi
	movl	$16, %edx
	callq	_memcpy
	movq	_SIDE_CROSS@GOTPCREL(%rip), %rax
LBB0_27:
	movl	(%rax), %eax
LBB0_28:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_30
## %bb.29:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$1096, %rsp                     ## imm = 0x448
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_30:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SIDE_FRONT,8,3                 ## @SIDE_FRONT
	.comm	_SIDE_BACK,8,3                  ## @SIDE_BACK
	.comm	_SIDE_ON,4,2                    ## @SIDE_ON
	.comm	_MAX_POINTS_ON_FIXED_WINDING,4,2 ## @MAX_POINTS_ON_FIXED_WINDING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WARNING: VL_ChopWinding -> MAX_POINTS_ON_FIXED_WINDING overflowed\n"

	.comm	_SIDE_CROSS,4,2                 ## @SIDE_CROSS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VL_ChopWinding                 ; -- Begin function VL_ChopWinding
	.p2align	2
_VL_ChopWinding:                        ; @VL_ChopWinding
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-112]!            ; 16-byte Folded Spill
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	sub	sp, sp, #1072
	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, #-104]
	str	wzr, [sp, #32]
	str	xzr, [sp, #24]
	ldr	w8, [x0]
Lloh3:
	adrp	x21, _SIDE_FRONT@GOTPAGE
Lloh4:
	ldr	x21, [x21, _SIDE_FRONT@GOTPAGEOFF]
Lloh5:
	adrp	x23, _SIDE_BACK@GOTPAGE
Lloh6:
	ldr	x23, [x23, _SIDE_BACK@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	fmov	s8, s0
	mov	x20, x1
	mov	x22, #0
	fneg	s9, s0
	add	x24, sp, #552
	add	x25, sp, #40
	add	x26, sp, #24
Lloh7:
	adrp	x27, _SIDE_ON@GOTPAGE
Lloh8:
	ldr	x27, [x27, _SIDE_ON@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x25, x22, lsl #2]
	sbfiz	x8, x8, #2, #32
	ldr	w9, [x26, x8]
	add	w9, w9, #1
	str	w9, [x26, x8]
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x22, lsl #3]
	ldr	x1, [x20]
	bl	_DotProduct
	ldr	s1, [x20, #8]
	fsub	s0, s0, s1
	str	s0, [x24, x22, lsl #2]
	fcmp	s0, s8
	b.gt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	fcmp	s0, s9
	b.pl	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x23]
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x27]
	b	LBB0_3
LBB0_8:
	mov	x22, #0
LBB0_9:
	ldr	x9, [x23]
	add	x10, sp, #24
	ldr	w11, [x10, x9, lsl #2]
	ldr	x0, [x21]
	ldr	w10, [x10, x0, lsl #2]
	cbz	w11, LBB0_21
; %bb.10:
	cbz	w10, LBB0_23
; %bb.11:
	ldr	w9, [sp, #40]
	lsl	x10, x22, #2
	add	x20, sp, #40
	str	w9, [x20, x10]
	ldr	s0, [sp, #552]
	add	x9, sp, #552
	str	s0, [x9, x10]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.12:
	mov	x23, #0
	mov	w22, #0
Lloh9:
	adrp	x24, _MAX_POINTS_ON_FIXED_WINDING@GOTPAGE
Lloh10:
	ldr	x24, [x24, _MAX_POINTS_ON_FIXED_WINDING@GOTPAGEOFF]
Lloh11:
	adrp	x25, _SIDE_ON@GOTPAGE
Lloh12:
	ldr	x25, [x25, _SIDE_ON@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	bl	_VectorCopy
	add	w22, w22, #1
	add	x23, x23, #1
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.ge	LBB0_25
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	cmp	w22, w8
	b.ge	LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, x23, lsl #3]
	ldrsw	x26, [x20, x23, lsl #2]
	ldr	w8, [x25]
	cmp	w26, w8
	b.eq	LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x9, [x21]
	cmp	x9, x26
	b.ne	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	bl	_VectorCopy
	add	w22, w22, #1
	ldr	w8, [x25]
LBB0_19:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x23, x23, #1
	ldr	w9, [x20, x23, lsl #2]
	cmp	w9, w8
	ccmp	w9, w26, #4, ne
	b.eq	LBB0_14
LBB0_20:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	__printf
	ldr	w0, [x21]
	b	LBB0_27
LBB0_21:
	cbnz	w10, LBB0_27
; %bb.22:
Lloh15:
	adrp	x8, _SIDE_ON@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SIDE_ON@GOTPAGEOFF]
	b	LBB0_26
LBB0_23:
	mov	x0, x9
	b	LBB0_27
LBB0_24:
	mov	w22, #0
LBB0_25:
	str	w22, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #16
	bl	_memcpy
Lloh17:
	adrp	x8, _SIDE_CROSS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SIDE_CROSS@GOTPAGEOFF]
LBB0_26:
	ldr	w0, [x8]
LBB0_27:
	ldur	x8, [x29, #-104]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.28:
                                        ; kill: def $w0 killed $w0 killed $x0
	add	sp, sp, #1072
	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
	ldp	d9, d8, [sp], #112              ; 16-byte Folded Reload
	ret
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SIDE_FRONT,8,3                 ; @SIDE_FRONT
	.comm	_SIDE_BACK,8,3                  ; @SIDE_BACK
	.comm	_SIDE_ON,4,2                    ; @SIDE_ON
	.comm	_MAX_POINTS_ON_FIXED_WINDING,4,2 ; @MAX_POINTS_ON_FIXED_WINDING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WARNING: VL_ChopWinding -> MAX_POINTS_ON_FIXED_WINDING overflowed\n"

	.comm	_SIDE_CROSS,4,2                 ; @SIDE_CROSS
.subsections_via_symbols
