	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NumberLeafs_r                  ## -- Begin function NumberLeafs_r
	.p2align	4, 0x90
_NumberLeafs_r:                         ## @NumberLeafs_r
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	_PLANENUM_LEAF@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 32(%r14)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$-99, 8(%r14)
	movq	24(%r14), %rax
	movq	(%rax), %rdi
	callq	_NumberLeafs_r
	movq	24(%r14), %rax
	movq	8(%rax), %r14
	movq	(%r14), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_2
LBB0_4:
	movq	_CONTENTS_SOLID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 12(%r14)
	je	LBB0_6
## %bb.5:
	movl	$-1, 8(%r14)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_num_visclusters@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_FillLeafNumbers_r
	incl	(%rbx)
	movq	16(%r14), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.7:
	movq	_num_visportals@GOTPCREL(%rip), %r15
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%rbx), %rax
	addq	$8, %rax
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	%rbx, %rdi
	callq	_Portal_VisFlood
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	incl	(%r15)
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	(%rbx), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_PLANENUM_LEAF,8,3              ## @PLANENUM_LEAF
	.comm	_CONTENTS_SOLID,4,2             ## @CONTENTS_SOLID
	.comm	_num_visclusters,4,2            ## @num_visclusters
	.comm	_num_visportals,4,2             ## @num_visportals
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_NumberLeafs_r                  ; -- Begin function NumberLeafs_r
	.p2align	2
_NumberLeafs_r:                         ; @NumberLeafs_r
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x20, _PLANENUM_LEAF@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PLANENUM_LEAF@GOTPAGEOFF]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_4
; %bb.1:
	mov	w21, #-99
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19, #32]
	cbnz	w8, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w21, [x19, #8]
	ldr	x8, [x19, #24]
	ldr	x0, [x8]
	bl	_NumberLeafs_r
	ldr	x8, [x19, #24]
	ldr	x19, [x8, #8]
	ldr	x8, [x19]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_4:
	ldr	w8, [x19, #12]
Lloh2:
	adrp	x9, _CONTENTS_SOLID@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CONTENTS_SOLID@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.5:
	mov	w8, #-1
	str	w8, [x19, #8]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh5:
	adrp	x20, _num_visclusters@GOTPAGE
Lloh6:
	ldr	x20, [x20, _num_visclusters@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_FillLeafNumbers_r
	ldr	w8, [x20]
	add	w8, w8, #1
	str	w8, [x20]
	ldr	x20, [x19, #16]
	cbz	x20, LBB0_6
; %bb.8:
Lloh7:
	adrp	x21, _num_visportals@GOTPAGE
Lloh8:
	ldr	x21, [x21, _num_visportals@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x20]
	add	x8, x8, #8
	ldr	x20, [x8]
	cbz	x20, LBB0_6
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cmp	x8, x19
	b.ne	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x20
	bl	_Portal_VisFlood
	cbz	x0, LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
LBB0_13:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x20]
	ldr	x20, [x8]
	cbnz	x20, LBB0_10
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PLANENUM_LEAF,8,3              ; @PLANENUM_LEAF
	.comm	_CONTENTS_SOLID,4,2             ; @CONTENTS_SOLID
	.comm	_num_visclusters,4,2            ; @num_visclusters
	.comm	_num_visportals,4,2             ; @num_visportals
.subsections_via_symbols
