	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_listree_insert                 ## -- Begin function listree_insert
	.p2align	4, 0x90
_listree_insert:                        ## @listree_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	12(%rdi), %edi
	callq	_tree_ext_lookup
	movq	_NIL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_1
## %bb.5:
	movl	(%rax), %eax
	andl	$3, %eax
	movq	_TF_MINUS@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	sete	%dil
	callq	_assert
	movl	12(%rbx), %edi
	movl	%r14d, %esi
	callq	_tree_ext_delete
	jmp	LBB0_6
LBB0_1:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_find_rpos
	movl	%eax, %r15d
	movl	%eax, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_assert
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.3:
	movq	(%rbx), %rax
	movslq	8(%rbx), %rcx
	movslq	%r15d, %rdx
	subq	%rdx, %rcx
	xorl	%edi, %edi
	cmpl	%r14d, (%rax,%rcx,4)
	setne	%dil
	jmp	LBB0_4
LBB0_2:
	movl	$1, %edi
LBB0_4:
	callq	_assert
	movl	12(%rbx), %r12d
	xorl	%eax, %eax
	callq	_lrand48
	shll	$2, %eax
	movslq	%eax, %rdx
	movq	_TF_PLUS@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movl	%r12d, %edi
	movl	%r14d, %esi
	movl	%r15d, %ecx
	callq	_tree_ext_insert
LBB0_6:
	movl	%eax, 12(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NIL,8,3                        ## @NIL
	.comm	_TF_PLUS,8,3                    ## @TF_PLUS
	.comm	_TF_MINUS,4,2                   ## @TF_MINUS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_listree_insert                 ; -- Begin function listree_insert
	.p2align	2
_listree_insert:                        ; @listree_insert
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #12]
	bl	_tree_ext_lookup
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, [x0]
	and	w8, w8, #0x3
Lloh3:
	adrp	x9, _TF_MINUS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TF_MINUS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19, #12]
	mov	x1, x20
	bl	_tree_ext_delete
	b	LBB0_6
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_find_rpos
	mov	x21, x0
	mvn	w8, w0
	lsr	w0, w8, #31
	bl	_assert
	cbz	w21, LBB0_4
; %bb.3:
	ldr	x8, [x19]
	ldr	w9, [x19, #8]
	sub	w9, w9, w21
	ldr	w8, [x8, w9, sxtw #2]
	cmp	w8, w20
	cset	w0, ne
	b	LBB0_5
LBB0_4:
	mov	w0, #1
LBB0_5:
	bl	_assert
	ldr	w22, [x19, #12]
	bl	_lrand48
	lsl	w8, w0, #2
Lloh6:
	adrp	x9, _TF_PLUS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TF_PLUS@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x2, x9, w8, sxtw
	mov	x0, x22
	mov	x1, x20
	mov	x3, x21
	bl	_tree_ext_insert
LBB0_6:
	str	w0, [x19, #12]
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NIL,8,3                        ; @NIL
	.comm	_TF_PLUS,8,3                    ; @TF_PLUS
	.comm	_TF_MINUS,4,2                   ; @TF_MINUS
.subsections_via_symbols
