	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cXXrtomb_l                     ## -- Begin function cXXrtomb_l
	.p2align	4, 0x90
_cXXrtomb_l:                            ## @cXXrtomb_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	%ecx, %edi
	callq	_FIX_LOCALE
	testq	%rbx, %rbx
	jne	LBB0_2
## %bb.1:
	movl	%r15d, %edi
	callq	_XLOCALE_CTYPE
	movq	%rax, %rbx
LBB0_2:
	leaq	24(%rbx), %rax
	movq	%rax, -48(%rbp)
	testq	%r14, %r14
	je	LBB0_9
## %bb.3:
	cmpl	$0, (%rbx)
	je	LBB0_9
## %bb.4:
	xorl	%edi, %edi
	cmpl	$2, 4(%rbx)
	setb	%dil
	jmp	LBB0_5
LBB0_9:
	movq	_UTF_XX_INTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_CODESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_nl_langinfo_l
	leaq	-48(%rbp), %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	__citrus_iconv_open
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	$0, (%rbx)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_11:
	movq	-48(%rbp), %rax
	movq	(%rax), %rax
	movl	$1, (%rax)
	movq	$0, 8(%rax)
	movq	$1, (%rbx)
	movl	$1, %edi
	testq	%r14, %r14
	je	LBB0_12
LBB0_5:
	callq	_assert
	movq	16(%rbx), %rax
	movslq	4(%rbx), %rcx
	leal	1(%rcx), %edx
	movl	%edx, 4(%rbx)
	movl	%r12d, (%rax,%rcx,4)
	movq	8(%rbx), %rax
	movq	%rax, -80(%rbp)
	movslq	4(%rbx), %rax
	shlq	$2, %rax
	movq	%rax, -72(%rbp)
	movq	%r14, -56(%rbp)
	movl	%r15d, %edi
	callq	_MB_CUR_MAX_L
	movq	%rax, -64(%rbp)
	movq	-48(%rbp), %rdi
	leaq	-88(%rbp), %rax
	movq	%rax, (%rsp)
	leaq	-80(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	leaq	-64(%rbp), %r8
	xorl	%r15d, %r15d
	xorl	%r9d, %r9d
	callq	__citrus_iconv_convert
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_13
## %bb.6:
	movl	$0, 4(%rbx)
	movq	-56(%rbp), %r15
	subq	%r14, %r15
	jne	LBB0_13
## %bb.7:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %r15
LBB0_13:
	movq	%r15, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	$1, %r15d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_UTF_XX_INTERNAL,4,2            ## @UTF_XX_INTERNAL
	.comm	_CODESET,4,2                    ## @CODESET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.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 cXXrtomb_l
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_cXXrtomb_l
	.p2align	2
_cXXrtomb_l:                            ; @cXXrtomb_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	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x3
	bl	_FIX_LOCALE
	cbnz	x20, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_XLOCALE_CTYPE
	mov	x20, x0
LBB0_2:
	add	x8, x20, #24
	str	x8, [sp, #40]
	cbz	x19, LBB0_5
; %bb.3:
	ldr	w8, [x20]
	cbz	w8, LBB0_5
; %bb.4:
	ldr	w8, [x20, #4]
	cmp	w8, #2
	cset	w0, lo
	b	LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _UTF_XX_INTERNAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UTF_XX_INTERNAL@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _CODESET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CODESET@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_nl_langinfo_l
	mov	x2, x0
	add	x0, sp, #40
	mov	x1, x23
	bl	__citrus_iconv_open
	cbz	x0, LBB0_7
; %bb.6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	str	wzr, [x20]
	b	LBB0_12
LBB0_7:
	ldr	x8, [sp, #40]
	ldr	x8, [x8]
	mov	w0, #1
	str	w0, [x8]
	str	xzr, [x8, #8]
Lloh8:
	adrp	x8, lCPI0_0@PAGE
Lloh9:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x20]
	cbz	x19, LBB0_13
LBB0_8:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_assert
	ldr	x8, [x20, #16]
	ldrsw	x9, [x20, #4]
	add	w10, w9, #1
	str	w10, [x20, #4]
	str	w22, [x8, x9, lsl #2]
	ldr	x8, [x20, #8]
	str	x8, [sp, #32]
	ldrsw	x8, [x20, #4]
	lsl	x8, x8, #2
	stp	x8, x19, [sp, #16]
	mov	x0, x21
	bl	_MB_CUR_MAX_L
	str	x0, [sp, #8]
	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
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, #0
	b	LBB0_13
LBB0_10:
	str	wzr, [x20, #4]
	ldr	x8, [sp, #24]
	subs	x0, x8, x19
	b.ne	LBB0_13
; %bb.11:
Lloh13:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _errno@GOTPAGE
Lloh16:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh17:
	str	w8, [x9]
	mov	x0, #-1
LBB0_13:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdr	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_UTF_XX_INTERNAL,4,2            ; @UTF_XX_INTERNAL
	.comm	_CODESET,4,2                    ; @CODESET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_EILSEQ,4,2                     ; @EILSEQ
.subsections_via_symbols
