	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ldns_dname_compare             ## -- Begin function ldns_dname_compare
	.p2align	4, 0x90
_ldns_dname_compare:                    ## @ldns_dname_compare
	.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
	xorl	%r15d, %r15d
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rax
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	orq	%rsi, %rax
	je	LBB0_39
## %bb.1:
	cmpq	$0, -80(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_38
## %bb.2:
	movq	-104(%rbp), %r12                ## 8-byte Reload
	testq	%r12, %r12
	je	LBB0_38
## %bb.3:
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_ldns_rdf_get_type
	movq	_LDNS_RDF_TYPE_DNAME@GOTPCREL(%rip), %r14
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	sete	%dil
	callq	_assert
	movq	%r12, %rdi
	callq	_ldns_rdf_get_type
	xorl	%edi, %edi
	cmpq	(%r14), %rax
	sete	%dil
	callq	_assert
	movq	%r15, %rdi
	callq	_ldns_dname_label_count
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_ldns_dname_label_count
	xorl	%edx, %edx
	movq	%rbx, %rcx
	orq	%rax, %rcx
	sete	%dl
	decl	%edx
	movl	$1, %r15d
	movq	%rbx, %rcx
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	cmovel	%edx, %r15d
	je	LBB0_39
## %bb.4:
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_39
## %bb.5:
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rax
	addq	$-2, %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	leaq	-2(%r14), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	leal	3(%r12), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	leal	3(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %r13
	jmp	LBB0_7
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%r15
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	addb	$3, %al
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addb	$3, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
	movq	%rsi, %rax
	orq	%r13, %rax
	movq	%r13, %r14
	movq	%rsi, %r13
	movq	%rsi, %r12
	je	LBB0_39
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
                                        ##     Child Loop BB0_14 Depth 2
                                        ##     Child Loop BB0_18 Depth 2
                                        ##     Child Loop BB0_23 Depth 2
                                        ##     Child Loop BB0_26 Depth 2
	leaq	-1(%r14), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_ldns_rdf_data
	movq	%rax, %rbx
	decq	%r13
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	subq	%r15, %rax
	movl	%r15d, %ecx
	notl	%ecx
	addl	-96(%rbp), %ecx                 ## 4-byte Folded Reload
	testb	$3, %cl
	je	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movzbl	-48(%rbp), %ecx                 ## 1-byte Folded Reload
	andl	$3, %ecx
	negq	%rcx
	movl	$1, %edx
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%rbx), %rsi
	leaq	(%rbx,%rsi,4), %rbx
	addq	$4, %rbx
	leaq	(%rcx,%rdx), %rsi
	incq	%rsi
	incq	%rdx
	cmpq	$1, %rsi
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	subq	%rdx, %r12
	cmpq	$3, %rax
	jae	LBB0_14
	jmp	LBB0_15
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %r12
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	cmpq	$3, %rax
	jb	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%rbx), %rax
	leaq	(%rbx,%rax,4), %rcx
	movslq	4(%rbx,%rax,4), %rax
	leaq	(%rcx,%rax,4), %rdx
	addq	$4, %rdx
	movslq	8(%rcx,%rax,4), %rax
	leaq	(%rdx,%rax,4), %rcx
	addq	$4, %rcx
	movslq	8(%rdx,%rax,4), %rax
	leaq	(%rcx,%rax,4), %rbx
	addq	$8, %rbx
	addq	$-4, %r12
	jne	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_ldns_rdf_data
	movq	%rax, %r12
	testq	%r13, %r13
	je	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rcx
	notq	%rcx
	addq	-88(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	-112(%rbp), %rax                ## 8-byte Reload
	subq	%r15, %rax
	testb	$3, %cl
	je	LBB0_21
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	movzbl	-44(%rbp), %ecx                 ## 1-byte Folded Reload
	andl	$3, %ecx
	negq	%rcx
	movl	$1, %edx
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%r12), %rsi
	leaq	(%r12,%rsi,4), %r12
	addq	$4, %r12
	leaq	(%rcx,%rdx), %rsi
	incq	%rsi
	incq	%rdx
	cmpq	$1, %rsi
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_7 Depth=1
	subq	%rdx, %r14
	jmp	LBB0_22
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_24
LBB0_21:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %r14
LBB0_22:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$3, %rax
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	jb	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%r12), %rax
	leaq	(%r12,%rax,4), %rcx
	movslq	4(%r12,%rax,4), %rax
	leaq	(%rcx,%rax,4), %rdx
	addq	$4, %rdx
	movslq	8(%rcx,%rax,4), %rax
	leaq	(%rdx,%rax,4), %rcx
	addq	$4, %rcx
	movslq	8(%rdx,%rax,4), %rax
	leaq	(%rcx,%rax,4), %r12
	addq	$8, %r12
	addq	$-4, %r14
	jne	LBB0_23
LBB0_24:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	(%rbx), %eax
	leal	-1(%rax), %ecx
	cmpl	$-3, %ecx
	ja	LBB0_31
## %bb.25:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_26:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movslq	(%r12), %rax
	movl	$1, %r15d
	cmpq	%rax, %r13
	ja	LBB0_39
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=2
	movl	(%rbx,%r13,4), %edi
	callq	_LDNS_DNAME_NORMALIZE
	movq	%rax, %r14
	movl	(%r12,%r13,4), %edi
	callq	_LDNS_DNAME_NORMALIZE
	cmpq	%rax, %r14
	jl	LBB0_38
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=2
	movl	(%rbx,%r13,4), %edi
	callq	_LDNS_DNAME_NORMALIZE
	movq	%rax, %r14
	movl	(%r12,%r13,4), %edi
	callq	_LDNS_DNAME_NORMALIZE
	cmpq	%rax, %r14
	jg	LBB0_39
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=2
	incq	%r13
	movslq	(%rbx), %rax
	leaq	1(%rax), %rcx
	cmpq	%rcx, %r13
	jb	LBB0_26
## %bb.30:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-56(%rbp), %r13                 ## 8-byte Reload
LBB0_31:                                ##   in Loop: Header=BB0_7 Depth=1
	testq	%rsi, %rsi
	sete	%cl
	testq	%r13, %r13
	setne	%dl
	cmpl	(%r12), %eax
	jl	LBB0_38
## %bb.32:                              ##   in Loop: Header=BB0_7 Depth=1
	andb	%dl, %cl
	jne	LBB0_38
## %bb.33:                              ##   in Loop: Header=BB0_7 Depth=1
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.34:                              ##   in Loop: Header=BB0_7 Depth=1
	testq	%r13, %r13
	jne	LBB0_6
## %bb.35:
	movl	$1, %r15d
	jmp	LBB0_39
LBB0_38:
	movl	$-1, %r15d
LBB0_39:
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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_dname_compare             ; -- Begin function ldns_dname_compare
	.p2align	2
_ldns_dname_compare:                    ; @ldns_dname_compare
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	orr	x8, x0, x1
	cbz	x8, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	w0, #-1
	cbz	x20, LBB0_6
; %bb.2:
	mov	x19, x1
	cbz	x1, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_ldns_rdf_get_type
Lloh0:
	adrp	x21, _LDNS_RDF_TYPE_DNAME@GOTPAGE
Lloh1:
	ldr	x21, [x21, _LDNS_RDF_TYPE_DNAME@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	bl	_ldns_rdf_get_type
	ldr	x8, [x21]
	cmp	x0, x8
	cset	w0, eq
	bl	_assert
	mov	x0, x20
	bl	_ldns_dname_label_count
	mov	x22, x0
	mov	x0, x19
	bl	_ldns_dname_label_count
	mov	x23, x0
	orr	x8, x22, x0
	cmp	x8, #0
	mov	w8, #-1
	cinc	w8, w8, eq
	cmp	x22, #0
	csinc	w0, w8, wzr, eq
	cbz	x22, LBB0_6
; %bb.4:
	cbnz	x23, LBB0_8
	b	LBB0_6
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #0
	mov	x23, x24
	orr	x8, x25, x24
	cbz	x8, LBB0_6
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
                                        ;     Child Loop BB0_16 Depth 2
	sub	x24, x23, #1
	sub	x25, x22, #1
	mov	x0, x20
	bl	_ldns_rdf_data
	mov	x21, x0
	cbz	x25, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w8, #1
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x9, [x21]
	add	x9, x21, x9, lsl #2
	add	x21, x9, #4
	add	x8, x8, #1
	cmp	x22, x8
	b.ne	LBB0_10
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	bl	_ldns_rdf_data
	mov	x22, x0
	cbz	x24, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w8, #1
LBB0_13:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x9, [x22]
	add	x9, x22, x9, lsl #2
	add	x22, x9, #4
	add	x8, x8, #1
	cmp	x23, x8
	b.ne	LBB0_13
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w8, [x21]
	sub	w9, w8, #1
	cmn	w9, #3
	b.hi	LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w26, #1
LBB0_16:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrsw	x8, [x22]
	cmp	x26, x8
	b.hi	LBB0_24
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	lsl	x27, x26, #2
	ldr	w0, [x21, x27]
	bl	_LDNS_DNAME_NORMALIZE
	mov	x23, x0
	ldr	w0, [x22, x27]
	bl	_LDNS_DNAME_NORMALIZE
	cmp	x23, x0
	b.lt	LBB0_25
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=2
	ldr	w0, [x21, x27]
	bl	_LDNS_DNAME_NORMALIZE
	mov	x23, x0
	ldr	w0, [x22, x27]
	bl	_LDNS_DNAME_NORMALIZE
	cmp	x23, x0
	b.gt	LBB0_24
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=2
	add	x26, x26, #1
	ldrsw	x8, [x21]
	add	x9, x8, #1
	cmp	x26, x9
	b.lo	LBB0_16
LBB0_20:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	x25, #0
	ldr	w10, [x22]
	ccmp	x24, #0, #4, eq
	cset	w9, ne
	mov	w0, #-1
	cmp	w8, w10
	b.lt	LBB0_6
; %bb.21:                               ;   in Loop: Header=BB0_8 Depth=1
	tbnz	w9, #0, LBB0_6
; %bb.22:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x22, x25
	cbz	x25, LBB0_7
; %bb.23:                               ;   in Loop: Header=BB0_8 Depth=1
	cbnz	x24, LBB0_7
LBB0_24:
	mov	w0, #1
	b	LBB0_6
LBB0_25:
	mov	w0, #-1
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_RDF_TYPE_DNAME,8,3        ; @LDNS_RDF_TYPE_DNAME
.subsections_via_symbols
