	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function legacy_tree_insert
_legacy_tree_insert:                    ## @legacy_tree_insert
	.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, %r14d
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %rbx
	cmpl	%r12d, (%rdi)
	jge	LBB0_8
## %bb.3:
	leaq	-48(%rbp), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_legacy_tree_less
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	leaq	(%rbx,%rcx,8), %r13
	addq	$8, %r13
	movq	8(%rbx,%rcx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpl	%r12d, (%rbx)
	jge	LBB0_8
LBB0_4:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_new_ltree_node
	movq	%rax, %r12
	movq	%rax, (%r13)
	leaq	16(%rax), %r13
	addq	$8, %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, (%r13)
	addq	$8, %rbx
	movq	%rbx, %r13
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_legacy_tree_less
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, (%r12)
	addq	$16, %rbx
	movq	%rbx, %r12
	jmp	LBB0_11
LBB0_1:
	leaq	-48(%rbp), %r13
LBB0_9:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%r14d, %edx
	callq	_new_ltree_node
	movq	%rax, %r12
	movq	%rax, (%r13)
	leaq	16(%rax), %r13
	addq	$8, %r12
LBB0_12:
	movq	$0, (%r12)
	movq	$0, (%r13)
	movq	-48(%rbp), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_legacy_tree_insert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function legacy_tree_insert
_legacy_tree_insert:                    ; @legacy_tree_insert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x22, x2
	mov	x20, x1
	str	x0, [sp, #8]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w8, [x0]
	cmp	w8, w22
	b.ge	LBB0_5
; %bb.2:
	add	x23, sp, #8
	b	LBB0_8
LBB0_3:
	add	x23, sp, #8
LBB0_4:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_new_ltree_node
	str	x0, [x23]
	add	x22, x0, #16
	add	x23, x0, #8
	b	LBB0_12
LBB0_5:
	mov	w24, #16
	mov	w25, #8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_legacy_tree_less
	add	x8, x21, #16
	add	x9, x21, #8
	cmp	x0, #0
	csel	x10, x25, x24, eq
	csel	x23, x9, x8, eq
	ldr	x21, [x21, x10]
	cbz	x21, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x21]
	cmp	w8, w22
	b.ge	LBB0_6
LBB0_8:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x19
	bl	_new_ltree_node
	str	x0, [x23]
	add	x22, x0, #16
	add	x23, x0, #8
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	str	x21, [x22]
	add	x8, x21, #8
	mov	x22, x8
	ldr	x21, [x8]
	cbz	x21, LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_legacy_tree_less
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	str	x21, [x23]
	add	x8, x21, #16
	mov	x23, x8
	ldr	x21, [x8]
	cbnz	x21, LBB0_10
LBB0_12:
	str	xzr, [x23]
	str	xzr, [x22]
	ldr	x0, [sp, #8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_legacy_tree_insert
.subsections_via_symbols
