	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_dname_buf_origin ## -- Begin function sldns_str2wire_dname_buf_origin
	.p2align	4, 0x90
_sldns_str2wire_dname_buf_origin:       ## @sldns_str2wire_dname_buf_origin
	.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	%r8, %r14
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	(%rdx), %rax
	movq	%rax, -56(%rbp)
	movl	$0, -44(%rbp)
	leaq	-56(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	callq	_sldns_str2wire_dname_buf_rel
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	-56(%rbp), %rax
	testq	%r15, %r15
	je	LBB0_10
## %bb.2:
	cmpl	$0, -44(%rbp)
	je	LBB0_10
## %bb.3:
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	leaq	(%r14,%rax), %rcx
	decq	%rcx
	movq	_LDNS_MAX_DOMAINLEN@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	cmpq	%rsi, %rcx
	jbe	LBB0_7
## %bb.5:
	movq	_LDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_7:
	movq	(%r12), %rsi
	cmpq	%rsi, %rcx
	jbe	LBB0_9
## %bb.8:
	movq	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	callq	_RET_ERR
	jmp	LBB0_11
LBB0_9:
	leaq	-1(%r14), %r13
	leaq	(%rbx,%rax,4), %rdi
	addq	$-4, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memmove
	addq	-56(%rbp), %r13
	movq	%r13, %rax
LBB0_10:
	movq	%rax, (%r12)
	movq	_LDNS_WIREPARSE_ERR_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_MAX_DOMAINLEN,8,3         ## @LDNS_MAX_DOMAINLEN
	.comm	_LDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW,4,2 ## @LDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW
	.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_dname_buf_origin ; -- Begin function sldns_str2wire_dname_buf_origin
	.p2align	2
_sldns_str2wire_dname_buf_origin:       ; @sldns_str2wire_dname_buf_origin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	ldr	x8, [x2]
	str	x8, [sp, #8]
	str	wzr, [sp, #4]
	add	x2, sp, #8
	add	x3, sp, #4
	bl	_sldns_str2wire_dname_buf_rel
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	x8, [sp, #8]
	cbz	x21, LBB0_10
; %bb.2:
	ldr	w9, [sp, #4]
	cbz	w9, LBB0_10
; %bb.3:
	cbz	x8, LBB0_10
; %bb.4:
	sub	x23, x20, #1
Lloh0:
	adrp	x9, _LDNS_MAX_DOMAINLEN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LDNS_MAX_DOMAINLEN@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x9]
	add	x9, x23, x8
	cmp	x9, x1
	b.ls	LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _LDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldr	x1, [x19]
	cmp	x9, x1
	b.ls	LBB0_9
; %bb.7:
Lloh5:
	adrp	x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
	bl	_RET_ERR
	b	LBB0_11
LBB0_9:
	add	x8, x22, x8, lsl #2
	sub	x0, x8, #4
	mov	x1, x21
	mov	x2, x20
	bl	_memmove
	ldr	x8, [sp, #8]
	add	x8, x23, x8
LBB0_10:
	str	x8, [x19]
Lloh7:
	adrp	x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
LBB0_11:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_MAX_DOMAINLEN,8,3         ; @LDNS_MAX_DOMAINLEN
	.comm	_LDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW,4,2 ; @LDNS_WIREPARSE_ERR_DOMAINNAME_OVERFLOW
	.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
