	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbfl_strwidth                  ## -- Begin function mbfl_strwidth
	.p2align	4, 0x90
_mbfl_strwidth:                         ## @mbfl_strwidth
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -40(%rbp)
	cmpq	$0, (%rdi)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	cmpq	$0, 8(%rdi)
	je	LBB0_8
## %bb.2:
	movl	16(%r14), %edi
	movq	_filter_count_width@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_mbfl_encoding_wchar@GOTPCREL(%rip), %rsi
	leaq	-40(%rbp), %r8
	xorl	%ecx, %ecx
	callq	_mbfl_convert_filter_new
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %r12
	movq	(%r14), %r15
	testq	%r15, %r15
	je	LBB0_6
## %bb.4:
	movq	8(%r14), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r14,%rbx), %edi
	movq	%r12, %rsi
	callq	*(%r12)
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_5
LBB0_6:
	movq	%r12, %rdi
	callq	_mbfl_convert_filter_flush
	movq	%r12, %rdi
	callq	_mbfl_convert_filter_delete
	movq	-40(%rbp), %rax
	jmp	LBB0_10
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_9:
	xorl	%edi, %edi
	callq	_mbfl_convert_filter_delete
	movq	$-1, %rax
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mbfl_encoding_wchar,4,2        ## @mbfl_encoding_wchar
	.comm	_filter_count_width,4,2         ## @filter_count_width
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbfl_strwidth                  ; -- Begin function mbfl_strwidth
	.p2align	2
_mbfl_strwidth:                         ; @mbfl_strwidth
	.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
	str	xzr, [sp, #8]
	ldr	x8, [x0]
	cbz	x8, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_7
; %bb.2:
	ldr	w0, [x20, #16]
Lloh0:
	adrp	x8, _filter_count_width@GOTPAGE
Lloh1:
	ldr	x8, [x8, _filter_count_width@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, _mbfl_encoding_wchar@GOTPAGE
Lloh4:
	ldr	x1, [x1, _mbfl_encoding_wchar@GOTPAGEOFF]
	add	x4, sp, #8
	mov	w3, #0
	bl	_mbfl_convert_filter_new
	cbz	x0, LBB0_8
; %bb.3:
	mov	x19, x0
	ldr	x21, [x20]
	cbz	x21, LBB0_6
; %bb.4:
	ldr	x20, [x20, #8]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldrb	w0, [x20], #1
	mov	x1, x19
	blr	x8
	subs	x21, x21, #1
	b.ne	LBB0_5
LBB0_6:
	mov	x0, x19
	bl	_mbfl_convert_filter_flush
	mov	x0, x19
	bl	_mbfl_convert_filter_delete
	ldr	x0, [sp, #8]
	b	LBB0_9
LBB0_7:
	mov	x0, #0
	b	LBB0_9
LBB0_8:
	bl	_mbfl_convert_filter_delete
	mov	x0, #-1
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_mbfl_encoding_wchar,4,2        ; @mbfl_encoding_wchar
	.comm	_filter_count_width,4,2         ; @filter_count_width
.subsections_via_symbols
