	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_apl_buf         ## -- Begin function sldns_str2wire_apl_buf
	.p2align	4, 0x90
_sldns_str2wire_apl_buf:                ## @sldns_str2wire_apl_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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpb	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_strlen
	movq	_LDNS_WIREPARSE_ERR_INVALID_STR@GOTPCREL(%rip), %r14
	cmpl	$2, %eax
	jl	LBB0_17
## %bb.3:
	movq	%rbx, %rdi
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_17
## %bb.4:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:
	cmpq	%rax, %r15
	ja	LBB0_17
## %bb.6:
	movq	%r12, -208(%rbp)                ## 8-byte Spill
	movb	(%rbx), %al
	xorl	%r12d, %r12d
	movb	%al, -193(%rbp)                 ## 1-byte Spill
	cmpb	$33, %al
	sete	%r12b
	addq	%rbx, %r12
	movq	%r12, %rdi
	callq	_atoi
	movq	%rax, %r15
	movq	%r12, %rdi
	movl	$58, %esi
	callq	_strchr
	movq	%rax, %r12
	incq	%r12
	movq	%r12, %rdi
	movl	$47, %esi
	callq	_strchr
	movq	%rax, %rbx
	subq	%r12, %rbx
	leaq	-64(%rbx), %rax
	cmpq	$-65, %rax
	jb	LBB0_17
## %bb.7:
	leaq	-112(%rbp), %rdi
	movq	%r12, %rsi
	movl	$64, %edx
	callq	_strlcpy
	movb	$0, -112(%rbp,%rbx)
	cmpl	$2, %r15d
	je	LBB0_11
## %bb.8:
	cmpl	$1, %r15d
	jne	LBB0_17
## %bb.9:
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-176(%rbp), %rdx
	leaq	-112(%rbp), %rsi
	callq	_inet_pton
	testq	%rax, %rax
	je	LBB0_17
## %bb.10:
	xorl	%eax, %eax
	cmpl	$0, -176(%rbp)
	setne	%al
	cmpl	$0, -172(%rbp)
	movl	$2, %ecx
	cmoveq	%rax, %rcx
	cmpl	$0, -168(%rbp)
	movl	$3, %eax
	cmoveq	%rcx, %rax
	cmpl	$0, -164(%rbp)
	movl	$4, %ebx
	cmoveq	%rax, %rbx
	jmp	LBB0_13
LBB0_1:
	xorl	%ebx, %ebx
LBB0_16:
	movq	%rbx, (%r13)
	movq	_LDNS_WIREPARSE_ERR_OK@GOTPCREL(%rip), %r14
LBB0_17:
	movl	(%r14), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_19
## %bb.18:
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_AF_INET6@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-176(%rbp), %rdx
	leaq	-112(%rbp), %rsi
	callq	_inet_pton
	testq	%rax, %rax
	je	LBB0_17
## %bb.12:
	xorl	%eax, %eax
	cmpl	$0, -176(%rbp)
	setne	%al
	cmpl	$0, -172(%rbp)
	movl	$2, %ecx
	cmoveq	%rax, %rcx
	cmpl	$0, -168(%rbp)
	movl	$3, %eax
	cmoveq	%rcx, %rax
	cmpl	$0, -164(%rbp)
	movl	$4, %ecx
	cmoveq	%rax, %rcx
	cmpl	$0, -160(%rbp)
	movl	$5, %eax
	cmoveq	%rcx, %rax
	cmpl	$0, -156(%rbp)
	movl	$6, %ecx
	cmoveq	%rax, %rcx
	cmpl	$0, -152(%rbp)
	movl	$7, %eax
	cmoveq	%rcx, %rax
	cmpl	$0, -148(%rbp)
	movl	$8, %ecx
	cmoveq	%rax, %rcx
	pxor	%xmm0, %xmm0
	movdqa	-128(%rbp), %xmm1
	pcmpeqd	%xmm0, %xmm1
	pcmpeqd	-144(%rbp), %xmm0
	packssdw	%xmm1, %xmm0
	packsswb	%xmm0, %xmm0
	pmovmskb	%xmm0, %eax
	testb	$1, %al
	movl	$9, %edx
	cmovneq	%rcx, %rdx
	testb	$2, %al
	movl	$10, %ecx
	cmovneq	%rdx, %rcx
	testb	$4, %al
	movl	$11, %edx
	cmovneq	%rcx, %rdx
	testb	$8, %al
	movl	$12, %ecx
	cmovneq	%rdx, %rcx
	testb	$16, %al
	movl	$13, %edx
	cmovneq	%rcx, %rdx
	testb	$32, %al
	movl	$14, %ecx
	cmovneq	%rdx, %rcx
	testb	$64, %al
	movl	$15, %edx
	cmovneq	%rcx, %rdx
	testb	$-128, %al
	movl	$16, %ebx
	cmovneq	%rdx, %rbx
LBB0_13:
	movq	%r12, %rdi
	movl	$47, %esi
	callq	_strchr
	leaq	1(%rax), %rdi
	callq	_atoi
	movq	%rax, %r12
	leaq	-192(%rbp), %rdi
	movl	%r15d, %esi
	callq	_sldns_write_uint16
	movl	%ebx, %eax
	orl	$128, %eax
	cmpb	$33, -193(%rbp)                 ## 1-byte Folded Reload
	movl	%r12d, -184(%rbp)
	cmovnel	%ebx, %eax
	movl	%eax, -180(%rbp)
	addq	$4, %rbx
	cmpq	%rbx, (%r13)
	jae	LBB0_15
## %bb.14:
	movq	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPCREL(%rip), %r14
	jmp	LBB0_17
LBB0_15:
	leaq	-192(%rbp), %rsi
	movq	-208(%rbp), %rdi                ## 8-byte Reload
	movl	%ebx, %edx
	callq	_memmove
	jmp	LBB0_16
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_WIREPARSE_ERR_OK,4,2      ## @LDNS_WIREPARSE_ERR_OK
	.comm	_LDNS_WIREPARSE_ERR_INVALID_STR,4,2 ## @LDNS_WIREPARSE_ERR_INVALID_STR
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_AF_INET6,4,2                   ## @AF_INET6
	.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_apl_buf         ; -- Begin function sldns_str2wire_apl_buf
	.p2align	2
_sldns_str2wire_apl_buf:                ; @sldns_str2wire_apl_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldrb	w8, [x0]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	bl	_strlen
	cmp	w0, #2
	b.lt	LBB0_16
; %bb.2:
	mov	x0, x21
	mov	w1, #58
	bl	_strchr
	cbz	x0, LBB0_16
; %bb.3:
	mov	x22, x0
	mov	x0, x21
	mov	w1, #47
	bl	_strchr
Lloh3:
	adrp	x8, _LDNS_WIREPARSE_ERR_INVALID_STR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_INVALID_STR@GOTPAGEOFF]
	cbz	x0, LBB0_17
; %bb.4:
	cmp	x22, x0
	b.hi	LBB0_17
; %bb.5:
	mov	x8, x21
	ldrb	w23, [x8], #1
	cmp	w23, #33
	csel	x22, x21, x8, ne
	mov	x0, x22
	bl	_atoi
	mov	x21, x0
	mov	x0, x22
	mov	w1, #58
	bl	_strchr
	add	x22, x0, #1
	mov	x0, x22
	mov	w1, #47
	bl	_strchr
	sub	x24, x0, x22
	sub	x8, x24, #64
	cmn	x8, #65
	b.lo	LBB0_16
; %bb.6:
	add	x25, sp, #88
	add	x0, sp, #88
	mov	x1, x22
	mov	w2, #64
	bl	_strlcpy
	strb	wzr, [x25, x24]
	cmp	w21, #2
	b.eq	LBB0_12
; %bb.7:
	cmp	w21, #1
	b.ne	LBB0_16
; %bb.8:
Lloh5:
	adrp	x8, _AF_INET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	add	x8, sp, #8
	add	x2, x8, #16
	add	x1, sp, #88
	bl	_inet_pton
	cbz	x0, LBB0_16
; %bb.9:
	ldp	w8, w9, [sp, #24]
	cmp	w8, #0
	cset	w8, ne
	cmp	w9, #0
	mov	w9, #2
	csel	x8, x8, x9, eq
	ldp	w9, w10, [sp, #32]
	cmp	w9, #0
	mov	w9, #3
	csel	x8, x8, x9, eq
	cmp	w10, #0
	mov	w9, #4
	b	LBB0_14
LBB0_10:
	mov	x21, #0
LBB0_11:
	str	x21, [x19]
Lloh8:
	adrp	x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGEOFF]
	b	LBB0_17
LBB0_12:
Lloh10:
	adrp	x8, _AF_INET6@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AF_INET6@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	add	x8, sp, #8
	add	x2, x8, #16
	add	x1, sp, #88
	bl	_inet_pton
	cbz	x0, LBB0_16
; %bb.13:
	ldp	w8, w9, [sp, #24]
	cmp	w8, #0
	cset	w8, ne
	cmp	w9, #0
	mov	w9, #2
	csel	x8, x8, x9, eq
	ldp	w9, w10, [sp, #32]
	cmp	w9, #0
	mov	w9, #3
	csel	x8, x8, x9, eq
	cmp	w10, #0
	mov	w9, #4
	csel	x8, x8, x9, eq
	ldp	w9, w10, [sp, #40]
	cmp	w9, #0
	mov	w9, #5
	csel	x8, x8, x9, eq
	cmp	w10, #0
	mov	w9, #6
	csel	x8, x8, x9, eq
	ldp	w9, w10, [sp, #48]
	cmp	w9, #0
	mov	w9, #7
	csel	x8, x8, x9, eq
	cmp	w10, #0
	mov	w9, #8
	csel	x8, x8, x9, eq
	ldp	w9, w10, [sp, #56]
	cmp	w9, #0
	mov	w9, #9
	csel	x8, x8, x9, eq
	cmp	w10, #0
	mov	w9, #10
	csel	x8, x8, x9, eq
	ldp	w9, w10, [sp, #64]
	cmp	w9, #0
	mov	w9, #11
	csel	x8, x8, x9, eq
	cmp	w10, #0
	mov	w9, #12
	csel	x8, x8, x9, eq
	ldp	w9, w10, [sp, #72]
	cmp	w9, #0
	mov	w9, #13
	csel	x8, x8, x9, eq
	cmp	w10, #0
	mov	w9, #14
	csel	x8, x8, x9, eq
	ldp	w9, w10, [sp, #80]
	cmp	w9, #0
	mov	w9, #15
	csel	x8, x8, x9, eq
	cmp	w10, #0
	mov	w9, #16
LBB0_14:
	csel	x24, x8, x9, eq
	mov	x0, x22
	mov	w1, #47
	bl	_strchr
	add	x0, x0, #1
	bl	_atoi
	mov	x22, x0
	add	x0, sp, #8
	mov	x1, x21
	bl	_sldns_write_uint16
	orr	w8, w24, #0x80
	cmp	w23, #33
	csel	w8, w8, w24, eq
	stp	w22, w8, [sp, #16]
	ldr	x8, [x19]
	add	x21, x24, #4
	cmp	x8, x21
	b.hs	LBB0_19
; %bb.15:
Lloh13:
	adrp	x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGEOFF]
	b	LBB0_17
LBB0_16:
Lloh15:
	adrp	x8, _LDNS_WIREPARSE_ERR_INVALID_STR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_INVALID_STR@GOTPAGEOFF]
LBB0_17:
	ldr	w0, [x8]
	ldur	x8, [x29, #-72]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.18:
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_19:
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x21
	bl	_memmove
	b	LBB0_11
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_WIREPARSE_ERR_OK,4,2      ; @LDNS_WIREPARSE_ERR_OK
	.comm	_LDNS_WIREPARSE_ERR_INVALID_STR,4,2 ; @LDNS_WIREPARSE_ERR_INVALID_STR
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_AF_INET6,4,2                   ; @AF_INET6
	.comm	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL,4,2 ; @LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL
.subsections_via_symbols
