	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getprotoindex
_getprotoindex:                         ## @getprotoindex
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	movq	%r15, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	(%r14), %rbx
	jb	LBB0_3
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movq	_PROTOMAX@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_errx
LBB0_7:
	movq	%r15, %rdi
	callq	_strdup
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_9:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sl_add
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PROTOMAX,8,3                   ## @PROTOMAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ran out of protocols adding `%s'; recompile with larger PROTOMAX"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot copy string"

	.no_dead_strip	_getprotoindex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getprotoindex
_getprotoindex:                         ; @getprotoindex
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w0, [x8, x19, lsl #2]
	mov	x1, x21
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x19, x19, #1
	ldr	x8, [x20]
	cmp	x19, x8
	b.lo	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x19, #0
LBB0_5:
Lloh0:
	adrp	x8, _PROTOMAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PROTOMAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x19, x8
	b.ne	LBB0_7
; %bb.6:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_errx
LBB0_7:
	mov	x0, x21
	bl	_strdup
	mov	x21, x0
	cbnz	x0, LBB0_9
; %bb.8:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_9:
	mov	x0, x20
	mov	x1, x21
	bl	_sl_add
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PROTOMAX,8,3                   ; @PROTOMAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ran out of protocols adding `%s'; recompile with larger PROTOMAX"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot copy string"

	.no_dead_strip	_getprotoindex
.subsections_via_symbols
