	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_item                     ## -- Begin function alloc_item
	.p2align	4, 0x90
_alloc_item:                            ## @alloc_item
	.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	%ecx, %r15d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movl	%edi, %r12d
	leal	1(%r15), %eax
	xorl	%edi, %edi
	cmpl	$2, %eax
	setb	%dil
	callq	_assert
	movl	$40, %edi
	callq	_zzmalloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	_items_memory@GOTPCREL(%rip), %r14
	addl	$40, (%r14)
	movl	%r12d, (%rbx)
	shll	$2, %r12d
	movl	%r12d, %edi
	callq	_zzmalloc
	movq	%rax, 32(%rbx)
	movq	%rax, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	addl	%r12d, (%r14)
	movl	%r15d, 4(%rbx)
	movq	$0, 24(%rbx)
	movq	_items_count@GOTPCREL(%rip), %r14
	incq	(%r14)
	movl	$-1, 8(%rbx)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 12(%rbx)
	xorl	%eax, %eax
	callq	_lrand48
	movl	%eax, 16(%rbx)
	movq	_item_tree@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_tree_insert
	movq	%rax, (%r15)
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	sete	%dil
	callq	_assert
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_items_memory,4,2               ## @items_memory
	.comm	_items_count,8,3                ## @items_count
	.comm	_item_tree,8,3                  ## @item_tree
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_alloc_item                     ; -- Begin function alloc_item
	.p2align	2
_alloc_item:                            ; @alloc_item
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	add	w8, w3, #1
	cmp	w8, #2
	cset	w0, lo
	bl	_assert
	mov	w0, #40
	bl	_zzmalloc
	mov	x19, x0
	mov	w1, #0
	mov	w2, #40
	bl	_memset
Lloh0:
	adrp	x24, _items_memory@GOTPAGE
Lloh1:
	ldr	x24, [x24, _items_memory@GOTPAGEOFF]
	ldr	w8, [x24]
	add	w8, w8, #40
	str	w8, [x24]
	str	w23, [x19]
	lsl	w23, w23, #2
	mov	x0, x23
	bl	_zzmalloc
	str	x0, [x19, #32]
	mov	x1, x22
	mov	x2, x23
	bl	_memcpy
	ldr	w8, [x24]
	add	w8, w8, w23
	str	w8, [x24]
	str	xzr, [x19, #24]
Lloh2:
	adrp	x22, _items_count@GOTPAGE
Lloh3:
	ldr	x22, [x22, _items_count@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x8, x8, #1
	str	x8, [x22]
	mov	w8, #-1
	stp	w20, w8, [x19, #4]
	str	w21, [x19, #12]
	bl	_lrand48
	str	w0, [x19, #16]
Lloh4:
	adrp	x20, _item_tree@GOTPAGE
Lloh5:
	ldr	x20, [x20, _item_tree@GOTPAGEOFF]
	ldr	x0, [x20]
	mov	x1, x19
	bl	_tree_insert
	str	x0, [x20]
	ldr	x8, [x0]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_items_memory,4,2               ; @items_memory
	.comm	_items_count,8,3                ; @items_count
	.comm	_item_tree,8,3                  ; @item_tree
.subsections_via_symbols
