	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_nsap_buf        ## -- Begin function sldns_str2wire_nsap_buf
	.p2align	4, 0x90
_sldns_str2wire_nsap_buf:               ## @sldns_str2wire_nsap_buf
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpb	$48, (%rdi)
	jne	LBB0_2
## %bb.1:
	movq	%rdi, %r15
	cmpb	$120, 1(%rdi)
	jne	LBB0_2
## %bb.3:
	movq	%rdx, %r14
	movq	%rsi, %r12
	leaq	2(%r15), %r13
	movq	%r13, %rdi
	callq	_strlen
	movq	_LDNS_MAX_RDFLEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%rcx, %rcx
	cmpq	%rcx, %rax
	jbe	LBB0_4
## %bb.9:
	movq	_LDNS_WIREPARSE_ERR_LABEL_OVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	_LDNS_WIREPARSE_ERR_INVALID_STR@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movb	(%r13), %al
	testb	%al, %al
	je	LBB0_5
## %bb.8:
	movl	%r15d, %edx
	negl	%edx
	xorl	%ecx, %ecx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
LBB0_26:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	leal	(%rdx,%r13), %ebx
	incq	%r13
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=2
	movzbl	(%r13), %eax
	incl	%ebx
	incq	%r13
	testb	%al, %al
	je	LBB0_13
LBB0_10:                                ##   Parent Loop BB0_26 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	%al, %edi
	callq	_isspace
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movzbl	-1(%r13), %eax
	cmpb	$46, %al
	je	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_26 Depth=1
	movzbl	%al, %edi
	callq	_isxdigit
	testl	%eax, %eax
	je	LBB0_17
## %bb.20:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	%r14, %rax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	shrq	%r14
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpq	%r14, (%rax)
	jbe	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_26 Depth=1
	movsbl	-1(%r13), %edi
	callq	_sldns_hexdigit_to_int
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testb	$1, %cl
	jne	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_26 Depth=1
	shll	$4, %eax
	movl	%eax, (%r12,%r14,4)
	jmp	LBB0_25
LBB0_24:                                ##   in Loop: Header=BB0_26 Depth=1
	addl	%eax, (%r12,%r14,4)
LBB0_25:                                ##   in Loop: Header=BB0_26 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	incq	%rcx
	movb	(%r13), %al
	testb	%al, %al
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_26
	jmp	LBB0_14
LBB0_13:
	decq	%r13
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
LBB0_14:
	testb	$1, %cl
	je	LBB0_6
## %bb.15:
	movq	_LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subl	%r15d, %r13d
	movl	%r13d, %esi
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RET_ERR                        ## TAILCALL
LBB0_5:
	xorl	%ecx, %ecx
LBB0_6:
	shrq	%rcx
	movq	%rcx, (%r14)
	movq	_LDNS_WIREPARSE_ERR_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_17:
	movq	_LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_21:
	movq	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %edi
	movl	%ebx, %esi
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_WIREPARSE_ERR_INVALID_STR,4,2 ## @LDNS_WIREPARSE_ERR_INVALID_STR
	.comm	_LDNS_MAX_RDFLEN,4,2            ## @LDNS_MAX_RDFLEN
	.comm	_LDNS_WIREPARSE_ERR_LABEL_OVERFLOW,4,2 ## @LDNS_WIREPARSE_ERR_LABEL_OVERFLOW
	.comm	_LDNS_WIREPARSE_ERR_SYNTAX_HEX,4,2 ## @LDNS_WIREPARSE_ERR_SYNTAX_HEX
	.comm	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL,4,2 ## @LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL
	.comm	_LDNS_WIREPARSE_ERR_OK,4,2      ## @LDNS_WIREPARSE_ERR_OK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_nsap_buf        ; -- Begin function sldns_str2wire_nsap_buf
	.p2align	2
_sldns_str2wire_nsap_buf:               ; @sldns_str2wire_nsap_buf
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldrb	w8, [x0]
	cmp	w8, #48
	b.ne	LBB0_4
; %bb.1:
	mov	x20, x0
	ldrb	w8, [x0, #1]
	cmp	w8, #120
	b.ne	LBB0_4
; %bb.2:
	mov	x19, x2
	mov	x22, x1
	add	x21, x20, #2
	mov	x0, x21
	bl	_strlen
Lloh0:
	adrp	x8, _LDNS_MAX_RDFLEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_MAX_RDFLEN@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	cmp	x0, x8, lsl #1
	b.ls	LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _LDNS_WIREPARSE_ERR_LABEL_OVERFLOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_LABEL_OVERFLOW@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh5:
	adrp	x8, _LDNS_WIREPARSE_ERR_INVALID_STR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_INVALID_STR@GOTPAGEOFF]
LBB0_5:
	ldr	w0, [x8]
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldrb	w8, [x21]
	cbz	w8, LBB0_22
; %bb.7:
	mov	x24, #0
	neg	w25, w20
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	add	w23, w25, w21
	add	x21, x21, #1
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldrb	w8, [x21], #1
	add	w23, w23, #1
	cbz	w8, LBB0_18
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w0, w8, #0xff
	bl	_isspace
	cbnz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldurb	w0, [x21, #-1]
	cmp	w0, #46
	b.eq	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	bl	_isxdigit
	cbz	w0, LBB0_24
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19]
	lsr	x26, x24, #1
	cmp	x8, x26
	b.ls	LBB0_25
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
	ldursb	w0, [x21, #-1]
	bl	_sldns_hexdigit_to_int
	tbnz	w24, #0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
	lsl	w8, w0, #4
	str	w8, [x22, x26, lsl #2]
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=1
	lsl	x8, x26, #2
	ldr	w9, [x22, x8]
	add	w9, w9, w0
	str	w9, [x22, x8]
LBB0_17:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x24, x24, #1
	ldrb	w8, [x21]
	cbnz	w8, LBB0_8
	b	LBB0_19
LBB0_18:
	sub	x21, x21, #1
LBB0_19:
	tbz	w24, #0, LBB0_23
; %bb.20:
Lloh7:
	adrp	x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	sub	w1, w21, w20
LBB0_21:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_RET_ERR
LBB0_22:
	mov	x24, #0
LBB0_23:
	lsr	x8, x24, #1
	str	x8, [x19]
Lloh10:
	adrp	x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGEOFF]
	b	LBB0_5
LBB0_24:
Lloh12:
	adrp	x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGEOFF]
	b	LBB0_26
LBB0_25:
Lloh14:
	adrp	x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGEOFF]
LBB0_26:
	ldr	w0, [x8]
	mov	x1, x23
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_WIREPARSE_ERR_INVALID_STR,4,2 ; @LDNS_WIREPARSE_ERR_INVALID_STR
	.comm	_LDNS_MAX_RDFLEN,4,2            ; @LDNS_MAX_RDFLEN
	.comm	_LDNS_WIREPARSE_ERR_LABEL_OVERFLOW,4,2 ; @LDNS_WIREPARSE_ERR_LABEL_OVERFLOW
	.comm	_LDNS_WIREPARSE_ERR_SYNTAX_HEX,4,2 ; @LDNS_WIREPARSE_ERR_SYNTAX_HEX
	.comm	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL,4,2 ; @LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL
	.comm	_LDNS_WIREPARSE_ERR_OK,4,2      ; @LDNS_WIREPARSE_ERR_OK
.subsections_via_symbols
