	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sldns_str2wire_wks_buf         ## -- Begin function sldns_str2wire_wks_buf
	.p2align	4, 0x90
_sldns_str2wire_wks_buf:                ## @sldns_str2wire_wks_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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_strlen
	leaq	-184(%rbp), %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_sldns_buffer_init_frm_data
	movb	$0, -176(%rbp)
	movq	%r14, -192(%rbp)                ## 8-byte Spill
	cmpq	$0, (%r14)
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdx
	leaq	-184(%rbp), %rdi
	leaq	-112(%rbp), %rsi
	movl	$50, %ecx
	callq	_sldns_bget_token
	testq	%rax, %rax
	jle	LBB0_2
## %bb.4:
	movb	$1, %bl
	movl	$1, -180(%rbp)                  ## 4-byte Folded Spill
	leaq	-112(%rbp), %r14
	leaq	-176(%rbp), %r12
	leaq	L_.str(%rip), %r13
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_5 Depth=1
	andl	$-8, %r15d
	subl	%r15d, %r12d
	incl	%r14d
	movb	$7, %cl
	subb	%r12b, %cl
	movl	$1, %eax
	shll	%cl, %eax
	movslq	%r14d, %rcx
	orl	%eax, (%r13,%rcx,4)
	movq	%r13, %r15
	leaq	-112(%rbp), %r14
	leaq	-176(%rbp), %r12
	leaq	L_.str(%rip), %r13
LBB0_28:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	-184(%rbp), %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	movl	$50, %ecx
	callq	_sldns_bget_token
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jle	LBB0_29
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_ldns_tolower_str
	movq	%r14, %rdi
	testb	$1, %bl
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	callq	_getprotobyname
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rax), %eax
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, (%r15)
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$50, %edx
	callq	_strlcpy
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rsi
	callq	_getservbyname
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rax), %edi
	callq	_ntohs
	movq	%rax, %r12
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %r13
	leal	7(%r12), %r15d
	testl	%r12d, %r12d
	cmovnsl	%r12d, %r15d
	movl	%r15d, %r14d
	sarl	$3, %r14d
	leal	2(%r14), %ebx
	cmpl	%ebx, -180(%rbp)                ## 4-byte Folded Reload
	jge	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_5 Depth=1
	movslq	%r12d, %rdx
	shrq	$3, %rdx
	addq	$2, %rdx
	movq	-192(%rbp), %rax                ## 8-byte Reload
	cmpq	%rdx, (%rax)
	jb	LBB0_25
## %bb.26:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	-180(%rbp), %ecx                ## 4-byte Reload
	movslq	%ecx, %rax
	leaq	(,%rax,4), %rdi
	addq	%r13, %rdi
	subl	%ecx, %edx
	xorl	%esi, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memset
	movl	%ebx, -180(%rbp)                ## 4-byte Spill
	jmp	LBB0_27
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_atoi
	jmp	LBB0_13
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcasecmp
	testq	%rax, %rax
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_atoi
	testl	%eax, %eax
	je	LBB0_19
## %bb.22:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r12d
	cmpl	$65536, %eax                    ## imm = 0x10000
	jb	LBB0_23
	jmp	LBB0_20
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	$6, %eax
	jmp	LBB0_13
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$53, %r12d
	jmp	LBB0_23
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$17, %eax
	jmp	LBB0_13
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_23
LBB0_20:
	movq	_LDNS_WIREPARSE_ERR_SYNTAX@GOTPCREL(%rip), %rax
	jmp	LBB0_21
LBB0_3:
	movq	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
	jmp	LBB0_30
LBB0_2:
	movl	$1, -180(%rbp)                  ## 4-byte Folded Spill
LBB0_29:
	movslq	-180(%rbp), %rax                ## 4-byte Folded Reload
	movq	-192(%rbp), %rcx                ## 8-byte Reload
	movq	%rax, (%rcx)
	movq	_LDNS_WIREPARSE_ERR_OK@GOTPCREL(%rip), %rax
LBB0_30:
	movl	(%rax), %eax
LBB0_31:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_33
## %bb.32:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movq	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPCREL(%rip), %rax
LBB0_21:
	movl	(%rax), %ebx
	leaq	-184(%rbp), %rdi
	callq	_sldns_buffer_position
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_RET_ERR
	jmp	LBB0_31
LBB0_33:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL,4,2 ## @LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\t\n "

L_.str.1:                               ## @.str.1
	.asciz	"tcp"

L_.str.2:                               ## @.str.2
	.asciz	"udp"

L_.str.3:                               ## @.str.3
	.asciz	"domain"

L_.str.4:                               ## @.str.4
	.asciz	"0"

	.comm	_LDNS_WIREPARSE_ERR_SYNTAX,4,2  ## @LDNS_WIREPARSE_ERR_SYNTAX
	.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_wks_buf         ; -- Begin function sldns_str2wire_wks_buf
	.p2align	2
_sldns_str2wire_wks_buf:                ; @sldns_str2wire_wks_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	bl	_strlen
	mov	x2, x0
	mov	x0, sp
	mov	x1, x21
	bl	_sldns_buffer_init_frm_data
	strb	wzr, [sp, #4]
	ldr	x8, [x19]
	cbz	x8, LBB0_25
; %bb.1:
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, sp
	add	x1, sp, #54
	mov	w3, #50
	bl	_sldns_bget_token
	mov	w27, #1
	cmp	x0, #1
	b.lt	LBB0_26
; %bb.2:
Lloh5:
	adrp	x21, l_.str.1@PAGE
Lloh6:
	add	x21, x21, l_.str.1@PAGEOFF
Lloh7:
	adrp	x23, l_.str@PAGE
Lloh8:
	add	x23, x23, l_.str@PAGEOFF
Lloh9:
	adrp	x24, l_.str.3@PAGE
Lloh10:
	add	x24, x24, l_.str.3@PAGEOFF
	mov	w28, #1
	mov	w22, #1
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w25, #1
	lsl	w9, w25, #3
	sub	w9, w9, w26
	add	w9, w9, #7
	lsl	w9, w27, w9
	sbfiz	x8, x8, #2, #32
	ldr	w10, [x20, x8]
	orr	w9, w10, w9
	str	w9, [x20, x8]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, sp
	add	x1, sp, #54
	mov	x2, x23
	mov	w3, #50
	bl	_sldns_bget_token
	mov	w22, #0
	cmp	x0, #0
	b.le	LBB0_27
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #54
	bl	_ldns_tolower_str
	add	x0, sp, #54
	tbz	w22, #0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_getprotobyname
	cbz	x0, LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x0]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	str	w0, [x20]
	add	x0, sp, #4
	add	x1, sp, #54
	mov	w2, #50
	bl	_strlcpy
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #4
	bl	_getservbyname
	cbz	x0, LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x0]
	bl	_ntohs
	mov	x26, x0
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w8, w26, #7
	cmp	w26, #0
	csel	w8, w8, w26, lt
	asr	w25, w8, #3
	add	w22, w25, #2
	cmp	w28, w22
	b.ge	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19]
	sxtw	x8, w26
	lsr	x8, x8, #3
	add	x8, x8, #2
	cmp	x9, x8
	b.lo	LBB0_31
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x0, x20, w28, sxtw #2
	sub	w2, w8, w28
	mov	w1, #0
	bl	_memset
	mov	x28, x22
	b	LBB0_3
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #54
	mov	x1, x21
	bl	_strcasecmp
	cbz	x0, LBB0_20
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #54
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcasecmp
	cbz	x0, LBB0_22
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #54
	bl	_atoi
	b	LBB0_8
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #54
	mov	x1, x24
	bl	_strcasecmp
	cbz	x0, LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #54
	bl	_atoi
	cbz	w0, LBB0_23
; %bb.19:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, x0
	cmp	w0, #16, lsl #12                ; =65536
	b.lo	LBB0_11
	b	LBB0_32
LBB0_20:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #6
	b	LBB0_8
LBB0_21:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w26, #53
	b	LBB0_11
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #17
	b	LBB0_8
LBB0_23:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #54
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_32
; %bb.24:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w26, #0
	b	LBB0_11
LBB0_25:
Lloh15:
	adrp	x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGEOFF]
	b	LBB0_28
LBB0_26:
	mov	w28, #1
LBB0_27:
	sxtw	x8, w28
	str	x8, [x19]
Lloh17:
	adrp	x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_OK@GOTPAGEOFF]
LBB0_28:
	ldr	w0, [x8]
LBB0_29:
	ldur	x8, [x29, #-88]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_34
; %bb.30:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_31:
Lloh22:
	adrp	x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL@GOTPAGEOFF]
	b	LBB0_33
LBB0_32:
Lloh24:
	adrp	x8, _LDNS_WIREPARSE_ERR_SYNTAX@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LDNS_WIREPARSE_ERR_SYNTAX@GOTPAGEOFF]
LBB0_33:
	ldr	w19, [x8]
	mov	x0, sp
	bl	_sldns_buffer_position
	mov	x1, x0
	mov	x0, x19
	bl	_RET_ERR
	b	LBB0_29
LBB0_34:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL,4,2 ; @LDNS_WIREPARSE_ERR_BUFFER_TOO_SMALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\t\n "

l_.str.1:                               ; @.str.1
	.asciz	"tcp"

l_.str.2:                               ; @.str.2
	.asciz	"udp"

l_.str.3:                               ; @.str.3
	.asciz	"domain"

l_.str.4:                               ; @.str.4
	.asciz	"0"

	.comm	_LDNS_WIREPARSE_ERR_SYNTAX,4,2  ; @LDNS_WIREPARSE_ERR_SYNTAX
	.comm	_LDNS_WIREPARSE_ERR_OK,4,2      ; @LDNS_WIREPARSE_ERR_OK
.subsections_via_symbols
