	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_listree_delete                 ## -- Begin function listree_delete
	.p2align	4, 0x90
_listree_delete:                        ## @listree_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movl	16(%rdi), %edi
	callq	_tree_ext_lookup
	movq	%rax, %rbx
	movq	_NIL@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_1
## %bb.7:
	movl	(%rbx), %eax
	andl	$3, %eax
	movq	_TF_PLUS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	callq	_assert
	movl	16(%r12), %edi
	movl	%r14d, %esi
	callq	_tree_ext_delete
	jmp	LBB0_8
LBB0_1:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_find_rpos
	movl	%eax, %r15d
	testl	%eax, %eax
	jle	LBB0_4
## %bb.2:
	movq	(%r12), %r8
	movl	8(%r12), %r9d
	movl	%r9d, %eax
	subl	%r15d, %eax
	cltq
	movl	(%r8,%rax,4), %eax
	cmpl	%r14d, %eax
	je	LBB0_6
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	12(%r12), %r10d
	movl	16(%r12), %r11d
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	pushq	%r14
	pushq	%rax
	pushq	%r11
	pushq	%r10
	callq	_fprintf
	addq	$32, %rsp
	movq	(%r12), %rax
	movslq	8(%r12), %rcx
	movslq	%r15d, %rdx
	subq	%rdx, %rcx
	xorl	%edi, %edi
	cmpl	%r14d, (%rax,%rcx,4)
	sete	%dil
	jmp	LBB0_5
LBB0_4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %r8
	movl	8(%r12), %r9d
	movl	12(%r12), %r10d
	movl	16(%r12), %eax
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	pushq	%r14
	pushq	$-1
	pushq	%rax
	pushq	%r10
	callq	_fprintf
	addq	$32, %rsp
	xorl	%edi, %edi
LBB0_5:
	callq	_assert
LBB0_6:
	movl	16(%r12), %ebx
	xorl	%eax, %eax
	callq	_lrand48
	shll	$2, %eax
	movslq	%eax, %rdx
	movq	_TF_MINUS@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movl	%ebx, %edi
	movl	%r14d, %esi
	movl	%r15d, %ecx
	callq	_tree_ext_insert
LBB0_8:
	movl	%eax, 16(%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIL,8,3                        ## @NIL
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"listree_delete: T=%p rpos=%d U->A=%p U->N=%d U->last_A=%d U->root=%p U->A[N-rpos]=%d x=%d\n"

	.comm	_TF_MINUS,8,3                   ## @TF_MINUS
	.comm	_TF_PLUS,4,2                    ## @TF_PLUS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_listree_delete                 ; -- Begin function listree_delete
	.p2align	2
_listree_delete:                        ; @listree_delete
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_tree_ext_lookup
	mov	x22, x0
Lloh0:
	adrp	x8, _NIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NIL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [x22]
	and	w8, w8, #0x3
Lloh3:
	adrp	x9, _TF_PLUS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TF_PLUS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19, #16]
	mov	x1, x20
	bl	_tree_ext_delete
	b	LBB0_8
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_find_rpos
	mov	x21, x0
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.3:
	ldr	x4, [x19]
	ldr	w5, [x19, #8]
	sub	w8, w5, w21
	ldr	w8, [x4, w8, sxtw #2]
	cmp	w8, w20
	b.eq	LBB0_7
; %bb.4:
Lloh6:
	adrp	x9, _stderr@GOTPAGE
Lloh7:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x9]
	ldp	w6, w7, [x19, #12]
	stp	w8, w20, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x21
	bl	_fprintf
	ldr	x8, [x19]
	ldr	w9, [x19, #8]
	sub	w9, w9, w21
	ldr	w8, [x8, w9, sxtw #2]
	cmp	w8, w20
	cset	w0, eq
	b	LBB0_6
LBB0_5:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x4, [x19]
	ldp	w5, w6, [x19, #8]
	ldr	w7, [x19, #16]
	mov	w8, #-1
	stp	w8, w20, [sp]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x21
	bl	_fprintf
	mov	w0, #0
LBB0_6:
	bl	_assert
LBB0_7:
	ldr	w22, [x19, #16]
	bl	_lrand48
	lsl	w8, w0, #2
Lloh16:
	adrp	x9, _TF_MINUS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _TF_MINUS@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x2, x9, w8, sxtw
	mov	x0, x22
	mov	x1, x20
	mov	x3, x21
	bl	_tree_ext_insert
LBB0_8:
	str	w0, [x19, #16]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_NIL,8,3                        ; @NIL
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"listree_delete: T=%p rpos=%d U->A=%p U->N=%d U->last_A=%d U->root=%p U->A[N-rpos]=%d x=%d\n"

	.comm	_TF_MINUS,8,3                   ; @TF_MINUS
	.comm	_TF_PLUS,4,2                    ; @TF_PLUS
.subsections_via_symbols
