	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_hex_buf         ## -- Begin function sldns_str2wire_hex_buf
	.p2align	4, 0x90
_sldns_str2wire_hex_buf:                ## @sldns_str2wire_hex_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, -48(%rbp)                 ## 8-byte Spill
	movb	(%rdi), %al
	testb	%al, %al
	je	LBB0_1
## %bb.4:
	movq	%rsi, %r12
	movl	%edi, %r15d
	negl	%r15d
	xorl	%r14d, %r14d
	movq	%rdi, %rcx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	leal	(%r15,%r13), %ebx
	incq	%r13
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	%al, %edi
	callq	_isspace
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movzbl	(%r13), %eax
	incl	%ebx
	incq	%r13
	testb	%al, %al
	jne	LBB0_6
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	testq	%r14, %r14
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$48, -1(%r13)
	jne	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	callq	_sldns_is_last_of_string
	testq	%rax, %rax
	jne	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movzbl	-1(%r13), %edi
	callq	_isxdigit
	testl	%eax, %eax
	je	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %r15
	movq	%r14, %r12
	shrq	%r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%r12, (%rax)
	jbe	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_5 Depth=1
	movsbl	-1(%r13), %edi
	callq	_sldns_hexdigit_to_int
	testb	$1, %r14b
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=1
	shll	$4, %eax
	movl	%eax, (%r15,%r12,4)
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_5 Depth=1
	addl	%eax, (%r15,%r12,4)
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %r12
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	incq	%r14
	movb	(%r13), %al
	testb	%al, %al
	jne	LBB0_5
	jmp	LBB0_23
LBB0_8:
	decq	%r13
LBB0_23:
	testb	$1, %r14b
	je	LBB0_2
## %bb.24:
	movq	_LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subl	-64(%rbp), %r13d                ## 4-byte Folded Reload
	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_1:
	xorl	%r14d, %r14d
LBB0_2:
	shrq	%r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
LBB0_3:
	movq	_LDNS_WIREPARSE_ERR_OK@GOTPCREL(%rip), %rax
	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
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_WIREPARSE_ERR_OK,4,2      ## @LDNS_WIREPARSE_ERR_OK
	.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
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_hex_buf         ; -- Begin function sldns_str2wire_hex_buf
	.p2align	2
_sldns_str2wire_hex_buf:                ; @sldns_str2wire_hex_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
	ldrb	w8, [x0]
	cbz	w8, LBB0_18
; %bb.1:
	mov	x22, x1
	mov	x20, x0
	mov	x24, #0
	neg	w25, w20
	mov	x21, x0
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	add	w23, w25, w21
	add	x21, x21, #1
LBB0_3:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	and	w0, w8, #0xff
	bl	_isspace
	cbz	x0, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	ldrb	w8, [x21], #1
	add	w23, w23, #1
	cbnz	w8, LBB0_3
	b	LBB0_14
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbnz	x24, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldurb	w8, [x21, #-1]
	cmp	w8, #48
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_sldns_is_last_of_string
	cbnz	x0, LBB0_24
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldurb	w0, [x21, #-1]
	bl	_isxdigit
	cbz	w0, LBB0_21
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	lsr	x26, x24, #1
	cmp	x8, x26
	b.ls	LBB0_22
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldursb	w0, [x21, #-1]
	bl	_sldns_hexdigit_to_int
	tbnz	w24, #0, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	lsl	w8, w0, #4
	str	w8, [x22, x26, lsl #2]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	lsl	x8, x26, #2
	ldr	w9, [x22, x8]
	add	w9, w9, w0
	str	w9, [x22, x8]
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x24, x24, #1
	ldrb	w8, [x21]
	cbnz	w8, LBB0_2
	b	LBB0_15
LBB0_14:
	sub	x21, x21, #1
LBB0_15:
	tbz	w24, #0, LBB0_19
; %bb.16:
Lloh0:
	adrp	x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	sub	w1, w21, 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	x24, #0
LBB0_19:
	lsr	x8, x24, #1
	str	x8, [x19]
LBB0_20:
Lloh3:
	adrp	x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGEOFF]
Lloh5:
	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:
Lloh6:
	adrp	x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_SYNTAX_HEX@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:
Lloh8:
	adrp	x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGEOFF]
LBB0_23:
	ldr	w0, [x8]
	mov	x1, x23
	b	LBB0_17
LBB0_24:
	str	xzr, [x19]
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_WIREPARSE_ERR_OK,4,2      ; @LDNS_WIREPARSE_ERR_OK
	.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
.subsections_via_symbols
