	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_radix_insert              ## -- Begin function ldns_radix_insert
	.p2align	4, 0x90
_ldns_radix_insert:                     ## @ldns_radix_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -60(%rbp)
	movq	$0, -48(%rbp)
	movq	_LDNS_STATUS_NULL@GOTPCREL(%rip), %r14
	testq	%rdi, %rdi
	je	LBB0_35
## %bb.1:
	movq	%rsi, %r13
	testq	%rsi, %rsi
	je	LBB0_35
## %bb.2:
	movq	%rcx, %rbx
	testq	%rcx, %rcx
	je	LBB0_35
## %bb.3:
	movl	%edx, %r12d
	movq	%rdi, %r15
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_ldns_radix_new_node
	movq	_LDNS_STATUS_MEM_ERR@GOTPCREL(%rip), %r14
	testq	%rax, %rax
	je	LBB0_35
## %bb.4:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %rcx
	leaq	-60(%rbp), %r8
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_ldns_radix_find_prefix
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movslq	-60(%rbp), %rax
	cmpl	%r12d, %eax
	jne	LBB0_15
## %bb.6:
	movq	-48(%rbp), %rax
	cmpq	$0, 64(%rax)
	je	LBB0_26
## %bb.7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_LDNS_FREE
	movq	_LDNS_STATUS_EXISTS_ERR@GOTPCREL(%rip), %r14
	jmp	LBB0_35
LBB0_8:
	xorl	%edi, %edi
	cmpq	$0, 8(%r15)
	sete	%dil
	callq	_assert
	testl	%r12d, %r12d
	je	LBB0_25
## %bb.9:
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	xorl	%edx, %edx
	callq	_ldns_radix_new_node
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_33
## %bb.10:
	movq	(%r13), %rsi
	movq	%rax, %rdi
	callq	_ldns_radix_array_space
	testl	%eax, %eax
	je	LBB0_28
## %bb.11:
	movq	-48(%rbp), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 56(%rcx)
	movq	$0, 48(%rcx)
	movq	32(%rax), %r8
	movq	%rcx, 40(%r8)
	cmpl	$2, %r12d
	jl	LBB0_14
## %bb.12:
	leaq	72(%r8), %rcx
	movl	$1, %edi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_ldns_radix_prefix_remainder
	testl	%eax, %eax
	je	LBB0_28
## %bb.13:
	movq	-48(%rbp), %rax
LBB0_14:
	movq	%rax, 8(%r15)
	jmp	LBB0_27
LBB0_15:
	movq	(%r13,%rax,8), %rbx
	xorl	%edi, %edi
	cmpl	%r12d, %eax
	setl	%dil
	callq	_assert
	movq	-48(%rbp), %rdi
	movq	%rbx, %rax
	subq	24(%rdi), %rbx
	jl	LBB0_20
## %bb.16:
	cmpq	(%rdi), %rbx
	jge	LBB0_20
## %bb.17:
	movq	32(%rdi), %rcx
	leaq	(%rbx,%rbx,4), %rsi
	shlq	$4, %rsi
	leaq	(%rcx,%rsi), %rax
	movl	-60(%rbp), %edx
	incl	%edx
	cmpq	$0, 40(%rcx,%rsi)
	je	LBB0_29
## %bb.18:
	movq	%rax, %rdi
	movq	%r13, %rsi
	movl	%r12d, %ecx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_ldns_radix_array_split
	testl	%eax, %eax
	jne	LBB0_27
## %bb.19:
	movq	%rbx, %rdi
	jmp	LBB0_34
LBB0_20:
	movq	%rax, %rbx
	movq	%rax, %rsi
	callq	_ldns_radix_array_space
	testl	%eax, %eax
	je	LBB0_33
## %bb.21:
	movq	-48(%rbp), %rax
	xorl	%edi, %edi
	cmpq	24(%rax), %rbx
	setge	%dil
	callq	_assert
	movq	-48(%rbp), %rax
	movq	%rbx, %rcx
	subq	24(%rax), %rcx
	xorl	%edi, %edi
	cmpq	(%rax), %rcx
	setle	%dil
	callq	_assert
	movq	-48(%rbp), %rax
	subq	24(%rax), %rbx
	movl	-60(%rbp), %edx
	incl	%edx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%rbx,4), %rbx
	cmpl	%r12d, %edx
	jge	LBB0_24
## %bb.22:
	movq	%rbx, %rdi
	shlq	$4, %rdi
	addq	32(%rax), %rdi
	movq	%r13, %rsi
	movl	%r12d, %ecx
	callq	_ldns_radix_str_create
	testl	%eax, %eax
	je	LBB0_33
## %bb.23:
	movq	-48(%rbp), %rax
LBB0_24:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 56(%rcx)
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 48(%rcx)
	movq	32(%rax), %rax
	shlq	$4, %rbx
	movq	%rcx, 40(%rax,%rbx)
	jmp	LBB0_27
LBB0_25:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	jmp	LBB0_27
LBB0_26:
	movq	%rbx, 64(%rax)
	movq	%r13, 8(%rax)
	movl	%r12d, 16(%rax)
LBB0_27:
	incl	(%r15)
	movq	_LDNS_STATUS_OK@GOTPCREL(%rip), %r14
	jmp	LBB0_35
LBB0_28:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_LDNS_FREE
	movq	-48(%rbp), %rax
	movq	32(%rax), %rdi
	callq	_LDNS_FREE
	movq	-48(%rbp), %rdi
	jmp	LBB0_34
LBB0_29:
	cmpl	%r12d, %edx
	jge	LBB0_32
## %bb.30:
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	%r13, %rsi
	movl	%r12d, %ecx
	callq	_ldns_radix_str_create
	testl	%eax, %eax
	je	LBB0_33
## %bb.31:
	movq	-48(%rbp), %rdi
	movq	32(%rdi), %rcx
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
LBB0_32:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rdi, 56(%rax)
	movq	%rbx, 48(%rax)
	movq	%rax, 40(%rcx,%rsi)
	jmp	LBB0_27
LBB0_33:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
LBB0_34:
	callq	_LDNS_FREE
LBB0_35:
	movl	(%r14), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_STATUS_NULL,4,2           ## @LDNS_STATUS_NULL
	.comm	_LDNS_STATUS_MEM_ERR,4,2        ## @LDNS_STATUS_MEM_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_LDNS_STATUS_EXISTS_ERR,4,2     ## @LDNS_STATUS_EXISTS_ERR
	.comm	_LDNS_STATUS_OK,4,2             ## @LDNS_STATUS_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_radix_insert              ; -- Begin function ldns_radix_insert
	.p2align	2
_ldns_radix_insert:                     ; @ldns_radix_insert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	str	wzr, [sp, #12]
	str	xzr, [sp]
Lloh0:
	adrp	x8, _LDNS_STATUS_NULL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_STATUS_NULL@GOTPAGEOFF]
	cbz	x0, LBB0_35
; %bb.1:
	mov	x22, x1
	cbz	x1, LBB0_35
; %bb.2:
	mov	x23, x3
	cbz	x3, LBB0_35
; %bb.3:
	mov	x21, x2
	mov	x19, x0
	mov	x0, x23
	mov	x1, x22
	bl	_ldns_radix_new_node
	cbz	x0, LBB0_34
; %bb.4:
	mov	x20, x0
	mov	x3, sp
	add	x4, sp, #12
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_ldns_radix_find_prefix
	cbz	w0, LBB0_8
; %bb.5:
	ldrsw	x8, [sp, #12]
	cmp	w8, w21
	b.ne	LBB0_15
; %bb.6:
	ldr	x8, [sp]
	ldr	x9, [x8, #64]
	cbz	x9, LBB0_25
; %bb.7:
	mov	x0, x20
	bl	_LDNS_FREE
Lloh2:
	adrp	x8, _LDNS_STATUS_EXISTS_ERR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LDNS_STATUS_EXISTS_ERR@GOTPAGEOFF]
	b	LBB0_35
LBB0_8:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	cbz	w21, LBB0_24
; %bb.9:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, #0
	mov	w2, #0
	bl	_ldns_radix_new_node
	str	x0, [sp]
	cbz	x0, LBB0_32
; %bb.10:
	ldr	x1, [x22]
	bl	_ldns_radix_array_space
	cbz	w0, LBB0_27
; %bb.11:
	ldr	x8, [sp]
	stp	xzr, x8, [x20, #48]
	ldr	x4, [x8, #32]
	str	x20, [x4, #40]
	cmp	w21, #2
	b.lt	LBB0_14
; %bb.12:
	add	x3, x4, #72
	mov	w0, #1
	mov	x1, x22
	mov	x2, x21
	bl	_ldns_radix_prefix_remainder
	cbz	w0, LBB0_27
; %bb.13:
	ldr	x8, [sp]
LBB0_14:
	str	x8, [x19, #8]
	b	LBB0_26
LBB0_15:
	ldr	x23, [x22, x8, lsl #3]
	cmp	w8, w21
	cset	w0, lt
	bl	_assert
	ldr	x0, [sp]
	ldr	x8, [x0, #24]
	subs	x24, x23, x8
	b.lt	LBB0_19
; %bb.16:
	ldr	x8, [x0]
	cmp	x24, x8
	b.ge	LBB0_19
; %bb.17:
	ldr	x9, [x0, #32]
	mov	w8, #80
	madd	x8, x24, x8, x9
	ldr	x10, [x8, #40]
	ldr	w11, [sp, #12]
	add	w2, w11, #1
	cbz	x10, LBB0_28
; %bb.18:
	mov	x0, x8
	mov	x1, x22
	mov	x3, x21
	mov	x4, x20
	bl	_ldns_radix_array_split
	cbnz	w0, LBB0_26
	b	LBB0_32
LBB0_19:
	mov	x1, x23
	bl	_ldns_radix_array_space
	cbz	w0, LBB0_32
; %bb.20:
	ldr	x8, [sp]
	ldr	x8, [x8, #24]
	cmp	x23, x8
	cset	w0, ge
	bl	_assert
	ldr	x8, [sp]
	ldr	x9, [x8, #24]
	ldr	x8, [x8]
	sub	x9, x23, x9
	cmp	x9, x8
	cset	w0, le
	bl	_assert
	ldr	x8, [sp]
	ldr	x9, [x8, #24]
	sub	x23, x23, x9
	ldr	w9, [sp, #12]
	add	w2, w9, #1
	cmp	w2, w21
	b.ge	LBB0_23
; %bb.21:
	ldr	x8, [x8, #32]
	mov	w9, #80
	madd	x0, x23, x9, x8
	mov	x1, x22
	mov	x3, x21
	bl	_ldns_radix_str_create
	cbz	w0, LBB0_32
; %bb.22:
	ldr	x8, [sp]
LBB0_23:
	stp	x23, x8, [x20, #48]
	ldr	x8, [x8, #32]
	mov	w9, #80
	madd	x8, x23, x9, x8
	str	x20, [x8, #40]
	b	LBB0_26
LBB0_24:
	str	x20, [x19, #8]
	b	LBB0_26
LBB0_25:
	str	x23, [x8, #64]
	str	x22, [x8, #8]
	str	w21, [x8, #16]
LBB0_26:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
Lloh6:
	adrp	x8, _LDNS_STATUS_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LDNS_STATUS_OK@GOTPAGEOFF]
	b	LBB0_35
LBB0_27:
	mov	x0, x20
	bl	_LDNS_FREE
	ldr	x8, [sp]
	ldr	x0, [x8, #32]
	bl	_LDNS_FREE
	ldr	x0, [sp]
	b	LBB0_33
LBB0_28:
	cmp	w2, w21
	b.ge	LBB0_31
; %bb.29:
	mov	x0, x8
	mov	x1, x22
	mov	x3, x21
	bl	_ldns_radix_str_create
	cbz	w0, LBB0_32
; %bb.30:
	ldr	x0, [sp]
	ldr	x9, [x0, #32]
LBB0_31:
	stp	x24, x0, [x20, #48]
	mov	w8, #80
	madd	x8, x24, x8, x9
	str	x20, [x8, #40]
	b	LBB0_26
LBB0_32:
	mov	x0, x20
LBB0_33:
	bl	_LDNS_FREE
LBB0_34:
Lloh8:
	adrp	x8, _LDNS_STATUS_MEM_ERR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LDNS_STATUS_MEM_ERR@GOTPAGEOFF]
LBB0_35:
	ldr	w0, [x8]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_STATUS_NULL,4,2           ; @LDNS_STATUS_NULL
	.comm	_LDNS_STATUS_MEM_ERR,4,2        ; @LDNS_STATUS_MEM_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_LDNS_STATUS_EXISTS_ERR,4,2     ; @LDNS_STATUS_EXISTS_ERR
	.comm	_LDNS_STATUS_OK,4,2             ; @LDNS_STATUS_OK
.subsections_via_symbols
