	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _EUC_mbrtowc_impl
__EUC_mbrtowc_impl:                     ## @_EUC_mbrtowc_impl
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rcx), %ebx
	testl	%ebx, %ebx
	js	LBB0_2
## %bb.1:
	movq	_MB_CUR_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jg	LBB0_2
## %bb.4:
	movq	%rdx, %r13
	movq	%rdi, %r12
	testq	%rsi, %rsi
	movl	$1, %eax
	cmoveq	%rax, %r13
	leaq	L_.str(%rip), %r14
	cmovneq	%rsi, %r14
	cmoveq	%rsi, %r12
	movq	$-2, %rax
	testq	%r13, %r13
	je	LBB0_25
## %bb.5:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.15:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rcx), %r15d
	jmp	LBB0_16
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %rax
LBB0_25:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movzbl	(%r14), %esi
	testb	$-128, %sil
	jne	LBB0_10
## %bb.7:
	testq	%r12, %r12
	je	LBB0_9
## %bb.8:
	movl	%esi, (%r12)
LBB0_9:
	xorl	%eax, %eax
	testl	%esi, %esi
	setne	%al
	jmp	LBB0_25
LBB0_10:
	movb	$2, %dl
	cmpb	$-96, %sil
	ja	LBB0_14
## %bb.11:
	movl	%r9d, %edx
	cmpb	%r8b, %sil
	je	LBB0_14
## %bb.12:
	cmpb	16(%rbp), %sil
	jne	LBB0_26
## %bb.13:
	movb	24(%rbp), %dl
LBB0_14:
	movzbl	%dl, %ebx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	$0, 4(%rcx)
	xorl	%r15d, %r15d
LBB0_16:
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_MIN
	testl	%eax, %eax
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	jle	LBB0_17
## %bb.18:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %eax
	shll	$8, %eax
	movzbl	(%r14,%r12), %r15d
	orl	%eax, %r15d
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_MIN
	incq	%r12
	cmpl	%eax, %r12d
	jl	LBB0_19
	jmp	LBB0_20
LBB0_17:
	xorl	%r12d, %r12d
LBB0_20:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, %eax
	subl	%r12d, %eax
	jle	LBB0_22
## %bb.21:
	movl	%eax, (%rcx)
	movl	%r15d, 4(%rcx)
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-2, %rax
	jmp	LBB0_25
LBB0_22:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movl	%r15d, (%rax)
LBB0_24:
	movl	$0, (%rcx)
	testl	%r15d, %r15d
	cmovel	%r15d, %ebx
	movslq	%ebx, %rax
	jmp	LBB0_25
LBB0_26:
	movq	_EILSEQ@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_MB_CUR_MAX,4,2                 ## @MB_CUR_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_EILSEQ,4,2                     ## @EILSEQ
	.no_dead_strip	__EUC_mbrtowc_impl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _EUC_mbrtowc_impl
__EUC_mbrtowc_impl:                     ; @_EUC_mbrtowc_impl
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w20, [x3]
	tbnz	w20, #31, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _MB_CUR_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MB_CUR_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w20, w8
	b.gt	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x1, #0
	csel	x23, x8, x1, eq
	csinc	x21, x2, xzr, ne
	csel	x22, xzr, x0, eq
	cbz	x21, LBB0_7
; %bb.3:
	mov	x19, x3
	cbz	w20, LBB0_8
; %bb.4:
	ldr	w24, [x19, #4]
	b	LBB0_17
LBB0_5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _errno@GOTPAGE
Lloh8:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
	mov	x0, #-1
	b	LBB0_26
LBB0_7:
	mov	x0, #-2
	b	LBB0_26
LBB0_8:
	ldrb	w8, [x23]
	tbnz	w8, #7, LBB0_12
; %bb.9:
	cbz	x22, LBB0_11
; %bb.10:
	str	w8, [x22]
LBB0_11:
	cmp	w8, #0
	cset	w0, ne
	b	LBB0_26
LBB0_12:
	cmp	w8, #160
	b.ls	LBB0_14
; %bb.13:
	mov	w20, #2
	b	LBB0_16
LBB0_14:
	mov	x20, x5
	cmp	w8, w4
	b.eq	LBB0_16
; %bb.15:
	mov	x20, x7
	cmp	w8, w6
	b.ne	LBB0_27
LBB0_16:
	mov	w24, #0
	str	wzr, [x19, #4]
LBB0_17:
	mov	x0, x20
	mov	x1, x21
	bl	_MIN
	cmp	w0, #1
	b.lt	LBB0_22
; %bb.18:
	mov	x25, #0
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x23, x25]
	bfi	w8, w24, #8, #24
	mov	x24, x8
	mov	x0, x20
	mov	x1, x21
	bl	_MIN
	add	x25, x25, #1
	cmp	w25, w0
	b.lt	LBB0_19
; %bb.20:
	subs	w8, w20, w25
	b.le	LBB0_23
LBB0_21:
Lloh10:
	adrp	x9, _EILSEQ@GOTPAGE
Lloh11:
	ldr	x9, [x9, _EILSEQ@GOTPAGEOFF]
	stp	w8, w24, [x19]
Lloh12:
	ldr	w8, [x9]
Lloh13:
	adrp	x9, _errno@GOTPAGE
Lloh14:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh15:
	str	w8, [x9]
	mov	x0, #-2
	b	LBB0_26
LBB0_22:
	mov	w25, #0
	subs	w8, w20, w25
	b.gt	LBB0_21
LBB0_23:
	cbz	x22, LBB0_25
; %bb.24:
	str	w24, [x22]
LBB0_25:
	str	wzr, [x19]
	cmp	w24, #0
	csel	w8, wzr, w20, eq
	sxtw	x0, w8
LBB0_26:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_27:
Lloh16:
	adrp	x8, _EILSEQ@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EILSEQ@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MB_CUR_MAX,4,2                 ; @MB_CUR_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_EILSEQ,4,2                     ; @EILSEQ
	.no_dead_strip	__EUC_mbrtowc_impl
.subsections_via_symbols
