	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InitLevelItemHeap              ## -- Begin function InitLevelItemHeap
	.p2align	4, 0x90
_InitLevelItemHeap:                     ## @InitLevelItemHeap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_levelitemheap@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_FreeMemory
LBB0_2:
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_LibVarValue
	movq	%rax, %r14
	leal	(,%rax,8), %edi
	callq	_GetClearedMemory
	movq	%rax, (%rbx)
	leal	-1(%r14), %r8d
	cmpl	$2, %r14d
	jl	LBB0_10
## %bb.3:
	movl	%r8d, %r9d
	leaq	-1(%r9), %rcx
	movl	%r9d, %edx
	andl	$3, %edx
	cmpq	$3, %rcx
	jae	LBB0_5
## %bb.4:
	xorl	%edi, %edi
	jmp	LBB0_7
LBB0_5:
	andl	$-4, %r9d
	movl	$16, %ecx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rax,%rcx), %rsi
	addq	$-8, %rsi
	movq	%rsi, -16(%rax,%rcx)
	movq	(%rbx), %rax
	leaq	(%rax,%rcx), %rsi
	movq	%rsi, -8(%rax,%rcx)
	movq	(%rbx), %rax
	leaq	(%rax,%rcx), %rsi
	addq	$8, %rsi
	movq	%rsi, (%rax,%rcx)
	movq	(%rbx), %rax
	addq	$4, %rdi
	leaq	(%rax,%rcx), %rsi
	addq	$16, %rsi
	movq	%rsi, 8(%rax,%rcx)
	movq	(%rbx), %rax
	addq	$32, %rcx
	cmpq	%rdi, %r9
	jne	LBB0_6
LBB0_7:
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.8:
	leaq	8(,%rdi,8), %rcx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rax,%rcx), %rsi
	movq	%rsi, -8(%rax,%rcx)
	movq	(%rbx), %rax
	addq	$8, %rcx
	decq	%rdx
	jne	LBB0_9
LBB0_10:
	movslq	%r8d, %rcx
	movq	$0, (%rax,%rcx,8)
	movq	(%rbx), %rax
	movq	_freelevelitems@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_levelitemheap,8,3              ## @levelitemheap
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"max_levelitems"

L_.str.1:                               ## @.str.1
	.asciz	"256"

	.comm	_freelevelitems,8,3             ## @freelevelitems
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_InitLevelItemHeap              ; -- Begin function InitLevelItemHeap
	.p2align	2
_InitLevelItemHeap:                     ; @InitLevelItemHeap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x20, _levelitemheap@GOTPAGE
Lloh1:
	ldr	x20, [x20, _levelitemheap@GOTPAGEOFF]
	ldr	x0, [x20]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_FreeMemory
LBB0_2:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_LibVarValue
	mov	x19, x0
	lsl	w0, w19, #3
	bl	_GetClearedMemory
	str	x0, [x20]
	sub	w8, w19, #1
	cmp	w19, #2
	b.lt	LBB0_5
; %bb.3:
	mov	x9, #0
	mov	x10, x8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x11, x0, x9
	add	x12, x11, #8
	str	x12, [x11]
	ldr	x0, [x20]
	add	x9, x9, #8
	subs	x10, x10, #1
	b.ne	LBB0_4
LBB0_5:
	str	xzr, [x0, w8, sxtw #3]
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _freelevelitems@GOTPAGE
Lloh7:
	ldr	x9, [x9, _freelevelitems@GOTPAGEOFF]
Lloh8:
	str	x8, [x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_levelitemheap,8,3              ; @levelitemheap
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"max_levelitems"

l_.str.1:                               ; @.str.1
	.asciz	"256"

	.comm	_freelevelitems,8,3             ; @freelevelitems
.subsections_via_symbols
