	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbrtocXX_l                     ## -- Begin function mbrtocXX_l
	.p2align	4, 0x90
_mbrtocXX_l:                            ## @mbrtocXX_l
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rcx, %rbx
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%r8d, %edi
	callq	_FIX_LOCALE
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	movl	%r14d, %edi
	callq	_XLOCALE_CTYPE
	movq	%rax, %rbx
LBB0_2:
	leaq	40(%rbx), %rax
	movq	%rax, -64(%rbp)
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	cmpl	$0, (%rbx)
	je	LBB0_4
## %bb.9:
	movl	8(%rbx), %eax
	movq	$-3, %r14
	testl	%eax, %eax
	jg	LBB0_18
	jmp	LBB0_10
LBB0_4:
	movq	_CODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_nl_langinfo_l
	movq	_UTF_XX_INTERNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-64(%rbp), %rdi
	movl	%eax, %esi
	callq	__citrus_iconv_open
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movl	$0, (%rbx)
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %r14
	jmp	LBB0_21
LBB0_7:
	movq	-64(%rbp), %rax
	movq	(%rax), %rax
	movl	$1, (%rax)
	movq	$0, 8(%rax)
	movl	$0, 8(%rbx)
	movq	$1, (%rbx)
	testq	%r12, %r12
	je	LBB0_8
LBB0_10:
	movslq	4(%rbx), %rdi
	movl	$8, %r15d
	subq	%rdi, %r15
	cmpq	%r13, %r15
	cmovaeq	%r13, %r15
	addq	16(%rbx), %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_memcpy
	movq	24(%rbx), %rcx
	xorl	%r13d, %r13d
	leaq	-72(%rbp), %r14
	leaq	-96(%rbp), %r12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	movq	%rax, -48(%rbp)
	movslq	4(%rbx), %rax
	addq	%r15, %rax
	movq	%rax, -56(%rbp)
	movq	%rcx, -72(%rbp)
	movq	%r13, -96(%rbp)
	cmpq	$9, %rax
	setb	%al
	cmpq	$9, %r13
	setb	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movq	-64(%rbp), %rdi
	leaq	-88(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-48(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r14, %rcx
	movq	%r12, %r8
	xorl	%r9d, %r9d
	callq	__citrus_iconv_convert
	movq	-72(%rbp), %rdx
	movq	24(%rbx), %rcx
	subq	%rcx, %rdx
	shrq	$3, %rdx
	movl	%edx, 8(%rbx)
	testl	%edx, %edx
	jg	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_E2BIG@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jne	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	$8, %r13
	jmp	LBB0_11
LBB0_17:
	movq	-48(%rbp), %rax
	subq	16(%rbx), %rax
	movslq	4(%rbx), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, %rax
	setg	%dil
	callq	_assert
	movslq	4(%rbx), %rax
	addq	16(%rbx), %rax
	movq	-48(%rbp), %r14
	subq	%rax, %r14
	movl	$0, 4(%rbx)
	movl	8(%rbx), %eax
LBB0_18:
	movq	32(%rbx), %rdi
	movq	(%rdi), %r15
	leaq	8(%rdi), %rsi
	leal	-1(%rax), %ecx
	movl	%ecx, 8(%rbx)
	leal	-8(,%rax,8), %edx
	callq	_memmove
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	%r15, (%rax)
LBB0_20:
	testq	%r15, %r15
	cmoveq	%r15, %r14
LBB0_21:
	movq	%r14, %rax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	cmpq	$0, -88(%rbp)
	je	LBB0_15
## %bb.14:
	movl	$0, 4(%rbx)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_8:
	xorl	%r14d, %r14d
	jmp	LBB0_21
LBB0_15:
	movq	16(%rbx), %rdi
	movq	-48(%rbp), %rsi
	movl	-56(%rbp), %edx
	callq	_memmove
	movl	-56(%rbp), %eax
	movl	%eax, 4(%rbx)
	movq	$-2, %r14
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_CODESET,4,2                    ## @CODESET
	.comm	_UTF_XX_INTERNAL,4,2            ## @UTF_XX_INTERNAL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_E2BIG,4,2                      ## @E2BIG
	.comm	_EILSEQ,4,2                     ## @EILSEQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function mbrtocXX_l
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_mbrtocXX_l
	.p2align	2
_mbrtocXX_l:                            ; @mbrtocXX_l
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x4
	mov	x19, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x4
	bl	_FIX_LOCALE
	cbnz	x19, LBB0_2
; %bb.1:
	mov	x0, x23
	bl	_XLOCALE_CTYPE
	mov	x19, x0
LBB0_2:
	add	x8, x19, #40
	str	x8, [sp, #40]
	cbz	x21, LBB0_6
; %bb.3:
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.4:
	ldr	w8, [x19, #8]
	cmp	w8, #0
	b.le	LBB0_10
; %bb.5:
	mov	x21, #-3
	b	LBB0_15
LBB0_6:
Lloh0:
	adrp	x8, _CODESET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CODESET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x23
	bl	_nl_langinfo_l
	mov	x1, x0
Lloh3:
	adrp	x8, _UTF_XX_INTERNAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UTF_XX_INTERNAL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	add	x0, sp, #40
	bl	__citrus_iconv_open
	cbz	x0, LBB0_9
; %bb.7:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	str	wzr, [x19]
LBB0_8:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _errno@GOTPAGE
Lloh9:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
	mov	x0, #-1
	b	LBB0_18
LBB0_9:
	ldr	x8, [sp, #40]
	ldr	x8, [x8]
	mov	w9, #1
	str	w9, [x8]
	str	xzr, [x8, #8]
	str	wzr, [x19, #8]
Lloh11:
	adrp	x8, lCPI0_0@PAGE
Lloh12:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	cbz	x21, LBB0_21
LBB0_10:
	ldrsw	x8, [x19, #4]
	mov	w9, #8
	sub	x9, x9, x8
	cmp	x9, x22
	csel	x22, x9, x22, lo
	ldr	x9, [x19, #16]
	add	x0, x9, x8
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	mov	x21, #0
	ldr	x8, [x19, #24]
Lloh13:
	adrp	x23, _E2BIG@GOTPAGE
Lloh14:
	ldr	x23, [x23, _E2BIG@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	str	x9, [sp, #32]
	ldrsw	x9, [x19, #4]
	add	x9, x22, x9
	stp	x9, x8, [sp, #16]
	str	x21, [sp, #8]
	cmp	x9, #9
	ccmp	x21, #9, #2, lo
	cset	w0, lo
	bl	_assert
	ldr	x0, [sp, #40]
	add	x1, sp, #32
	add	x2, sp, #16
	add	x3, sp, #24
	add	x4, sp, #8
	mov	x6, sp
	mov	w5, #0
	bl	__citrus_iconv_convert
	ldr	x9, [sp, #24]
	ldr	x8, [x19, #24]
	sub	x9, x9, x8
	lsr	x9, x9, #3
	str	w9, [x19, #8]
	cmp	w9, #0
	b.gt	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w9, [x23]
	cmp	w0, w9
	b.ne	LBB0_19
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x21, #8
	b	LBB0_11
LBB0_14:
	ldr	x8, [sp, #32]
	ldr	x9, [x19, #16]
	ldrsw	x10, [x19, #4]
	sub	x8, x8, x9
	cmp	x8, x10
	cset	w0, gt
	bl	_assert
	ldr	x9, [sp, #32]
	ldr	x10, [x19, #16]
	ldp	w11, w8, [x19, #4]
                                        ; kill: def $w11 killed $w11 def $x11
	sxtw	x11, w11
	add	x10, x10, x11
	sub	x21, x9, x10
	str	wzr, [x19, #4]
LBB0_15:
	ldr	x0, [x19, #32]
	mov	x1, x0
	ldr	x22, [x1], #8
	sub	w8, w8, #1
	str	w8, [x19, #8]
	lsl	w2, w8, #3
	bl	_memmove
	cbz	x20, LBB0_17
; %bb.16:
	str	x22, [x20]
LBB0_17:
	cmp	x22, #0
	csel	x0, xzr, x21, eq
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_19:
	ldr	x8, [sp]
	cbz	x8, LBB0_22
; %bb.20:
Lloh15:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	str	wzr, [x19, #4]
	b	LBB0_8
LBB0_21:
	mov	x0, #0
	b	LBB0_18
LBB0_22:
	ldr	x0, [x19, #16]
	ldr	x1, [sp, #32]
	ldr	w2, [sp, #16]
	bl	_memmove
	ldr	x8, [sp, #16]
	str	w8, [x19, #4]
	mov	x0, #-2
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CODESET,4,2                    ; @CODESET
	.comm	_UTF_XX_INTERNAL,4,2            ; @UTF_XX_INTERNAL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_E2BIG,4,2                      ; @E2BIG
	.comm	_EILSEQ,4,2                     ; @EILSEQ
.subsections_via_symbols
