	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function CM_FindPlane
LCPI0_0:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_CM_FindPlane:                          ## @CM_FindPlane
	.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	%rdx, %rcx
	movq	%rsi, %rdx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-64(%rbp), %rdi
	movq	%r12, %rsi
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	callq	_CM_PlaneFromPoints
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_numPlanes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.3:
	xorl	%r15d, %r15d
	movq	_planes@GOTPCREL(%rip), %r14
	movq	_PLANE_TRI_EPSILON@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movq	_numPlanes@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$16, %r15
	cmpq	%rax, %rbx
	jge	LBB0_12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r15), %rsi
	leaq	-64(%rbp), %rdi
	callq	_DotProduct
	testq	%rax, %rax
	js	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r15), %rsi
	movq	%r12, %rdi
	callq	_DotProduct
	movq	(%r14), %rcx
	movq	(%rcx,%r15), %rsi
	subq	24(%rsi), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movss	(%r13), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	xorps	LCPI0_0(%rip), %xmm2
	ucomiss	%xmm0, %xmm2
	ja	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	ucomiss	%xmm1, %xmm0
	ja	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_DotProduct
	movq	(%r14), %rcx
	movq	(%rcx,%r15), %rsi
	subq	24(%rsi), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movss	(%r13), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	xorps	LCPI0_0(%rip), %xmm2
	ucomiss	%xmm0, %xmm2
	ja	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	ucomiss	%xmm1, %xmm0
	ja	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_DotProduct
	movq	(%r14), %rcx
	movq	(%rcx,%r15), %rcx
	subq	24(%rcx), %rax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%rax, %xmm0
	movss	(%r13), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	xorps	LCPI0_0(%rip), %xmm2
	ucomiss	%xmm0, %xmm2
	ja	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	ucomiss	%xmm1, %xmm0
	ja	LBB0_11
	jmp	LBB0_15
LBB0_12:
	movq	_MAX_PATCH_PLANES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.13:
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_Com_Error
	movq	_numPlanes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_14:
	movq	_planes@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	cltq
	shlq	$4, %rax
	movq	(%rcx,%rax), %rsi
	leaq	-64(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_Vector4Copy
	movq	%rbx, %rdi
	callq	_CM_SignbitsForNormal
	movq	(%r14), %rcx
	movq	_numPlanes@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %rdx
	shlq	$4, %rdx
	movl	%eax, 8(%rcx,%rdx)
	movl	(%rsi), %ebx
	leal	1(%rbx), %eax
	movl	%eax, (%rsi)
	jmp	LBB0_15
LBB0_1:
	movl	$-1, %ebx
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_numPlanes,4,2                  ## @numPlanes
	.comm	_planes,8,3                     ## @planes
	.comm	_PLANE_TRI_EPSILON,4,2          ## @PLANE_TRI_EPSILON
	.comm	_MAX_PATCH_PLANES,4,2           ## @MAX_PATCH_PLANES
	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_PATCH_PLANES"

	.no_dead_strip	_CM_FindPlane
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CM_FindPlane
_CM_FindPlane:                          ; @CM_FindPlane
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	add	x0, sp, #8
	mov	x1, x22
	mov	x2, x21
	mov	x3, x19
	bl	_CM_PlaneFromPoints
	cbz	w0, LBB0_8
; %bb.1:
Lloh3:
	adrp	x23, _numPlanes@GOTPAGE
Lloh4:
	ldr	x23, [x23, _numPlanes@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh5:
	adrp	x24, _planes@GOTPAGE
Lloh6:
	ldr	x24, [x24, _planes@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x25, #0
	mov	x20, #0
Lloh7:
	adrp	x26, _PLANE_TRI_EPSILON@GOTPAGE
Lloh8:
	ldr	x26, [x26, _PLANE_TRI_EPSILON@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	ldrsw	x8, [x23]
	add	x25, x25, #16
	cmp	x20, x8
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x1, [x8, x25]
	add	x0, sp, #8
	bl	_DotProduct
	tbnz	x0, #63, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x24]
	ldr	x1, [x8, x25]
	mov	x0, x22
	bl	_DotProduct
	ldr	x8, [x24]
	ldr	x1, [x8, x25]
	ldr	x8, [x1, #24]
	sub	x8, x0, x8
	scvtf	s0, x8
	ldr	s1, [x26]
	fneg	s2, s1
	fcmp	s0, s2
	fccmp	s1, s0, #8, pl
	b.mi	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	bl	_DotProduct
	ldr	x8, [x24]
	ldr	x1, [x8, x25]
	ldr	x8, [x1, #24]
	sub	x8, x0, x8
	scvtf	s0, x8
	ldr	s1, [x26]
	fneg	s2, s1
	fcmp	s0, s2
	fccmp	s1, s0, #8, pl
	b.mi	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_DotProduct
	ldr	x8, [x24]
	ldr	x8, [x8, x25]
	ldr	x8, [x8, #24]
	sub	x8, x0, x8
	scvtf	s0, x8
	ldr	s1, [x26]
	fneg	s2, s1
	fcmp	s0, s2
	fccmp	s1, s0, #8, pl
	b.mi	LBB0_3
	b	LBB0_13
LBB0_8:
	mov	w20, #-1
	b	LBB0_13
LBB0_9:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
LBB0_10:
Lloh9:
	adrp	x9, _MAX_PATCH_PLANES@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAX_PATCH_PLANES@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.11:
Lloh12:
	adrp	x8, _ERR_DROP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERR_DROP@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
	ldr	w8, [x23]
LBB0_12:
	ldr	x9, [x24]
	sbfiz	x8, x8, #4, #32
	ldr	x1, [x9, x8]
	add	x0, sp, #8
	bl	_Vector4Copy
	add	x0, sp, #8
	bl	_CM_SignbitsForNormal
	ldr	x8, [x24]
	ldrsw	x9, [x23]
	add	x8, x8, x9, lsl #4
	str	w0, [x8, #8]
	ldr	w20, [x23]
	add	w8, w20, #1
	str	w8, [x23]
LBB0_13:
	ldr	x8, [sp, #24]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x20
	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
	add	sp, sp, #112
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_numPlanes,4,2                  ; @numPlanes
	.comm	_planes,8,3                     ; @planes
	.comm	_PLANE_TRI_EPSILON,4,2          ; @PLANE_TRI_EPSILON
	.comm	_MAX_PATCH_PLANES,4,2           ; @MAX_PATCH_PLANES
	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_PATCH_PLANES"

	.no_dead_strip	_CM_FindPlane
.subsections_via_symbols
