	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serviced_encode
_serviced_encode:                       ## @serviced_encode
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	32(%rdi), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_3
## %bb.1:
	cmpl	$0, 40(%rbx)
	jne	LBB0_3
## %bb.2:
	movl	(%rax), %edi
	movl	24(%rbx), %edx
	movl	28(%rbx), %esi
	callq	_serviced_perturb_qname
LBB0_3:
	movq	%r14, %rdi
	callq	_sldns_buffer_clear
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_sldns_buffer_write_u16
	movl	24(%rbx), %edx
	movl	28(%rbx), %esi
	movq	%r14, %rdi
	callq	_sldns_buffer_write
	movq	%r14, %rdi
	callq	_sldns_buffer_flip
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.4:
	movl	$1, -56(%rbp)
	movq	$0, -32(%rbp)
	movq	_EDNS_ADVERTISED_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -36(%rbp)
	movl	20(%rbx), %eax
	movl	%eax, -40(%rbp)
	movq	(%rbx), %rax
	movq	_serviced_query_UDP_EDNS_FRAG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.5:
	leaq	16(%rbx), %rdi
	movl	12(%rbx), %esi
	callq	_addr_is_ip6
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	movq	_EDNS_FRAG_SIZE_IP6@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_9:
	movq	_EDNS_ADVERTISED_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_10
LBB0_15:
	movq	_EDNS_FRAG_SIZE_IP4@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %rax
	movq	_EDNS_ADVERTISED_SIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jge	LBB0_8
LBB0_10:
	movq	%rax, -48(%rbp)
	jmp	LBB0_11
LBB0_8:
	movq	%rcx, -48(%rbp)
LBB0_11:
	movl	8(%rbx), %eax
	movq	_EDNS_DO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	andl	%eax, %edx
	cmovnel	%ecx, %edx
	movl	%edx, -52(%rbp)
	movq	_BIT_CD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	_sldns_buffer_begin
	movl	%eax, %edi
	callq	_LDNS_CD_SET
LBB0_13:
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_attach_edns_record
LBB0_14:
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EDNS_ADVERTISED_VERSION,4,2    ## @EDNS_ADVERTISED_VERSION
	.comm	_serviced_query_UDP_EDNS_FRAG,8,3 ## @serviced_query_UDP_EDNS_FRAG
	.comm	_EDNS_FRAG_SIZE_IP6,8,3         ## @EDNS_FRAG_SIZE_IP6
	.comm	_EDNS_ADVERTISED_SIZE,8,3       ## @EDNS_ADVERTISED_SIZE
	.comm	_EDNS_FRAG_SIZE_IP4,8,3         ## @EDNS_FRAG_SIZE_IP4
	.comm	_EDNS_DO,4,2                    ## @EDNS_DO
	.comm	_BIT_CD,4,2                     ## @BIT_CD
	.no_dead_strip	_serviced_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serviced_encode
_serviced_encode:                       ; @serviced_encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0, #32]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_3
; %bb.1:
	ldr	w9, [x20, #40]
	cbnz	w9, LBB0_3
; %bb.2:
	ldr	w0, [x8]
	ldp	w2, w1, [x20, #24]
	bl	_serviced_perturb_qname
LBB0_3:
	mov	x0, x19
	bl	_sldns_buffer_clear
	mov	x0, x19
	mov	w1, #0
	bl	_sldns_buffer_write_u16
	ldp	w2, w1, [x20, #24]
	mov	x0, x19
	bl	_sldns_buffer_write
	mov	x0, x19
	bl	_sldns_buffer_flip
	cbz	w21, LBB0_15
; %bb.4:
	mov	w8, #1
	str	xzr, [sp, #24]
Lloh0:
	adrp	x9, _EDNS_ADVERTISED_VERSION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EDNS_ADVERTISED_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x9]
	ldr	w9, [x20, #20]
	str	w8, [sp]
	stp	w9, w10, [sp, #16]
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _serviced_query_UDP_EDNS_FRAG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _serviced_query_UDP_EDNS_FRAG@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	add	x0, x20, #16
	ldr	w1, [x20, #12]
	bl	_addr_is_ip6
	cbz	x0, LBB0_8
; %bb.6:
Lloh6:
	adrp	x8, _EDNS_FRAG_SIZE_IP6@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EDNS_FRAG_SIZE_IP6@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh8:
	adrp	x8, _EDNS_ADVERTISED_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EDNS_ADVERTISED_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x8, _EDNS_FRAG_SIZE_IP4@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EDNS_FRAG_SIZE_IP4@GOTPAGEOFF]
LBB0_9:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _EDNS_ADVERTISED_SIZE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _EDNS_ADVERTISED_SIZE@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_11
LBB0_10:
	str	x8, [sp, #8]
	b	LBB0_12
LBB0_11:
	str	x9, [sp, #8]
LBB0_12:
	ldr	w8, [x20, #8]
Lloh16:
	adrp	x9, _EDNS_DO@GOTPAGE
Lloh17:
	ldr	x9, [x9, _EDNS_DO@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	csel	w9, wzr, w9, eq
	str	w9, [sp, #4]
Lloh19:
	adrp	x9, _BIT_CD@GOTPAGE
Lloh20:
	ldr	x9, [x9, _BIT_CD@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_14
; %bb.13:
	mov	x0, x19
	bl	_sldns_buffer_begin
	bl	_LDNS_CD_SET
LBB0_14:
	mov	x1, sp
	mov	x0, x19
	bl	_attach_edns_record
LBB0_15:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EDNS_ADVERTISED_VERSION,4,2    ; @EDNS_ADVERTISED_VERSION
	.comm	_serviced_query_UDP_EDNS_FRAG,8,3 ; @serviced_query_UDP_EDNS_FRAG
	.comm	_EDNS_FRAG_SIZE_IP6,8,3         ; @EDNS_FRAG_SIZE_IP6
	.comm	_EDNS_ADVERTISED_SIZE,8,3       ; @EDNS_ADVERTISED_SIZE
	.comm	_EDNS_FRAG_SIZE_IP4,8,3         ; @EDNS_FRAG_SIZE_IP4
	.comm	_EDNS_DO,4,2                    ; @EDNS_DO
	.comm	_BIT_CD,4,2                     ; @BIT_CD
	.no_dead_strip	_serviced_encode
.subsections_via_symbols
