	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_atma_buf        ## -- Begin function sldns_str2wire_atma_buf
	.p2align	4, 0x90
_sldns_str2wire_atma_buf:               ## @sldns_str2wire_atma_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
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	callq	_strlen
	movq	_LDNS_MAX_RDFLEN@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	addq	%rcx, %rcx
	cmpq	%rcx, %rax
	jbe	LBB0_1
## %bb.6:
	movq	_LDNS_WIREPARSE_ERR_LABEL_OVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_1:
	movb	(%r12), %al
	testb	%al, %al
	je	LBB0_2
## %bb.5:
	movl	%r12d, %ecx
	negl	%ecx
	xorl	%r14d, %r14d
	movq	%r12, %r13
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
LBB0_23:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	leal	(%rcx,%r13), %ebx
	incq	%r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	movzbl	(%r13), %eax
	incl	%ebx
	incq	%r13
	testb	%al, %al
	je	LBB0_10
LBB0_7:                                 ##   Parent Loop BB0_23 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	%al, %edi
	callq	_isspace
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movzbl	-1(%r13), %eax
	cmpb	$46, %al
	je	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_23 Depth=1
	movzbl	%al, %edi
	callq	_isxdigit
	testl	%eax, %eax
	je	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_23 Depth=1
	movq	%r15, %rax
	movq	%r14, %r15
	shrq	%r15
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	cmpq	%r15, (%rax)
	jbe	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_23 Depth=1
	movsbl	-1(%r13), %edi
	callq	_sldns_hexdigit_to_int
	testb	$1, %r14b
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_23 Depth=1
	shll	$4, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%eax, (%rbx,%r15,4)
	jmp	LBB0_22
LBB0_21:                                ##   in Loop: Header=BB0_23 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	addl	%eax, (%rbx,%r15,4)
LBB0_22:                                ##   in Loop: Header=BB0_23 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	incq	%r14
	movb	(%r13), %al
	testb	%al, %al
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_23
	jmp	LBB0_11
LBB0_10:
	decq	%r13
LBB0_11:
	testb	$1, %r14b
	je	LBB0_3
## %bb.12:
	movq	_LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subl	%r12d, %r13d
	movl	%r13d, %esi
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_RET_ERR                        ## TAILCALL
LBB0_2:
	xorl	%r14d, %r14d
LBB0_3:
	shrq	%r14
	movq	%r14, (%r15)
	movq	_LDNS_WIREPARSE_ERR_OK@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_18:
	movq	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %edi
	movl	%ebx, %esi
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.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_atma_buf        ; -- Begin function sldns_str2wire_atma_buf
	.p2align	2
_sldns_str2wire_atma_buf:               ; @sldns_str2wire_atma_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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	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_2
; %bb.1:
Lloh3:
	adrp	x8, _LDNS_WIREPARSE_ERR_LABEL_OVERFLOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_LABEL_OVERFLOW@GOTPAGEOFF]
	b	LBB0_20
LBB0_2:
	ldrb	w8, [x20]
	cbz	w8, LBB0_18
; %bb.3:
	mov	x23, #0
	neg	w25, w20
	mov	x24, x20
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	add	w22, w25, w24
	add	x24, x24, #1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	ldrb	w8, [x24], #1
	add	w22, w22, #1
	cbz	w8, LBB0_14
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w0, w8, #0xff
	bl	_isspace
	cbnz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldurb	w0, [x24, #-1]
	cmp	w0, #46
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_isxdigit
	cbz	w0, LBB0_21
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19]
	lsr	x26, x23, #1
	cmp	x8, x26
	b.ls	LBB0_22
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldursb	w0, [x24, #-1]
	bl	_sldns_hexdigit_to_int
	tbnz	w23, #0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	lsl	w8, w0, #4
	str	w8, [x21, x26, lsl #2]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	x8, x26, #2
	ldr	w9, [x21, x8]
	add	w9, w9, w0
	str	w9, [x21, x8]
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	ldrb	w8, [x24]
	cbnz	w8, LBB0_4
	b	LBB0_15
LBB0_14:
	sub	x24, x24, #1
LBB0_15:
	tbz	w23, #0, LBB0_19
; %bb.16:
Lloh5:
	adrp	x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	sub	w1, w24, w20
LBB0_17:
	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_18:
	mov	x23, #0
LBB0_19:
	lsr	x8, x23, #1
	str	x8, [x19]
Lloh8:
	adrp	x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGEOFF]
LBB0_20:
	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_21:
Lloh10:
	adrp	x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:
Lloh12:
	adrp	x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGEOFF]
LBB0_23:
	ldr	w0, [x8]
	mov	x1, x22
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.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
