	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function packed_rrset_encode
_packed_rrset_encode:                   ## @packed_rrset_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movl	48(%rbp), %r15d
	movq	$0, -88(%rbp)
	movq	(%rdi), %rdi
	movq	32(%r13), %r14
	callq	_ntohs
	movl	32(%rbp), %edi
	movl	%eax, %esi
	movq	40(%rbp), %rdx
	movl	%r15d, %ecx
	callq	_rrset_belongs_in_reply
	testl	%eax, %eax
	je	LBB0_28
## %bb.1:
	movl	24(%r13), %edi
	callq	_dname_count_labels
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_sldns_buffer_position
	movq	_PACKED_RRSET_FIXEDTTL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	testl	%ecx, 8(%r13)
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmoveq	-56(%rbp), %rdx                 ## 8-byte Folded Reload
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, -92(%rbp)                ## 4-byte Spill
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.2:
	movq	%r13, %rdi
	callq	_type_rdata_compressable
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.3:
	leaq	16(%r13), %rdx
	movq	%rdx, -112(%rbp)                ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r14), %rax
	movq	24(%r14), %rcx
	movq	(%rax,%r12,8), %rsi
	movl	(%rcx,%r12,4), %edx
	movq	%rbx, %rdi
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rbp), %r8
	callq	_compress_rdata
	movq	_RETVAL_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	movq	(%r14), %rcx
	cmpq	%rcx, %r15
	jae	LBB0_14
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	56(%rbp), %rax
	addq	%r15, %rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %r12
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %r12d
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rsp)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	24(%rbp), %rcx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	leaq	-88(%rbp), %r9
	callq	_compress_owner
	movq	_RETVAL_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	$2, %edx
	callq	_sldns_buffer_write
	movq	%rbx, %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	movl	$2, %edx
	callq	_sldns_buffer_write
	movq	8(%r14), %rax
	movq	(%rax,%r12,8), %rax
	subq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	movl	$0, %esi
	cmovgeq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_sldns_buffer_write_u32
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	testq	%r9, %r9
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	movq	24(%r14), %rcx
	movl	(%rcx,%r12,4), %edx
	cmpl	%edx, %eax
	jl	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%r12,8), %rsi
	movq	%rbx, %rdi
	callq	_sldns_buffer_write
	jmp	LBB0_13
LBB0_14:
	cmpl	$0, 16(%rbp)
	setne	%al
	cmpl	$0, 48(%rbp)
	setne	%cl
	andb	%al, %cl
	movb	%cl, -64(%rbp)                  ## 1-byte Spill
	cmpb	$1, %cl
	jne	LBB0_24
## %bb.15:
	movq	(%r14), %r12
	movq	32(%r14), %r15
	leaq	(%r15,%r12), %rax
	cmpq	%rax, %r12
	jae	LBB0_24
## %bb.16:
	leaq	16(%r13), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	_LDNS_RR_TYPE_RRSIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sldns_buffer_write_u16
	movq	%rbx, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	$2, %edx
	callq	_sldns_buffer_write
	movq	8(%r14), %rax
	movq	(%rax,%r12,8), %rsi
	subq	-56(%rbp), %rsi                 ## 8-byte Folded Reload
	movl	$0, %eax
	cmovlq	%rax, %rsi
	movq	%rbx, %rdi
	callq	_sldns_buffer_write_u32
	movq	16(%r14), %rax
	movq	24(%r14), %rcx
	movq	(%rax,%r12,8), %rsi
	movl	(%rcx,%r12,4), %edx
	movq	%rbx, %rdi
	callq	_sldns_buffer_write
	incq	%r12
	decq	%r15
	je	LBB0_24
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -88(%rbp)
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	movq	24(%r14), %rcx
	movl	(%rcx,%r12,4), %ecx
	addl	$10, %ecx
	cmpl	%ecx, %eax
	jl	LBB0_11
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rbx, %rdi
	leaq	-88(%rbp), %rsi
	movl	$2, %edx
	callq	_sldns_buffer_write
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	24(%r13), %edi
	movq	%rbx, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	24(%rbp), %r8
	callq	_compress_any_dname
	movq	_RETVAL_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_30
## %bb.22:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rbx, %rdi
	callq	_sldns_buffer_remaining
	movq	24(%r14), %rcx
	movl	(%rcx,%r12,4), %ecx
	addl	$8, %ecx
	cmpl	%ecx, %eax
	jge	LBB0_23
LBB0_11:
	movq	_RETVAL_TRUNC@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_24:
	cmpl	$0, -92(%rbp)                   ## 4-byte Folded Reload
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	je	LBB0_26
## %bb.25:
	movq	(%r14), %rax
	addq	%rax, (%rcx)
LBB0_26:
	cmpb	$0, -64(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_28
## %bb.27:
	movq	32(%r14), %rax
	addq	%rax, (%rcx)
LBB0_28:
	movq	_RETVAL_OK@GOTPCREL(%rip), %rax
LBB0_29:
	movl	(%rax), %eax
LBB0_30:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RETVAL_OK,4,2                  ## @RETVAL_OK
	.comm	_PACKED_RRSET_FIXEDTTL,4,2      ## @PACKED_RRSET_FIXEDTTL
	.comm	_RETVAL_TRUNC,4,2               ## @RETVAL_TRUNC
	.comm	_LDNS_RR_TYPE_RRSIG,4,2         ## @LDNS_RR_TYPE_RRSIG
	.no_dead_strip	_packed_rrset_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function packed_rrset_encode
_packed_rrset_encode:                   ; @packed_rrset_encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	stp	x4, x7, [sp, #40]               ; 16-byte Folded Spill
	mov	x27, x6
	mov	x22, x5
	mov	x19, x3
	mov	x21, x2
	mov	x23, x1
	mov	x24, x0
	ldr	w28, [x29, #32]
	ldr	w20, [x29, #16]
	ldr	x25, [x29, #24]
	str	xzr, [sp, #56]
	ldr	x26, [x0, #32]
	ldr	x0, [x0]
	bl	_ntohs
	mov	x1, x0
	mov	x0, x20
	mov	x2, x25
	mov	x3, x28
	bl	_rrset_belongs_in_reply
	cbz	w0, LBB0_23
; %bb.1:
	stp	w28, w27, [sp, #24]             ; 8-byte Folded Spill
	str	x21, [sp, #16]                  ; 8-byte Folded Spill
	ldr	w0, [x24, #24]
	bl	_dname_count_labels
	mov	x25, x0
	mov	x0, x23
	bl	_sldns_buffer_position
Lloh0:
	adrp	x8, _PACKED_RRSET_FIXEDTTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PACKED_RRSET_FIXEDTTL@GOTPAGEOFF]
	ldr	w9, [x24, #8]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w9
	csel	x8, x19, xzr, eq
	str	x8, [sp, #32]                   ; 8-byte Folded Spill
	str	w22, [sp, #12]                  ; 4-byte Folded Spill
	cbz	w22, LBB0_10
; %bb.2:
	mov	x28, x0
	mov	x0, x24
	bl	_type_rdata_compressable
	ldr	x22, [x26]
	cbz	x22, LBB0_10
; %bb.3:
	mov	x19, x0
	mov	x27, #0
	ldr	x21, [x29, #40]
	add	x20, x24, #16
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldp	x8, x9, [x26, #16]
	ldr	x1, [x8, x22, lsl #3]
	ldr	w2, [x9, x22, lsl #2]
	mov	x0, x23
	ldp	x3, x4, [sp, #40]               ; 16-byte Folded Reload
	mov	x5, x19
	bl	_compress_rdata
Lloh3:
	adrp	x8, _RETVAL_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RETVAL_OK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_25
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x27, x27, #1
	ldr	x22, [x26]
	cmp	x27, x22
	b.hs	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x5, sp, #56
	mov	x0, x24
	mov	x1, x23
	ldp	x2, x3, [sp, #40]               ; 16-byte Folded Reload
	mov	x4, x28
	mov	x6, x25
	bl	_compress_owner
Lloh6:
	adrp	x8, _RETVAL_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RETVAL_OK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_25
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x21, x27
	udiv	x9, x8, x22
	msub	x22, x9, x22, x8
	mov	x0, x23
	mov	x1, x24
	mov	w2, #2
	bl	_sldns_buffer_write
	mov	x0, x23
	mov	x1, x20
	mov	w2, #2
	bl	_sldns_buffer_write
	ldr	x8, [x26, #8]
	ldr	x8, [x8, x22, lsl #3]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	subs	x8, x8, x9
	csel	x1, xzr, x8, lt
	mov	x0, x23
	bl	_sldns_buffer_write_u32
	cbnz	x19, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_sldns_buffer_remaining
	ldr	x8, [x26, #24]
	ldr	w2, [x8, x22, lsl #2]
	cmp	w0, w2
	b.lt	LBB0_26
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x26, #16]
	ldr	x1, [x8, x22, lsl #3]
	mov	x0, x23
	bl	_sldns_buffer_write
	b	LBB0_5
LBB0_10:
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cmp	w8, #0
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	ccmp	w8, #0, #4, ne
	cset	w27, ne
	b.eq	LBB0_19
; %bb.11:
	ldr	x28, [x26]
	ldr	x20, [x26, #32]
	add	x8, x20, x28
	cmp	x28, x8
	b.hs	LBB0_19
; %bb.12:
	add	x19, x24, #16
Lloh9:
	adrp	x21, _LDNS_RR_TYPE_RRSIG@GOTPAGE
Lloh10:
	ldr	x21, [x21, _LDNS_RR_TYPE_RRSIG@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	ldr	w1, [x21]
	mov	x0, x23
	bl	_sldns_buffer_write_u16
	mov	x0, x23
	mov	x1, x19
	mov	w2, #2
	bl	_sldns_buffer_write
	ldr	x8, [x26, #8]
	lsl	x22, x28, #3
	ldr	x8, [x8, x22]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	subs	x8, x8, x9
	csel	x1, xzr, x8, lt
	mov	x0, x23
	bl	_sldns_buffer_write_u32
	ldp	x8, x9, [x26, #16]
	ldr	x1, [x8, x22]
	ldr	w2, [x9, x28, lsl #2]
	mov	x0, x23
	bl	_sldns_buffer_write
	add	x28, x28, #1
	subs	x20, x20, #1
	b.eq	LBB0_19
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp, #56]
	cmp	x8, #0
	ccmp	w25, #1, #4, ne
	b.ne	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w0, [x24, #24]
	mov	x1, x23
	mov	x2, x25
	ldp	x3, x4, [sp, #40]               ; 16-byte Folded Reload
	bl	_compress_any_dname
Lloh11:
	adrp	x8, _RETVAL_OK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _RETVAL_OK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_25
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x23
	bl	_sldns_buffer_remaining
	ldr	x8, [x26, #24]
	ldr	w8, [x8, x28, lsl #2]
	add	w8, w8, #8
	cmp	w0, w8
	b.ge	LBB0_13
	b	LBB0_26
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x23
	bl	_sldns_buffer_remaining
	ldr	x8, [x26, #24]
	ldr	w8, [x8, x28, lsl #2]
	add	w8, w8, #10
	cmp	w0, w8
	b.lt	LBB0_26
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
	add	x1, sp, #56
	mov	x0, x23
	mov	w2, #2
	bl	_sldns_buffer_write
	b	LBB0_13
LBB0_19:
	ldr	x10, [sp, #16]                  ; 8-byte Folded Reload
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_21
; %bb.20:
	ldr	x8, [x26]
	ldr	x9, [x10]
	add	x8, x9, x8
	str	x8, [x10]
LBB0_21:
	cbz	w27, LBB0_23
; %bb.22:
	ldr	x8, [x26, #32]
	ldr	x9, [x10]
	add	x8, x9, x8
	str	x8, [x10]
LBB0_23:
Lloh14:
	adrp	x8, _RETVAL_OK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RETVAL_OK@GOTPAGEOFF]
LBB0_24:
	ldr	w0, [x8]
LBB0_25:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_26:
Lloh16:
	adrp	x8, _RETVAL_TRUNC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _RETVAL_TRUNC@GOTPAGEOFF]
	b	LBB0_24
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_RETVAL_OK,4,2                  ; @RETVAL_OK
	.comm	_PACKED_RRSET_FIXEDTTL,4,2      ; @PACKED_RRSET_FIXEDTTL
	.comm	_RETVAL_TRUNC,4,2               ; @RETVAL_TRUNC
	.comm	_LDNS_RR_TYPE_RRSIG,4,2         ; @LDNS_RR_TYPE_RRSIG
	.no_dead_strip	_packed_rrset_encode
.subsections_via_symbols
