	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ldns_resolver_send_to
_ldns_resolver_send_to:                 ## @ldns_resolver_send_to
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r13
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movslq	24(%rbp), %r14
	movq	%rsi, %rdi
	callq	_ldns_resolver_nameserver_count
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_ldns_resolver_nameservers
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_ldns_resolver_rtt
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	leaq	(%r12,%r14,8), %rsi
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_ldns_resolver_set_nameservers
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rbx,%r14,8), %rsi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_ldns_resolver_set_rtt
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_ldns_resolver_set_nameserver_count
	movq	%rbx, %rdi
	callq	_ldns_rdf_clone
	movl	%eax, %edi
	movq	%r13, %r12
	movq	%r13, %rsi
	movl	%r14d, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_ldns_pkt_query_new
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	callq	_time
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_ldns_pkt_set_timestamp
	movq	%r13, %rdi
	callq	_ldns_pkt_set_random_id
	movq	_LDNS_RR_TYPE_IXFR@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	jne	LBB0_4
## %bb.3:
	movl	16(%rbp), %r8d
	movq	_LDNS_SECTION_AUTHORITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	movl	%r14d, %ecx
	callq	_ldns_pkt_push_rr_soa
	movq	%rax, %r14
	movq	_LDNS_STATUS_OK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_9
LBB0_4:
	cmpl	$0, 32(%rbp)
	je	LBB0_6
## %bb.5:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_ldns_resolver_send_pkt
	movq	%rax, %r14
	jmp	LBB0_9
LBB0_1:
	movq	_LDNS_STATUS_ERR@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_9:
	movq	%r13, %rdi
	callq	_ldns_pkt_free
	movq	%r15, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_ldns_resolver_set_nameservers
	movq	%r15, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	callq	_ldns_resolver_set_rtt
	movq	%r15, %rdi
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	callq	_ldns_resolver_set_nameserver_count
	movq	%r14, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_ldns_tcp_start
	movq	%rax, %r14
	movq	_LDNS_STATUS_OK@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	jne	LBB0_9
## %bb.7:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ldns_tcp_read
	movq	%rax, %r14
	cmpq	(%r12), %rax
	jne	LBB0_9
## %bb.8:
	movq	(%rbx), %rbx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_ldns_rdf_clone
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ldns_pkt_set_answerfrom
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_STATUS_OK,8,3             ## @LDNS_STATUS_OK
	.comm	_LDNS_STATUS_ERR,8,3            ## @LDNS_STATUS_ERR
	.comm	_LDNS_RR_TYPE_IXFR,8,3          ## @LDNS_RR_TYPE_IXFR
	.comm	_LDNS_SECTION_AUTHORITY,4,2     ## @LDNS_SECTION_AUTHORITY
	.no_dead_strip	_ldns_resolver_send_to
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ldns_resolver_send_to
_ldns_resolver_send_to:                 ; @ldns_resolver_send_to
	.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	x24, x7
	mov	x25, x6
	mov	x23, x5
	mov	x26, x4
	mov	x28, x3
	mov	x27, x2
	mov	x19, x1
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	mov	x0, x1
	bl	_ldns_resolver_nameserver_count
	mov	x20, x0
	mov	x0, x19
	bl	_ldns_resolver_nameservers
	mov	x21, x0
	mov	x0, x19
	bl	_ldns_resolver_rtt
	mov	x22, x0
	sbfiz	x24, x24, #3, #32
	add	x1, x21, x24
	mov	x0, x19
	bl	_ldns_resolver_set_nameservers
	add	x1, x22, x24
	mov	x0, x19
	bl	_ldns_resolver_set_rtt
	mov	x0, x19
	mov	w1, #1
	bl	_ldns_resolver_set_nameserver_count
	mov	x0, x27
	bl	_ldns_rdf_clone
	mov	x1, x28
	mov	x2, x26
	mov	x3, x23
	bl	_ldns_pkt_query_new
	mov	x24, x0
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, #0
	bl	_time
	mov	w2, w0
	mov	x0, x24
	mov	x1, #0
	bl	_ldns_pkt_set_timestamp
	mov	x0, x24
	bl	_ldns_pkt_set_random_id
Lloh0:
	adrp	x8, _LDNS_RR_TYPE_IXFR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_RR_TYPE_IXFR@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x28
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _LDNS_SECTION_AUTHORITY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_SECTION_AUTHORITY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x24
	mov	x2, x27
	mov	x3, x26
	mov	x4, x25
	bl	_ldns_pkt_push_rr_soa
	mov	x25, x0
Lloh6:
	adrp	x8, _LDNS_STATUS_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LDNS_STATUS_OK@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
LBB0_3:
	ldr	w8, [x29, #16]
	cbz	w8, LBB0_7
; %bb.4:
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	mov	x1, x19
	mov	x2, x24
	bl	_ldns_resolver_send_pkt
	mov	x25, x0
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _LDNS_STATUS_ERR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LDNS_STATUS_ERR@GOTPAGEOFF]
Lloh11:
	ldr	x25, [x8]
LBB0_6:
	mov	x0, x24
	bl	_ldns_pkt_free
	mov	x0, x19
	mov	x1, x21
	bl	_ldns_resolver_set_nameservers
	mov	x0, x19
	mov	x1, x22
	bl	_ldns_resolver_set_rtt
	mov	x0, x19
	mov	x1, x20
	bl	_ldns_resolver_set_nameserver_count
	mov	x0, x25
	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
LBB0_7:
	mov	x0, x19
	mov	x1, x24
	mov	w2, #0
	bl	_ldns_tcp_start
	mov	x25, x0
Lloh12:
	adrp	x23, _LDNS_STATUS_OK@GOTPAGE
Lloh13:
	ldr	x23, [x23, _LDNS_STATUS_OK@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.8:
	ldr	x26, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x26
	mov	x1, x19
	bl	_ldns_tcp_read
	mov	x25, x0
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.9:
	ldr	x23, [x26]
	ldr	x0, [x21]
	bl	_ldns_rdf_clone
	mov	x1, x0
	mov	x0, x23
	bl	_ldns_pkt_set_answerfrom
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_STATUS_OK,8,3             ; @LDNS_STATUS_OK
	.comm	_LDNS_STATUS_ERR,8,3            ; @LDNS_STATUS_ERR
	.comm	_LDNS_RR_TYPE_IXFR,8,3          ; @LDNS_RR_TYPE_IXFR
	.comm	_LDNS_SECTION_AUTHORITY,4,2     ; @LDNS_SECTION_AUTHORITY
	.no_dead_strip	_ldns_resolver_send_to
.subsections_via_symbols
