	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbfl_convert_encoding          ## -- Begin function mbfl_convert_encoding
	.p2align	4, 0x90
_mbfl_convert_encoding:                 ## @mbfl_convert_encoding
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.1:
	movq	%rdi, %r13
	testq	%rdi, %rdi
	je	LBB0_20
## %bb.2:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_20
## %bb.3:
	movq	%rsi, %r12
	movq	16(%r13), %rdi
	movq	%r14, %rsi
	callq	_mbfl_convert_filter_get_vtbl
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	16(%r13), %rdi
	movq	_mbfl_memory_device_output@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	-72(%rbp), %r8
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_mbfl_convert_filter_new
	testq	%rax, %rax
	je	LBB0_19
## %bb.5:
	movq	%rax, %rbx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
LBB0_6:
	movq	_mbfl_encoding_wchar@GOTPCREL(%rip), %rdi
	movq	_mbfl_memory_device_output@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	leaq	-72(%rbp), %r8
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_mbfl_convert_filter_new
	testq	%rax, %rax
	je	LBB0_20
## %bb.7:
	movq	%rax, %r14
	movq	16(%r13), %rdi
	movq	(%rax), %rdx
	movq	_mbfl_encoding_wchar@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	movq	%rax, %r8
	callq	_mbfl_convert_filter_new
	testq	%rax, %rax
	je	LBB0_18
## %bb.8:
	movq	%rax, %rbx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	_MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movq	%r14, %rax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	$63, 8(%r14)
LBB0_9:
	movl	(%r13), %esi
	movl	%esi, %edx
	sarl	$2, %edx
	addl	$8, %edx
	leaq	-72(%rbp), %rdi
	callq	_mbfl_memory_device_init
	movq	8(%r13), %r14
	testq	%r14, %r14
	je	LBB0_14
## %bb.10:
	movl	(%r13), %eax
	testl	%eax, %eax
	je	LBB0_14
## %bb.11:
	movslq	%eax, %r13
	decq	%r13
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movzbl	(%r14,%r15), %edi
	movq	%rbx, %rsi
	callq	*(%rbx)
	testq	%rax, %rax
	js	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	1(%r15), %rax
	cmpq	%r15, %r13
	movq	%rax, %r15
	jne	LBB0_12
LBB0_14:
	movq	%rbx, %rdi
	callq	_mbfl_convert_filter_flush
	movq	%rbx, %rdi
	callq	_mbfl_convert_filter_delete
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_16
## %bb.15:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mbfl_convert_filter_flush
	movq	%rbx, %rdi
	callq	_mbfl_convert_filter_delete
LBB0_16:
	leaq	-72(%rbp), %rdi
	movq	%r12, %rsi
	callq	_mbfl_memory_device_result
	movq	%rax, %rbx
	jmp	LBB0_20
LBB0_18:
	movq	%r14, %rdi
	callq	_mbfl_convert_filter_delete
LBB0_19:
	xorl	%ebx, %ebx
LBB0_20:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mbfl_encoding_wchar,4,2        ## @mbfl_encoding_wchar
	.comm	_MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR,4,2 ## @MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbfl_convert_encoding          ; -- Begin function mbfl_convert_encoding
	.p2align	2
_mbfl_convert_encoding:                 ; @mbfl_convert_encoding
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x0
	mov	x0, #0
	cbz	x1, LBB0_17
; %bb.1:
	cbz	x22, LBB0_17
; %bb.2:
	mov	x21, x2
	cbz	x2, LBB0_17
; %bb.3:
	mov	x19, x1
	ldr	x0, [x22, #16]
	mov	x1, x21
	bl	_mbfl_convert_filter_get_vtbl
	mov	x20, x0
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x0, [x22, #16]
Lloh0:
	adrp	x2, _mbfl_memory_device_output@GOTPAGE
Lloh1:
	ldr	x2, [x2, _mbfl_memory_device_output@GOTPAGEOFF]
	mov	x4, sp
	mov	x1, x21
	mov	x3, #0
	bl	_mbfl_convert_filter_new
	cbz	x0, LBB0_17
; %bb.5:
	mov	x23, x0
	mov	x21, #0
	b	LBB0_9
LBB0_6:
Lloh2:
	adrp	x0, _mbfl_encoding_wchar@GOTPAGE
Lloh3:
	ldr	x0, [x0, _mbfl_encoding_wchar@GOTPAGEOFF]
Lloh4:
	adrp	x2, _mbfl_memory_device_output@GOTPAGE
Lloh5:
	ldr	x2, [x2, _mbfl_memory_device_output@GOTPAGEOFF]
	mov	x4, sp
	mov	x1, x21
	mov	x3, #0
	bl	_mbfl_convert_filter_new
	cbz	x0, LBB0_17
; %bb.7:
	mov	x21, x0
	ldr	x0, [x22, #16]
	ldr	x2, [x21]
Lloh6:
	adrp	x1, _mbfl_encoding_wchar@GOTPAGE
Lloh7:
	ldr	x1, [x1, _mbfl_encoding_wchar@GOTPAGEOFF]
	mov	x3, #0
	mov	x4, x21
	bl	_mbfl_convert_filter_new
	cbz	x0, LBB0_18
; %bb.8:
	mov	x23, x0
Lloh8:
	adrp	x8, _MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	mov	w9, #63
	stp	w9, w8, [x21, #8]
LBB0_9:
	ldr	w1, [x22]
	asr	w8, w1, #2
	add	w2, w8, #8
	mov	x0, sp
	bl	_mbfl_memory_device_init
	ldr	x24, [x22, #8]
	cbz	x24, LBB0_14
; %bb.10:
	ldr	w8, [x22]
	cbz	w8, LBB0_14
; %bb.11:
	sxtw	x8, w8
	sub	x8, x8, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x22, x8
	ldr	x8, [x23]
	ldrb	w0, [x24], #1
	mov	x1, x23
	blr	x8
	tbnz	x0, #63, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	sub	x8, x22, #1
	cbnz	x22, LBB0_12
LBB0_14:
	mov	x0, x23
	bl	_mbfl_convert_filter_flush
	mov	x0, x23
	bl	_mbfl_convert_filter_delete
	cbnz	x20, LBB0_16
; %bb.15:
	mov	x0, x21
	bl	_mbfl_convert_filter_flush
	mov	x0, x21
	bl	_mbfl_convert_filter_delete
LBB0_16:
	mov	x0, sp
	mov	x1, x19
	bl	_mbfl_memory_device_result
LBB0_17:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_18:
	mov	x0, x21
	bl	_mbfl_convert_filter_delete
	mov	x0, #0
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_mbfl_encoding_wchar,4,2        ; @mbfl_encoding_wchar
	.comm	_MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR,4,2 ; @MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR
.subsections_via_symbols
