	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CM_FindPlane2                  ## -- Begin function CM_FindPlane2
	.p2align	4, 0x90
_CM_FindPlane2:                         ## @CM_FindPlane2
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_numPlanes@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	xorl	%ebx, %ebx
	movq	_planes@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_CM_PlaneEqual
	testq	%rax, %rax
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	movq	_numPlanes@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$8, %rbx
	cmpq	%rax, %r13
	jl	LBB0_2
LBB0_4:
	movq	_MAX_PATCH_PLANES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_6
## %bb.5:
	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_6:
	movq	_planes@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rcx
	cltq
	movl	4(%rcx,%rax,8), %esi
	movq	%r15, %rdi
	callq	_Vector4Copy
	movq	%r15, %rdi
	callq	_CM_SignbitsForNormal
	movq	(%rbx), %rcx
	movq	_numPlanes@GOTPCREL(%rip), %rsi
	movslq	(%rsi), %rdx
	movl	%eax, (%rcx,%rdx,8)
	incl	(%rsi)
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movl	(%rsi), %r13d
	decl	%r13d
LBB0_7:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_numPlanes,4,2                  ## @numPlanes
	.comm	_planes,8,3                     ## @planes
	.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"

	.comm	_qfalse,4,2                     ## @qfalse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CM_FindPlane2                  ; -- Begin function CM_FindPlane2
	.p2align	2
_CM_FindPlane2:                         ; @CM_FindPlane2
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _numPlanes@GOTPAGE
Lloh1:
	ldr	x22, [x22, _numPlanes@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh2:
	adrp	x23, _planes@GOTPAGE
Lloh3:
	ldr	x23, [x23, _planes@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x24, #0
	mov	x21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x0, x8, x24
	mov	x1, x20
	mov	x2, x19
	bl	_CM_PlaneEqual
	cbnz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x22]
	add	x24, x24, #8
	cmp	x21, x8
	b.lt	LBB0_2
LBB0_4:
Lloh4:
	adrp	x9, _MAX_PATCH_PLANES@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MAX_PATCH_PLANES@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.5:
Lloh7:
	adrp	x8, _ERR_DROP@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERR_DROP@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	bl	_Com_Error
	ldr	w8, [x22]
LBB0_6:
	ldr	x9, [x23]
	add	x8, x9, w8, sxtw #3
	ldr	w1, [x8, #4]
	mov	x0, x20
	bl	_Vector4Copy
	mov	x0, x20
	bl	_CM_SignbitsForNormal
	ldr	x8, [x23]
	ldrsw	x9, [x22]
	lsl	x9, x9, #3
	str	w0, [x8, x9]
	ldr	w8, [x22]
	add	w8, w8, #1
	str	w8, [x22]
Lloh12:
	adrp	x8, _qfalse@GOTPAGE
Lloh13:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w8, [x22]
	sub	w21, w8, #1
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_numPlanes,4,2                  ; @numPlanes
	.comm	_planes,8,3                     ; @planes
	.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"

	.comm	_qfalse,4,2                     ; @qfalse
.subsections_via_symbols
