	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbs_chrlen                     ## -- Begin function mbs_chrlen
	.p2align	4, 0x90
_mbs_chrlen:                            ## @mbs_chrlen
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	%rax, -32(%rbp)
	movq	%rsi, %rax
	testq	%rsi, %rsi
	jne	LBB0_2
## %bb.1:
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
LBB0_2:
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rdx, %rdi
	callq	_is_encoding_utf8
	movl	$1, %r15d
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	-32(%rbp), %rdi
	leaq	-40(%rbp), %rsi
	callq	_pick_one_utf8_char
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	subl	(%r14), %eax
	movl	%eax, %r15d
LBB0_7:
	movslq	%r15d, %rax
	addq	%rax, (%r14)
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.8:
	subq	%rax, (%rbx)
	jmp	LBB0_9
LBB0_3:
	xorl	%r15d, %r15d
LBB0_9:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbs_chrlen                     ; -- Begin function mbs_chrlen
	.p2align	2
_mbs_chrlen:                            ; @mbs_chrlen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	ldr	x8, [x0]
	str	x8, [sp, #8]
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
	cmp	x1, #0
	csel	x8, x8, x1, eq
	ldr	x8, [x8]
	str	x8, [sp]
	cbz	x8, LBB0_4
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	mov	x0, x2
	bl	_is_encoding_utf8
	cbz	x0, LBB0_5
; %bb.2:
	add	x0, sp, #8
	mov	x1, sp
	bl	_pick_one_utf8_char
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w9, [x20]
	sub	w0, w8, w9
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_8
LBB0_5:
	mov	w0, #1
LBB0_6:
	ldr	x9, [x20]
	sxtw	x8, w0
	add	x9, x9, x8
	str	x9, [x20]
	cbz	x19, LBB0_8
; %bb.7:
	ldr	x9, [x19]
	sub	x8, x9, x8
	str	x8, [x19]
LBB0_8:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
.subsections_via_symbols
