	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rbt_insert                     ## -- Begin function rbt_insert
	.p2align	4, 0x90
_rbt_insert:                            ## @rbt_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	_RBTNIL@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	je	LBB0_1
## %bb.2:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %r13
	movl	16(%r14), %edx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	*(%r14)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
	shrl	$31, %eax
	movq	(%r13,%rax,8), %rax
	cmpq	(%r12), %rax
	jne	LBB0_3
## %bb.6:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
LBB0_7:
	movl	$1, (%rdx)
	movl	16(%r14), %edi
	callq	*24(%r14)
	movq	%rax, %r13
	movq	_RBTRED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movq	(%r12), %rax
	movq	%rax, 8(%r13)
	movq	%rax, (%r13)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, 16(%r13)
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%r15, %rdx
	callq	_rbt_copy_data
	testq	%r12, %r12
	je	LBB0_8
## %bb.9:
	movq	%r12, %rax
	testl	%ebx, %ebx
	jns	LBB0_11
## %bb.10:
	addq	$8, %rax
	jmp	LBB0_11
LBB0_4:
	movl	16(%r14), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	*32(%r14)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	jmp	LBB0_12
LBB0_8:
	leaq	8(%r14), %rax
LBB0_11:
	movq	%r13, (%rax)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_rbt_insert_fixup
LBB0_12:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RBTNIL,8,3                     ## @RBTNIL
	.comm	_RBTRED,4,2                     ## @RBTRED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rbt_insert                     ; -- Begin function rbt_insert
	.p2align	2
_rbt_insert:                            ; @rbt_insert
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	x24, x0
	ldr	x8, [x24, #8]!
Lloh0:
	adrp	x25, _RBTNIL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _RBTNIL@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_3
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x21, x8
	ldr	x8, [x19]
	ldr	w2, [x19, #16]
	mov	x0, x20
	mov	x1, x21
	blr	x8
	cbz	w0, LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x23, x0
	lsr	w8, w0, #31
	ldr	x8, [x21, w8, uxtw #3]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_1
	b	LBB0_4
LBB0_3:
	mov	x21, #0
	mov	w23, #0
LBB0_4:
	mov	w8, #1
	str	w8, [x22]
	ldr	x8, [x19, #24]
	ldr	w0, [x19, #16]
	blr	x8
	mov	x22, x0
Lloh2:
	adrp	x8, _RBTRED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RBTRED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x0, #24]
	ldr	x8, [x25]
	stp	x8, x8, [x0]
	str	x21, [x0, #16]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_rbt_copy_data
	add	x8, x21, #8
	tst	w23, #0x80000000
	csel	x8, x21, x8, eq
	cmp	x21, #0
	csel	x8, x24, x8, eq
	str	x22, [x8]
	mov	x0, x19
	mov	x1, x22
	bl	_rbt_insert_fixup
	mov	x21, x22
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19, #32]
	ldr	w2, [x19, #16]
	mov	x0, x21
	mov	x1, x20
	blr	x8
	str	wzr, [x22]
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RBTNIL,8,3                     ; @RBTNIL
	.comm	_RBTRED,4,2                     ; @RBTRED
.subsections_via_symbols
