	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VisChopWinding                 ## -- Begin function VisChopWinding
	.p2align	4, 0x90
_VisChopWinding:                        ## @VisChopWinding
	.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	$1064, %rsp                     ## imm = 0x428
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	$0, -1076(%rbp)
	movq	$0, -1084(%rbp)
	cmpl	$0, (%rdi)
	jle	LBB0_25
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, -1096(%rbp)               ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	_ON_EPSILON@GOTPCREL(%rip), %r15
	movq	_SIDE_ON@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%rcx), %rax
	incl	-1084(%rbp,%rax,4)
	movl	%eax, -1072(%rbp,%rbx,4)
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	(%r14), %rsi
	callq	_DotProduct
	subl	8(%r14), %eax
	movl	%eax, -560(%rbp,%rbx,4)
	movl	(%r15), %edx
	movl	%edx, %esi
	negl	%esi
	movq	%r13, %rcx
	cmpl	%esi, %eax
	jge	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SIDE_BACK@GOTPCREL(%rip), %rcx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%edx, %eax
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_7:
	cmpl	$0, -1080(%rbp)
	je	LBB0_25
## %bb.8:
	cmpl	$0, -1084(%rbp)
	je	LBB0_9
## %bb.10:
	movl	-1072(%rbp), %eax
	movl	%eax, -1072(%rbp,%rbx,4)
	movl	-560(%rbp), %eax
	movl	%eax, -560(%rbp,%rbx,4)
	movq	-1096(%rbp), %rbx               ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_AllocStackWinding
	movq	%rax, %r15
	movl	$0, (%rax)
	cmpl	$0, (%r12)
	jle	LBB0_11
## %bb.12:
	xorl	%eax, %eax
	movq	_SIDE_ON@GOTPCREL(%rip), %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r15), %rcx
	cltq
	movq	(%rcx,%rax,8), %rsi
	callq	_VectorCopy
	movl	(%r15), %eax
	incl	%eax
	movl	%eax, (%r15)
	incq	%r14
LBB0_21:                                ##   in Loop: Header=BB0_13 Depth=1
	movslq	(%r12), %rcx
	cmpq	%rcx, %r14
	jge	LBB0_22
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	_MAX_POINTS_ON_FIXED_WINDING@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r12), %rcx
	movq	(%rcx,%r14,8), %rdi
	movl	-1072(%rbp,%r14,4), %r13d
	movl	(%rbx), %ecx
	cmpl	%ecx, %r13d
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r13d
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	8(%r15), %rcx
	cltq
	movq	(%rcx,%rax,8), %rsi
	callq	_VectorCopy
	movl	(%r15), %eax
	incl	%eax
	movl	%eax, (%r15)
	movl	(%rbx), %ecx
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	-1068(%rbp,%r14,4), %edx
	incq	%r14
	cmpl	%ecx, %edx
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpl	%r13d, %edx
	je	LBB0_21
LBB0_14:
	movq	%r15, %rdi
	movq	%r12, %r15
	jmp	LBB0_23
LBB0_9:
	xorl	%r15d, %r15d
LBB0_22:
	movq	%r12, %rdi
LBB0_23:
	movq	-1096(%rbp), %rbx               ## 8-byte Reload
	jmp	LBB0_24
LBB0_11:
	movq	%r12, %rdi
LBB0_24:
	movq	%rbx, %rsi
	callq	_FreeStackWinding
	movq	%r15, %r12
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	movq	%r12, %rax
	addq	$1064, %rsp                     ## imm = 0x428
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ON_EPSILON,4,2                 ## @ON_EPSILON
	.comm	_SIDE_FRONT,4,2                 ## @SIDE_FRONT
	.comm	_SIDE_BACK,4,2                  ## @SIDE_BACK
	.comm	_SIDE_ON,4,2                    ## @SIDE_ON
	.comm	_MAX_POINTS_ON_FIXED_WINDING,4,2 ## @MAX_POINTS_ON_FIXED_WINDING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VisChopWinding                 ; -- Begin function VisChopWinding
	.p2align	2
_VisChopWinding:                        ; @VisChopWinding
	.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, #1072
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	str	wzr, [sp, #24]
	str	xzr, [sp, #16]
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.1:
	mov	x21, x2
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	x24, #0
	add	x25, sp, #544
Lloh3:
	adrp	x26, _ON_EPSILON@GOTPAGE
Lloh4:
	ldr	x26, [x26, _ON_EPSILON@GOTPAGEOFF]
Lloh5:
	adrp	x22, _SIDE_FRONT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _SIDE_FRONT@GOTPAGEOFF]
Lloh7:
	adrp	x27, _SIDE_BACK@GOTPAGE
Lloh8:
	ldr	x27, [x27, _SIDE_BACK@GOTPAGEOFF]
	add	x28, sp, #32
Lloh9:
	adrp	x23, _SIDE_ON@GOTPAGE
Lloh10:
	ldr	x23, [x23, _SIDE_ON@GOTPAGEOFF]
	add	x19, sp, #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x24, lsl #3]
	ldr	x1, [x21]
	bl	_DotProduct
	ldr	w8, [x21, #8]
	ldr	w9, [x26]
	sub	w8, w0, w8
	lsl	x10, x24, #2
	neg	w11, w9
	cmp	w8, w11
	csel	x11, x27, x23, lt
	cmp	w8, w9
	str	w8, [x25, x10]
	csel	x8, x22, x11, gt
	ldrsw	x8, [x8]
	str	w8, [x28, x10]
	lsl	x8, x8, #2
	ldr	w9, [x19, x8]
	add	w9, w9, #1
	str	w9, [x19, x8]
	add	x24, x24, #1
	ldrsw	x8, [x20]
	cmp	x24, x8
	b.lt	LBB0_2
; %bb.3:
	ldr	w8, [sp, #20]
	cbz	w8, LBB0_18
; %bb.4:
	ldr	w8, [sp, #16]
	cbz	w8, LBB0_16
; %bb.5:
	ldr	w8, [sp, #32]
	lsl	x9, x24, #2
	add	x24, sp, #32
	str	w8, [x24, x9]
	ldr	w8, [sp, #544]
	add	x10, sp, #544
	str	w8, [x10, x9]
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x27
	bl	_AllocStackWinding
	mov	x21, x0
	str	wzr, [x0]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.6:
	mov	w8, #0
	mov	x25, #0
Lloh11:
	adrp	x26, _MAX_POINTS_ON_FIXED_WINDING@GOTPAGE
Lloh12:
	ldr	x26, [x26, _MAX_POINTS_ON_FIXED_WINDING@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x21, #8]
	ldr	x1, [x9, w8, sxtw #3]
	bl	_VectorCopy
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	add	x25, x25, #1
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldrsw	x9, [x20]
	cmp	x25, x9
	b.ge	LBB0_15
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x26]
	cmp	w8, w9
	b.eq	LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x20, #8]
	ldr	x0, [x9, x25, lsl #3]
	ldr	w19, [x24, x25, lsl #2]
	ldr	w9, [x23]
	cmp	w19, w9
	b.eq	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w10, [x22]
	cmp	w19, w10
	b.ne	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x21, #8]
	ldr	x1, [x9, w8, sxtw #3]
	bl	_VectorCopy
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	ldr	w9, [x23]
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=1
	add	x25, x25, #1
	ldr	w10, [x24, x25, lsl #2]
	cmp	w10, w9
	ccmp	w10, w19, #4, ne
	b.eq	LBB0_8
LBB0_14:
	mov	x0, x21
	mov	x21, x20
	b	LBB0_17
LBB0_15:
	mov	x0, x20
	b	LBB0_17
LBB0_16:
	mov	x21, #0
	mov	x0, x20
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
LBB0_17:
	mov	x1, x27
	bl	_FreeStackWinding
	mov	x20, x21
LBB0_18:
	ldur	x8, [x29, #-96]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	mov	x0, x20
	add	sp, sp, #1072
	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_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ON_EPSILON,4,2                 ; @ON_EPSILON
	.comm	_SIDE_FRONT,4,2                 ; @SIDE_FRONT
	.comm	_SIDE_BACK,4,2                  ; @SIDE_BACK
	.comm	_SIDE_ON,4,2                    ; @SIDE_ON
	.comm	_MAX_POINTS_ON_FIXED_WINDING,4,2 ; @MAX_POINTS_ON_FIXED_WINDING
.subsections_via_symbols
