	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FindFloatPlane                 ## -- Begin function FindFloatPlane
	.p2align	4, 0x90
_FindFloatPlane:                        ## @FindFloatPlane
	.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
	movl	%edi, %r14d
	movl	%esi, -44(%rbp)
	leaq	-44(%rbp), %rsi
	callq	_SnapPlane
	movl	-44(%rbp), %edi
	callq	_fabs
	leal	7(%rax), %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	sarl	$3, %r15d
	movq	_PLANE_HASHES@GOTPCREL(%rip), %r12
	movslq	(%r12), %rax
	decq	%rax
	andl	%eax, %r15d
	movslq	%r15d, %rdx
	decq	%rdx
	andq	%rax, %rdx
	movq	_planehash@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movq	(%rcx,%rdx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_5
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_PlaneEqual
	testq	%rax, %rax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_1
## %bb.4:
	movl	(%r12), %eax
	movq	(%r13), %rcx
	decl	%eax
LBB0_5:
	movl	%eax, %edx
	andl	%r15d, %edx
	movslq	%edx, %rdx
	movq	(%rcx,%rdx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_PlaneEqual
	testq	%rax, %rax
	jne	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.8:
	movl	(%r12), %eax
	movq	(%r13), %rcx
	decl	%eax
LBB0_9:
	incl	%r15d
	andl	%eax, %r15d
	movslq	%r15d, %rax
	movq	(%rcx,%rax,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	-44(%rbp), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_PlaneEqual
	testq	%rax, %rax
	jne	LBB0_2
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_11
LBB0_13:
	movl	-44(%rbp), %esi
	movl	%r14d, %edi
	callq	_CreateNewFloatPlane
	movl	%eax, %ebx
	movq	_mapplaneusers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	incl	(%rax,%rcx,4)
	jmp	LBB0_14
LBB0_2:
	movq	_mapplaneusers@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_mapplanes@GOTPCREL(%rip), %rcx
	subq	(%rcx), %rbx
	movq	%rbx, %rcx
	sarq	%rcx
	incl	(%rax,%rcx)
	shrq	$3, %rbx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANE_HASHES,4,2               ## @PLANE_HASHES
	.comm	_planehash,8,3                  ## @planehash
	.comm	_mapplaneusers,8,3              ## @mapplaneusers
	.comm	_mapplanes,8,3                  ## @mapplanes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FindFloatPlane                 ; -- Begin function FindFloatPlane
	.p2align	2
_FindFloatPlane:                        ; @FindFloatPlane
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	str	w1, [sp, #12]
	add	x1, sp, #12
	bl	_SnapPlane
	ldr	w0, [sp, #12]
	bl	_fabs
	add	w8, w0, #7
	cmp	w0, #0
	csel	w9, w8, w0, lt
Lloh0:
	adrp	x22, _PLANE_HASHES@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PLANE_HASHES@GOTPAGEOFF]
	ldr	w8, [x22]
	sub	w8, w8, #1
	and	w21, w8, w9, asr #3
	sub	w9, w21, #1
	and	w10, w8, w9
Lloh2:
	adrp	x23, _planehash@GOTPAGE
Lloh3:
	ldr	x23, [x23, _planehash@GOTPAGEOFF]
	ldr	x9, [x23]
	ldr	x20, [x9, w10, sxtw #3]
	cbz	x20, LBB0_4
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [sp, #12]
	mov	x0, x20
	mov	x1, x19
	bl	_PlaneEqual
	cbnz	x0, LBB0_12
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x20, [x20]
	cbnz	x20, LBB0_1
; %bb.3:
	ldr	w8, [x22]
	ldr	x9, [x23]
	sub	w8, w8, #1
LBB0_4:
	and	w10, w8, w21
	ldr	x20, [x9, w10, sxtw #3]
	cbz	x20, LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [sp, #12]
	mov	x0, x20
	mov	x1, x19
	bl	_PlaneEqual
	cbnz	x0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x20, [x20]
	cbnz	x20, LBB0_5
; %bb.7:
	ldr	w8, [x22]
	ldr	x9, [x23]
	sub	w8, w8, #1
LBB0_8:
	add	w10, w21, #1
	and	w8, w8, w10
	ldr	x20, [x9, w8, sxtw #3]
	cbz	x20, LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [sp, #12]
	mov	x0, x20
	mov	x1, x19
	bl	_PlaneEqual
	cbnz	x0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x20, [x20]
	cbnz	x20, LBB0_9
LBB0_11:
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_CreateNewFloatPlane
                                        ; kill: def $w0 killed $w0 def $x0
Lloh4:
	adrp	x8, _mapplaneusers@GOTPAGE
Lloh5:
	ldr	x8, [x8, _mapplaneusers@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	sbfiz	x9, x0, #2, #32
	ldr	w10, [x8, x9]
	add	w10, w10, #1
	str	w10, [x8, x9]
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	b	LBB0_13
LBB0_12:
Lloh7:
	adrp	x8, _mapplaneusers@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mapplaneusers@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _mapplanes@GOTPAGE
Lloh11:
	ldr	x9, [x9, _mapplanes@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	sub	x9, x20, x9
	asr	x10, x9, #1
	ldr	w11, [x8, x10]
	add	w11, w11, #1
	str	w11, [x8, x10]
	lsr	x0, x9, #3
LBB0_13:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANE_HASHES,4,2               ; @PLANE_HASHES
	.comm	_planehash,8,3                  ; @planehash
	.comm	_mapplaneusers,8,3              ; @mapplaneusers
	.comm	_mapplanes,8,3                  ; @mapplanes
.subsections_via_symbols
