	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function legacy_tree_delete
_legacy_tree_delete:                    ## @legacy_tree_delete
	.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
	movq	%rdi, -48(%rbp)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	callq	_legacy_tree_equal
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	leaq	-48(%rbp), %r13
	movq	%r14, %rbx
	jmp	LBB0_4
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_9:
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_legacy_tree_less
	leaq	8(%rbx), %r13
	leaq	16(%rbx), %rcx
	xorl	%edx, %edx
	testq	%rax, %rax
	sete	%dl
	cmoveq	%rcx, %r13
	movq	8(%rbx,%rdx,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.10:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_legacy_tree_equal
	testl	%eax, %eax
	je	LBB0_11
LBB0_4:
	movq	8(%rbx), %r14
	movq	16(%rbx), %r15
	movq	%rbx, %rdi
	callq	_free_ltree_node
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, (%r13)
	movq	8(%r15), %rax
	addq	$8, %r15
	movq	%r15, %r13
	movq	%rax, %r15
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	testq	%r14, %r14
	setne	%al
	je	LBB0_13
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testq	%r15, %r15
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r14), %rax
	cmpq	(%r15), %rax
	jle	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, (%r13)
	movq	16(%r14), %rax
	addq	$16, %r14
	movq	%r14, %r13
	movq	%rax, %r14
	jmp	LBB0_5
LBB0_13:
	testb	%al, %al
	cmoveq	%r15, %r14
	movq	%r14, (%r13)
	movq	-48(%rbp), %r14
LBB0_14:
	movq	%r14, %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_delete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function legacy_tree_delete
_legacy_tree_delete:                    ; @legacy_tree_delete
	.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, x0
	str	x0, [sp, #8]
	cbz	x0, LBB0_15
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x0, x19
	bl	_legacy_tree_equal
	cbz	w0, LBB0_3
; %bb.2:
	add	x23, sp, #8
	b	LBB0_7
LBB0_3:
	mov	w24, #8
	mov	w25, #16
	mov	x22, x19
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_legacy_tree_less
	add	x8, x22, #8
	add	x9, x22, #16
	cmp	x0, #0
	csel	x10, x25, x24, eq
	csel	x23, x9, x8, eq
	ldr	x22, [x22, x10]
	cbz	x22, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_legacy_tree_equal
	cbz	w0, LBB0_4
; %bb.6:
	mov	x19, x22
LBB0_7:
	ldp	x20, x21, [x19, #8]
	mov	x0, x19
	bl	_free_ltree_node
	cmp	x20, #0
	cset	w8, ne
	cbz	x20, LBB0_14
; %bb.8:
	cbz	x21, LBB0_14
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x9, [x21]
	cmp	x8, x9
	b.le	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	str	x20, [x23]
	ldr	x8, [x20, #16]!
	mov	x23, x20
	mov	x20, x8
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	str	x21, [x23]
	ldr	x8, [x21, #8]!
	mov	x23, x21
	mov	x21, x8
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	cmp	x20, #0
	cset	w8, ne
	cbz	x20, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	cbnz	x21, LBB0_9
LBB0_14:
	cmp	w8, #0
	csel	x8, x20, x21, ne
	str	x8, [x23]
	ldr	x19, [sp, #8]
LBB0_15:
	mov	x0, x19
	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_delete
.subsections_via_symbols
