	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function MergeWindings
LCPI0_0:
	.quad	0x3fc999999999999a              ## double 0.20000000000000001
LCPI0_1:
	.quad	0x3feccccccccccccd              ## double 0.90000000000000002
LCPI0_2:
	.quad	0xbfb999999999999a              ## double -0.10000000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_MergeWindings
	.p2align	4, 0x90
_MergeWindings:                         ## @MergeWindings
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	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), %r12d
	addl	$4, %r12d
	leaq	(,%r12,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	shlq	$3, %r12
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	movq	%r14, %rdi
	callq	_RemoveEqualPoints
	movl	(%r14), %eax
	movq	8(%r14), %rsi
	movq	%rax, %rbx
	leal	(,%rax,8), %r14d
	movq	%r12, %rdi
	movl	%r14d, %edx
	callq	_memcpy
	cmpl	$0, (%r13)
	jle	LBB0_46
## %bb.1:
	movq	%rbx, %r14
	xorl	%ebx, %ebx
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
LBB0_2:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%r8d, %r14d
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jge	LBB0_45
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##       Child Loop BB0_12 Depth 3
                                        ##     Child Loop BB0_21 Depth 2
                                        ##       Child Loop BB0_25 Depth 3
                                        ##     Child Loop BB0_31 Depth 2
                                        ##     Child Loop BB0_38 Depth 2
                                        ##     Child Loop BB0_42 Depth 2
	movq	8(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_VectorCopy
	testl	%r14d, %r14d
	jle	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=2
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_Print
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	cmpl	%r14d, %r13d
	jge	LBB0_17
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_12 Depth 3
	leal	1(%r13), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	cltd
	idivl	%r14d
	movslq	%edx, %rax
	movq	(%r12,%rax,8), %rdi
	movl	%r13d, %eax
	cltd
	idivl	%r14d
	movslq	%edx, %rbx
	movq	(%r12,%rbx,8), %rsi
	callq	_VectorSubtract
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	callq	_CrossProduct
	callq	_VectorNormalize
	callq	_VectorLength
	movsd	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	jbe	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	decl	%r14d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	cmpl	%r14d, %r13d
	jge	LBB0_7
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=2
	movslq	-64(%rbp), %rbx                 ## 4-byte Folded Reload
	movslq	-56(%rbp), %r13                 ## 4-byte Folded Reload
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_9 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	leaq	1(%rbx), %r14
	movq	(%r12,%rbx,8), %rsi
	movq	8(%r12,%rbx,8), %rdi
	callq	_VectorCopy
	movl	4(%r15,%rbx,4), %eax
	movl	%eax, (%r15,%rbx,4)
	movq	%r14, %rbx
	cmpq	%r14, %r13
	jne	LBB0_12
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	(%r12,%rbx,8), %rdi
	callq	_DotProduct
	movss	%xmm0, -84(%rbp)                ## 4-byte Spill
	callq	_DotProduct
	subss	-84(%rbp), %xmm0                ## 4-byte Folded Reload
	cvtss2sd	%xmm0, %xmm0
	movsd	LCPI0_2(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	_SIDE_BACK@GOTPCREL(%rip), %rax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=2
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rax
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=2
	movl	(%rax), %eax
	movslq	-64(%rbp), %rcx                 ## 4-byte Folded Reload
	movl	%eax, (%r15,%rcx,4)
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r13d
	cmpl	%r14d, %r13d
	jl	LBB0_9
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	testl	%r14d, %r14d
	movq	_SIDE_BACK@GOTPCREL(%rip), %rdi
	jle	LBB0_3
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_21
LBB0_19:                                ##   in Loop: Header=BB0_21 Depth=2
	movl	%esi, %ecx
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_21 Depth=2
	movl	%ecx, %esi
	cmpl	%r14d, %ecx
	jge	LBB0_27
LBB0_21:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_25 Depth 3
	movslq	%esi, %rcx
	movl	(%r15,%rcx,4), %r8d
	incl	%ecx
	cmpl	(%rdi), %r8d
	jne	LBB0_20
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=2
	movl	%ecx, %eax
	cltd
	idivl	%r14d
	movslq	%edx, %rbx
	cmpl	%r8d, (%r15,%rbx,4)
	jne	LBB0_20
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=2
	decl	%r14d
	cmpl	%r14d, %edx
	jge	LBB0_19
## %bb.24:                              ##   in Loop: Header=BB0_21 Depth=2
	movl	%esi, -64(%rbp)                 ## 4-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movslq	%r14d, %r13
	.p2align	4, 0x90
LBB0_25:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_21 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	leaq	1(%rbx), %r14
	movq	(%r12,%rbx,8), %rsi
	movq	8(%r12,%rbx,8), %rdi
	callq	_VectorCopy
	movl	4(%r15,%rbx,4), %eax
	movl	%eax, (%r15,%rbx,4)
	movq	%r14, %rbx
	cmpq	%r14, %r13
	jne	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_21 Depth=2
	movl	-64(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %ecx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	_SIDE_BACK@GOTPCREL(%rip), %rdi
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %r8d
	testl	%r14d, %r14d
	jle	LBB0_2
## %bb.28:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r8, %rsi
	negq	%rsi
	xorl	%eax, %eax
	movl	$1, %r13d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_31
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_31 Depth=2
	movl	%eax, %r14d
LBB0_30:                                ##   in Loop: Header=BB0_31 Depth=2
	leaq	(%rsi,%r13), %rcx
	incq	%rcx
	incq	%r13
	movl	%r14d, %eax
	cmpq	$1, %rcx
	je	LBB0_36
LBB0_31:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-4(%r15,%r13,4), %ecx
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_29
## %bb.32:                              ##   in Loop: Header=BB0_31 Depth=2
	movq	%rsi, %rcx
	addq	%r13, %rcx
	cmovneq	%r13, %rcx
	movl	(%r15,%rcx,4), %ecx
	cmpl	(%rdi), %ecx
	jne	LBB0_29
## %bb.33:                              ##   in Loop: Header=BB0_31 Depth=2
	movl	$1, %r14d
	testl	%eax, %eax
	je	LBB0_30
## %bb.34:                              ##   in Loop: Header=BB0_31 Depth=2
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	movq	%r8, %rbx
	callq	_Log_Print
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %r8
	movq	_SIDE_BACK@GOTPCREL(%rip), %rdi
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_36:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_SIDE_FRONT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rdi), %ecx
	leaq	-1(%r8), %rdx
	xorl	%esi, %esi
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_38
	.p2align	4, 0x90
LBB0_37:                                ##   in Loop: Header=BB0_38 Depth=2
	incq	%rsi
	cmpq	%rsi, %r8
	je	LBB0_44
LBB0_38:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%eax, (%r15,%rsi,4)
	jne	LBB0_37
## %bb.39:                              ##   in Loop: Header=BB0_38 Depth=2
	leal	1(%rsi), %r14d
	cmpq	%rsi, %rdx
	movl	$0, %edi
	cmovel	%edi, %r14d
	cmpl	%ecx, (%r15,%r14,4)
	jne	LBB0_37
## %bb.40:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	decl	%eax
	cmpl	%r14d, %eax
	jle	LBB0_43
## %bb.41:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movslq	%ebx, %r13
	decq	%r13
	movslq	%r14d, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
                                        ## kill: def $ebx killed $ebx killed $rbx def $rbx
	.p2align	4, 0x90
LBB0_42:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12,%r13,8), %rdi
	movslq	%ebx, %rbx
	movq	(%r12,%rbx,8), %rsi
	callq	_VectorCopy
	decq	%r13
	decl	%ebx
	cmpq	-64(%rbp), %r13                 ## 8-byte Folded Reload
	jg	LBB0_42
LBB0_43:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	incl	%ecx
	incl	%r14d
	movl	%r14d, %eax
	movq	%rcx, %r14
	cltd
	idivl	%r14d
                                        ## kill: def $edx killed $edx def $rdx
	movq	(%r12,%rdx,8), %rsi
	callq	_VectorCopy
	jmp	LBB0_3
LBB0_44:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r8d, %r14d
	jmp	LBB0_4
LBB0_45:
	movq	%r14, %rbx
	leal	(,%r14,8), %r14d
LBB0_46:
	movl	%ebx, %edi
	callq	_AllocWinding
	movq	%rax, %r15
	movl	%ebx, (%rax)
	movq	8(%rax), %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_RemoveColinearPoints
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_48
## %bb.47:
	movq	%r15, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_48:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_POINTS_ON_WINDING,4,2      ## @MAX_POINTS_ON_WINDING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MergeWindings: degenerate edge on winding %f %f %f\n"

	.comm	_SIDE_BACK,4,2                  ## @SIDE_BACK
	.comm	_SIDE_FRONT,4,2                 ## @SIDE_FRONT
L_.str.1:                               ## @.str.1
	.asciz	"Warning: MergeWindings: front to back found twice\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_MergeWindings                  ; -- Begin function MergeWindings
	.p2align	2
_MergeWindings:                         ; @MergeWindings
	.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, #48
	mov	x19, x2
	mov	x26, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-104]
Lloh3:
	adrp	x8, _MAX_POINTS_ON_WINDING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_POINTS_ON_WINDING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	add	w12, w8, #4
	lsl	x8, x12, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x25, x9, x8
	mov	sp, x25
	lsl	x8, x12, #3
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x21, x9, x8
	mov	sp, x21
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16329, lsl #48
	fmov	d0, x8
	bl	_RemoveEqualPoints
	ldr	w24, [x22]
	ldr	x1, [x22, #8]
	lsl	w22, w24, #3
	mov	x0, x21
	mov	x2, x22
	bl	_memcpy
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_43
; %bb.1:
	mov	x22, #0
	add	x9, x21, #8
	add	x8, x25, #4
	stp	x8, x9, [x29, #-120]            ; 16-byte Folded Spill
Lloh10:
	adrp	x23, _SIDE_BACK@GOTPAGE
Lloh11:
	ldr	x23, [x23, _SIDE_BACK@GOTPAGEOFF]
	mov	x20, #-3689348814741910324
	movk	x20, #52429
	movk	x20, #16364, lsl #48
	stur	x26, [x29, #-136]               ; 8-byte Folded Spill
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x27
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldp	x26, x22, [x29, #-136]          ; 16-byte Folded Reload
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x26]
	cmp	x22, x8
	b.ge	LBB0_42
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;       Child Loop BB0_12 Depth 3
                                        ;     Child Loop BB0_21 Depth 2
                                        ;       Child Loop BB0_25 Depth 3
                                        ;     Child Loop BB0_30 Depth 2
                                        ;     Child Loop BB0_36 Depth 2
                                        ;     Child Loop BB0_40 Depth 2
	ldr	x8, [x26, #8]
	ldr	x0, [x8, x22, lsl #3]
	bl	_VectorCopy
	cmp	w24, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	stur	x22, [x29, #-128]               ; 8-byte Folded Spill
	mov	w27, #0
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=2
	sub	sp, sp, #32
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Log_Print
	add	sp, sp, #32
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	cmp	w27, w24
	b.ge	LBB0_17
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_12 Depth 3
	add	w22, w27, #1
	sdiv	w8, w22, w24
	msub	w8, w8, w24, w22
	ldr	x0, [x21, w8, sxtw #3]
	sdiv	w8, w27, w24
	msub	w26, w8, w24, w27
	ldr	x1, [x21, w26, sxtw #3]
	bl	_VectorSubtract
	mov	x1, x19
	bl	_CrossProduct
	bl	_VectorNormalize
	bl	_VectorLength
	fmov	d1, x20
	fcmp	d0, d1
	b.pl	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	sub	w24, w24, #1
	cmp	w27, w24
	b.ge	LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	sxtw	x8, w24
	ldur	x9, [x29, #-112]                ; 8-byte Folded Reload
	add	x22, x9, w27, sxtw #3
	ldur	x9, [x29, #-120]                ; 8-byte Folded Reload
	add	x28, x9, w27, sxtw #2
	sub	x26, x8, w27, sxtw
LBB0_12:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldp	x1, x0, [x22, #-8]
	bl	_VectorCopy
	ldr	w8, [x28]
	stur	w8, [x28, #-4]
	add	x22, x22, #8
	add	x28, x28, #4
	subs	x26, x26, #1
	b.ne	LBB0_12
	b	LBB0_7
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=2
	sxtw	x8, w26
	ldr	x0, [x21, x8, lsl #3]
	bl	_DotProduct
	fmov	s8, s0
	bl	_DotProduct
	fsub	s0, s0, s8
	fcvt	d0, s0
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #49081, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.pl	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w8, [x23]
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=2
Lloh14:
	adrp	x8, _SIDE_FRONT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SIDE_FRONT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=2
	str	w8, [x25, w27, sxtw #2]
	mov	x27, x22
	b	LBB0_8
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w24, #1
	b.lt	LBB0_3
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w27, #0
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	b	LBB0_21
LBB0_19:                                ;   in Loop: Header=BB0_21 Depth=2
	mov	x8, x27
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=2
	mov	x27, x8
	cmp	w8, w24
	b.ge	LBB0_26
LBB0_21:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_25 Depth 3
	ldr	w9, [x25, w27, sxtw #2]
	ldr	w10, [x23]
	add	w8, w27, #1
	cmp	w9, w10
	b.ne	LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	sdiv	w10, w8, w24
	msub	w10, w10, w24, w8
	ldr	w11, [x25, w10, sxtw #2]
	cmp	w11, w9
	b.ne	LBB0_20
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=2
	sxtw	x8, w10
	sub	w24, w24, #1
	cmp	w8, w24
	b.ge	LBB0_19
; %bb.24:                               ;   in Loop: Header=BB0_21 Depth=2
	sxtw	x9, w24
	ldur	x10, [x29, #-112]               ; 8-byte Folded Reload
	add	x22, x10, x8, lsl #3
	sub	x26, x9, x8
	ldur	x9, [x29, #-120]                ; 8-byte Folded Reload
	add	x28, x9, x8, lsl #2
LBB0_25:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_21 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldp	x1, x0, [x22, #-8]
	bl	_VectorCopy
	ldr	w8, [x28]
	stur	w8, [x28, #-4]
	add	x22, x22, #8
	add	x28, x28, #4
	subs	x26, x26, #1
	b.ne	LBB0_25
	b	LBB0_19
LBB0_26:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w27, w24
	cmp	w24, #0
	b.le	LBB0_2
; %bb.27:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, #0
	mov	w8, #0
	sub	x28, x27, #1
	b	LBB0_30
LBB0_28:                                ;   in Loop: Header=BB0_30 Depth=2
	mov	w8, #1
LBB0_29:                                ;   in Loop: Header=BB0_30 Depth=2
	add	x22, x22, #1
	cmp	x27, x22
	b.eq	LBB0_34
LBB0_30:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [x25, x22, lsl #2]
Lloh17:
	adrp	x10, _SIDE_FRONT@GOTPAGE
Lloh18:
	ldr	x10, [x10, _SIDE_FRONT@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_29
; %bb.31:                               ;   in Loop: Header=BB0_30 Depth=2
	cmp	x28, x22
	csinc	x9, xzr, x22, eq
	ldr	w9, [x25, x9, lsl #2]
	ldr	w10, [x23]
	cmp	w9, w10
	b.ne	LBB0_29
; %bb.32:                               ;   in Loop: Header=BB0_30 Depth=2
	cbz	w8, LBB0_28
; %bb.33:                               ;   in Loop: Header=BB0_30 Depth=2
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Log_Print
	b	LBB0_28
LBB0_34:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, #0
Lloh22:
	adrp	x9, _SIDE_FRONT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SIDE_FRONT@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	ldr	w10, [x23]
	b	LBB0_36
LBB0_35:                                ;   in Loop: Header=BB0_36 Depth=2
	add	x8, x8, #1
	cmp	x27, x8
	b.eq	LBB0_2
LBB0_36:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x25, x8, lsl #2]
	cmp	w11, w9
	b.ne	LBB0_35
; %bb.37:                               ;   in Loop: Header=BB0_36 Depth=2
	cmp	x28, x8
	csinc	w22, wzr, w8, eq
	ldr	w11, [x25, w22, uxtw #2]
	cmp	w11, w10
	b.ne	LBB0_35
; %bb.38:                               ;   in Loop: Header=BB0_5 Depth=1
	sub	w8, w24, #1
	cmp	w8, w22
	b.le	LBB0_41
; %bb.39:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x24
	sxtw	x8, w8
	sub	x26, x8, #1
	sxtw	x27, w22
	mov	x28, x24
LBB0_40:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x21, x26, lsl #3]
	ldr	x1, [x21, w28, sxtw #3]
	bl	_VectorCopy
	sub	x26, x26, #1
	sub	w28, w28, #1
	cmp	x26, x27
	b.gt	LBB0_40
LBB0_41:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w24, w24, #1
	add	w8, w22, #1
	sdiv	w9, w8, w24
	msub	w8, w9, w24, w8
	ldr	x1, [x21, w8, uxtw #3]
	bl	_VectorCopy
	b	LBB0_3
LBB0_42:
	lsl	w22, w24, #3
LBB0_43:
	mov	x0, x24
	bl	_AllocWinding
	mov	x19, x0
	str	w24, [x0]
	ldr	x0, [x0, #8]
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	mov	x0, x19
	bl	_RemoveColinearPoints
	ldur	x8, [x29, #-104]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_45
; %bb.44:
	mov	x0, x19
	sub	sp, x29, #96
	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_45:
	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 AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_POINTS_ON_WINDING,4,2      ; @MAX_POINTS_ON_WINDING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MergeWindings: degenerate edge on winding %f %f %f\n"

	.comm	_SIDE_BACK,4,2                  ; @SIDE_BACK
	.comm	_SIDE_FRONT,4,2                 ; @SIDE_FRONT
l_.str.1:                               ; @.str.1
	.asciz	"Warning: MergeWindings: front to back found twice\n"

.subsections_via_symbols
