	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function HL_FaceOnWinding
LCPI0_0:
	.quad	0x3feccccccccccccd              ## double 0.90000000000000002
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_HL_FaceOnWinding
	.p2align	4, 0x90
_HL_FaceOnWinding:                      ## @HL_FaceOnWinding
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_CopyWinding
	movq	%rax, %rbx
	movq	%rax, -64(%rbp)
	movq	_hl_dplanes@GOTPCREL(%rip), %rax
	movq	(%r14), %rsi
	shlq	$2, %rsi
	addq	(%rax), %rsi
	leaq	-72(%rbp), %rdi
	movl	$8, %edx
	callq	_memcpy
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	cmpq	$0, 16(%r14)
	je	LBB0_2
## %bb.1:
	movl	-72(%rbp), %edi
	movl	%edi, %esi
	callq	_VectorNegate
	negl	-68(%rbp)
LBB0_2:
	testq	%rbx, %rbx
	setne	%al
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	$0, 8(%rcx)
	jle	LBB0_7
## %bb.3:
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.4:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_hl_dsurfedges@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movslq	12(%rcx), %rcx
	addq	%r13, %rcx
	movl	(%rax,%rcx,4), %r15d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	testl	%r15d, %r15d
	setle	%r14b
	setg	%bl
	movq	_hl_dvertexes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_hl_dedges@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	%r15d, %edi
	callq	_abs
	movq	(%r12,%rax,8), %rax
	movq	(%rax,%rbx,8), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %r12
	movq	_hl_dvertexes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_hl_dedges@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	%r15d, %edi
	callq	_abs
	movq	(%rbx,%rax,8), %rax
	movq	(%rax,%r14,8), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rsi
	movq	%r12, %rdi
	callq	_VectorSubtract
	movl	-72(%rbp), %esi
	callq	_CrossProduct
	callq	_VectorNormalize
	movq	%r12, %rsi
	callq	_DotProduct
	leaq	-64(%rbp), %rdi
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	callq	_ChopWindingInPlace
	incq	%r13
	movq	-64(%rbp), %rbx
	testq	%rbx, %rbx
	setne	%al
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	8(%rcx), %r13d
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testq	%rbx, %rbx
	jne	LBB0_5
LBB0_7:
	xorps	%xmm0, %xmm0
	testb	%al, %al
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_WindingArea
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movq	-64(%rbp), %rdi
	callq	_FreeWinding
	movss	-48(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_hl_dplanes,8,3                 ## @hl_dplanes
	.comm	_hl_dsurfedges,8,3              ## @hl_dsurfedges
	.comm	_hl_dvertexes,8,3               ## @hl_dvertexes
	.comm	_hl_dedges,8,3                  ## @hl_dedges
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HL_FaceOnWinding               ; -- Begin function HL_FaceOnWinding
	.p2align	2
_HL_FaceOnWinding:                      ; @HL_FaceOnWinding
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x0
	mov	x0, x1
	bl	_CopyWinding
	mov	x20, x0
	str	x0, [sp]
Lloh0:
	adrp	x8, _hl_dplanes@GOTPAGE
Lloh1:
	ldr	x8, [x8, _hl_dplanes@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x19]
	add	x1, x8, x9, lsl #2
	add	x0, sp, #8
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w0, [sp, #8]
	mov	x1, x0
	bl	_VectorNegate
	ldr	w8, [sp, #12]
	neg	w8, w8
	str	w8, [sp, #12]
LBB0_2:
	ldr	w9, [x19, #8]
	cmp	x20, #0
	cset	w8, ne
	cmp	w9, #1
	ccmp	x20, #0, #4, ge
	b.eq	LBB0_6
; %bb.3:
	mov	x22, #0
Lloh3:
	adrp	x24, _hl_dvertexes@GOTPAGE
Lloh4:
	ldr	x24, [x24, _hl_dvertexes@GOTPAGEOFF]
	mov	x25, #-3689348814741910324
	movk	x25, #52429
	movk	x25, #16364, lsl #48
Lloh5:
	adrp	x26, _hl_dedges@GOTPAGE
Lloh6:
	ldr	x26, [x26, _hl_dedges@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
Lloh7:
	adrp	x8, _hl_dsurfedges@GOTPAGE
Lloh8:
	ldr	x8, [x8, _hl_dsurfedges@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	ldrsw	x9, [x19, #12]
	add	x9, x22, x9
	ldr	w20, [x8, x9, lsl #2]
	cmp	w20, #1
	cset	w27, lt
	cmp	w20, #0
	cset	w21, gt
	ldr	x28, [x24]
	ldr	x23, [x26]
	mov	x0, x20
	bl	_abs
	ldr	x8, [x23, x0, lsl #3]
	ldr	x8, [x8, w21, uxtw #3]
	ldr	x21, [x28, x8, lsl #3]
	ldr	x23, [x24]
	ldr	x28, [x26]
	mov	x0, x20
	bl	_abs
	ldr	x8, [x28, x0, lsl #3]
	ldr	x8, [x8, w27, uxtw #3]
	ldr	x1, [x23, x8, lsl #3]
	mov	x0, x21
	bl	_VectorSubtract
	ldr	w1, [sp, #8]
	bl	_CrossProduct
	bl	_VectorNormalize
	mov	x1, x21
	bl	_DotProduct
	fmov	d1, x25
	mov	x0, sp
	bl	_ChopWindingInPlace
	add	x22, x22, #1
	ldr	w9, [x19, #8]
	ldr	x20, [sp]
	cmp	x20, #0
	cset	w8, ne
	cmp	w22, w9
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	x20, LBB0_4
LBB0_6:
	movi	d8, #0000000000000000
	cbz	w8, LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_WindingArea
	fmov	s8, s0
	ldr	x0, [sp]
	bl	_FreeWinding
LBB0_8:
	fmov	s0, s8
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_hl_dplanes,8,3                 ; @hl_dplanes
	.comm	_hl_dsurfedges,8,3              ; @hl_dsurfedges
	.comm	_hl_dvertexes,8,3               ; @hl_dvertexes
	.comm	_hl_dedges,8,3                  ; @hl_dedges
.subsections_via_symbols
