	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dns_cache_find_delegation      ## -- Begin function dns_cache_find_delegation
	.p2align	4, 0x90
_dns_cache_find_delegation:             ## @dns_cache_find_delegation
	.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
	movq	%r9, %r14
	movl	%r8d, %ebx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r13
	movl	24(%rbp), %r8d
	movq	_LDNS_RR_TYPE_NS@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$0, (%rsp)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%ebx, %ecx
	callq	_find_closest_of_type
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	8(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_delegpt_create
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	movq	%rax, %rbx
	movl	16(%r12), %edx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_delegpt_set_name
	testl	%eax, %eax
	je	LBB0_13
## %bb.4:
	cmpq	$0, 16(%rbp)
	je	LBB0_7
## %bb.5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	leal	(%rax,%rax), %r9d
	addl	$2, %r9d
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%r14, %r8
	callq	_dns_msg_create
	movq	16(%rbp), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	movq	%rax, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	movl	24(%rbp), %ecx
	callq	_dns_msg_authadd
	testl	%eax, %eax
	je	LBB0_13
LBB0_7:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_delegpt_rrset_add_ns
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_log_err
LBB0_9:
	movq	%r12, %rdi
	callq	_lock_rw_unlock
	movq	16(%rbp), %r13
	testq	%r13, %r13
	movl	24(%rbp), %r15d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_11
## %bb.10:
	movq	(%r13), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rcx
	movl	%r15d, %r8d
	callq	_find_add_ds
LBB0_11:
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movq	%r14, %rdx
	movq	%rbx, %rcx
	movl	%r15d, %r8d
	movq	%r13, %r9
	callq	_find_add_addrs
	testl	%eax, %eax
	jne	LBB0_15
## %bb.12:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_14
LBB0_13:
	movq	%r12, %rdi
	callq	_lock_rw_unlock
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
LBB0_14:
	callq	_log_err
	jmp	LBB0_15
LBB0_1:
	xorl	%ebx, %ebx
LBB0_15:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_RR_TYPE_NS,4,2            ## @LDNS_RR_TYPE_NS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"find_delegation: out of memory"

L_.str.1:                               ## @.str.1
	.asciz	"find_delegation: addns out of memory"

L_.str.2:                               ## @.str.2
	.asciz	"find_delegation: addrs out of memory"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dns_cache_find_delegation      ; -- Begin function dns_cache_find_delegation
	.p2align	2
_dns_cache_find_delegation:             ; @dns_cache_find_delegation
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x7
	mov	x19, x6
	mov	x22, x5
	mov	x23, x4
	mov	x26, x3
	mov	x27, x2
	mov	x28, x1
	mov	x24, x0
Lloh0:
	adrp	x8, _LDNS_RR_TYPE_NS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_RR_TYPE_NS@GOTPAGEOFF]
Lloh2:
	ldr	w5, [x8]
	mov	x3, x4
	mov	x4, x7
	mov	w6, #0
	bl	_find_closest_of_type
	cbz	x0, LBB0_14
; %bb.1:
	mov	x25, x0
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x20, [x0, #8]
	mov	x0, x22
	bl	_delegpt_create
	cbz	x0, LBB0_12
; %bb.2:
	mov	x19, x0
	ldr	w2, [x25, #16]
	mov	x1, x22
	bl	_delegpt_set_name
	cbz	w0, LBB0_12
; %bb.3:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	cbz	x8, LBB0_6
; %bb.4:
	ldr	w8, [x20]
	lsl	w8, w8, #1
	add	w5, w8, #2
	mov	x0, x28
	mov	x1, x27
	mov	x2, x26
	mov	x3, x23
	mov	x4, x22
	bl	_dns_msg_create
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x0, [x8]
	cbz	x0, LBB0_12
; %bb.5:
	mov	x1, x22
	mov	x2, x25
	mov	x3, x21
	bl	_dns_msg_authadd
	cbz	w0, LBB0_12
LBB0_6:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x25
	mov	w3, #0
	bl	_delegpt_rrset_add_ns
	cbnz	w0, LBB0_8
; %bb.7:
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_log_err
LBB0_8:
	mov	x0, x25
	bl	_lock_rw_unlock
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
	cbz	x20, LBB0_10
; %bb.9:
	ldr	x2, [x20]
	mov	x0, x24
	mov	x1, x22
	mov	x3, x19
	mov	x4, x21
	bl	_find_add_ds
LBB0_10:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x19
	mov	x4, x21
	mov	x5, x20
	bl	_find_add_addrs
	cbnz	w0, LBB0_15
; %bb.11:
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:
	mov	x0, x25
	bl	_lock_rw_unlock
	mov	x19, #0
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
LBB0_13:
	bl	_log_err
	b	LBB0_15
LBB0_14:
	mov	x19, #0
LBB0_15:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_RR_TYPE_NS,4,2            ; @LDNS_RR_TYPE_NS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"find_delegation: out of memory"

l_.str.1:                               ; @.str.1
	.asciz	"find_delegation: addns out of memory"

l_.str.2:                               ; @.str.2
	.asciz	"find_delegation: addrs out of memory"

.subsections_via_symbols
