	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uu_avl_destroy                 ## -- Begin function uu_avl_destroy
	.p2align	4, 0x90
_uu_avl_destroy:                        ## @uu_avl_destroy
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	cmpq	$0, 48(%rdi)
	je	LBB0_6
## %bb.1:
	movq	%rbx, %rdi
	callq	_avl_numnodes
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_uu_panic
LBB0_3:
	leaq	32(%rbx), %rax
	cmpq	%rax, 40(%rbx)
	jne	LBB0_5
## %bb.4:
	cmpq	%rax, (%rax)
	je	LBB0_6
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	callq	_uu_panic
LBB0_6:
	movq	%r14, %rdi
	callq	_pthread_mutex_lock
	movq	16(%rbx), %rdi
	movq	24(%rbx), %r15
	callq	_UU_AVL_PTR
	movq	%r15, 8(%rax)
	movq	16(%rbx), %r15
	movq	24(%rbx), %rdi
	callq	_UU_AVL_PTR
	movq	%r15, (%rax)
	movq	%r14, %rdi
	callq	_pthread_mutex_unlock
	xorl	%edi, %edi
	callq	_UU_PTR_ENCODE
	movq	%rax, 24(%rbx)
	xorl	%edi, %edi
	callq	_UU_PTR_ENCODE
	movq	%rax, 16(%rbx)
	movq	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_avl_destroy
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_uu_free                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"uu_avl_destroy(%p): tree not empty\n"

L_.str.1:                               ## @.str.1
	.asciz	"uu_avl_destroy(%p):  outstanding walkers\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uu_avl_destroy                 ; -- Begin function uu_avl_destroy
	.p2align	2
_uu_avl_destroy:                        ; @uu_avl_destroy
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	x8, [x0, #48]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x0, x19
	bl	_avl_numnodes
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_uu_panic
LBB0_3:
	add	x8, x19, #32
	ldr	x9, [x19, #40]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldr	x9, [x8]
	cmp	x9, x8
	b.eq	LBB0_6
LBB0_5:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_uu_panic
LBB0_6:
	mov	x0, x20
	bl	_pthread_mutex_lock
	ldp	x0, x21, [x19, #16]
	bl	_UU_AVL_PTR
	str	x21, [x0, #8]
	ldp	x21, x0, [x19, #16]
	bl	_UU_AVL_PTR
	str	x21, [x0]
	mov	x0, x20
	bl	_pthread_mutex_unlock
	mov	x0, #0
	bl	_UU_PTR_ENCODE
	str	x0, [x19, #24]
	mov	x0, #0
	bl	_UU_PTR_ENCODE
	stp	xzr, x0, [x19, #8]
	mov	x0, x19
	bl	_avl_destroy
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_uu_free
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"uu_avl_destroy(%p): tree not empty\n"

l_.str.1:                               ; @.str.1
	.asciz	"uu_avl_destroy(%p):  outstanding walkers\n"

.subsections_via_symbols
