	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_rdf2buffer_wire_canonical ## -- Begin function ldns_rdf2buffer_wire_canonical
	.p2align	4, 0x90
_ldns_rdf2buffer_wire_canonical:        ## @ldns_rdf2buffer_wire_canonical
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_ldns_rdf_get_type
	movq	%rax, %r12
	movq	_LDNS_RDF_TYPE_DNAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r15, %rdi
	callq	_ldns_rdf_size
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ldns_buffer_reserve
	cmpq	%rbx, %r12
	jne	LBB0_5
## %bb.1:
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%r15, %rdi
	callq	_ldns_rdf_data
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_ldns_rdf_size
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rbx,8), %edi
	callq	_LDNS_DNAME_NORMALIZE
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_ldns_buffer_write_u8
	incq	%rbx
	movq	%r15, %rdi
	callq	_ldns_rdf_size
	cmpq	%rax, %rbx
	jb	LBB0_4
	jmp	LBB0_7
LBB0_5:
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_ldns_rdf_data
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_ldns_rdf_size
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%rax, %rdx
	callq	_ldns_buffer_write
LBB0_7:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ldns_buffer_status             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_RDF_TYPE_DNAME,8,3        ## @LDNS_RDF_TYPE_DNAME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_rdf2buffer_wire_canonical ; -- Begin function ldns_rdf2buffer_wire_canonical
	.p2align	2
_ldns_rdf2buffer_wire_canonical:        ; @ldns_rdf2buffer_wire_canonical
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_ldns_rdf_get_type
	mov	x21, x0
Lloh0:
	adrp	x8, _LDNS_RDF_TYPE_DNAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_RDF_TYPE_DNAME@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	mov	x0, x20
	bl	_ldns_rdf_size
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_buffer_reserve
	cmp	x21, x22
	b.ne	LBB0_5
; %bb.1:
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x20
	bl	_ldns_rdf_data
	mov	x21, x0
	mov	x0, x20
	bl	_ldns_rdf_size
	cbz	x0, LBB0_7
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21, x22, lsl #3]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_LDNS_DNAME_NORMALIZE
	mov	x1, x0
	mov	x0, x19
	bl	_ldns_buffer_write_u8
	add	x22, x22, #1
	mov	x0, x20
	bl	_ldns_rdf_size
	cmp	x22, x0
	b.lo	LBB0_4
	b	LBB0_7
LBB0_5:
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_ldns_rdf_data
	mov	x21, x0
	mov	x0, x20
	bl	_ldns_rdf_size
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_ldns_buffer_write
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ldns_buffer_status
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_RDF_TYPE_DNAME,8,3        ; @LDNS_RDF_TYPE_DNAME
.subsections_via_symbols
