	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function index_tree_append
_index_tree_append:                     ## @index_tree_append
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movq	%rax, 16(%rsi)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rsi)
	incq	(%rdi)
	cmpq	$0, 8(%rdi)
	je	LBB0_1
## %bb.2:
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setle	%dil
	callq	_assert
	movq	16(%r14), %rax
	movq	8(%rax), %rax
	xorl	%edi, %edi
	cmpq	8(%rbx), %rax
	setl	%dil
	callq	_assert
	movq	16(%r14), %rax
	movq	%rbx, 32(%rax)
	movq	%rbx, 16(%r14)
	movq	(%r14), %r12
	movl	$1, %edi
	callq	_UINT32_C
	movq	%rax, %r15
	movq	(%r14), %rdi
	callq	_bsr32
	movl	%eax, %ecx
	shlq	%cl, %r15
	cmpq	%r15, %r12
	je	LBB0_11
## %bb.3:
	movq	(%r14), %rdi
	addq	$8, %r14
	callq	_ctz32
	addq	$3, %rax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rbx
	decq	%rax
	cmpq	$1, %rax
	jg	LBB0_4
## %bb.5:
	movq	16(%rbx), %rax
	movq	32(%rbx), %r15
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	xorl	%edi, %edi
	cmpq	%rbx, 32(%rax)
	sete	%dil
	callq	_assert
	movq	16(%rbx), %rax
	leaq	32(%rax), %r14
	jmp	LBB0_8
LBB0_1:
	movq	%rbx, 8(%r14)
	movq	%rbx, 24(%r14)
	movq	%rbx, 16(%r14)
	jmp	LBB0_11
LBB0_6:
	xorl	%eax, %eax
LBB0_8:
	movq	%r15, (%r14)
	movq	%rax, 16(%r15)
	movq	24(%r15), %rax
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%rbx, 16(%rax)
LBB0_10:
	movq	%rbx, 24(%r15)
	movq	%r15, 16(%rbx)
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_index_tree_append
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function index_tree_append
_index_tree_append:                     ; @index_tree_append
	.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
	ldr	x8, [x0, #16]
	stp	xzr, xzr, [x1, #24]
	str	x8, [x1, #16]
	ldr	x9, [x0]
	add	x9, x9, #1
	str	x9, [x0]
	mov	x22, x0
	ldr	x9, [x22, #8]!
	cbz	x9, LBB0_9
; %bb.1:
	ldr	x8, [x8]
	ldr	x9, [x19]
	cmp	x8, x9
	cset	w0, le
	bl	_assert
	ldr	x8, [x20, #16]
	ldr	x8, [x8, #8]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	cset	w0, lt
	bl	_assert
	ldr	x8, [x20, #16]
	str	x19, [x8, #32]
	str	x19, [x20, #16]
	ldr	x23, [x20]
	mov	w0, #1
	bl	_UINT32_C
	mov	x21, x0
	ldr	x0, [x20]
	bl	_bsr32
	lsl	x8, x21, x0
	cmp	x23, x8
	b.eq	LBB0_10
; %bb.2:
	ldr	x0, [x20]
	bl	_ctz32
	add	x8, x0, #3
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x19, [x19, #16]
	sub	x8, x8, #1
	cmp	x8, #1
	b.gt	LBB0_3
; %bb.4:
	ldr	x20, [x19, #32]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x8, [x8, #32]
	cmp	x8, x19
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #16]
	add	x22, x8, #32
LBB0_6:
	str	x20, [x22]
	str	x8, [x20, #16]
	ldr	x8, [x20, #24]
	str	x8, [x19, #32]
	cbz	x8, LBB0_8
; %bb.7:
	str	x19, [x8, #16]
LBB0_8:
	str	x19, [x20, #24]
	str	x20, [x19, #16]
	b	LBB0_10
LBB0_9:
	stp	x19, x19, [x20, #16]
	str	x19, [x20, #8]
LBB0_10:
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_index_tree_append
.subsections_via_symbols
