	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_pkt2buffer_wire           ## -- Begin function ldns_pkt2buffer_wire
	.p2align	4, 0x90
_ldns_pkt2buffer_wire:                  ## @ldns_pkt2buffer_wire
	.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	%rsi, %rbx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ldns_dname_compare@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_ldns_rbtree_create
	movq	%rax, %r14
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_ldns_hdr2buffer_wire
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_ldns_pkt_question
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_ldns_rr_list_rr_count
	testq	%rax, %rax
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	movq	_LDNS_SECTION_QUESTION@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ldns_rr_list_rr
	movl	(%r15), %edx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r14, %rcx
	callq	_ldns_rr2buffer_wire_compress
	incq	%rbx
	movq	%r12, %rdi
	callq	_ldns_rr_list_rr_count
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_ldns_pkt_answer
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_ldns_rr_list_rr_count
	testq	%rax, %rax
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	movq	_LDNS_SECTION_ANSWER@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ldns_rr_list_rr
	movl	(%r15), %edx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r14, %rcx
	callq	_ldns_rr2buffer_wire_compress
	incq	%rbx
	movq	%r12, %rdi
	callq	_ldns_rr_list_rr_count
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_ldns_pkt_authority
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_ldns_rr_list_rr_count
	testq	%rax, %rax
	jle	LBB0_12
## %bb.10:
	xorl	%ebx, %ebx
	movq	_LDNS_SECTION_AUTHORITY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ldns_rr_list_rr
	movl	(%r15), %edx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r14, %rcx
	callq	_ldns_rr2buffer_wire_compress
	incq	%rbx
	movq	%r12, %rdi
	callq	_ldns_rr_list_rr_count
	cmpq	%rax, %rbx
	jl	LBB0_11
LBB0_12:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_ldns_pkt_additional
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_ldns_rr_list_rr_count
	testq	%rax, %rax
	jle	LBB0_16
## %bb.14:
	xorl	%ebx, %ebx
	movq	_LDNS_SECTION_ADDITIONAL@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ldns_rr_list_rr
	movl	(%r15), %edx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r14, %rcx
	callq	_ldns_rr2buffer_wire_compress
	incq	%rbx
	movq	%r12, %rdi
	callq	_ldns_rr_list_rr_count
	cmpq	%rax, %rbx
	jl	LBB0_15
LBB0_16:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_ldns_pkt_edns
	testq	%rax, %rax
	je	LBB0_24
## %bb.17:
	xorl	%eax, %eax
	callq	_ldns_rr_new
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:
	movq	%rax, %r12
	movq	_LDNS_RDF_TYPE_DNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_ldns_rdf_new_frm_str
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_ldns_rr_set_owner
	movq	_LDNS_RR_TYPE_OPT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ldns_rr_set_type
	movq	%rbx, %rdi
	callq	_ldns_pkt_edns_udp_size
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_ldns_rr_set_class
	movq	%rbx, %rdi
	callq	_ldns_pkt_edns_extended_rcode
	movl	%eax, -64(%rbp)
	movq	%rbx, %rdi
	callq	_ldns_pkt_edns_version
	movl	%eax, -60(%rbp)
	leaq	-56(%rbp), %r15
	movq	%rbx, %rdi
	callq	_ldns_pkt_edns_z
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_ldns_write_uint16
	leaq	-64(%rbp), %rdi
	callq	_ldns_read_uint32
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_ldns_rr_set_ttl
	movl	(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	callq	_ldns_rr_push_rdf
LBB0_21:
	movq	_LDNS_SECTION_ADDITIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r14, %rcx
	callq	_ldns_rr2buffer_wire_compress
	cmpl	$0, (%rbx)
	je	LBB0_23
## %bb.22:
	movq	%r12, %rdi
	callq	_ldns_rr_pop_rdf
LBB0_23:
	movq	%r12, %rdi
	callq	_ldns_rr_free
LBB0_24:
	movq	%rbx, %rdi
	callq	_ldns_pkt_tsig
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	%rbx, %rdi
	callq	_ldns_pkt_tsig
	movq	_LDNS_SECTION_ADDITIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r13, %rdi
	movq	%rax, %rsi
	movq	%r14, %rcx
	callq	_ldns_rr2buffer_wire_compress
LBB0_26:
	movq	_compression_node_free@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_ldns_traverse_postorder
	movq	%r14, %rdi
	callq	_ldns_rbtree_free
	movq	_LDNS_STATUS_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_27
LBB0_18:
	movq	_LDNS_STATUS_MEM_ERR@GOTPCREL(%rip), %rax
LBB0_27:
	movl	(%rax), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_29
## %bb.28:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ldns_dname_compare,8,3         ## @ldns_dname_compare
	.comm	_LDNS_SECTION_QUESTION,4,2      ## @LDNS_SECTION_QUESTION
	.comm	_LDNS_SECTION_ANSWER,4,2        ## @LDNS_SECTION_ANSWER
	.comm	_LDNS_SECTION_AUTHORITY,4,2     ## @LDNS_SECTION_AUTHORITY
	.comm	_LDNS_SECTION_ADDITIONAL,4,2    ## @LDNS_SECTION_ADDITIONAL
	.comm	_LDNS_STATUS_MEM_ERR,4,2        ## @LDNS_STATUS_MEM_ERR
	.comm	_LDNS_RDF_TYPE_DNAME,4,2        ## @LDNS_RDF_TYPE_DNAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

	.comm	_LDNS_RR_TYPE_OPT,4,2           ## @LDNS_RR_TYPE_OPT
	.comm	_compression_node_free,4,2      ## @compression_node_free
	.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_pkt2buffer_wire           ; -- Begin function ldns_pkt2buffer_wire
	.p2align	2
_ldns_pkt2buffer_wire:                  ; @ldns_pkt2buffer_wire
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _ldns_dname_compare@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ldns_dname_compare@GOTPAGEOFF]
Lloh5:
	ldr	x0, [x8]
	bl	_ldns_rbtree_create
	mov	x19, x0
	mov	x0, x20
	mov	x1, x21
	bl	_ldns_hdr2buffer_wire
	mov	x0, x21
	bl	_ldns_pkt_question
	cbz	x0, LBB0_4
; %bb.1:
	mov	x22, x0
	bl	_ldns_rr_list_rr_count
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x23, #0
Lloh6:
	adrp	x24, _LDNS_SECTION_QUESTION@GOTPAGE
Lloh7:
	ldr	x24, [x24, _LDNS_SECTION_QUESTION@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_ldns_rr_list_rr
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x20
	mov	x3, x19
	bl	_ldns_rr2buffer_wire_compress
	add	x23, x23, #1
	mov	x0, x22
	bl	_ldns_rr_list_rr_count
	cmp	x23, x0
	b.lt	LBB0_3
LBB0_4:
	mov	x0, x21
	bl	_ldns_pkt_answer
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
	bl	_ldns_rr_list_rr_count
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x23, #0
Lloh8:
	adrp	x24, _LDNS_SECTION_ANSWER@GOTPAGE
Lloh9:
	ldr	x24, [x24, _LDNS_SECTION_ANSWER@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_ldns_rr_list_rr
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x20
	mov	x3, x19
	bl	_ldns_rr2buffer_wire_compress
	add	x23, x23, #1
	mov	x0, x22
	bl	_ldns_rr_list_rr_count
	cmp	x23, x0
	b.lt	LBB0_7
LBB0_8:
	mov	x0, x21
	bl	_ldns_pkt_authority
	cbz	x0, LBB0_12
; %bb.9:
	mov	x22, x0
	bl	_ldns_rr_list_rr_count
	cmp	x0, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x23, #0
Lloh10:
	adrp	x24, _LDNS_SECTION_AUTHORITY@GOTPAGE
Lloh11:
	ldr	x24, [x24, _LDNS_SECTION_AUTHORITY@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_ldns_rr_list_rr
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x20
	mov	x3, x19
	bl	_ldns_rr2buffer_wire_compress
	add	x23, x23, #1
	mov	x0, x22
	bl	_ldns_rr_list_rr_count
	cmp	x23, x0
	b.lt	LBB0_11
LBB0_12:
	mov	x0, x21
	bl	_ldns_pkt_additional
	cbz	x0, LBB0_16
; %bb.13:
	mov	x22, x0
	bl	_ldns_rr_list_rr_count
	cmp	x0, #1
	b.lt	LBB0_16
; %bb.14:
	mov	x23, #0
Lloh12:
	adrp	x24, _LDNS_SECTION_ADDITIONAL@GOTPAGE
Lloh13:
	ldr	x24, [x24, _LDNS_SECTION_ADDITIONAL@GOTPAGEOFF]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x23
	bl	_ldns_rr_list_rr
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x20
	mov	x3, x19
	bl	_ldns_rr2buffer_wire_compress
	add	x23, x23, #1
	mov	x0, x22
	bl	_ldns_rr_list_rr_count
	cmp	x23, x0
	b.lt	LBB0_15
LBB0_16:
	mov	x0, x21
	bl	_ldns_pkt_edns
	cbz	x0, LBB0_23
; %bb.17:
	bl	_ldns_rr_new
	cbz	x0, LBB0_26
; %bb.18:
	mov	x22, x0
Lloh14:
	adrp	x8, _LDNS_RDF_TYPE_DNAME@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LDNS_RDF_TYPE_DNAME@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ldns_rdf_new_frm_str
	mov	x1, x0
	mov	x0, x22
	bl	_ldns_rr_set_owner
Lloh19:
	adrp	x8, _LDNS_RR_TYPE_OPT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LDNS_RR_TYPE_OPT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_ldns_rr_set_type
	mov	x0, x21
	bl	_ldns_pkt_edns_udp_size
	mov	x1, x0
	mov	x0, x22
	bl	_ldns_rr_set_class
	mov	x0, x21
	bl	_ldns_pkt_edns_extended_rcode
	str	w0, [sp, #8]
	mov	x0, x21
	bl	_ldns_pkt_edns_version
	str	w0, [sp, #12]
	add	x8, sp, #8
	add	x23, x8, #8
	mov	x0, x21
	bl	_ldns_pkt_edns_z
	mov	x1, x0
	mov	x0, x23
	bl	_ldns_write_uint16
	add	x0, sp, #8
	bl	_ldns_read_uint32
	mov	x1, x0
	mov	x0, x22
	bl	_ldns_rr_set_ttl
	ldr	w1, [x21]
	cbz	w1, LBB0_20
; %bb.19:
	mov	x0, x22
	bl	_ldns_rr_push_rdf
LBB0_20:
Lloh22:
	adrp	x8, _LDNS_SECTION_ADDITIONAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LDNS_SECTION_ADDITIONAL@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x22
	mov	x3, x19
	bl	_ldns_rr2buffer_wire_compress
	ldr	w8, [x21]
	cbz	w8, LBB0_22
; %bb.21:
	mov	x0, x22
	bl	_ldns_rr_pop_rdf
LBB0_22:
	mov	x0, x22
	bl	_ldns_rr_free
LBB0_23:
	mov	x0, x21
	bl	_ldns_pkt_tsig
	cbz	x0, LBB0_25
; %bb.24:
	mov	x0, x21
	bl	_ldns_pkt_tsig
	mov	x1, x0
Lloh25:
	adrp	x8, _LDNS_SECTION_ADDITIONAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LDNS_SECTION_ADDITIONAL@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x19
	bl	_ldns_rr2buffer_wire_compress
LBB0_25:
Lloh28:
	adrp	x8, _compression_node_free@GOTPAGE
Lloh29:
	ldr	x8, [x8, _compression_node_free@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_ldns_traverse_postorder
	mov	x0, x19
	bl	_ldns_rbtree_free
Lloh31:
	adrp	x8, _LDNS_STATUS_OK@GOTPAGE
Lloh32:
	ldr	x8, [x8, _LDNS_STATUS_OK@GOTPAGEOFF]
	b	LBB0_27
LBB0_26:
Lloh33:
	adrp	x8, _LDNS_STATUS_MEM_ERR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _LDNS_STATUS_MEM_ERR@GOTPAGEOFF]
LBB0_27:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]
Lloh35:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh36:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_29
; %bb.28:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_29:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_ldns_dname_compare,8,3         ; @ldns_dname_compare
	.comm	_LDNS_SECTION_QUESTION,4,2      ; @LDNS_SECTION_QUESTION
	.comm	_LDNS_SECTION_ANSWER,4,2        ; @LDNS_SECTION_ANSWER
	.comm	_LDNS_SECTION_AUTHORITY,4,2     ; @LDNS_SECTION_AUTHORITY
	.comm	_LDNS_SECTION_ADDITIONAL,4,2    ; @LDNS_SECTION_ADDITIONAL
	.comm	_LDNS_STATUS_MEM_ERR,4,2        ; @LDNS_STATUS_MEM_ERR
	.comm	_LDNS_RDF_TYPE_DNAME,4,2        ; @LDNS_RDF_TYPE_DNAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

	.comm	_LDNS_RR_TYPE_OPT,4,2           ; @LDNS_RR_TYPE_OPT
	.comm	_compression_node_free,4,2      ; @compression_node_free
	.comm	_LDNS_STATUS_OK,4,2             ; @LDNS_STATUS_OK
.subsections_via_symbols
