	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xo_buf_utf8_len
_xo_buf_utf8_len:                       ## @xo_buf_utf8_len
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %r14
	movzbl	(%rsi), %r15d
	movq	%rsi, %rdi
	callq	_xo_utf8_to_wc_len
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movl	%eax, %eax
	cmpl	%r12d, %eax
	jle	LBB0_4
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_xo_failure
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_xo_failure
LBB0_9:
	movl	$-1, %eax
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpl	$2, %eax
	jbe	LBB0_10
## %bb.5:
	movl	$2, %edx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r13,%rdx), %ecx
	movl	%ecx, %ebx
	andb	$-64, %bl
	cmpb	$-128, %bl
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_6
	jmp	LBB0_10
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_xo_failure
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid UTF-8 data: %02hhx"

L_.str.1:                               ## @.str.1
	.asciz	"invalid UTF-8 data (short): %02hhx (%d/%d)"

L_.str.2:                               ## @.str.2
	.asciz	"invalid UTF-8 data (byte %d): %x"

	.no_dead_strip	_xo_buf_utf8_len
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xo_buf_utf8_len
_xo_buf_utf8_len:                       ; @xo_buf_utf8_len
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldrb	w21, [x1]
	mov	x0, x1
	bl	_xo_utf8_to_wc_len
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	w0, w0
	cmp	w0, w22
	b.le	LBB0_7
; %bb.2:
	stp	x0, x22, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	mov	x0, x19
	mov	x2, x21
LBB0_5:
	bl	_xo_failure
	mov	w0, #-1
LBB0_6:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	cmp	w0, #2
	b.ls	LBB0_6
; %bb.8:
	mov	w2, #2
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x20, x2]
	and	w9, w8, #0xc0
	cmp	w9, #128
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x2, x2, #1
	cmp	x0, x2
	b.ne	LBB0_9
	b	LBB0_6
LBB0_11:
	str	x8, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid UTF-8 data: %02hhx"

l_.str.1:                               ; @.str.1
	.asciz	"invalid UTF-8 data (short): %02hhx (%d/%d)"

l_.str.2:                               ; @.str.2
	.asciz	"invalid UTF-8 data (byte %d): %x"

	.no_dead_strip	_xo_buf_utf8_len
.subsections_via_symbols
